04-08-2015 02:00 PM
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
Solved! Go to Solution.
04-08-2015 02:16 PM
04-08-2015 02:18 PM
04-08-2015 03:26 PM
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
04-08-2015 04:38 PM
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.
04-08-2015 05:55 PM
04-08-2015 06:17 PM
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.