02-09-2018 07:59 AM - edited 02-09-2018 08:03 AM
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.
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.
02-09-2018 08:53 AM
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.
02-09-2018 08:58 AM
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.
02-09-2018 12:44 PM
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?
02-09-2018 01:40 PM
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.
02-12-2018 03:30 PM
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
02-12-2018 03:46 PM
I would actually try making the P a bit smaller to slow down its response.
03-28-2018 10:38 AM
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?
03-28-2018 10:54 AM
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.
03-28-2018 12:09 PM - edited 03-28-2018 12:12 PM
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.