A new device for the control and the connection to the grid of combined RES-based generators and electric storage systems