Re: PID question
- From: John Popelish <jpopelish@xxxxxxxx>
- Date: Tue, 21 Nov 2006 23:25:50 -0500
hondgm@xxxxxxxxx wrote:
I'm working on a linear bench power supply using a microcontroller. My
plan is to have a DAC set the output voltage, which will be regulated
by a simple op-amp circuit.
An analog input on the micro will monitor load current. I plan on
using this value to provide current limiting, via a PID algorithm
controlling the set voltage. Some general PID tuning advice in a
Microchip PDF says to first set Kp (with Ki and Kd set to 0) so the
system is as stable as possible.
With only Kp set, the voltage output just follows the error. Not too
helpful. Things got better when I added Ki. I'm not sure if I need
Kd. This seems like a somewhat difficult problem because anything can
be connected as a load.
I've searched the Internet, but nobody seems to be using PID in this
way. I'm sure it is being done, however. What is some general advice
on tuning this PID system? So much information out there seems to be
related to motors and heaters.
In general, I think a current control loop has to react much faster than a voltage control loop. One way to accomplish this is to have two PID controls, a fast one that controls current, and a slow one than controls voltage, by modifying the setpoint for the current loop. This is called a cascade controller (a single output controlled by two measured variables, one slaved to the other. You implement current limit by having a low selector at the current controller setpoint. In other words, the actual current controller setpoint is the lower of, the current limit value, or the output of the voltage controller. Both the setpoint for the voltage controller, and the current limit value can come from your DAC.
As to tuning the controllers, a visual method is quite effective, if you have a load stepper that provides the loops with clean, repeatable steps that you can sync a scope to. If you need help with the tuning concepts based on observing the time response of a PID control loop, I wrote a tutorial (focused on industrial process control, but applicable to any PIC controller) available at:
http://www.tcnj.edu/~rgraham/PID/popelish.html
You would tune the current controller, first, with only the limit setpoint in effect, then tune the voltage controller supplying the setpoint for the current controller.
.
- Follow-Ups:
- Re: PID question
- From: hondgm
- Re: PID question
- References:
- PID question
- From: hondgm
- PID question
- Prev by Date: Re: what's the meaning of 'assert' and 'deassert'?
- Next by Date: Re: what's the meaning of 'assert' and 'deassert'?
- Previous by thread: PID question
- Next by thread: Re: PID question
- Index(es):
Relevant Pages
|