A method of yielding the average current in a PWM driven coil for an
electrohydraulic valve. The method includes transmitting a feedback
signal into a Finite Impulse Response filter to take multiple signal
samples in order to calculate and average value of current within one
cycle. This average value is transmitted to an algorithm that generates a
pulse width signal that drives the coil of the electrohydraulic valve in
the next system cycle.