When you use an H bridge with PWM to open circuit, the FET driver ESR impedance increases as duty cycle,d, decreases, thus average ESR.avg=ESR/d.
If you had a linear supply the ESR would be constant. The dampening factor , in controlling a linear motor like in a Bass speaker, depends on the load/source impedance ratio being >> 10:1 with 100:1 giving stiffer control of speed changes.
Unfortunately monitoring current only measures the force applied to inertial load and friction but not speed. If you want speed control then you must sense motor speed.
- one way is sensing commutation frequency of load current of motor while filtering out PWM which is much higher Frequency.
- the better way is to use a tach or hall sensor on shaft.
Without speed feedback you can only control the acceleration not precise speed unless load profile is constant & repeatable. Speed , drag friction and inertia all affect avg. current.
To optimize control of acceleration and speed you need to compute the energy dissipation or V*It to prevent damage to either motor or driver in more sophisticated way from unforeseen conditions.
This would allow stall current but only for a limited time in an analog sliding scale.
The loop gain for Ki has another integral because V is the integral of Acceleration,,which you are controlling with current.