The main goal of this paper is to design a compensator able to restore the nominal behavior of a planar system, which is rendered chaotic by an unmeasurable sinusoidal disturbance input. To reach such a goal, some instruments, taken from algebraic geometry, are used to estimate the unmeasurable disturbance from the time derivatives of the output of the system and of the control input.