To accommodate this model error, the apparatus may be configured to monitor the actual motor currents and in the event that these do exceed the limits set may instruct a further reduction in the torque demand limit. This is shown in 
Charge excess: Where there is a model error, and the current demand from time to time exceeds the limits, there will be a charge excess which is accumulated over time. This charge excess can be seen in 
The charge is defined as the integral of positive battery current error (actual-limit) for motoring and negative battery current error (actual-limit) for generating. The charge is calculated as a moving average over a predefined window (e.g. 1 second) with an update rate of, for example, 50 times/second. This strategy ensures that at any time in the last second (as an example) the battery current limit is not exceeded by the maximum charge limit. If in the next predefined window, no increment in the charge exists, the torque limits reduction factor will be set to unity (no correction needed) as the charge becomes zero. Qmotor[As]=∫01s(ibatt?ilimmot)·[(ibatt?ilimmot)>0]