Electronics > Projects, Designs, and Technical Stuff
Question on PID for speed control of DC motor in treadmill application
<< < (3/5) > >>
XaviPacheco:
Wait.. what? Why multiple PI for this application? It's a 'simple' speed controller.


--- Quote from: Yansi on November 02, 2018, 11:12:23 pm ---
Never! control duty cycle of any (large) electric machine directly!  Even if it is small. Large dangerous currents may still flow through the circuit. Any suggestion to control duty cycle directly is mostly wrong assumption (at least troublesome!), so is switching between different PI regulators for a single control loop.

--- End quote ---

What do you mean exactly by "directly"?
coppercone2:
it might have something to do with the momentum of the mechanical system, I am not sure.
krisRaba:
In my application I have current limiter. It is a shunt resistor + comparator + PWM_off input (OCref clear). I can adjust comparator threshold by analog output.
I think it implements mentioned current control loop.

One thing I am not sure now is the set point for that loop. At the moment I adjust the PWM duty in speed controller and current loop is only a limiter. It works OK as motor should not exceed given current limit but maybe it would be better to control current loop threshold by speed control loop?
But I don't know what should control PWM duty then? Maybe it should be always 100% and limited by current loop? Hmmm...
jbb:

--- Quote from: XaviPacheco on November 03, 2018, 12:56:54 am ---Wait.. what? Why multiple PI for this application? It's a 'simple' speed controller.


--- Quote from: Yansi on November 02, 2018, 11:12:23 pm ---
Never! control duty cycle of any (large) electric machine directly!  Even if it is small. Large dangerous currents may still flow through the circuit. Any suggestion to control duty cycle directly is mostly wrong assumption (at least troublesome!), so is switching between different PI regulators for a single control loop.

--- End quote ---

What do you mean exactly by "directly"?

--- End quote ---

The ‘classic’ DC motor control is as follows:
- ‘fast’ inner current loop controls motor current. This loop sets PWM. Typically a PI controller is used here, because Derivative action is sensitive to noise.
- ‘slow’ outer speed control loop sets the motor current reference

So no user input (eg speed reference) is directly passed to the PWM unit.
krisRaba:
And one thing that is very important because of PID idea of operation. You MUST have reliable feedback!
If your sensor is broken and you won't detect that, your PID will "see" huge error between SP and PV and will increase output value (PWM duty / current setpoint)  to reduce error. Becasue it won't help (broken sensor gives wrong PV or 0) it will end up with maximum power applied to motor.
In treadmill you probably use light-barrier sensor detecting slots on motor fan or somewhere on shaft. You can set timeout for incoming pulses or whatever. But take that into account for safety of your users.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod