LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pid output limit

Solved!
Go to solution

Hello Labviewers,

 

I am trying to use the PID function to tuning the proportions of 2 componenets in a reservoir. 

As input, I have a variable related to the colour of the liquid and the output a the retio between 2 liquid ingredients.

The problem that the while loop is executed every 40 seconds and I used  random numbers for the gains from another VI.

My question is how I can convert the output signal (has it upper and lower limit)  to a meaningful ratio between 0 and 1. And how the iteration time (40s) can affect my PID.

 

Cheers,

 

PS: I tried to do the same thing with the fuzzy logic toolkit and it is working perfectly, now I am trying to compare the results with the PID.

 

Zied

0 Kudos
Message 1 of 7
(4,665 Views)
Assuming that the data is in range, take the data value, subtract the minimum and divide by the range. For example, say you have an input range between 4 and 14 And the current value if 9.

9-4=5
5/10=.5

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 7
(4,658 Views)
The impact of the iteration time depends on how fast things can change in the system you're controlling.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 7
(4,653 Views)

Hi again,

 

 

Actually this is how I am "normalizing" the value of the output but I am wondering how to choose the range if I dont know how to define the limit of the output, it seems that it is between -100 and 100 according to the values I got. But not sure how to modify them.

 

For the time problem, the loop is executed every 40s, so should I change soething in the parameters of the PID.

 

Thanks.

 

Zied

0 Kudos
Message 4 of 7
(4,636 Views)

Usually the output limits are the range of the final control element, or a percentage of full-scale of that control element. For example, if you were using a valve that takes a 0-10V signal, you would set your output limits to 0 and 10, or you could use 0 and 100 and then scale that percentage to 0-10V.

 

What is the final control element in your system? To what is the PID output connected?

 

The gains for the LabVIEW PID block include time units (for the integral and derivative terms). So, you don't need to adjust anything specifically for the loop time, but you do need to tune the PID loop. You cannot use random gains from some other system and expect they'll work, unless the other system is extremely similar. A 40s loop time will work fine for a very slow system, but will not work if anything in the system can change significantly within one loop cycle.

Message 5 of 7
(4,621 Views)
Actually, I am connecting the output to a plump that deliver an amount of liquid to the system. Ideally, I would like to get an output between 0 and 1but practically, I see that the output can deviate between -100 and 100.
In the pid function, I cannot see controls to define the lower and the upper limit for the output.
0 Kudos
Message 6 of 7
(4,610 Views)
Solution
Accepted by ziedhosni

Are you using the LabVIEW PID block? Look at the help, you'll see that there's an "output range" input. That input defaults to -100 to +100, so if you don't see it on your block diagram, right-click the terminal, create a constant, and enter the values you want to use.

Message 7 of 7
(4,601 Views)