A system for converting mechanical energy from oscillations into electrical energy, the system comprising an oscillating body, an electrical machine, a mass, a controller, a mechanical coupling of the mass with the body, and a mechanical coupling of the mass with the electrical machine,
- wherein the mechanical coupling of the mass with the electrical machine is configured so that the electrical machine generates electrical energy from displacement of the mass with respect to the body, the mechanical coupling of the mass with the body is configured to allow a displacement of the mass with respect to the body caused by a gravitational force and by a force of the electrical machine applied to the mass in the oscillations,
- wherein the system is configured to adjust the displacement of the mass by an adjustment of a force applied by the electrical machine to the mass,
- wherein the controller is configured to adjust the force applied by the electrical machine on the basis of a measurement of an instantaneous angle of inclination of the oscillating body and on the basis of at least one of:
- a measurement of an instantaneous position of the mass with respect to the oscillating body and a measurement of an instantaneous velocity of the mass with respect to the oscillating body, and
- wherein the controller is configured so that a control objective of the adjustment of the force applied by the electrical machine is to achieve that an instantaneous velocity of the displacement of the mass is positively accelerated by the gravitational force applied to the mass at all instants of the oscillations in which:
- a subtraction of the instantaneous angle of inclination of the oscillating body minus the angle of inclination of the body at rest has opposite sign to the sign of the angle of inclination of the body at rest, and an absolute value of the subtraction of the instantaneous angle of inclination of the oscillating body minus the angle of inclination of the body at rest is greater than the absolute value of the angle of inclination of the body at rest;
- and/or
- a subtraction of the instantaneous angle of inclination of the oscillating body minus the angle of inclination of the body at rest has the same sign as the angle of inclination of the body at rest,
- wherein the instantaneous angle of inclination is an angle with respect to a plane perpendicular to a direction of the gravitational force, and the angle of inclination of the body at rest is an angle with respect to the plane perpendicular to the direction of the gravitational force.