LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID controller - temperature control using power supply

Hello friends,

 

Im trying to make a simulation program in which i can control temperature by controlling the power supply which powers the heater. The maximum heat power can only be 24 W. The program is the simulation version of the project Im working on.

 

So basically on the controller input of process variable i put measured temperature from the interval from 26 to 107 degrees celcius, and I can only send the same amount of the temperature on the input setpoint. The problem is when I have limit of the PID controller output (from 0 to 24 W), the measured temperature will never achieve the setpoint temperature - there will always be some error. In my opinion It looks like the PID controller incorrectly determines the setpoint every time, when the output is not the default value from -100 to 100%.

 

The controller works correctly only when his output is limited in the deafult values, or in the percentage scale from 0 to 100%. Is it possible to use vi PID controller as a controller, when you have to control diffrent units/values at its output than it is at the input? (Input - degree Celcius, output - Watts). Maybe there is some blocks or functions to fix that....

 

Thanks for any advice : )

0 Kudos
Message 1 of 6
(426 Views)

Hi Milos,

 


@MilosZZZ wrote:

Is it possible to use vi PID controller as a controller, when you have to control diffrent units/values at its output than it is at the input? (Input - degree Celcius, output - Watts).


Yes! I always use PID controllers with different input/output units!

You just need to adapt the PID gains to account for the unit conversion...

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 2 of 6
(395 Views)

Thank you for your answer.

 

So you are recommending adjusting the appropriate gains of PID controller? I tried this and it doesn't really work... It's like the output of the plant is stuck on some constant value. Even when i send the Kp value of 1000, the output will not have any oscillations (as it is in the Ziegler-Nichols II method). Maybe i should use the "Convert unit" block or something?

 

 

0 Kudos
Message 3 of 6
(392 Views)

Hi Milos,

 


@MilosZZZ wrote:

So you are recommending adjusting the appropriate gains of PID controller? I tried this and it doesn't really work...


Yes, I recommend to use proper PID gains!

For me it works (even without any PID gain tuning):

What's the point of that event structure in your VI?

Why did you set a timeout of "0"? Why was there a wait function inside that timeout event case???

(See the image for possible improvements…)

 

Hint: Try PID gains of 0.700 / 0.015 / 0.00…

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 4 of 6
(348 Views)

Hi again,

 

Event structure was for other functions that were in this simulation, but i deleted them and forgot to delete case structure too...

 

You are right - this simulation works properly, but only when you won't set the output limit of the PID controller 🙂 In the case of your revised version, PID controller is outputting the power from -100 to 100 Watts (correct me if im wrong), which isn't what i wanted. I want to control the power from 0 to 24 W, and in this case PID isn't really working. I'm pretty sure that i need to set limits properly, but i dont know really how 😞

pid simulation.png

0 Kudos
Message 5 of 6
(315 Views)

Hi Milos,

 


@MilosZZZ wrote:

🙂I'm pretty sure that i need to set limits properly, but i dont know really how 


The PID function already provides an input to set the output limits...

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 6 of 6
(310 Views)