Battery energy storage arranged to be connected to a direct current capacitor, which is connected in parallel to a power converter. The battery energy storage includes a battery module and a controllable voltage source adapted to inject a voltage opposite to a voltage ripple of the direct current capacitor. A power system including such battery energy storage and a direct current capacitor is also disclosed.