The problem of the maximization of the energy produced by a self reacting point absorber subject to motion restriction is addressed. The main objective is to design a control system suitable for real-time implementation. The method presented for the solution of the optimization problem is based on the approximation of the motion of the device and of the force exerted by the power take off unit by means of a linear combination of basis functions. The result is that the optimal control problem is reformulated as a non linear program where the properties of the cost function and of the constraint are affected by the choice of the basis functions. An example is described where the motion and the force are approximated using Fourier series; an optimization algorithm for the solution of the non linear program is also presented. The control system is implemented and simulated using a real sea profile measured by a waverider buoy.