AT.215.EN - Lecture Notes
AT.215.EN - Lecture Notes
Automation Engineering
Version 3.0.en
Foreword
This book will examine the foundations of automation engineering in a world increasingly
focused on the development and implementation of automation. It will provide the reader with an
understanding of the key principles and components of automation engineering and how these
principles can then be combined and implemented in a real industrial system to provide safe,
economically viable, and efficient systems. Application will focus on a wide range of different
systems including chemical, electrical, and mechanical systems.
At the end of each chapter, questions testing the reader’s understanding of the material
presented as well as providing places for extension and deeper understanding of the topics at hand
are given.
In order to clearly differentiate between regular text and computer-related symbols, the font
“Courier New” is used for all computer-related symbols.
This book is meant to be used as the course material for an introductory, bachelor’s-level
course in automation engineering. It is possible to present different permutations and combinations
of the material depending on what topics are of interest to the particular students.
Computer files and related material can be downloaded from the book website (please
insert the appropriate book website once the book has been published).
The authors would like to thank Ying Deng and M.P. for their help in preparing some of
the material used in this book.
i
Table of Contents
Foreword i
Chapter 1 : Introduction to Automation Engineering 15
Section 1.1 : The History of Automation Engineering 15
Section 1.2 : The Key Concepts in Automation Engineering 19
Section 1.3 : Automation Engineering Framework 23
Section 1.4 : The Automation Engineering Pyramid 23
Section 1.5 : Chapter Problems 25
Section 1.5.1 : Basic Concepts 25
Section 1.5.2 : Short Exercises 26
Chapter 2 : Instrumentation and Signals 28
Section 2.1 : Types of Signals 28
Section 2.2 : Sensors 31
Section 2.2.1 : Pressure Sensor 33
Section 2.2.2 : Liquid Level Sensors 33
Section 2.2.3 : Flow Sensors 34
Section 2.2.4 : Temperature Sensors 35
Section 2.2.5 : Concentration, Density, Moisture, and Other Physical Property Sensors 36
Section 2.3 : Actuators 36
Section 2.3.1 : Valves 37
Section 2.3.2 : Pumps 41
Section 2.3.3 : Variable Current Devices 43
Section 2.4 : Programmable Logic Computer (PLCs) 43
Section 2.5 : Communication Devices 48
Section 2.6 : Chapter Problems 50
Section 2.6.1 : Basic Concepts 50
Section 2.6.2 : Short Questions 51
Chapter 3 : Describing a Process 53
Section 3.1 : Mathematical Representation of a Process 53
ii
Section 3.1.1 : Time- and Frequency-Based Models 53
Section 3.2 : Frequency Domain Transformations: Laplace and Z-Transforms 63
Section 3.2.1 : Laplace Transform 64
Section 3.2.2 : Z-Transform 68
Section 3.3 : Process Analysis 71
Section 3.3.1 : Frequency-Domain Analysis 75
Section 3.3.2 : Stability 78
Section 3.3.3 : Controllability and Observability 89
Section 3.3.4 : Analysis of Special Transfer Functions 91
Section 3.4 : Event-Based Representations 114
Section 3.5 : Schematic Representation of a Process 127
Section 3.5.1 : Block Diagrams 127
Section 3.5.2 : Process Flow Diagrams 130
Section 3.5.3 : Piping and Instrumentation Diagrams 131
Section 3.6 : Chapter Problems 143
Section 3.6.1 : Basic Concepts 143
Section 3.6.2 : Short Questions 145
Section 3.6.3 : Computational Exercises 156
Chapter 4 : Control and Automation Strategies 157
Section 4.1 : Open-Loop and Closed-Loop Control 158
Section 4.1.1 : Open-Loop Control 158
Section 4.1.2 : Closed-Loop Control 160
Section 4.2 : Feedforward Control 182
Section 4.3 : Discrete Event Control 186
Section 4.4 : Supervisory Control 187
Section 4.4.1 : Cascade Control 187
Section 4.4.2 : Model Predictive Control 188
Section 4.5 : Advanced Control Strategies 193
Section 4.6 : Chapter Problems 196
Section 4.6.1 : Basic Concepts 196
Section 4.6.2 : Short Questions 197
iii
Chapter 5 : Boolean Algebra 200
Section 5.1 : Boolean Operators 200
Section 5.2 : Boolean Axioms and Theorems 201
Section 5.3 : Boolean Functions 202
Section 5.3.1 : Sum-of-Products Form and Minterms 203
Section 5.3.2 : Product-of-Sums Form and Maxterms 205
Section 5.3.3 : Don’t Care Values 207
Section 5.3.4 : Duality 208
Section 5.4 : Minimising a Boolean Function 208
Section 5.4.1 : Karnaugh Map 209
Section 5.5 : Chapter Problems 217
Section 5.5.1 : Basic Concepts 217
Section 5.5.2 : Short Questions 218
Chapter 6 : PLC Programming 220
Section 6.1 : The Common IEC Standard Hierarchy 220
Section 6.2 : Types of Variables 223
Section 6.3 : Variables, Data Types, and Other Common Elements 224
Section 6.3.1 : Simple Elements 225
Section 6.3.2 : Variables 234
Section 6.3.3 : Data Types 234
Section 6.4 : Ladder Logic 238
Section 6.4.1 : Components of Ladder Logic 238
Section 6.4.2 : Functions and Ladder Logic 241
Section 6.4.3 : Examples of Using Ladder Logic 242
Section 6.4.4 : Comments 245
Section 6.5 : Instruction List 245
Section 6.5.1 : Universal Accumulator 246
Section 6.5.2 : Operators 247
Section 6.5.3 : Functions in Instruction List 248
Section 6.5.4 : Calling Function Blocks in Instruction List 249
Section 6.5.5 : Examples 250
iv
Section 6.5.6 : Comments 251
Section 6.6 : Function Block Language 252
Section 6.6.1 : Blocks used in the Function Block Language 252
Section 6.6.2 : Feedback Variable 254
Section 6.6.3 : Example 255
Section 6.6.4 : Comments 256
Section 6.7 : Structured Text 256
Section 6.7.1 : Commands in Structured Text 257
Section 6.7.2 : Operators in Structured Text 259
Section 6.7.3 : Calling Function Blocks in Structured Text 259
Section 6.7.4 : Example 259
Section 6.7.5 : Comments 262
Section 6.8 : Sequential Function Chart Language 262
Section 6.8.1 : Steps and Transitions 262
Section 6.8.2 : Action Blocks 265
Section 6.8.3 : Sequential Function Charts 266
Section 6.8.4 : Example 269
Section 6.8.5 : Validity of a Sequential Function Chart 275
Section 6.9 : Chapter Problems 278
Section 6.9.1 : Basic Concepts 278
Section 6.9.2 : Short Questions 279
Section 6.9.3 : Computational Exercises 284
Chapter 7 : Safety in the Automation Industry 285
Section 7.1 : Safety of the Physical System 285
Section 7.1.1 : Quantifying Risk and the Safety Integrity Level 287
Section 7.2 : Safety Regulations 289
Section 7.3 : Digital Safety 290
Section 7.4 : Chapter Problems 291
Section 7.4.1 : Basic Concepts 291
Section 7.4.2 : Short Questions 292
Chapter 8 : English-German and German-English Glossary 294
v
Section 8.1 : English-German Glossary 294
Section 8.2 : German-English Glossary 304
Bibliography 305
Appendix I : Partial Fractioning 306
vi
List of Figures
Figure 1: Automation engineering in the time of the ancient Greeks: (left) Æolipile (steam engine)
and (right) Automated temple door opening device 17
Figure 2: Watt governor 17
Figure 3: A system in automation engineering 20
Figure 4: General structure of an automated system 22
Figure 5: A description of the components of the automation engineering pyramid 25
Figure 6: A timing diagram for two binary signals A and B 29
Figure 7: Continuous and discrete signals 30
Figure 8: Typical Calibration Curve 32
Figure 9: Pneumatically Actuated Control Valve (air-to-close) 38
Figure 10: Inherent valve characteristics 40
Figure 11: Phase plot for the typical behaviour of a valve with stiction (after (Shoukat Choudhury,
Thornhill, & Shah, 2005)). The arrows show the direction in which the values were
changed. 41
Figure 12: Typical pump characteristic curve for a centrifugal pump 43
Figure 13: Layout of a PLC 45
Figure 14: Pre-emptive and nonpre-emptive tasks 48
Figure 15: Determining the Settling Time 73
Figure 16: Bode Plot: The Argument Ratio and Phase Angle Plots 77
Figure 17: A Nyquist Plot 78
Figure 18: Bode Plot for Closed-Loop Stability Analysis 88
Figure 19: Closed-loop stability using the Bode plot 89
Figure 20: Closed-loop stability using the Nyquist plot 89
Figure 21: Response of the Integrator 1 / s to a Unit Step Input 93
Figure 22: Bode Plot for an Integrator 93
Figure 23: Bode Plot for a Lead Term (top row) K > 0, (bottom row) K < 0, (left) τL > 0, and (right)
τL < 0 96
Figure 24: Step Response of a Stable, First-Order System to a Step Response 99
vii
Figure 25: Bode Plot for a First-Order System (top row) K > 0, (bottom row) K < 0, (left) τp > 0,
and (right) τp < 0 100
Figure 26: Second-Order Underdamped Process 102
Figure 27: Step Response of a Critically Damped System (ζ = 1, τp = 10, and K = 1) 103
Figure 28: Step Response of an Overdamped System (ζ = 2, τp = 5, and K = 1) 104
Figure 29: Bode Plots for τp = 5, (top) ζ = 0.5, (middle) ζ = 1, (bottom) ζ = 2; (left) K = 1 and
(right) K = -1 107
Figure 30: Step Response of a Second-Order System with Inverse Response 108
Figure 31: Bode Plots for (left) τL = -5, (right) τL = 5, and (top) ζ = 0.5 and (bottom) ζ = 2 108
Figure 32: Sketch of the Transfer Function Step Responses: (left) first transfer function, (middle)
second transfer function, and (right) third transfer function. 110
Figure 33: Graphical Representation of an Automaton 116
Figure 34: Automaton for the example 117
Figure 35: Automaton 119
Figure 36: The Trimmed Automaton 121
Figure 37: G1 122
Figure 38: G2 123
Figure 39: The product of G1 and G2 123
Figure 40: The parallel composition of G1 and G2 125
Figure 41: Timed Automaton 126
Figure 42: The basic block diagram 127
Figure 43: Summation block: (top) full form and (bottom) short-hand equivalent 128
Figure 44: Block diagram algebra 129
Figure 45: Generic closed-loop, feedback control system 129
Figure 46: Process Flow Diagram for Alkylate Splitter (picture taken from (Ulrich & Vasudevan,
2004)) 131
Figure 47: P&ID for a Gas Chilling and Separation Plant According to Canadian Design Standards
(Note the engineering stamp in the bottom middle box.) 132
Figure 48: Fields in a P&ID Label 139
Figure 49: Automata for Questions 51 and 52 149
Figure 50: Automata for Questions 53 150
viii
Figure 51: Block Diagrams for Question 55 151
Figure 52: Sketch of Process Flow Diagram for Question 57 153
Figure 53: P&IDs for Question 58 154
Figure 54: P&ID for Question 59 155
Figure 55: P&ID for Question 60 155
Figure 56: Maple Syrup P&ID for Question 61 156
Figure 57: Open-Loop Control 158
Figure 58: Open-Loop Control for the Temperature in the House (translated from
https://www.haustechnikverstehen.de/der-unterschied-zwischen-steuerung-und-
regelung/) 159
Figure 59: Closed-Loop Control 160
Figure 60: Closed-Loop Control of the House Temperature (translated from
https://www.haustechnikverstehen.de/der-unterschied-zwischen-steuerung-und-
regelung/) 161
Figure 61: State-feedback control 163
Figure 62: Effect of Changing KC for a P-Controller 167
Figure 63: Integral Windup 168
Figure 64: Effect of Changing τI for a I-Controller. The dashed line is the setpoint. 169
Figure 65: Jitter when using a derivative term 171
Figure 66: Derivative Kick 171
Figure 67: Effect of Changing τD for a D-Controller 172
Figure 68: Controller Tuning Workflow 175
Figure 69: Closed-Loop Performance of the PI Controller 179
Figure 70: Measures of Servo Control Performance 181
Figure 71: Block Diagram for Feedforward Control 182
Figure 72: Effect of Feedforward Control on a Process 185
Figure 73: Block Diagram for Cascade Control 188
Figure 74: Block Diagram for Smith Predictor Control 194
Figure 75: Karnaugh map for the function F = B′ 209
Figure 76: Karnaugh map for the function F = Σm(0, 3, 5) 210
Figure 77: Karnaugh map for the function F = A′BD + B′C′D′ + C 211
ix
Figure 78: Karnaugh map for the function F = ΠM(2, 5, 7, 9, 13, 15, 16, 17, 18,
20, 24, 25, 27) 212
Figure 79: Prime implicant and implicant 214
Figure 80: Karnaugh map for Example 37 214
Figure 81: Procedure for minimising a Karnaugh map 216
Figure 82: Karnaugh map for Question 27 219
Figure 83: Visual representation of a configuration 222
Figure 84: Pre-emptive and nonpre-emptive tasks 223
Figure 85: (top) AND and (bottom) OR in ladder logic 241
Figure 86: Calling a function in ladder logic 242
Figure 87: Ladder Logic for Example 1Example 38Example 38 243
Figure 88: Ladder Logic for Example 39 245
Figure 89: Function Block Language Diagram 254
Figure 90: Feedback in the Function Block Language 255
Figure 91: Steps in Sequential Function Charts: (left) general step and (right) initial step 263
Figure 92: Transitions Conditions in Different PLC Languages 264
Figure 93: Components of an Action Block: a: Qualifier; b: Action Name; c: Indicator Variable;
d: Process Description 265
Figure 94: Alternative Paths in Sequential Function Charts 267
Figure 95: Usual Decision Order for Alternative Paths in Sequential Function Charts 268
Figure 96: User-Defined Decision Order for Alternative Paths in Sequential Function Charts 268
Figure 97: Parallel Paths in Sequential Function Charts 269
Figure 98: Validity of Sequential Function Charts 280
Figure 99: Stirring Process 281
Figure 100: Washing Machine 282
Figure 101: Ladder Logic 284
Figure 102: Relationship between the parameters and the safety integrity levels 289
Figure 103: P&ID for a Compressor Unit 293
x
List of Tables
Table 1: Thermocouple Types 35
Table 2: Data for creating the valve characterisation curve for Question 34) 52
Table 3: Sensor Calibration Data for Question 35) 52
Table 4: Table of Common Laplace Transforms 65
Table 5: Useful Inverse Laplace Table 66
Table 6: Table of Common z-Transforms 69
Table 7: Useful Inverse Z-Transform Table 70
Table 8: Padé Approximations for the Exponential Function, ez 75
Table 9: Summary of the Stability Conditions for Different Representations and Time Domains
79
Table 10: Graphical Representation of the Different Types of Stability 111
Table 11: Routh Stability Analysis Table 82
Table 12: Routh Array 83
Table 13: Table for the Jury Stability Analysis 84
Table 14: Table for Jury stability 86
Table 15: Basic Information About an Integrator 92
Table 16: Basic Information About a Lead Term 94
Table 17: Basic Information About a First-Order System 98
Table 18: Basic Information About a Secord-Order System 106
Table 19: Component Symbols for P&IDs According to the DIN EN 62424 132
Table 20: Connections Types for P&IDs 137
Table 21: Location Symbols for Sensors 137
Table 22: Type Symbols for Sensors 138
Table 23: PCE Categories 139
Table 24: PCE Processing Categories 140
Table 25: PI controller constants for first-order-plus-deadtime models 178
Table 26: PID controller constants for first-order-plus-deadtime models 178
Table 27: Boolean operators, where a and b are Boolean variables, that is, a, b ∊ 𝔹𝔹 200
Table 28: Delimiters in the IEC standard 225
xi
Table 29: All Keywords in the IEC standard 228
Table 30: Special Strings 232
Table 31: The elementary data types in the IEC 61131-3 Standard. The initial letters in the data
types represent: D = double, L = long, S= short, and U = unsigned. 235
Table 32: Components of Ladder Logic 238
Table 33: Changes in the Current Result for Different Operator Groups 247
Table 34: Operators in Instruction List 247
Table 35: Two Possibilities for Calling the Function LIMIT(MN, IN, MX) 248
Table 36: Three Methods for Calling the Function Block ZEIT1(IN, PT) with output variables
Q and ET. 249
Table 37: Blocks used in the function block language 252
Table 38: Commands in Structured Text 257
Table 39: Operators and their Priority in Structured Text 259
Table 40: Qualifiers in Sequential Function Charts 265
Table 41: I/O for the Washing Machine 282
Table 42: Truth Table I 284
Table 43: Truth Table II 284
List of Examples
Example 1 : Numeric Example of Obtaining a Transfer Function 56
Example 2 : General Univariate Case 57
Example 3 : Multivariate Example 57
Example 4 : Laplace Transform 66
Example 5 : Inverse Laplace Transform 67
Example 6 : Z-Transform 70
Example 7 : Inverse z-Transform 71
Example 8 : Extracting Information from a Transfer Function 75
Example 9 : Determining the Stability of a Transfer Function 79
Example 10 : Determining the Stability of a State-Space Model 80
Example 11 : Example of Routh Stability Analysis 82
xii
Example 12 : Example of Jury Stability Analysis 85
: Sketching the Expected Time-Domain Response 109
Example 13 : Automaton for a Process 116
Example 14 : Blocking in an Automaton 119
Example 15 : Trimming an Automaton 120
Example 16 : Product of Two Automata 122
Example 17 : Parallel Composition of Two Automata 124
Example 18 : Complex Block Diagrams 129
Example 19 : P&ID Tags 141
Example 20 : Heating the House: Part I: Open-Loop Control 159
Example 21 : Temperature Control: Closed-Loop Case 161
Example 22 : Investigation of the Proportional Term on Stability and Performance 166
Example 23 : Investigation of the Integral Term on Stability and Performance 168
Example 24 : Investigation of the Derivative Term on Stability and Performance 172
Example 25 : Designing a PI Controller 178
Example 26 : Designing a Feedforward Controller 184
Example 27 : Design of a Model Predictive Controller 189
Example 28 : Truth Table 203
Example 29 : Sum-of-Products Form 203
Example 30 : Converting into the Sum-of-Products Form 204
Example 31 : Compact Sum-of-Products Form 204
Example 32 : Product-of-Sums Form 205
Example 33 : Converting into the Product-of-Sums Form 206
Example 34 : Compact Product-of-Sums Form 206
Example 35 : Don’t Cares 207
Example 36 : Dual of a Function 208
Example 37 : Karnaugh map 214
Example 38 : Ladder Logic for a Boolean Function 242
Example 39 : Ladder Logic for a Recipe 243
Example 40 : Example of the Computation of the Current Result 250
Example 41 : Writing the Instruction List Programme 251
xiii
Example 42 : Writing the Function Block Language Diagram 255
Example 43 : Structured Text 259
Example 44 : Sequential Function Charts Example (from Günter Wellenreuther and Dieter
Zastrow (2005), Automatisieren mit SPC Theorie und Praxis (en: Automation with PLCs:
Theory and Practice), 3rd Edition, Viewegs Fachbücher der Technik.) 269
Example 45 : Determining the Validity of a Network 275
xiv
Chapter 1: Introduction to Automation
Engineering
Automation engineering is an important component of modern industrial systems that
focuses on the development, analysis, optimisation, and implementation of complex systems to
provide safe, economically viable, and efficient processes. Automation engineering seeks to
eliminate as much as possible human intervention into the process. However, it should be noted
that this does not mean that humans are not required to monitor and assist with the running of the
process; it simply implies that the mundane, often repetitive, tasks are delegated to computer
systems that are better suited for performing such work.
In order to understand automation engineering, it is important to briefly review its long
history, its main principles, and its foundations.
1
This word is ultimately derived from the Greek word αὐτός, meaning self, and an unattested root, which comes from
the proto-Indo-European word *méntis ~ mn̥téis, meaning thought (which in turn gave us such words as mind in
English)
15
in AD 1656 by Christiaan Huygens. Later, a primitive steam engine, called an æolipile, was
developed by Hero of Alexandria (gr: Ἥρων ὁ Ἀλεξανδρεύς, c. AD 10 to 70). Examples of these
devices are shown in Figure 1. As well, objects that assisted in the computation of heavenly bodies
(essentially the first computers) were also developed. The most famous is the Antikythera
mechanism. This tradition of developing mechanical automated objects was continued long into
the Middle Ages both in Europe and in the Middle East, with such work as the Book of Ingenious
Devices (ar: ( ﻛﺘﺎب اﻟﺤﯿﻞKitab al-Hiyal) or pe: ( ﻛﺘﺎب ﺗﺮﻓﻨﺪھﺎKetab tarfandha)) by the brothers Banu
Musa, which describe various automata, including primitive control methods, automatic fountains,
mechanical music machines, and water dispensers. Similarly, in the court rooms around the world,
various automata in the shape of singing animals were being developed and maintained. Famous
examples can be found in the (now destroyed) palaces of the Khanbaliq of the Chinese Yuan
dynasty and the court of Robert II, Count of Artois.
The interest in the development of automata continued into the Renaissance with the
development of life-size automata, such as The Flute Player by the French engineer Jacques de
Vaucanson in 1737.
With the rediscovery of steam engines, the ability to develop large and complex automated
system become a reality sparking the first Industrial Revolution (1760 to 1840). One of the first
such examples was the Jacquard loom that could be programmed to automatically weave different
designs using punch cards. The development of advanced systems required methods of controlling
them, so that explosions and damage were minimised. The first dedicated device for controlling a
steam engine, called the Watt governor, was developed by James Watt (1736 – 1819). The Watt
governor, shown in Figure 2, regulates the amount of fuel entering the system so that the speed of
the engine remains in a desired range. The development of the first Watt governor was followed
by a rash of patents trying to improve various aspects, including one by William Siemens
(1823 – 1883). It was not until 1868, when James Clerk Maxwell (1831 – 1879) provided a
mathematical description of the governor in his aptly named paper On Governors that a rigorous
mathematical foundation for the development of methods for controlling a process was available.
As the systems became more complex in the succeeding decades and centuries, there came an
ever-increasing need for understanding these intricate systems in order that they be properly run
so as to avoid unsafe operating conditions.
16
Figure 1: Automation engineering in the time of the ancient Greeks: (left) Æolipile (steam engine) and (right) Automated temple
door opening device
The demand for automation continued with the onset of the second Industrial Revolution
(1870 – 1915), which focused on the development of efficient manufacturing methods (production
lines, Taylorism, and similar ideas) coupled with the development of electricity and the first
electrical devices.
By the 1950s, a new industrial revolution, often called the third Industrial Revolution or
the Digital Revolution, had started. This revolution focused on the implementation and use of
17
complex electrical circuits that can be used to quickly and efficiently perform complex processes.
With the development of these circuits, it became easy and cost-effective to implement automation
in a wide range of different fields. From the perspective of automation engineering, the key event
was the development of programmable logic controller (PLCs) that could be used to implement
advanced control methods in an industrial setting. The first PLCs were developed by Bedford
Associates from Bedford, Massachusetts, USA based on a white paper written by the engineer
Edward R. Clark in 1968 for General Motors (GM). One of the key people working on this project
was Richard E. “Dick” Morley (1932 – 2017), who is often considered the father of the PLC. Other
important work was performed by Odo Josef Struger (1931 − 1998) of Allen-Bradley in the period
1958 – 1960. At the same time, there was an explosion of interest in a theoretical perspective on
automation engineering, especially in the areas of control and process optimisation. This research
by such people as Andrei Kolmagorov (ru: Андре́й Никола́евич Колмого́ров, 1903 − 1987),
Rudolf Kálmán (hu: Kálmán Rudolf Emil, 1930 − 2016), Richard E. Bellman (1920 – 1984) and
others lead to a strong foundation for the subsequent development and implementation of advanced
control methods in industry.
Within the context of the third Industrial Revolution, the concept of robots was also
considered. The word robot itself was first used by the Czech author Karel Čapek (1890 – 1938)
in his 1920 drama R.U.R. (cz: Rossumovi Univerzální Roboti or en: Rossum’s Universal Robots)
as a word for artificial humanoid servants that provided cheap labour. Karel credited his brother
painter Josef Čapek (1887 – 1945) with inventing this word. The word robot stems from the Czech
root robota, that means serfdom, which ultimately comes from the proto-Indo-European word,
*h₃erbʰ−, that means “to change or evolve status” from which the English word arbitrate and the
German word Arbeit are also derived.
More recently, with the growth of interconnectedness and the development of smart
technologies, some has proposed that a new industrial revolution is dawning. This revolution has
been called the fourth Industrial Revolution, or Industry 4.0, which focuses on the development of
self-functioning, interconnected systems in an increasingly globalised world. It main drivers are
ever increasing automation and digitalisation of the industrial plant combined with globalisation
and customisation of the supply chains.
18
Section 1.2: The Key Concepts in Automation Engineering
Automation engineering can be able applied to a wide range of different cases. Instead of
considering each situation separately, automation engineering has developed a set of abstract
concepts that allow the ideas to be applied to any relevant situation.
The basic concept in automation engineering is a process or system. 2 Figure 3 shows a
typical system with some important components. In automation engineering, as shown in Figure
3, a system consists of inputs, denoted by u, and outputs, y. Inputs represent those variables,
whose change will lead to a change in the system. Inputs can be divided into two types:
manipulative and disturbance. A manipulative input is an input, whose value can be changed
through some device, for example, the flow rate in a valve can be manipulated by opening or
closing a valve. A disturbance input is an input, whose value cannot be changed (at least in
context of the given situation), for example, the ambient temperature cannot be readily modified.
Similarly, outputs can be divided into two categories: observable or measurable and
unobservable or unmeasurable. Observable or measurable outputs are those variables whose value
can be measured or inferred using some device, for example, the temperature of a fluid can be
measured or determined using a thermometer. Unobservable or unmeasurable outputs are those
variables that cannot be measured (at least in context of the given situation), for example, the
density of a complex mixture consisting of multiple phases and components may not be easy to
measure. Finally, we can consider the states of the system, which are the internal variables that
describe the behaviour of the system. In many cases, the states of a system are equivalent to the
outputs and can be categorised using a similar terminology. Often, not all the states can be observed.
2
In this textbook, the two words will not be distinguished. Some authors consider the process to be the overall way
something is done, while a system represents the actual physical realisation of the process. Since in many cases, these
words are used interchangeably, the textbook will primarily use system.
19
u1 y1
System
…
…
um yp
Inputs Outputs
Figure 3: A system in automation engineering
It goes without saying that if we wish to understand the system, we require a model of the
system. A model of the system is a mathematical representation of the relationship between the
inputs, outputs, and states. The complexity of the required model depends on the purposes that the
model will be used. Modelling a process is a complex endeavour that requires insight into the
process and the ability to handle large data sets quickly and effortlessly.
In order to complete the picture regarding the system, it is necessary to extend our view to
include parts that allow us to interact with the system or influence its behaviour. Such a view is
provided in Figure 4. In Figure 4, the key components and their interactions are shown. It is
important to briefly consider the impact of these in order to understand how the system can be
influenced and how it will react. In this view, the eight key components can be described as (the
number is the same as in Figure 4):
1) Actual Process: This represents the process under consideration. Normally, the actual
process is unknown. Instead, a model of the actual process is used.
2) Sensors: The sensors provide the ability to measure the process and understand how the
variables are changing.
3) Actuators: The actuators allow the value of a variable to be changed. If we cannot change
the value of a variable, then it is hard to use it in an automation strategy. When deciding
on which actuators to use, it is important to consider such factors as the variable being
20
manipulated, the automation requirements (e.g. required accuracy, tolerance, or precision),
and the type of service required (e.g. continuous, discrete, or emergency).
4) Automation Devices: The automation devices are the controllers and related components
that are used to control the process. Most of the time the automation hardware consists of
computers and other digital devices, such as programmable logic controllers (PLCs), that
implement the required functions. The design of the automation hardware (and software)
requires knowledge of the limitations and requirements of the system.
5) Environment: The environment represents everything that surrounds the system to be
automated that can have an impact on the overall performance of the system. This influence
can be caused either by changes in other processes that interact with the system of interest
or by direct environmental changes, such as for example, changes in the ambient
temperature. The system will exchange mass, energy, and information with its environment.
6) Automation Objectives: The automation objectives play a very important role in the
development and implementation of the final automation system. Poorly defined or unclear
objectives can make achieving the project difficult if not impossible. Furthermore, the
objectives often need to be translated from the language of business into actually
implementable objectives on a system. This translation can cause additional uncertainties
and lack of clarity.
7) Operators: Although the human component is often minimised or ignored when designing
automation systems, it is in fact very important. Many complicated automation systems
have failed due to a lack of proper consideration of the operators. In general, the operators
need to have the required information easily available (no fancy graphics are needed) and
they can enter the required information into the system quickly and efficiently. Appropriate
feedback and safety checking of the entered values must be performed to avoid confusion.
The operators interact with the process using a human-machine interface (HMI). An
HMI provides two key functions. It allows the operators to see the important process values
and to manipulate as necessary process values. Manipulating the values implies that the
operators can change at what value the process operates, for example, changing the flow
rate in a pipe. Finally, when designing the HMI, it is important to consider any safety
features, such as logic, that limits which values can be entered by the operators. This
prevents mistakes both accidental and malicious from having an impact on the process.
21
8) Disturbances: Disturbances are everything that can impact the system, but whose presence
cannot be directly controlled. Disturbances can originate in the environment (for example,
the ambient temperature) or in the devices themselves (for example, measurement noise in
sensors). One of the objectives of the automation system is to minimise, as much as
possible, the impact of these disturbances on the process.
The final aspect that needs to be considered is safety. The automation system that has been
designed should allow the process to operate in a safe manner without any unexpected behaviour,
including such things as explosions or major failures. The system should also be robust, that is,
minor changes in the process should not cause the whole system to fail catastrophically. A robust
system can handle small changes in the process conditions and still attain the required goals.
4. Control Devices
Measured Control Signal, u
Signal, y
2. Sensors 3. Actuators
8. Disturbances 8. Disturbances
Exchange of mass,
1. System
energy, and information
5. Environment 8. Disturbances
22
Section 1.3: Automation Engineering Framework
When solving an automation engineering problem, the following steps should be
considered:
1) Modelling of the Process, which involves developing an appropriate model of the process.
2) Analysis of the Process, which involves using the model to analyse how the process will
behave under different conditions. This can be performed using either mathematical
analysis or simulations.
3) Design of the Automation Strategy, which based on the process properties and required
behaviour, provides an appropriate automation strategy that attains the required automation
objectives.
4) Validation of the Proposed Automation Strategy, which validates the proposed
automation strategy using the process model. This determines if the proposed strategy can,
in fact, achieve all the desired automation objectives. Should it be found that the proposed
strategy is lacking, then the strategy needs to be refined and retested. This implies that there
may need to iterate until the final automation strategy is found.
5) Implementation and Commissioning of the Proposed Automation Strategy, which
involves the implementation of the strategy in the real process. Naturally, the
implementation on the real system may lead to changes in the strategy. This implies that
before commissioning, the automation strategy should be tested on the actual process in as
realistic conditions as possible. In certain cases, this may not be feasible and advanced
simulations, using hardware-in-the-loop methods can be implemented to provide a
realistic simulation of the system.
23
is on market analysis, strategic investment and personnel planning, and corporate
governance.
• Level 4 – Manufacturing Execution Level: This level considers the specific strategies
that allow for the overall plant/process to run. This includes such details as production
planning, production data acquisition, organisation of delivery orders, and deadline
monitoring. The time horizon for actions can reach into months. Often, at this level, various
software systems, such as a manufacturing execution system (MES) or a management
information system (MIS), are used.
• Level 3 – Process Control Level: This level focuses on short-term production planning,
quality control, and maintenance planning with an action horizon of at most days. Often,
software, such as a supervisory control and data acquisition (SCADA) programme, will be
used.
• Level 2 – Control Level: This level considers how to run the algorithms for controlling
the process using the available process information on the time horizon of minutes or even
seconds. Various hardware, such as programmable logic controllers (PLCs) or industrial
PCs (IPC) are used to compute the required actions. It is on this level that this book focuses.
• Level 1 – Field Level: This level focuses on the sensors and actuators. Information is
actively exchanged with Level 2, often using fieldbuses. The time horizon is often in the
range of seconds or faster.
• Level 0 – Process Level: This level represents the actual process that is running in real
time.
24
5. Enterprise Resource
Planning Level
4. Manufacturing
Execution Level
3. Process Control Level
2. Control Level
1. Field Level
0. Process Level
Figure 5: A description of the components of the automation engineering pyramid
25
8) The environment has minimal impact on an automation system.
9) HMIs should be easy to read and understand.
10) An automation system that explodes periodically is a well-designed system.
11) An automation system should fail the second the system deviates from the expected
conditions.
12) A system exchanges mass, energy, and information with the environment.
13) Disturbances can affect sensors, actuators, and control devices.
14) Validating a proposed automation strategy using appropriate models of the system is a good
strategy to consider.
15) Before commissioning of the automation strategy, it should be tested on the actual system
in as real conditions as possible.
16) The enterprise resource planning level focuses on controlling the process in fine detail and
making decisions every millisecond.
17) The process control level often uses SCADA systems to implement its tasks.
18) In the field level, sensors and actuators gather the information and transfer it using
fieldbuses to the control level.
19) A process variable that cannot be measured should be used to control the process.
20) Safety is always an unimportant topic in automation engineering.
26
24) You have been given the task of designing a self-driving car. Explain how you would
implement the automation engineering framework to this problem. Would you consider
safety and robustness to be significant factors?
27
Chapter 2: Instrumentation and Signals
The foundational components of any automation system are instrumentation, that is, the
sensors, actuators, and the computer hardware which together produce a stream of values, often
called a signal, that can be used for subsequent processing. Before we can look at the sensors,
actuators, and control concepts, it is helpful to understand the types of signals and how they can
be generated.
28
signals work by assigning one value (say 0) to the normal state and the other value to the alarm
state (say 1). Binary signals are often displayed using what is called a timing diagram. In a timing
diagram, the binary signal is plotted as a function of time. Multiple different binary signals are
normally placed on separate y-axis, but a common time x-axis. Figure 6 shows such a typical timing
diagram.
1
A
1
B
0
Time, t
Based on the classification in the time and value domains, it is possible to have four
different types of signals, which are shown in Figure 7. By convention, a signal that is continuous
in both the time and value domains is called an analogue signal, while a signal that is discrete in
both the time and value domains is called a digital signal.
Time Domain
Continuous Discrete
Value Domain
Continuous
29
4 4
2
Analogue 2
0 0
-2 -2
-4 -4
0 1 2 3 0 1 2 3
Discrete
4 4
2 2
Digital
0 0
-2 -2
-4 -4
0 1 2 3 0 1 2 3
Since most real processes require and produce continuous, analogue signals, but computers
perform their computations using discrete, digital signals, there is a need to understand how signals
can be converted between the two forms. Converting from analogue to digital signals is shown in
Figure 8, and consists of three components: sampler, quantiser, and encoder. The sampler
measures (samples) the value of the analogue signal on a fixed frequency to convert the signal into
the discrete time domain. Next, the quantiser coverts this sampled signal into the available closest
value (quantum) to create a digital signal. The encoder simply encodes the digital signal into a
given digital representation that can be used by the computer. This process is often denoted as an
analogue/digital (A/D) converter.
Sampled Quantised
Signal Signal
Sampler Quantiser Encoder
Analogue Digital
Signal Signal
When going in the other direction, it is normal to assume that the value of the signal will
not be changed and only the time component needs to be made analogue. This is normally
accomplished using a hold, which holds the value of signal until a new value is received. The most
30
common hold is the zero-order hold, which simply holds the last value received until a new value
is received. A more accurate hold is the first-order or linear hold, which uses an interpolation
between the previous two data points to obtain a linearly varying value over the sampling period.
This process is called digital-to-analogue (D/A) conversion.
31
Ideal Case
Observed
Behaviour
y = ax + b
A single sensor depending on its calibration and physical arrangement can be used to measure
different physical variables, for example, a differential pressure cell can measure both flow rates
and level.
Selecting an appropriate sensor depends on the following criteria:
1) Measurement Range (Span): The required measurement range for the process variable
should lie within the instrument’s range.
2) Performance: Depending on the specific application, different factors, such as accuracy,
precision, and speed of response, will need to be considered.
3) Reliability: How well does the sensor work in the given operating conditions, for example,
if the sensor must be placed in harsh operating conditions, can it handle them and for how
long?
4) Materials of Construction: Depending on the application, the required materials of
construction for the sensor may be different. It is important to select the correct materials
for the intended application.
32
5) Invasive or Noninvasive: An invasive sensor comes in direct contact with the object being
measured, for example, inserting a probe into a liquid to measure the temperature. Invasive
methods can have issues with long term accuracy due to fouling or corrosion of the probe
surface. Noninvasive sensors, although sometimes easier to use, are often less accurate.
33
approach is to use a differential pressure cell, which measures the pressure gradient between the
top of the liquid and the bottom of the liquid. Since pressure is proportional to the height of the
liquid in the tank, it is relatively easy to calibrate and determine the height. On the other hand,
since density depends on the temperature, this approach will not work in cases where there can be
wide fluctuations in temperature (for example, a boiling liquid). A float measurement device works
on a similar principle, of pressure difference, but records the values differently. Finally, various
radio-based methods, for example, ultrasonic pulse generating devices, can be used to determine
the surface level. However, in order to get an accurate estimate, it is required that the surface be
relatively flat and consistent. Froths and other particles can impact the accuracy and precision of
the measurements.
34
use the time it takes for small, suspended particles inside a flowing gas to cross two laser beams.
Based on this time, the bulk flow rate can be computed. Finally, ultrasonic flow sensors use the
Doppler effect to measure the flow rate. An advantage of the ultrasonic flow sensors is that they
can be nonintrusive, that is, the measurement can be done without coming in contact with either
the pipe or the fluid. On the other hand, these sensors require the speed of sound for the flowing
fluid to be known in order to calibrate the results correctly.
In most industrial cases, pressure-based flow meters are used, since they are simple to use,
robust, and easy to maintain. On the other hand, when dealing with exotic or extreme fluids, then
more complex methods may be required.
35
Thermocouple Temperature Range Material of
Comments
Type (°C) Construction
Chromel- −273.15 to 25 chromel-gold−iron Cryogenic applications
gold/iron
36
problem with actuators is that their response is nonlinear. One way to resolve this problem is to
use a characterisation function that will convert the desired linear values into the actuator’s
nonlinear values.
Actuators need to be calibrated before being used or to check that they are behaving as
expected. Calibration involves using standards with accurate and well-defined values to compare
against the measured value by the sensor. However, the exact relationships and behaviour of the
calibration will depend on the specific actuator.
There are three common actuators: valves, pumps, and variable current actuators.
37
For an air-to-close valve, an increase in air pressure will push the plug towards the seat,
thus reducing the area available for flow, increasing the resistance to flow, and reducing the flow
rate though the valve. For an air-to-open valve, the air enters on the bottom of the diaphragm, so
an increase in air pressure will raise the diaphragm, thus opening the valve.
Many modern valves have an additional element called a positioner that seeks to overcome
any potential errors in the valve. A positioner basically compares the current valve location against
the reference value and will change the air supply to allow for the difference to be zero.
The behaviour of a valve is normally specified based on the percentage of the total distance
that the valve is opened or closed. This eliminates the need to know the exact flow rates. Therefore,
the flow rates of a valve are often stated in terms of percent open (often abbreviated as %open).
Properly selecting a valve for control use is very important. There are two variables to
consider: sizing and dynamic performance.
38
A valve that is too small will not permit enough flow when it is fully open, which is defined
in terms of the needs for process regulation. A control valve must permit significantly greater flow
than the steady-state requirement in order to be able to provide reasonable performance. A valve
that is too large will have a sufficiently high maximum flow but will provide poor regulation when
the flow is low. For a number of reasons, valves are not very precise instruments, and the relative
errors tend to be greatest when the valve is almost closed.
A valve that is open by less than 10% is generally considered effectively closed, and a
valve that is more than 90% open is generally considered effectively fully open.
To determine whether a control valve is undersized or oversized, examine the range of
controller output values used when the valve is in service. If the valve spends a significant fraction
of the time fully open, then it can be considered undersized. If it spends a significant fraction of
the time less than 10% open, or if the flow through the valve reaches a maximum before the valve
is fully open, then the valve is oversized.
39
there is a small change in the control signal (air pressure) input to the valve. Static friction, or
“stiction,” can significantly affect controller performance.
To find static and dynamic nonlinearities in a control valve, step the valve from 0% open
to 100% open and then back to 0% in small steps and record the steady-state flow at each step.
Plot the data points on a graph of steady-state flow versus %open, and use different lines for
opening and closing. The resulting graph will be similar to that shown in Figure 11, where the
ideal valve behaviour is shown as a heavy dashed line. Static nonlinearity consists of the
deadband region over which the flow rate does not change even though the signal to the valve
increases and the slip-jump behaviour, while dynamic nonlinearity consists of hysteresis, which
is the gap between the two lines.
40
Ideal Valve Behaviour
A
C
Legend
A: deadband
C: slip jump
Valve output (kg/s)
D: hysteresis
D
A
Valve input (%)
Figure 12: Phase plot for the typical behaviour of a valve with stiction (after (Shoukat Choudhury, Thornhill, & Shah, 2005)).
The arrows show the direction in which the values were changed.
41
Section 2.3.2.1: Pump Sizing
Control pumps must be specified, just like piping, heat exchangers, and other process
equipment. The sizing of a control pump determines the range of flow rates over which the pump
can produce a hydrodynamically stable flow.
A pump that is too small will not permit enough flow when it is fully operating, which is
defined in terms of the needs for process regulation. A control pump must permit significantly
greater flow than the steady-state requirement in order to be able to provide reasonable
performance. A pump that is too large will have a sufficiently high maximum flow, but will
provide poor regulation when the flow is low.
Pumps operating for most of the time at less than about 10% are said to be oversized, while
those operating at more than 90% are said to be undersized.
42
Figure 13: Typical pump characteristic curve for a centrifugal pump
43
1) Inputs: These allow information from outside the PLC to be incorporated and used. Most
often, they are electrical signals coming from sensors or switches.
2) Power Supply: This provides the power required to run the PLC and operate all the
circuitry. Internally, most PLCs use a 5-V standard. However, the power supply most often
provides 230 V AC, 120 V AC, or 24 V DC. Furthermore, the power supplies are often
built as a replaceable module, so that depending on the application, the appropriate power
can be provided, for example, in Europe one could use 230 V, but in North America 120
V.
3) Central Processing Unit (CPU): The CPU is the brain of the PLC that performs all the
required instructions, calculations, operations, and control functions.
4) Memory: The PLC must also contain memory or the ability to store relevant information
for future use. The amount of memory available depends on the PLC and the programming
requirements. Some PLCs can have additional memory cards inserted, so that they have
more available memory. There are two main types of memory:
a. Read-Only Memory (ROM): ROM is the permanent storage for the operating
system and system data. Since a true ROM cannot be changed, in practice, an
erasable programmable ROM (EPROM) is used, so that it is possible to update
the operating system for the PLC.
b. Random Access Memory (RAM): RAM is used to store all other information
required by the PLC including any programmes and variables. Accessing RAM is
very fast. However, when power is lost, the information in RAM is also lost.
Therefore, a PLC will always have an additional battery to maintain power to RAM,
so that the information that is contained in the RAM is not lost during a power
outage.
5) Communications Unit: The communications unit allows for the PLC to interact with other
devices to exchange information using different types of protocols. Often, this exchange of
information involves sending new or updated programmes to the PLC. In general, the
communications unit will often include the ability to communicate with an operator panel,
printers, networks, or other computers.
6) Outputs: These allow the PLC to exchange information with other devices to cause them
to take an action. Such devices include motors, valves, pumps, and alarms.
44
In a PLC, communication between the components occurs using groups of copper wires called
buses. A bus consists of a bundle of wires that allow for the transmission of binary information,
for example, if the bus contains eight wires, then it is possible to transmit up to 8 bits of information
per bus. A typical PLC consists of four buses:
1) Data Bus: The data bus is used to transfer information between the CPU, memory, and I/O.
2) Address Bus: The address bus is used to transfer the memory addresses from which the
data will be fetched or to which data will be written.
3) Control Bus: The control bus is used to synchronise and control the traffic circuits.
4) System Bus: The system bus is used for input-output communications.
Power Supply
CPU
Communication
Unit
Since a PLC operates more or less similarly to that of a computer, this means that in order
for a PLC to do anything useful, it must be programmed. The basic idea for a PLC is to monitor
and control a process. A process in this context is anything that requires monitoring and control
and can range from a simple unit that requires its output to be maintained at a prespecified value
to a complex, highly interacting system like a room with multiple heating ovens, lights, ventilations
systems, and windows, wherein the temperature, carbon monoxide levels, and humidity must be
monitored and maintained at safe levels. In PLC terms, a process is said to be in a given operating
mode 3, when the process is operating in some specified mode, for example, when the pump is on,
3
Often also called a state, but this term is avoided since it has another meaning in control and process analysis.
45
off, or operating. Finally, the PLC requires a user programme that takes the inputs, outputs, and
internal information to make decisions about the process.
Before we look at how a PLC operates, it can be useful to note the different states or modes
that a PLC itself can be in. In general, the PLC modes are programming, stop, error, diagnostic,
and run. In programming mode, a PLC is being programmed, usually using an external device. In
stop mode, the PLC is stopped and will only perform some basic operations. In error mode, the
PLC has encountered some sort of problem and has stopped working. In diagnostic mode, the PLC
runs without necessarily activating any inputs or outputs, allowing for the validity of the
programme to be determined. In run mode, a PLC is actively working and performing the requested
actions. Each PLC manufacturer may call these modes different names and not all of them may be
present for a given PLC.
Naturally, the most important mode from the perspective of automation is the run mode.
Thus, its behaviour will be examined in greater detail. In run mode, the PLC performs the same
four operations in a repeating cycle:
1) Internal Processing, where the PLC checks its own state and determines if it is ready for
operation. Should the response from hardware or communication units be lacking, the PLC
can give notice of these events by setting a flag, which is an internal Boolean address (or
visual indicator) that can be checked by the user to determine the presence of an error state.
Normally, the PLC will continue operation, unless the error is serious, in which case, it
will suspend operation. At this point, software-related events are also performed. These
include such things as updating clocks, changing PLC modes, and setting watchdog times
to zero. A watchdog is a timer that is used to prevent a programme from taking too long to
execute, for example, it could be stated that if a programme does not terminate in one
second, then it could be stuck inside an unending while-loop and an error state will be
returned.
2) Reading Inputs: Next, all the input statuses are copied into memory. This means that the
PLC will only use the values from memory rather than checking to make sure that the most
recent value is available. This means that at any given point the programme will use the
same values during the same scan time. Furthermore, reading values from memory is faster
than reading them each and every time from the input.
46
3) Executing Programmes: After the inputs have been read, the programmes are executed in
the order in which the code has been written. The order of execution can be changed by
changing the associated priority of the given code or using conditional statements and
subroutines. It should be noted that at this point only internal variables and output addresses
are updated in memory; the physical outputs are not changed at this point.
4) Updating Outputs: Once the programmes have been finished, the output memory is
written so that the state and values of the outputs can be updated. This will then complete
a single cycle and the PLC will return to the first step, that is, internal processing.
Since it can be seen that the PLC in run mode performs these four operations repeatedly, the
question becomes what is the best approach for how the PLC should repeat these operations. By
convention, a single pass through the four operations is called a scan and the scan time or cycle
time is the amount of time required to perform a single scan. In practice, the scan time can vary
between scans due to the presence of different events or conditions requiring the execution of more
or less code. In order to accomplish the repetitions effectively, a programme can be associated
with a task, whose execution type can be specified. There are three common execution types:
1) Cyclic Execution: In cyclic execution, the time between scans is fixed. Obviously, the time
must be set so that the PLC has the time to complete all the required code. Naturally, certain
tasks, such as counting or timing, should always be run on cyclic execution.
2) Freewheeling Execution: In freewheeling execution, as soon as one scan has been
completed, then the next scan is started. This is the fastest way of running a task, since
there is no waiting between scans.
3) Event-Driven Execution: In event-driven execution, a task is only executed when a given
Boolean condition is fulfilled. Event-driven execution is useful for emergency stop routines,
start-up routines, and other extraordinary events.
Furthermore, the nature of the task must be specified: can the task be interrupted by another task?
If the task can be interrupted, then it is called pre-emptive; if it cannot be, nonpre-emptive. The
difference between these two types of tasks is shown in Figure 14. Finally, the priority of a task
must be specified ranging from high to low (the exact details depend on the specific PLC and
standard used).
47
Nonpre-emptive Task, T2 Tasks
Time (ms)
100 200 300 400
Pre-emptive Task, T3
T1 T1 T1 T1
T3 T3
Time
100 200 300 400
48
1) Analogue-to-Digital Converters (A/D Converter), which convert the analogue signal
received from the sensor into a digital signal. At this point, quantisation (or resolution)
can be an issue. If an insufficient number of levels (decimals) are present, then the
resulting data may not carry as much information as before.
2) Digital-to-Analogue Converters (D/A Converter), which convert a digital signal
received from the computer/software into an analogue signal that can be used by the
actuator. Different methods exist for implementing this conversion including a zero-order
hold, where the previous value is maintained until a change occurs, or a first-order hold,
where some average of the previous values is used until a new value is available. In most
implementations, a zero-order hold is used due to its simplicity and sufficiency.
3) Control Software, which can reside either on the programmable logic circuit or as a
separate software programme on a computer.
4) Data Historian, which stores all the values for future retrieval. Selecting an appropriate
sampling time, or how fast the data are recorded, can determine the usefulness of the
stored data for future applications.
5) Network Cables, Switches, and Accessories, which physically connect all the
equipment and allow for the strategy to be implemented.
The main issue with the design of the communication units is the available bandwidth. The faster
the data is sampled and the more computations that need to be performed, the larger the bandwidth
and computational power that will be needed.
In automation, signals can be encoded using many different standards. The two most
common standards are the current-based standard of 4 to 20 mA and the pressure-based standard
of 3 to 15 psig. 4 It should be noted that both of these standards do not start at zero, since a value
of zero is ambiguous: is the device not working properly or is the value actually zero. By using a
live zero, that is, the value of zero corresponds to some nonzero current or pressure means that it
is possible to distinguish between the case of a zero value and a faulty device.
4
A psi is a unit of pressure in the imperial system of measure. It is an abbreviation for pounds (force) per square inch.
The conversion factor is 1 psi = 6.894 757 kPa. The g represents gauge or the value above atmospheric pressure.
49
Section 2.6: Chapter Problems
Problems at the end of the chapter consist of three different types: (a) Basic Concepts
(True/False), which seek to test the reader’s comprehension of the key concepts in the chapter; (b)
Short Exercises, which seek to test the reader’s ability to compute the required parameters for a
simple data set using simple or no technological aids. This section also includes proofs of theorems;
and (c) Computational Exercises, which require not only a solid comprehension of the basic
material, but also the use of appropriate software to easily manipulate the given data sets.
50
19) A PLC consists of inputs, power supply, CPU, memory, outputs, and communication
devices.
20) A bus in a PLC is a location in memory used to store information about where different
variables are stored.
21) A PLC in programming mode is being programmed from an external device.
22) A flag in a PLC is a Boolean variable that shows the presence of an error state.
23) A watchdog in a PLC is a variable that prevents the PLC from being interrupted by external
users as it is running.
24) A PLC scan is the amount of time it takes for the PLC to read the inputs.
25) Freewheeling execution occurs when the PLC executes a task solely on demand from an
external event.
26) A pre-emptive task can never be interrupted.
27) An analogue-to-digital converter is found in all computer-based automation solutions.
28) A data historian stores the data collected from a process.
29) Live zero implies that when the signal value is zero then the current has a value of 4 mA.
30) A PLC normally has a battery to provide power in case of a power failure.
51
Table 2: Data for creating the valve characterisation curve for Question 34)
Measured Height Sensor Value (m) Measured Height Sensor Value (m)
(m) Run 1 Run 2 (m) Run 1 Run 2
0.00 0.02 0.03 0.30 0.321 0.312
0.10 0.115 0.105 0.35 0.348 0.349
0.15 0.149 0.152 0.40 0.412 0.392
0.20 0.229 0.215 0.45 0.452 0.457
0.25 0.248 0.251 0.50 0.512 0.493
52
Chapter 3: Describing a Process
In order to understand and provide useful information about a process, it is necessary to
understand how different processes and systems can be represented. In practice, there exist two
main types of representations: mathematical and schematic. A mathematical representation
focuses on providing an abstract description of the process that provides information about the
process. A good mathematical representation of the system can provide a deep understanding of
how the system works and how it will behave in the future. On the other hand, a schematic
representation focuses on the relationships between the different components and how they relate
to each other. It is primarily a visual approach that allows the actual process to be represented on
a piece of paper.
Common mathematical representations include state-space models, transfer function
models, and automata. The most common schematic representations are block diagrams, piping
and instrumentation diagrams (P&IDs), and process flow diagrams (PFDs).
53
1) Linear versus nonlinear: A model f(t) is said to be linear with respect to t if the
following two statements hold:
a. Principle of Superposition or additivity: f(t1 + t2) = f(t1) + f(t2), and
b. Principle of Homogeneity: f(αt1) = αf(t1).
If these two statements do not hold, then the model is said to be nonlinear. Linearity is a
very useful property that allows for a system to be easily analysed using known, well-
established theoretical methods. Nonlinear models can be linearised, so that in a given
region they are well described by the linear equivalent model. A model can be linear with
respect to one variable, but not another.
2) Time-invariant versus time-variant: A model is said to be time-invariant if the
parameters in the model are constant with respect to time. In a time-varying system, the
model parameters can depend on the time period.
3) Lumped parameter versus distributed parameter: A model is said to be a lumped
parameter system if the model does not contain any space derivatives, for example, ∂T
∂x
(space derivative of temperature). A model containing such space derivatives is called a
distributed parameter system. The analysis of distributed parameter systems is often
much more difficult than that of a lumped parameter system. A distributed parameter
system can be reduced to a lumped parameter model if it is assumed that the variables are
homogenously distributed within the space, and hence, all the space derivatives are zero.
4) Causal versus noncausal: A system is said to be causal if the future values only depend
on the current and past values. In a noncausal system, the future values depend on the
current, past, and future values. A noncausal system is not physically realisable, since the
future values will never be known.
5) System with memory versus system without memory: A system is said to have
memory if the future values depend on both the past and present. On the other hand, a
system is said to be without memory or memoryless if future values only depend on the
current value.
54
The state-space representation of a control model focuses on the relationship between
states, inputs, and outputs in the time domain. The general state-space model is given as
dx
= f ( x, u )
dt (1)
y = g ( x, u )
where x is the state variable, u is the input variable, t is the time, y is an output, f is some function,
and an arrow above denotes a vector. The state variable is a variable that describes the current
location of the system from which the system’s future behaviour can be determined. A state
variable will often appear in some equation as a derivative with respect to time. The input variable,
u, is a variable that describes the properties of a stream entering a system. Traditionally, the number
of inputs is denoted by m, the number of states by n, and the number of outputs by p. A system
where p = m = 1 is said to be univariate or single-input, single-output (SISO). If p and m are
greater than 1, then the system is said to be multivariate or multi-input, multi-output (MIMO).
A system is said to be multi-input, single-output (MISO) if p = 1 and m > 1.
The general state-space model is often reduced to a linear form
dx
= x + u
dt (2)
y x + u
=
Where 𝒜𝒜 is the n×n state matrix, ℬ is the n×m input matrix, y is the output vector of length p,
𝒞𝒞 is the p×n output matrix, and 𝒟𝒟 is the p×m feed-through matrix.
On the other hand, the transfer function representation of a control model focuses solely
on the relationship between the inputs and outputs in the frequency or Laplace domain and allows
easier analysis of the system than for a state-space model. The general transfer function
representation can be written as
Y ( s ) = ( s )U ( s ) (3)
where G is a matrix containing the transfer function representation of the model, that is
Y1 ( s ) U 1 ( s ) G11 ( s ) G1n ( s )
=Y ( s ) = , U (s) = , (s) (4)
Ym ( s ) U n ( s ) Gm1 ( s ) Gmn ( s )
55
N ( s ) −θ s
G (s) = e (5)
D (s)
where N and D are polynomials of s and θ is the deadtime or time delay in the system. Time delay
arises in real systems due to the transport phenomena, measurement delays, and approximations
introduced when linearising a system. The order of a transfer function is equal to the highest
power of the D-polynomial.
Given the simple form of a transfer function representation, much of the analysis in control
is performed using it.
where ℐ is the n×n identity matrix and s is the Laplace transform variable.
Example 1: Numeric Example of Obtaining a Transfer Function
Consider the example
dx
5 + 3 x =
u
dt (9)
y = x
Taking the Laplace transform of Equation (9) gives
dx
In the Laplace domain, a derivative can be written as L = sX − x ( 0 ) , where s is the Laplace variable and x(0)
5
dt
are the initial conditions. In control, we deal with deviation variables that are defined as x̃ = x – xss, where xss is some
steady-state value. Since we assume that the process is initially in steady state, this means that the initial conditions
will always be zero.
6
The inverse exists since the 𝒜𝒜 matrix only contains numeric entries.
56
5sX ( s ) + 3 X ( s ) =
U (s)
(10)
Y ( s ) = X ( s )
Substituting Y for X in the first equation of Equation (10) gives
U (s)
5sY ( s ) + 3Y ( s ) = (11)
Y (s) 1
G
= (s) = (13)
U ( s ) 5s + 3
(s n
+ an −1s n −1 + + a0 ) Y=
(s) (bn −1 s n −1 + + b0 ) U ( s )
Y (s) (b s n −1 + + b0 ) (16)
(s)
n −1
G
= =
U (s) (s n
+ an −1s n −1 + + a0 )
57
dx
= − ax + b1u1 + b2u2
dt (17)
y = x
and determine the transfer functions for the system. Note that there are two inputs (m = 2) and one
output (p = 1).
Solution
sX ( s ) = −aX ( s ) + bU1 1 ( s ) + b2U 2 ( s )
Y ( s ) = X ( s )
sY ( s ) + aY ( s ) = bU
1 1 ( s ) + b2U 2 ( s ) (18)
( s + a ) Y ( s ) = bU
1 1 ( s ) + b2U 2 ( s )
b1 b
Y (s)
= U1 ( s ) + 2 U 2 ( s )
s+a s+a
Rewriting this into matrix form gives
b b2 U1 ( s )
Y (s) = 1 (19)
s + a s + a U 2 ( s )
Note that this can be written separately, since linear functions are being considered. As well, note
that the principle of superposition holds, so that we can study each transfer function separately and
then combine the results together.
The reverse operation of converting a transfer function into a state-space representation
does not yield a unique solution (or realisation). Consider the following transfer function, where
p < n:
β p s p + β p −1s p −1 + + β1s + β 0
G (s) = n (20)
s + α n −1s n −1 + + α1s + α 0
then the controllable canonical realisation is
−α n −1 −α n − 2 −α1 −α 0 1
1 0 0 0 0
= = 0 1
(21)
0
0 0 1 0 n×n 0
n×1
0 0 β p β p −1 β1 β 0 01×1
=
1×n
58
T T
−α n −1 −α n − 2 −α1 −α 0 1
1 0 0 0 0
= = 0 1
(22)
0
0 0 1 0 n×n 0
n×1
T
0 0 β p β p −1 β1 β 0 01×1
=
1×n
Note that for 𝒞𝒞 in the controllable canonical realisation and for ℬ in the observable canonical
realisation, there will be n – p – 1 zeroes. The fact that the two forms are related by taking the
transpose is not coincidental.
where Gp is the process transfer function, θ the parameters, and Gl the disturbance transfer function.
Since in most applications, it is assumed that the transfer functions are rational functions of z-1, the
most common discrete transfer function equation can be written in a form called the prediction
error model, which has the following form:
59
B( z −1 ) C ( z −1 )
A( z −1 ) yt
= ut −k + et (25)
F ( z −1 ) D( z −1 )
where A(z-1), C(z-1), D(z-1), and F(z-1) are polynomials in z-1 of the form
na
1 + ∑ θi z −i (26)
i =1
where na is the order of the polynomial and θi are the parameters, B(z-1), is a polynomial in z-1 of
the form
nb
∑θ z
i =1
i
−i
(27)
where nb is the order of the polynomial, and k is the time delay in the system. In general, it is very
rare for this system to be used directly. Instead, any of the following simplifications may be used:
1) Box-Jenkins Model: In this model, the A(z-1) polynomial is ignored. Thus, this model
is given as
B( z −1 ) C ( z −1 )
=yt ut −k + et (28)
F ( z −1 ) D( z −1 )
In practice, this method is sufficient to fit an accurate model of the system.
2) Autoregressive Moving Average Exogenous Model (ARMAX): In this model, the
D(z-1) and F(z-1) polynomials are ignored, which gives
A( z −1 ) yt B( z −1 )ut −k + C ( z −1 )et
= (29)
This model assumes that the denominator for both the input and the error is the same.
However, this model has the beneficial property that the estimation of its parameters
can be performed using least-squares analysis. A further simplification is to ignore the
C(z-1) term. This gives an autoregressive exogenous model (ARX). This model has
the form given by:
A( z −1 ) yt B( z −1 )ut −k + et
= (30)
3) Output-Error Model (OE): In this model, only the model for the input is fitted to the
data. The error terms are ignored. Thus, the model is given as
B( z −1 )
=yt ut − k + et (31)
F ( z −1 )
60
Section 3.1.1.4: Converting Between Discrete and Continuous Models
It is possible to convert between continuous and discrete forms of a model under certain
assumption regarding the discretisation. The most common assumption is that the input stays
constant between sampling instances, that is, a zero-order hold is used to convert from the
continuous (analogue) to discrete (digital) domains. In such case, it can be shown that the
continuous state-space representation can be converted into the discrete time using the following
formulae:
d = e Aτ s
τ =τ s Aτ
d = ∫ e dτ B (32)
τ =0
d = C
d = D
where τs is the sampling time. It should be noted that all exponentiation is matrixwise
exponentiation. The corresponding transfer function can then be obtained using Equation (8). For
a simple, first order, continuous transfer function given as
K
Y (s) = U (s) (33)
τ ps +1
the discrete, transfer function is given as
K (1 − e )
τp
−
τs
yk = uk (34)
1 − (1 − e ) z
τp
−
τs −1
If a system has time delay, then it can be converted using the following formula
θ
k= (35)
τ s
where θ is the continuous time delay and is an appropriately selected rounding function
61
Section 3.1.1.5: Impulse Response Model
In the discrete domain, the (infinite) impulse response model is defined as
∞ ∞
=yk ∑
= hi z −i uk ∑hu i k −i (37)
=i 0=i 0
where h are the impulse coefficients. The values of h can be obtained by either performing long
division on the transfer function or partial fractioning the result to obtain the impulse coefficients.
Since the values of h can often quickly taper off, it is possible to convert the infinite impulse
response model into a finite impulse response (FIR) model, that is,
n n
=yk ∑
= hi z uk −i
∑hu i k −i (38)
=i 0=i 0
where n is an integer representing the number of terms selected for the model.
G= (39)
Using this representation, it is possible to easily partition the matrices and show this in a compact
manner, for example,
11 12 1
2
G = 21 22 (40)
1 2
where the states have been split into four groups and the relationships between the different groups
can easily be shown.
When using the compact representation, various short cuts can be used when combining
two models. When adding two compact representations, that is the transfer functions are in parallel,
62
1 0 1
0 2
G1 + G2 =
2 (41)
1 2 1 + 2
When multiplying two representations, that is the transfer functions are in series,
1 12 12
2
G1G2 = 0 2 (42)
12
1 12
The inverse of a compact state-space representation can be written as
− −1 − −1
−1
G = −1 (43)
−1
provided that D is invertible. Finally, the transpose of this representation can be written as
T
T T
G = T (44)
T
A common operation with state-space models is to transform the order or meaning of the states. In
such cases, the compact representation can be derived as follows. Assume that
x = x
u = u (45)
y = y
where T, R, and S are appropriate sized nonsingular (invertible) matrices. In this case, the
transformed compact representation can be written as
−1 −1
G= (46)
−1
−1
63
Section 3.2.1: Laplace Transform
The Laplace transform converts a function from the time domain into the frequency
domain. This transform allows for a simple algebraic solution of complex differential equations.
Due to this feature, Laplace transforms are widely used in process control to understand process
behaviour and obtain solutions to various control problems.
The Laplace transform is defined as
∞
F ( s ) = ∫ f ( t ) e − st dt (47)
0
where F is the Laplace transformed function, f the original function, and s the Laplace variable.
Conventionally, the Laplace transform is denoted by a Faktur L, 𝔏𝔏 (U+1D50F), that is,
F(s) = 𝔏𝔏(f(t)). Converting from the frequency domain to the time domain is conventionally shown
using the inverse of the Laplace transform, 𝔏𝔏−1. Table 4 presents a summary of the most common
Laplace transforms. The following are some useful properties of the Laplace transform:
1) Linearity: 𝔏𝔏(f + g) = 𝔏𝔏(f) + 𝔏𝔏(g).
2) Superposition: 𝔏𝔏(αf) = α𝔏𝔏(f).
t
3) Convolution: 𝔏𝔏(f ⁎g) = 𝔏𝔏 ∫ f (τ ) g ( t − τ ) dτ = F(s)G(s).
0
4) Shifting Properties: The following rules specific to certain types of functions can be
useful in solving problems involving Laplace transforms:
𝔏𝔏(f(t − a)u(t – a)) = e−asF(s) (48)
𝔏𝔏 (g(t)u(t – a)) = e−as𝔏𝔏(g(t + a)) (49)
𝔏𝔏(δ(t – a)) = e−as (50)
𝔏𝔏(f(t)δ(t – a)) = f(a)e−as (51)
5) Final Value Theorem: Assuming that the poles (roots of the denominator) lie in the left-
hand plane 7, then
lim f (t ) = lim sF ( s ) (52)
t →∞ s →0
7
Equivalently, the real component of all the poles must be less than 0 or the system is stable.
64
6) Initial Value Theorem: The value in the time domain at the starting point t = 0 is given
by
lim f (t ) = lim sF ( s ) (53)
t →0 s →∞
0 t ≤ 0
Unit Step Function, u u (t ) = s−1
1 t > 0
t n −1 1
Polynomials
( n − 1)! sn
ω
Sine e−atsin(ωt)
(s + a) + ω2
2
n
dn f s F ( s ) − ∑ s k −1 f ( n − k ) ( 0 )
= f (n)
n 8
Derivative n
dt k =1
1
Integration ∫ f ( t ) dt s
F (s)
Often, when we are given an equation in the Laplace domain, it may be necessary to convert
it into the time domain. This can be performed by using the inverse Laplace transform, 𝔏𝔏−1, such
that 𝔏𝔏−1(𝔏𝔏(f(t)) = f(t). In most automation engineering problems, the general case reduces to
8
If it is assumed that the system is initial at steady-state and using deviational variables, then all derivatives will be
zero and this equation will reduce to the first term snF(s).
65
finding the time-domain function corresponding to some rational function of s. In such cases,
partial fractioning (see Appendix I for the details) is required to break up the original fraction into
its constituent parts so that the known functions given in Table 5 can be used.
𝔏𝔏(f(t)) f(t)
A A −CD t
e
Cs + D C
A A n −1 C
−D
t
t e
( Cs + D ) ( n − 1)!C
n n
Cβ
Cs + E E − 2α −2αβ t ρ C −2αβ t ρ
e sin t + e cos t
αs + βs +γ α α α
2
αρ
(irreducible
quadratic) β2
with ρ =γ − ≥0
4α
66
t n −1 1
L = n (55)
( n − 1) ! s
Setting n – 1 = 5, which is the exponent of t5 and noting that we will need to multiply both sides
by the factorial (n – 1)!, will give a Laplace form of
5!
(56)
s6
Similarly, for the second term, from Table 4, we have that
s+a
L ( e − at cos (ωt ) ) = (57)
(s + a) + ω2
2
Comparing with the form that we have, we see that a = 5 and ω = 7. Thus, the Laplace transform
is
s+5
(58)
( s + 5)
2
+ 72
Solution
The solution will be found by treating each fraction separately and using the information
in Table 5. For the first term, the general form of the transform can be found from Table 5 as
−D
A A Ct
L−1 = e (61)
Cs + D C
Comparing the general form with our first term, we see that A = 5, C = 10, and D = 1, which
implies that the inverse Laplace form will be
67
−1
5 5 10 t
−1
L = = e 0.5e −0.1t (62)
10 s + 1 10
For the second term, the general form can be written as
−D
A A t
L−1 = t n −1 C
e (63)
Cs + D ( n − 1) !C
n
Comparing the general form with our second term, we see that A = 8, C = 2, D = 1, and n = 5,
which implies that the inverse Laplace form will be
−1 8 8 5 −1 2
−1
t 1 4 −0.5t
=
L = t e t e (64)
( 2 s + 1)
5
( 5 − 1)!2 5
96
where F is the transformed function and f the original discrete function. Conventionally, the z-
transform is denoted by a script 𝒵𝒵, (U+1D4B5). Table 6 presents a summary of the most common
z-transforms. The following are some useful properties:
1) Linearity: 𝒵𝒵(f + g) = 𝒵𝒵(f) + 𝒵𝒵(g).
2) Superposition: 𝒵𝒵(αf) = α𝒵𝒵(f).
68
3) Final Value Theorem: Assuming that the poles (roots of the denominator) lie inside the
unit circle, then 9
lim
= f k lim ( z − 1) F ( z ) (67)
k →∞ z →1
4) Initial Value Theorem: The value in the time domain at the starting point k = 0 is given
by
lim f k = lim zF ( z ) (68)
k →0 z →∞
Continuous Time
Discrete-Time Frequency Domain
Case Domain
Domain (f(kTs)) F(s)
f(t)
0 t ≠ a 0 k ≠ a
Dirac Delta, δ δ (t − a) =
δ k −a = z−a
∞ t = a ∞ k = a
Step Function, 0 t ≤ 0 0 k ≤ 0 1
u (t ) = uk =
u 1 t > 0 1 k > 0 1 − z −1
1
Exponential eat e akTs
1 − e aTs z −1
General Power 1
ak
Series 1 − az −1
As can be seen from Table 6, many of the forms involve z−1. For this reason, in process
control, it is common to treat z−1 as the variable, called the backshift operator. Converting
between the two representations is rather easy as it involves multiplying by the highest power
present in the equation.
9
The roots are expressed in terms of z. Equivalently, the system is stable.
69
The inverse operation of finding the time-domain representation given the z-transform is
performed using the inverse z-transform. Since most automation engineering examples consider
rational functions of z, this will require partial fractioning in order to split the rational function into
its constituent parts (see Appendix I for details). Once the constituent parts have been obtained,
we can then use Table 7 to find the corresponding time-domain representation. Instead of partial-
fractioning, it may be possible to perform long division to obtain the individual values. However,
this can be quite long and difficult to do.
𝒵𝒵(f(k)) yk
k
Az A A D
= yk
= −
Cz + D C + Dz −1 C C
n −1
Az ∏ ( k − j + 1)
A α k ,α = − D
yk = n j =1n −1
( Cz + D ) C α ( n − 1) ! C
n
A A k + n − 1 k D
,n∊ℤ yk = n α ,α = −
( C + Dz ) −1 n
C n −1 C
Example 6: Z-Transform
Compute the z-transform of the following function
=yk 5k − 2 , k ≥ 2 (69)
Solution
From Table 6, we see that an exponential function ak has the z-transform
1
(70)
1 − az −1
In our case, this implies that a = 5. However, we can note that the values are delayed by 2 samples.
Therefore, we will need to also use the delay formula from Table 6 to obtain the final result. Thus,
the z-transform is
z −2
(5 k −2
) = 1 − 5z −1 (71)
70
Example 7: Inverse z-Transform
Compute for the following frequency-domain function
2
(72)
1 + 5z −1
the corresponding time-domain representation.
Solution
From Table 7, we can see that this represents the first case with A = 2, C = 1, and D = 5.
This implies that the time-domain representation is
k k
2 A D 2 5
= − = − =2 ( −5 )
k
−1 −1
(73)
1 + 5z C C 1 1
Finally, we can note that there is a relationship between the Laplace transform of the
continuous time domain and the z-transform of the discrete time domain. If we set
z = esT (74)
This means that results obtained in the continuous domain will have a transformed representation
in the discrete domain. Of note, the imaginary axis of the continuous domain is mapped onto the
boundary of the unit circle. This relationship will appear in our further analysis.
The order of a polynomial, denoted by n, is defined as the highest power present in a given
polynomial, for example, x4 + x2 is a fourth-order polynomial, since the highest power is 4. The
71
order of a transfer function is equal to the order of the denominator polynomial, D. A transfer
function is said to be proper if the order of the numerator, N, is less than or equal to the order of
the denominator, D, that is, nN ≤ nD. A transfer function is said to be strictly proper if the order
of the numerator, N, is less than the order of the denominator, D, that is, nN < nD. For most physical
processes, a transfer function will be strictly proper.
A process is said to be causal if the time delay, θ (or k) is positive; otherwise, the process
is noncausal. In the discrete domain, causality is ensured by a proper transfer function. A causal
process does not depend on unknown future values. Again, all physical processes must be causal
or else they would be able to predict the future.
The poles of a transfer function are defined as the roots of the denominator, D, that is, those
values of s (or z) such that D = 0. The zeros of a transfer function are defined as the roots of the
numerator, N.
A process is said to be at steady state if all derivatives are equal to zero, that is,
dx
=0 (77)
dt
If Equation (77) does not hold, then the process is said to be operating in transient mode. It should
be noted that small deviations from zero do not necessarily mean that the process is now in a
transient mode. In practice, it may not be possible to achieve an exact steady state, where all the
derivatives are exactly equal to zero, both due to continual small fluctuations and measurement
imprecisions. In such cases, it is common to define the settling time, ts, of a process as the time it
takes for the process to reach and stay within an envelope centred on the new steady-state value
and has bound that are 5% of the change in the process variable. Figure 15 shows who the settling
time is computed.
72
New Steady State
Step Change
M
Original Steady
State
ts
For a process modelled by a continuous transfer function, there are three key parameters of
interest: gain, time constant, and time delay (deadtime or process delay). The gain, K, of the
process represents the steady-state behaviour of the system for a unit change in the input. It is
defined as
y (t → ∞ )
K= (78)
u (t → ∞ )
where it is assumed that the input is bounded as t → ∞. The gain is the same irrespective of the
bounded input used. Using the final value theorem for a general transfer function and a step change
in the input, it can be seen that
sG ( s )
=K lim
= sY ( s ) lim = lim G ( s )
s →0 s →0 s s →0
= lim n
( bn −1s n −1 + + b0 )
e −θ s (79)
( n−1s + + a0 )
s →0 s + a n −1
b0
=
a0
The ratio b0 / a0 is called the gain, K, of the process.
The process time constant represents the transient or dynamic component of the system,
that is, how quickly the system responds to changes in the input and reaches a new steady-state
73
value. The larger the time constant the longer it takes to reach steady state. It can be obtained from
the transfer function by factoring the denominator into the form
(b n −1 s n −1 + + b0 )
=
(b n −1 s n −1 + + b0 )
(80)
(s n
+ an −1s n −1 + + a0 )
n
∏ (τ s + 1)i
i =1
which gives the time constants, τ, of the process. If there are multiple time constants, then the
largest time constant will determine the overall process response speed.
The final parameter of interest is the time delay, θ, which measures how long it takes
before the system responds to a change in the input. Time delays can arise from two different
sources: physical and measurement. Physically, time delays are perceived times at which a system
is not responding to changes in the input. They can arise if it takes time for an observable change
to be seen, for example, heating a large tank would take some time before the temperature rises by
an appreciable amount that can be measured. On the other hand, measurement time delays arise
due to the placement of sensors. In many systems it may not be possible to measure the variable
immediately where it will act on the process. In this case, it will take some time before the variable
actually affects the system, for example, the flow rate in a pipe could be measured at the beginning
of the pipe and it could take some time before it will reach the process. In the frequency domain,
the time delay is found as
e−θs (81)
where θ is the time delay. In many applications, it may be necessary to convert the exponential
form of the time delay into a polynomial expansion. This conversion can be accomplished using
the Padé approximation, denoted as the n/m Padé Approximation, where n is the order of the
polynomial in the numerator and m is the order of the polynomial in the denominator. The 1/1
Padé approximation is given as
θ
1− s
e −θ s = 2 (82)
θ
1+ s
2
The 2/2 Padé approximation is given as
θ θ
1− s+ s2
e −θ s
= 2 12 (83)
θ θ 2
1+ s+ s
2 12
74
A table of the Padé Approximation for the exponential function up to 3/3 are given in Table 8,
from which the Padé Approximation for the deadtime can be easily derived.
n
→ 0 1 2 3
m↓
1 1
1 1
0 1 1 2 1 3
1 1− z 1− z + z2 1− z + z − z
2 2 6
1 1 1
1+ z 1+ z 1+ z
1+ z 2 3 4
1 1
1 2 1 3 1 2 1 3
1− z 1− z + z2 1− z + z − z
2 3 6 4 4 24
2 1 1 1 2 1 2
1 2 1+ z + z2 1+ z + z2 1+ z + z
1+ z + z 3 6 2 12 5 20
2 2 1 1 1 3 3 2 1 3
1 1− z 1− z + z2 1− z + z − z
3 2 12 5 20 60
3 1 1 3 3 3 2 1 3 1 1 2 1 3
1 1 1+ z + z2 + z 1+ z+ z + z 1+ z+ z + z
1 + z + z 2 + z3 4 4 24 5 20 60 2 10 120
3 2 6 1 2 1 2 1 1 2 1 3
1 1− z 1− z + z 1− z + z − z
4 5 20 2 10 120
Solution
Re-arranging into the required form gives
Y ( s ) 1/ 3
G
= ( s ) = 5 e−5s (85)
U (s) s +1
3
from which, by inspection, the gain is ⅓ and the time constant is 5 / 3. The time delay is 5.
75
graphically and was once used extensively before the advent of computers. Understanding the
principles of frequency-domain analysis is still important, especially when designing various
filters for electronic systems, such as microphones.
Frequency domain methods are based on setting s = jω, where j is the imaginary number
1 and ω is the frequency. This basically means that we are considering the response of the system
to sinusoidal waves with different frequencies. The goal is to see how the process changes the
amplitude or strength and the phase shift, that is, assuming that the original input has the form
sin ωt (86)
the response will have the form
A sin (ωt + φ ) (87)
where A is the amplitude and ϕ is the phase shift. Consider a general transfer function, G(s), then
define the argument ratio, AR, (which corresponds to a normalised amplitude) as
Re ( G ( jω ) ) + Im ( G ( jω ) )
2 2
AR G
= = ( jω ) (88)
where Re is the real component of a complex number, Im is the imaginary component, and ||·|| is
the modulus function defined as above. It should be noted that it in many applications, the
logarithm of the argument ratio is used. In most cases, a base 10 logarithm is used. Occasionally,
a decibel logarithm will be used, that is, AR = 20 log ||G(jω)||. The phase angle, ϕ, conventionally
expressed in degrees, is defined as
Im ( G ( jω ) )
φ = arctan (89)
Re ( G ( jω ) )
where arctan is the standard inverse tangent function defined on ]−90°, 90°[. It should be noted
that if the denominator is negative, then it is necessary to add 180° to the value obtained previously.
This is because the arctan function does not work on the complete circle. 10
It can be noted that if the original transfer function is a product of simpler transfer functions,
that is,
G ( s ) = ∏ Gi ( s ) (90)
10
In some programmes, an “astronomical” arctangent function is defined as arctan2(y, x), which will return the value
in the correct quadrant based on the signs of y and x. If available, it should be used.
76
then the argument ratio can be computed as
AR = ∏ AR Gi ( s ) (91)
which is the sum of the individual argument ratios corresponding to each simpler transfer function.
The phase angle can be computed as
φ = ∑ φGi ( s ) (92)
These two formulae can simplify the determination of the argument ratio and phase angles of
complex transfer functions. This formulae result from the fact that all transfer functions can be
expressed in polar form as G(jω) = ||G(jω)||e−ϕj, from which it is easy to see that combining
multiple transfer functions as given by Equation (90), the given formulae will result.
The argument ratio and phase angle can be graphically presented in two different forms,
either as a Bode plot or as a Nyquist plot. In a Bode plot, the x-axis is the frequency, ω, and the
y-axis is either the argument ratio or phase angle. A typical Bode plot is shown in Figure 16.
Argument Ratio,
AR = 1
AR(ϕ = 180°)
AR
Frequency, ω
ϕ(ω(AR = 1))
Phase angle, ϕ
ϕ = 180°
ωg ωc Frequency, ω
Figure 17: Bode Plot: The Argument Ratio and Phase Angle Plots
In a Nyquist plot, the real component of G(jω) is plotted on the x-axis and the imaginary
component of G(jω) is plotted on the y-axis. A typical Nyquist plot is shown in Figure 17. Both
graphs give similar information. In most applications, Bode plots are used, but a Nyquist plot can
be useful to analysis the interactions between different systems.
77
(-1,0)
78
domain, the magnitude of all the poles must be less than 1, that is, the poles must lie inside the unit
circle, for the process to be stable; otherwise, the process is unstable. 11
Finally, it can be noted that if the state-space representation is stable, then so will the
transfer function representation be. However, the converse is not true, since each transfer function
does not have a unique state-space representation and it is possible to construct an unstable state-
space representation for a stable transfer function, by adding an unobservable unstable state.
Table 9: Summary of the Stability Conditions for Different Representations and Time Domains
space matrix, A
Transfer
Poles of the transfer function
Function Re(p) < 0 Re(p) ≥ 0
(Roots of D)
z2
G3 ( z ) = (95)
z 4 + z3 + z 2 + z −1
11
In the discrete domain with a transfer function, it is very important to take into consideration what variable is being
used and how the stability condition is being phrased. Often, especially in control, stability is discussed in terms of
z−1, in which case the above rules need to be inverted, that is, stability implies poles outside the unit circle. For
consistency, stability in this book will be discussed in terms of z.
79
Solution
For G1, setting 5s + 3 equal to zero and solving, gives a pole of −3/5. According to the
results in Table 9 for a continuous transfer function, the system is stable, since the pole is less than
zero.
For G2, setting the two terms to zero and solving, gives poles of −3/5 and ±2i. From Table
9 for a continuous transfer function, we conclude that the system is marginally stable since the we
have two poles with a real component equal to zero and one pole whose value is less than zero.
For G3, the setting the denominator equal to zero and solving, gives poles of −1.291,
−0.1141±1.217i, and 0.519. For a discrete transfer function, Table 9 states that in order for the
system to be stable, the magnitude of the roots must be less than one. We see that we have at least
one pole (−1.291) whose magnitude will be greater than zero. This implies that the system will be
unstable.
Example 10: Determining the Stability of a State-Space Model
Determine if the given A-matrices represent stable continuous processes:
2 0
A1 = (96)
3 −2
−5 5 6
A2 0 −3 2
= (97)
0 0 −1
2 1
A3 = (98)
−1 2
Solution
For A1, since it is a triangular matrix, the eigenvalues can be directly found by looking at
the main diagonal entries. This implies that the eigenvalues are 2 and −2. According to the results
in Table 9 for a continuous state-space model, the system is unstable, since one of the eigenvalues
is greater than zero.
Likewise, for A2, we can find the eigenvalues by looking at the main diagonal entries. This
gives −5, −3, and −1. Since all of the eigenvalues are less than zero, from Table 9 for a continuous
state-space model, we conclude that the system is stable.
For A3, we need to compute the eigenvalues as follows
80
det ( λ I − A3 ) =( λ − 2 ) − (1)( −1)
2
= λ 2 − 4λ + 5 (99)
= 2±i
Since the real part of the eigenvalues is greater than zero, from Table 9 that states that in order for
the system to be stable, the real part of roots must be less than zero, we conclude that the system
is unstable.
where λi( ) = an − 2i + 2 and λi( ) = an − 2i +1 (the first two rows are the coefficients of the
1 2
polynomial of interest). Any values that are not given are assumed to be zero.
81
d) Continue computing this value until the table has n + 1 rows.
e) A polynomial is stable (all roots are negative) if all the values in the first column
have the same sign, either strictly positive or strictly negative.
Row 1 2 3 …
1 an an − 2 an − 4 …
2 an − 1 an − 3 an − 5 …
3 an −1an − 2 − an an −3 an −1an − 4 − an an −5
b1 = b2 = …
an −1 an −1
4 b1an −3 − b2 an −1
c1 = …
b1
…
n+1 z1
4
2) G ( s ) =
s 4 + 3s 3 + s 2 + 2 s + 1
Solution
For the first transfer function, we can determine the stability by inspection. Since we are
missing one of the powers (s5) and the coefficients are both negative and positive, we can conclude
on the basis of condition (1) of the Routh stability analysis that this transfer function is unstable.
For the second transfer function, we see that condition (1) is satisfied, as all the powers are
present and the coefficients have the same sign. Therefore, we will need to construct the Routh
array in order to determine the stability. There will be 3 (always n / 2, rounded up) columns in the
array. In the first row (denoted as 1 in Table 11), we place the even coefficients ordered in
82
decreasing powers. In the second row, we place the odd coefficients. In Rows 3, 4, and 5, we
compute the values using the formula:
an −1an − 2 − an an −3 3 (1) − 1( 2 ) 1
=b1 = =
an −1 3 3
an −1an − 4 − an an −5 3 (1) − 1( 0 )
=b2 = = 1
an −1 3
c1 =
( 13 ) 2 − 3 (1) = −7
1
3
−7 (1) − ( 13 )( 0 )
=z1 = 1
−7
It can be noted that any values that do not exist (such as an – 5) are equal to zero. We will always
have n + 1 rows. The formulae used to compute the subsequent values are essentially determinants
with the sign in the numerator flipped.
Row 1 2 3
1 1 1 1
2 3 2
3 ⅓ 1
4 −7
5 1
From Table 11, we see that there is a sign change in Column 1, which implies that the system is
unstable.
83
with the Routh stability test, a table is constructed using the following approach. Consider that the
polynomial of interest is given as
D ( z )= an z n + an −1 z n −1 + + a1 z + a0 (102)
Construct the following table (similar to that shown in Table 12), where the first row contains all
the coefficients starting from a0 and ending with an. The second row is the first row reversed, that
is, the first column contains an, and the last column contains a0. The third row is computed using
bi a0 ai − an an −i
= (103)
while the fourth row is the third row reversed. Note that only the first n values are reversed.
Effectively, we have now created a new reduced polynomial that needs to be analysed. Thus, the
fifth row is computed using the same formula as for the third row given by Equation (103), but
replacing n by n – 1 coefficients, that is,
ci b0bi − bn −1bn −1−i
= (104)
This procedure is then repeated until there is row with only 3 elements left (denoted as q0, q1, and
q2), that is, the table will have 2n – 3 rows. In general, for the (2j + 1)th row (j = 1, 2, …, n – 2),
that is, each odd-numbered row, we can write the relationship as follows
where di( ) = ai , that is, the first row contains the actual polynomial coefficients. The (2j + 2)th
1
row, that is, the even row, will then be the n – j + 1 coefficients written in reversed order. It can be
noted that the odd rows are essentially a determinant of the above two rows.
The conditions for stability can then be stated as:
1) D(1) > 0
2) (−1)nD(−1) > 0
3) |a0| > |an|
4) |b0| > |bn − 1|, and continuing in this manner until the last row is reach, where |q0| > |q2|.
If any of the above conditions fail, then the system will have at least one pole outside the unit circle
and hence be unstable.
Row 0 1 … n−1 n
1 a0 a1 … an − 1 an
84
2 an an − 1 … a1 a0
3 b0 a0 a0 − an an
= b1 a0 a1 − an an −1
= … bn −1 a0 an −1 − an a1
= 0
4 bn − 1 bn – 2 … b0 0
5
…
…
2n − 3 q0 q1 … … 0
Example 12: Example of Jury Stability Analysis
Using Jury stability, determine the stability of the following two discrete transfer functions:
5
1) G ( z ) =
z + 5 z + 6 z + 2 z 2 + 3z + 1
6 4 3
4
2) G ( z ) =
10 z 4 + 3 z 3 + z 2 + 5 z + 1
Solution
For the first transfer function, we need to test the initial constraints before we consider
creating the table. For condition 1, D(1) > 0, we get
1 + 5 + 6 + 2 + 3 + 1 = 18 > 1
which implies that this condition is satisfied. Condition 2, (−1)nD(−1) > 0, gives
(−1)6[1(−1)6 + 5(−1)4 + 6(−1)3 + 2(−1)2 + 3(−1)1 + 1] = 0
which is not satisfied. This implies that the first transfer function is not stable.
For the second transfer function, testing the three initial conditions gives
Condition (1): 10 + 3 + 1 + 5 + 1 = 20 > 0 (satisfied)
Condition (2): (−1)4[10(−1)4 + 3(−1)3 + (−1)2 + 5(−1)1 + 1] = 4 > 0 (satisfied)
Condition (3): |an| > |a0| ⇒ |10| > |1| (satisfied)
Since all the preliminary conditions have been satisfied, the Jury array can be constructed. This is
shown in Table 13. The first row consists of the coefficients arranged in increasing powers, while
the second row consists of the coefficients arranged in decreasing power. In Row 3, we enter
compute the values using the formula
bi a0 ai − an an −i
= (106)
which gives
85
b0 = 1(1) − 10 (10 ) =
a0 a0 − a4 a4−0 = −99
b1 = (1) 5 − 10 ( 3) =
a0 a1 − a4 a4−1 = −25
b2 =− 1(1) − 10 (1) =
a0 a2 a4 a4− 2 = −9
b3 = 3 (1) − 10 ( 5 ) =
a0 a3 − a4 a4−3 = −47
From here, we should check that the condition |b0| > |bn – 1| is satisfied. Since |−99| > |−47|, it holds
and we proceed to the next step. We reverse the order of the remaining n – 1 coefficients and write
them in Row 4. Effectively, we have created a new polynomial of order n – 1 that we need to test.
Thus, in Row 5, we will use a modified form of Equation (106) to give
ci b0bi − bn −1bn −i −1
= (107)
Effectively, this is the same as Equation (106), but with the value of n reduced by 1. Evaluating
Equation (107) for the n – 2 columns gives
Since we are left with three columns, we simply need to determine |q0| > |q2|, which in our case
becomes |7592| > |−284|. Since it holds, we can conclude that the system is stable.
Row 0 1 2 3 4
1 1 5 1 3 10
2 10 3 1 5 1
3 −99 −25 −9 −47
4 −47 −9 −25 −99
5 7592 2052 −284
86
Gc G p
Gcl = (108)
1 + Gc G p
Since it has been shown that the poles of the system are the determining factor for stability, it
therefore suffices to consider only the denominator of the closed-loop transfer function, that is, the
term 1 + GcGp. It is possible to apply either the Routh or the Jury Stability Tests to determine under
what conditions the system will be stable.
However, in some circumstances, it can be instructive to look at the frequency domain plots,
especially the Bode plot to determine stability. In order to make the analysis simpler, we will
rewrite the denominator to
GcGp = −1 (109)
Taking the magnitude (or modulus) of Equation (109) gives
||GcGp|| = ||−1|| (110)
while the phase angle for −1 is −180°, since the imaginary component is 0 and the real component
is −1, which after subtracting −180° gives the correct location. Therefore, plotting the Bode plot
for the open-loop transfer function GcGp will allow the stability of the system to be determined by
examining the critical frequency, ωc, which is the frequency corresponding to a phase angle of
−180°. If the value of argument ratio at this point is greater than 1 (or 0 if a logarithmic basis is
being used), then the process will be closed-loop unstable. An example is shown in Figure 18.
87
Argument Ratio,
AR AR(ϕ = 180°)
Frequency, ω
Phase angle, ϕ
ϕ = 180°
ωg ωc Frequency, ω
Furthermore, we can define two additional parameters of interest: the gain margin (GM)
and the phase margin (PM). These two margins represent how much room we have before the
system becomes unstable. On a Bode plot, instability implies an argument ratio above 1 (or 0 for
the logarithmic case) or a phase angle below −180°. These parameters are shown in Figure 19 for
the Bode plot and in Figure 20 for the Nyquist plot. The phase margin is defined by adding 180°
to the phase angle when the gain crosses the value of 1, which is denoted by ωg and called the gain
crossover, that is,
PM = ϕ(ωg) + 180° (111)
The gain margin is defined as the difference between 1 (or 0 for a logarithmic case) and the value
when the phase angle crosses the phase angle of −180°, which is denoted by ωp and called the
phase crossover, that is,
GM = 1 – AR(ωp) (112)
It is possible to design controllers by specifying the phase and gain margins.
88
Figure 20: Closed-loop stability using the Bode plot
89
2
1) = has full rank n, where is the observability matrix.
n −1 nq×n
t
2) The observability Grammian, o ( t )n×n = ∫ e τ T eτ dτ is nonsingular for all t > 0. The
T
− λi
3) The n-by-n matrix has rank n for all eigenvalues λi of 𝒜𝒜. This allows the
individual states or eigenvalues of 𝒜𝒜 to be classified.
A system is said to be detectable if all unstable states of a state-space representation can be
− λi
observed. This can be determined by examining for each of the unstable states and
determining if it is full rank.
The state equation or the pair (𝒜𝒜, ℬ) are said to be controllable if and only if for any initial
state, x0, and final state, x1, there exists an input, u(t), that transfers x0 to x1 in finite time. This can
be accomplished if and only if:
1) n×np = 2 n −1 has full rank n.
t
2) The controllability Grammian, c ( t )n×n = ∫ eτ T e τ dτ , is nonsingular for all t > 0.
T
c −1 is a measure of the energy required to control the process. A larger value implies that
90
It can be noted that controllability and observability are duals of each other, that is, if (𝒜𝒜,
ℬ) is controllable, then (𝒜𝒜T, ℬT) is observable. Similarly, if (𝒜𝒜, 𝒞𝒞) is observable, then (𝒜𝒜T, 𝒞𝒞T) is
controllable.
This shows that the integrator will continual increase even if the input is bounded. A representative
plot is shown in Figure 21. Its Bode plot can be determined as
91
MI M j
GI ( jω ) = = − I
jω ω
2
M M
⇒ AR= 02 + − I = I (116)
ω ω
MI
− ω
φ=arctan = −90°
0
A representative Bode plot is shown in Figure 22. The key properties of the integrator are
summarised in Table 14.
Property Value
MI
Laplace Transform GI =
s
Step Response (Time Domain) yt = MIMt
AR |MI| / ω
Bode
Plots
ϕ −90°
Stable No
92
100
90
80
70
60
Response
50
40
30
20
10
0
0 10 20 30 40 50 60 70 80 90 100
Time
g
1.5
Magnitude (abs)
0.5
0
-89
-89.5
Phase (deg)
-90
-90.5
-91
0 1
10 10
Frequency (rad/s)
93
Section 3.3.4.2: Lead Term
The lead term is a simple, first-order transfer function that is occasionally found in
combination with other transfer function to model unusual or more complex initial dynamics in a
process. Its Laplace transform is
GL K (τ L s + 1)
= (117)
where K is the gain and τL is a time constant. The step response of the system can be determined
as
Y = GLU
M
=Y K (τ L s + 1) (118)
s
(τ s + 1)
= KM L
s
In order to obtain a time-domain representation, it is necessary to perform a partial fraction
decomposition of Equation (118) to give
Y = KM
(τ L s + 1)
s (119)
1
=Y KM τ L +
s
From the Table of Laplace transforms, the time domain representation for Equation (119) is
=yt KM (τ Lδ + ut ) (120)
where δ is the Dirac delta function and ut is the unit step function. This shows that the lead function
is bounded. Its Bode plot can be determined as
GI ( jω ) = K (τ L jω + 1) = K + Kτ Lω j
⇒ AR= K 2 + ( Kτ Lω ) =
2
K 1 + τ L2ω 2 (121)
Kτ Lω arctan τ Lω K >0
=φ arctan
= arctan τ ω + 180° K < 0
K L
A representative Bode plot is shown in Figure 23 for all 4 possible combinations of K and τL. The
key properties of the lead term are summarised in Table 15.
Property Value
94
Laplace Transform GL K (τ L s + 1)
=
Step Response (Time Domain) yt = KM(τLδ + ut)
Bode Plots AR K 1 + τ L2ω 2
arctan τ Lω K >0
ϕ
arctan τ Lω + 180° K <0
Stable Yes
Negative values of τL (positive zeros) can
induce an inverse response in a system, that
Comment is, the variable first decreases in value and
increases to reach its new steady-state value
(or vice versa).
95
Bode Diagram Bode Diagram
25 25
20 20
Magnitude (abs)
Magnitude (abs)
15 15
10 10
5 5
0 0
90 360
Phase (deg)
Phase (deg)
45 315
0 270
-2 -1 0 1 -2 -1 0 1
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Bode Diagram
25 Bode Diagram
25
20
20
Magnitude (abs)
Magnitude (abs)
15
15
10
10
5
5
0
0
270 180
Phase (deg)
Phase (deg)
225 135
180 90
-2 -1 0 1 -2 -1 0 1
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Figure 24: Bode Plot for a Lead Term (top row) K > 0, (bottom row) K < 0, (left) τL > 0, and (right) τL < 0
= KM
The process is stable if τ > 0, but unstable if τ < 0. The time response of a stable first-order system
are shown in Figure 24, as well as how to compute the key parameters from its graph. Its Bode
plot can be determined as
K K (1 − τ pω j )
GI ( jω )
= =
(τ p jω + 1) 1 + τ p2ω 2
K 2 + ( − Kτ pω )
2
K
⇒ AR= = (128)
(1 + τ ω
2
p
2 2
) 1 + τ p2ω 2
− Kτ pω − arctan τ pω K >0
=φ arctan
=
K 180° − arctan τ pω K <0
97
In order to avoid a discontinuity when it pass through 0°, it is common to use negative angles when
plotting this function, that is −45° rather than the equivalent 315°. A representative Bode plot is
shown in Figure 23 for all 4 possible combinations of K and τp. The key properties of the first-
order system are summarised in Table 15.
Property Value
K
Laplace Transform GF =
(τ p s + 1)
−
t
K
AR
1 + τ p2ω 2
Bode Plots
− arctan τ pω K >0
ϕ
180° − arctan τ pω K <0
Stable If τp > 0
This is one of the most common transfer
function encountered in process control and is
Comment
used to model many different applications,
often by including a time delay term.
98
Step Change in the Manipulated Variable
Manipulated Variable
M
KM
Output Variable
Dead Time, θ τ
99
Bode Diagram
Bode Diagram
1
1
0.8 0.8
Magnitude (abs)
Magnitude (abs)
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 90
Phase (deg)
Phase (deg)
-45 45
-90 0
-3 -2 -1 0 -3 -2 -1 0
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Bode Diagram
1
Bode Diagram
1
0.8
Magnitude (abs)
0.8
0.6
Magnitude (abs)
0.6
0.4
0.4
0.2
0.2
0
0 -90
180
Phase (deg)
Phase (deg)
-135
135
90 -180
-3 -2 -1 0 -3 -2 -1 0
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Figure 26: Bode Plot for a First-Order System (top row) K > 0, (bottom row) K < 0, (left) τp > 0, and (right) τp < 0
where K is the gain, τp is the process time constant, and ζ is the damping coefficient. This basic
transfer function can be augmented by adding a lead term to model various behaviours to give
K (τ L s + 1)
GII = (130)
(τ s + 2ζτ p s + 1)
2 2
p
100
As well, it can be coupled with a deadtime term to give a second-order plus deadtime (SOPDT)
process model, that is,
K
GIID = e −θ s (131)
(τ s + 2ζτ p s + 1)
2 2
p
−2ζτ p ± 4ζ 2τ p2 − 4τ p2
s=
τ p2
(132)
−2ζ ± 2 ζ 2 − 1
=
τp
Depending on the value of ζ, three different cases can be determined:
1) Case I: Underdamped System, where |ζ| < 1. In this case, the roots will contain an
imaginary component.
2) Case II: Critically Damped System, where |ζ| = 1. In this case, the roots will both be
real and the same.
3) Case III: Overdamped System, where |ζ| > 1. In this case, the roots will both be real.
The behaviour and critical information depends on the particular case being considered.
For the underdamped case, where |ζ| < 1, the poles of Equation (129) will contain an
imaginary component. The presence of an imaginary component will imply that there will be
oscillations present in the time response. If ζ = 0, then the system will continuously oscillate about
a mean value (marginally stable), while in all other cases, stability will depend on the sign of ζτp;
if positive, the system will be stable; if negative, the system will be unstable. The step response of
this system can be written as
−ζ t 1− ζ 2 ζ2 1− ζ 2
y (t ) =
KM 1 − e
τp
cos t+ sin t (133)
τp τp
1− ζ 2
A typical underdamped step response is shown in Figure 26. Some of the key parameters that can
be extracted from a step response are:
1) Time to First Peak: t p = πτ
1− ζ 2
−πζ a
Overshoot: OS exp
2)= = .
1 − ζ 2 b
101
3) Decay Ratio: The decay ratio is the square of the overshoot ratio, i.e.
−2πζ c
=DR exp
= 2
1 − ζ a.
4) Period of Oscillation: This is the time between 2 oscillations. It is given by
2πτ
P= .
1− ζ 2
5) Settling Time, ts: The time required for the process to remain within 5% of the steady-
state value. The first time this occurs is called the settling time.
6) Rise Time, tr: Time required to first reach the steady state value.
Period
New Steady State
a
Step Change
b
M
Original Steady
State
tr
ts
Dead Time, θ tp
For the critically damped system, where |ζ| = 1, the poles of Equation (129) will both be
the same and contain no imaginary component. The system will be stable if the sign of ζτp is
positive and unstable if ζτp is negative. The step response of this system can be written as
t −ζ t τ
(t ) KM 1 − 1 + e p
y= (134)
τp
102
A typical stable, critically damped step response is shown in Figure 27. In general, such a system
looks very similar to a first-order plus deadtime system and is often analysed as such. The biggest
difference is the slightly slower initial response, which is often treated as a time delay.
1
0.9
0.8
0.7
0.6
Response
0.5
0.4
0.3
0.2
0.1
0
0 20 40 60 80 100 120
Time (s)
For the overdamped case, where |ζ| > 1, the poles of Equation (129) will only be real
numbers. This implies that there will be no oscillations in the step response. The system will be
stable if the sign of ζτp is positive and unstable if ζτp is negative. The step response of this system
can be written as 12
−ζ t ζ 2 −1 ζ2 ζ 2 − 1
KM 1 − e p cosh
y (t ) =
τ
t+ sinh t (135)
τp ζ 2
− 1 τp
A typical overdamped step response is shown in Figure 28. In most cases, this system can be
analysed as a first-order plus deadtime process. It can be noted that the overdamped case has the
slowest initial response of all second-order and first-order systems. This slow initial response is
often treated as a deadtime when fitting a first-order system.
cosh is the hyperbolic cosine function defined as ½(ex + e−x) and sinh is the hyperbolic sine function defined as
12
½(ex – e−x).
103
1
0.9
0.8
0.7
0.6
Response
0.5
0.4
0.3
0.2
0.1
0
0 20 40 60 80 100 120 140 160
Time (s)
K K K (1 − τ p2ω 2 − 2ζτ p jω )
=GII ( jω ) = =
τ p2 ( jω ) + 2ζτ p jω + 1 1 − τ pω + 2ζτ p jω (1 − τ p2ω 2 ) + 4ζ 2τ p2ω 2
2 2 2 2
K 2 (1 − τ p2ω 2 ) + K 2 ( −2ζτ pω )
2 2
K
⇒ AR= =
((1 −τ ω ) + 4ζ τ ω )
2
(1 − τ p2ω 2 ) + 4ζ 2τ p2ω 2
2
2 2 2 2 2 2
p p
2ζτ pω
− arctan K > 0, τ pω < 1
1 − τ p2ω 2
2ζτ pω
− arctan − 180° K > 0, τ pω > 1
− K 2ζτ pω 1 − τ p2ω 2
=φ arctan
=
K (1 − τ p2ω 2 ) 2ζτ pω
180° − arctan K < 0, τ pω < 1 (136)
1 − τ p2ω 2
2ζτ pω
− arctan K < 0, τ pω > 1
1 − τ p2ω 2
When dealing with second-order systems, there is a potential that the amplitude ratio can
be greater than the original starting value of |K|. Specifically, this occurs whenever the denominator
104
is less than 1. Taking the denominator of the amplitude ratio for a second-order system and solving
it gives
(1 − τ ω 2 ) + 4ζ 2τ p2ω 2 < 1
2 2
p
Since the frequency is only a positive real number, the term under the square root must also only
be positive (since a negative would give a complex number), that is,
2 − 4ζ 2 ≥ 0
(138)
ζ ≥ 0.5 ≈ 0.707
If the damping coefficient lies within the region given by Equation (138), then there will be a hump
in the Bode plot, as shown in Figure 29 (top). Since these frequencies magnify the system response,
it is important that special care be taken when designing controllers for such systems.
If a lead term has been added to a second-order system, as given by Equation (130), then
the system will display an inverse response if the zeros of the transfer function are positive, for
example, as shown in Figure 30. The Bode plot for this composite system can be obtained by
invoking the rules for combinations of transfer functions, that is,
K (τ L s + 1)
=GII = G G
(τ p2 s 2 + 2ζτ p s + 1) II L
K 1 + τ L2ω 2
=AR AR
= II AR L
(1 − τ ω )
2
p
2 2
+ 4ζ 2τ p2ω 2 (139)
2ζτ pω
φ = φII + φL = arctan τ Lω − arctan
1 − τ p2ω 2
(ignoring all angle complications)
An example is shown in Figure 31.
105
Representative Bode plots are shown in Figure 29 for different combinations of the parameters.
The key properties of the first-order system are summarised in Table 1.
Property Value
K
Laplace Transform GII =
(τ s + 2ζτ p s + 1)
2 2
p
2ζτ pω
Bode Plots
− arctan ,
ϕ 1 − τ p2ω 2
106
Bode Diagram Bode Diagram
1.5 1.5
Magnitude (abs)
Magnitude (abs)
1 1
0.5 0.5
0 0
0 180
-45 135
Phase (deg)
Phase (deg)
-90 90
-135 45
-180 0
-2 -1 0 1 -2 -1 0 1
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Bode Diagram
1 Bode Diagram
1
0.8
0.8
Magnitude (abs)
Magnitude (abs)
0.6
0.6
0.4
0.4
0.2
0.2
0 0
0 180
-45 135
Phase (deg)
Phase (deg)
-90 90
-135 45
-180 0
-3 -2 -1 0 1 -3 -2 -1 0 1
10 10 10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Bode Diagram
1 Bode Diagram
1
0.8
0.8
Magnitude (abs)
Magnitude (abs)
0.6
0.6
0.4
0.4
0.2 0.2
0 0
0 180
-45 135
Phase (deg)
Phase (deg)
-90 90
-135 45
-180 0
-3 -2 -1 0 1 2 -3 -2 -1 0 1 2
10 10 10 10 10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Figure 30: Bode Plots for τp = 5, (top) ζ = 0.5, (middle) ζ = 1, (bottom) ζ = 2; (left) K = 1 and (right) K = -1
107
1.2
0.8
0.6
Response
0.4
0.2
-0.2
0 20 40 60 80 100 120 140 160
Time, s
1
Magnitude (abs)
0.5 0.5
0 0
360 0
270
Phase (deg)
Phase (deg)
-45
180
90 -90
-3 -2 -1 0 1 -2 -1 0
10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Bode Diagram
Bode Diagram 1
1
0.8
0.8
Magnitude (abs)
Magnitude (abs)
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0
360
Phase (deg)
270
Phase (deg)
-45
180
90 -90
-3 -2 -1 0 1 2 -3 -2 -1 0 1 2
10 10 10 10 10 10 10 10 10 10 10 10
Frequency (rad/s) Frequency (rad/s)
Figure 32: Bode Plots for (left) τL = -5, (right) τL = 5, and (top) ζ = 0.5 and (bottom) ζ = 2
108
Section 3.3.4.5: Higher-Order Systems
Analysing higher-order systems is based on the results obtained from the analysis of the
simpler systems. The following are some key points to consider for the analysis in the time domain:
1) Poles: The poles of the process transfer function determine the stability of the system. If
the poles are less than zero, then the system is stable; equal to zero, marginally stable;
and greater than zero, unstable. If the poles contain an imaginary component, then there
will be oscillations in the system.
2) Zeros: If the zeros of the transfer function are positive, then there will be an inverse
response in the system.
3) Time Constant: The largest stable pole in absolute magnitude can be treated as the
dominating time constant of the process.
In the frequency domain, the Bode plots are obtained by combining the appropriate simple transfer
functions, using the rules for composition of the amplitude ratio and phase angle.
: Sketching the Expected Time-Domain Response
For the following 3 transfer functions, sketch the expected time-domain response of the
system when a step change is made:
1.54 ( −5s + 1)
1) G1 = e −10 s
( 5s + 1)( 4s + 2 )( 2s + 1)
1.54 ( 5s + 1)
2) G2 =
100s 2 − 200s + 1
1.54
3) G3 =
( −100s + 10s − 1) ( 4s + 1)
2
Solution:
First Transfer Function
For the first transfer function, the gain is 1.54 (by inspection), the zero is 0.2, and the poles
are −0.2 (= −1/5), −0.5 (= −2/4), and −0.5 (= −1/2), and the time delay is 10. Since the zero is
positive, we expect an inverse response, while all poles are negative, which implies that the system
is stable. As well, none of the poles have an imaginary component and so there are no oscillations.
The plot would therefore be as given in Figure 32 (left).
Second Transfer Function
109
For the second transfer function, the zero is −0.2. Instead of computing the poles directly,
we can note that this is a second-order system. Therefore, writing it into the standard form for a
second-order system, it can be seen that τp = 10 and ζ = −10. Since τpζ < 0, the system is unstable
and without any oscillations (|ζ| > 1). The “gain” is positive, which implies that the function will
go towards +∞. Thus, the plot would be as given in Figure 32 (middle).
Third Transfer Function
For the third transfer function, there are no zeros or deadtime. Similar to the second transfer
function, let us rewrite the denominator into the required form to give
1.54 −1 −1.54
=G3 = .
( −100s + 10s − 1) ( 4s + 1) −1
2
(100s − 10s + 1) ( 4s + 1)
2
By comparison, we can see that the second-order term has the following characteristics, τp = 10
and ζ = −0.5. This implies that the poles are unstable and oscillatory. The second term will give a
stable pole (−0.25 = −1/4). Therefore, the plot of this transfer function will be given as Figure 32
(right).
Figure 33: Sketch of the Transfer Function Step Responses: (left) first transfer function, (middle) second transfer
function, and (right) third transfer function.
It can be noted that when sketching the transfer function, it is important to only give the general
characteristics, while the exact values can be ignored.
110
ringing cases can only occur in the discrete-time domain as a result of how the discretisation is
taken.
Table 18: Graphical Representation of the Different Types of Functions (The ringing cases can only occur in the discrete
domain.)
Stable,
oscillatory
Unstable, pure
oscillatory
Unstable,
Integrator
Unstable,
exponential
growth
Unstable,
oscillatory
Ringing, stable
Ringing, stable
oscillatory
111
Location of the Poles Unit-Step Response
Case
Continuous Discrete Continuous Discrete
Ringing,
integrator
Ringing,
unstable
Ringing,
unstable,
oscillatory
We will assume that a ∊ ℝ so that values of α ≥ 0 will lead to an unstable system. It can be noted
that the results for sine will be the same mutatis mutanda. Examine the impact of the sampling
time on the resulting discrete-time function and its z-transform.
Solution
The behaviour of the transfer function is determined by the values of its poles, that is, the
roots of the denominator. Using the quadratic formula gives the general form of the poles as
112
In order to understand the behaviour of the discrete function, we will need to examine the
determinant of the equation (the part inside the square root) and consider three cases: when the
determinant is greater than zero, exactly zero, and less than zero.
Case 1: Determinant greater than zero
For the determinant to be greater than zero, it follows that
cos 2 (ωTS ) − 1 > 0 ⇒ cos 2 (ωTs ) > 1 (144)
However, the cosine function is never greater than 1. Thus, this situation cannot occur and there
will not be two distinct real roots.
Case 2: Determinant equal to zero
For the determinant to be exactly zero, it follows that
cos 2 (ωTS ) − 1 = 0 ⇒ cos 2 (ωTs ) = 1 (145)
Taking the square root of the right-hand side and noting that there are two solutions gives
cos (ωTs ) = ±1 (146)
When n is odd, the value of cos(kπn) will oscillate between 1 and −1 which will give the
characteristic ringing behaviour.
Case 3: Determinant less than zero
For the determinant to be less than zero, it follows that
cos 2 (ωTS ) − 1 < 0 ⇒ cos 2 (ωTs ) < 1 (148)
In such cases, there will be two imaginary roots that are complements of each other, that is, ψ + γi
and ψ – γi, where γ is equal to ψ 1 − cos 2 (ωTS ) . This implies that there will be a clear oscillatory
113
behaviour. If we restrict ourselves to the domain [0, 2π[, we can note that cos(ωTs) will be positive
in the region [0, 0.5π[ ∪ ]1.5π, 2π[ and negative in the region ]0.5π, 1.5π[. The function will be
exactly zero at 0.5π and 1.5π. In the positive region, this will place the poles in the right-hand side
of the discrete system, while when negative it will place them in the left-hand side leading to
ringing. When cos(ωTs) is exactly zero, we will have two roots at the origin of the system and we
will have no information about the system. This brings us directly to the constraint given by the
Shannon sampling theorem that the sampling time must lie be greater than 2/ω.
114
accepts the word; otherwise it rejects the word. The set of all words accepted by the automaton is
called the language recognised (or marked) by the automaton.
Mathematically, for a finite-state automaton A, we can write this as the quintuple
A ≡ (𝕏𝕏, Σ, f, x0, 𝕏𝕏m) (149)
where 𝕏𝕏 is the finite set of states, Σ the finite set of symbols, called the alphabet of the automaton,
x0 ∊ 𝕏𝕏 the initial state, 𝕏𝕏m ⊆ 𝕏𝕏 the set of all accepting states, and f the transition function defined
as
f: 𝕏𝕏×Σ → 𝕏𝕏 (150)
The alphabet represents all possible values that the automaton will recognise. It can consist of
letters, values, or any other acceptable symbol. An automaton generates a language, L, which
simply consists of all possible strings (irrespective of the final state) generated by the automaton.
An automaton is said to recognise (or mark) a specific language Lm.
The output function, g, determines what the output from the automaton will be. In general,
it is defined as
g: 𝕏𝕏×Σ → Y, (151)
that is, the output function depends on the state and inputs. In such cases, this automaton is called
a Mealy Automaton. On the other hand, when the output function, g, is defined as
g: 𝕏𝕏 → Y (152)
that is, the output function only depends on the state, then we have a Moore Automaton. The
input U is the sequence of letters from the alphabet that are received by the automaton.
It is also possible to provide a graphical representation of an automaton. Figure 33 shows
a typical representation of an automaton. The most important components are:
• The states are shown with “Z” followed by a number.
o Normally, Z0 is the initial state.
• Each state is enclosed by a circle.
• The initial state is shown by an arrow pointing to the state and without any additional
markings.
• The transitions between the states are shown with arrows.
• On the arrows, the combination of inputs and outputs that lead to the next state are
shown.
• Accepting states are enclosed by a double circle.
115
0
1
Z0 Z1
1
0
Figure 34: Graphical Representation of an Automaton
The sending and receiving of symbols for the inputs and outputs (U and Y) is assumed to
be instantaneous. A finite-state automaton must allocate for each input symbol at each time point
a valid transition. Often such a transition can be a self-loop, that is, a transition where the initial
and final states are the same. If an automaton cannot allocate for each input symbol at each time
point a valid transition, then deadlock is said to occur and the system comes to a standstill.
Example 14: Automaton for a Process
Consider the previously mentioned process where it was desired to find the word baba.
Draw the automaton for this process and define the all the components in the mathematical
description of the automaton.
Solution
The automaton is shown in Figure 34.
116
a b
Z0 b Z1 a Z2
a
b b b
a
Z4 Z3
a
Figure 35: Automaton for the example
The mathematical description can be stated as:
𝕏𝕏 = {Z0, Z1, Z2, Z3, Z4}
Σ = {a, b}
x0 = Z0
𝕏𝕏m = {Z4}
The transition function, f, is defined as follows:
f(Z0, a) = Z0 (which is a self-loop)
f(Z0, b) = Z1
f(Z1, a) = Z2
f(Z1, b) = Z1
f(Z2, a) = Z0
f(Z2, b) = Z3
f(Z3, a) = Z4
f(Z3, b) = Z1
f(Z4, a) = Z0
f(Z4, b) = Z1
117
Note that the transition function should match the arrows drawn in the schematic for the
automaton!
Transitions in an automaton can be spontaneous, that is, we do not know exactly when a
given transition occurs, for example, the transition from filling a tank to full can be spontaneous
(especially, if we do not know the height of the tank). Such a transition is denoted using the symbol
“ε” on the arrow. Spontaneous transitions often arise when there is incomplete knowledge of the
system. Automata containing spontaneous transitions are said to be nondeterministic, since it is
not possible to know in which states the automaton currently is. Another form of nondeterminism
is the presence of multiple transitions with the same label, for example, two transitions labelled a
leading to two different states. In such cases, it is likewise impossible to know in which state the
automaton is in. In all other cases, the automaton is said to be deterministic since it is possible to
precisely determine the next state given all past information.
The states in an automaton can be classified as follows:
1) Periodic States: Periodic states are a set of states between which the automaton can
oscillate. Normally, one takes the largest set of states between which the automaton can
oscillate.
2) Ergodic States: Ergodic states are those states once reached the automaton cannot leave.
3) Transient States: All states that are not ergodic are called transient states.
118
highly undesired. Together deadlock and livelock are referred to as blocking, since the automaton
is blocked from completing its task.
Example 15: Blocking in an Automaton
Determine if the automaton shown in Figure 35, is blocking. If it is blocking, determine
what types of blocking occur.
a a
Z0 Z1 Z2
b
a, Z6 b
a b b
a, Z3
Z4 b Z5
b
a, b
Figure 36: Automaton
Solution
Looking at Figure 35, state Z3 is an ergodic state which is not accepting. Therefore,
deadlock will occur in this state. Thus, the system is blocking. State Z3 is a deadlock. States Z5
and Z6 form a periodic set from which there is no escape. However, neither state is accepting.
Therefore, livelock will occur for these two states.
It is possible to manipulate automata. The following are some common manipulations and
their definitions:
1) Accessible Operator (Acc): This removes all unreachable states and their associated
transitions. This operation is necessary when performing more advanced manipulations on
automata to clean up the resulting automaton. This operation will not change the generated
119
or recognised languages. A state is defined as being unreachable if there exists no path
from the initial state to the given state.
2) Co-accessible Operator (CoAc): This removes any states and their associated transitions
from which one cannot end up in an accepting state. An automaton where A = CoAc(A) is
called a co-accessible automaton and is never blocking. This operation can change the
generated language but not the recognised language.
3) Trim Operator (Trim): This operation creates an automaton that is both co-accessible and
accessible. The order of operation is immaterial, that is, Trim(A) = CoAc(Acc(A)) =
Acc(CoAc(A)).
Example 16: Trimming an Automaton
Apply the trim operation to the automaton shown in Figure 35.
Solution
Quickly looking at the automaton in Figure 35, we that there are no states that cannot be
accessed from the initial state. Thus, we need to consider the co-accessible operator. Here, we see
that we need to remove states Z5, Z6, and Z3 since we know that they are blocking. However, by
removing Z3, we now make Z2 blocking. Therefore, we must also remove it. In general, this
process is iterative and continues until we have removed all states or there are no more states to
remove. The final automation in shown in Figure 36.
120
a
Z0 Z1
b
a b
Z4
( ( )
G1 × G2 ≡ Ac 1 × 2 , Σ1 ∪ Σ 2 , f , x01 , x02 , m1 × m2 ) (153)
where
( f ( x , e ) , f ( x , e ) ) if e is a valid input at the given point
f ( ( x , x ) , e ) ≡
1 2
1 1 2 2
(154)
undefined otherwise
In product composition, the transitions of the two automata are always synchronised on a common
event. This implies that a transition occurs only if the input is a valid input for both automata. The
121
states of G1 × G2 are given as the pair (x1, x2), where x1 is the current state of G1 and x2 is the
current state of G2. It follows from the definition of the product composition that
L ( G1 × G2 )= L ( G1 ) ∩ L ( G2 )
(155)
) Lm ( G1 ) ∩ Lm ( G2 )
Lm ( G1 × G2=
Product composition has the following properties:
1) It is commutative up to a re-ordering of the state components in the composed states.
2) It is associative. This implies that G1×G2×G3 ≡ (G1×G2)×G3 = G1×(G2×G3).
Example 17: Product of Two Automata
Consider the automata shown in Figure 37 and Figure 38. Determine the product of these
two automata.
G1 a
x
a y b
g
a, g
z
b
Figure 38: G1
122
b
G2 b
0 1 a
a
Figure 39: G2
Solution
Before we can start with drawing the final automaton, it makes sense to first consider which
inputs are valid for the final automaton. From Figure 37, it can be seen that, for G1, the inputs are
{a, b, g}. Similarly, from Figure 38, it can be seen that, for G2, the inputs are {a, b}. Therefore,
the common set is {a, b}.
When drawing the final automaton, it helps to start from the initial states of both and work
through all the possible transitions and draw the next state. Thus, starting from (x, 0), with an input
of a, G1 remains in state x, but G2 goes to state 1. Therefore, the new state in the product automaton
will be (x, 1). This is the only valid transition since from (x, 0), an input of b is not valid for G1.
An input must be valid for both automata for it to occur in the product. Note that g will not occur
since it is not a common input. We will then continue in the same fashion by looking at the possible
states and how the inputs would affect them. A state will be marked if all the states in the original
automaton are marked. The final automaton is shown in Figure 39.
G1×2
(x,0)
a
(x,1) a
Figure 40: The product of G1 and G2
As can be seen the product composition is relatively restrictive in that a given input must
be valid for both automata. One way to relax this constraint is to consider parallel composition. In
parallel composition, the inputs are split into two parts: common inputs and private inputs. A
123
private input only pertains to a given automaton, while common inputs are shared with other
automata. Formally, the parallel composition of two automata G1 and G2, denoted as G1 || G2, is
defined as
( ( )
G1 || G2 ≡ Ac 1 × 2 , Σ1 ∪ Σ 2 , f , x01 , x02 , m1 × m2 ) (156)
where
( f1 ( x1 , e ) , f 2 ( x2 , e ) ) if e is a valid common input for both automata
( f1 ( x1 , e ) , x2 ) if e is a private event to G1
f ( ( x1 , x2 ) , e ) ≡ (157)
( x1 , f 2 ( x2 , e ) ) if e is a private event to G2
undefined otherwise
Note that the only difference between parallel and product composition is how the transition
function is defined.
Product composition has the following properties:
1) It is commutative up to a re-ordering of the state components in the composed states.
2) It is associative. This implies that G1 || G2 || G3 ≡ (G1 || G2) || G3 = G1 || (G2 || G3).
Example 18: Parallel Composition of Two Automata
Consider the same two automata as for Example 1Example 17 and shown in Figure 37 and
Figure 38. Determine the parallel composition of these two automata.
Solution
The general procedure for solving such a problem is similar to that of the product
composition. First, we need to determine which inputs belong to which categories. Since input g
only affects G1, it is a private input for G1. The other two inputs {a, b} are the common inputs to
both automata.
Again, we start with the initial states of both automata and work our way through. From
the initial state of (x, 0), we have two valid inputs (the common input a and the private input g).
The common input a will bring us as before to the state (x, 1), while the private input g will bring
us to the state (z, 0). In the state (z, 0), there are three valid inputs (the common events a and b as
well as the private input g). Input a will bring us to state (x, 1), while input b will be a self-loop.
Private input g, which only affects G1, will bring us to state (y, 0). The final automaton is shown
in Figure 40.
124
G1||2 b b
g g
(x,0) (z,0) (y,0)
a b a b
a
g
(x,1) (z,1) (y,1)
a, g
a a
Figure 41: The parallel composition of G1 and G2
125
c ≥ 180 s
Z0 Z1
Reset of Clock c
126
Section 3.5: Schematic Representation of a Process
This section will describe the most common schematic methods for representing a process,
including block diagrams, piping and instrumentation diagrams (P&IDs), and process flow
diagrams (PFDs).
Another common block is the summation block, which shows how two or more signals
are to be combined. Figure 43 shows a typical summation block. The signs inside the circle show
whether the signal coming in should be added or subtracted. Given the common nature of a
summation block, two simplifications can be made. Rather than using a full circle, the signals are
simply shown to connect and the signs are shown beside each signal. This is shown in the bottom
part of Figure 43. A further simplification is to completely ignore any positive signs and only give
the negative signs beside the appropriate signals.
13
Often it will also be used for a time domain representation by ignoring the composition and summation rules and
using slightly different models. In such cases, they are better called process flow diagrams, which are described in
Section 3.5.2.
127
U1 Y Summation Block that
subtracts stream U2(s) from
stream U1(s) to give Y(s).
U2(s)
Figure 44: Summation block: (top) full form and (bottom) short-hand equivalent
One of the most useful features of block diagrams is the ability to easily compute the
relationship between the different signals. For the basic block shown in Figure 42, the relationship
between the input and output can be written as:
Y = GU (161)
while for the summation block, it can be written as
Y= U1 − U 2 (162)
Now, consider the process shown in Figure 44, where it is desired to determine the relationship
between Y and U, where there are three blocks in series. The naïve approach would be to denoted
each of the outputs from the two intermediate steps to be denoted as Y1 and Y2 and then write
relationships between each of these variables to obtain the final result, that is,
Y1 = G1U (163)
Y2 = G2Y1 = G2G1U (164)
Y = G3Y2 = G3G2G1U (165)
This shows that the final relationship can be written as Y = G3G2G1U. The easier approach is to
note that since these process blocks are in series, the process models can be multiplied together to
give the desired result (as the final result shows). However, the naïve approach is very useful if
the system is very complex with many different summation blocks and functions.
128
U Y
G1 G2 G3
dt Gd
+ εt ut
rt Gc Ga Gp yt
—
Gm
Solution:
Starting from the desired signal R and moving towards Y, the following relationships can
be written
ε = R − GmY
U = Gcε
Y = GpGaU + GdD
Substituting the first relationships into the second and then the combined into the third gives
Y = Gp GaGc(R − GmY) + GdD
Re-arranging this equation gives
Y = Gp GaGcR − Gp GaGcGmY + GdD
Solving this equation for Y gives
G p Ga Gc Gd
=Y R + D
1 + G p Ga Gc Gm 1 + G p Ga Gc Gm
129
Since we are only interested in the relationship between Y and R, we can set D = 0 to get
G p Ga Gc
Y= R
1 + G p Ga Gc Gm
The creation of block diagram for a given process can be quite a complex task, but it is
worthwhile as it allows the essential features of the system to be abstracted out and understood.
130
Figure 47: Process Flow Diagram for Alkylate Splitter (picture taken from (Ulrich & Vasudevan, 2004))
131
Figure 48: P&ID for a Gas Chilling and Separation Plant According to Canadian Design Standards (Note the engineering stamp
in the bottom middle box.)
Table 19: Component Symbols for P&IDs According to the DIN EN 62424
14
The older German standard DIN 19227 matches closely the ISA or North American standard. Differences include
how the different sensors or functions are denoted and minor details regarding the proper location for various pieces
of additional information. This book will follow the new standard without necessarily making any comments about
the other possibilities in order to avoid confusion.
15
This represents a general pipe.
132
Symbol Name in German Name in English
Isoliertes Rohr Insulated pipe
Jacketed pipe
Rohr mit Schutzmantel
Half-pipe reactor
Behälter mit Halbrohrschlange
Pump
Pumpe (allgemein)
Verdichter, Kompressor,
Vacuum pump or compressor
Vakuumpumpe (allgemein)
Sack Bag
133
Symbol Name in German Name in English
Ventilator Fan
Gas bottle
Gasflasche
Cooler, Chemical
Kühler
engineering
134
Symbol Name in German Name in English
135
Symbol Name in German Name in English
Trichter Funnel
Absperrarmatur Valve
136
Symbol Name in German Name in English
Sicherheitsventil in Eckform,
federbelastet Spring safety valve
Pneumatic signal
Electrical signal
Hydraulic signal
Electromagnetic Signal
137
Location Local/in the field In a central location In a local central point
PI PI PI
Symbol 123.4 123.4 123.4
There are many different fields in the equipment label. These are shown in Figure 48. The
left fields (#1 to 3) are only used if needed and there are no restrictions on what can be placed
there. The two central fields (#4 and 5) show the important information about the component. Field
#4 shows the PCE category 17 und the PCE processing category (see Table 23 for additional
information). Field #5 shows the PCE tag that is arbitrary. The right fields (#6 to 12) show
additional information about the component. Field #9 shows the importance of the component. A
triangle (▲) shows a safety-relevant component, while a circle (●) shows a component required
for the good manufacturing process (GMP). A square (■) shows a quality relevant component.
The other components contain information about alarms and switching.
16
This should be without the box around, but I could not find a way to remove the box, even though Visio said that
the box should not be there!
17
PCE is an abbreviation for “Process Control Engineering”.
138
4. PCE-Kategorie 6. ZHHH
und PCE-Verarbeitungsfunktion
1. Unterlieferant 7. SHH
2. Typicalkennzeichnung
8. AH
Sicherheitsrelevant 9.
GMP
Qualitätsrelevant
12. SLLL
Table 23 shows the PCE categories, while Table 24 shows the PCE processing functions.
For motorised drives (PCE category N), there are only two possibilities for the processing function:
S, which implies an on/off motor, and C, which implies motor control. For valves (PCE category
Y), there are also limitations: S implies an on/off valve, C implies a control valve, Z implies an
on/off valve with safety relevance, and IC implies a control valve with a continuous position
indicator. For process control functions, there are some very specific rules:
1) The PCE category is always the same U.
2) The following letters are often A, C, D, F, Q, S, Y, or Z. Combinations of these letters are
possible.
18
Officially, this is a free variable to be set as needed. Practically, it is often used for conductivity.
139
Letter English Name
D Density
E Voltage
F Flow
G Gap
H Hand
I Current
J Power
K Time Schedule
L Level
M Moisture
N Motor
O Free
P Pressure
Q Quantity/Event
R Radiation
S Speed, Frequency
T Temperature
U anticipated for PCE control functions
V Vibration
W Weight
X Free
Y Valve
Z Free
Table 24: PCE Processing Categories
140
Example 20: P&ID Tags
What is the meaning of the following P&ID tags: PI-512, UZ-512 und MDI-512?
Solution
For PI-512, the first letter is “P”. From Table 23, we can see that “P” represents pressure.
The following letter is “I”. From Table 24, we can see that “I” represents indicator. Thus, “PI-512”
represents a pressure indicator.
For UZ-512, the first letter is “U”. From Table 23, we can see that “U” (often) represents
a “process control function”. The following letter is “Z”. „ From Table 24, we can see that “Z”
represents a safety-critical control function. Thus, “UZ-512” represents a safety-critical control
function that is computed using a computer/PLC.
For MDI-512, the first letter is “M”. From Table 23, we can see that “M” represents
moisture. The following letters are “DI”. From Table 24, we can see that “D” represents difference
and “I” represents indicator. Thus, “MDI-512” represents a moisture difference indicator.
The labels for the other fields are not standardised. However, in a P&ID, the same label
should be used for the same component/idea. All P&IDs require a legend, where all the
components are briefly described, including such information as their name, engineering data (size,
material), and operating conditions. Appropriate stamps and signatures may need to be affixed
depending on local laws, for example, in Canada, all engineering documents require a stamp and
signature from a practising engineer.
141
Furthermore, when it comes to showing connections, for example, the splitting of a wire,
different formats are possible. The recommended approach is to use T-junctions to show a split (as
shown by Figure 49a). However, often, the split will be shown as in Figure 49b. A simple crossing
of wires is shown by Figure 49c.
Resistor
Inductor
Direct-Current
Essentially a battery
Voltage Source
Alternating-
Current Voltage
Source
Diode
Capacitor
AND Gate
OR Gate
Inverter
NAND Gate
NOR Gate
XOR Gate
142
Item DIN-60617 Symbol ANSI Symbol Comments
Ground ⏚ ⏚
The arrow is placed
Variable ↗ ↗ over the element that
is variable.
Negation is placed
where the signal
General Negation ○ ○
enters or leaves a
block.
a b c
Figure 50: Connections: a) recommend form for contact; b) commonly encountered form for contact; and c) no contact
143
5) A system with memory only cares about the current value of the process.
6) A state-space representation provides a model linking states, inputs, and outputs.
7) A transfer function can only be written for linear processes.
8) Every transfer function has a unique state-space representation.
9) Prediction error models are discrete-time models of the process.
10) A Gaussian, white noise signal depends on past values of the noise.
11) In a Box-Jenkins model, the order of the A-polynomial is fixed to zero.
12) In an autoregressive exogenous model, the only orders of the C- and D-polynomials are
zero.
13) It is not possible to convert a continuous model into a discrete model.
14) A process at steady state will experience wild, unpredictable swings in values.
15) The gain of a process represents the transient behaviour of the process.
16) The process time constant represents the delay before a process responds.
17) A continuous transfer function with poles of −2, −1, and 0 is marginally stable.
18) A continuous transfer function with poles of 1, 2, and 5 is stable.
19) A discrete transfer function with poles of 0.5, −0.5, and 1 is unstable.
20) A discrete transfer function with poles of 0.25, 0.36, 0.25±0.5i is stable.
21) A continuous state-space model with eigenvalues of 0.25±2i is stable.
22) A discrete state-space model with eigenvalues of ±0.25i is stable.
23) The alphabet of an automaton represents the allowed inputs into the process.
24) An accepting state is a state that has the desired outcome.
25) The language recognised by an automaton is the set of all words accepted by the automaton.
26) In a Mealy automaton, the output function depends only on the states.
27) Deadlock occurs when an automaton cannot reach an accepting state.
28) We denote spontaneous transitions by ε.
29) An automaton with spontaneous transitions is called a deterministic automaton.
30) The co-accessible operator removes all states and their associated transitions that are
unreachable from the initial state.
31) We use × to denote parallel composition.
32) In a timed automaton, a guard determines the maximal time in which we can remain in a
given state.
144
33) For a timed automaton, δ ≡ (c ≤ 1.000) is an acceptable time constraint.
34) For a timed automation, δ ≡ (c = abcd) is an acceptable time constraint.
35) There is no escape from an ergodic set.
36) A block diagram is a frequency-domain representation of the process.
37) A pneumatic signal is denoted using a line with sinusoids.
38) An electric signal is denoted using a dashed line.
39) A tag placed in a round symbol with a single line through the middle represents a
component located in some central location.
40) An instrument with the tag TIC is a density indicator controller.
41) An instrument with the tag PIC is a pressure indicator controller.
42) An instrument with the tag RI is a radiation indicator.
43) An instrument with the tag TDI is a temperature difference indicator.
44) An instrument with the tag JI is a current indicator.
45) A P&ID should contain a legend explaining the symbols and notation used.
a. yk +1 =4 yk + 7uk +5 − 5ek .
∂ 2T ∂T
b. 2
= −α ( t ) , where α is a parameter that depends on time.
∂x ∂t
c. −4 yk − 3ek
yk +1 =
d. ∂T =
−α ( t ) u ( t + 1) , where α is a parameter that depends on time.
∂t
47) For the following continuous-time transfer function, determine their stability. For the stable
transfer functions, determine the gain, time constant, and time delay.
5 ( s + 1)
a. G ( s ) = 3 2
e−3s
6s + 11s + 6s + 1
145
−5
b. G ( s ) = e −10 s
150 s + 65s 2 + 2 s − 1
3
4.5
c. G ( s ) = 2
e −10 s
15s + 8s + 1
4.5
d. G ( s ) = 2
e −7 s
15s + 26 s + 7
48) For the following continuous-time state-space models, determine their stability. Convert
the models to a transfer function. For the stable models, determine their gain and time
constant.
dx 5 0 2
= x + u
dt 0 −2 1
a.
1 0
y= x
0 1
dx −5 0 −2
= x + u
dt 0 −2 1
b.
2 0
y= x
0 1
−2 1 2 1
dx
= 0 −3 2 x + −0.5 u
dt
0 0 −1 2
c.
2 0 0
=y 0 −1 0 x
0 0 1
a. yk +1 =4 yk + 7uk +5 − 5ek
z −5
b. yk +1 = uk
1 − 4 z −1
z5 + z 4
c. yk +1 = 6 5 uk
z + z + z 4 + z 3 + z 2 + z1 + 1
146
−0.5 1 2 1
= xk +1 0 0.5 2 xk + −0.5 uk
0 0 0.25 2
d.
2 0 0
= yk 0 −1 0 xk
0 0 1
−1.5 0 0 −1
= xk +1 3 1.5 0 xk + 0.5 uk
1 2 2.25 3
e.
1 0 0
yk = 0 1 0 xk
0 0 1
50) What is the relationship between the eigenvalues of the state-space model and the time
constant (as determined from the transfer function)?
51) For the automata shown in Figure 49, classify the states into marked, ergodic, periodic, and
transient. Determine if there is blocking. If present, give the type of blocking encountered.
b a, b
H1 b
0 1 2
a
a
147
b, c a, b, c
H2 c
0 1 2
a
a a
b b c
a, 5
b, 3 4
c c a, b
b a
H3 b
0 1 2
a
a a b b
3 4
a, b
148
c a
H4 c
0 1 2
a
a a c
c
3 c 4 5
a
c
Figure 51: Automata for Questions 51 and 52
b a, b
K1 b
0 1 2
a
a
149
b, c a, b
K2 c
0 1 2
a
a a
b
c
3
b a
K3 b
0 1 2
a
a a b b
3 4
a, b
Figure 52: Automata for Questions 53
150
+ εt ut
ut Gc Ga Gp yt
—
Gm
+ +
ut C B H yt
—
—
56) Draw the process flow diagrams for the following process descriptions. Hint: Knowledge
of chemical engineering and physical behaviour of systems required.
a. The DEA solution enters the treatment unit via a throttle valve and is heated in three
consecutive heat exchangers. The heated solution enters the first evaporation
column which is operated under vacuum at 80 kPa and a temperature of 150°C.
Most of the water is evaporated here. The water vapour is used in the first heat
exchanger to heat the incoming solution. The concentrated DEA solution is
transferred from the first evaporator to a second evaporation column via a second
throttle valve, so that the pressure can be lowered to 10 kPa. The second
evaporation column is a thin film evaporator (similarly built to a scraped wall heat
exchanger), which is heated by high pressure steam. Here most of the DEA is
evaporated. The remaining HSS slurry is removed from the column by a positive
displacement pump. The DEA vapour is used to heat the feed in the second heat
exchanger. The third heat exchanger in the feed line is heated by medium pressure
steam to achieve sufficient evaporation in the first evaporation column. After
exchanging heat with the feed stream, the water vapour and DEA vapour streams
are completely liquefied in two condensers operated with cooling water, before
151
being pumped to a T-junction and returned to the gas scrubbing process. [Midterm,
ChE 464, W 2006]
b. A concentrated solution of 99% triethylene glycol (C6H14O4) and 1% water is
commonly used to absorb moisture from natural gas at 4.1 MPa. Natural gas is
mainly methane, with smaller amounts of ethane, propane, carbon dioxide and
nitrogen. The water-saturated natural gas is contacted with the triethylene glycol at
40°C in a trayed absorber column to remove the water. The dried gas in then ready
for pipelining to market. The triethylene glycol solution leaving the absorber
column is diluted by water, and must be regenerated for re-use. It first passes
through a flash drum at a pressure of 110 kPa to release dissolved gases. Then, it is
heated in a heat exchanger with the hot regenerated glycol. The dilute solution then
enters the top of a packed regeneration column. As it flows downward over the
packing, it passes steam flowing upwards which evaporates water from the glycol
solution. The reboiler at the bottom of the regeneration column uses medium-
pressure steam to heat the triethylene glycol solution to 200°C to generate the
vapour that passes up the column. At the top of the column, the vapour (i.e. the
water evaporated from the triethylene glycol solution) is vented to the atmosphere.
The hot regenerated solution from the bottom of the regenerator column is cooled
in a heat exchanger with the dilute solution from the absorber. It is then pumped
through an air cooler and then back to the absorber column at approximately 45°C.
[Midterm, ChE 464, W 2005]
57) Using the sketch of the process flow diagram in Figure 52 and the process description
below, provide a properly formatted process flow diagram that includes all the required
components and information. The process description is as follows. Ethyl chloride
(C2H5Cl) is produced in a continuous, stirred tank reactor (CSTR) filled with a slurry of
catalyst suspended in liquid ethyl chloride. Most of the heat of reaction is absorbed by
vaporising 25 kmol/hr of the liquid ethyl chloride. This vapour leaves the reactor with the
product stream. The reactor is jacketed to allow additional temperature control if required.
All of the ethyl chloride in the product stream is condensed and enough ethyl chloride is
returned to the reactor to maintain steady state. The waste gas is sent to the flare system.
[Midterm, ChE 464, W 2007]
152
Figure 54: Sketch of Process Flow Diagram for Question 57
58) Evaluate the P&IDs shown in Figure 53. Have they been corrected drawn? Is there anything
that is missing? Are all the streams correctly shown?
153
PI
FY
FIC
FI
LAH
TY TC
TT
154
59) Given the P&ID in Figure 54, determine where the controller is located and what signals it
requires.
60) For the process shown in Figure 55, answer the following questions:
a. What kind of alarm does the controller provide?
b. How is the level measured? What kind of signal is produced?
c. What kind of valve is used to control the level?
d. What do the double lines for item LI-135 mean?
155
61) Imagine that you producing (what else!) maple syrup. The P&ID along with the current
values is shown in Figure 56. Determine if there are any measurement errors.
156
Chapter 4: Control and Automation
Strategies
Having looked at the different instruments that can be used for automation and how to
describe the process and its interconnections, it is now necessary to see how the desired automation
can actually be implemented. The control or automation strategy is the method used to
control/automate the process to achieve the desired objectives. Although two different words can
be used here, the overall concepts are very similar: produce a system that can operate on its own
with minimal human interference. Depending on the field and even industry, one of these two
words may be more common.
There exist many different ways to classify the different types of strategies that can be
implemented. Often, in practice, these strategies can be combined to produce a final overall control
strategy. The following are the most common types of control strategies:
1) Open-Loop Control (or steering, servo response) 19 : In open-loop control, the desired
trajectory is set and implemented. The object follows this trajectory without taking into
consideration any variations in the environment or surroundings. Clearly, if there are any
changes in the environment, the object may not achieve its trajectory.
2) Closed-Loop Control (or regulation, regulatory response): In closed-loop control, the
actual value of the system is always compared against the setpoint value. Any deviations
are then corrected using a controller. This allows for the system to make corrections based
on imperfections in the original specifications, changes in the environment, or unexpected
events. In most control strategies, some aspect of closed-loop control will be implemented.
19
In German texts, a big deal is made over the difference between Steuerung (roughly open-loop control) and
Regelung (roughly closed-loop control). In most, if not all, English texts, such a distinction is not made. Control is the
general word used. It is almost always assumed that we are dealing with closed-loop control. Note that although
Steuerung is occasionally translated as feedforward control, this does not represent the concept as used in English. A
final difference between the texts is that the standard symbols used for the concepts can be quite different, for example,
the setpoint is denoted by r in English texts, but by w in most German texts.
157
3) Feedforward Control: In feedforward control, known disturbances are measured and
corrective action is taken so that the disturbance does not impact the plant. This is a way
of taking into consideration future information about the process and taking action now.
4) Discrete Event Control: In discrete event control, control only occurs, when some logic
condition is triggered. This is often used in safety-relevant systems to trigger immediate
action or raise an alarm, for example, if the pressure is above a certain threshold, then the
pressure release valve should be opened. Often, such systems are modelled using
automaton.
5) Supervisory Control: In supervisory control, the control loop does not control a process,
but it controls another control loop. Supervisory control loops are common in complex
industrial systems, where there may be multiple objectives and variables to control.
Disturbance, e(t)
Gd
In principle, if we are given a mathematical function that converts u(t) into y(t), more
commonly called a plant model and denoted by Gp, then by taking the inverse of this model as the
158
controller will allow us to attain the goal of making y(t) = r(t). However, in practice, the following
issues arise:
1. Unrealisability of the Model Inverse: Due to time delays and unstable zeros of the process,
it may not be possible to obtain a realisable inverse model.
2. Plant-Model Mismatch: It may not be possible to specify the function exactly, so that the
controller will not have the correct inverse function.
3. Disturbances: In reality, there will be disturbances that prevent y(t) from reaching the
value specified by r(t). One solution to this problem is to implement feedforward control
that measures the disturbance and takes corrective action. However, this only solves the
problem if the disturbance variable can be measured.
Example 21: Heating the House: Part I: Open-Loop Control
Figure 60: Open-Loop Control for the Temperature in the House (translated from
https://www.haustechnikverstehen.de/der-unterschied-zwischen-steuerung-und-regelung/)
159
Figure 58 shows a schematic diagram for the open-loop control of the temperature in the
house, where the radiator setting is used to determine the temperature in the room. However, once
the radiator setting is set, no further actions are taken if a disturbance should occur, for example,
the temperature outside changes, more people enter the room, the window is opened, or the sun
starts shining. All of these disturbances will change the temperature in the room, but no automatic
change will occur in radiator setting. Of the disturbances, the largest is probably the outside
temperature. If, as shown in Figure 58, we can measure the outside temperature, then we can design
a feedforward controller to correct for the disturbance caused by this variable.
Disturbance, e(t)
Gd
Gm
160
On the other hand, closed-loop control requires the ability to measure the output variables, which
can lead to a greater cost. As well, a poorly designed closed-loop controller can destabilise the
system.
Example 22: Temperature Control: Closed-Loop Case
Consider the same set-up as in Example 1Example 21, but modified as shown in Figure 60,
so that the temperature in the room can now be measured and an appropriate controller designed.
Based on the temperature in the room, the controller can set the valve opening which will
determine the flow of heat into the room. Opening the valve more will cause more heat to enter
the room; thus, increasing its temperature. Closing the valve will cause less heat to enter the room;
thus, decreasing its temperature.
161
Furthermore, other disturbances may occur that are not easily measured, but whose impact
can be controlled by the closed-loop controller. Figure 60 shows people in the room (S1), an open
window (S2) and direct sunlight (S3). Since these will influence the room temperature, their impact
will be noticed by the room temperature sensor that will cause the controller to make appropriate
changes to maintain the temperature at its desired value.
In closed-loop control, the following are the key ideas to consider (Seborg, Edgar,
Mellichamp, & Doyle, 2011):
1) The closed-loop system should be stable; otherwise, the system is worse than before.
2) The impact of disturbances should be minimised.
3) The controller should provide quick and effective change between different setpoints, that
is, setpoint tracking should be good.
4) There should not be any bias, that is, the output should reach the desired value.
5) Large actuator values should be minimised.
6) The controller should be robust, that is, small changes in the process characteristics should
not make the overall system unstable.
When designing a closed-loop control strategy, there are two common approaches to take:
1) State Feedback, where it is assumed that the controller is a constant K and all the states
are measurable and available, that is, yt = xt. The control law is given as ut = −Kxt.
2) Proportional, Integral, and Derivative (PID) Control, where the control law can be
written as
1
U ( s )= K c 1 + +τ Ds ε ( s) (166)
τIs
where Kc, τI, and τD are parameters to be determined. There exist different forms of the PID
control law depending on the industry, era, and implementation. It is common to drop the
D term, that is, set τD = 0, and have a PI controller.
In addition to these common methods, there also exist various nonlinear approaches that can be
applied to improve overall control, such as deadbanding or squared-error control.
162
Section 4.1.2.1: State Feedback
A state feedback controller is an effective manner for designing a controller when it is
possible to determine the behaviour of the states. A state feedback controller consists of two parts:
an observer and a controller. The observer uses the output from the process to estimate the states,
while the controller uses the (estimated) states to determine the input. Figure 61 shows a diagram
of such a state-feedback controller and observer.
System model
𝒞𝒞
r – 𝒜𝒜x+ℬu y
Controller Observer
−𝒦𝒦 𝒜𝒜x̂ +ℬu+ℒey –
𝒞𝒞
where ℒ, the observer gain, is an appropriately sized matrix that needs to be designed and ◌̂
represents an estimated value. Rewriting Equation (168) gives
xˆ = ( − ) xˆ + y + ( − ) u
(168)
=yˆ xˆ + u
Let the error be defined as
e= x − xˆ (169)
Taking the derivative (or difference) of Equation (170) gives
e= x − xˆ (170)
Substituting Equations (2) and (169) into Equation (171) gives
163
e = x + u − ( − ) xˆ − ( x + u ) − ( − ) u (171)
= ( − ) e
From Equation (172), it can be seen that for the error to reach zero 𝒜𝒜 – ℒ𝒞𝒞 must be stable, that is,
the eigenvalues of 𝒜𝒜 – ℒ𝒞𝒞 must lie to make the process stable. 20
Now that we can estimate the state values, it makes sense to design a state controller.
Assume that the state controller law can be written as
u = −xˆ (172) 21
Before examining the full case, let us consider the situation, where perfect information can be
obtained about the states and there is no need to design an observer, that is, C = I, which implies
that y = x . In this situation, we can use the basic state-space equations, given by Equation (2), to
describe the system. Substituting Equation (173) into Equation (2) and re-arranging gives
x =−
x ( x ) =−
( ) x
(173)
=y x + u
Thus, it can be seen that the stability of the controlled (overall, closed-loop system) is determined
by the location of the eigenvalues of the 𝒜𝒜 – 𝒦𝒦𝒦𝒦 matrix.
Now consider the case, where we do not have full information about the process. In this
case, we will need to consider two different equations: the observer equation and the true state-
space model. Substituting the control law given by Equation (173) into the observer equation,
Equation (169), gives
xˆ = ( − − + ) xˆ + y
(174)
=yˆ xˆ − xˆ
The fact that both terms are present in this equation raises the question if the controller and
observer must be design simultaneously or could they be designed separately.
In fact, the linear, state-space law presented here coupled with the linear observer are fully
separable and stability will be assured if both components are stable. In order to show this, rewrite
the controller law as
20
continuous domain: Re(λ) < 0; discrete domain: ||λ|| < 1
21
Often, the estimated state is replaced by the true state value. As it will be shown, this makes sense in many cases
since we have full information about the states by actually measuring them.
164
u=− ( x − e ) (175)
Now, combining this equation with the error equation, given as Equation (172), into a single
equation, we can see that the combined system consisting of the states and errors can be written as
x − x
= (177)
e 0 − e
Since the combined system matrix is triangular, the eigenvalues can be obtained by considering
the eigenvalues of the diagonal elements, that is, the eigenvalues of the 𝒜𝒜 – ℬ𝒦𝒦 and 𝒜𝒜 – ℒ𝒦𝒦
matrices. Furthermore, since neither of the two matrices interact with each other, it can be
concluded that both can be designed separately and then combined. As long as each is stable, then
the overall system will also be. This result is called the separation principle and is a very powerful
result in designing state-feedback systems.
165
behaviour of this controller, each of the three terms will be investigated separately. As well, the
common two configurations (PI and PID) will be considered in greater detail.
where Rs is the setpoint which gives a step change of Mr and Kp is the process gain. It is assumed
that the overall closed-loop transfer function is stable. From Equation (181), it can be seen that the
steady-state value for the closed-loop transfer function is not 1. This implies that the final value
will not be equal to the setpoint. For this reason, pure P-controllers are rarely used.
Example 23: Investigation of the Proportional Term on Stability and Performance
Consider the following first-order system
1.5
Gp = e −10 s (181)
20 s + 1
controlled with a proportional controller Gc = Kc. Varying the value of Kc from −0.25 to 2 in
increments of 0.25 show how the closed-loop response to a step change of 2 in the setpoint
changes.
Solution:
Figure 62 shows the results for changing the KC. It can be seen that for none of the cases is
the setpoint attained. There is offset for all of the cases. Furthermore, for KC = 0, the process
remains at zero, since no control is being implemented. As KC increases, the amount of oscillations
and length of time required to attain a steady-state value increase. In fact, if KC is increased further,
the process will become unstable. Similarly, for KC < 0, the process is initially stable. However,
increasing the value will rapidly make the system unstable.
166
3
2.5
2
Setpoint
Responses
1.5
1 for increasing
values of KC
Output, y
from −0.25 to
0.5
0 2 in steps of
0.25.
-0.5
-1
-1.5
0 50 100 150 200 250 300 350 400 450
Time (s)
167
controller output as the error keeps on increasing. This makes the integral term very large. When
there is a need to now decrease this value, the controller decreases the output value from its large,
unphysical value until it goes below the upper limit. The time delay between when the actuator
should have started to respond and when it is observed to be responding is called integral wind-up.
This is shown in Figure 63, where it can be seen that at 100 min, when the setpoint is changed, it
takes the process another 20 minutes before it even starts changing, since the true actuator value
remains saturated at its upper limit. Integral wind-up can be avoided by including the physical
limits of the actuator in the controller, that is, by making values beyond the physical limits of the
actuator equal to the physical limit.
3
Setpoint
Actual
2
Process output, y
0
0 50 100 150 200 250
10
Controller
Actual
5
Input, u
Integral Wind-up
168
Solution:
Figure 64 show the results. It can be seen that as τI increases the impact on the system
decreases. Note that the system is originally stable so that without any control it will reach the
desired setpoint. Furthermore, and unlike with only a P-term, there is no bias in the closed-loop
system.
3.5
2.5
2
Output, y
1.5
Figure 66: Effect of Changing τI for a I-Controller. The dashed line is the setpoint.
169
where Rs is the setpoint which makes a step change of Mr and Kp is the process gain. It is assumed
that the overall closed-loop transfer function is stable. From Equation (185), it can be seen that
irrespective of the change in the setpoint, the system will return to zero, which implies that the
derivative term cannot track the setpoint. Therefore, the main role of the derivative term is for
disturbance rejection, since in that case, it is desired that the system return to the same initial value.
The derivative term as written cannot be physically realised, since the numerator is greater
than the denominator. In order to avoid this problem, it is common to rewrite the derivative term
into the following form:
N (185)
Gc , real = τ D
N
1 +
s
where N is a filter parameter to be selected. It can be noted that as N → ∞, this form will become
equal to the original version.
Using a derivative term introduces two potential problems into the control strategy: jitter
and derivative kick. Jitter occurs when error signal fluctuates greatly about some mean value
causing the estimated value of the future error to also fluctuate greatly. This in turn causes
unnecessary fluctuations in the controller output, which can lead to issues with the actuator. Figure
65 shows the typical situation where jitter is present. Jitter can be mitigated by filtering the error
signal used in computing the derivative term. Derivative kick occurs when the setpoint has a
sudden change in value (for example, a step change) causing the instantaneous error to be
practically speaking infinite. This causes the controller error to spike for a very short period of
time after the change occurs. Figure 66 shows the typical situation when derivative kick occurs.
When the setpoint changes at 10 s, there is a corresponding spike in the actuator value. Note that
in practice, due to saturation in the actuator, the impact of the derivative kick will be less than
shown. Nevertheless, it will be present. Derivative kick can be lessened by solely using the change
in the output rather than the error when computing the derivative term, that is,
ut = τ D syt (186)
Since it has been shown that the overall impact of the derivative term is primarily for disturbance
rejection, that is, making yt ≈ 0, this approach is reasonable.
170
4
2
Output, y
Setpoint
-1
Actual
-2
0 50 100 150 200 250 300 350 400 450
Time (s)
450
400
350
300
250
Actuator, y
200
150
100
50
0
0 5 10 15 20 25 30 35 40 45 50
Time (s)
171
Example 25: Investigation of the Derivative Term on Stability and Performance
Consider the following first-order system
1.5
Gp = e −10 s (187)
20 s + 1
controlled with a derivative controller Gc = τDs and the realisable derivative controller Gc = with
N = 100. Varying the value of τD from 1 to 11 in increments of 2 show the closed-loop response of
the controller to a white noise disturbance of magnitude 0.05.
Solution:
Figure 67 show the results. It can be seen that as the magnitude of the D-Term increases,
so does the magnitude of the response. This implies that the D-Term only influences the magnitude
of the response.
1.5
0.5
Output, y
-0.5
172
The behaviour of a PI controller will be similar to that of each of the two separate terms, that is,
the proportional term will influence the stability and overall performance, while the integral term
will provide a bias-free controller. This controller can be interpreted as only considering the current
and past information about the process and how that impacts the overall control performance.
PI control can be used for both disturbance rejection and setpoint tracking in many different
applications including flows, levels, and temperatures. Large time delays and highly nonlinear
systems can limit its effectiveness.
Kc 1 −1 2
=uk (1 − z −1
) + + τ (1 − z ) εk (190)
(1 − z −1 ) τI
D
Equation (191) is often called the positional form of the discretised PID controller. Re-arranging
Equation (191) to give
1 2
(1 − z ) u
−1
k =∆uk =K c (1 − z −1 ) + + τ D (1 − z −1 ) ε k
τI
(191)
173
produces another common PID equation called the velocity form of the discretised PID controller.
In industrial implementations, it is possible to encounter both forms. Although these forms do not
have an impact on controller design, they will have an impact on understanding the values obtained.
174
expected given the differences between the simulated and actual processes. However, following
this procedure will minimise the risk of the occurrence of such a situation.
Model Identification
Controller Design
Closed-Loop Simulations
(use an accurate plant model)
Refine the controller,
perform more identification.
Satisfactory
Performance?
No
Yes
Field Implementation
175
The general problem statement is: given the desired eigenvalues {λ1, λ2, …, λn} and the
system {, , }, determine the state feedback controller gain . For the characteristic polynomial
n −1
2) Compute ∆( s ) = s + α1s + + α n −1s + α n , which is the characteristic polynomial of .
n
−α1′ −α n′ −1 −α n′ 1
1 0 0 0
3) Compute =
= , .
0 0 0 0
0 0 1 0 0
4) Compute = n−1 and ′ = n−1 .
[α1′ − α1 α n′ − α n ] ′ −1 .
5) =
Similarly, Ackermann’s formula, uses the following steps to place the poles:
n
1) Compute ∆( s ) = ∏ ( s − λi ) = s n + α1′s n −1 + + α n′ −1s + α n′ .
i =1
n −1
2) Compute ∆( s ) = s + α1s + + α n −1s + α n , which is the characteristic polynomial of .
n
−α1′ −α n′ −1 −α n′ 1
1 0 0 0
3) Compute =
= , .
0 0 0 0
0 0 1 0 0
4) Compute = n−1 and ′ = n−1 .
5) [ 0 0 1 ]1×n ∆ ( ) .
−1
=
It is also possible to design the observer using Ackermann’s formula which gives
= ∆ ( ) −1 [ 0 1 ]1×n
T
0 (192)
When using pole placement, the following points should be borne in mind:
1) The magnitude of 𝒦𝒦 gives the amount of effort required to control the process. The
further the desired poles are from the actual poles of the system, the larger the controller
gain 𝒦𝒦.
176
2) For multi-input systems, 𝒦𝒦 is not unique.
3) (𝒜𝒜, ℬ) and (𝒜𝒜 − ℬ𝒦𝒦, ℬ) are controllable. However, due to pole-zero cancellations, the
resulting system may not be observable.
4) Discrete systems can be controlled in the same manner, mutatis mutandi.
177
Table 26: PI controller constants for first-order-plus-deadtime models
Controller Method Kc τI
τ
ITAE 0.586 θ
−0.916
Structure-based
θ
(set point tracking) K τ 1.03 − 0.165
τ
ITAE 0.859 θ
−0.977
τ θ
0.680
(disturbance rejection) K τ 0.674 τ
1 τ
(τc chosen so that τc / θ > 0.8 τ
K θ +τc
and τc > τ / 10)
Controller Method Kc τI τD
τ
ITAE 0.965 θ
−0.85
θ
0.929
Structure-based
θ 0.308τ
(set point tracking) K τ 0.796 − 0.147 τ
τ
ITAE 1.357 θ
−0.947
τ
θ
0.738
θ
0.995
0.381τ
(disturbance rejection) K τ 0.842 τ τ
IMC
τ
Model-based
2 +1 τ
(τc chosen so that 1 θ θ
+τ τ
τc / θ > 0.8 and K 2τC +1 2 2 +1
θ
θ
τc > τ / 10)
Example 26: Designing a PI Controller
Consider the following first-order system
1.5
Gp = e −10 s (193)
20 s + 1
Determine the controller parameters for a PI controller using the direct synthesis method.
Solution
Before solving the problem, it is helpful to determine the values of the various constants
Gain: K = 1.5
Time Constant: τ = 20
178
Time Delay: θ = 10
For the direct synthesis method, there is a need to also specify the value of τc, which is essentially
the closed-loop time constant. The smaller the value the faster the response, but the less robust the
overall system. The constraints given with this method implies that τc > 0.8θ = 8 and τc > 0.1τ = 2.
For the purposes of this example, set the value of τc to be 10, which satisfies both constraints.
Therefore, the controller parameters can be computed from Table 25 as follows:
1 τ 1 20 2 (194)
=Kc = =
K θ + τ c 1.5 10 + 10 3
τ I= τ= 20 (195)
The resulting behaviour of the closed-loop system is shown in Figure 69. It can be seen that the
process responds almost exactly as expected.
3
2.5
1.5
Process Value
1
Setpoint
Actual Value
0.5
-0.5
-1
0 50 100 150 200 250 300 350 400 450
Time (s)
179
that is, servo response, and how the controller responds to disturbances, that is, regulatory
response.
Since the objective in servo response performance is how well the controller responds to a
setpoint change, it is easy to determine an appropriate measure for performance assessment. For
this reason, servo response is often used to design a controller. As a first approximation, a closed-
loop system can be considered to be a second-order system with time delay. Therefore, the
response of the closed loop to a step change in setpoint would be the step response of a second-
order system. The most common servo control performance measures are just characteristics of a
second-order system responding to a step input, that is, rise time, overshoot, and settling time of
the controlled variable, as shown in Figure 70. The rise time, τr, is defined as the first time as the
first time the process reaches the setpoint value. The overshoot is defined as the ratio of how much
the process goes over (or under) the setpoint divided by the magnitude of the step change. Note
that if the step change is negative, then the overshoot will also be negative (that is it is really an
undershoot) so that the ratio remains positive. The settling time, τs, is defined as the last time for
which the process lies outside the 5% bounds. The 5% bounds are defined as a boundary on either
side of the new setpoint that is defined as 2.5% of the difference (yss, 2 – yss, 1), where yss is the
steady-state value and the numeric subscripts represent the initial and final values. The settling
time is roughly three times the closed-loop time constant.
180
4
Setpoint
3.5 Actual Value
3
a
2.5
2 0.05b
Process Value
1.5
b
0.5
Settling time,
0
τs Overshoot = a/b
-0.5
0 50 100 150 200 250 300 350
Time (s)
Rise time, τr
On the other hand, for performance assessment of regulatory response the objective is less
certain. Instead, various quantitative measures are used to quantify performance assessment,
including:
1) Standard deviation of manipulated variable: This is the simplest and most important
measure of control performance. However, it is difficult to specify the desired value a
priori since it depends on the nature and magnitude of disturbances affecting the process.
What can be specified, or at least described qualitatively, is the trade-off between control
error and control action. One way of thinking of a controller is that it moves variation
from one variable (usually the controlled variable) to another (usually the manipulated
variable). As disturbances affect the process, the controller will respond by changing the
181
manipulated variable. The response will then mitigate the effect of the disturbances.
Larger disturbances will require greater control action than small disturbances.
2) Mean of the output variable: This can be used to assess how well the controller
maintains the given setpoint in the presence of disturbances.
3) Advanced performance assessment: More advanced performance assessment methods
are available, such as the minimum variance controller and the Harris Index, which can
provide appropriate benchmarks for determining good performance.
Gm
Gff Gd
Gm
182
A special type of feedforward controller is a decoupler, which seeks to separate two or
more interacting processes so that they can be treated as independent systems controlled by their
own SISO control loops. A decoupler basically takes the controller output from the other
controllers and treats them as a measurable disturbance that needs to be counteracted. Decouples
can be very effective in controlling a multivariate system when the interactions are relatively
straight forward and not too nonlinear.
In feedforward control design, the objective to design a controller that can compensate for
a measured disturbance before it can affect the process. Assume that the process model is Gp and
the disturbance model is Gd, then for the feedforward controller shown in Figure 71, the basic form
of the feedforward controller can be written as
Gd (196)
G ff = −
Gp
In the ideal situation, this will exactly cancel out the effect of the measured disturbance. However,
in practice, such a controller cannot be implemented for the following two reasons:
1) Time Delay: If the time delay in the process response is larger than the time delay in the
disturbance response, then the overall time delay for the process will be negative
requiring knowledge of future information about the process. Since such a situation is
impossible, the general solution is to drop the unrealisable time delay from the final
controller.
2) Unstable Zeroes in Gp: If the process contains unstable zeroes, then the resulting transfer
function will also be unstable. In such a case, it will not be possible to realise the
controller. A common solution in this case is to drop the offending zeroes from the final
representation.
There are two common feedforward controllers that can be designed:
1) Static controllers where only the gains of the process are considered, that is,
Kd (197)
G ff = −
Kp
183
K d (τ p s + 1)
G ff = − e
−θ ff s
(198)
K p (τ d s + 1)
where τp is the process time constant, τd is the disturbance time constant, and θff = θd – θp.
If θff is negative, then the term is often ignored. Ideally, |τp / τd| < 1, which avoids large
spikes when this controller is used.
For the simulation, assume that the measured disturbance is driven by Gaussian white noise with
a magnitude of 0.5 and there is a step change in the setpoint of 2 units after 100 s.
Solution
Using Equation (198), the static feedforward controller can be computed as
K −0.5 1 (202)
G ff , s =
− d =
− =
Kp 1.5 3
Note that the gain can be obtained by setting s = 0 and evaluating the resulting value.
When creating the dynamic feedforward controller, it is important that the transfer
functions be written in their standard form, that is, all roots are of the form τs + 1. In this particular
example, the zero of the process transfer function needs to be written into this form to give
1.5 ( − s + 1) −10 s
Gp = e (203)
( s + 1)(10s + 1)
The dynamic feedforward controller can be designed using Equation (197). This gives
−0.5
e −5 s
G ff ,d =
G
− d =
−
( 5 s + 1)( 7 s + 1 ) 1
=
( s + 1)(10s + 1) e5 s (204)
Gp 1.5 ( − s + 1) 3 ( 5s + 1)( 7 s + 1)( − s + 1)
e −10 s
( )(
s + 1 10 s + 1)
184
However, this controller as written cannot be realised since there is an unstable pole and the time
delay requires future values. In order to obtain a realisable dynamic feedforward controller, both
the unstable pole and time delay terms will be dropped. This gives the following form for the
controller
1 ( s + 1)(10 s + 1)
G ff ,d = (205)
3 ( 5s + 1)( 7 s + 1)
Figure 72 shows the effects of both feedforward controllers on the process. It can be seen
that without the feedforward controller the process has greater oscillations. Adding the static
feedforward controller tends to decrease the impact of the oscillations. However, the behaviour is
still rather jittery. The dynamic feedforward controller has smoothed out the jitter and the
behaviour is cleaner.
2.5
1.5
Setpoint
w/o Feedforward Control
Output, y
1 Static Feedforward
Dynamic Feedfoward
0.5
-0.5
0 50 100 150 200 250 300 350 400 450
Time (s)
185
Section 4.3: Discrete Event Control
In discrete event control, a specific event or series of events triggers a given control
sequence. This can often be seen when dealing with safety-oriented control situations, where, for
example, a pressure relief valve will only open if the pressure is above a certain value and will
close once the pressure falls below the threshold.
Another type of discrete event control is interlocking, where a specified set of
circumstances must hold before a given action can occur, for example, heater cannot be turned on
until the water level in the tank reaches a safe value. Interlocking is an important component of
safety considerations in order to prevent operators from taking inappropriate action. Designing the
correct interlocks can be a challenging proposition.
A special type of discrete event control occurs when binary signals are used, for example,
a sensor will report when the elevator has reached the correct floor, and then the motor of the drive
will be switched off. The exact height of the elevator above the ground is not continuously
measured and monitored. When dealing with binary signals, there are two possible types of
controllers: logic control and sequential control.
In logic controllers, also called combinatorial controllers, one obtains the control variable
as a combination, that is, a logical operation, of signals, for example, system output signals (sensor
values such as door open or closed) or user inputs (e.g emergency button pressed or not pressed).
Consider a simple example of a lathe. A lathe is turned on when the user presses the power button
and the chuck is closed. A motor is switched off when an end position is reached or the emergency
stop button is pressed.
In sequential control, individual control operations are performed in certain steps. The
advancement to the next step occurs either after a certain time has passed (time-dependent
sequence control), for example, a simple traffic light or in the presence of a specific event (process-
dependent sequence control), for example, traffic lights that change their signal when a pedestrian
presses the button. An example would be a car wash, where the different operations of the wash
are triggered based on a sequence of events. In contrast to the logic controllers, it is therefore not
possible to clearly determine the manipulated variable even if all signal values are known, since
one also has to know at which point in the process one is currently located.
186
Section 4.4: Supervisory Control
Supervisory control focuses on designing controllers that can deal with complex,
interacting systems incorporating physical, process, and economic constraints, as well as dealing
with changing economic circumstances. Supervisory control systems will often set the setpoint for
subsidiary (or slave) controllers. They can be used to control large systems containing many
different variables and even locations. A supervisory control system can range from a simple
nested control loop system to complex model predictive control systems. There are two primary
control systems cascade control and model predictive control (MPC), which is often called
advanced process control (APC) in the petrochemical industry.
e1(t)
e2(t) Gd
Gd
r(t) y(t)
+ +
Gc, 1 Gc, 2 Ga Gp
—
—
Secondary Loop
Gm
Primary Loop
Gm
187
Figure 75: Block Diagram for Cascade Control
(
r − yˆ
) ( r − yˆ ) + ( ∆u )
( ∆u )
T T
min
∆u
subject to (206)
yˆ = y * + ∆u
where r is the reference vector, ŷ the vector of the predicted process values with control, 𝒬𝒬 the
process scaling matrix, ∆u the vector of the changes in the controller action, ℛ the input scaling
matrix, y * the vector of the process values without control and 𝒜𝒜 the dynamic matrix. Furthermore,
let m be the control horizon, p the prediction horizon, d the process deadtime, and n the settling
time. It should be noted that 1 ≤ m ≤ p – d and p > d.
The solution requires the step response of the process, that is,
188
∞
=yt ∑a z
i =1
i
−i
∆ut (207)
where ai is the step response coefficient. The step response coefficient can be calculated either by
polynomial division of the transfer function model or using the coefficients of the impulse response.
The coefficients ai of the step response have the following relationship to the coefficients of the
impulse response hj
i
ai = ∑ h j (208)
j =1
Furthermore, the settling time is defined as the time at which the first coefficient an is within a
range of between 0.975 and 1.025 times the value of a∞, where a∞ is the steady-state value. All
step response coefficients after the settling time n can be assumed to be equal to an + 1. The p × m
dynamic matrix 𝒜𝒜 can written as
a1 0 0
a a1
2
= 0 (209)
a1
a p a p −1 a p − m +1
For a univariate system with only one input variable and one output variable, the solution for
Equation (207) is
( + ) T T ( r − y * )
−1
u K C=
∆= e T
(210)
where
n
yt*+l =yt − ∑ ( ai − al +i ) ∆ut −i (211)
i =1
Once the solution has been implemented, then the first control action Δu1 will be implemented by
the controller. At the next sampling time, the above optimisation procedure is repeated, a new
optimal value is calculated, and the first control action is implemented. This allows the system to
take unexpected process changes into consideration.
Example 28: Design of a Model Predictive Controller
Design a model predictive controller for the following SISO system:
2 z −1
Gp = (212)
1 − 0, 75 z −1
189
Set up the required matrices and perform the first step of the iteration. For this, assume that m = p
= 3. Let 𝒬𝒬 = ℐp and ℛ = ℐ3, where ℐn is the n×n identity matrix. Furthermore, a step change occurs
at t = 0, with the process having previously been in steady state.
Solution
To determine the required model predictive controller, we must first determine the step-
response model. This can be determined using long division, which gives the impulse response
coefficients from which the step response coefficients can be easily calculated. Thus,
2 z −1 + 1.5 z −2 + 1.125 z −3
1 − 0.75 z −1 2 z −1 (213)
−2 z −1 + 1.5 z −2
1.5 z −2
−1.5 z −2 + 1.125 z −3
1.125z −3
It can be seen that hi = 2(0.75)i – 1 for i ≥ 1. In general, for a transfer function of the form
β z −d
Gp = (214)
1 − α z −1
the coefficients of the impulse response can be given as
βα i − d i≥d
hi = (215)
0 i<d
The required step response coefficients can be found using Equation (209)
i i
ai
=
=j 0=j 1
∑
= hj ∑ 2 ( 0.75 ) j −1
(216)
1 − α i − d +1
ai β=
(1 − 0.75i )
(217)
= 2
1−α 1 − 0.75
It follows that
=
(1 − 0.75)
a1 2= 2
1 − 0.75
=
(1 − 0.752 )
a2 2= 3.5 (218)
1 − 0.75
=
(1 − 0.753 )
a3 2= 4.625
1 − 0.75
190
Incidentally, since d = 1 for this example, the step response coefficients with a smaller d have a
value of zero and can thus be ignored in the summation.
In the next step, the settling time is calculated. For a converging geometric series (implies
that the process of interest is stable), the value to which the series converges is given by
β 2
K=
p a=
∞ = = 8 (219)
1 − α 1 − 0.75
This gives the settling time for the first value for which the process lies in the interval 0.975×8 and
1.025×8. Since the process under consideration has no oscillations, only the lower limit is of
interest to us. Given that the settling time is equal to the value of i in Equation (218), we get
1 − α n − d +1 0.975β
β = , (220)
1−α 1−α
191
The required inverse is then
−1
38.640 625 23.1875 9.25
23.1875 7
( + ) =
T −1
17.25
9.25 7 5
(225)
0.134 046 −0.184 200 0.009 896
= −0.184 200 0.387 349 −0.201518
0.009 896 −0.201 518 0.463 818
The predicted uncontrolled position will be equal to the steady state value, i.e. zero since no control
has been made. This implies that
0
*
y = 0 (228)
0
192
Only the first controller action Δu1 = 0.363 902 will be implemented. At the next time point,
Equation (230) will be recomputed using the new values for r and y*.
For a multivariate system, the vectors and matrices become “supervectors” and
“supermatrices”, meaning that a vector consists of many vectors, for example
∆u1
(230)
∆u =
∆uh
where ∆ui is the input vector for the ith input. Let us consider a MIMO System with s outputs and
and
ps
∆u j = ∑ k ( r − y ),
i =1
ji i
*
i j = km + 1, k = 0,1,..., h − 1 (233)
where aij, k is the kth coefficient of the step response for the process between the jth input and ith
output and Δuj, t – k is the change in the control action for the jth input at time point t − k.
193
Section 4.5.1.1: Smith Predictor
The Smith predictor is an approach that seeks to minimise the effect of time delay on the
control strategy. It is useful when there is a larger time delay in the system that needs to be dealt
with. The control strategy for this approach is shown in Figure 74.
dt
Gd
rt Gc Gp e−θs yt
− −
Ĝp −
Model Deviation
Process-Model Deviation
where Kdb is the deadband constant. The deadband can be specified as either some fixed value of
the setpoint (for example, within 5°C of the setpoint) or as a percentage (within 5% of the setpoint).
Deadbanding is useful when tight control is not desired, that is, small deviations are permissible.
It is often used with level control for surge tanks as these will often need to maintain a general
level rather than a specific value. Furthermore, the controller can be made more aggressive outside
the band to quickly drive the system to the desired value.
194
A more generalised approach to deadbanding is called gain scheduling, where the
controller gain changes depending on the value of the scheduling variable. Most often, the domain
of the scheduling variable is partitioned into different regions. For each region, a different
controller gain may be assigned. Mathematically, this can be written as
K c ,1 st < K gs ,1
K K gs ,1 ≤ st < K gs ,2
c ,2 (235)
ut = Gc
K c ,n K gs ,n < st
where Kc, i is the controller gain for the ith region, Kgs, i is the ith scheduling limit, and st is the
scheduling variable. This approach allows for a nonlinear process to be controller with a series of
linear controllers, which would not be possible with a single controller.
where sign is the sign function that returns −1 if et is negative, 0 if the value is zero, and 1 otherwise.
195
Section 4.6: Chapter Problems
Problems at the end of the chapter consist of three different types: (a) Basic Concepts
(True/False), which seek to test the reader’s comprehension of the key concepts in the chapter; (b)
Short Exercises, which seek to test the reader’s ability to compute the required parameters for a
simple data set using simple or no technological aids. This section also includes proofs of theorems;
and (c) Computational Exercises, which require not only a solid comprehension of the basic
material, but also the use of appropriate software to easily manipulate the given data sets.
196
17) Feedforward control seeks to minimise the effects of unmeasurable disturbances on the
process.
18) A decoupler is a type of feedforward control.
19) In feedforward control, it may be necessary to remove terms such as time delay or unstable
zeros from the final controller.
20) Interlocking occurs when a series of discrete events must be fulfilled before some action
can occur.
21) Batch control is an example of sequential control.
22) Supervisory control allows us to create a network of controllers each of which can be
controlling another controller.
23) In cascade control, the master controller should always be faster than the slave controller.
24) Model predictive control allows constraints and economic conditions to be considered in
controlling the process.
25) Model predictive control requires good models.
197
28) Design PID controllers using the formulae in Table 26 for the same processes as in
Question 27). You should use the smallest τc possible.
29) Simulate the controllers from Questions 27) and 28) for a setpoint change of +2 and −2.
You can assume that there is no disturbance affecting the process. Explain what you see.
Which controller would you recommend for each process? Why?
30) Design dynamic feedforward controllers for the following processes.
2 −2
=a. G p = e −15 s , Gd e −5 s
30 s + 1 15s + 1
−2 ( 5s − 1) 2 −20 s
=b. G p = e −15 s , Gd e
( 30s + 1)( 25s + 1) 5s + 1
2 −2 −5 s
=c. G p = e − s , Gd e
( 3s + 1)(10s + 1) 15s + 1
31) Design static feedforward controllers for the processes in Question 31). Simulate and
compare the performance of the two types of feedforward controllers for a setpoint change
of +2. You can assume that the disturbance is driven by Gaussian, white noise.
32) Consider a cascade loop with the following two transfer functions:
2 −2
=G p , slave = e − s , G p , master e −20 s (237)
3s + 1 30 s + 1
Design appropriate PI controllers for this cascade loop. What aspects should you take into
consideration when designing this controller? Simulate the system.
33) Consider the same situation as in Question 32), but now you also wish to ensure that the
slave loop does not have any oscillations and reaches the setpoint as fast as possible. Using
simulations, design appropriate controllers for this system.
34) You need to design a controller for a process whose model has been determined
experimental to be
1
Gˆ p = e −10 s (238)
15s + 1
However, you do not know how well the experimental model reflects the true process.
Using the IMC tuning method, design a PID controller assuming that the experimental
model is correct. Knowing that the model may be incorrect, do not pick a too small τc.
Simulate your model assuming Equation (239) is correct. If your controller is satisfactory,
then try simulating the closed-loop assuming that the true process model is given by
198
a. Small Mismatch: G p = 1.1 e −11s
16 s + 1
2
b. Large Mismatch in Gain: G p = e −9 s
14 s + 1
199
Chapter 5: Boolean Algebra
Boolean algebra is the algebra of binary variables that can only take two values, for
example, true and false or 1 and 0. It is very useful for solving problems in logic and is a
requirement for good programming. George Boole (1815 – 1864) is the discoverer of Boolean
algebra.
A Boolean expression is a group of elementary terms that are linked with connectors
(operators). The mathematical space in which a Boolean algebra is defined will be denoted using
a double-struck B (𝔹𝔹, U+1D539).
Table 28: Boolean operators, where a and b are Boolean variables, that is, a, b ∊ 𝔹𝔹
Other Word
Operator Symbol Statement
Representations Representation
Conjunction ∧ (U+2227) a ∧ b a·b, ab, AND
a AND b,
a & b
Disjunction ∨ (U+2228) a ∨ b a + b, a OR OR
b, a || b
Negation ¬ (U+00AC) ¬b, b′ b̄ NOT b, !b NOT
Implication → (U+2192) a → b — IF-THEN
Equivalence ↔ (U+2194) a ↔ b — IF-&ONLY-IF
200
All Boolean expressions can be written using ∧, ∨, ¬, 0 and 1. The precedence of the
operators is such that ∧ has a higher precedence than ∨, for example, a ∨ b ∧ c = a ∨ (b
∧ c).
201
b. a ∧ a = a
9) Involution
a. ¬¬a = a
10) Absorption
a. a ∧ (a ∨ c) = a
b. a ∨ (a ∧ c) = a
With these axioms, it is possible to define a complete Boolean algebra.
An important law is De Morgan’s Law:
¬(a ∨ b) = ¬a ∧ ¬b
¬(a ∧ b) = ¬a ∨ ¬b
This law can be used to simplify many complex Boolean expressions or convert between two
representations.
Table 29: Truth table for the Boolean Operators (left) AND and (right) OR
AND OR
A B AB A B A+B
0 0 0 0 0 0
202
AND OR
A B AB A B A+B
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
There are two common representations for Boolean functions: the sum-of-products (SOP)
form and the product-of-sums (POS) form.
203
4) F = BC + DE′?
Solution
Only 1) and 4) are in the sum-of-product form, since these representations are a sum of the
products of individual variables. In 2) and 3), we have a product of many variables (A and B) in 2)
and (D and E) in 3).
A minterm is a row in the truth table where the value is “1”. The symbol for a minterm is
mi, where i is the decimal row number. The compact sum-of-products form is Σm(i,…), where i is
the row number of the minterms. When the minterms are converted into a functional representation,
each variable, whose value is “1”, will be written in its plain form, while each variable, whose
value is “0” will be written in its negated form, for example, for m2, the minterm with the value
0102, the term will be given as A′BC’.
204
A B C F
1 0 1 1
1 1 0 0
1 1 1 1
The rows in red are the rows, where the function has a value of “1”. We can find the decimal
row number simply by converting the binary representation into a decimal value, that is, for the
first red row
0112 = 2 + 1 = 3
and
1012 = 22 + 1 = 5
1112 = 22 + 2 + 1 = 7
Thus, the compact sum-of-products form is
Σm(3, 5, 7).
It should be noted that the ordering of the Boolean variables is important. When the ordering is
changed, then the compact sum-of-products form will also change.
205
Only 2) and 3) are in product-of-sums form, since these representations are products of
sums with individual variables. In 1) and 4), we have a sum of many variables (A, B, and C) in 1)
and (B, C, D, and E) in 4).
A maxterm is a row in the truth table with the value of “0”. The symbol for a maxterm is
Mi, where i is the decimal value of the row. The compact product-of-sums form is ΠM(i,…), where
i is the row value of the corresponding maxterm. When maxterms are converted into a functional
representation, then each variable with the value of “0” is converted as written, while each variable
with a value of “1” is written in its negated form, for example, M2, the maxterm with the value
0102, would be written a A + B’ + C.
Example 35: Compact Product-of-Sums Form
What is the compact product-of-sums form for the function F = (A + B)C.
Solution
First, we require the truth table for the function. Then, we can easily find the rows with a
value of 0.
A B C F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
206
A B C F
1 1 0 0
1 1 1 1
The rows in red are the rows where the function has a value of “0”. We can obtain the row
number by converting the binary values into a decimal representation, for example, for the first
row
0002 = 0 + 0 + 0 = 0
and
0012 = 0 + 0 + 1 = 1
0102 = 0 + 2 + 0 = 2
1002 = 22 + 0 + 0 = 4
1102 = 22 + 2 + 0 = 6
Therefore, the compact product-of-sums form is
ΠM(0, 1, 2, 4, 6).
It is important to note that the order of Boolean variables is important. When the order is changed,
then the compact product-of-sums form will also change. Also, it is obvious that any terms in the
sum-of-products form are not in the product-of-sums form!
207
Section 5.3.4: Duality
Duality in Boolean algebra has the following definition:
• Replace all AND by OR.
• Replace all OR by AND.
• Replace 0 by 1.
• Replace 1 by 0.
Duality is an important property when we are simplifying or minimising an expression. Often the
dual of the representation can be easier to work with.
Example 37: Dual of a Function
What is the dual of the function F = (A + B)C?
Solution
F = (A + B)C
FD = [(A + B)C]D
FD = [(A + B)]D + C D
FD = AB + C
The dual of a function is often represented by a superscript D.
208
Section 5.4.1: Karnaugh Map
A Karnaugh map is a visual algorithm that minimises a Boolean function so that the largest
number of groups of 0 and 1 are found. We search for groups of 0 to find the minimal product-
of-sums representation and groups for 1 to find the minimal sum-of-products representation. The
0’s and 1’s can only be arranged in groups of 2n, where n ∊ ℕ. There are simple Karnaugh maps
for 2, 3, 4, and 5 variables.
The Karnaugh map for two variables is shown in Figure 75. The diagram is created so that
on one axis lies one variable and on the other axis the other variable. Then, we circle the largest
group with a size that is a power of 2 that covers as many of the 1 as possible.
The Karnaugh map for three variables is shown in Figure 76. The diagram is created so
that on one axis lies one variable and on the other axis the remaining two variables. Each row and
column has one of the two possible values (0 or 1) so that each adjacent row or column only differs
by one entry, for example, when the row is 01, then the next row must be 11, since only one entry
should be changed.
209
Figure 78: Karnaugh map for the function F = Σm(0, 3, 5)
The Karnaugh map for four variables is shown in Figure 77. Each row and column has two
variables. The Karnaugh map for five variables is shown in Figure 78. When we are looking for 1,
it is common to not bother with writing the 0.
210
Figure 79: Karnaugh map for the function F = A′BD + B′C′D′ + C
211
BC
DE 00 01 11 10
1
00
1 1 1 1
A
1/0 1 1
01
1 1 1
11
1 1
1 1
10
1 1 1
Figure 80: Karnaugh map for the function F = ΠM(2, 5, 7, 9, 13, 15, 16, 17, 18, 20, 24, 25, 27)
The general procedure for finding the minimal sum-of-products form is:
1) Construct the Karnaugh map.
2) Circle the 1 into the largest groups possible.
3) Write the corresponding sum-of-product form based on the circled groups. For each group,
we only write the variables whose value is not changed. Variables with a value of 0 are
negated, for example, in Figure 77, for the loop in the first row, A varies between 0 and 1,
which means that it is ignored. The other variables remain constant and have a value of 0.
Thus, we write the negated forms of these variables, that is, B′C′D′.
212
The general procedure for finding the minimal product-of-sums form is:
1) Construct the Karnaugh map.
2) Circle the “0” into the largest groups possible.
3) Write the corresponding sum-of-product form for F′ based on the circled groups. For each
group, we only write the variables whose value is not changed. Variables with a value of
0 are negated, for example, in Figure 77, for the loop in the first row, A varies between 0
and 1, which means that it is ignored. The other variables remain constant and have a value
of 0. Thus, we write the negated forms of these variables, that is, B′C′D′.
4) Convert F′ to F.
Of course, we can look for the loops using trial and error, but we have no guarantee that we will
find the best loops. Therefore, we wish to find a procedure that we can always find the best loops.
Before we can describe such a procedure, we need to define certain words. An implicant
is a single 1 or group of 1’s. A prime implicant is an implicant that cannot be further combined,
that means, that a single 1 creates a prime implicant if there are not adjacent 1. Two adjacent 1’s
create a prime implicant if they cannot be combined into a group of four 1’s, while four adjacent
1’s create a prime implicant if they cannot be combined into a group of eight 1’s. Figure 79 shows
the difference between an implicant and a prime implicant. We can state that a sum-of-products
form with nonprime implicants is not a minimal form, but not all prime implicants will necessarily
be required for the minimal sum-of-products form. An essential prime implicant is a minterm
that is covered only by a single prime implicant. All essential prime implicants must be in the
minimal sum-of-products form. Thus, we can say that the objective is to find all the essential prime
terms. Figure 81 shows the procedure for minimising a Karnaugh map.
213
Figure 81: Prime implicant and implicant
214
Solution
1) We start with the first 1 (cell: 0000). The largest group that we can
find is four 1. This group is an essential prime implicant.
2) The next unlooped 1 is in the cell 0010. This 1 can only be combined
with the 1 in cell 0000. This group is also an essential prime implicant.
4) The next free 1 is in cell 1011, which we can combine with cell 1111.
This is the only possibility for combining this cell. Therefore, this group
is also an essential prime implicant.
5) The last step is to write the minimal sum-of-product form. First, we will write all the essential
prime implicants, that is, A′B′D′, A′C′ and ACD. Then, we must select one of the remaining
prime implicants (A′BD or BCD). There is no difference between which of these two prime
implicants we select. The minimal sum-of-products form is then
F = A′B′D′ + A′C′ + ACD + {A′BD or BCD}
215
Select a 1 that is still unlooped.
Yes
No
Are all 1
checked?
Yes
Stop.
216
Section 5.5: Chapter Problems
Problems at the end of the chapter consist of three different types: (a) Basic Concepts
(True/False), which seek to test the reader’s comprehension of the key concepts in the chapter; (b)
Short Exercises, which seek to test the reader’s ability to compute the required parameters for a
simple data set using simple or no technological aids. This section also includes proofs of theorems;
and (c) Computational Exercises, which require not only a solid comprehension of the basic
material, but also the use of appropriate software to easily manipulate the given data sets.
217
19) All essential prime implicants are in the minimal sum-of-products form.
20) A Karnaugh map can be used to determine the minimal product-of-sums form.
218
c. F(A, B, C, D) = Σm(0, 4, 5, 6, 8, 9, 10, 11). (EE 280,
Assignment #4, 2b)
d. F(A, B, C, D) = Σm(10, 12, 14) . (EE 280, Assignment #4, 2c)
27) For the Karnaugh map shown in Figure 82, find all prime implicants and essential prime
implicants. (EE 280, Assignment #4, 3)
CD
AB 00 01 11 10
1 0 0 0
00
1 1 0 0
01
0 1 0 0
11
0 1 1 0
10
219
Chapter 6: PLC Programming
When using a PLC, it is necessary to transfer the required information to the PLC using
some methods. There are two possible approaches. We could use an ad-hoc approach that depends
on the PLC or situation or we could use some type of standard. It is obvious that using standards
is better since we can re-use the information, for example, the same code can be re-used for
different cases without having to worry about compatibility problems. The IEC/EC-61131 is the
standard for PLC programming and will be described in the following sections. This standard
consists of five different programming languages and a common set of rules that apply to all the
programming languages.
220
3) Remainder of the POU with the instructions.
Before a POU can be used, each programme must be associated with a task. Before we can load a
task into the PLC, we must first define:
1) Which resources do we need? In the standard, a resource is defined as either a CPU (central
processing unit) or a special processor.
2) How is the program executed and with what priority?
3) Do variables have to be assigned to physical PLC addresses?
4) Do references to other programs have to be made using global or external variables?
The priority of a task shows how the given task should be executed. There two important parts to
define the priority:
1) Scheduling: Scheduling focuses on how the programme is executed. There are two
possibilities: cyclically, that is, the programme will be continually executed; and on
demand, that is, the programme will only be executed as need.
2) Priority Type: The priority type represents whether the programme can be interrupted.
Again, there are two possibilities: nonpre-emptive and pre-emptive. A nonpre-emptive
task must always be completed before another task can be started. A pre-emptive task can
be stopped if a task higher priority occurs. Figure 84 shows the two possibilities. As well,
the priority level needs to be set. This ranges from 0 for the highest priority to 3 for the
lowest priority.
Defining the above components creates a configuration. Figure 83 shows a visual representation
of the components of a configuration and how these are combined together.
The call hierarchy is defined as follows: a programme can only call function blocks and
functions. A function block can only call other function blocks and functions, while a function can
only call other functions. Recursion cannot be implemented in this standard. POUs cannot call
themselves nor can they be called as a result of a chain of POUs.
221
Configuration
Resource Resource
Task Task
POU POU
…
Function Block
Function Function
Task …
POU
… Function Block
POU
…
222
Nonpre-emptive Task, T2 Tasks
Time (ms)
100 200 300 400
Pre-emptive Task, T3
T1 T1 T1 T1
T3 T3
Time
100 200 300 400
223
the input variable outside of the POU cannot be changed. This concept is also often called
“call by value”. All POUs can use this type.
3) Output Variables (VAR_OUTPUT): The output variable will be returned to the calling
POU as a value. This concept is also called “return by value”. All POUs can use this type.
4) Input-and-Output Variables (VAR_IN_OUT): The actual parameter will be transferred
to the called POU as a pointer, that is, the location of the variable will be given so that any
changes made to the variable are directly stored. The concept is also called “call by
reference”. For variables with complex data structures, this can lead to efficient
programming. However, since the variable location is passed, this means that (undesired)
changes will impact the variable even outside the calling function. All POUs can use this
type.
5) External Variables (VAR_EXTERNAL): This variable can be changed outside of the POU
using the variable. An external variable is required to have read and write access to a global
variable of another POU within a given POU. It is only visible for POUs that list this global
variable under VAR_EXTERNAL, all others have no access to this global variable. The
identifier and type of a variable under VAR_EXTERNAL must match the corresponding
VAR_GLOBAL declaration in the program. Only programs and function blocks can use this
type.
6) Global Variables (VAR_GLOBAL): A globally declared variable can be read and written
to by several POUs. To do this, the variable must be specified in the other POUs under the
VAR_EXTERNAL with the same name and type.
7) Access Variables (VAR_ACCESS): Access variables are global variables for the
configurations that act as a communication channel between components (resources) of the
configurations. It can be used like a global variable within the POU.
224
Section 6.3.1: Simple Elements
Each PLC programme consists of basic elements that are defined as the smallest unit that,
when combined together, builds declarations and instructions, which form a complete programme.
These simple elements can be classified into delimiters, keywords, literals, and identifiers.
225
Delimiter Meaning, Clarification
4. Separator for components of a FB instance (when
accessing it)
e, E Leading character for exponents of floating-point literals
Quotation Mark ` Start and end of strings
Dollar sign $ Start of a special symbol in a string
Prefix for Time literal Introductory characters for time literals, combinations of
t#,T#; d#, D#; lowercase and uppercase letters are permitted
d, D; h, H; m, M;
s, S; ms, MS;
date#, DATE#;
time#, TIME#;
time_of_day#;
TIME_OF_DAY#;
tod#, TOD#;
date_and_time#;
DATE_AND_TIME#;
dt#, DT#
Colon : Separator for:
1. Time within time literals
2. Definition of the data type for variable declaration
3. Definition of a data type name
4. Step names
5. PROGRAM ... WITH ...
6. Function name / data type
7. Access path: data / type
8. Jump label before the next instruction
9. Network name before the next instruction
Assignment (Walrus) 1. Operator for initial value assignment
2. Input connection operator (assignment of actual
Operator :=
parameters to formal parameters when calling the POU)
3. Assignment operator
(Round) Brackets (…) Start and end of:
1. Initial value list, also: multiple initial values (with
repetition number)
2. Range specification
3. Field index
4. Sequence length
226
Delimiter Meaning, Clarification
5. Operator in instruction list (calculation level)
6. Parameter list when calling the POU
7. Subexpression hierarchy
Square Brackets […] Start and End of:
1. Array index (access to an array)
2. String length (when declaring a string)
Comma , Separator for:
1. Lists
2. Initial value lists
3. Array indices
4. Variable names (when there are multiple variables with
the same data type)
5. Parameter list when calling a POU
6. Operator in instruction list
7. CASE list
Semicolon ; End of:
1. Definition of a (data) type
2. Declaration (of a variable)
3. Structured text command
Period-Period .. Separator for:
1. Range specifications
2. CASE branches
Percent % Introductory character for hierarchical addresses for directly
represented and symbolic variables
Assignment Operator => Output binding operator (assignment of formal parameters
to actual parameter when calling a PROGRAM)
Comparison >,<; >=, <=; Comparison operators in expressions
=, <>
Exponent ** An operator in expressions
Multiplication * Multiplication in expressions
Division / Division in expressions
Ampersand & AND operator in expressions
227
using all lowercase, all uppercase, or a mixture of the two. In this book, all keywords are shown
in capitals. The keywords include the following possibilities:
1) Names of elementary data types
2) Names of standard functions
3) Names of standard function blocks
4) Names of the input variables for the standard functions
5) Names of the input and output variables of the standard function blocks
6) The variables EN und ENO in the graphical programming languages
7) The operators of the instruction list language
8) The elements of the structure text language and
9) The elements of sequential charts
Table 29 shows all the keywords in the IEC standard.
A
ABS ANY ANY_MAGNITUDE
ACOS ANY_BIT ANY_NUM
ACTION ANY_DATE ANY_REAL ARRAY
ADD ANY_DERIVED ASIN
AND ANY_ELEMENTARY AT
ANDN ANY_INT ATAN
B
BOOL BY BYTE
C
CAL CLK CTU
CALC CONCAT CTUD
CALCN CONFIGURATION CU
CASE CONSTANT CV
CD COS
CDT CTD
228
D DINT DT
DATE DIV DWORD
DATE_AND_TIME DO
DELETE DS
E
ELSE END_PROGRAM EN
ESIF END_REPEAT ENO
END_ACTION END_RESOURCE EQ
END_CASE END_STEP ET
END_CONFIGURATION END_STRUCT EXIT
END_FOR END_TRANSITION EXP
END_FUNCTION END_TYPE EXPT
END_FUNCTION_BLOCK END_VAR
END_IF END_WHILE
F
FALSE FIND FUNCTION
F_EDGE FOR FUNCTION_BLOCK
F_TRIG FROM
G
GE GT
I
IF INITIAL_STEP INT
IN INSERT INTERVAL
J
JMP JMPC JMPCN
L
L LEFT LN
LD LEN LOG
LDN LIMIT LREAL
LE LINT LT
229
LWORD
M
MAX MOD MUX
MID MOVE
MIN MUL
N
N NEG NOT
NE NON_RETAIN
O
OF OR
ON ORN
P
P PROGRAM PV
PRIORITY PT
Q
Q QU
Q1 QD
R
R RELEASE RETCN
R1 REPEAT RETURN
R_EDGE REPLACE RIGHT
R_TRIG RESOURCE ROL
READ_ONLY RET ROR
READ_WRITE RETAIN RS
REAL RETC
S
S SEMA SINGLE
S1 SHL SINT
SD SHR SL
SEL SIN SQRT
230
SR STN SUB
ST STRING
STEP STRUCT
T
T TIME_OF_DAY TP
TAN TO TRANSITION
TASK TOD TRUE
THEN TOF TYPE
TIME TON
U
UDINT ULINT USINT
UINT UNTIL
V
VAR VAR_EXTERNAL VAR_IN_OUT
VAR_ACCESS VAR_GLOBAL VAR_OUTPUT
VAR_CONFIG VAR_INPUT VAR_TEMP
W
WHILE WORD
WITH WSTRING
X
XOR XORN
231
reserved symbol in a string literal, we must place a dollar sign before the reserved symbol,
for example, '$$45' will give “$45”. As well, there are various nonprintable special
characters that can be represented using the dollar sign. Table 30 lists some of the more
common special characters.
3) Time Literals, that give the value for time points, durations, and dates.
The octothorpe is used to give additional information about the literal, for example, 2# implies a
binary representation. The additional information always comes before the octothorpe. Common
representations are:
1) Binary Representation: 2#
2) Hexadecimal Representation: 16#
3) Duration Representation: T# or TIME#
4) Date Representation: D# or DATE#
5) Time-of-Day Representation: TOD# or TIME_OF_DAY#
6) Date-and-Time Representation: DT# or DATE_AND_TIME#
It is possible to use any defined data structure with the octothorpe. Numerical and time literals may
also contain underscores in order to make the presentation more legible. Capitalisation is not
important.
232
Time literals have some special properties. There are multiple different types of time
literals: duration, date, time of day, and date and time. For each case, there is a special
representation with its own rules.
Duration is represented by T#. After the octothorpe, the duration is given using the
following units:
1) d: Day
2) h: Hours
3) m: Minutes
4) s: Seconds
5) ms: Milliseconds
Each unit is separated by an underscore. 22 The units must be placed from largest to smallest. The
smallest unit can have a decimal value, for example, T#1m_10s_100.7ms. The highest value
can “overflow”, for example, the time duration T#127m_19s is valid and will be automatically
converted into the proper representation of T#2h_7m_19s. A negative value is also possible, for
example, T#-22s_150ms.
Dates are represented using D#. After the octothorpe comes the date in scientific notation,
that is, year-month-day, for example, D#2017-02-28.
The time of day is represented using TOD#. After the octothorpe comes the time in the
format Hours:Minutes:Seconds.Decimal Part, for example, TOD#12:45:25.21. Note that the
24-hour clock is used.
The date and time is shown using DT#. After the octothorpe comes the date in scientific
notation followed by a dash and the time in the time-of-day format, for example, DT#2017-05-
30-2:30:12.
22
The underscore is not obligatory to separate the units, but it does help readability of the text.
233
variables, derived data types, structures, transitions, steps, and action blocks. The identifiers must
satisfy the following rules:
1) The first element cannot be a number (✗ 1Prog).
2) No more than one underscore can be used together (✗ A__B [with two underscores]).
234
3) Floating-Point Numbers (ANY_REAL)
4) Dates and Times (ANY_DATE)
5) Strings and Durations (ANYSTRING, TIME)
The general data types ANY_INT and ANY_REAL can be represented together by the group name
ANY_NUM.
Table 33: The elementary data types in the IEC 61131-3 Standard. The initial letters in the data types represent: D = double, L =
long, S= short, and U = unsigned.
235
Data Type Keyword Bits Range Initial Value
WSTRING Double (String) — — ""
For an elementary data type, it is possible to define the initial value and range. The initial
value is defined as the value of the variable when it is first used. The range defines what the
possible values for the variable are.
236
As in many other programming languages, the components of a data structure are access
using a period and the component name, for example, VAR.TEST[3], where the component
TEST is an array.
TYPE
COLOUR : (red, yellow, green);
SENSOR : INT;
MOTOR :
STRUCT
REVOLUTIONS : INT := 0;
LEVEL : REAL := 0;
MAX : BOOL := FALSE;
FAILURE : BOOL := FALSE;
BRAKE : BYTE := 16#FF;
END_STRUCT;
END_TYPE;
where the element COLOUR is an enumeration that can only take the values red, green, and
yellow; SENSOR is an INT; MOTOR is a data structure that contains the following elements:
REVOLUTION with an initial value of 0, LEVEL with an initial value of 0, MAX with an initial
value of FALSE, FAILURE with an initial value of FALSE, and BRAKE with a hexadecimal
initial value of FF.
237
Section 6.4: Ladder Logic
The programming language ladder logic comes from the domain of electromechanical
relay systems and describes the flow of electricity through a single network representing the POU.
This programming language is primarily used for working with Boolean signals.
The ladder network or diagram consists of two vertical tracks and horizontal rungs
connecting the vertical tracks. It is assumed that “electricity” flows from the left-hand track to the
right-hand track following the rungs. Thus, the ladder network is always read rung by rung from
top to bottom and in a given row from left to right, as long as no other order is provided. It is
traditional to label all the left-hand rungs with a number. Normally, the numbers are not sequential
but increase in units of 5 or 10 in order that additional future rungs can be easily added. Finally,
the ladder network is often visually split into two parts: a left-hand part that shows the
computations and a right-hand part that shows the storing or using of the variables. This convention
makes reading the ladder network easier.
238
Name Symbol Commentary
Copies the value from left to right if and only if
VarName
Negative-transition a TRUE → FALSE transition in the variable
sensing contact N VarName is detected; otherwise, FALSE is
copied.
VarName Copies the value on the left into the variable
23
Coil
VarName.
VarName
Copies TRUE to variable VarName, if the left
23
Set coil
S link is TRUE; otherwise, no change.
VarName
Copies FALSE to variable VarName, if the left
23
Reset coil
R link is TRUE; otherwise, no change.
23
The value on the left is always transferred to the right-hand side.
239
Name Symbol Commentary
SR
S Q1
This block combines the functions of the set and
Set-Reset Block
reset coils.
R
Return RETURN Exits the POU and returns to the calling POU.
Label
Label Shows the name for part of a network.
Figure 85 shows how the typical Boolean operators can be implemented in ladder logic.
The AND operator is implemented by placing the two contacts in series, while the OR operator
places the two contacts in parallel. This follows from the observation that the electricity flows
from left to right. For an AND operation, we need both contacts to be true for the electricity to flow.
This implies that both need to be in series. On the other hand, for the OR operation, electricity can
flow through either of the two paths. Therefore, the contacts should be placed in parallel.
24
tnw represents a Boolean variable that determines if the given link should be performed.
240
Q = XY
X Y Q
X Q
Q = X + Y
241
LockOff NoError
FUN1
EN ENO
242
X Y Q
X Z
243
Implement this recipe using ladder logic.
Solution
In order to implement a recipe in ladder logic, we will need to define Boolean variables
that keep track of in which step we are. In this example, since we have five steps, it makes sense
to define the Boolean step variables as S1, S2, S3, S4, and S5. S1 will be initialised as TRUE,
while all other variables will be initialised as FALSE. At the end of each step, the current step
variable will be reset (to zero) and the next step variable will be set (to one). Turning on and off
valves will be implemented using the set and reset coils, while the delay and timer will be
implemented using the built-in time function (TON). Rung numbers have been added in multiples
of 5. Finally, it can be noted that in this particular recipe each set has a corresponding reset. This
is a feature of many recipes that will be made explicit in the PLC programming language sequential
function charts. The final programme in ladder logic is shown in Figure 88.
244
S1 START L1 L2 V1 V2 S1 S2
000 S S R S
S2 L2 V1 V2 M1 S2 S3
005 R R S R S
S3 M1 S3 S4
TON
EN ENO R R S
T#5m Time
S4 V3 S4 S5
TON
015
EN ENO
S R S
T#1m Time
V3 S5 S1
S5 L1
020 R R S
245
Label: Operator/Function Operand(list) Comments
where Label names a given row of instructions and along with the colon can be ignored; the
Operator or Function is an operator in instruction list or a function, Operand is zero, one,
or more constants or variables for the operator or input parameters for the functions that are
separated by commas; and Comments is an optional field that provides additional information
about what the given instruction row does. All fields in italics are optional.
246
Table 35: Changes in the Current Result for Different Operator Groups
LD N ANY Load
ST N ANY Save
S BOOL Set
R BOOL Reset
AND / & N, ( ANY Boolean AND
OR N, ( ANY Boolean OR
XOR N, ( ANY Boolean Exclusive OR
ADD ( ANY Addition
SUB ( ANY Subtraction
247
Operator Acceptable Modifiers Operand Definition
The current result can be linked with the result of an instruction sequence using the bracket
operators. When the modifier “(” appears, the associated operator, the value of the current result
and the data type of the current result are cached. The data type and value of the following line are
loaded into the current result. When the “)” operator appears, the cached values and data type
based on the operator and modifiers are linked with the current result. The result is then stored as
the current result. Expressions in brackets can be nested.
Table 37: Two Possibilities for Calling the Function LIMIT(MN, IN, MX)
248
Possibility 1: Actual Parameters Possibility 2: Formal Parameters
IN := 2,
MX := 3
)
A function has at least one output parameter (function value) that is returned using the
current result. Should the function have additional output parameters, these can be returned using
parameter assignments. A call without formal parameters takes place in one line. The original order
of the output declarations must be observed. In the case of formal parameter assignments, this is
done line by line, followed by bracket line. With formal parameter assignment, the output
parameters are marked with =>, e.g., ENO => ErrorOut means that ENO is an output value
and is saved in the ErrorOut variable. The programming system assigns the function value to a
variable with the function name. This name is declared automatically and does not have to be
specified separately by the user in the declaration section of the calling block.
Table 38: Three Methods for Calling the Function Block ZEIT1(IN, PT) with output variables Q and ET.
249
Method 1 Method 2 Method 3
Q => Aus, ST ZEIT1.IN IN ZEIT1
ET => WERT CAL ZEIT1
)
LD ZEIT1.Q LD ZEIT1.Q
ST Aus ST Aus
LD ZEIT1.ET LD ZEIT1.ET
ST WERT ST WERT
250
Instruction (* Comments *) CR X1 X2 W1 FB1.i1 FB1.o1
ST Save CR → 10 1 0 10 10 103
FB1.il FB1.i1
CAL FB1 FB1: internal 10 1 0 10 10 112
computation
LD Load the 112 1 0 10 10 112
FB1.o1 output o1
from FB1 → CR
ST W1 Save CR → W1 112 1 0 112 10 112
GT 90 (CR > 90)? → 1 1 0 112 10 112
CR
251
Section 6.6: Function Block Language
Function block language is a graphical model with Boolean operators and complex
functionality represented using blocks. Motivated by electronic circuits, the signals flow between
the blocks and are converted from Boolean inputs into Boolean outputs. Although this language is
based on electrical circuits, the current standard has adopted different representations for the
blocks symbolising AND and OR. The older, German standard was more aligned with the standard
electrical circuit diagrams.
NAME
General There are as many input and output
Block ports as required by the block.
252
Name Symbol Comments
This is placed within the function
Falling block next to the corresponding
Edge variable in order to show a falling
edge transition.
Leaving a POU and returns to the
return RETURN
calling POU.
If the left connection snw 25 is TRUE,
conditional
snw RETURN then exit the POU and return to the
return
calling POU; otherwise ignored.
Jump to the network with the given
jump NAME
identifier NAME.
If the left connection snw24 is TRUE,
conditional
snw NAME jump to the network with the given
jump
identifier NAME; otherwise ignored.
Inputs and outputs are defined upon first use. Figure 89 shows an example of a function
block diagram with common components. The exact method for labelling the variables is not
specified in the standard; any reasonable method can be used.
25
snw represents a subnetwork that returns a Boolean value.
253
Var1
AND Out
Var2 OR
CTU
CU Q
Var3 R CV
Var4 PV
254
Var1
AND Out
OR
Var2
255
X
AND Q
Y OR
AND
Z
AND
256
structured text, the solution to a particular programming task is broken down into individual steps
(instructions). An instruction is used to calculate and assign values, control the flow of commands,
or to call or exit a POU.
257
Keyword Description Example Comments
Assigns the value on the right to
:= Assignment d := 10;
the variable on the left.
Calls another POU of type
FBNAME(
Calling and Using function block and assigns the
:=, => Part1:=10,
Function Blocks required parameters “:=” for
Part3=>20);
inputs, “=>” for outputs.
RETURN Return RETURN; Returns to the calling POU.
IF A>100 THEN
f:=1;
IF … THEN
ELSIF d=e THEN
ELSE, Selection of alternatives using
Branching f:=2;
ELSIF Boolean logic.
ELSE
END_IF
f:=4;
END_IF
CASE f OF
CASE … OF 1: f:=11;
Selects a code block based on the
ELSE Multiple Selection 2: f:=14;
value of the expression f.
END_CASE ELSE f:=-1;
END_CASE;
FOR h:=1 TO 10
FOR … TO …
BY 2 DO Repeated running of a code block
BY … DO FOR Loop
f[h/2]:=h; with start and end conditions.
END_FOR
END_FOR;
WHILE m>1 DO
WHILE … DO Repeated running of a code block
WHILE Loop n:=n/2;
END_DO with end conditions.
END_WHILE;
REPEAT
REPEAT …
i:=i*j; Repeated running of a code block
UNTIL REPEAT Loop
UNTIL i>10000 with end conditions.
END_REPEAT
END_REPEAT;
258
Keyword Description Example Comments
EXIT Breaking a loop EXIT; Immediate exit from a loop
Command
; Shows the end of a command.
delimiter
259
Please write the structured text programme for the following system. As shown in the
figure, a tank can be filled using valves. The weight of the tank is determined using a scale. The
function block monitors the tank weight to determine if the tank is full, empty, or in between the
two states. The block gives a single command that can have four values:
1: Fill the tank;
2: Stop filling the tank;
3: Start the stirrer;
4: Empty the tank.
As necessary, the appropriate values are opened or closed to control the tank level. The stirrer can
only work if the tank is full; otherwise, the command is ignored.
V1
M
Tank
V2 Scale
Weight Control
INT Command V1 T_VALVE
REAL Weight V2 T_VALVE
REAL Full_weight
REAL Empty_weight Speed REAL
Solution
(*Tank States*)
TYPE T_STATE:(FULL,NOT_EMPTY,EMPTY); END_TYPE;
260
(*Valve States*)
TYPE T_VALVE:(ON,OFF); END_TYPE;
FUNCTION_BLOCK Weightcontrol
VAR_IN
Command: INT;
Weight: Real;
Full_weight,Empty_weight: Real; (*Same data type declared on
one line*)
END_VAR
VAR_OUTPUT
V1: T_VALVE:=OFF;
V2: T_VALVE:=OFF;
Speed: REAL:=0.0;
END_VAR
VAR (*Internal Variables*)
State: T_STATE:=EMPTY;
END_VAR
(*Determine the Tank State: Compare the full and empty weights *)
IF Weight >= Full_weight THEN
State:=FULL;
ELSIF Weight <= Empty_weight THEN
State:=EMPTY;
ELSE
State:=NOT_EMPTY;
END_IF
(*Implementation of Commands: 1-Fill, 2-Stop, 3-Stir, 4-Empty*)
CASE Command OF
1: V2:=OFF;
V1:=SELECT(G:=State=FULL,IN0:=ON,IN1:=OFF);
(*ON only if G is false*)
2: V2:=OFF;
261
V1:=OFF;
4: V1:=OFF;
V2:=ON;
END_CASE;
(*Stirrer Speed*)
Speed :=SELECT(G:=Command=3;IN0:=0.0;IN1:=100.0);
END_FUNCTION_BLOCK
262
Steps are shown using a rectangle. Figure 91 shows two possible forms for showing a step.
The general step block, which is shown in Figure 91 (left), is a simple rectangle with a single
border. The initial step block, which is shown in Figure 91 (right), is a simple rectangle with double
border.
S_4 S_1
Figure 93: Steps in Sequential Function Charts: (left) general step and (right) initial step
The transition conditions are marked with a horizontal line with identifiers. The Boolean
description, often called a guard, shows the requirements for a transition to occur. The guard can
be written any of the other PLC languages. Figure 92 shows some possibilities. The most
frequently used PLC languages for describing transitions is structured text, function block
language, or ladder logic. Often, the guard is ignored.
263
Function Block
Language
S1
x y
Ladder Logic
z
S2
S1 S1
S2 S2
TRANSITION trans12
LD x
ANDN y
END-TRANSITION
When the POU is called, the specially marked initialisation step is made active. All the
assigned instructions will be performed. When the transition conditions become TRUE, the
initialisation step will be made inactive and the next step will be activated. When a transition
264
occurs, the active attribute (often called a token) is passed from the current active step to its
successor. This active attribute wanders through the individual steps, multiplying for parallel
branches, and coming together again. It may not be completely lost nor is uncontrolled distribution,
which occurs when multiple tokens are present in a single step, possible.
a b c
S_4 d
Figure 95: Components of an Action Block: a: Qualifier; b: Action Name; c: Indicator Variable; d: Process Description
265
Qualifier Short Name Description
R reset Means that a saved action is stopped.
L (time) length Means that the action lasts for the specified time T.
D delay Means that the action is delayed by the specified time
before being implemented.
P pulse Means that the action occurs for a very short period of
time.
DS delayed and saved Means that the action is first delayed and then saved.
SD saved and delayed Means that the action is first saved and, then after the
delay, if the step is still active, implemented.
SL saved and time Means that a time-limited action is saved.
limited
266
paths. All parallel paths must end before the process can continue. Figure 97 shows an example of
a parallel path.
S_1
T_14 T_15
S_4 S_5
T_46 T_56
S_6
267
S_1
Figure 97: Usual Decision Order for Alternative Paths in Sequential Function Charts
S_1
3 1 2
Figure 98: User-Defined Decision Order for Alternative Paths in Sequential Function Charts
268
S_1
T_14
S_4 S_5
T_46
S_6
269
it returns a “1”. Then, the motor for the agitator M should be turned on and valve Y2 opened.
When the level sensor S3 reaches the desired value, valve Y2 should be closed. After waiting 5
seconds, heater H is turned on until the temperature sensor S4 reaches the desired value. During
the heating procedure, should the pressure sensor S5 return a high-pressure alarm in the reactor,
then the pressure release valve Y4 should be opened until the alarm is lowered. After the heating
procedure has been completed, the agitator runs for 10 more seconds at which point the valve Y3
is opened. Once the reactor is empty, that is, the reactor status given by S1 returns “1”, valve Y3
is closed and the process can be restarted.
Solution
Before the solution to the problem is provided, it is useful to consider the general procedure
for solving such problems. This procedure can be written as
1. Define all the variables and their values, especially for the Boolean variables.
2. Write the process description as a series of steps. Note that a single sentence can be
associated with multiple steps or multiple sentences can be combined into a single step.
3. Draw the sequential function chart.
Defining the Variables
The variables are defined as follows.
270
Input Variable Symbol Data Type Logical Values Address
Start Button START BOOL Pressed START = 1 E 0.0
Reactor Status S1 BOOL Tank empty S1 = 1 E 0.1
Level Sensor 1 S2 BOOL Level 1 reached S2 = 1 E 0.2
Level Sensor 2 S3 BOOL Level 2 reached S3 = 1 E 0.3
Temperature S4 BOOL Temperature S4 = 1 E 0.4
Sensor reached
Pressure Sensor S5 BOOL High-Pressure S5 = 1 E 0.5
Alarm
Valve 1 Y1 BOOL Valve open Y1 = 1 A 4.1
Valve 2 Y2 BOOL Valve open Y2 = 1 A 4.2
Release Valve Y3 BOOL Valve open Y3 = 1 A 4.3
Pressure Release Y4 BOOL Valve open Y4 = 1 A 4.4
Valve
Heater H BOOL Heater on H = 1 A 4.5
Agitator Motor M BOOL Motor on M = 1 A 4.6
Corresponding Process
Sequential Chart Step Description
Comments
The start block is always
present as the first step. It is
S5 D error message,…
271
Corresponding Process
Sequential Chart Step Description
Comments
… then valve Y1 should be
S_2 N Valve 1 opened Y1
opened,…
272
Corresponding Process
Sequential Chart Step Description
Comments
…After the heating
procedure has been
completed, the agitator runs
D
Wait Time_1
for 10 more seconds…
T#10s
Should the pressure sensor
S_5 N Pressure Valve
Opened Y4 S5 return a high-pressure
alarm in the reactor, then the
Y4 = S_5 & S5 pressure release valve Y4
should be opened until there
alarm is lowered…
S1 N restarted.…
D
Once each step has been written, it is possible to combine everything into the final diagram.
273
274
Section 6.8.5: Validity of a Sequential Function Chart
With sequential function charts it is easy to create complex networks. However, the
question remains if these networks are truly valid and result in proper operation.
Although there exists a method to determine the validity of a sequential function chart, it
not guaranteed that it will find all valid networks. The proposed method only determines if the
network is valid. If the method fails, there is no guarantee that the chart is truly invalid. The
procedure is:
1) Replace all step-transition-step by a
single step.
The validity is then determined using the following rule. A sequential function chart is valid when
the chart can be reduced to an implementable single step.
Example 46: Determining the Validity of a Network
Determine the validity of the following sequential function chart.
275
Solution
The method is followed until no further reductions can be produced. The first step is to
apply Rule #1, that is,
276
4
277
3
The reduced chart is obviously valid, since it contains only a single step and a single transition.
Thus, we can conclude that the proposed sequential function chart is in fact valid.
278
6) “LE” means less than.
7) A task with a priority value of 3 has the highest priority.
8) In the function block language, a double error denotes a jump between two parts of the
function block network.
9) In the function block language, we can use “&”.
10) In ladder logic, a coil can be used to save a value.
11) In ladder logic, we can create feedback loops.
12) In instruction list, the statement “SN HIPPO” is a valid one.
13) In instruction list, the brackets “()” delay the implementation of an instruction.
14) In structured text OR has a higher priority compared to AND.
15) In structured text, we can use the CASE command.
16) In sequential function charts, N means that as soon as the step is ended, the action is stopped.
17) In sequential function charts, R means that an action is delayed by the given time.
18) In sequential function charts, it is possible to easily determine the validity of the result chart.
19) Ladder logic is a great idea to create complex, high-level PLC programmes.
20) Instruction list is designed for simple, optimised PLC programmes.
279
Figure 100: Validity of Sequential Function Charts
22) [Maier Ablaufsprache I] Give the sequential function charts for the controlling the
following systems:
a. Stirring process: Figure 99 shows the P&ID diagram of a stirred tank B with flow
controller US2. The binary input signals to US2 are the high-level alarm L, the start
signal S and the end signal E. The binary output signals from US2 are V1 for
switching the input valve, V2 for switching the drain valve, and R for switching the
stirrer motor. The following sequence is required: After the start signal reaches 1
(S = 1), a liquid is to be dosed by opening the input valve (with V1 = 1) and turning
the stirrer on (R = 1) until the level L reaches its upper limit (L = 1 ). Then, valves
are closed and the stirrer should alternately between being switched on for 1 min
and switched off for 1 min. This switching on and off should, regardless of the
current cycle, be ended immediately when the end button is pressed (E = 1). Then
the drain valve should be opened for 5 minutes. Then everything should be switched
280
into the idle state, that is, V1 = V2 = R = 0. When S = 1, the process is started from
the beginning.
b. Washing Machine: The control for a simple washing machine, shown in Figure
100 with an explanation of the variables in Table 41, should implement the
following sequence. After the input signal START has a value of “1”, valve V1
should be opened until the binary level sensor L1 reports that the desired water level
has been reached. Then, the MOTOR of the washing drum should be switched on
alternately for a period of time “T_on” and switched off for a period of time “T_off”.
During this alternating switching on and off, the electrical HEATING is first
switched on until the water temperature has reached a certain value, which is
reported by the binary sensor T2. Then, the process should wait a certain minimum
waiting time “T_wait” before any further heating occurs. Once the motor has
stopped running, the alternative switching of the motor is also stopped. Then, the
PUMP is switched on and valve V2 is opened at the same time. Once the level
281
sensor L0 reports an empty drum, the initial state is reached, and the process can be
repeated.
282
diagram; and c) the PLC programme using instruction list, ladder logic, and function block
languages for the minimised function.
a. The function shown using ladder logic in Figure 101.
b. The function that implements a majority decision rule for a 2-out-of-3 redundancy
system, that is, the output Q is “1” if and only if at least two of the inputs are “1”.
c. The function shown by the truth table in Table 42.
d. The function shown by the truth table in Table 43.
e. The function Q = f(B, G, M) is described as follows:
i. Three sensors in a sorting system measure the properties of parts and deliver
the following binary signals to the inputs of a PLC:
1. B, where B = 1 means a hole is present,
2. G, where G = 1 means green paint is present, and
3. M, where M = 1 means a metallic material is present.
ii. Parts produced without errors have the following properties:
1. Either metallic and green (with or without a hole)
2. Nonmetallic, not green, and with a hole.
iii. The output Q of the PLC should be “1” when the part is to be rejected, i.e.,
if it does not have the above properties of a faultlessly produced part.
283
X Z Y Q
X Z Y
X Z
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
Q 0 1 1 0 1 1 1 1
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
Q 0 0 1 1 1 0 1 1
284
Chapter 7: Safety in the Automation
Industry
As automation becomes more widespread, there is a corresponding need to consider the
safety of those who come in contact with the automated systems. Furthermore, automated systems
need to take into consideration safety constraints themselves when they implement various actions.
For these reasons, it is helpful to briefly review the different safety regulations. Obviously, it is
always your engineering obligation to make sure that you have checked the most recent and most
relevant regulations and laws applying to your specific situation.
In general, safety can be divided into two parts: physical and digital. Physical safety
considers the steps and regulations required to ensure that the plant and its surroundings are safe
for the workers, visitors, and the environment. Environmental protection considers not only
hazardous substances, but also the emission of electromagnetic radiation or noise. Digital safety
considers the steps required to ensure that the communication networks and the associated devices
cannot be hacked and used to create an unsafe physical situation. Furthermore, digital safety must
ensure that no sensitive information can be stolen or used in an inappropriate manner. This aspect
is very important given the increasing legislative interest in making sure that confidential personal
information remains confidential.
285
3) Work, which is energy stored in springs, electrical circuits, and other devices. When
released, this can lead to catastrophic failure and impressive damage. A common electrical
example is a short circuit, which can release tremendous amounts of energy.
4) Heat, which is energy crossing a boundary. Heat exchange is always based on a
temperature difference between two points in space. Since heat always influences the
environment, touching hot surfaces, for example, can lead to burns. The same situation
applies to touching very cold surfaces, which can also lead to burns or frostbite.
In order to increase the safety of a physical system, it can be useful to consider the following steps
when designing the overall system:
1) Minimise: Avoid using (or use as little as possible) any hazardous substances.
2) Substitute: Replace hazardous substances by ones that are less hazardous.
3) Moderate: Replace extreme operating conditions by ones that are less severe.
4) Simplify: Create designs or processes that are less complex and simpler.
5) Isolate: Create situations where the effect of a hazard has minimal impact on the overall
system, for example, physically separating the office space from the production area.
The above ideas can be framed within the inherently safer predesign (ISPD) approach, which
consists of the following 4 steps:
1) Identify: Determine what the hazards are and how they can impact the process.
2) Eradicate: Remove the effects of as many of the hazards as possible, for example, by
designing fail-safe systems, that is, should a system encounter a failure it ends up in an
inherently safe mode that cannot cause further problems. A common example of this is the
design of control valves to fail open or closed depending on the process conditions, for
example, a control valve for a critical cooling jacket should fail open so that the system
remains cooled even if the valve has failed.
3) Minimise, simplify, and moderate: If a hazard cannot be eradicated, then try and limit its
effects on the system.
4) Isolate: Create structures that will limit the amount of damage that can occur, for example,
by segregating hazardous operations.
Another approach to this situation is to perform a hazard-and-operability study (HAZOP) to
determine where the given hazards lie and how best to mitigate them. A HAZOP requires that a
detailed plan of the process be available. Thus, such analysis is often performed at a later stage of
286
design after the overall process design has already been completed. This implies that it could be
too late to make substantive changes at this point. Thus, HAZOPs are often used to provide an
understanding of the hazards present and their risk. The HAZOP procedure consists of the
following four steps: determine, using a systematic search, possible faults; find the causes for the
faults; estimate the effects of the faults on the system; and suggest appropriate countermeasures.
Finally, it can be mentioned that when designing safety systems, it is useful to consider
redundancy, that is, having more than one channel or way to achieve a given task. As well, this
implies that different channels should be used for different tasks (control, alarm, and monitoring),
so that there is less risk of catastrophic failure. Thus, for example, alarms and monitoring should
not occur on the same channel. If it should fail, alarm signals can no longer be transmitted in
addition to the less important monitoring signals. There are two main ways to implement
redundancy. In the first approach, often called homogeneous redundancy, the same task is
implemented by multiple (identical or similar) devices, for example, the temperature is measured
using 3 temperature sensors at the same point. However, this approach carries the risk that
systematic errors in the sensors or devices are propagated into the system. In the second approach,
often called inhomogeneous redundancy or redundancy by diversity, the same task is
implemented using different devices, for example, three separate path-planning computer systems
that use different computational algorithms could be implemented and the decision taken by
majority vote, that is, if 2 or more algorithms give the same result it is followed. Selecting the
appropriate approach depends on the requirements and standards of the process.
287
it makes little sense to define the risk with an exact value, it is common to instead associate a given
level to the individual variables and look at the combination of levels.
For C, the following levels are defined:
• C1: Minor injuries
• C2: Major or permanent injuries of one or more people or a single death
• C3: Up to 5 deaths
• C4: More than 5 deaths.
For F, two levels are defined:
• F1: During the course of the day, people are in the danger zone less than or equal to
10% of the time.
• F2: During the course of the day, people are in the danger zone more than 10% of the
time.
For P, two levels are defined:
• P1: It is possible to mitigate the hazard (one should provide the appropriate steps to do
so).
• P2: It is not possible to mitigate the hazard.
For W, three levels are defined:
• W1: The undesired state will occur less than once every 10 years.
• W2: The undesired state will occur less than once per year.
• W3: The undesired state will occur more often than once per year.
The above levels are then combined to give an overall safety integrity level (SIL). There are four
safety integrity levels labelled SIL 1 to SIL 4, where the larger number reflects a more hazardous
level. The relationship between the different parameters is shown in Figure 102.
288
Figure 104: Relationship between the parameters and the safety integrity levels
289
2) DIN EN ISO 216 which standardises paper sizes
3) DIN ISO 509 which covers the production of technical drawings
4) DINE EN 772-7 which covers clay masonry units, especially ceramic bricks.
Other states use similar systems, for example, Austria prefixes its codes with ÖNORM
while in the United States of America, we find the ANSI system.
Safety regulations in Germany (and most of Europe) for machines can be split into three
types:
• Type A Regulations: These regulations cover the basic safety concepts, design
principles, and general aspects of machines. An example of a Type A regulation is the
EN ISO 12100 standard that provides the general principles of design.
• Type B Regulations: These regulations are baseline safety standards and requirements
for protective equipment. There are two subtypes: B1-Regulations that cover specific
safety aspects and B2-Regulations that cover the standards for protective equipment
required for machines. An example of a Type B1 regulation is the EN ISO 13855
standard that provides the guidelines for the arrangement of protective devices, while a
Type B2 regulation would be the EN 953 standard that considers fixed guards for
machines.
• Type C Regulations: These regulations are the specific safety standards for a particular
machine or group of machines. An example of a Type C regulation would be the EN
693 standard that provides the standards for hydraulic presses.
290
implemented. Multiple interacting networks should be considered to provide additional levels of
security. Finally, the workers should be educated in proper digital safety, as the digital system is
only as strong as its weakest link. People placing unknown USB-drivers into work computers can
easily introduce unwanted viruses into the company network.
291
15) A risk with a W-level of W3 implies that the undesired state will occur more often than
once per year.
16) In Germany, Type A regulations cover the detailed requirements for the safety of a specific
machine.
17) An example of a B2 regulation would be the design of protective guards for machines.
18) An example of a C regulation would be the standards for the design of chemical reactors.
19) Using simple passwords and minimal digital security is a good idea for a critical chemical
process.
292
Q-SHOP ENGINEEERING
Saturday, March 22, 2008
PT-3
PE-
PE-3 spare
Cooling water, in
4
TI-
5
TE-4 C02, out
TI-5
TE-5
_1
FT
FE-1
-2
PIC
TT
TE-2 C-2
4
6 7
HEX-1
M-1
P-179
PT-2 3
PE-2
PE TE-1
PE-1 Spare TI-3
1
C02, in
2
V-3
ESD
V-4
ESD-Bypass
293
Chapter 8: English-German and German-
English Glossary
This chapter will provide translations in both directions for the most important concepts in
the book.
294
English Word German Translation
Process level Prozeßebene
Fieldbus Feldbus
Time Zeit
Value Wert
Continuous stetig
Discrete diskret
Binary signal Binäres Signal
Analogue signal Analogisches Signal
Digital signal Digitales Signal
Accuracy Richtigkeit 26
Precision Präzision26
Range Spannweite
Bias Verzerrung (or Bias)
Calibration Kalibrierung
Pressure sensor Druckmeßgerät
Gauge pressure Manometerdruck
Vacuum (pressure) Unterdruck 27
(Liquid) Level sensor Füllstandmeßgerät
Flow sensor Durchflußmeßgerät
Temperature sensor Temperaturmeßgerät
Thermocouple Thermoelement
Characterisation (curve) Kennlinie
Valve Ventil
Pump Pumpe
26
In German, the emphasis that can be found on the distinction between accuracy and precision is not strong. In
general, both concepts are often called Genauigkeit and both must be satisfied in order to have a good value for
Genauigkeit.
27
Uncertain!
295
English Word German Translation
Stiction Haftreibung 28
Deadband Totzone
Hysteresis Hysterese
Pump characteristic curve Pumpenkennlinie
Net positive suction head (NPSH) Haltedruckhöhe 29
(Pump) Head Druckhöhe 30
Efficiency Effizienz
Central processing unit (CPU) Zentrale Verarbeitungseinheit (ZVE)
Read-Only memory (ROM) Festwertspeicher
Random access memory (RAM) Direktzugriffsspeicher
Bus Bus
Flag (in a PLC) Markierung, Flag
Watchdog (in a PLC) Watchdog
Scan (in a PLC)
Pre-emptive Unterbrechend
Nonpre-emptive Nicht unterbrechend
Analogue-to-Digital Converter Analog-Digital-Umsetzer
Digital-to-Analogue Converter Digital-Analog-Umsetzer
Data historian Datenhistoriker 31
Live zero lebender Nullpunkt
State-space model Zustandsmodell
Transfer function Übergangsfunktion
Automaton (pl: automata) Automat (pl: Automaten) 32
Block diagram Blockdiagramm
28
Normally, this would translate the concept of static friction as used in physics. The word in engineering has a slightly
different meaning.
29
This concept is not commonly encountered in the German literature. The translation is suggested by the DIN EN
ISO 17769 standard.
30
This concept is foreign to the German literature on pumps.
31
Not sure if this is the correct translation.
32
This is one of those weak n-nouns in German that use for the plural form also for all oblique cases in the singular.
296
English Word German Translation
Rohrleitungs- und Instrumentenfließschema
Piping and instrumentation diagram (P&ID)
(R&ID) 33
Process flow diagram (PFD) Fließschema, Fließdiagramm
Linear linear
Nonlinear nicht linear
Principle of Superposition Superpositionsprinzip
Principle of Homogeneity Homogenitätsprinzip
Time-invariant Zeitinvariant
Time-varying Zeitvariant
Lumped parameter model Modell mit konzentrierten Parametern
Distributed parameter model Modell mit verteilten Parametern
Causal system kausales System
Noncausal System antikauseles System
System with memory dynamisches System
System without memory (memoryless system) statisches System
State Zustand
Input Eingang
Output Ausgang
Single-input, single-output system Eingrößensystem
Multi-input, multi-output system Mehrgrößensystem
Deadtime Totzeit
Time delay Totzeit
Realisierung (eine Übertragungsfunktion),
Realisation (of a transfer function, general)
Normalform 34
Controllable canonical realisation Regelungsnormalform
Observable canonical realisation Beobachtungsnormalform
Prediction error model Vorhersagefehler-Modell
33
The abbreviation is based on the form Rohrleitungs- und Instrumentendiagramm.
34
Normalform is used to refer to the canonical realisation.
297
English Word German Translation
Autoregressive Moving Average Exogenous Autoregressive Moving-Average-Modell mit
Model externen Eingängen
Autoregressive Exogenous Model Autoregressive Moving-Average-Modell
Output-Error Model Ausgangsfehler-Modell
(infinite) impulse response Impulsantwortmodell
compact state-space representation kompakte Zustandsdarstellung 35
Pole (of a transfer function) Pole (von einer Übertragungsfunktion)
Zero (of a transfer function) Nullstelle (von einer Übertragungsfunktion)
Steady-state (system) stationäres System 36
Transient
Settling time Einschwingzeit
Gain Verstärkung
Time constant Zeitkonstante 37
Stability Stabilität
(asymptotically) stable (asymptotisch) stabil
marginally (Lyapunov) stable marginal (Ljapunoff) stabil
Unstable unstabil
Alphabet (in context of automata) Eingabealphabet (in Kontext von Automaten)
Word (in context of automata) Wort (in Kontext von Automaten)
Transition function Übergangsfunktion
Accepting (marked) state Endzustand 38
Rejecting state
35
Unsure of the translation
36
Not happy with the translation
37
Confusingly, in the older German literature, the term Totzeit is also used. It should be avoided in order to make it
clear what is being discussed.
38
Unclear if this is the correct translation
298
English Word German Translation
Language recognised (marked) by the 39
automaton
Language generated by the automaton See 34
Self-Loop Selbstschleife
Deadlock Verklemmung, Deadlock
Livelock Livelock
Blocking Blockierung
Nondeterministic nicht deterministisch
Deterministic deterministisch
Periodic states periodische Zustände
Ergodic states ergodische Zustände
Transient states
Product composition
Parallel composition
Clock Uhr
Invariant Invariant
Urgent dringend
Nonurgent nicht dringend
Conjunction Konjunktion
Disjunction Disjunktion
Negation Negation
Implication Implikation
Equivalency Äquivalenz
Unary unär
Binary binär
Truth table Wahrheitstabelle
39
See collected material and determine how best to translate it. I have seen Sprache des Automaten and von Automaten
akzeptierte Sprache. This would then give von Automaten generierte Sprache for the language generated by the
automaton, but this concept seems to be very rarely considered or even used in German.
299
English Word German Translation
Sum-of-Products Form (SOP) Disjunktive Normalform (DNF)
Product-of-Sums Form (POS) Konjunktive Normalform (KNF)
Minterm Minterm
Maxterm Maxterm
Duality Dualität
Karnaugh map (K-map) Karnaugh-Vetch-Diagramm (KVD)
Implicant Term (Kapitel 5)
Prime implicant Primterm
Essential prime implicant Kernprimterm
Programme organisation unit (POU) Programmorganisationseinheit (POE)
Function (FUN) Funktion (FUN)
Function Block (FB) Funktionsbaustein (FB)
Programme (PROG) Programm (PROG)
Resource Ressource
Scheduling Aufgabenplanung
Cyclically (in terms of PLCs) Periodisch
On demand (in terms of PLCs) Nicht periodisch
Configuration Konfiguration
Variable (VAR) Variable (VAR)
Input variable (VAR_INPUT) Eingangsvariable (VAR_INPUT)
Output variable (VAR_OUTPUT) Ausgangsvariable (VAR_OUTPUT)
Input-and-Output Variable (VAR_IN_OUT) Ein- und Ausgangsvariable (VAR_IN_OUT)
Pointer Zeiger
External variable (VAR_EXTERNAL) Externe Variable (VAR_EXTERNAL)
Global variable (VAR_GLOBAL) Globale Variable (VAR_GLOBAL)
Access variable (VAR_ACCESS) Zugriffvariable (VAR_ACCESS)
Delimiter Begrenzungszeichen
Keyword Schlüsselwort
Literal Literal
300
English Word German Translation
Identifier Bezeichner
Space Leerzeichen
End-of-Line Zeilenende
Plus (+) Plus
Minus (-) Minus
Octothorpe (#) (also pound sign) Nummernkreuz
Period (.) Punkt
Quotation mark (') Anführungszeichen
Dollar sign ($) Dollar-Zeichen
Colon (:) Doppelpunkt
Assignment (Walrus) Operator (:=) Zuweisung
(round) Brackets () Runde Klammern
Square brackets [] Eckige Klammern
Comma (,) Komma
Semicolon (;) Semikolon
Percent (%) Prozent
Assignment Operator (=>) Zuweisung
Exponent Exponent
Multiplication Multiplikation
Division Division
Ampersand (&) Kaufmanns-UND
String Zeichenfolge
Bit Sequence Bitfolge
Integer Ganzzahl
Floating-Point number Gleitpunkt
Signed integer Ganzzahl mit Vorzeichen
Unsigned integer Ganzzahl ohne Vorzeichen
Array Feld
Data Structures Datenstrukturen
Derived data type Abegeleiteter Datentyp
301
English Word German Translation
Derivation (in terms of data types), Type
Ableitung, Typdefinition
definition
Ladder logic Kontaktplan
Track Scheine
Open contact Offener Kontakt
Closed contact Geschlossener Kontakt
Positive-transition sensing contact Kontakt mit positiver Flankenerkennung
Negative-transition sensing contact Kontakt mit negativer Flankenerkennung
Coil Spule
Negated coil Negierte Spule
Set coil Set-Spule
Reset coil Reset-Spule
Positive-transition sensing coil Spule mit positiver Flankenerkennung
Negative-transition sensing coil Spule mit negativer Flankenerkennung
Set-Reset block Set-Reset-Block
Return Rücksprung
Conditional return Bedingter Rücksprung
Jump Sprung
Conditional jump Bedingter Sprung
Label Etikette
Instruction list Anweisungsliste (AL)
Universal accumulator Universelle Akkumulator
Current result Aktuelles Ergebnis (AE)
Operator Operator
Operand Operand
Load Laden
Save Speichern
Boolean exclusive OR Boolesche Exklusiv-ODER
Function block language Funktionsbausteinsprache
Negation Negation
302
English Word German Translation
Link Link
Rising edge Steigende Flank
Falling edge Fallende Flank
Feedback variable Rückkopplungsvariable
Structured Text Strukturierte Texte
Wiederholungsanweisung {FOR, WHILE,
{FOR, WHILE, REPEAT} Loop
REPEAT}
Modulo Modulo
Equality Gleichheit
Inequality Ungleichheit
Command to break a loop Schleifenabbruch
Branching Verzweigung
Sequential Function Chart Language Ablaufsprache
Step Schritt
Transition Transition
Guard Wache (in terms of SFC)
Token (active attribute) Token (Aktiv-Attribut)
Action block Aktionsblock
Qualifier (in terms of SFC) Befehlsart
Action name (in terms of SFC) Befehlsname
Indicator variable (in terms of SFC) Kennzeichnung
Process description (in terms of SFC) Aktionsbeschreibung
Not saved (N) Nicht gespeichert
Saved (S) Gespeichert
(time) Length (L) Zeitbegrenzt
Delay (D) Verzögert
Pulse (P) Puls
Alternative path (in SFC) Alternativer Weg
Parallel path (in SFC) Paralleler Weg
Transition condition Transitionsbedingung
303
English Word German Translation
Sequential Function Chart Ablaufkette
304
Bibliography
Bindel, T., & Hofmann, D. (2016). R&I-Fließschema. Wiesbaden, Germany: Springer Vieweg.
doi:10.1007/978-3-658-15559-9
John, K.-H., & Tiegelkamp, K. (2009). IEC 61131-3: Programming Industrial Automation
Systems: Concepts and Programming Languages, Requirements for Programming Systems,
Decision-Making Aids (2nd ed.). Berlin, Germany: Springer-Verlag.
John, K.-H., & Tiegelkamp, M. (2009). SPC-Programmierung mit IEC 61131-3: Konzepte und
Programmiersprachen, Anforderungeng an Programmiersysteme, Entscheidungshilfen
(2nd ed.). Berlin, Germany: Springer.
Seborg, D. E., Edgar, T. F., & Mellichamp, D. A. (2004). Process Dynamics and Control (2nd
ed.). Hoboken, New Jersey, United States of America: John Wiley & Sons, Inc.
Seborg, D. E., Edgar, T. F., Mellichamp, D. A., & Doyle, F. J. (2011). Process Dyanamics and
Control (3rd ed.). Hoboken, New Jersey, United States of America: John Wiley & Sons,
Inc.
Seborg, D. E., Edgar, T. F., Mellichamp, D. A., & Doyle, F. J. (2011). Process Dyanamics and
Control (3rd ed.). Hoboken, New Jersey, United States of America: John Wiley & Sons,
Inc.
Shardt, Y. A. (2012). Data Quality Assessment for Closed-Loop System Identification and
Forecasting with Application to Soft Sensors. Edmonton, Alberta, Canada: University of
Alberta. doi:http://hdl.handle.net/10402/era.29018
Shoukat Choudhury, M. A., Thornhill, N. F., & Shah, S. L. (2005). Modelling valve stiction.
Control Engineering Practice, 641-658.
Ulrich, G. D., & Vasudevan, P. T. (2004). Chemical Engineering" Process Design and Economics:
A Practical Guide. (Second, Ed.) Durham, New Hampshire, USA: Process Publishing.
305
Appendix I: Partial Fractioning
When solving equations in the frequency domain and it is desired to convert them back
into the time domain, it may be necessary to perform partial fractioning to obtain a solution.
Although there exist many different approaches, the following is one simple method that will allow
the final result to be obtained easily. Consider a rational function of the form:
N (s) N (s)
= (243)
D (s) nl nq
∏ ( α s + β ) ∏ (α s + β js + γ j )
ni 2 nj
i i j
=i 1 =j 1
where nl represents the number of distinct linear terms, nq the number of distinct irreducible
quadratics (those that have imaginary roots as their solution), and α, β, and γ are known constants.
Let n be the overall order of the system. In order to perform partial fractioning, write the following
fraction depending on the form of the root:
n
Bk
1) For each linear term (αs + β)n, put the term, ∑ .
(α s + β )
k
k =1
m
Ak + Bk s
2
2) For each irreducible quadratic term, (αs + βs + γ) , put the term, m
∑ .
(α s + βs +γ )
2 k
k =1
Once the form of the partial fractioning solution has been obtained, it is necessary to solve for the
unknown parameters. First, cross-multiply, so that the denominators are the same. Then, it is
necessary to solve for the unknown parameters by equating the unknown side with the known,
N(s). The easiest way to solve this is using the following approach:
1) For each linear term, set s = −β / α to obtain Bn of the linear terms. This will reduce the
nl nq
∏ (α s + β js + γ j ) =
nj
equation to the form Bn ∏ (α i s + βi ) N ( s ) evaluated at the
ni 2
j
=i 1 =j 1
i≠n
given root.
2) For each quadratic term, set s equal to the imaginary roots. This will also reduce the
equation to a simpler form and allow for An and Bn to be solved.
For the remaining terms, create a system of equations by selecting different values of s and
evaluating the known values, so that the remaining unknowns can be solved. You will need n –
nl – 2nq equations in order to find the remaining n – nl – 2nq terms.
306