02-16-2010 07:58 PM
I have two questions:
02-17-2010 08:42 AM
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.
02-17-2010 09:02 AM
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?
02-17-2010 09:08 AM
02-17-2010 09:32 AM
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.
02-17-2010 09:44 AM
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
02-17-2010 10:07 AM
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?
02-17-2010 02:02 PM
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?
02-18-2010 09:41 AM
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.