LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Furnace PID control with PID Autotuning VI and/or Kalman filter VI?

I'm attempting to tune a PID controller for our vacuum furnace (25 C -1650 C), which has very poor response characteristics with the preset PID values (87, 5min, 1min:15sec).  I have managed to obtain a relatively stable control with values of 0.5, 6sec, 2sec at 375 C.  When I use the PID autotuning VI it gives me comparitively large values for P, and somewhat higher values for I and D (153, 12sec, 4sec).  When I implement these values, the response characteristics are very poor again (slow and substantial overshoot).  I set the autotune parameters for 5 relay cycles, a relay amplitude of 1, and the default dt.

I have two questions:

 

  1. Why is the PID autotuning VI not working like one would expect (i.e. generating stable PID values)?
  2. Is it possible to implement the Kalman filter to estimate the proper PID values?
My controls understanding is very rudimentary, so I'm not clearly seeing a way from the examples to implement the Kalman filter or even which one to choose.  The issue at hand is that the furnace has the potential to be run at any temperature within it's range, potentially consuming a huge amount of my time creating a rather large lookup table of stable temperature dependent PID's if I were to take that approach.  Also, am l correct in assuming these values could change depending upon the thermal loading of different samples in the furnace?
 
Instead, I'm hoping there is someway to utilize the Kalman filter to estimate stable PID values as the autotuning feature does not appear to be working and requires a huge amount of time to tune for all of the different operating temperatures of this furnace.  Assistance is greatly appreciated.

 

0 Kudos
Message 1 of 9
(6,328 Views)

Hello,

 

Before I answer your first question, let me ask you this: The Autotuning algorithm in the PID and Fuzzy Logic Toolkit has a parameter called "control specification" inside "autotuning parameters" where you can define how "agressive" your PID should be. Are you using the fast response? If yes, try to use normal or slow and compare the results. In trying to use the "fast" mode, its response is, in general, with a big overshoot.

 

On your second question, I would like to know why you would be interested in using Kalman Filter. This technique is used to better "observe" or estimate states that are corrupted by noise. By your description, it doesn't sound like you need this technique. For your case, unless if you have two many different parameters or large time delays. maybe the correct technique for you would be using gain scheduling PID. If you design a model of your system, then Model Predictive Control could be very handy, specially if you have the profile up front.

 

Let me know if this helps.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 9
(6,309 Views)

Barp, thank you very much for the reply.

 

I've been trying to use the Fast response on the auto-tune VI because I would like for the system to respond quickly to temperature deviation from the setpoint.  I will try the Slow setting.

 

My motivation for the Kalman filter was a discussion I attended recently where an individual had implemented a kalman filter in his furnace control application resulting in minimal temperature overshoot and quick ramp rates.  I've seen some demonstration of this on the web, but I cannot find the particular article at the moment.

 

The gain scheduling PID would have temperature dependent PID's on a lookup table correct?

 

I'm curious about designing a model.  Can you provide further information on this process?

  

0 Kudos
Message 3 of 9
(6,299 Views)
Also, the Slow autotuning just finished and resulted in Kc=27507.184, KI=0.561min, KD=0.112min.  First of all the gain is not even achievable on my controller.  Secondly, the KI term is too large and the system will overshoot.  At low temperatures Kc=0.5, KI=0.16min, KD=0.08min is working very well, oscillating 300C +/- 1C.  I have yet to try high temperatures. But plan on doing so this afternoon.
0 Kudos
Message 4 of 9
(6,297 Views)

Oh, I see... Kalman Filter will allow you to have a estimation of the states and you could develop a state-space controller for it. This kind of controller have much better performance compared with PID because they have special algorithms to control your system.

 

This features are part of the LabVIEW Control Design and Simulation Module and you can actually learn from examples and tutorials from the product. Do you have this module? If you don't, you can also download from our website.

 

On the gain scheduling, you are correct. It is a VI that switch the parameters based on the setpoint and process value. We have an example inside "Toolkits and Modules >> PID and Fuzzy Logic >> PID" if you need more information.

 

Also, feel free to reply if you have more questions.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 5 of 9
(6,284 Views)

Some additional information on how to use the Autotuning VI. Because this algorithm try to develop a controller while the system is online, then the initial parameters used by the PID will influence the actual response of your system. So, if you can have some parameters tuned by hand, you could try to use this algorithm to fine tune your controller.

 

Also, try to use the "Normal" mode of PID Autotuning. This is more in line of a good setting time without too big overshoot.

 

On the comment about modeling, furnaces have the tendency to be modelled by a first or second model with a specific delay and, most importantly, with different time constants going from low to high temperatures steps than coming down. So, if you develop an experiment where you can do a step response in open loop on your system at a specific operating point, for example 40 ºC, than you can do a step on power from that point and wait until your system reaches steady-state. This should provide the time constant of your system and its gain that you could use for more advanced controllers.

 

hope this helps

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 6 of 9
(6,280 Views)

Thanks Barp, I do have the control design and simulation module.  I've tried to open the examples from the help, but for some reason an IE script error pops up:

 

"line 1, char 1, object expected, code 0"  with some other stuff

 

I would really like to implement the Kalman filter, there are several modules, and I have no experience with state-space controllers.  Can you assist me with this? 

0 Kudos
Message 7 of 9
(6,273 Views)

Barp,

 

I managed to get the examples working and found the "CDEx Continuous kalman Filter and Controller Implementation" VI.  Is this what I should be looking at?  It is not clear to me how to use this example, it appears to just be matrices for the state-space model, second-order statistics noise model, initial state estimate, initial esitmation error, and controller gain.  This is very strange to me.

 

There are 6 examples, but I'm not sure which one is most relevant to my application.  What do you recommend for watching the PV and estimating the gain states?

0 Kudos
Message 8 of 9
(6,260 Views)

That example is just a template and will not assist you if you do not read the whole chapter on Kalman Filter. I think the best example that explains how to use the discrete version of the kalman filter and a state space controller is:

 

C:\Program Files\National Instruments\LabVIEW 2009\examples\Control and Simulation\Control Design\Implementation\CDEx LQG.vi

 

If you replace the Discrete Stochastic State Space with real I/O, you should be able to reuse a lot the code. However, you will need to have a model of the system.

 

Maybe you would benefit from looking at this example:

 

C:\Program Files\National Instruments\LabVIEW 2009\examples\Control and Simulation\Case Studies\Process Control\On-Off Controller\On-Off Controller.vi

 

which is trying to model a heating system for a house. If you ignore disturbance from the ambiente temperature and any delay on your system, your model will be a first order model with gain. You would need to have an experiment to validate that, which consists applying a step response to the power and measure how the temperature change over time until it reaches a specific settling time. Based on that, you can extract the model (manually or using System Identification) and you can use that model to develop the controller.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 9 of 9
(6,232 Views)