LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID instrumentation and application

Solved!
Go to solution

Hi,

I am using LabVIEW last 1 and a half years for data acquisition and some actuators control. Recently, I need to apply the PID based control method. I saw some sample coding http://www.ni.com/en-us/innovations/white-papers/06/advanced-features-in-pid-tuning.html here. I am curious to know the instrumentation process. I know, I need to use relay/SSR/SCR  but confused about microcontroller. Would anyone suggest me about the actuator controller, please? 

0 Kudos
Message 1 of 35
(3,298 Views)

Hi milon,

 

the "controller" will be your computer as it handles the DAQ hardware as well as this PID function...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 35
(3,257 Views)

Dear GerdW,

I want to control an AC powered pump flow rate. I need to control (increase/decrease) the power. Of course, NI USBs can't do that. I saw this video (https://www.youtube.com/watch?v=fkbt85mBzuM) but can't understand the communication with the actuator (pump/heater/fan...etc). Would you please explain the fact? 

More specifically, number 1 (in the picture) task/channel is connected with the sensor. How about number 2? Is it connected with an actuator (fan/heater/pump) or with the same temp sensor?

PID application.JPG

0 Kudos
Message 3 of 35
(3,232 Views)

Hi Milon,

 

can't understand the communication with the actuator (pump/heater/fan...etc). Would you please explain the fact?

It's explained at about 01:30 to 02:00…

 

How about number 2? Is it connected with an actuator (fan/heater/pump) or with the same temp sensor?

Apparently it's connected to some "Output" rather then your "temperature" input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 35
(3,219 Views)

Dear GerdW,

It's explained at about 01:30 to 02:00…

Yes. He applied PID logic through a DC (5V) fan. But I want to control AC(220V) actuator(Fan/Heater/Pump). My question is here. How can I control the output for AC current? 

0 Kudos
Message 5 of 35
(3,199 Views)

Hi Milon,

 

Yes. He applied PID logic through a DC (5V) fan. But I want to control AC(220V) actuator(Fan/Heater/Pump). My question is here. How can I control the output for AC current?

Use any device capable of controlling such voltage/current. That may be a simple relay, a SSR, or a full-blown VFD. Even a fully equipped remote-controllable AC power supply will work…

 

This is not a LabVIEW-related question. When you have problems deciding how to control 220Vac power supply you REALLY should take advice from hire an electrician!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 35
(3,192 Views)

Dear GerdW,

Greetings. In my research, I want to control the pH level of water. I want to apply the PID control method. In the control system, I have 1 pH sensor and 2 pumps. One pump for the light acid solution and another for distilled water. If the pH level goes very low, distilled water will be added to maintain the target pH level. It is like a heating-cooling system. 

 

As I am facing some instrumentation problem for PID controller, how about to apply only the proportional controller considering a hysteresis limit (like +/- 5% error consideration), where the output adjustment will be proportional to the difference between the present and desired parameter values over time. I have experience about actuators control using Arduino and relay switch (Arduino-LabVIEW interface) and I saw Single-Input, Multiple-Output (SIMO) PID example. I wish to combine these two. Is it possible? Actually, I want to use my 2 phase 220V AC pump, instead of the 3 phase variable flowrate pump. Pumps will be on and off based on the time like the present pH value is 10 and the set value is 5. I need to decrease the pH level. Suppose, it will take 5 sec to achieve the target level/value. But after 1 sec, the pH level came to 8 and the required time is 3 sec then. After 1 sec (total 2 sec), the ph level became 6 and required pump operating time 1 sec. The required time will be calculated based on the feedback process.

Hope, you have understood. I am sorry for my poor English efficiency.  

Download All
0 Kudos
Message 7 of 35
(3,168 Views)

Hi Milon,

 

I would use just one PID with a single output:

set the output range to -100 … +100 (percent)

with positive output values you drive one pump, with negative output values the other pump

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 35
(3,159 Views)

Dear GerdW,

Thanks for your instant reply. Actually, I have understood the condition theoretically but can't make the LabVIEW code. Would please edit my proportional controller code (only basic modification, then I will do myself)? 

 

Thanks in advance. 

0 Kudos
Message 9 of 35
(3,153 Views)

Hi Milon,

 

your pumps most probably only need positive control values:

check.png

So depending on sign of PID output one device gets a positive control value and the other gets just zero.

(When you just switch on/off the pumps now you could even use the ">=0" function to decide which pump to switch on…)

 

I would also implement a simple deadband range from -5…+5% PID output to limit the number of pump switch on/off operations.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 35
(3,147 Views)