Sie sind auf Seite 1von 11

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Overview


Integration of open and closed-loop control in one PLC
PLC function block library integrates closed-loop and open-loop control

The RTT closed-loop control toolbox offers around a hundred software function blocks for universal control functions which can be individually put together, combined and set up for the task in hand. This enables solutions for both open and closed-loop tasks to be combined in Sucosoft S 40 for one automation unit. Programming is carried out to IEC 1131-3. The future belongs to closed-loop control Today closed-loop control represents a fundamental part of the know-how of technical professions in the field of process and production engineering. The purpose behind increasing automation is generally to raise quality standards and to increase the speed of production, whilst at the same time reducing energy levels consumed. This is as true for the control of oxygen levels in the aeration of a sewage plant as it is for temperature control in an extruder heating zone. It was only when software started to be used in the automation industry ranging from the use of a PLC in a bottling plant to the process computer of a power plant that classical technical control installations and the still current DDC units came to be replaced by software controllers. Today there is a desire to network even simple controllers with each other in a total system, to set their parameters from one process management/control level, and where necessary, to adapt them even more closely to their requirements. This can now be very easily achieved through the use of the RTT in a PLC. Minimum programming requirement with optimum functionality The RTT function blocks are designed to reduce the programming requirement for the user. The large selection of function blocks with extremely simple interfaces, ensures that this is the case. The following selections, for example, are available for the range of PID controllers: PI controllers (see pictures for different controller names) PD three step controller PID controller Split-range PID controller (heating/cooling) Autotuning PID controller

Each function block offers as much functionality as possible. For example the PID controller offers the following facilities: Antiwindup procedure Effective D-component computation (differentiation) Standard control response (enables substitution of existing controllers) Automatic determination of optimal scanning times for integrator and differentiator Smooth (shock-free) acceptance of manual manipulated variable Current cycle time automatically taken into account Implementation of function sequences The RTTs interpolation function blocks allow any sequence of functions to be replicated. The accuracy of this replication depends essentially on the number of interpolation points. 2, 3, 4, 10 and 20-point interpolations are available. If an interpolation is required with more than 20 interpolation points, this can be achieved by combining several interpolation function blocks. PLC types supported The closed-loop control toolbox can be used on all PLCs which are programmed with Sucosoft S 40. At present this applies to the following PLC types: PS 4-150 (e.g. PS 4-141, PS 4-151) PS 4-200 (e.g. PS 4-201) PS 4-300 (e.g. PS 4-341) PS 416

Closed-loop controls increase quality and reduce energy consumption

Function blocks with high functionality reduce programming work

Combining and linking The RTT can be used in many situations. For example standard function blocks such as PID controllers or pulse duration modulation, can easily be integrated into a PLC program. However this represents only one of the strengths of the closed-loop control toolbox. The true potential of the RTT is fulfilled when different function blocks are combined and linked to each other. This enables advanced function blocks with special properties to be created, such as an adaptive fuzzy PID design for controlling boilers (see fig. 1). Individual users can quickly implement their own ideas even with their existing application know-how.

G 2700-2208 GB 03/99

APP-RTT-E-GB Closed-Loop Control Toolbox Overview


Tried and tested applications Among others the following tasks have been successfully solved using the closed-loop control toolbox: Combined pressure/mixer control for de-icing airplanes. Dosing control for the packaging industry Chlorine control for indoor and outdoor swimming pools Controlling refrigerators in supermarkets Controlling refrigerating plant for ice-skating rinks Temperature control on extruders (heating/cooling in one zone)
Change in heat required

Highly dynamic temperature control with autotuning Control tasks in buildings, e.g. temperature, humidity, pressure and volumetric flow control Fuzzy control of printing presses Control designs for power plants Control designs for sewage works Temperature control for ball bearing test beds Synchronisation control in drive technology

Modularity allows complex control structures to be set up

Universal function blocks are suited to many areas

Ambient temperature Inlet temperature T

Fuzzy System

Kp Tn Tv Inlet setpoint temperature

Setpoint temperature Furnace

Kp Tn Tv Fuel Boiler

PID controller Master controller

PID controller Auxiliary controller

Furnace temperature

Figure 1: Adaptive design for boiler control

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Basic Principles


The principle of closed-loop control The principle of closed-loop control consists in the value to be controlled being fed back from the place of measurement via the controller and its settings facility into the controlled system. The feedback process makes this so-called controlled variable more independent of external and internal disturbance variables, and is the factor which enables a desired value, the setpoint, to be adhered to in the first place. As the manipulated variable output by the controller influences the controlled variable, the so-called control loop is duly closed.
Closed-loop control has advantages over open-loop control

The principle of open-loop control Open-loop control is to be found wherever there is no closed control loop. The biggest disadvantage compared with closed-loop control, is that unknown or non-measurable disturbance variables cannot be compensated. Also the behaviour of the system including the effects of disturbance variables which the open-loop control system is able to measure, must be exactly known at all times in order to be able to use the manipulated variable to influence the controlled variable.
Manipulated variable Open-loop controller Measurable disturbance variable System

Technical systems process several kinds of controlled variables such as current, voltage, temperature, pressure, level, flow, speed of rotation, angle of rotation, chemical concentration and many more. Disturbance variables are also of a physical nature.
Setpoint deviation

Setpoint

Output variable

Unknow n and unmeasurable disturbance variable

Setpoint

Closed-loop controller Manipulated variable

Figure 3: The principle of open-loop control

Process variable

Control system

Disturbance variable

One advantage is that an open-loop control system cannot become instable as there is no feedback this is a problem of closed-loop control. Classification of closed-loop systems Closed-loop systems are not classified by the physical values to be controlled, but by their behaviour over time. The level in a container can thus be mathematically described in exactly the same way as the voltage of a capacitor. Behaviour over time can be determined for example by abruptly changing the input value and then observing the output value. Knowledge of the basic laws of physics is often sufficient to estimate this behaviour. Only in relatively few cases is it necessary to calculate it.

Figure 2: The principle of closed-loop control

These control loop terms can be easily explained using the familiar example of room temperature control by means of a radiator thermostat: the requirement is to keep the room temperature at 22 C. This temperature is set by means of the rotatable knob (= setpoint). The temperature (= controlled variable) is measured by a sensor. The deviation between the room temperature and the setpoint is then measured by the built-in controller, often a bimetal spring, (= the control deviation), and is then used to open or close the valve (= the manipulated variable). What are the disturbance variables? First of all there is the effect of the outside temperature and the sun shining through the windows. The limited thermostat can as little foresee these influences as it can the occupants behaviour in opening a window or holding a party with a lot of guests who cause the room to warm up. However this controller is still able to compensate for the effects of one or more disturbance variables, and to bring the temperature back to the desired level again, albeit with some delay.

System w ith delay Input variable Output variable

Figure 4: Control system with delay

G 2700-2208 GB 03/99

APP-RTT-E-GB Closed-Loop Control Toolbox Basic Principles


The behaviour over time of a closed-loop system is normally characterised by the fact that when the input value is abruptly changed, although the output value immediately begins to change, it reaches its end value with some delay. Closed-loop systems are further distinguished by those with and those without self-regulation. In a system with self-regulation, after the sudden change in the input value, the output value assumes a constant value again after a period of time. Such systems are usually called proportional systems or P systems. Let us take the example of a heating zone: the input value is the electrical heating power, and the output value is the zone temperature. Another important type of system is a system with dead time. In this case the input value appears at the output after the dead time delay. In a technical system the dead time is the result of the distance between setting and measuring locations. Example of a conveyor belt: the input value is the quantity of material at the beginning of the belt, and the output value is the measurement of the amount at the end of the belt. The dead time is calculated as the length of the belt divided by its speed, and it can therefore vary.
The RTT can be used for many closed-loop control systems

System w ith dead time Input variable Output variable

Input variable

System w ith self-regulation Output variable

Figure 7: Control system with dead time

Figure 5: Control system with self-regulation

In a system which does not have self-regulation, the output value will rise or fall after the abrupt change in the input value. The output will only remain at a constant value if the input is at zero. Such systems are usually called integral systems or I systems. A example of this is a level control in a container: the input value is the incoming flow, the output value is the level of the liquid.

In all the different systems discussed which are normally found in combination, we are dealing with so-called linear single variable systems because there is only one output value (= the controlled variable) as well as one input value (= the manipulated variable), and the system possesses linear properties. Controllers for these very common systems are accordingly known as single-variable control systems and are provided in the closed-loop control toolbox.

System w ithout self-regulation Input variable Output variable

Figure 6: Control system without self-regulation

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Basic Principles


The RTT offers all current types of controllers

Types of controller The controllers examined here are divided into two groups: Discontinuous controllers only offer 2 or more fixed values as the manipulated variable (in the RTT: two-step and 3-step controllers). They are suitable for elementary control tasks in systems with large delays. Continuous controllers can offer every technically possible value as the manipulated variable. These controllers are classified according to the reaction time of the manipulated variable in response to the control deviation at the input: The proportional (P) controller generates a manipulated variable only consisting of the positive or negative control deviation (the parameter is the transfer coefficient Kp). In a proportional differential (PD) controller a component is added to the manipulated variable which is proportional to the change in the control deviation (the parameter is the derivative action time Tv). In a proportional integral (PI) controller on the other hand, a component is added to the manipulated variable which is proportional to the running total control deviation (the parameter is the reset time Tn, inversely proportional to time!). The proportional integral differential (PID) controller combines all the above functions, and is therefore often used. Its advantages: it reacts quickly to a control deviation and acts in such a way as to ensure that the control deviation disappears. The emphasis on the individual control components depends on how the parameters are set. The closed-loop control toolbox offers all these types of control.

Which controller for which system? The best controller has been selected and the parameters correctly set when the control deviation does not exceed a specific value and the controller never oscillates. The engineers task is to select the type of controller best suited to the closed-loop control system, and then to find the best possible parameter settings when commissioning it. The following table shows the basic suitability of the controllers:
System with self-regulation, dead time only with self-regulation, dead time with delay with self-regulation, single delay with self-regulation, multiple delay no self-regulation, single delay P (+) k PI + k (+) k k PD k (+) PID + k + (+)

Symbols: not suitable k not particularly suitable + suitable (+) suitable but with limitations

In some cases fuzzy function blocks make sense

When is a fuzzy controller used? The fuzzy control function blocks contained in the closed-loop control toolbox can be best used for processes with non-linear behaviour, as these function blocks allow non-linear control characteristics to be set, contradictory control objectives, processes heavily affected by dead time, multiple variable control, processes which cannot be adequately described by a mathematical model, those cases where the controllers described above do not give satisfactory results.

G 2700-2208 GB 03/99

APP-RTT-E-GB Closed-Loop Control Toolbox Technical Details


The three-level structure of the function blocks The closed-loop control toolbox (RTT) is hierarchically structured and consists of three levels (figure below):

Level 1

PID controller

Level 2

P controller

I controller

D controller

Level 3

Addition

Limitation

Clock generator

Multiplication

Conversion

Figure 8: Three-level structure of the RTT function blocks

First level: Mathematical and logical functions are carried out on the ground level. It is especially important here that maximum accuracy with minimum cycle time is achieved on the basis of the type of controller used. Second level: The basic function blocks of closed-loop control technology have been assembled here such as integrators, differentiators, PT1 or dead time elements. These access the functions of the first level. Third level: Complex control technology algorithms are implemented on this level on the basis of the two lower levels. Here there are function blocks for the following areas: linear controllers, fuzzy controllers, pulse duration modulation, signal processing and system simulation. Linking and setting parameters Using the function blocks, applications can be combined in the PLC program. For this the finished function blocks are instantiated, i.e. individual names are allocated to each function block. (e.g. PID_controller_zone_1). All that remains is to link the inputs and outputs of the function blocks in accordance with the technical circumstances (see example on page 10), and to set up suitable parameters.

What happens in multiple instantiation? Multiple instantiation of a function block (e.g. PID_controller_zone_1 to PID_controller_zone_20) can be effected in order to set up several independent or cascaded controllers: in this way large-scale closed-loop control tasks can be solved in a PLC. The clever part about the system: only one code range is used in the whole program for the function block used, e.g. the PID controller, but in the case of multiple instantiation it is processed for the appropriate number of instances. Only the data range for individual control data (e.g. integral and differential components) which have to be stored temporarily from one call procedure to the next, is automatically stored separately for each instance of the function block. For this reason the additional memory requirement (given in the documentation) for multiple instantiation of a function block is low. Single instantiation If a function block does not have to store any data for the next call, it is sufficient to only instantiate it once (allocation of only one instantiation name in the declaration section), and if it is required more than once, to call it up several times in the instruction section. Typical examples are the mathematical function blocks, the interpolation and fuzzy function blocks. Multiple usage only requires the memory for one function block instance.
Modular function blocks take up less program memory

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Technical Details


Self-explanatory names reduce the effort required for program familiarisation

Self-explanatory variable and function block names The chosen variable and function block names of the RTT are described in detail and are self-explanatory so that programmers can use the RTT without any lengthy familiarisation required. Most of the function blocks can be integrated into the user program and assigned parameters without the aid of the documentation. The function block names are structured as follows: All function blocks begin with the symbols U_, making for a unified listing system. There follows an abbreviation which arranges the function blocks alphabetically into areas (in case there are several of the same type), all fuzzy function blocks for example beginning with U_FUZ. If there are several function blocks of the same type, distinguishing codes are added in front of the name, e.g. interpolations with data type UINT or INT (see below). At the end there is a descriptive name for the function block, e.g. PID_controller.

Examples of function block names are: U_LMA_INT_limit_monitor a Limit monitor for data type Integer U_LMA_UINT_limit_monitor a Limit monitor for data type Integer U_IP20_UINT_INTERPOLATION a 20-point interpolation for data type unsigned Integer U_IP3_INT_INTERPOLATION a 3-point interpolation for data type Integer Variable names are structured as follows: At the beginning there is a descriptive name, e.g. setpoint. There follows (if useful) the unit or resolution, e.g. 12Bit, percent or ms. At the end of the variable name is the data type, e.g. INT, UINT or BOOL. Examples of variable names are: Reference_value_12Bit_UINT Ramp_time_ms_UINT Tn_10ths_UINT Setpoint_12Bit_UINT

G 2700-2208 GB 03/99

APP-RTT-E-GB Closed-Loop Control Toolbox Technical Details


Documentation of a function block interface U_PID_controller PID-controller with 12-Bit inputs and outputs U_PID_controller Inputs UINT UINT Setpoint_value_12Bit_UINT Actual_value_12Bit_UINT Parameters BOOL BOOL BOOL BOOL UINT UINT UINT UINT Outputs Manipulated_variable_12Bit_UINT UINT
The RTT can almost be used without a manual

Monitor outputs INT INT INT

P_activate_BOOL Manipulated_variable_P_13Bit_INT I_activate_BOOL Manipulated_variable_I_13Bit_INT D_activate_BOOL Manipulated_variable_D_13Bit_INT Accept_manual_manipulated_variable_ Proportional_rate_P_percent_UINT Reset_time_10ths_UINT Derivate_action_time_10ths_UINT Manual_manipulated_variable_12Bit_UI

Prototype of the function block

Meaning of operands Designation Inputs Setpoint_value_12Bit_UINT Actual_value_12Bit_UINT Parameters P_activate_BOOL I_activate_BOOL D_activate_BOOL Accept_manual_manipulated _variable_BOOL Proportional_rate_P_percent_UINT Reset_time_10ths_UINT Derivate_action_time_10ths_UINT Manual_manipulated_variable_12Bit _UINT Outputs Manipulated_variable_12Bit_UINT Monitor outputs Manipulated_variable_P_13Bit_INT Manipulated_variable_I_13Bit_INT Manipulated_variable_D_13Bit_INT P component I component D component 4095 to 4095 4095 to 4095 4095 to 4095 Manipulated variable (analog, 12 Bit) 0 to 4095 Activates the P-component Activates the I-component Activates the D-component Smooth acceptance of manual manipulated variable Proportional rate +Kp [%] Reset time Tn [0,1 s] Derivative action time Tv [0,1 s] Manual manipulated variable 0/1 0/1 0/1 0/1 0 to 65 535 0 to 65 535 0 to 65 535 0 to 4095 Setpoint Actual value 0 to 4095 0 to 4095 Meaning Value Range

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Designing


Cycle times decrease through sensibly planned function block calls

Design help Because of the hierarchical and modular structure of the RTT, calling up a single function block (FB) can in itself entail considerable code sizes, data sizes and instances. For example the PID autotuning controller, when called once, generates a code size of approx. 41,500 bytes, 29 sub-function blocks and 84 instances. However if further FBs are used which the PID autotuning controller has already used as sub-function blocks, the code size does not increase. Thus when many RTT FBs are used, the relative code size per function block decreases. Due to the high functionality of RTT function blocks, the cycle time requirement is relatively high when PS 4-200 controllers are used. For example a PID controller requires approx. 16 ms PLC cycle time. If for example 30 control zones are set up, considerable PLC cycle times occur, or the maximum cycle time may be exceeded. In such cases the program can be segmented (as long as the control system is slow enough), with the result that per PLC cycle only one controller zone is called. The cycle time requirement when using a PS 416 or PS 4-341 is 20 to 60 times shorter than for the PS 4-201!

An application example
Auto tuning

SET temperature PT1filter

PID split range controller

PDM

PLC Cooling ACTUAL temperature Temperature section Heating

Disturbance variable
Figure 9: Temperature control design

Multiple zone temperature control is to be set up for an extruder: up to 36 zones which also influence each other have to be simultaneously controlled. The following function blocks are necessary for the set-up: PT1 Filter: The temperature sensor input signals are smoothed and passed to the controller as actual values. PID Split-range controller: Extruders are cooled and heated in zones. Optimal control is only achieved if heating and cooling are processed in one algorithm with two separate manipulated variable outputs. Autotuning: Setting up the parameters for the PID split-range controller can be done automatically with the aid of the autotuning function block (see below). This function block sends test signals to the heating and cooling units, and uses the reaction of the temperature loop to calculate the best parameters for the PID split-range controller. PDM: The PDM function block converts both of the analog controller manipulated variables into pulse duration modulated, digital signals. These signals can be used to directly switch the contactors or semiconductor relays of the heating and cooling units.

Sample programs offer good ideas

Sample programs Among the sample programs available for the closed-loop control toolbox are the following: PID controller combined with pulse duration modulation for 10 zones PID controller combined with simulation PID autotuning controller combined with PTn system as a control loop simulation, with detailed demonstration instructions Adaptive fuzzy PID controller combined with simulation and manual

10

G 2700-2208 GB 03/99

APP-RTT-E-GB Closed-Loop Control Toolbox Designing


Commissioning a controller When a PLC program is loaded with an untested controller, the control loop should not be closed immediately. Before a control loop can be started up, the whole technical environment, i.e. automation units, actuators, sensors, etc., must be set up and tested. Special attention must be paid to whether the controller function block is receiving the right reference and actual values, and to whether actuators are being controlled as planned by the manipulated variable. Scaling and polarity may have to be adjusted. Now the controller must be set up: If parameters are already known, these can be used. In a PTn system, the autotuning controller can set its own parameters automatically. It is enough to use this powerful function block only for the commissioning phase and then to replace it with the PID controller. The reactions of the control loop (controlled variable) can normally be recorded by abruptly changing the manipulated variable (transfer function). The self-regulation and delay times so determined can be used to calculate suitable, rule-of-thumb parameters. When selecting the best parameters, it should be borne in mind whether the control loop will have to compensate more for disturbance variables or more for changes in the setpoint (termed fixed setpoint control or sequential value control). The control behaviour can be further improved by including the disturbance variables in the control process. An interference value can either be directly measured, or it can be correlated with a measurable state of the process. If the characteristics of the control system change (mass, volume, thermal properties, etc.), the control parameters can be seamlessly adapted via a fuzzy function block, or in the simplest of cases a second set of parameters can be selected. Autotuning the PID controller Autotuning, i.e. the automatic determination of control parameters by the PLC program, is suitable for PTn loops. At the beginning of the autotuning process, a manipulated variable is given a stepped change, and the response from the control loop is then evaluated using the inflectional-tangent method. The actual value reaches the setpoint by setting parameters in the PID controller. After this the final parameters are set for the PID controller. Simulations often make sense Simulations can be set up very quickly for many applications using the RTT. It is therefore to be recommended to first simulate the application in order to test the functionality of the controllers. The following function blocks are especially suited to simulations: Interpolations for implementing any number of characteristics, PTn systems, dead time elements, Ramps, oscillations. Visualisation and setting parameters As a sensible extension of the RTT we recommend the use of a visualisation and parameter setting tool. A maximum range of 32 marker words can be read from the PLC via the Sucom A interface or EPC card, and processed as follows: numerical representation, graphic representation (visualisation) or saving to a file. In addition a maximum range of 32 marker words can be described. This function can be used, for example, for online parameterisation of controllers. Further information on the visualisation and parameterisation tool can be found in the documentation.
Shorten set-up time through tested function blocks Simulations help to test the control design in advance PID controllers set parameters automatically

11

G 2700-2208 GB 03/99

Closed-Loop Control Toolbox APP-RTT-E-GB Designing


Programming to IEC 1131-3 simplifies reuse

Overview of the RTT function blocks The hierarchical, modular structure of the RTT offers the following benefits: Selective testing and optimization of self-contained functions Since function blocks of the upper levels may access function blocks of the lower levels multiple times, relatively small code sizes arise in comparison with non-modular programs Complex algorithms can be implemented very quickly by combining the modular functions. Because only tested function blocks are used, the number of programming errors is relatively low.

Controllers: PI/PID controllers with 12-Bit inputs/outputs PI/PID split-range controllers for heating/cooling PID autotuning controllers PD controllers with 3 step system for opening and closing valves PD controllers with in-line integrator and self-regulation for 4 interference values Two-step controllers, three-step controllers Pulse duration modulation (PDM): PDM with variable duration, suitable for contactors PDM for split-range processes, for contactors PDM to the noise-shape-method, suitable for solid state systems Signal filters, processing, limiting: Limiting function blocks Sensor for absolute limiting and warning values Sensor for relative limiting and warning values Sensors for relative tolerance ranges PT1/PT3 filters for signal smoothing Fuzzy systems: Fuzzy systems with 2 to 4 inputs and 2 to 5 terms (partly REAL data type)

Large selection of function blocks solves most control applications

The basic functions are usually set up for data types Integer and Unsigned Integer. The following function blocks (approx. 100) are available: Basic mathematical functions: Fractions Moving average Sine, cosine and tangent Inverse of sine, cosine and tangent Exponential functions, square roots Other basis function blocks: Interpolation with 2 to 20 X/Y interpolation points Sunrise/sunset data (only for places in Germany) Counters Calculation of average cycle time Automatic constant cycle time Display current/maximum cycle time Simulation: PTN control systems with input of system order/system parameters Basic function blocks of closed-loop control technology Scanning time generator Differentiation, integration Proportional amplification Ramp function Triangular/sinewave/sawtooth oscillation Hysteresis element, threshold value Splitting of a bipolar input value Dead time delay Delay system 1. to 10. order Setting procedure for PID controllers

Moeller GmbH Hein-Moeller-Str. 7 11 53115 Bonn, Germany

e-mail: info@moeller.net Internet: http://www.moeller.net G 2700-2208 GB 03/99 M/KI

1999 by Moeller GmbH Subject to alterations Printed in the Federal Republic of Germany (06/99)

Das könnte Ihnen auch gefallen