Re: PID question



hondgm@xxxxxxxxx wrote:
Costas Vlachos wrote:
John Popelish wrote:
The one that reads current cannot be involved in the analog
current regulation, without slowing it down, though it is
fine to use it for monitoring the average current for other
purposes. You will have to use the analog signal it
digitizes as the feedback for the analog PID current regulator.
John, I think there is a misunderstanding here. The OP *doesn't have*
and analogue PID current regulator! He wants to do it in s/w with the
PIC. The only analogue regulator in his setup is for the voltage. He has
*one* DAC to provide the voltage set point to the analogue voltage
regulator, and reads the current through an ADC. He wants to use that
ADC's reading to limit the current digitally by modifying the voltage
set point of the analogue voltage regulator using a PID algorithm in
s/w. I hope this is now clearer.

--
Regards,
Costas
Yes, thank you! I wasn't sure if I was describing this clearly. This
is exactly what I'm doing. No analog current limiter here. On your
next post where you say that "you must allocate several samples to your
desired response time", do you mean that I should be taking an average
of several samples before feeding it into the PID loop? I am doing
this, and yes it probably would be very unstable otherwise. I will
post results when I get something more finalized, which could take
awhile.

What I meant was that you should tune your PID so that the speed of response of the current limiter is such that there are several samples spread along the transition curve (say, at least 10). Otherwise your system may exhibit oscillations around the set point in the transient period (under-damped) and may be dangerously close to instability. Given that a bench PSU is supposed to drive a variety of loads, I would prefer to tune for a conservative (over-damped) response at the expense of speed.

The averaging that you're doing to obtain each sample is a low-pass filter that removes glitches and noise. It's a good thing. But I was talking about the samples that the PID sees (after the averaging). So, if each sample is the average of, say, 5 A/D readings, this would result in a loop sample time of 50us. This is the sample time I was talking about. So, 10 samples in the transient period of the closed-loop response would result in a response time of around 500us.

To tune your PID, start with P only (adjust it to a conservative value) and then slowly increase I until you get a suitable response (remember, slow is usually better in terms of stability). Then play with P and I to fine-tune. You may not need the D term as it amplifies the noise present in the error term.

--
Regards,
Costas
_________________________________________________
Costas Vlachos Email: c-X-vlachos@xxxxxxxxxxxxxx
SPAM-TRAPPED: Please remove "-X-" before replying
.



Relevant Pages

  • Re: PID question
    ... You will have to use the analog signal it digitizes as the feedback for the analog PID current regulator. ... The only analogue regulator in his setup is for the voltage. ... He wants to use that ADC's reading to limit the current digitally by modifying the voltage set point of the analogue voltage regulator using a PID algorithm in s/w. ...
    (sci.electronics.design)
  • Re: PID question
    ... You will have to use the analog signal it digitizes as the feedback for the analog PID current regulator. ... The only analogue regulator in his setup is for the voltage. ... He wants to use that ADC's reading to limit the current digitally by modifying the voltage set point of the analogue voltage regulator using a PID algorithm in s/w. ...
    (sci.electronics.design)
  • IXYS High Voltage current regulator
    ... Haws any one tried IXYS current regulator? ... IXCY10M45, wats the ... response & how about IXCY10M90S how about the heating Issue? ...
    (sci.electronics.design)