LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID parameter tuning

Hi, everyone:
I'm trying to use pid contrl toolkit to help me control the sample temperature in a microwave chamber. The output of advanced PID.vi is used to control the microwave power. The sample temperature of the sample is taken by an IR sensor. My set point is set to 150 degree C. The problem I have is the PV keeps oscillating and will not be stable.
My steps:
1. keep Ti and Td zero, and increase Kc gradually until the PV oscillates.
2. Increase Ti to reduce the steady state error. That's where the PV starts oscillating.
I attached some experiment results. RED curve is set point temperature profile, BLUE is the PV results.
Since I'm new on PID control, I'm not sure how to go next. Please help.
 
bjbdts
Download All
Message 1 of 17
(5,637 Views)
The three parts of a PID controller are all there for a reason.  You have the Porportional Aspect, which will make the system respond faster to larger errors, and you have the Integrative Aspect, which will tend to reduce overshoot of your setpoint but can lead to oscillation, but you didn't say anything about the derivative aspect, which will decay your oscillatory overshoot.  Just bear in mind that if you do give D a shot to use a value much smaller than for P or I.
0 Kudos
Message 2 of 17
(5,635 Views)

I think the part that puzzles me is the integral part doesn't do what it is supposed to do. I understand the overshoot, but it is supposed to reduce the steady state error, which I didn't see from my experiments. more help?

bjbdts

0 Kudos
Message 3 of 17
(5,632 Views)
 
Temperature is one of the slowest responding PID subjects, and if you'll click the above link and scroll down to Startup Values, you'll notice that your I constant is potentially 5 orders of magnitude off.
0 Kudos
Message 4 of 17
(5,622 Views)

Thanks, I agree in that system the response is slow. However that is not the case in my system. If you look at the experment results I provide, the total time I use is only 25 seconds. The period of the oscillations I have is about 2-3 seconds. When converting the period into minutes, that's what I got, about 0.04 minutes.

 

0 Kudos
Message 5 of 17
(5,618 Views)
Actually, I don't know how I missed this the first time, but it looks like something else is going on.  Your PV shouldn't be oscillating until it's larger than your set point curve.  If you have PV-SP < 0 the PV should never have a negative slope.
0 Kudos
Message 6 of 17
(5,601 Views)
Yeah. I'm confused with that too. What do you think will cause this problem? It happened the same when I set the setpoint to 100 degreeC, the PV started to oscillate at the level of 75 degree C in that case. Only the Integral value brings the PV to the setpoint, but then oscillation starts. In my system , I have a signal generator => variable gain amplifier => power amplifier =>microwave chamber. The output of the pid is connected to the control voltage of the variable gain amplifier. Output percentage value is converted to the engineering value for voltage.
 
bjbdts
0 Kudos
Message 7 of 17
(5,584 Views)
Once you find the critical proportional gain (with Ki and Kd = 0), where your output has a sustained periodic oscillation (or as close as possible), you should be able to get good starting values of Ki and Kd from either the Ziegler-Nichols or Tyreus-Luyben formulas. I used Ziegler-Nichols with no other tweaks necessary, worked first time (probably had a bit of luck too).

Click here for details of the steps and the formulas.

Here's a screenshot of what my output looked like at critical gain:




Message Edited by Bill@NGC on 02-09-2008 05:12 PM
0 Kudos
Message 8 of 17
(5,537 Views)

I never get that perfect oscillations. Please take a look at what I've got so far. One improvement I made is that I set the temperature range as 15degrre C to 200 degree C ( it was 15--500 degree C before) when converting the engineering unit to percentage. In the screenshots, dark blue is the process variable, red is set point profile. P, I and D represent Kc, Ti and Td respectively. NI_5 is where the oscillation starts. NI_6 is what I got from Ziegler-Nichols method, but I'm not satisfied with the result. My goal is that  delta T should be within  +/- 5 degreeC. In NI_7 I changed I and D a little bit, I like the end part but the overshoot is too high. Fine tuning is really time consuming, Has anyone here tried the autotuning method? Any recomendations/experiences on this? Since I'm new on PID control, Am I at the right track?

 

bjbdts

Download All
0 Kudos
Message 9 of 17
(5,479 Views)
Hi bjbdts,

I am unsure as to why you are getting such significant oscillations, but I will add my input on tuning using PID control techniques and hopefully that will help you to adjust your gains accordingly.  I realize some of this information is echoing what is above, but I am hoping it will give you some new insight.

To start with adjusting the P (proportional) constant is going to make your system response faster but can quickly drive a system to instability and directly affects steady state error.  You are correct that you should be tuning this first.  This will also increase rise time (time to 90% of setpoint) and overshoot (% that PV is off from SP before controller negatively kicks in).

After this, it is good practice to tune the I (integral) constant.  The Integral constant helps you to reduce your steady state error (% PV offset from SP at steady state), but by doing so introduces overshoot and oscillations.  It may be worthwhile to keep this at a minimum for your system.

Finally, the D (derivative) control aspect helps to reduce overshoot.  However it is highly sensitive to noise and can slow down a system response, ie. increase settling time (time to steady-state value)/rise time, but decreasing overshoot.

Now, you cannot have the best case in all situations, so you will have to decide what performance aspects are most important to you.  Beyond that, Jeff was correct that you should not be seeing a negative slope (beyond noise) until your PV is above your setpoint.  I believe this is the case in your Image 7, however it seems as though you need to crank up the P part, and reduce your I, to reduce the oscillations quickly and bring your settling time down.

Our auto-tuning VI allows you to fine tune your PID algorithm based on your performance goals.  It requires that you initially enter a set of stable PID control constants and it will iterate to help you find better constants.

I hope that helps,

Regards
Rishi L
National Instruments
Applications Engineer
0 Kudos
Message 10 of 17
(5,410 Views)