From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-10-2010 02:02 PM
I just recently got the PID toolkit, and have a heater that I want to control with it... the heater heats up a liquid going through some plumbing system. But it's real slow... I've been controling it manually and it takes a few monutes to reach a certain temperature, and then once it does I usually manually try to balance it there by setting my heater to off then around 50%... and basically just feeling it out until it stabilizes, but it's a sloooow process.... are PIDs a good solution for me?
thanks!
03-10-2010 02:15 PM
They could be...
If implemented correctly a PID control loop will certainly do what you require.
Of course you will need suitable output and sensing hardware.
Slow response loops are easier to control than fast ones, & often less demanding on hardware.
b.
03-10-2010 02:20 PM
03-10-2010 02:22 PM
03-10-2010 02:31 PM
03-10-2010 03:44 PM
Thanks for the link, I'm having a hard time getting this to work at all, I have a few basic questions about what the SP paramter and limits should be.
I have a heater, I control it with 4-20mA, I'm reading a temperature sensor, it gives me 0-50C readings...
can I feed my .004-.02 command directly into the Setpoint input of the PID VI? I've been trying this and it's not working. or do I have to change it to match my temperatures? Cause my PV comes back in degrees... but if I match it to my temps do I just do a linear equation that proprtionaly matches up 4-20mA to 0-50C? Even though the real relationship is non-linear?
I've been trying to feed 4-20mA into setpoint of PID, and I changed the range on the PID VI to .004-.02, but I'm getting no where like this.
much thanks!
03-10-2010 04:18 PM - edited 03-10-2010 04:19 PM
You need to feed your setpoint in degrees into the PID block. Otherwise, why would the PID algorithm be useful? The PID algorithm tries to match the process variable to the setpoint, so if they are in different units you'll have all sorts of problems. You want to set the output limit of the PID to .004-0.02 mA. There's no need for you to do any math to match up the ranges, the PID algorithm does that for you once tuned. In fact, you can think of the Proportional Gain as the slope of a line giving the relationship between process variable and output power.
If you're asking about the tuning process, then you want to remove or bypass the PID block entirely - that's what makes it open-loop. Once you determine the tuning parameters you re-enable the PID block.
EDIT: by the way, it may be easier to help you if you post your code or a screenshot of it (preferably as a PNG)
03-11-2010 08:21 AM
03-12-2010 09:49 AM
Ok, I've been checking out the manual http://www.ni.com/pdf/manuals/322192a.pdf and trying to follow the closed-loop tuning procedure on page 3-4, but I can't make sense of what I need to use as my PID Gains...
I followed the steps and got my system in steady oscillations at about Kc = -0.5
I timed my period of oscillation at about tu = 20s
but according to table 3-1... it says PB(percent) = 1.67PBu .... huh? is this what I need to enter as my Kc? my Kc is -0.5... then is says PBu = 100/Kc... so my PBu is -200... so is my proportional constant 1.67*(-200)?
and then it says for Reset (minutes), 0.55TTu... I know what Tu is, what's T?
Rate (minutes) this is the only one that is clear to me 0.125Tu.... I got that (0.125)*(0.333)
thanks!
confused.
03-12-2010 11:13 AM
I still think the open-loop tuning process is easier for a slow heater, but your closed-loop gains should work.
The "TTu" is a typo - it should just say Tu.
I'm not sure why that manual insists on using Proportional Band; the traditional approach says that the Proportional Gain is Kc / 0.6. This is equivalent to the proportional band approach since 1 / 0.6 = 1.67, thus P gain = 1.67 * (100 / PBu) = 1.67 * 100 / (100 / -0.5) = 1.67 * -0.5 = 0.83. This is the same result you get from -0.5 / 0.6 = 0.83.
This all starts to make more sense after you spend some time building and tuning PID loops. It also helps if you take time to learn the physical significance behind the values. For example, the Integral time is often referred to as the Reset time, because it's the time it takes for the Integral action to duplicate the Proportional action. Internally, the integral gain is actually the Proportional gain divided by the Integral time, so for a constant error, after a number of minutes have passed equal to the integral time, the Integral action exactly matches the Proportional action.