Sunteți pe pagina 1din 20

In Exclusive Control, the Speed Reference becomes 0, and the PID Output becomes

the entire Freq Command.


Exclusive Control is used when A152 [PID Ref Sel] is set to option 1, 2, 3 or 4.
This configuration does not require a master reference, only a desired set point, such
as a flow rate for a pump.
EXAMPLE
In a pumping application,
 The PID Reference equals the Desired System Pressure set point.
The Pressure Transducer signal provides PID Feedback to the drive.
 Fluctuations in actual system pressure,
 Due to changes in flow, result in a PID Error value.
The drive output frequency,
 increases or decreases to vary motor-shaft speed,
 To correct for the PID Error value.
The Desired System Pressure set point is maintained as valves in the system are
opened and closed causing changes in flow.
When the PID Control Loop is disabled,
 The Commanded Speed is the Ramped Speed Reference.
FIRST, STOP AND TAKE A DEEP BREATHE.

Got it?
OK.
1
Loop controls are not trivial in general and especially in the situation you are probably going to encounter.
Let's take this one step at a time.
All closed loop controls work roughly the same way.
 You have a SP (set point),
 CV (control variable, aka output),
 and a PV (process variable, aka input).
The goal of the control loop is to adjust the CV so that the SP equals the PV.
Before we go any further then, we have just ONE input controlling ONE output to try to match ONE setpoint.
You have 12 or 16 inputs (it wasn't clear) controlling 4 outputs.
You have to decide right away how to combine those inputs.
For instance, if any of the thermocouples are clearly out of range (way too high or too low) indicating a broken or shorted
thermocouple, then you will probably want to ignore them.
For the remainder, most commonly you will be either taking the lowest, highest, or average value, or perhaps a median or
some other tricky formula of your own design such as a weighted average.
Whatever you do, it needs to come up with a SINGLE input value for each output.
2
There are several different methods to achieve the control aspect of things.
To begin with, there is "open" vs. "closed", also known as "feed forward" and "feed
back“ loops.
In an open or feed forward loop, you simply perform some math on the SP and feed
the result to the CV.
The PV is ignored.
These types of "loops" have much faster response speeds than closed loop
controllers because closed loop controllers only adjust things based on the errors
(after the fact).
Often the output of both types is summed together before being sent to the actual
output to control the device.
3
The closed loop controller looks at the difference between the PV and the SP (the error signal) and adjusts the CV (output) to
try to make the PV and SP match.
• It does not take changes to the set point into consideration in general, only the error signal.
• Thus the reason that the open loop controller deals with changes in set points so much better.
There are several types of controllers such as IMC (internal model control), SMC (sliding mode control), and the one you
mentioned, PID (proportional, integral, derivative control, plus variations which turn various P/I/D terms off).
• Each has certain distinct advantages in certain applications.
For instance, PID loops work best with low process lags (if you change the CV, the PV responds very quickly), linear
responses and consistent process gains (the same size change in CV results in the same change in the PV every time), and
non-integrating loops (the error value does not go into exponential runaway).
• IMC controllers are much more tolerant of long process lags and process gain issues but intolerant of process linearity
issues and integrating loops.
• Sliding mode controllers are very tolerant of pretty much all of the above except for integrating loops and can be a bit
on the slow side to converge.
The reason I'm mentioning these alternatives is because in general sliding mode controllers tend to work very good as
process heating controllers where PID loops don't tend to work so well.
4
Now more importantly, it is important that any of these controllers are operated either by
taking timing into consideration or else run with consistent timing.
What do I mean by that?
• All of the closed loop controllers have gain settings that are in terms of time.
• They are programmed as if "time" is consistent...that is, the controller gets run say once
every 100 ms or once every second.
• If you put the controller code in your continuous task and don't go through some sort of
gyration to fix the timing issue, your controller will not run consistently.
• So the general rule is to always put the code into a periodic task.
• Start by setting up a periodic task specifically for your control loops no matter which
PLC you are using.
There are alternatives but this is the simplest way that gives you consistent results.
5
Ok, so far you should have code that is transforming your thermocouple inputs into a single PV.

Now create the PID instruction itself, one for each output.

• First fill in the variable where you calculated your PV.


• Ignore tieback (used for interfacing to external discrete PID loop controllers such as
Honeywell UDC's).

• Fill in the CV as the output variable for your analog output.

• Ignore the master loop and in-hold stuff.

• Enter 0's for any of the parameters that you won't be using.
6
You need to enter the set point into the loop_structure.SP member to be able to
adjust your set points.

Also make sure to turn on


 .PVT (process variable tracking),
 .DOE (derivative of error),
 and clear .PE (use independent gain equation)
 and .NDF (turn on derivative smoothing).

If you don't know what these mean, use my suggestions.

You can always experiment later.


7
Now manual/auto control is another area that is a bit strange.
• There are multiple manual modes.
• The one I recommend is "software manual".
The other manual modes are again for interfacing to some sort of external controller.
• To set the loop into manual mode, set the .SWM bit.
• To put it in automatic, clear this bit.
• Don't touch the .MO bit! I know what it says...trust me, just don't touch it.
When you are in software manual mode, use the ".SO" value to set the output.
• In software manual mode, the PID controller will copy the value of .SO into the .CV (control value).
• While in this mode, the PID loop internal values "track" the .SO value and don't go into "windup" (runaway).
While in automatic mode, the .SO value is changed by the PID controller to reflect the actual current .CV.
When you go back to software manual mode, then it again releases control.
This provides for smooth transitions between auto and manual mode (so-called "bumpless" transfers).
8
Your 3 gains (P, I, D) are in the .KP, .KI, and .KD variables.
Now setting these things can be done extremely scientifically but almost everyone does a seat-of-the-pants method which I'll explain,
mostly because Zigler-Nichols has never been tremendously successful for me.
a) Now you need to make yourself a trend chart.
b) On this chart you want to see the 3 key variables (CV, SP, and PV).
c) Once you got your trend chart running, also make sure you have the loop controls in front of you so that you can control everything
in another window.
d) Now turn everything on and put the loop in manual (.SWM) control with the .SO (output) value set to something very low.
e) You may have to go back and tune it again later so I recommend that you actually build a loop tuning screen in your operator
interface specifically for doing this.
f) Now make at least 2 or 3 step changes to the .SO value and watch what happens.
g) Wait until the .PV settles out and calculate the actual gain.
h) In other words, if you adjust the .SO value by x%, what percentage does the .PV increase by?
i) This ratio is your process gain and the value of .KP should be exactly equal to that.
So you just determined your first gain.
9
For the others, it's a bit trickier.
a) Set the set point (.SP) close to where the .PV (process variable) is actually at.
b) Initially set .KI equal to 10% of the .KP value.
c) Now put the loop in manual.
d) You should see the loop "pull in" (adjust the .CV value until SP=PV).
e) Now change the SP and observe how it responds again.
f) Carefully adjust KI by a factor of 10 and try to get it to pull in faster.
g) If it starts oscillating, then back off.
h) Then once you got it close, switch from multiplying/dividing by 10 to a factor of 2.
i) Continue tuning until whenever you change the SP, you get a "25% overshoot"
followed by the loop pretty much levelling out after that.
We'll fix the overshoot in a minute.
10
Finally, start with .KD at 10% of the value of KI.
a) Slowly increase it and notice how what KD tends to do is to provide a very quick
correction to the .CV that helps the loop "pull in" even faster and helps narrow
some of the overshoots.
b) KD will help you whenever there is a disturbance in the system.
c) It helps correct process disturbances whereas KI is all about pulling in the loop
and PV is all about setting the initial gain (guess).
11
Now start running product through there.
This isn't a one-time affair.
It will take some additional adjustments (usually doubling or halving gains, followed
by making much smaller moves after that) because an "idle" heating system has a
different system gain from a real one.
12
If you want to try "auto tuners", my recommendation is to use them with caution.

Sometimes they work well and sometimes not.

Interestingly enough, the above tuning method even though it is "seat of the pants“,
calculated EXACTLY THE SAME GAINS as the software product from ControlSoft.

Or if you have RS-Logix 5000 Professional, there is a loop tuner available in there.

Or, instead of the PID instruction, switch to the PIDE instruction.

You will have to put it in a function block diagram but it also has an autotuner built
right into the PLC firmware.

I've never used this instruction yet though so I can't really tell you much else about it.
13
If you are having trouble getting the loops to stabilize, realize that you are probably fighting
one of two things.

• Process heating applications usually are notorious for long lags (the time it takes for the
PV to respond after you change the CV is very long), and they are notorious for
integrating loops (errors in the loop tend to exponentially increase/decrease rather than
remaining at a fixed value).
• If this is the case you may find that you will have to set the KP low, the KI even lower,
and have a fairly high KD value.

• KD tends to help keep things stable while KI slowly corrects the errors.

Your gains will be very low since both lag and integrating properties are fighting against
making very fast changes.
14
Or you can instead use a sliding mode controller.

These are often much better at controlling process heating applications than PID.

And there's really only one parameter to tune.

Search for "SMC" or "sliding mode controller" on this forum for references on how to
do it.

S-ar putea să vă placă și