LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a PID controller in LabVIEW for controlling refrigerant subcooling/superheating temperature?

Thanks for your message.
No, I haven’t heard about Mr. Ziegler and Mr. Nichols. Could you please tell me more about their method for determining PID gains?

0 Kudos
Message 11 of 19
(220 Views)

Hi alhabeeb,

 


@alhabeeb wrote:

No, I haven’t heard about Mr. Ziegler and Mr. Nichols. Could you please tell me more about their method for determining PID gains?


So you don't have any lessons in control theory? But still want to implement a control algorithm?

Why dont you read a book about control theory? (Or atleast some Wikipedia articles?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 19
(210 Views)

Dear GredW,

Thank you for your reminder. I areviewed the Ziegler-Nichols method, but I had forgotten the name—my apologies. I was reviewing the method on the NI website https://www.ni.com/en/shop/labview/pid-theory-explained.html?srsltid=AfmBOoqjPlZgjUta3Q7j0VKTFjCHSV9... .

As you know, it suggests setting the I and D gains to zero and then increasing the P gain until the system oscillates consistently. This point gives the critical gain (Kc) and the oscillation period (Pc).

I have two concerns:

  1. I am worried that my system could become unstable and exceed the control limits, even though I have a hardware safety mechanism in place.

  2. Based on my system, what would be suitable Kc values to start with and nd what increment should I use for temperatures between 40 °C and 85 °C?
  3. How is Pc determined exactly? Do I need to measure the period directly from the oscillation graph, or is there another way to calculate it?

Thank you for your guidance.

 

 

0 Kudos
Message 13 of 19
(201 Views)

Hi alhabeeb,

 

there are also common rules to determine PID gains from a step response…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 19
(198 Views)

Dear GerdW,

I am trying to determine Kc and Ti from a step response. I am using an open-loop system, as shown in the attached VI, and have conducted two tests, which are detailed in the attached Excel file.

Based on my review of the method, I can calculate the process gain G and the time constant τ:

  • G = (T_final - T_initial) / (PI_out_final - PI_out_initial)

  • τ can be determined from the T vs. t graph.

Then, I should be able to calculate Kp and Ti using the formulas:

  • Kc = ((2ξωₙτ) - 1) / G

  • Ti = (G * Kc) / (ωₙ² * τ)

However, I do not have the values for ξ  or ωₙ .

Am I on the right track?

Download All
0 Kudos
Message 15 of 19
(169 Views)

Hi alhabeeb,

 

I often used step response to determine P gain and I/D gain values from Tu/Tg as explained in this (German) article

 

Most often I achieved quite good estimates with only little adjustments on the final PID gains.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 19
(163 Views)

Dear GredW,

After some tests I found good Kc=2.725 and Tu=475. 

One more question please. Since the heater (5.7 kW) cycles on and off, I would like to know how to calculate the energy it adds to the working fluid. Should I calculate the percentage of time it is in the "on" mode relative to the total time? Or there is another way?

Thanks

0 Kudos
Message 17 of 19
(109 Views)

Hi alhabeeb,

 


@alhabeeb wrote:

Since the heater (5.7 kW) cycles on and off, I would like to know how to calculate the energy it adds to the working fluid. Should I calculate the percentage of time it is in the "on" mode relative to the total time? Or there is another way?


Use a power meter to measure the UI product! (Aka use external hardware.)

 

Depending on your accuracy requirements you can also estimate the power by just using the percentage value and the nominal power of your heater…

 


@alhabeeb wrote:

Dear GredW,


Who is Gred?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 19
(90 Views)

Thanks GerdW and sorry for the mistake.

0 Kudos
Message 19 of 19
(79 Views)