Algorithm for the search of the secondary converter optimum impedance in a punctual wave energy converter