From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control of flow rate

Solved!
Go to solution

Hello everyone,

I am new in LabVIEW but I should learn and implement to finish my project.

I am trying to control the flow rate. Below, the picture of block diagram ans vi are attached.

Either I did not understand the PID control fully or there is a problem with simple pid controlling kit.

I am trying to control flow rate by taking the raw voltage data from daq and then the calibiration equation converts it to the pressure difference and finally plugging that value to the flow rate equation, I get flow rate and feed it to the pid controller. In this part of the process, I am expecting the pid controller to continue getting value and trying to reach to the set point that I assigned and send that signal to the output which is the actuator but it continues to go beyond the set point and reaches to the higher limit and stops there, stops I mean, continue getting signal from daq.

What is the problem with my logic or I am totally wrong? Any help would be appreciated and thanks in advance.

And also, I am using LabVIEW 2009

Download All
0 Kudos
Message 1 of 23
(5,247 Views)

Hello everyone,

I am new in LabVIEW but I should learn and implement to finish my project.

I am trying to control the flow rate. Below, the picture of block diagram ans vi are attached.

Either I did not understand the PID control fully or there is a problem with simple pid controlling kit.

I am trying to control flow rate by taking the raw voltage data from daq and then the calibiration equation converts it to the pressure difference and finally plugging that value to the flow rate equation, I get flow rate and feed it to the pid controller. In this part of the process, I am expecting the pid controller to continue getting value and trying to reach to the set point that I assigned but it continues to go beyond the set point and reaches to the higher limit and stops there, stops I mean continue getting signal from daq.

What is the problem with my logic or I am totally wrong? Any help would be appreciated and thanks in advance.

And also, I am using LabVIEW 2009

Download All
0 Kudos
Message 2 of 23
(5,241 Views)

At first blush, that looks correct I think your problem might be in the datatype you're wiring, make sure that the dynamic data wire is converted to a double before your math and the PID.

Other than that, I'd suggest tuning your PID control to see if it has an effect (your values may be very off making it look like it's not working). This link has been very useful to help me tune

Message 3 of 23
(5,237 Views)

At first blush, that looks correct I think your problem might be in the datatype you're wiring, make sure that the dynamic data wire is converted to a double before your math and the PID.

Other than that, I'd suggest tuning your PID control to see if it has an effect (your values may be very off making it look like it's not working). This link has been very useful to help me tune.

OR

Keep in mind that LabVIEW's PID output is perfectly capable of outputting numbers with long decimals. What does your 2nd module do if you give it a value of 87,497446875468734879? you may need to round your output after you're done (Use round up or round down, not to nearest). 

Message 4 of 23
(5,236 Views)

Thank you very much, I wil check that link.

0 Kudos
Message 5 of 23
(5,231 Views)

Sorry but I did get the converting dynamic data to double. Do you mean, putting "From DDT"? Choosing which one for converting to double? I put rounding to the nearest value to the output before going to the daq output. I guess it is because of the pid tuning problem.

Download All
0 Kudos
Message 6 of 23
(5,205 Views)

@ATE-EGNE wrote:


(Use round up or round down, not to nearest). 


Using to nearest will upset the PID control as it creates unpredictable behavior (from the perspective of the Internal PID) 

Message 7 of 23
(5,193 Views)

Did the rounding to +infinity, but could not the converting part and the problem is still continuing. Tuning also did not help.

0 Kudos
Message 8 of 23
(5,186 Views)

Hi Aeros,

 

I don't understand the need for that "rounding".

 

See this:

check.png

 

- You didn't set any limit (upper/lower). Setting both to zero may/will result in erranous PID behaviour…

- Why did you use the PtByPt-Mean? Why don't you use the standard Mean function?

- Do you have access to the PID toolkit for LV2009?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 23
(5,171 Views)

The rounding was suggested by the previous user's reply, his point was that there can be a lot of digits in the decimal places which can cause a problem.

Regarding to the upper and lower limits, I assigned here for the lower limit zero and for the upper 10 but i guess it did not appear there, I will check that. Yeah concerning about the mean yeah I corrected that but thanks for pin pointing. I guess, you mean pid toolkit, yeah I used the simple pid toolkit from one of the examples that comes with software.

0 Kudos
Message 10 of 23
(5,167 Views)