08-15-2019 05:39 AM
Hello
I am programming a code to control the speed of a wind tunnel. The relation between voltage and speed of this machine is nearly quadratic. Thus this value has to be slightly corrected. The air pressure controller of this machine takes some time to stabilize after a signal is sent to it. Therefore what I need is to tell the air pressure controller to hold that speed for some time, 30 seconds, even if the difference between the actual speed, average wind tunnel speed, and the input speed is less than 1m/s. Could I have some ideas about how to solve this issue.?
Kind regards,
chabaco
Solved! Go to Solution.
08-15-2019 05:48 AM
You can easy enough start the PID some 20-30 seconds after a signal has been sent. It also sounds like you should use a slow sample rate (like 1/s), a high Pt and the block to limit increase. The Wiki on PID gives some good approaches as to find the parameter values, which can be really hard.
/Y
08-15-2019 05:53 AM
Hi Yameada. Thanks for your reply. How can I start the PID 30 seconds after a signal has been sent?
cheers
chabaco
08-15-2019 05:57 AM
You can use ElapsedTime and reset it as you send the signal. Until 30s has Elapsed, keep resetting the PID (or just skip it with a case structure). Something like that.
(I'm assuming you have some sort of loop that'll run/check the PID and so on)
/Y
08-15-2019 06:00 AM
Hi chabaco,
The relation between voltage and speed of this machine is nearly quadratic. Thus this value has to be slightly corrected.
Therefore what I need is to tell the air pressure controller to hold that speed for some time, 30 seconds, even if the difference between the actual speed, average wind tunnel speed, and the input speed is less than 1m/s.
Do you look for some "deadband" behaviour? Look up that term at Wikipedia…
08-20-2019 04:49 PM - edited 08-20-2019 05:09 PM
Hello
I have to make a code to control the speed of a wind tunnel. The PID values help the user approach the speed that he wants to input. And the VI works very well when there are increments of speed. I.e. It is fast and accurate(graph "increment of speed" attached). However, when I want to reduce the speed of the wind tunnel the system either becomes unstable or it takes very long to do it(graph "reduction of speed" attached). I was thinking about using a PID output rate limiter and a PID control input filter to moderate the values given by the PID when I reduce speed. Could I have some advice regarding the usage of these VIs as well as other tips to solve this issue?
Kind regards,
chabaco
08-20-2019 09:44 PM
What are your units of speed on the Y-axis?
Any idea what is causing this? I'm wondering if it is an inertia effect.
I wonder if you can use a different set of gains based on whether the PV-SP is positive or negative?
(I'm not a PID expert, but your problem has piqued my interest.)
08-21-2019 01:09 AM - edited 08-21-2019 01:25 AM
Hi chabaco,
08-21-2019 01:22 AM
The units are m/s and the x axis is calculated in seconds
08-21-2019 01:29 AM
This is subVI. The loop runs as true constant the whole time because the main VI will stop the program. The PV is calculated with the formula sqrt((2×pressure)/density). A pitot tube reads the speed of the wind tunnel.
Could you explain me how wait function could help me improve the code?
How can I use PID gain scheduler
Kind regards
Chabaco