DPRG List  

[DPRG] Driving an H-Bridge with a switching power supply

Subject: [DPRG] Driving an H-Bridge with a switching power supply
From: Ed Koffeman edk at kinetric.com
Date: Mon Dec 29 09:49:01 CST 2003

Hi, David.

The varying battery voltage creates a variance in the overall gain of the
PID control loop and therefore affects the tuning.

If your micro can measure the battery voltage (even as a rough relative
value), then all you should have to do is multiply the result of the PID
calculations by the factor representing the inverse of battery voltage over
the nominal voltage it was tuned at e.g. the minimum operating voltage.  The
result should always produce the same amount of corrective drive regardless
of the battery voltage.  

Of course, when the battery is low you will have a lower top speed, but that
will be the same speed as if you were to regulate to that lower voltage, so
really you are gaining the ability to go faster or handle greater extremes
when the battery is fully charged.

The above presupposes that the motor driver PWM frequency is high enough for
continuous conduction e.g. bare minimum 3 or more times the time constant of
the motor windings.  A very low frequency PWM e.g. 200 Hz will not likely
behave in a correct manner - the PWM percentage will more directly affect
torque than speed, because the current can drop to zero during the off time
of each PWM pulse.  You probably need to run 2000+ Hz. (This applies to all
PID imho.)

Ed Koffeman

More information about the DPRG mailing list