03-01-2011 05:13 AM
For my senior design project, I have to give a 0-5 bar input signal.( set point).
Right now I directly connected it to set-point of "PID Advanced."
After simulating a Transfer Function and a pressure sensor, I am giving
some value in between 0-5 bar as Process Variable to PID Advanced.
But the PID O/p shows up as follows:
When SP=5 bar, PV starts increasing towards 5 bar and PID O/P slowly increases to " 5 ".
When PV reaches 5 bar, PID O/p stays at 5 !!
I want the controller action to show that when SP=PV controller output is zero( at least approximately). This is not happening.
I then tried to give SP in terms of % between 0 to 100.
I then introduced a EGU to % VI in the feedback to convert the PV of 0-5 bar into %.
Now its the same story again.
When SP=100%, PV starts increasing from 0.
Similarly Controller output increases from 0%, but when SP=PV=100%, controller output shows 100% .
I want the controller ouput as follows:
if SP>PV then o/p>0 (increasing towards 100%)
if SP=PV then o/p=o%
if SP<PV then o/p= decreasing towards -100%)
The detailed help in labview did not help. Neither did the example in
the examplefinder, since its too complex with a lot of other things.
Please help me.
Thank you.
03-01-2011 08:41 AM
Could you post your vi?
03-01-2011 09:06 AM - edited 03-01-2011 09:07 AM
I am sorry,but as of now I do not have a ready VI or something,which I have prepared . Whatever I posted above were results of some editing and experimentation with a ready-made VI found on the internet. I am still trying to learn the basic stuff of how to use LabVIEW to create simple first order PID control.
What I am trying to replicate is this:
I am attaching a file here. This is an example VI.
if we run this VI and increase the setpoint and watch the horizontal
slider(green), we realise that as the PV nears the SP, the green bar goes
from +100, towards 0. Also in the VI we can actually see that the
controller is giving -100 to 100, and then a formula is used to make it 0
to 100.
I could not even get the Output to swing from -100 to 100.
This VI is exactly what I am trying to replicate.
Its my first time at LabVIEW and at a PID control project, so I am sorry if I cannot express the doubt in a correct fashion.
Hope the VI clears what I am trying to put forward.
Thank you again.
03-01-2011 09:29 AM
Need more information to help, sorry.
03-01-2011 11:04 AM
Sorry.
Here is the code.
Its very plain and simple, but I would be glad if you can help.
I found an error.
There was a multiplication I was carrying out which was in error.
I have removed that now. I think now your explanation above is making complete sense with what is happening.
Still it is good if you can tell me how to implement % to EGU and vice versa.
Also if you run the VI, the VI itself runs very sluggish.
Can you help me out with the correct timing parameters for running VI?
Thank you.
03-01-2011 01:10 PM
Now I think I can clarify my problem:
When we run the VI and move the SP upto say a value of 2.
With P= 0.05
I=0.01
D=0
the PV slowly moves upto a value of 2.
But then the display named "PID output" also shows 2. When SP=PV I want
it to show zero, so that I can signify to the examiner that error output
is zero.
Since PID O/P is error= SP-PV, then it should show zero right?
Thank you.