System for generating electrical energy, comprising:. a bar fixed at one of its ends;. a source of a pressurized fluid;. a feeding duct connected to the source of a pressurized fluid;. an inlet solenoid valve, whose inlet opening is connected to the feeding duct;. a three-way union, having an inlet opening, connected to the outlet opening of the inlet solenoid valve, an exhaust opening and a connection opening;. an exhaust solenoid valve, whose inlet opening is connected to the exhaust opening of the three-way union;. an exhaust duct connected to the outlet opening of the exhaust solenoid valve;. a connection duct connected to the connection opening of the three-way union;. at least one operating cylinder connected to the connection duct, the stem of the operating cylinder bumping against the bar upon its exit from the body of the operating cylinder;. a command and control board;. a first rod, which is connected with its first end to the bar, and a second rod, which is connected with its first end in an articulated manner to the second end of the first rod, the two rods (11a,11a') acting as transformation and transmission means, which transform the oscillation movement performed by the bar into a back-and-forth translation movement and then transmit said back-and-forth translation movement;. drive means (11b;11b'), which are connected in an articulated manner to the second end of the second rod, to receive from it said back-and-forth translation movement and to execute thereby a cyclic drive movement, and. a device for generating electrical energy (11c;22),which is connected to the drive means (11b;11b') so as to be driven by the cyclic drive movement which the drive means (11b;11b') execute, during the operation of the system the inlet solenoid valve and the exhaust solenoid valve being continuously switched with a frequency equal to the natural frequency of the bar from a first operating state thereof, wherein the inlet solenoid valve is open and the exhaust solenoid valve is closed, to a second operating state thereof, wherein the inlet solenoid valve is closed and the exhaust solenoid valve is open, and vice versa from said second operating state to said first operating state.. a bar fixed at one of its ends;. a source of a pressurized fluid;. a feeding duct connected to the source of a pressurized fluid;. an inlet solenoid valve, whose inlet opening is connected to the feeding duct;. a three-way union, having an inlet opening, connected to the outlet opening of the inlet solenoid valve, an exhaust opening and a connection opening;. an exhaust solenoid valve, whose inlet opening is connected to the exhaust opening of the three-way union;. an exhaust duct connected to the outlet opening of the exhaust solenoid valve;. a connection duct connected to the connection opening of the three-way union;. at least one operating cylinder connected to the connection duct, the stem of the operating cylinder bumping against the bar upon its exit from the body of the operating cylinder;. a command and control board;. a first rod, which is connected with its first end to the bar, and a second rod, which is connected with its first end in an articulated manner to the second end of the first rod, the two rods (11a,11a') acting as transformation and transmission means, which transform the oscillation movement performed by the bar into a back-and-forth translation movement and then transmit said back-and-forth translation movement;. drive means (11b;11b'), which are connected in an articulated manner to the second end of the second rod, to receive from it said back-and-forth translation movement and to execute thereby a cyclic drive movement, and. a device for generating electrical energy (11c;22),which is connected to the drive means (11b;11b') so as to be driven by the cyclic drive movement which the drive means (11b;11b') execute, during the operation of the system the inlet solenoid valve and the exhaust solenoid valve being continuously switched with a frequency equal to the natural frequency of the bar from a first operating state thereof, wherein the inlet solenoid valve is open and the exhaust solenoid valve is closed, to a second operating state thereof, wherein the inlet solenoid valve is closed and the exhaust solenoid valve is open, and vice versa from said second operating state to said first operating state.