A depth control system based on the three point hitch of an agricultural tractor and a wheel sensor was developed for real time soil compaction measurements, aiming to develop compaction maps with uniform soil depths. To measure the distance variation between the soil surface and the frame of the compaction sensor system a pendulum-type metal-wheel sensor with a linear displacement transducer was designed. An analytical-statistical hybrid model was developed for the direct calculation of the frame height variation utilising the sensor output in volt. Results of various measurements performed on asphalt road, soil road and agricultural silty clay loam soil were compared with ultrasonic measurements to validate the sensor, resulting in standard deviations of 0•0035 m, 0•0051 m and 0•0080 m respectively. The relatively big weight of 175 N made the wheel sensor less sensitive to height variations compared to the ultrasonic sensor when passing directly above plant stubble. Therefore, the wheel sensor can be properly used in fields covered with plant residue and stubble, where the ultrasonic sensor provides misleading measurement of distance from the soil surface. A semi-analytical model was developed for the conversion of the voltage applied to the hydraulic system of the thee point hitch of a New Holland 8160 agricultural tractor to the depth under the soil surface of the cutting tool. The model consists of two distinct submodels: a model for the agricultural tractor based on a kinematic and dynamic analysis of the tractor in the xy-plane and a model for the hydraulic system with a theoretical model structure, for which the parameters have been determined by means of black box frequency domain identification techniques. Both submodels have been coupled and succesfully validated by comparing experimental results with those predicted by the model. It was concluded that the tractor dynamics were not excited by the activity of the hydraulic subsystem. Therefore, a reduced model consisting of the hydraulic system model multiplied by a conversion factor was used for controller design. Based on the dynamic model of the system, several controllers were designed with the root locus technique. A PID controller with a first order low pass filter on the D-action provided the best results in field conditions, reducing the depth variation range from 0.012 m to 0.002 m.