01-23-2018 10:56 AM
Hey guys.
Im currently studying at technical univeristy of graz and on my way to my bac degrees.
For my thesis it is my job to develope a temperature controling software using a optris cs lt infrared sensor to measure the temperature and an mcs tc02 controler to heat up the liquid to later heat a patch clamp system. The higher accuracy it acchieves the better, but everything under 0,5 °C is tollerable. At the moment i worked with stupidly measuring the temp. and if its lower heat more, if its hotter heat less. This methode brings mit to about +- 0,3°C but is very unreliable. It walks between plus and minus and sometimes produces spikes of about 1 °C.
Now im thinking about how to make a good controlling software and did stumble apon pid-controllers. But as i'm a beginner in labview i have no idea how to implement one. Can you help me by looking at what i've got so far and maybe help me implement the controler or give me an idea how to do it differently?
Solved! Go to Solution.
01-23-2018 11:57 AM
01-23-2018 03:27 PM
Hi GerdW,
Thanks for your quick reply!
I'm using labview 2016.
In the before post i attached a vi snippet. In that i tried using the std labview pid it provides and read up all in labviews help menu but i cant get it to work.
01-23-2018 04:06 PM
According to its website, your MCS TC02 already is a PID (well, PI) controller. Is there some reason you can't use it to do the control?
01-24-2018 12:51 AM - edited 01-24-2018 12:53 AM
Hi octaris,
In the before post i attached a vi snippet. In that i tried using the std labview pid it provides and read up all in labviews help menu but i cant get it to work.
I was posting from mobile so couldn't look at your VIs…
Now that I see them it makes me shiver! 😄
- Use (more) wires instead of local variables! What's the point of creating all those RACE CONDITIONS?
- You didn't set any PID gains for your PID controller? Read up on "Ziegler-Nichols"!
- Why do you re-init the PID in each iteration???
- Don't use the EXIT function in this place all these places! Clean up before exiting your program! When you want to do things after the loop you need to place them after the loop: THINK DATAFLOW!
01-24-2018 06:00 AM
Hey GerdW!
I know it looked like a field of war.
So i tried to chang some things and here is a newer, hopefully better version.
At the moment i'm using the standard values of the pid in labview and my program gets the temperature to about +- 0.2°C with the while-clock set to 650 ms. but still it occasionally has spikes to about 0.8 degrees above the desired value.
any further tips?
yours gratefully,
Michael
01-24-2018 07:21 AM
Hi Michael,
here is a newer, hopefully better version.
Much better than before!
At the moment i'm using the standard values of the pid … the while-clock set to 650 ms. but still it occasionally has spikes
any further tips?
Sure:
- Ziegler-Nichols!
- decrease loop iteration time: depending on your system you may get better results with iteration times of 100ms. But: this strongly depends on your system setup: what's the heater power, what's the heater/fluid mass, what's the control loop behaviour?
01-24-2018 07:51 AM
As I understand your code, you're using the PID loop to adjust the setpoint of the TC02 controller, which is a roundabout way of controlling the heater power. How is the TC02 configured? Is it also trying to do its own PI control at the same time, which would mean that you have a cascade control system?
01-24-2018 09:33 AM
Yes thats how it works. The Tc02 is configured to heat a flow heater called pt01. It has a max 15w of heatingpower and can heat the distilled water used to a max 60 ºC.
The tc02 has a pi control for its channels. Meaning it controls the pt01 with a pi to set the desired temp. But thats the temperature of the water comming out of my flow heater and not the temperature of the patch clamp system that i want to heat to a specific value.
And thats the reason i need the "selfmade" controll, to alter the tc02s value in order to get the whole system where i want it.
I guess thats kind of a cascade system.
@GerdW
The heater has 15W power. With a dropspeed of about ~~1/sec.
We are using destilled water as heater fluid.
I tested the new version briefly and i thought it worked best at 650ms. At 50 it hat more spikes and alternated quicker around the desired value. But that may come from the fakt that also my tmperature reading is slowed down with the 650ms and so has less readings. ://
01-24-2018 09:40 AM
Hi Michael,
I tested the new version briefly and i thought it worked best at 650ms. At 50 it hat more spikes and alternated quicker around the desired value.
Changing the loop speed instead of the PID gains is NOT the usual way to tune a PID controller.
Again I suggest to read up on Ziegler-Nichols!