BASIC PID Control: Can someone give me the low down

KingKyle

Member
Join Date
Oct 2016
Location
Dayton, OH
Posts
2
In the HVAC field I have seen many controls technicians and integrators struggle for hours on end trying to get various PID loops tuned in for airflow, water flow or temperature control and I have always thought there has got to be a better and much more strategic approach to get to the end result not only quicker but more accurately. Would anyone be willing to share some info, links, or techniques with me to help me better understand the different scenarios I might come across in this type of field and the best way.practice to correct them in a timely and accurate manner. TIA and yes Im slightly a "programming newb" but do understand the ins and out of digital and analog controls and installation of them. I am also a Tridium Niagara AX certified Tech...so I am not completely green, but bear with me please and thanks.
 
I agree with widelto. Given where you seem to be at in your PID pursuits, this site will give you a good mix of practical and theoretical knowledge. The procedures talked about on the site are largely model based. You won't find comments like "If it is bouncing around too much, do this". It is much more structured than that, which seems to play into the direction you want to go with this.

Keith
 
I sympathize with Kyle. If an industry has sprung up on tuning PID loops, then there may be something wrong with the concept. There are, every year, books, trade press articles, software, and new "self tuning" algorithms coming out. To me that means that tuning is too difficult, and maybe the control technique needs to be revisited.

There are applications where PID works fine, and I've successfully tuned PID loops. However, I know that when process conditions change dramatically the loop will require new tuning.

My personal favorite alternate control method is floating control. I have used it on many different loops over the years, and find it to be robust, easy to tune, and intuitive for operators. I've attached a brief description.
 
Originally posted by Tom Jenkins:

I sympathize with Kyle.

I don't sympathize with Kyle. Applaud, yes. Sympathize, no. He sees an area of control engineering that seems to pose an issue for some and is proactively learning what he can about it before HE is the one having the issue. That's just being prepared. If he gets to a point where he can no longer understand what is being proposed or explained and he can't get past that, then I will have some sympathy. Up until that point he is simply getting ready. "Success occurs when opportunity meets preparation".


Originally posted by Tom Jenkins:

My personal favorite alternate control method is floating control.

Based on what I read from the PDF this control method only works if the rate of change of the actuator is equal to or less than the rate of change of the process unless you use the proportional rate variant. I suppose you could also pulse the actuator to decrease its rate of change relative to the process. I would also think this might be a tough beast to control with an integrating process (like tank filling) since the control output ends up going through what is effectively an integrator before heading out to what is itself an integral process. I could see where it would work pretty well for flow applications, though.

Keith
 
Based on what I read from the PDF this control method only works if the rate of change of the actuator is equal to or less than the rate of change of the process unless you use the proportional rate variant. I suppose you could also pulse the actuator to decrease its rate of change relative to the process. I would also think this might be a tough beast to control with an integrating process (like tank filling) since the control output ends up going through what is effectively an integrator before heading out to what is itself an integral process. I could see where it would work pretty well for flow applications, though.

Keith

I've never used it on a tank filling application, so I can't comment on that. I assume you are not referring to level control. One of the modifications I use to the floating control is a response time delay between successive calculations of error. That takes care of rate of change issues, and adjusting response time is one of the tuning parameters that is easy for an operator to grasp.
 
Not that I am worthy of holding the notebook for most of these guys.... but Peter, Ron, Keith, Tom and widelto (2 cents) all if you read their post know what they are talking about, I myself like the old fashion way WAG turn off I and D get P working (somewhat) then roll in your others, I have tuned in about 500 controllers and none are the same and neither are the variables

If you are using a 4/20 signal to a proportional valve then odds are the valve is going to stroke different then input variable is also going to be different, you are in the HVAC field... this is one of the worst fields for standards and most are different PID on hydraulics are not the same as temperature and there is not a general rule of thumb

The best you can do is read and understand what things you have control over, the others that you have no control over you can WAG or hope they work the way you want

The hardest system I worked on was controlling air temp by a thermal oil system, the air had a set point of 380 deg f (+/- 2 deg), the oil ran threw a oil to air heat exchanger and the supply oil temp would range from 380 to 500 deg f and would run at a steady 450 for about 30 min then spike down to 380 then up to 500, the oil was heated by a air to air heat recovery that was burring VOC's at 1400 deg, the air would run threw a air to oil (boiler)... so it was a catch 22 when the machine would start the thermal oxidizer would heat from the VOC's but you were trying to capture the heat and run it back thru the process, I did have a guy come up and ask me if I tried the "fuzzy logic in the controller" when I was about 12 hrs in... glad I did not have my gun :eek:

Anyway... you asked a million dollar question but its not answered that easy

Search Ron and Peter on this site they both have gave great answers on how it works
 
Search Ron and Peter on this site they both have gave great answers on how it works

Welcome to the forum, KingKyle. You'll notice that searching the forum for PID provides myriad hits. Here are some of the goodies from Ron Beaufort to which I believe G.I.T. was referring, to get you started. There are others out there as well.

PID, What is it?

What is P

What is I

What is D
 
USE THE FORCE ...LUKE.

P How much
I How fast
D How far

My kung fu is strong when it come to lag and drift.

Trying to tune a pasteurizing system where the heating transfer plates are in one room with the valve, the thermostat and heated water tank in another room. What I did here and now didn't take effect for ten seconds in the other room. Open the valve too far too long, and whamo, tanks too hot. Not enough, same same, tanks too cold. Scroll graph is all over the place, quality control manager is having kittens.

It took a while to imagine what a Proportional Integral Derivative looked like. You can do the math, but the elements of the environment couldn't be factored in. They had to be imagined and understood as an unseen equation. Then tune the system to account for the uninsulated transfer pipe. The valve that moves slower when another element in the plant sucked down the air.

Then you realized you have developed a migraine headache from He** as you look down and notice it. The button marked AUTO TUNE
 
I appreciate the feedback thus far and welcome any info that you guys can provide. I will look into the two links provided as well when I have a little reading time one evening. Thanks again guys for any input given, it is appreciated
 
Basic PID; Can someone give me the lowdown? NO

What you seek is an “easy out”. Many people generalize that a single PID loop should fix all their current controls problems.

There is talk of “auto-tuning” PID controllers, and purchased “one-size-fits-all” auto-tuning software. There is talk of analogies of the “cruise-control” in your automobile as a prime example of a simple PID.

I call “Bull-****!” One size fits all. (poorly). Each system(s) have fixed mechanical dynamics, and more importantly, each process has different speed and accuracy requirements.

There are dozens of variables that can deem a loop simple, or not. If a loops Pv is highly responsive, then a simple PI loop with little effort can net great results.

BUT, when there are large lag times between CV output and PV response, then, each loop needs to be tuned to customer requirement.
Is the loop bi-polar where it increases with one set of gains, and decreases with an alternate set of gains?

Does the process require FAST response, and tolerant to overshoot, or does the process require NO overshoot, but time is important? You cannot have your cake and eat it too. There are some physical mechanics that you cannot solve with one simple PID loop. Sometimes, the customer asks to get to a physical destination, in a time frame that is NOT achievable, PERIOD.

Recently, we launched some equipment that had some thermal requirements to satisfy the exacting process to achieve expert control to make REPEATABLE process at temperature. We collected data during launch to understand the mechanics of the system and deemed a single PID with large setpoint changes from Ambient to Idle, to Process, was NON-LINEAR.

The take-away observation was, that it was not prudent to try one PID, with one set of terms, to satisfy the entire spectrum of the physical make-up of the system.
Based on our observations, we noted a stable ramp of PV regardless of how hard the CV was kicked.

Our solution was not to do a single large step change to the Setpoint and let a single PID attempt the task, but to merely ramp the setpoint based on the typical dynamic physics of the system. When we did this it was observed that the PV climbed the ramp with a predictable lag. During the ramp, we used a soft integral gain. Once the ramped setpoint flat-lined at the desired setting, we dynamically increased the integral gain, and the PV walked right up to target, without overshoot.

Executive Summary: We abandoned the pipe dream of Old-School, Single PID to solve our customer requirement. We instead, used empirical data from our real system, and created a programmatical, dynamic, change on the fly PID, solution to achieve highly repeatable performance results.
 
There is talk of “auto-tuning” PID controllers, and purchased “one-size-fits-all” auto-tuning software. There is talk of analogies of the “cruise-control” in your automobile as a prime example of a simple PID.
I can write a one-size-fits-all auto tuning system. I don't see why others can't do it.

I call “Bull-****!” One size fits all. (poorly). Each system(s) have fixed mechanical dynamics, and more importantly, each process has different speed and accuracy requirements.
It depends on your definitions. While I agree that each systems has a different open loop transfer system so that each system must be tuned differently, that doesn't mean that a serious auto tune system can't try out many types of models and chose between them.

There are dozens of variables that can deem a loop simple, or not. If a loops Pv is highly responsive, then a simple PI loop with little effort can net great results.
You seem to be unaware of how auto tuning systems work. The first step is system identification where the gain, poles and zeroes are determined. Where things get tricky is that non of there parameters may be constant or fixed. In these cases the auto tuning will not work well without using some tricks.

BUT, when there are large lag times between CV output and PV response, then, each loop needs to be tuned to customer requirement.
Lag time or dead time? Both can be compensated for.

Is the loop bi-polar where it increases with one set of gains, and decreases with an alternate set of gains?
This is easily determined.

Does the process require FAST response, and tolerant to overshoot, or does the process require NO overshoot, but time is important? You cannot have your cake and eat it too.
Yes you can within the limits of physics.

There are some physical mechanics that you cannot solve with one simple PID loop. Sometimes, the customer asks to get to a physical destination, in a time frame that is NOT achievable, PERIOD.
That is a design problem, not a tuning problem. If the control output saturates there is nothing more the controller can do. Auto tuning will not work well if the output saturates.

Recently, we launched some equipment that had some thermal requirements to satisfy the exacting process to achieve expert control to make REPEATABLE process at temperature. We collected data during launch to understand the mechanics of the system and deemed a single PID with large setpoint changes from Ambient to Idle, to Process, was NON-LINEAR.
Why? Thermal systems are usually linear unless the mass that is being heated up is changing all the time.

The take-away observation was, that it was not prudent to try one PID, with one set of terms, to satisfy the entire spectrum of the physical make-up of the system.
Why not? You can always change the gains on-the-fly.
Based on our observations, we noted a stable ramp of PV regardless of how hard the CV was kicked.
So where does the energy go if not to heat the mass?

Our solution was not to do a single large step change to the Setpoint and let a single PID attempt the task, but to merely ramp the setpoint based on the typical dynamic physics of the system. When we did this it was observed that the PV climbed the ramp with a predictable lag.
Perhaps a feed forward or bias would reduce the lag unless the lag is really dead time.

During the ramp, we used a soft integral gain. Once the ramped setpoint flat-lined at the desired setting, we dynamically increased the integral gain, and the PV walked right up to target, without overshoot.
We have people do the same thing in motion control. They do it because they can't tune the system properly. In your case the integrator winds up because of the lag you mentioned.

Executive Summary: We abandoned the pipe dream of Old-School, Single PID to solve our customer requirement. We instead, used empirical data from our real system, and created a programmatical, dynamic, change on the fly PID, solution to achieve highly repeatable performance results.
There are too many problem you sited but you don't explain why. Where does the energy go? A heating system will be stable if the energy added is equal to the heat escaping. Any net difference will cause the system to heat up or cool down as a function of the heat capacity of the load and the temperature difference. It should be that hard unless there is a dead time. In this case a Smith Predictor should be used.
 
In 99% of applications I have used PID loops (over 35 years I have been doing this) I simply do the following:
1. Zero I&D.
2. Increase P until the PV goes evenly above and below SP.
3. Cut the P in half.
4. Then take the time from peak to peak and put it in I.
5. Take 1/8 of I and put it in D.
Almost every time it will flat line the PV.

PS. This method was from an old help file in ICOM software.
 

Similar Topics

A simple PID simulator for my first steps with Python, might come in handy for some demos https://github.com/Destination2Unknown/PythonPID_Simulator
Replies
22
Views
10,913
I'm kicking around revisiting an idea I had a few years back. I have very little programming experience, just from school a few years ago. I had...
Replies
6
Views
1,916
Greetings from Michigan, I want to use a PID instruction to control simple oil flow in one of our machines, that obviously uses an oil pump and...
Replies
1
Views
1,653
Hey guys I was just making a basic program for some game thing I was tryin out. I havent writ a plc program in probally a year so Im a little...
Replies
8
Views
6,920
I am relatively new to ladder programming and was wondering if anyone had example code (I am using RSLogix5) of flow control using a PID function...
Replies
8
Views
9,887
Back
Top Bottom