Two fundamental questions in the investigation of any sensory system are what physical signals drive its primary sensory neurons and how such signals are encoded by the successive neural levels during natural behaviour. Due to the complexity of experiments with awake, actively sensing animals, most previous studies focused on anesthetized animals, where the motor component of sensation is abolished and therefore those questions are so far largely unanswered. The aim of this thesis is to exploit recent advance in electrophysiological, behavioural and computational techniques to address those questions in the sub-cortical whisker system of the mouse. To determine the input to the whisker system, in Chapter 2 I recorded from primary whisker afferents (PWAs) of awake, head-fixed mice as they explored a pole with their whiskers, and simultaneously measured both whisker motion and forces with high-speed videography. To predict PWA firing, I used Generalised Linear Models. I found that PWA responses were poorly predicted by whisker angle, but well predicted by rotational force (moment) acting on the whiskers. This concept of âmoment encodingâ could account for the activity of PWAs under diverse conditions - whisking in air, active whisker-mediated touch and passive whisker deflection. The discovery that PWAs encode moment raises the question of how mice employ moment to control their tactile behaviours. In Chapter 3 I therefore measured moment at the base of the whiskers of head-fixed mice, performing a novel behavioural task, which involved whisker-based object localisation. I then tested which features of moment during whiskerobject touch could predict mouse choice. By using probabilistic classifiers, I discovered that mouse choices could be accurately predicted from moment magnitude and direction during touch, combined with a non-sensory variable - the mouse choice in the previous trial. Finally, in Chapter 4 I asked how tactile coding generalized to whisker system sub-cortical brains regions during a natural active whisker-based behaviour. I therefore combined a naturalistic whisker-guided navigation task and extracellular recording with a novel generation of high density silicon probes (O3 Neuropixel probes) and studied how touch and locomotion were encoded by the whisker first (ventral posterior nucleus, VPM) and higher order thalamic relay (posterior complex, PO) and hypothalamic regions and (zona incerta, ZI). Using multiple linear regressions, I found that neurons in the relay nucleus VPM encoded not only touch, but also locomotion signals. Similarly, neurons in the higherorder regions PO and ZI were driven by both touch and locomotion. My study showed that in the awake animal, in the central part of the whisker system, peripheral signals were preserved, but were encoded concomitantly with motor variables, such as locomotion. In summary, in this thesis I identified the mechanical variable representing the major sensory input to the whisker system. I showed that mice are able to employ it to guide behaviour and found that correlate of this signal was encoded by central neurons of the whisker system in VPM, PO and ZI, concomitantly with locomotion.