Application of a model for optimizing steady state and transient control of hydraulic dynamometers