In peak shaving mode, the EMS relieves load variations on generators and diesel engines using battery power for the load peaks. Batteries have faster dynamics than generators and can handle sudden loads better than generators. Peak shaving saves wear and tear of generators, stabilizes the power grid and reduces fuel consumption. Peak shaving can operate in conjunction with the spinning reserve feature.