LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement PID for process where process variable is having both positive and negative magnitude using Labwindows/CVI

I am using Labwindows/CVI v 5.01 with PID tool kit
i need convert process variable and set point in percentage
in case if process variable is having +ve and -ve magnitude how to handle such situation
Can any one help me to sove the problem
0 Kudos
Message 1 of 4
(2,975 Views)
Hi,

Consider that the range for your process variable (x) is (a, b) (where a, b can be negative or positive, but a < b). The PID toolkit requires that this is expressed as a percentage. The conversion would be:
x' = 100.0 * (x - a) / (b - a)
Here x' is the value in percentage and you should pass x' to the PID toolkit functions. The inverse conversion would be:
x = a + (x' * (b - a) / 100.0)

Hope this helps,
Mohan
0 Kudos
Message 2 of 4
(2,975 Views)
Hi Mohan,
Thanks for the solution, i will try it soon. Meanwhile i forgot to ask other part of my question.
1. In addition to above, if SetPoint is also having +ve and -ve magnitude, how to set it in percentage
2.Given these PV and SetPoint, How to convert PID output into real signal
0 Kudos
Message 3 of 4
(2,975 Views)
Hi Ramu,

You should refer to the CVI PID toolkit reference manual for more information on this. If you do not have this manual for any reason, you can get it from NI's online product manuals library:
http://www.ni.com/pdf/manuals/320794a.pdf

About your questions:
1) The setpoint is mostly the same as the process variable, and so the same conversion applies.
2) I think, the conversion for the output depends on the range of your output hardware (this also seems to have to do with your choice of the proportional band). See the reference manual for more detail.

- Mohan
0 Kudos
Message 4 of 4
(2,975 Views)