LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID time

Solved!
Go to solution

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

0 Kudos
Message 1 of 11
(2,831 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 11
(2,821 Views)

Hi Yameada. Thanks for your reply. How can I start the PID 30 seconds after a signal has been sent?

 

cheers

chabaco

0 Kudos
Message 3 of 11
(2,814 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 11
(2,798 Views)

Hi chabaco,

 

The relation between voltage and speed of this machine is nearly quadratic. Thus this value has to be slightly corrected.

  • I would use a linear behaviour for your PID (and manual input) and scale the output value of the PID to your desired voltage. (PIDs work much better on linear systems.)
  • Btw. there are polynomial functions in the Math palette to apply polynomial coefficients to X…
  • You should set a reasonable output range for your PID.

 

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(2,793 Views)

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

0 Kudos
Message 6 of 11
(2,759 Views)
Solution
Accepted by topic author chabaco

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.)

Message 7 of 11
(2,688 Views)

Hi chabaco,

 

  • You could use different PID gains for "increase speed" and "reduce speed" cases: use the PID gain scheduler function to implement such a feature.
  • You should optimize the PID gains for the "reduce speed" case.
  • In your VI you don't read any pv value: where do you get the current speed value from?
  • There is no wait function in your loop: are you sure don't want to run the PID and the DAQAssistent as fast as possible…
  • How do you stop your VI?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(2,663 Views)

The units are m/s and the x axis is calculated in seconds

0 Kudos
Message 9 of 11
(2,654 Views)

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

0 Kudos
Message 10 of 11
(2,648 Views)