44364150 Pulse Width Modulation En

24
  Applikationen & Tools  Answers for industry. Cover Configurating of Continuous Control with Pulse Width Modulation SIMATIC PCS 7 Application Note August 2010

Transcript of 44364150 Pulse Width Modulation En

Page 1: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 1/24

 

 Applikationen & Tools Answers for industry.

Cover 

Configurating of Continuous Controlwith Pulse Width Modulation

SIMATIC PCS 7

Application Note August 2010

Page 2: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 2/24

 

2Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

Industry Automation and Drives Technologies Service & Support Portal

This article is taken from the Service Portal of Siemens AG, Industry Automationand Drives Technologies. The following link takes you directly to the downloadpage of this document.

http://support.automation.siemens.com/WW/view/en/44364150 

If you have any questions concerning this document please e-mail us to thefollowing address:

[email protected] 

Page 3: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 3/24

 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 3 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

s

SIMATIC PCS 7

Continuous Control with

Pulse Width Modulation

Indroduction 1 

Configuration 2

 

Simulation Example 3 

Conclusion 4 

Related Literature 5 

History 6 

Page 4: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 4/24

Warranty and Liability

4Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

Warranty and Liability

Note 

The Application Examples are not binding and do not claim to be completeregarding the circuits shown, equipping and any eventuality. The ApplicationExamples do not represent customer-specific solutions. They are only intendedto provide support for typical applications. You are responsible for ensuring thatthe described products are used correctly. These application examples do notrelieve you of the responsibility to use safe practices in application, installation,operation and maintenance. When using these Application Examples, yourecognize that we cannot be made liable for any damage/claims beyond theliability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice.If there are any deviations between the recommendations provided in theseapplication examples and other Siemens publications – e.g. Catalogs – thecontents of the other documents have priority. 

We do not accept any liability for the information contained in this document.

 Any claims against us – based on whatever legal reason – resulting from the use ofthe examples, information, programs, engineering and performance data etc.,described in this Application Example shall be excluded. Such an exclusion shallnot apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,body or health, guarantee for the quality of a product, fraudulent concealment of adeficiency or breach of a condition which goes to the root of the contract(“wesentliche Vertragspflichten”). The damages for a breach of a substantialcontractual obligation are, however, limited to the foreseeable damage, typical forthe type of contract, except in the event of intent or gross negligence or injury to

life, body or health. The above provisions do not imply a change of the burden ofproof to your detriment.

 Any form of duplication or distribution of these Application Examples or excerptshereof is prohibited without the expressed consent of Siemens Industry Sector.

Page 5: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 5/24

Preface

 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 5 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

   4   4   3   6   4   1   5   0

_   P  u

   l  s  e

_   W   i   d   t   h

_   M  o

   d  u

   l  a   t   i  o  n

_  e  n .   d

  o  c

 

Preface

Objective of the Application

 A continuous control loop with pulse width modulation consists of a conventional

PID controller and a pulse modulation function. The pulse generator block modifiesthe analogous manipulated variable signal of the controller into a sequence ofdigital pulses with pulse length (or pulse/break ratio) equivalent to the analogousmanipulated variable. This configuration is applied for switching actuators (e.g.heating on/off or valve open/close).

This use case has to be distinguished from step controllers. A step controller isapplied for integrating actuators (e.g. motor driven valves) commanded by binaryoutput signals open/stop/close. The function blocks PIDStepL or CTRL_S for stepcontrollers are available in the Advanced Process Library or in the PCS 7 StandardLibrary, whereas a pulse generator function block does not exist in the PCSlibraries. The function block PULSEGEN is provided only in the CFC-LibraryELEM_400.

The project example on hand shows the application of a continuous controller withpulse width modulation to a simulated plant. The target of the application isshowing the aspects of engineering and commissioning of controllers with pulsewidth modulation that are particularly important in industrial applications, in order toachieve fast dynamics and proper operation in all operation modes.

Main Contents of this Application Note

The following issues are discussed in this application note:

•  Interaction of a continuous controller and pulse width modulation with regard tocontroller tuning, parameter specification and choice of the sampling time.

•  Interaction of a continuous controller and pulse width modulation with respectto mode switch over.

•  Simulation example.

Validity

… valid for PCS 7 V7.1, in principal transferable to V7.0 from SP1.

Page 6: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 6/24

Table of Contents

6Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

Table of ContentsWarranty and Liability ................................................................................................. 4 

Preface.......................................................................................................................... 5 

Introduction........................................................................................................ 7 

1.1  Basic Principles of Control with Pulse Width Modulation..................... 7 

1.2  Sample Rates, Pulse Time and Control Precision ............................... 9 

1.3   Application Examples........................................................................... 9 

1.3.1  Two-step Control with Unipolar MV Range (0% ... +100%)................. 9 

1.3.2  Three-step Control with Two Binary Actuators .................................... 9 

1.3.3  Two-step Controller with Bipolar MV Range (-100% ... +100%)........ 10 

2  Configuration ................................................................................................... 11 

2.1  Creating an Instance of the Process Tag Type.................................. 11 

2.2  Insert the Pulse Width Modulation Block............................................ 12 

2.3  Simulation for Controllers with Pulse Width Modulation .................... 16 

2.4 

Two-step or Three-step Control ......................................................... 16 

2.5 

Synchronization of Controller and Pulse Generator Block................. 16 

2.6  Parameterization and Controller settings........................................... 17 

2.7  Control Performance Monitoring ........................................................ 18 

3  Simulation Example......................................................................................... 19 

4  Conclusion ....................................................................................................... 22 

5  Related Literature ............................................................................................ 23 

6  History............................................................................................................... 24 

Page 7: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 7/24

1 Introduction

1.1 Basic Principles of Control with Pulse Width Modulation 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 7 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

1 Introduction 

1.1 Basic Principles of Control with Pulse Width

Modulation

 A continuous control with pulse width modulation consists of a controller (e.g. PID-controller) whose manipulated variable is an analogous value (e.g. 0….100%) anda downstream pulse width modulation which generates a sequence of binarypulses (e.g. on/off) from the continuous manipulated variable. This type of thecontrollers is used for switching actuators e.g. for the temperature control of aboiler with a burner which can be only turned on or off.

The pulse time (relative to the total time period of pulse and pause time) isproportional to the analogous manipulated variable. Examples:

•  Manipulated variable 100% means permanent impulse, i.e. always “on”, or

maximum heating power.

•  Manipulated variable 50%: For the half of a defined time period the signal is„on“ and for the other half time the signal is “off”, i.e. half heating power intemporal average.

PID

controlle

pulse width

modulation

controlled system

setpoint

processvariable

+-   PID

controlle

pulse width

modulation

controlled system

setpoint

processvariable

+-

 

Figure 1-1: Signal flow scheme of a control loop with pulse width modulation

Page 8: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 8/24

1 Introduction

1.1 Basic Principles of Control with Pulse Width Modulation 

8Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 1-2: Example of pulse width modulation

NOTE Pulse sequence (black) for manipulated variable (blue) 20, 50 und 80%. With anincreasing manipulated variable the pulse/ break ratio increases accordingly; forsmall manipulated variable values the breaks are dominant, for largermanipulated variable values the pulses are dominant.

Page 9: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 9/24

1 Introduction

1.2 Sample Rates, Pulse Time and Control Precision 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 9 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

1.2 Sample Rates, Pulse Time and Control Precision

The controller calculates a suitable manipulated variable at every sample time.These manipulated variable values are converted by the pulse generator into

impulses with a specified width. Therefore it makes sense to calculate a newmanipulated variable only after the time of the maximum pulse length (pulse periodtime) has passed. To reach a good resolution of the pulse duration (with respect toamplitude quantization), the sample rate of the pulse generator must be muchsmaller than that one of the controller.

Example

The sample time of the controller is fixed to 5s, the maximum pulse width (pulseperiod time) is therefore 5s. If the pulse generator is running with a sample time of0.5s the pulse width can be determined in a grid of 0.5s mesh size, which means in10% steps of the manipulated variable. If the pulse width modulator is executed ina cycle of 0.1s, the resolution is 2%.

This amplitude quantization (resolution) of the manipulated variable hasconsequences for the feasible control precision. Only stationary process valueswhich fall into the manipulated variable grid multiplied with the controlled systemgain can be reached exactly. Assuming a controlled system gain of 5°C/% in theabove example this would be a grid resolution of:

2% * 5°C/%=10°C.

Setpoints which do not fit into this grid cannot be reached precisely and therefore acontinuous oscillation of the process variable around the setpoint occurs. In case ofrelaxed requirements with respect to control precision the oscillation can beprevented by a dead band around the setpoint. The dead band must be largeenough such that the process value can find a value of its grid steps within the

dead zone. In the example a dead band of ±5° degrees Celsius would benecessary. If the dead band is smaller, a continuous oscillation around the deadband arises.

1.3 Application Examples

Different classes of application examples can be distinguishing depending on thedirection of action of the actuator (or the actuators).

1.3.1 Two-step Control with Unipolar MV Range (0% ... +100%)

•  Temperature control with gas burner on/off

•  Temperature control with electrical heating on/off (by contactor or semi-conductor relay)

•  Flow control with switching valve open/close or pump on/off

Generally, you will find binary actuator devices like electrical heatings or switchingvalves in smaller plants e.g. in the laboratory area, in bio process engineering(fermenter) or in the pharmaceutical industry. Switching valves are not common forlarger pipe diameters, and larger units (reactors or columns) are rather heated withsteam than with electricity.

1.3.2 Three-step Control with Two Binary Actuators

•  Temperature control with heating (e.g. electrical heating on/off) and cooling(e.g. switching valve for cooling water inlet open/close or cooling fan on/off)

Page 10: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 10/24

1 Introduction

1.3 Application Examples 

10Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

•  pH-value control with two switching valves open/close for the feed of acid andbase

•  Pressure control with two switching valves open/close for the gas inlet (e.g.inert gas) and purge outlet of the unit.

In these cases the pulse generator includes the function of a split-range block thatsplits the manipulated variable of the controller into two actuators with oppositedirection of  action.

Figure 1-3: PCS 7 automation of a fermenter for recombinated proteins for vaccine production.

NOTE Both the pH-value control QIC300 and the temperature control TIC500 work asthree-step controllers with pulse width modulation.

1.3.3 Two-step Controller with Bipolar MV Range (-100% ... +100%)

This configuration makes only sense if there is a binary actuator whose outputsignal TRUE takes a physical effect into one direction, and the output signalFALSE takes a physical effect in the opposite direction. This means that thecontroller does not have any possibility of really forwarding the MV value zero tothe process. Although the function block PULSGEN provides this possibility, it israrely used in practice.

Page 11: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 11/24

2 Configuration

2.1 Creating an Instance of the Process Tag Type 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 11 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

2 ConfigurationIf you implement a new continuous control with pulse width modulation in yourproject, it is recommended start with a process tag type of a continuous controller

e.g. “PIDConL_ConPerMon" from the Advanced Process Library.

2.1 Creating an Instance of the Process Tag Type

The following steps are carried out for the continuous control with pulse widthmodulation in the same way as for any other process tag type.

Open the Advanced Process Library with SIMATIC-Manager: Openproject/Library/PCS 7 AP Library V71.

Figure 2-1: Open the “PCS 7 AP Library V71“

Copy the process tag type “PIDConL_PreM…” from the subfolder “Templates” intothe master data library of your PCS 7 multiproject and modify it if necessaryaccording to your general application requirements.

Page 12: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 12/24

2 Configuration

2.2 Insert the Pulse Width Modulation Block 

12Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 2-2 Selection of process tag type

Copy the process tag type from the master data library to the application part<project name>_Prj of your multiproject, in the appropriate target folder (Processcell/Unit etc.) in the plant view. You obtain an instance of the process tag type i.e. aCFC chart, which indicates its origin by its symbolic representation.

Rename the new CFC chart and check if the cyclic interrupt OB is correct (in the

CFC chart “Edit”/”Open run sequence”).If you need several controllers with pulse width modulation in your project it isrecommended to build your own process tag type for a controller with pulse widthmodulation, by realizing the modifications described in the next section inside themaster data library of your multiproject.

2.2 Insert the Pulse Width Modulation Block

Delete the analogous output driver block „MV“ and the blocks for the simulation„ProcSim“ und „ProcGain“ from the CFC und move the block „PIC_cpm“ to anotherpage of the CFC.

NOTE If you don’t care for testing the effects of pulse width modulation in simulationswithout process interaction, and you have to save CPU memory, you can staywith the simple simulation of the original process tag type.

Page 13: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 13/24

2 Configuration

2.2 Insert the Pulse Width Modulation Block 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 13 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 2-3: Delete the analogous driver block MV, block type Pcs7AnOut

Select the function block "PULSEGEN" from the CFC Library "ELEM_400" anddrop it into your CFC. PULSEGEN is not part of the Advanced Process Library,therefore its input and output variables are not data structures with value andstatus, but ordinary real variables. Therefore you might need conversion blockswhich split a data structure into elementary data types. The connection can becarried out directly with CFC V 7.1.1 or later versions, because then the CFC splitsthe data structures automatically. In addition, you need a digital output driver block"Pcs7DiOu" which connects to the periphery.

The manipulated variable output PID.MV of the controller is linked (with or withoutconverter) to the input variable PULSEGEN.INV of the pulse generator.

The output PULSEGEN.QPOS gets connected to the input PV_In of the digitaloutput driver PCS7DiOut.

Page 14: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 14/24

2 Configuration

2.2 Insert the Pulse Width Modulation Block 

14Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 2-4: Selection of the pulse generator function block „PULSEGEN“ from the CFC Library„ELEM_400”

Page 15: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 15/24

2 Configuration

2.2 Insert the Pulse Width Modulation Block 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 15 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 2-5: CFC-chart with pulse width modulation and simulation of the controlled system

Page 16: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 16/24

2 Configuration

2.3 Simulation for Controllers with Pulse Width Modulation 

16Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

NOTE You see that the blocks are located in different cyclic tasks (OB32, OB35), c.f.section 2.6 

2.3 Simulation for Controllers with Pulse Width Modulation

 As a simulation environment for testing the pulse width modulation a copy of thetemperature controlled system for cascade control can be used.

The output QPOS of the bock PULSEGEN is connected to the input K of theswitching block SEL. If QPOS =1 the value 100 ("maximum heating power") isforwarded to the input MV of the controlled system model (TempProc101). If QPOS= 0 the input MV is zero. Due to the inertia of the temperature controlled system aprocess value which corresponds to the temporal average value of the impulses isreached. The output Out of the controlled system model is connected to thesimulation input SimPV_In of the driver block Pcs7AnIn for the controlled variable.

2.4 Two-step or Three-step Control

Depending on the parameterization of the pulse generator the PID loop can beconfigured with three-step or with two-step unipolar or bipolar behaviour, seeapplication examples in section 1.3.

Table 2-1: Configuration of the pulse generator PULSEGEN

Configuration STEP3_ON ST2BI_ON

Tree-step Control TRUE any

Two-step Control with bipolar MV range

(-100% ... +100%)

FALSE TRUE

Two-step Control with unipolar MV range(0% ... +100%)

FALSE FALSE

2.5 Synchronization of Controller and Pulse GeneratorBlock

 A special feature of the pulse generator function block PULSEGEN is theopportunity to perform an automatic synchronization, if selected byparameterization.

The pulse generator evaluates the input INV in intervals of the pulse period time

PER_TM and transforms the value into an impulse signal with the correspondingpulse-to-break ratio. This means that variations of the input INV usually only takeeffect in the next pulse period (c.f. also Figure 2-6).

On the other hand, the automatic synchronization "SYN_ON" (= TRUE) causes are-calculation of the pulse duration as soon as the manipulated variable (input INV)changes its value. This way it is ensured that any variation of an input value isforwarded to the process as a pulse as quickly as possible, even if the controller isrunning in a faster cycle than the pulse period time PER_TM.

With this feature the continuous oscillation of the process variable will be reduced.However the process value is achieved with a smaller fictitious manipulatedvariable, since the pulse length is calculated more frequently and the completelength of pulse and break is not reached. If e.g. you synchronize in the cycle of 1

sec at a maximum pulse length of 2 sec and the controller demands an MV valueof 50%, that means the impulse duration would be 1 sec and afterwards the break

Page 17: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 17/24

2 Configuration

2.6 Parameterization and Controller settings 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 17 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

would be 1 sec, too. Due to the new synchronization after 1 sec, the break cannotbe kept because the pulse length is re-calculated and forwarded again now. Theprocess variable is getting larger therefore and the controller fights against it,commanding a smaller manipulated variable. The constant pulse period time and

therefore the reproducible relationship between analogous manipulated variableand pulse/break ratio is lost. The disadvantage comes to light when the controller isswitched from automatic mode to manual mode keeping the last MV valueconstant. Since the manipulated variable does not change its value any more thereis no new synchronization and the original pulse period is active again. Theconsequence is that the actual value runs away. Therefore the automaticsynchronization should normally remain switched off (input "SYN_ON" = FALSE) toguarantee the clear interpretability of the analogous manipulated variable and thecorrect function of the manual/automatic mode switchover.

2.6 Parameterization and Controller settings

QPOS_P

P_B_TM

PER_TM

Sam leTime  

Figure 2-6: Cycles of pulse generator operation.

NOTE Binary output signal QPOS_P, minimum pulse/break time P_B_TM, pulse periodtime PER_TM. The controller cycle SampleTime is double frequency comparedto pulse period time in that example.

Parameterize the pulse generator first and then the controller.

•  The minimum pulse/break time P_B_TM corresponds to the speed of theactuator. It must be long enough such that a pulse of minimal length can

actually be realized by the actuator (and the digital periphery). For semi-conductor relays minimum pulse times of milliseconds are feasible while forswitching valves the minimum pulse times are in the order of seconds,depending on pipe diameter.

•  The cycle time of the pulse generator and all down stream function blocks mustbe less or equal to the minimum pulse/break time, such that pulses of minimallength can really be created and forwarded to the process. Please move therespective function blocks into the suitable OB-Cycle in the CFC.

•  Set the pulse period time PER_TM larger than the minimum pulse/break timeat least by a factor of 20 (for 5% quantization of the manipulated variable) until

a factor of 100 (for 1% quantization of the manipulated variable).

Page 18: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 18/24

2 Configuration

2.7 Control Performance Monitoring 

18Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

•  Set the cycle time for the controller equal to the pulse period time such thateach single MV value calculated by the controller can be converted into asuitable pulse sequence within one sampling cycle. Anyway the controllersample rate must be fast enough for the process dynamics. If the cycle time

according to the pulse period seems to be too long in terms of operability, youcan use shorter controller cycles, if you accept that the MV values areforwarded at the beginning of the next pulse period or that the synchronizationeffects discussed in section 2.5 appear.

 Afterwards the controller tuning can be carried out with the PCS 7 PID Tuner asusual. While setting manipulated variable steps take care that they are integermultiples of the manipulated variable quantization, such that the specifications canbe precisely transformed into pulse sequences.

Example

 An MV step from 20 to 30% is better than a step from 21.5 to 32.6%.

With the process gain calculated by the PID tuner and the manipulated variable

quantization produced by the pulse generator, the stationary precision of thecontrol loop can be predicted:

Tip process variable quantization =

manipulated variable quantization * process gain.

Finally set the dead band of the controller:

Tip DeadBand >= 0.5* process variable quantization

2.7 Control Performance Monitoring

The feasible control performance (variance of the process variable) in the sense ofcontrol performance monitoring depends on the parameterization of the pulsegenerator. Therefore keep the following order for commissioning:

1. Parameterization of the pulse generator

2. PID-Tuning

3. Initialization of the ConPerMon block

Nevertheless control performance monitoring is made difficult by pulse generationdue to the amplitude quantization of the manipulated variable. The working motion

(oscillation) shown in section 3 increases the variance of the process variable andcorrupts the control quality – for all setpoints that do not by chance fit into a gridpoint of the amplitude quantization. Therefore the control quality becomes setpointdependent.

By the specification of a dead band the working motion and the associated variance of the controlled variable are avoided at the expense of a permanentcontrol error. Therefore the ConPerMon function block does not recognize the newsteady state after a setpoint step automatically and the step evaluation must bestopped by mouse click in the faceplate, before the CPI can be updated again.

Page 19: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 19/24

3 Simulation Example

 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 19 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

3 Simulation Example

Temperature Control of a Boiler by Switching the Burner On/Off

There is no simulation example for continuous control with pulse width modulationin the APL_Example_EU. You can modify the "plant unit" for the simple controlsystem with ConPerMon according to chapter 2 to create the simulation of atemperature control system with pulse width modulation.

The following controlled system parameters are used.

Table 3-1: Process parameters of the modified example project

ProcSimC Temperature controlled system

Gain 1.2

TimeLag1 40s

TimeLag2 10sPV0 20

Noise Variance 0

SampleTime 0.1s

Table 3-2: PULSEGEN Parameters

PULSEGEN

PER_TM 2s

P_B_TM 0.1s

SampleTime 0.1s

The controller parameters are calculated by the PID-Tuner:

Table 3-3: Parameters for PI controller

PID

Gain 0.58

TI 25s

TD -

DeadBand 0

SampleTime 2s

The specified parameters of the pulse generator result in an MV quantization of5%. In the context of a controlled system gain of 1.2 [°C/%] this makes a processvariable grid of 6° mesh size. I.e. only setpoint temperatures divisible by 6 aftersubtracting the offset of 20°C can be reached exactly. At any other setpointcontinuous oscillations around the setpoint will occur in steady state.

Page 20: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 20/24

3 Simulation Example

20Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d  

Figure 3-1: Small continuous oscillation around the setpoint 40° C

The continuous oscillation around the set-point can be prevented by the activation

of a dead band. In this example a dead band of ±3°C degrees must be chosensuch that it has a width of 6°. The process value then settles at a steady stateexactly at this grid point which lies within the dead band, i.e. the actual value does

not reach the setpoint exactly.

Page 21: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 21/24

3 Simulation Example

 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 21 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

 

Figure 3-2: Setpoint

NOTE Setpoint step from 40 to 83°C with a controller dead band ±3°C. The processvariable reaches the steady state at 80°C, because (80-20)=60 is divisible by 6,i.e. this is a grid point

Page 22: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 22/24

4 Conclusion

22Continuous Control with Pulse Width Modulation

Version 1.0, Entrys-ID: 44364150

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

4 ConclusionControllers with pulse width modulation are suitable for systems with switchingactuators. Although there is no pulse generator block in the PCS 7 libraries, the

PULSEGEN block from the CFC-Library ELEM_400 can be used.You must find a compromise between the stationary precision of a control loop andthe pulse period time at given minimum pulse/break time. A long pulse period timemeans high accuracy but accordingly slow controller sample time. Shorter pulseperiod times reduce control precision due to the coarse manipulated variablequantization and require adequate wide dead bands of the controller.

The combination of pulse generator and digital output driver replaces theanalogous output driver of the controller, independently of the kind of controllertype that is used. A pulse generator can therefore be connected to a predictivecontroller (MPC) just as well as to a PID controller, and is also compatible withextended PID structures (e.g. Gain scheduling, Override, disturbance variable feed-forward, ratio control).

 A split range function can be connected to any continuous controller to split themanipulated variable of the controller into two actuators with an opposite directionof action. If the actuators are binary actors, the function block PULSEGEN alsoincludes a split range function.

Special Cases

•  In cascade control loops the pulse generator is of course only relevant for theslave controller.

•  In a Smith predictor the controller internal process model should be suppliedwith the analogous output signal of the controller block. The analogous outputsignal of the controller is also used by the MPC configurator for modelling fromlearning data such that the behaviour of the process incl. pulse generator is

identified and mapped into the model.

Page 23: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 23/24

5 Related Literature

 

Continuous Control with Pulse Width ModulationVersion 1.0, Entry-ID: 44364150 23 

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

5 Related LiteratureThis list is not complete and only represents a selection of relevant literature.

Table 5-1

Title

/1/ Controlling with Simatic – Practise Book for Simatic S7 and PCS7 Control Systems.Müller, J., Neumann, F., Pfeiffer, B-M.Publicis Corporate Publishing, Erlangen, 2005.ISBN 3-89578-255-6

/2/ Online helpPCS 7 Advanced Process LibraryChapter Templates/process tag types.

Page 24: 44364150 Pulse Width Modulation En

7/21/2019 44364150 Pulse Width Modulation En

http://slidepdf.com/reader/full/44364150-pulse-width-modulation-en 24/24

6 History

   C  o  p  y  r   i  g

   h   t     ©

    S   i  e  m  e  n  s

   A   G   2   0   1   0   A   l   l  r   i  g

   h   t  s  r  e  s  e  r  v  e

   d

6 HistoryTable 6-1

Version Date Modifications

V1.0 August 2010 First version