What had to be solved
The task was to make an industrial controller for a throttling hydraulic valve. In this application it is not enough to apply PWM directly to the coil: solenoid force is related to current, while current depends on winding resistance, temperature, inductance and supply voltage.