DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Tuning PID for temperature control

Hi,

I am trying to use a PID controller to control the rate of temperature change. I'm using a OMB-DAQ-2416-4AO and thermocouplers to collect the temperature. I have a machine that flows hot oil through the system. In order to cool the system, the hot oil flows through a heat exchanger and reintroduced into the reservoir. The rate of cooling is controlled by controlling the flow rate of cooled oil into the reservoir. This is done using a proportional valve. I want to cool the system at a rate of 2*C/min. I have dasylab calculating the rate of temperature change by deriving the system temperature, this is my actual value. I have a global variable calling out -2 as my set point. I then scale my PID output into a voltage to actuate the proportional valve. I'm having a little bit of trouble tuning the valve as changing the PID values isn't yielding the results I expect. Can someone point me in the right dierction? Maybe my method is not the best way to do it.

 

Graph.JPG

Here is a graph of the temperature change from 100*C to 49*C. It's cooling a bit faster than the prescribed rate, with a large overshoot, and long settle time. I have P as 0.0270 and D as 1.55. I've never tuned a PID controller before so I have no idea what these values should look like.

0 Kudos
Message 1 of 12
(7,624 Views)

First, try it without adding the value of the process variable to the output of the PID. 

That never made sense to me.

 

I'll look over the logic and your settings. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 12
(7,612 Views)

I will give that a try CJ! I've added the value of the process variable because I saw a note on the PID controller saying to do so.

0 Kudos
Message 3 of 12
(7,607 Views)

Cj,

I've run the machine again without adding the setpoint to the computed values. It seemed to yield better results and I was able to reach a steady state, but my results are not conclusive as I do not have enough data yet.

I seem to have an issue with the DAQ's analog output ceasing to respond seemingly at random times. I have found that DasyLab also crashes frequently. Do you believe this would be a hardware or software issue? And any recommendations to increase stability?

0 Kudos
Message 4 of 12
(7,595 Views)

In order of preference:

 

A) Update to DASYLab 2016 (price depends on the level (Lite, Basic, Full, Pro)

 

B) Update DASYLab 13 to the 13.4 driver -- see ftp://ftp.omega.com/public/DASGroup/products/DasyLab/DasyLab_v13.3/

 

C) Check the firmware on the device, and update if needed. Current release is 2.03. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 12
(7,590 Views)

CJ, here is my latest run without the arithmetic block, it does not look like there is a discernible difference. Adjusting the parameters doesn't seem to yield the results that I expect. I have no experience in this field, are the magnitudes of my constants too small? I used P: 0.1, I: 0.025, and 😧 0

Graph 2.JPG

0 Kudos
Message 6 of 12
(7,561 Views)

I would actually try making the P a bit smaller to slow down its response.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 7 of 12
(7,558 Views)

Cj,

I've been able to tune the PID to achieve the results I desire. I'm trying to automate my machine's ability to turn the heaters on/off and actuate the proportional valve. Right now I'm using TTL modules to control the heating and cooling cycles, but the duration are based off of calculating the cooling/heating rates. I would like to combine TTL with some sort of trigger. For example if the temperature is 49*C turn on the heaters until 105*C. Then hold at 105*C. What is the best way to go about this?

0 Kudos
Message 8 of 12
(7,326 Views)

You can set up a Trigger module to evaluate the temperature.... the  Pre-Post Trigger will work to evaluate if your temperature is in or out of range.

You may want to change the number of post triggered values to be 1, not the default 512.

If the conditions are met, the output of the module is 5V, suitable to feed to the Digital Output to control the heater. 

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 9 of 12
(7,323 Views)

That is quite a suitable solution for turning the heat on/off. I would also like to hold the temperatures for certain periods of time. Is there a way to trigger TTL modules based on certain conditions, rather than time? Essentially I want to follow this heating profile. 

 

Temperature.PNG

0 Kudos
Message 10 of 12
(7,318 Views)