Sie sind auf Seite 1von 9

Template for publishing FAQs in the Internet April 2005

------------------------------------------------------------------------------------
Please send your FAQ (.DOC file) to

A&D AS CS3/KM
Nürnberg-Moorenbrunn

Via e-mail: online-support.automation@siemens.com


Tel. +49 (0) 911 895 2651

------------------------------------------------------------------------------------

Topic: Automation Systems \ SIMATIC Industrial Automation Systems \ Industrial Software

Subject/Title: Determining control parameters to a PID

Validity for Product/Version:

Date: 30/01/2007

Author (name, department and telephone number):


Denilson Pegaia
Carlos Silva Campos

Motivation/Benefit:

“How to find the appropriate control parameters to a PID” is a theme that exceeds a product support
or the know-how about equipments. Many theoretical papers are produced about it in the universities
and / or stay on internet.

The most important factor is to know the details of the process (security limitations, behaves, etc.).
That is also exceeds the product support or the know-how about equipments.

However, many customers (beginners in the automation world), has no theorycal basis to work with it
(principally in the third world), and ask us frequently about tips to find the appropriate control
parameters to a PID. That’s occurs not only with S7-300/400 but principally with Micro System. Don’t
give they any help, can be misinterpreted as unfriendly or that us equipments are to complex to use.

Think in this cases we mount the follow FAQ. It may applicable in any technique.

We don’t like to start from zero, or assumes the responsibility of a new “paper”, so we based it in the
IP262 Manual (link http://support.automation.siemens.com/WW/view/en/7879878 , chapter 5.3.10 / 5.3.11;
i.e. just collect and organized information that is already stay us site.

FAQ Text

How to find the appropriate control parameters to a PID controller?

PID controllers are controllers that act on the process through a manipulate value so that a process
feed back value (process value) follow as near as possible a desired value (setpoint):
Template for publishing FAQs in the Internet April 2005

Setpoint

PLC

PID

Manipulate
Process
Value
Value

Process

The PID term comes from the fact that the action of the controller is based in a Proportional, Integral
and Differential evaluation of the error (difference between Setpoint and Process Value).

A PID can be used to control the majority of the process variables, but the successful operation of a
PID is strongly related with appropriate values for its proportional, integral and differential
compensation factors.

Nowadays, many theoretical papers are produced, and stay in internet, about PID optimization.
Follow; there are two tomb rules for PID optimization. These methods are based it in the IP262
Manual (link http://support.automation.siemens.com/WW/view/en/7879878), chapter 5.3.10 / 5.3.11, and
can be used also with news technologies like S7-200 / S7-300 / S7-400.

Alert! The use of these methods involves actions directly on the process. During the
optimization process, the system can be instable and unexpected reactions / oscillations
responses can occur. That can cause damages, injury and / or death. It’s indispensable that
the responsible for the PID optimization know these possibilities, know if the process can
accept it and take all security measure before and during the activity .
If the open conditions can not be take followed, others optimization methods must be used.

Warning
Operating the PLC as part of a plant or system requires that certain rules and
standards be followed, depending on the application.
Failure to observe these standards may cause serious bodily injury, and may
damage machines and facilities.
Observe the applicable safety and accident prevention standards, such as
IEC 204 (Emergency OFF devices)

Terms and formulas

In a simplify way, a PID follows the formulas:


Template for publishing FAQs in the Internet April 2005

Err = SP -PV
1 d Err
OUT = Gain * ( Err + * ∫Err dt + Td * )
Ti dt

The practical implementation of a PID can derive the original formula in some details. The name of
the formula variables can also vary form one implementation to other.

Before an implementation, it is indispensable to know the particularities of the evolved technology.


The information about that can be found on the respective documentation of the equipment.

As example follow there is a correlation between the open terms with the implementation in a S7-200
/ S7-300 / S7-400:

Parameter Formula S7-200 (Instruction S7-300 / S7-400


Wizard) (FB41)
Setpoint SP PID0_SP SP_INT
Process Value PV PID0_PV PV; PV_IN; PV_PER
Manipulated Value OUT PID0_Output LMN

Proportional Gain Gain PID0_Gain GAIN


Integral Time Ti PID0_I_Time TI
Derivative Time Td PID0_D_Time TD

As example, the documentation about implementations in a S7-200 / S7-300 / S7-400 can be found in
the links:

S7-200 S7-200 System Manual http://support.automation.siemens.com/


(Instruction WW/view/en/1109582
Wizard)
S7-300 / S7-400 Where can you find descriptions and http://support.automation.siemens.com/
(FB41) WW/view/en/16532187
examples of PID control with FB 41,
FB 42 and FB 43, and SFB 41, SFB
42 and SFB 43?

Tomb rules for PID optimization

Follow there are two tomb rules for a PID optimization:

Case A: Setting the Control Parameters on the Basis of the Transfer Function

If you know the transfer function of the process to be controlled or you have the possibility to
determine it, you can select the control parameters according to the guidelines given in specialized
textbooks. To determine the transfer function, set the controller to the “manual mode”, apply a set
point step change and record the response in a graphic. You will probably obtain a curve as show in
the follow figure:
Template for publishing FAQs in the Internet April 2005

LMN x = manipulated value


y = process value
t = time
Tu = time delay
y Tg = compensation time
t Ks = Transfer coefficient
of the process
PV
Ks = x / y
Tu Tg

In taking the average values of the parameters suggested by several authors of specialized literature
on closed-loop control, we obtain the following rules of thumb:

P-Controller:

Tg
Proportional-action gain Gain ≈
Tu * Ks

PI-Controller:

Tg
Proportional-action gain Gain ≈ 0.8 *
Tu * Ks

Integral time constant Ti ≈ 3 * Tu

PID-Controller:
Template for publishing FAQs in the Internet April 2005

Tg
Proportional-action gain Gain ≈ 1,2
* Tu * Ks

Integral time constant Ti ≈ Tu

Differential time constant Td ≈ 0.4 *Tu

Recommendations for Improving the Control Response:

If the process to be controlled comprises any lag elements, then the D-component should not be
used.

For noisy input signals we recommend the use of filters. Their time constants should be chosen to be
10 times smaller than the dominant time constants of the process.

Should periodic interferences be superimposed on the input signal, we recommend you make use of
the input filters and / or the response thresholds. But also consider their possible effect on the control
response.

Case B: How to Set the Control Parameters without Knowing the Process Characteristics

In this case, we do not know yet the control parameters which guarantee optimal control of the plant.
By default, the control parameters are set to below values which ensure that the control loop is at leas
steady:
Proportional-action gain Gain = 1.0
Integral time constant Ti = 3000 s
Derivative time constant Td = 0 (i.e. without D-component)

P-controller

Switch off the D-component


Set the desired setpoint and, in the manual mode, reduce the control error to zero.
Take the controller into automatic mode.
Slowly increase Gain to a value at which the control loop starts oscillating as a response to small
setpoint changes.
Slightly reduce Gain until the oscillations have disappeared.

PD-controller

Set the desired setpoint and, in the manual mode, reduce the control error to zero.
Take the controller into automatic mode.
Slowly increase Gain to a value at which the control loop starts oscillating as a response to small
setpoint changes.
Set Td from 0 to 1 second
Now keep increasing Td until the oscillations have disappeared.
Carefully raise Gain to a level at which the oscillating response sets in again.
Repeat changing Td and Gain until finally the oscillations can no longer be removed.
Now slightly reduce both Td and Gain until the oscillations have disappeared.
Template for publishing FAQs in the Internet April 2005

PI Controller

Set the desired setpoint and, in the manual mode, reduce the control error to zero.
Switch over to the automatic mode.
Slowly increase Gain to a value at which the control loops starts oscillating as a response to small
setpoints changes.
Slightly reduces Gain until the oscillations have disappeared.
Reduce Ti until the oscillating response sets in again.
Now slightly increase the value to Ti until finally the oscillations have disappeared.

PID Controller

Set the desired setpoint and, in the manual mode, reduce the control error to zero.
Switch over to the automatic mode.
Slowly increase Gain to a value at which the control loops starts oscillating as a response to small
setpoints changes.
Set Td from 0 to 1 second.
Now keep increasing Td until the oscillations have disappeared.
Carefully raise Gain to a level at which the oscillations response sets in again.
Repeat changing Td and Gain until finally the oscillations can no longer be removed.
Now slightly reduce both Td and Gain until the oscillations have disappeared.
Reduce Ti until the loop starts oscillating again.
Now slightly raise the value for Ti to make the oscillations disappear.
Template for publishing FAQs in the Internet April 2005

IP262:

S7-200

S7-300
Template for publishing FAQs in the Internet April 2005
Template for publishing FAQs in the Internet April 2005

Das könnte Ihnen auch gefallen