Ocular accommodation is the process of adjusting the eye's crystalline lens so as to bring the retinal image into sharp focus. The major stimulus to accommodation is therefore retinal defocus, and in essence, the job of accommodative control is to send a signal to the ciliary muscle which will minimise the magnitude of defocus. In this paper, we first provide a tutorial introduction to control theory to aid vision scientists without this background. We then present a unified model of accommodative control that explains properties of the accommodative response for a wide range of accommodative stimuli. Following previous work, we conclude that most aspects of accommodation are well explained by dual integral control, with a "fast" or "phasic" integrator enabling response to rapid changes in demand, which hands over control to a "slow" or "tonic" integrator which maintains the response to steady demand. Control is complicated by the sensorimotor latencies within the system, which delay both information about defocus and the accommodation changes made in response, and by the sluggish response of the motor plant. These can be overcome by incorporating a Smith predictor, whereby the system predicts the delayed sensory consequences of its own motor actions. For the first time, we show that critically-damped dual integral control with a Smith predictor accounts for adaptation effects as well as for the gain and phase for sinusoidal oscillations in demand. In addition, we propose a novel proportional-control signal to account for the power spectrum of accommodative microfluctuations during steady fixation, which may be important in hunting for optimal focus, and for the nonlinear resonance observed for low-amplitude, high-frequency input. Complete Matlab/Simulink code implementing the model is provided at https://doi.org/10.25405/data.ncl.14945550