Innovative algorithms for the management of combined RES-BESS systems