(ADaptive COntroller -...

25
i.p.a.s.-systeme Page 1 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Manager: Dipl.-Ing. Bernhard Wurm An der Landwehr 6 D-60437 Frankfurt am Main Tel.: +49 (0)69 95 04 18-0 Tel.: +49 (0)69 95 04 18-19 Homepage: http://www.ipas-systeme.de Mail: [email protected] ADCO (2.2) (ADaptive COntroller Siemens S7-4xx und S7-318) 1. Introduction _______________________________________________________________________________ 2 2. CONTROLLER CONFIGURATION/PROGRAMMING ___________________________________________ 4 2.1. Inputs: _______________________________________________________________________________ 5 2.2. Outputs: ______________________________________________________________________________ 9 3. Controller tuning __________________________________________________________________________ 11 2.1. Example how to adapt a pressure control __________________________________________________ 13 2.2. Example how to adapt a temperature control ______________________________________________ 15 4. Continuous Adaption _______________________________________________________________________ 16 5. Cascade Control Loop ______________________________________________________________________ 17 6. Multirange-Controller (ADMR) ______________________________________________________________ 18 7.1. Inputs: ______________________________________________________________________________ 19 7.2. Outputs: _____________________________________________________________________________ 20 8. S7 Specials _______________________________________________________________________________ 21 8.1. System reqirements ____________________________________________________________________ 21 8.2. Installation ___________________________________________________________________________ 21 8.3. List of blocks in example project _________________________________________________________ 22 7. Tips and Tricks ____________________________________________________________________________ 23

Transcript of (ADaptive COntroller -...

Page 1: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 1 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

ADCO (2.2)

(ADaptive COntroller

Siemens S7-4xx und S7-318)

1. Introduction _______________________________________________________________________________ 2

2. CONTROLLER CONFIGURATION/PROGRAMMING ___________________________________________ 4

2.1. Inputs: _______________________________________________________________________________ 5

2.2. Outputs: ______________________________________________________________________________ 9

3. Controller tuning __________________________________________________________________________ 11

2.1. Example how to adapt a pressure control __________________________________________________ 13

2.2. Example how to adapt a temperature control ______________________________________________ 15

4. Continuous Adaption _______________________________________________________________________ 16

5. Cascade Control Loop ______________________________________________________________________ 17

6. Multirange-Controller (ADMR) ______________________________________________________________ 18

7.1. Inputs: ______________________________________________________________________________ 19

7.2. Outputs: _____________________________________________________________________________ 20

8. S7 Specials _______________________________________________________________________________ 21

8.1. System reqirements ____________________________________________________________________ 21

8.2. Installation ___________________________________________________________________________ 21

8.3. List of blocks in example project _________________________________________________________ 22

7. Tips and Tricks ____________________________________________________________________________ 23

Page 2: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 2 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

1. Introduction

In most cases the tuning (optimization) of PID-controllers is based on so-called “trial and error” methods.

This requires special experience and also takes a lot of time especially when trying to control sluggish

processes (e.g. temperature processes). Above that the control quality does not correspond to the

optimum and still leaves quite some room for improvements. The tuning procedure gets even more difficult

if there are non-linear or time-variant processes to be controlled.

The adaptive controller ADCO provides solutions to all these problems. It automatically adapts itself to

changing process characteristics but it can also be operated as a controller with constant parameters. In

this instance the adaptation is turned off after the initial optimization step and the controller then serves as

a better alternative to a regular PID-controller. If necessary the adaptive mode can be turned back on any

time during the operation of the controller.

Besides standard lag processes ADCO is especially suited to control processes with integrating

characteristics and also processes with significant dead times. It is common knowledge that regular

controllers have problems with these types of processes.

As opposed to PID-controllers ADCO provides an equally optimal control behaviour in set point control as

well as disturbance control (non-measurable signals acting on the process variable) tasks.

Figure 1: Block structure of the adaptive control loop

Page 3: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 3 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

ADCO basically consists of two main parts:

The process model estimation is based on a method which is known as DSF (Discrete Square Root

Filtering) or SRIF (Square Root Information Filter). This procedure calculates a parameter model of

the process to be controlled by evaluating the process signals (manipulated variable / controller

output, process variable) according to the method mentioned above.

The controller optimization is based on an estimated process model which is validated through a

supervisory function. The algorithm delivers an optimal state controller. Besides the actual control

error a few more states allowing a prediction about upcoming process variable values are fed into

the calculation of the manipulated variable. Since the state controller evaluates more information

about the process behaviour than any PID-controller it provides a superior control quality even

when acting on simple “linear” processes. After a set point change or a disturbance of the process

variable all state deviations are reduced to 0. The control behaviour depends on one tuning

parameter (controller sensitivity) which can adapt values between -100 and 150.

The default value for this parameter is 25 and does not have to be changed in most applications.

Increasing the sensitivity basically means increasing the activity of the controller, i.e. the controller

is acting stronger onto the process using up more energy.

Outstanding advantages compared to regular controllers:

essentially faster control parameter tuning

better control quality controlling “easy to handle” processes

significantly better control behaviour controlling processes with integrating and/or dead

time characteristics

optimal tuning for set point and disturbance control

adaption to changing process characteristics

basically no overshoot

Table 1: Advantages compared to regular controllers

Page 4: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 4 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

2. CONTROLLER CONFIGURATION/PROGRAMMING

Like standard function blocks within STEP S7 the adaptive state controller is to be configured by connecting

block inputs and outputs to variables, constants or to inputs/outputs of other function blocks.

Bild 2.1: ADCO (FB50) Funktionsbaustein

Page 5: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 5 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

2.1. Inputs:

PV_IN (Offset 0):

Process variable (e.g. temperature, pressure, level etc.) of the control loop in physical units.

NM_PVLR (Offset 102):

Low range of the process variable in physical units.

NM_PVHR (Offset 106):

High range of the process variable in physical units.

SP_EXT (Offset 114): An external set point (in physical units) can be connected to this input. This feature is necessary to set up e.g.

cascade control loops.

SP_EXT_ON (Offset 4.0):

With this output it is possible to relay the external-set point-mode to other function blocks..

NM_LMNLR (Offset 6):

Low range of the manipulated variable (controller output).

NM_LMNHR (Offset 10):

High range of the manipulated variable (controller output).

LMN_LLM (Offset 14):

Low limit of the manipulated variable within the controller output range.

LMN_HLM (Offset 18):

High limit of the manipulated variable within the controller output range.

TTIME (Offset 22): The transition time (for an exact definition see chapter 3) must be defined during the configuration or later

during runtime (in single loop displays) just before the controller is to be optimized. The dimension of this entry is [min]. The transition time determines the internal scan rate of the controller (internal scan rate =

transition time/60). The main scan time of the function block has to be adjusted in a way that the internal scan

rate according to the formula above can be realized. The reason for the need to specify a separate (internal)

scan rate is that it does not make sense to acquire data for a sluggish process (like a temperature process) with

a frequency in the higher [Hz] range. In this case the differences of the process signals (between two scans)

would not deliver any information about the process behaviour. The differences are then based on disturbances

with a share of almost 100%. If a value of 0 is being entered into this field then the internal scan rate is set

equal to the scan rate of the function block.

Page 6: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 6 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

DTIME (Offset 26): The model based state controller is especially suited to control dead time processes. The process dead time (for

an exact definition see chapter 3) however is not calculated or estimated by the control algorithm but it has to

be entered (in [min]) by the user. During the calculation of the manipulated variable this entry is evaluated. In

other words the calculation of the manipulated variable is not based on the actual process variable but on a

process variable in the future which is predicted by means of the estimated process model and the specified

dead time. The dead time can be changed on-line to accommodate changing process characteristics.

SENS (Offset 30): The sensitivity of the controller basically is the only “tuning parameter” (0 ... 101) to be adjusted by the user.

This field has a default value of 50 which in most cases does not have to be modified. Increasing this value

also means increasing the activity of the adaptive controller. Decreasing the value of course means decreasing

the activity.

DIRECT (Offset 34.0): A lot of industrial controllers require the specification of the so-called controller action as part of the tuning

procedure. This entry usually determines whether a decreasing process variable (below the set point) should be

controlled by an increasing (1 or TRUE: direct) or a decreasing (0 or FALSE: reverse) manipulated variable. In

this algorithm the specification of the controller action is used to validate the process model estimated by the identification routine. “Direct” means that the process must have a positive gain factor, “reverse” of course

means the opposite. The estimated process model will only be conveyed to the controller optimization if -

besides other checks - the estimated process gain factor corresponds to the gain factor derived from the

specification of the controller action. For processes with an integrating characteristic this entry is not relevant

since a gain factor is not defined for this type of process.

NO_VAL (Offset 34.1): Before an estimated process model is handed over to the controller optimization procedure it is validated by

applying different checks. Only if all checks show a positive result the process model is released and can be

used to base a set of control parameters on. By means of this selection field the process model check can be

turned off. This should only be done when - because of very noisy signals - a valid process model can not be

found. However this should happen very rarely (0 or FALSE: model validation; 1 or TRUE: no model

validation).

LMN_DEL (Offset 36): The value of this input limits the change velocity of the manipulated variable (output change - i.a. % - per

[min]). This limitation can be applied to valves where the opening and closing speed have to be limited (due to

process related reasons) to a maximum value. This entry is not relevant in output track and manual mode. A

value of 0 means “no limitation”.

Page 7: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 7 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

LMN_INI (Offset 40): The initial (after the first system start) manipulated variable value of a newly configured controller is

determined in this field. In most cases this value remains at 0 (default value). A deviating value should be

entered when setting up split-range control loops. In this case the value is usually specified so that both valves

involved are started up in a de-energized state.

LMN_TRK, LMN_SEL (Offset 46, 44.0): If this mode (LMN_SEL; 0 or FALSE: no track mode; 1 or TRUE: track mode) is enabled the controller output

(manipulated variable) is overwritten by a predefined value (LMN_TRK).

SP_TRK_ON (Offset 50.0): To ensure a bumpless transfer from manual to automatic mode the set point can be defined to track the process

variable value (in manual mode only). After switching to automatic the control error (set point - process

variable) is 0 which means that no step change is generated at the controller output, i.,e. the manipulated

variable (0 or FALSE: no set point track; 1 or TRUE: set point track).

NO_BUM (Offset 50.1): In the inner controller of a cascade loop it is not possible to apply the set point track mode ensuring a bumpless transfer to automatic. By means of this input it is nevertheless possible to do the job. When enabled the

manipulated variable is temporarily processed through a low pass filter (0: no low pass filtering; 1: low pass

filtering).

LMN_STB, LMN_STBON (Offset 52, 50.2): The control algorithm offers a mode (LMN_STBON; 0: no standby mode; 1: standby mode) where the

adaptive controller can be operated parallel to an already existing and active control concept. By means of the

input LMN_STB the manipulated variable of the active controller is usually transferred into the adaptive state

controller. Based on that signal and also on the process variable a process model can be estimated and

subsequently a controller can be optimized. In this mode the manipulated variable of the adaptive controller

should not modify the corresponding valve position (this has to be ensured by an overall function block

layout). The manipulated variable should just be recorded. By comparing the manipulated variable of the

adaptive controller with the output of the active (acting on the valve) controller it should be possible to make a

statement about the control quality of the adaptive algorithm. In this way the adaptive controller can be tested

without taking any risk of upsetting the process.

AD_OVR (Offset 56.0): If this input is activated (0 -> 1) the controller is forced into the non-adaptive mode. Forcing the controller into

this mode is appropriate e.g. when the process variable value can no longer be acquired because of a sensor failure. Otherwise (when continuing to run the controller in the adaptive mode) a disrupted relationship

(manipulated variable <-> process variable) would possibly be projected into the estimated process model. If

the reason (e.g. sensor failure) for the switch over (override) is no longer existing the controller does not

automatically go back to the adaptive mode. If necessary this has to be done by a manual user interaction.

Page 8: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 8 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

AU_OVR (Offset 56.1): If this input is activated (0 -> 1) the controller is forced into manual mode. Forcing the controller into this

mode may be applicable e.g. during certain emergency shutdown strategies. If the reason for the switch over

(override) does no longer exist, the controller does not directly go back to the automatic mode. If necessary

this has to be done by a manual user interaction.

IL_VAL, ILCK (Offset 58, 56.2): If this mode (ILCK; 0 or FALSE: no interlock; 1 or TRUE: interlock) is activated the controller goes into the

interlock state, i.e. the adaptation is deactivated, the controller changes to manual and the controller output

adapts a predefined value (IL_VAL).

OSHT (Offset 62.0): By means of this input it is possible to define whether it should be possible to operate the controller

immediately after the switch over to the interlock state (one-shot) or whether the controller should be forced to

this state as long as the interlock input is set (0 or FALSE: regular mode; 1 or TRUE: one-shot mode).

SAMPLE_T (Offset 64): Scan time of the function block in [sec].

SP_OP (Offset 110):

Set point of the control loop in physical units.

LMN_IN (Offset 118): Manipulated variable (controller output) in manual mode.

AUTO (Offset 122.0):

This input defines the controller mode (0: manual; 1: automatic).

ADAP (Offset 122.1): This input defines the adaptive mode of the controller (0: adaptation off; 1: adaptation on).

Page 9: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 9 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

RESET (Offset 122.2): With this input it can be determined whether the adaptive controller is to be reset. Reset means that the

controller loses all previously gathered information about process characteristics which in turn means that it

has to be optimized again (0: no reset; 1: reset).

RNG_ADA (Offset 68.0): If this input is set the controller increases the process variable range by 50% if the process variable approaches

its current high limit. Likewise it decreases the range by 50% if the process variable approaches its current low

limit value.

SUB_ZER (Offset 68.1): If this input is set and RNG_ADA is set then the low limit of the process variable range can (during a range

modification step) adapt a value below 0. Otherwise this is not possible.

2.2. Outputs:

LMN (Offset 70):

Manipulated variable.

SP (Offset 74):

Set point of the controller.

IDENT (Offset 78.0): If the adaptation is turned on and if the controller detects a “sufficient” dynamic movement of the process

variable then the process model estimation procedure within the adaptive algorithm is activated. An active

estimation routine is indicated by setting this block output.

VAL_M (Offset 78.1): The estimated process model is checked before it is passed to the control parameter optimization procedure.

This check contains several validation steps. Only if all validation steps show a positive result the process

model is released to the optimization procedure. A positive result is indicated by setting this block output.

ORIG_M (Offset 78.2): This output indicates that a first valid process model has already been found and that therefore the controller

can be switched to automatic. IF ORIG_M = 1, IDENT = 0 and VAL_M = 0, the ADCO has found a valid

model. You can now deactivate the adaption (ADAP = OFF).

QAUTO (Offset 78.3):

This output represents the controller mode (0: manual; 1: automatic).

Page 10: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 10 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

QADAP (Offset 78.4):

This output indicates whether the controller works in the adaptive mode (0: adaptation off; 1: adaptation on)..

QLMN_SEL (Offset 78.5):

With this output it is possible to relay the track-mode (LMN_SEL) to other function blocks.

QSP_EXT (Offset 78.6):

With this output it is possible to relay the external-set point-mode (SP_EXT_ON) to other function blocks.

QILCK (Offset 78.7):

With this output it is possible to relay the interlock-state (ILCK) to other function blocks.

ER (Offset 80):

Current control error, i.e. the deviation of the Process value from the set point value (SP – PV_IN).

F_SCAN (Offset 84.0): During the first scan after the configuration/programming

(F_SCAN = 0) of a new controller certain instance variables of the adaptive controller have to be initialized.

During the initialization the value F_SCAN is set to TRUE or 1 which means that during the following scans

the initialization routine is skipped.

VERSIO (Offset 86):

Version number of the adaptive controller (e.g. „Rev. 2.2“).

Page 11: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 11 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

3. Controller tuning

If a new controller has been configured or an existing one has been reset the control algorithm does not

have any information about process characteristics. Therefore the controller optimization which is based

on an estimated and validated process model cannot be performed. In this situation the algorithm prevents

the controller from being switched to automatic. Through manual stimulation (changing the manipulated

variable) knowledge about the process behaviour has to be relayed to the identification routine.

First of all the adaptive control algorithm needs some basic information about the process dynamics

(transition time) and possibly about process dead times. The transition time (see figure 4.1) is defined for

lag as well as for integrating processes. Concerning lag processes the transition time is the time necessary

for the process to reach a new steady state after a step change of the manipulated variable (controller

output). Dealing with integrating processes the transition time is the time the process needs - starting out

at a steady state - to change its process variable by n/2 % as a response to a step change of the controller

output of also n % (e.g. 20 % step change of the manipulated variable -> 10% change of the process

variable). It is sufficient to enter the transition time as an approximate value in [min]. The control algorithm

is so robust that the entered value can be five times higher or five times lower than the real transition time

without impairing the resulting control quality. The dead time [min] should have a higher degree of

accuracy.

If these times are unknown they have to be determined by applying a step change to the manipulated

variable (with the adaptation turned off). The necessary numbers can be classified by taking a look at the

resulting process variable graph. During the following learning phase (adaptation turned on!!) a classical

transfer function (answer to a step change of the manipulated variable) can be recorded. Furthermore it is

also possible to adjust the controller output several times during the learning phase. So it is conceivable

that the process variable is manually controlled and led to its set point. As soon as the algorithm detects its

first valid process model the controller can be switched to automatic, i.e. the internal interlock to force the

controller to manual mode is no longer effective. With the majority of processes it is not necessary to

operate the controller in a continuously adaptive mode. The control algorithm can then work with a

constant control parameter set (after turning off the adaptation).

Page 12: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 12 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

Figure 2: Lag process

Figure 3: Integrating process

Page 13: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 13 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

2.1. Example how to adapt a pressure control If you want to adapt a pressure control, you don’t have to change the value of the manipulated value as

much as when you want to adapt a temperature control (see chapter 2.2, page 15).

The next figure can help you to adapt a pressure control.

Info: You have to change the value of the input “DIRECT” to “Gain=Reverse”,

if the value of the MV increases and the PV decreases (reverse gain).

Page 14: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 14 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

Figure 4: ADCO-Adaption

Page 15: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 15 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

2.2. Example how to adapt a temperature control The temperature adjustment requires some recommendations that we would like to mention in this

chapter. To get a good model, we’ll always need to take the faster phase. For a temperature control, in

normal cases, the warm-up phase is significantly faster than the cool-down phase. If it’s possible, give the

value of the manipulated variable a high jump (e.g. from 0% to 80%), if not, take smaller values.

During the heating phase, it’s important to interrupt it at the right moment, and to initiate the “cool-down”

phase immediately. In this example, we assume that the temperature range of the heater goes from “room

temperature” (control valve = 0%) till a maximum temperature of 1200°C

(control valve = 100%). We start our adaption with a high jump of the manipulated value (from 0% to 80%).

At 1/3 of our maximum temperature (about 400°C), we’ll slowly decrease the value of the manipulated

value to get the dynamic ranges needed for the calculation of our model.

Figure 5: Example for adapting a temperature control

Info: The above change of the manipulated value mostly depends of the heating type.

Depending on the heater design, you can also try to use different values for the MV to get

the dynamic areas. In electric heaters with Thyristor Power Controller, the continuous

control output of the controller must be connected to a 3-point step FB (S7 Library), so that

it can be converted into a digital output signal to control the Thyristor Power Controller.

The value of the sensitivity should be set in this case, maybe to a very high value (100 or

more), so that the heating process will start with a high or the highest heating power.

Page 16: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 16 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

4. Continuous Adaption

If processes show a distinct non-linear or time-variant behaviour it may be necessary to operate the

controller in a continuously adaptive mode. Through this the estimated process model is being adapted to

changing process characteristics which again causes the control parameters to track the optimal controller

settings.

Figure 6: Block diagram for continuous adaption

Since the process identification evaluates all process signals and projects these signals into a model,

attention should be paid to the fact that signal failures can severely disrupt the information gathered in the

process model so far. In the block diagram a signal failure turns off the adaptation and also switches the

controller to the output track mode. Since the manipulated variable is fed back into the track variable the

controller output keeps its last (before the signal failure) valid value.

Page 17: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 17 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

5. Cascade Control Loop

The adaptive state controller can also be applied to cascade control loops. The function block structure in

the next figure shows one possible layout.

Figure 7: Function block structure in a cascade loop

If the inner controller (ADCO 2) is switched to manual mode, to track mode, to interlock mode or to local

set point then the adaptation of the outer (primary) controller is turned off and the track mode of this

controller is activated. The controller output (manipulated variable) of ADCO 1 (set point for ADCO 2) now

tracks the process variable of the inner controller. This means that ADCO 2 can be switched back to its

regular mode without causing a bump. Furthermore the functionality of the complete cascade is re-

established by simply adjusting the desired mode of the inner controller.

If necessary the adaptation feature of ADCO 1 (outer controller) has to be re-enabled through a separate

user interaction.

In a cascade control loop set up with two adaptive state controllers it should never happen that both

controllers are operated in the continuously adaptive mode at the same time. This could cause mutual

disturbances which most likely diminish the control quality of the cascade loop.

Page 18: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 18 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

6. Multirange-Controller (ADMR)

Besides the regular adaptive controller the software also contains the so-called Multirange-Controller. A

special feature of this controller is that it can be subdivided in up to 8 different zones and that these zones

can individually be optimized. The switch over between zones can be initiated by the user or any other

process event.

If the process shows a distinct non-linear behaviour then the process variable range can be split up into e.g.

8 sections. Through this the process can be “linearized” section by section. Since individually optimized

control parameter sets are assigned to the different “linearized” zones an essential improvement of the

control quality can be achieved. Another conceivable application is the control of batch processes where

process characteristics are predictably changing during a production lot. Here the zone specific control

parameters can automatically be activated depending on the progress of the corresponding batch.

Transition time, dead time and controller sensitivity are defined only once per Multirange-Controller. They

are equally valid for all controller zones.

The start-up (tuning) procedure for the Multirange-Controller basically coincides with the procedure

described in chapter 3. The only difference is that the procedure - except for the definition of the transition

time and dead time - has to be performed for each configured (up to 8) range.

Page 19: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 19 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

Bild 7.1: ADCO-Mehrbereichsregler (FB80)

7.1. Inputs:

RANGE (Offset 68):

The range will be set via the Faceplate. The definition of the controller range (1 ... 8) determines which control

parameter set is to be loaded during the operation of the controller.

RES_RN (Offset 130.3): The algorithm of the Multirange-Controller contains 2 ways to reset or initialize the controller. Either the

currently selected zone (RES_RN) or all controller ranges (RESET) can be initialized.

Page 20: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 20 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

FILL (Offset 130.4): By means of this block input the tuning parameters of the actual range are copied to all remaining ranges

which are not tuned yet. This block input is defined as a so-called “IN-OUT”-input, i.e. it can be modified like

a regular block input as well as through the internal algorithm. This however means that the output of another

upstream block must not be connected to this input type.

7.2. Outputs:

ORI_M1 ... ORI_M8 (Offset 82.2 ... 82.7, 83.0, 83.1):

These outputs indicate whether the corresponding range (1 ... 8) has already been optimized.

QRANGE (Offset 84):

This output contains the number (1 ... 8) of the currently selected and active range.

Page 21: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 21 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

8. S7 Specials

8.1. System reqirements

S7 4xx-Serie oder S7-318

Step7 Basis V4.02.1 or higher

8.2. Installation

Unzip S7_ADCO_LIB.ZIP in Lib directory in SIMATIC-Managers

e.g.: C:\SIEMENS\TEP7\S7LIBS.

After unzip library is in directory eg.: C:\SIEMENS\TEP7\S7LIBS\ADCO.

Open Step7 project.

Open KOP/FUP/AWL-Editor.

Open library list.

Open branch „library“

Here are FB50 (ADCO) and FB80 (ADMR).

Page 22: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 22 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

8.3. List of blocks in example project

FB50 Adaptive controller ADCO

FB60 LAG-block for simulation

FB80 Adaptive multi range controller ADMR

OB36 OB for cyclic execution of FBs with 50 msec cycle.

OB100 Restart-OB (Initializing FBs)

OB1 not used

OB80 not used

DB10 ADCO data block for interaction with simulation or HMI

DB30 ADMR data block for interaction with simulation or HMI

DB50 ADCO instance data block

DB60 ADCO instance data block

DB80 ADMR instance data block

DB90 LAG instance data block

VAT10 ADCO variables table for diagnostic / testing

VAT30 ADMR variables table for diagnostic / testing

Page 23: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 23 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

7. Tips and Tricks

Basically the learning phase to set up a process model and to optimize a state controller based on

this model can be started at any time. During the first learning phase (i.e. after a new controller is

placed into the PCS7-program or after an existing controller has been initialized) the process model

estimation should be started in a “nearly static” operating point and should end in a different but

also “nearly static” operating point. The reason here fore is that during the transition from a static

to a dynamic phase and also during the transition from a dynamic to a static phase the “best

process information” can be transferred to the process model (see figure 9.1). A consequent fine

tuning optimization (based on an already existing process model) can also be started in the course

of a dynamic transition without impairing the resulting control quality.

Figure 8: Transition phases with essential information

Page 24: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 24 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

If a controller is operated in the continuously adapting mode then it makes sense to limit the change rate of

the manipulated variable (LMN_DEL). Assumed that no limitation is introduced the manipulated variable

can get into a oscillating state if a wrong process model – despite all checks – is conveyed to the

optimization procedure (this should happen very rarely, but it cannot be guaranteed that it never happens).

A high-frequent oscillation can lead to a static process variable which in turn means that no process

information can be extracted from the process variable, i.e. the model can no longer be improved and the

control algorithm is locked. The value for a limited change rate of the manipulated variable depends on the

dynamic behaviour of the process and on the requirements on the control quality of the loop. A generally

valid value cannot be indicated.

If a process contains a significant dead time characteristic then the manually entered dead time value

(DTIME) should always be lower as or equal to the real process dead time. If the indicated dead time is too

low the control quality diminishes very slowly. However if it is too high the quality of the control loop is

strongly affected. The reason for that behaviour is still to be examined.

To establish an optimal control quality an exactly reproducible and constant scan time is necessary. This

means that the adaptive controller has to be triggered by a cyclic OB (Organization Block). Triggering the

controller through OB1 (i.e. in the so-called free cycle or PLC-mode) would impair the control performance.

Moreover the basic scan or cycle time of the controller must not be lower than the scan time for external

inputs (esp. the process variable). If this is not been followed then the control algorithm (i.e. the process

model estimation) is dealing with identical numbers in subsequent scan steps even if the process is in a

dynamic transition. This disturbs the process model and reduces the control quality.

If process characteristics show a defined difference in certain transitions (e.g. a temperature process where

heating up takes more time than cooling down) the faster transition should be the basis for a process

model estimation and a subsequent controller optimization. In the example above (provided that cooling

down shows faster dynamics) the system should first be heated up with the adaptation turned off. Then the

adaptation should be turned on and the system should be cooled down. The resulting controller (with

constant tuning parameters) is capable of handling both the heating up and cooling down phase.

If the controller is acting too strong on the process, i.e. it produces an oscillating controller output

(manipulated variable) and thereby approaches stability limits, the following actions should be

taken (in that order):

Page 25: (ADaptive COntroller - ipas-systeme.deipas-systeme.de/wp-content/uploads/2010/11/Users-guide-S7-ADCO-V2...ADCO (2.2) (ADaptive COntroller ... procedure. This entry usually ... This

i.p.a.s.-systeme

Page 25 of 25 Ingenieurbüro für Prozessautomations- und Softwaresysteme Ma na ger : D i p l . - I ng . B e r nh a r d W ur m

An de r Lan dwe hr 6 D - 60 437 F r an k f u r t am Ma i n T e l . : + 49 ( 0 ) 69 95 04 18 - 0 T e l . : +49 ( 0 ) 6 9 9 5 0 4 1 8 - 19

Hom epa ge : h t t p : / /www . i pas - s ys t em e .de Ma i l : s e r v i c e@i pa s - s ys t em e .de

Reduce the sensitivity factor (SENS) step by step – if necessary down to -100.

Limit the change velocity (LMN_DEL) of the manipulated variable (controller output). The

value to be entered depends on the process dynamic. As a first guess the value can be

adjusted so that a 100% change of the controller output is possible within one oscillation

period. E.g. if the oscillation period of the instable or nearly instable control loop is 0.5 min

then LMN_DEL can be set to 200.

If the controller is acting too sluggish on the process then the following actions can be taken (in that

order):

Increase the change velocity (LMN_DEL) of the manipulated variable (controller output) or

set it to 0 to disable the limitation completely.

Increase the sensitivity factor (SENS) step by step – if necessary up to 150.