M. Gopal - Digital Control and State Variable Methods - Conventional and Intelligent Control Systems-Tata-McGraw Hill (2009)
M. Gopal - Digital Control and State Variable Methods - Conventional and Intelligent Control Systems-Tata-McGraw Hill (2009)
M GOPAL
Professor
Department of Electrical Engineering
Indian Institute of Technology
Delhi
ISBN-13: 978-0-07-0668805
ISBN-10: 0-07-0668809
Information contained in this work has been obtained by Tata McGraw-Hill, from sources believed to be reliable.
However, neither Tata McGraw-Hill nor its authors guarantee the accuracy or completeness of any information
published herein, and neither Tata McGraw-Hill nor its authors shall be responsible for any errors, omissions, or
damages arising out of use of this information. This work is published with the understanding that Tata McGraw-Hill
and its authors are supplying information but are not attempting to render professional services. If such services are
required, the assistance of an appropriate professional should be sought.
Typeset at Script Makers, 18, DDA Market, A-1B Block, Paschim Vihar,
New Delhi 110063 and printed at Unique Color Carton, 15/72, Punjabi Bagh, New Delhi-110 026.
RAXYYRYFDZZDZ
Dedicated
with all my love to my
son Ashwani
and
daughter Anshu
Contents
Preface XI
Part I Digital Control: Principles and Design in Transform-Domain 1
1. Introduction 3
1.1 Control System Terminology 3
1.2 Computer-Based Control: History and Trends 9
1.3 Control Theory: History and Trends 12
1.4 An Overview of the Classical Approach to Analog Controller Design 14
1.5 Scope and Organization of the Book 19
2. Signal Processing in Digital Control 21
2.1 Why Use Digital Control 21
2.2 Configuration of the Basic Digital Control Scheme 23
2.3 Principles of Signal Conversion 24
2.4 Basic Discrete-Time Signals 30
2.5 Time-Domain Models for Discrete-Time Systems 32
2.6 The z-Transform 41
2.7 Transfer Function Models 52
2.8 Frequency Response 58
2.9 Stability on the z-Plane and the Jury Stability Criterion 61
2.10 Sample-and-Hold Systems 69
2.11 Sampled Spectra and Aliasing 72
2.12 Reconstruction of Analog Signals 77
2.13 Practical Aspects of the Choice of Sampling Rate 80
2.14 Principles of Discretization 82
Review Examples 100
Problems 107
3. Models of Digital Control Devices and Systems 113
3.1 Introduction 113
3.2 z-Domain Description of Sampled Continuous-Time Plants 115
3.3 z-Domain Description of Systems with Dead-Time 122
3.4 Implementation of Digital Controllers 126
3.5 Tunable PID Controllers 133
3.6 Digital Temperature Control System 146
3.7 Digital Position Control System 151
3.8 Stepping Motors and their Control 157
3.9 Programmable Logic Controllers 163
Review Examples 180
Problems 183
viii Contents
4. Design of Digital Control Algorithms 193
4.1 Introduction 193
4.2 z-Plane Specifications of Control System Design 196
4.3 Digital Compensator Design using Frequency Response Plots 212
4.4 Digital Compensator Design using Root Locus Plots 224
4.5 z-Plane Synthesis 237
Review Examples 242
Problems 246
Index 775
Preface
The dramatic development of computer technology has radically changed the boundaries of practical control
system design options. It is now possible to employ very complicated, high-order digital controllers, and to
carry out the extensive calculations required for their design. These advances in implementation and design
capability can be achieved at low cost due to the widespread availability of inexpensive, powerful digital
computers and related devices. There is every indication that a high rate of growth in the capability and
application of digital computers will continue far into the future.
Fortunately, control theory has also developed substantially over the past 45 years. The classical design
methods have been greatly enhanced by the availability of low-cost computers for system analysis and
simulation. The graphical tools of classical design like root locus plots, Nyquist plots, Bode plots, and
Nichols chart can now be more easily used with computer graphics. Coupled with hardware developments
such as microprocessors and electro-optic measurement schemes, the classical control theory today provides
useful design tools to practising control engineers.
The modern control theory (which can’t be termed modern any longer) refers to the state-space based
methods. Modern control methods initially enjoyed a great deal of success in academic circles, but did not
perform very well in many areas of application. Modern control provided a lot of insight into system struc-
ture and properties; nevertheless, it masked other important feedback properties that could be studied, and
manipulated, using classical control. During the past three decades, a series of methods, which are a combi-
nation of modern state-space methods and classical frequency-domain methods, have emerged. These tech-
niques are commonly known as robust control.
The rapid development in digital computers and microelectronics has brought about drastic changes in
the approach to analysis, design, and implementation of control systems. The flourishing of digital control
has just begun for most industries and there is much to be gained by exploiting the full potential of new
technology.
Implementation of nonlinear robust control schemes—model reference adaptive control, self-tuning con-
trol, variable structure sliding mode control—has now become a relatively simple task. In the process of
understanding and emulating salient features of biological control functions, a new field called ‘intelligent
control’, has emerged.
Fuzzy logic, artificial neural networks, and genetic algorithms have grown into three distinct disciplines
with the aim of designing “intelligent” systems for scientific and engineering applications. The theory of
fuzzy logic provides a mathematical morphology to emulate certain perceptual and linguistic attributes,
associated with human cognition. It aims at modelling the inexact modes of reasoning and thought processes,
that play an essential role in the remarkable human ability to make rational decisions in an environment of
uncertainty and imprecision. Artificial neural networks attempt to emulate the architecture and information
representation schemes of the human brain. Genetic algorithms provide an adaptive, robust, parallel and
randomized searching technique where a population of solutions evolves over a sequence of generations, to
a globally optimal solution.
While the development of individual tools—fuzzy logic, artificial neural networks, genetic algorithms—
was in progress, a group of researchers felt the need of integrating them in order to enjoy the merits of
xii Preface
different biologically inspired techniques into one system. The result is the development of several hybrid
paradigms, like neuro-fuzzy, neuro-genetic, fuzzy-genetic, and neuro-fuzzy-genetic. These hybrid paradigms
are suitable for solving complex real-world problems for which only one tool may not be adequate.
We are passing through a phase of rosy outlook for control technology: there has been a tendency to
portray neural network and/or a fuzzy-logic based controller as magical; a sort of black box that does
amazing things. Enthusiastic researchers have dreamed big dreams and made sweeping predictions on the
potential of intelligent control systems with neural processor/fuzzy logic chips in the control loop. The
growth of the new field during the past few years has been so explosive that the traditional model-based
control theory and the traditional op amp/computer-based implementations of controllers are under threat.
New design methods are required to prove themselves in actual practice, before they can displace well-
accepted techniques. Intelligent control technology is slowly gaining wider acceptance among academics
and industry. Even if there has been some over-enthusiastic description of the field, the scientific commu-
nity, and industry, are converging to the fact that there is something fundamentally significant about this
technology. Also, preparations are underway, to accord a warm welcome to integrated control technology–
integration of intelligent control theory with the traditional model-based theory, and integration of the VLSI
microprocessors with neuro-fuzzy processors to implement the controller.
This book includes a tutorial introduction to the knowledge-based tools for control system design. Rigor-
ous characterization of theoretical properties of intelligent control methodology will not be our aim in our
tutorial presentation; rather we focus on the development of systematic engineering procedures, which will
guide the design of the controller for a specific problem.
The arrangement of topics in the text, is a little different from the conventional one. Typically, a book on
digital control systems starts with transform-domain design and then carries over to state space. These books
give a detailed account of state variable methods for discrete-time systems. Since the state variable methods
for discrete-time systems run quite parallel to those for continuous-time systems, full-blown repetition is not
appreciated by the readers conversant with state variable methods for continuous-time systems. And for
readers with no background of this type, a natural way of introducing state variable methods, is to give the
treatment for continuous-time systems, followed by a brief parallel presentation for discrete-time systems.
To meet this objective, we have divided the treatment of transform-domain design and state-space design
in two parts of the book. Part I deals with digital control principles and design in transform domain, assum-
ing that the reader has had an introductory course in control engineering concentrating on the basic princi-
ples of feedback control and covering various classical analog methods of control system design. The mate-
rial presented in this part of the book is closely related to the material already familiar, but towards the end
a direction to wider horizons is indicated. Part II of the book deals with state variable methods in automatic
control. State variable analysis and design methods are usually not covered in an introductory course. It is
assumed that the reader is not exposed to the so-called modern control theory. Our approach is to first
discuss state variable methods for continuous-time systems, and then give a compact presentation of the
methods for discrete-time systems using the analogy with the continuous-time systems.
For the purpose of organizing different courses for students with different backgrounds, the sequencing
of chapters, and dependence of each chapter on previous chapters, has been properly designed in the text.
The typical engineering curriculum at the second-degree level includes core courses on ‘digital control
systems’, and ‘linear system theory’. Parts I and II of the book have been designed to fully meet the require-
ments of the two courses. In Part III of the book, a reasonable detailed account of nonlinear control schemes,
both the conventional and the intelligent, is given. The requirements of elective courses on ‘nonlinear
Preface xiii
control systems’, and ‘intelligent control’, will be partially or fully (depending on the depth of coverage of
the courses) served by Part III of the book.
The typical engineering curriculum at the first-degree level includes a core course on feedback control
systems, with one or two elective courses on the subject. The book meets the requirements of elective courses
at the first-degree level.
WEBSITE URL
The Online Learning Center for the book:
http://www.mhhe.com/gopal/dc3e
· provides the students with the source codes of the MATLAB problems given in Appendix A and
Appendix B of the book; and
· provides the faculty with the Solution Manual for the exercise problems given at the end of all chapters
in the book. This part of the site is password protected, and will be made available by the Publisher to
the faculty on request.
M Gopal
[email protected]
Part I
DIGITAL CONTROL: PRINCIPLES AND DESIGN IN
TRANSFORM-DOMAIN
Automatic control systems play a vital role in the (technological) progress of human civilization. These
control systems range from the very simple to the fairly complex in nature. Automatic washing machines,
refrigerators, and ovens are examples of some of the simpler systems used in the home. Aircraft auto-
matic pilots, robots used in manufacturing, and electric power generation and distribution systems repre-
sent complex control systems. Even such problems as inventory control, and socio-economic systems
control, may be approached from the theory of feedback control.
Our world is one of continuous-time variables type. Quantities like flow, temperature, voltage,
position, and velocity are not discrete-time variables but continuous-time ones. If we look back at the
development of automatic control, we find that mass-produced analog (electronic) controllers have been
available since about the 1940s. A first-level introduction to control engineering, provided in the
companion book ‘Control Systems: Principles and Design’, deals with basics of control, and covers
sufficient material to enable us to design analog (op amp based) controllers for many simple control loops
found in industry.
From the 1980s onward, we find microprocessor digital technology beginning to take over. Today,
most complex industrial processes are under computer control. A microprocessor determines the input to
manipulate the physical system, or plant; and this requires facilities to apply this input to the physical
world. In addition, the control strategy typically relies on measured values of the plant behaviour; and this
requires a mechanism to make these measured values available to the computing resources. The plant can
be viewed as changing continuously with time. The controller, however, has a discrete clock that governs
its behaviour and so its values change only at discrete points in time. To obtain deterministic behaviour
and ensure data integrity, the sensor must include a mechanism to sample continuous data at discrete
points in time, while the actuators need to produce a continuous value between the time points with
discrete-time data.
Computer interfacing for data acquisition, consists of analog-to-digital (A/D) conversion of the input
(to controller) analog signals. Prior to the conversion, the analog signal has to be conditioned to meet the
input requirements of the A/D converter. Signal conditioning consists of amplification (for sensors
generating very low power signals), filtering (to limit the amount of noise on the signal), and isolation
(to protect the sensors from interacting with one another and/or to protect the signals from possible
damaging inputs). Conversion of a digital signal to an analog signal (D/A) at the output (of controller), is
to be carried out to send this signal to an actuator which requires an analog signal. The signal has to be
amplified by a transistor or solid state relay or power amplifier. Most manufacturers of electronic instru-
mentation devices are producing signal conditioners as modules.
The immersion of the computing power into the physical world has changed the scene of control
system design. A comprehensive theory of digital “sampled” control has been developed. This theory
requires a sophisticated use of new concepts such as z-transform. It is, however, quite straightforward to
translate analog design concepts into digital equivalents. After taking a guided tour through the analog
design concepts and op amp technology, the reader will find in Part I of this book sufficient material to
enable him/her to design digital controllers for many simple control loops, and interfacing the controllers
to other sub-systems in the loop; thereby building complete feedback control systems.
The broad space of digital control applications can be roughly divided into two categories: industrial
control and embedded control. Industrial control applications are those in which control is used as part of
the process of creating or producing an end product. The control system is not a part of the actual end
product itself. Examples include the manufacture of pharmaceuticals and the refining of oil. In the case of
industrial control, the control system must be robust and reliable, since the processes typically run
continuously for days, weeks or years.
Embedded control applications are those in which the control system is a component of the end prod-
uct itself. For example, Electronic Control Units (ECUs) are found in a wide variety of products including
automobiles, airplanes, and home applications. Most of these ECUs implement different feedback con-
trol tasks. For instance, engine control, traction control, anti-lock braking, active stability control, cruise
control, and climate control. While embedded control systems must also be reliable, cost is a more sig-
nificant factor, since the components of the control system contribute to the overall cost of manufacture
of the product. In this case, much more time and effort is usually spent in the design phase of the control
system to ensure reliable performance without requiring any unnecessary excess of processing power,
memory, sensors, actuators etc., in the digital control system. Our focus in this book will be on industrial
control applications.
Perhaps more than any other factor, the development of microprocessors has been responsible for the
explosive growth of the computer industry. While early micoprocessors required many additional
components in order to perform any useful task, the increasing use of large-scale integration (LSI) or
very large-scale integration (VLSI) semiconductor fabrication techniques has led to the production of
microcomputers, where all of the required circuitry is embedded on one or a small number of integrated
circuits. A further extension of the integration is the single chip microcontroller, which adds analog and
binary I/O, timers, and counters so as to be able to carry out real-time control functions with almost no
additional hardware. Examples of such microcontrollers are Intel 8051, 8096 and Motorola MCH
68HC11. These chips were developed largely, in response to the automotive industries’ desire for
computer-controlled ignition, emission control and anti-skid systems. They are now widely used in proc-
ess industries. This digital control practice, along with the theory of sampled-data systems will be dealt
with in Chapters 2–4 of the book.
Introduction
1
1.1 CONTROL SYSTEM TERMINOLOGY
A Control System is an interconnection of components to provide a desired function. The portion of the
system to be controlled is given various names: process, plant, and controlled system being perhaps the most
common. The portion of the system that does the controlling is the controller. Often, a control system
designer has little or no design freedom with the plant; it is usually fixed. The designer’s task is, therefore, to
develop a controller that will control the given plant acceptably. When measurements of the plant response
are available to the controller (which in turn generates signals affecting the plant), the configuration is a
feedback control system.
A digital control system uses digital hardware, usually in the form of a programmed digital computer, as
the heart of the controller. In contrast, the controller in an analog control system is composed of analog
hardware; an electronic controller made of resistors, capacitors, and operational amplifiers is a typical
example. Digital controllers normally have analog devices at their periphery to interface with the plant; it is
the internal working of the controller that distinguishes digital from analog control.
The signals used in the description of control systems are classified as continuous-time and discrete-time.
Continuous-time signals are defined for all time, whereas discrete-time signals are defined only at discrete
instants of time, usually evenly spaced steps. The signals for which both time and amplitude are discrete, are
called digital signals. Because of the complexity of dealing with quantized (discrete-amplitude) signals,
digital control system design proceeds as if computer-generated signals were not of discrete amplitude. If
necessary, further analysis is then done, to determine if a proposed level of quantization is acceptable.
Systems and system components are termed continuous-time or discrete-time according to the type of
signals they involve. They are classified as being linear if signal components in them can be superim-
posed—any linear combination of signal components, applied to a system, produces the same linear combi-
nation of corresponding output components; otherwise a system is nonlinear. A system or component is
time-invariant if its properties do not change with time—any time shift of the inputs produces an equal time
shift of every corresponding signal. If a system is not time-invariant, then it is time-varying.
A typical topology of a computer-controlled system is sketched schematically in Fig. 1.1. In most cases,
the measuring transducer (sensor) and the actuator (final control element) are analog devices, requiring,
respectively, analog-to-digital (A/D) and digital-to-analog (D/A) conversion at the computer input and
4 Digital Control and State Variable Methods
output. There are, of course, exceptions; sensors which combine the functions of the transducer and the A/D
converter, and actuators which combine the functions of the D/A converter and the final control element are
available. In most cases, however, our sensors will provide an analog voltage output, and our final control
elements will accept an analog voltage input.
Command input Disturbance Controlled
(Desired plant behaviour) inputs output
Final
A/D Computer D/A control Plant
element
Clock
Sensor
In the control scheme of Fig. 1.1, the A/D converter performs the sampling of the sensor signal (analog
feedback signal ) and produces its binary representation. The digital computer (control algorithm) generates
a digital control signal using the information on desired and actual plant behaviour. The digital control signal
is then converted to analog control signal via the D/A converter. A real-time clock synchronizes the actions
of the A/D and D/A converters, and the shift registers. The analog control signal is applied to the plant
actuator to control the plant’s behaviour.
The overall system in Fig. 1.1 is hybrid in nature; the signals are in the sampled form (discrete-time
signals) in the computer, and in a continuous form in the plant. Such systems have traditionally been called
sampled-data systems; we will use this term as a synonym for computer control systems/digital control
systems.
The word ‘servomechanism’ (or servosystem) is used for a command-following system wherein the con-
trolled output of the system is required to follow a given command. When the desired value of the controlled
outputs is more or less fixed, and the main problem is to reject disturbance effects, the control system is
sometimes called a regulator. The command input for a regulator becomes a constant and is called set-point,
which corresponds to the desired value of the controlled output. The set-point may however be changed in
time, from one constant value to another. In a tracking system, the controlled output is required to follow, or
track, a time-varying command input.
To make these definitions more concrete, let us consider some familiar examples of control systems.
One of the earliest applications of radar tracking was for anti-aircraft fire control, first with guns and later
with missiles. Today, many civilian applications exist as well, such as satellite-tracking radars, navigation-
aiding radars, etc.
The radar scene includes the radar itself, a target, and the transmitted waveform that travels to the target
and back. Information about the target’s spatial position is first obtained by measuring the changes in the
back-scattered waveform relative to the transmitted waveform. The time shift provides information about
the target’s range, the frequency shift provides information about the target’s radial velocity, and the
Introduction 5
received voltage magnitude and phase provide infor-
nna ax
ismation about the target’s angle1[1].
Ante In a typical radar application, it is necessary to
point the radar antenna toward the target and follow its
movements. The radar sensor detects the error be-
tween the antenna axis and the target, and directs the
antenna to follow the target. The servomechanism for
Elevation Azimuth steering the antenna in response to commands from
a b radar sensor, is considered here. The antenna is
designed for two independent angular motions, one
about the vertical axis in which the azimuth angle is
Fig. 1.2 Antenna configuration varied, and the other about the horizontal axis in
which the elevation angle is varied (Fig. 1.2). The
servomechanism for steering the antenna is described by two controlled variables—azimuth angle b and
elevation angle a. The desired values or commands are the azimuth angle br and the elevation angle ar of the
target. The feedback control problem involves error self-nulling, under conditions of disturbances beyond
our control (such as wind power).
The control system for steering antenna can be treated as two independent systems—the azimuth-angle
servomechanism, and the elevation-angle servomechanism. This is because the interaction effects are
usually small. The operational diagram of the azimuth-angle servomechanism is shown in Fig. 1.3.
The steering command from the radar sensor, which corresponds to target azimuth angle, is compared with
the azimuth angle of the antenna axis. The occurrence of the azimuth-angle error causes an error signal to pass
through the amplifier, which increases the angular velocity of the servomotor in a direction towards an error
reduction. In the scheme of Fig. 1.3, the measurement and processing of signals (calculation of control signal)
is digital in nature. The shaft-angle encoder combines the functions of transducer and A/D converter.
Figure 1.4 gives the functional block diagrams of the control system. A simple model of the load
(antenna) on the motor is shown in Fig. 1.4b. The moment of inertia J and the viscous friction coefficient B
are the parameters of the assumed model. Nominal load is included in the plant model for the control design.
1
The bracketed numbers coincide with the list of references given at the end of the book.
6 Digital Control and State Variable Methods
The main disturbance inputs are the deviation of the load from the nominal estimated value as a result of
uncertainties in our estimate, effect of wind power, etc.
Load
disturbance
r Motor B
+ e Power
+ J
amplifier
– Load
(a) (b)
Load
disturbance
r + Motor
e + Power
amplifier +
Load
– –
Tachogenerator
Rate
signal
(c)
Fig. 1.4 Functional block diagrams of azimuthal servomechanism
In the tracking system of Fig. 1.4a, the occurrence of error causes the motor to rotate in a direction
favouring the dissolution of error. The processing of the error signal (calculation of the control signal) is based
on the proportional control logic. Note that the components of our system cannot respond instantaneously,
since any real-world system cannot go from one energy level to another in zero time. Thus, in any real-world
system, there is some kind of dynamic lagging behaviour between input and output. In the servosystem of
Fig. 1.4a, the control action, on occurrence of the deviation of the controlled output from the desired value
(the occurrence of error), will be delayed by the cumulative dynamic lags of the shaft-angle encoder, digital
computer and digital-to-analog converter, power amplifier, and the servomotor with load. Eventually, how-
ever, the trend of the controlled variable deviation from the desired value, will be reversed by the action of
the amplifier output on the rotation of the motor, returning the controlled variable towards the desired value.
Now, if a strong correction (high amplifier gain) is applied (which is desirable from the point of view of
control system performance, e.g., strong correction improves the speed of response), the controlled variable
overshoots the desired value (the ‘run-out’ of the motor towards an error with the opposite rotation), causing
a reversal in the algebraic sign of the system error. Unfortunately, because of system dynamic lags, a reversal
of correction does not occur immediately, and the amplifier output (acting on ‘old’ information) is now
actually driving the controlled variable in the direction it was already heading, instead of opposing its excur-
sions, thus leading to a larger deviation. Eventually, the reversed error does cause a reversed correction, but
the controlled variable overshoots the desired value in the opposite direction and the correction is again in
the wrong direction. The controlled variable is thus driven, alternatively, in opposite directions before it
settles on to an equilibrium condition. This oscillatory state is unacceptable as the behaviour of antenna-
Introduction 7
steering servomechanism. The considerable amplifier gain, which is necessary if high accuracies are to be
obtained, aggravates the described unfavourable phenomenon.
The occurrence of these oscillatory effects can be controlled by the application of special compensation
feedback. When a signal proportional to motor’s angular velocity (called the rate signal) is subtracted from
the error signal (Fig. 1.4c), the braking process starts sooner before the error reaches a zero value.
The ‘loop within a loop’ (velocity feedback system embedded within a position feedback system)
configuration utilized in this application, is a classical scheme called minor-loop feedback scheme.
Many industrial applications require variable speed drives. For example, variable speed drives are used for
pumping duty to vary the flow rate or the pumping pressure, rolling mills, harbour cranes, rail traction, etc.
[2–4].
The variable speed dc drive is the most versatile drive available. The Silicon Controlled Rectifiers (SCR)
are almost universally used to control the speed of dc motors, because of considerable benefits that accrue
from the compact static controllers supplied directly from the ac mains.
Basically, all the dc systems involving the SCR controllers are similar but, with different configurations
of the devices, different characteristics may be obtained from the controller. Figure 1.5 shows a dc motor
driven by a full-wave rectified supply. Armature current of the dc motor is controlled by an SCR which is, in
turn, controlled by the pulses applied by the SCR trigger control circuit. The SCR controller thus combines
the functions of a D/A converter and a final control element.
Load
Speed Actual
reference + – speed
Tachogenerator
A /D Motor
Full Over-current
bridge protection
ac Digital
rectifier
computer
circuit
SCR SCR
trigger control
circuit
Firing angle of the SCR controls the average armature current which, in turn, controls the speed of the dc
motor. The average armature current (speed) increases as the trigger circuit reduces the delay angle of firing of
the SCR, and the average armature current (speed) reduces as the delay angle of firing of the SCR is increased.
In the regulator system of Fig. 1.5, the reference voltage which corresponds to the desired speed of the dc
motor, is compared with the output voltage of tachogenerator, corresponding to the actual speed of the
motor. The occurrence of the error in speed, causes an error signal to pass through the trigger circuit, which
8 Digital Control and State Variable Methods
controls the firing angle of the SCR in a direction towards an error reduction. When the processing of the
error signal (calculation of the control signal) is based on the proportional control logic, a steady-state error
between the actual speed and the desired speed exists. The occurrence of steady-state error can be elimi-
nated by generating the control signal with two components: one component proportional to the error signal,
and the other proportional to the integral of the error signal.
This example describes the hardware features of the design of a PC-based liquid-level control system. The
plant of our control system is a cylindrical tank. Liquid is pumped into the tank from the sump (Fig. 1.6). The
inflow to the tank can be controlled by adjusting valve V1. The outflow from the tank goes back into the sump.
Valve V1 of our plant is a rotary valve; a stepping motor has been used to control the valve. The stepping
motor controller card, interfaced to the PC, converts the digital control signals into a series of pulses which
are fed to the stepping motor using a driver circuit. Three signals are generated from the digital control
signal at each sampling instant, namely, number of steps, speed of rotation, and direction of rotation. The
stepping-motor driver circuit converts this information into a single pulse train, which is fed to the stepping
motor. The valve characteristics between the number of steps of the stepping motor and the outflow from the
valve, are nonlinear.
The probe used for measurement of liquid level, consists of two concentric cylinders connected to a
bridge circuit, to provide an analog voltage. The liquid partially occupies the space between the cylinders,
with air in the remaining part. This device acts like two capacitors in parallel, one with dielectric constant of
air ( ~- 1) and the other with that of the liquid. Thus, the variation of the liquid level causes variation of the
electrical capacity, measured between the cylinders. The change in the capacitance causes a change in the
bridge output voltage which is fed to the PC through an amplifier circuit. The characteristics of the sensor
between the level and the voltage are approximately linear.
Step motor
controller card
Expansion
slots of PC
Driver Step
circuit motor
V1 V2
Pump Sump
A /D
conversion card Bridge and
amplifier circuit
Digital computers were first applied to the industrial process control in the late 1950s. The machines were
generally large-scale ‘main frames’ and were used in a so-called supervisory control mode; the individual
temperature, pressure, flow and the like, feedback loops were locally controlled by electronic or pneumatic
analog controllers. The main function of the computer was to gather information on how the overall process
was operating, feed this into a technical-economic model of the process (programmed into computer
memory), and then, periodically, send signals to the set-points of all the analog controllers, so that each
individual loop operated in such a way as to optimize the overall operation.
In 1962, a drastic departure from this approach was made by Imperial Chemical Industries in England—
a digital computer was installed, which measured 224 variables and manipulated 129 valves directly. The
name Direct Digital Control (DDC) was coined to emphasize that the computer controlled the process
directly. In DDC systems, analog controllers were no longer used. The central computer served as a single,
time-shared controller for all the individual feedback loops. Conventional control laws were still used for
each loop, but the digital versions of control laws for each loop resided in the software in the central compu-
ter. Though digital computers were very expensive, one expected DDC systems to have economic advantage
for processes with many (50 or more) loops. Unfortunately, this did not often materialize. As failures in the
central computer of a DDC system shut down the entire system, it was necessary to provide a ‘fail-safe’
back-up system, which usually turned out to be a complete system of individual loop analog controllers, thus
negating the expected hardware savings.
There was a substantial development of digital computer technology in the 1960s. By the early 1970s,
smaller, faster, more reliable, and cheaper computers became available. The term minicomputers was coined
for the new computers that emerged. DEC PDP11 is by far, the best-known example. There were, however,
many related machines from other vendors.
The minicomputer was still a fairly large system. Even as performance continued to increase and prices to
decrease, the price of a minicomputer main frame in 1975, was still about $10,000. Computer control was still
out of reach for a large number of control problems. However, with the development of microcomputer, the
price of a card computer, with the performance of a 1975 minicomputer, dropped to $500 in 1980. Another
consequence was that digital computing power in 1980 came in quanta as small as $50. This meant that
computer control could now be considered as an alternative, no matter how small the application [54-57].
Microcomputers have already made a great impact on the process control field. They are replacing analog
hardware even as single-loop controllers. Small DDC systems have been made using microcomputers.
Operator communication has vastly improved with the introduction of colour video-graphics displays.
The variety of commercially available industrial controllers ranges from single-loop controllers through
multiloop single computer systems to multiloop distributed computers. Although the range of equipment
available is large, there are a number of identifiable trends which are apparent.
Single-loop microprocessor-based controllers, though descendants of single-loop analog controllers, have
greater degree of flexibility. Control actions which are permitted, include on/off control, proportional action,
integral action, derivative action and the lag effect. Many controllers have self-tuning option. During the self-
tune sequence, the controller introduces a number of step commands, within the tolerances allowed by the
operator, in order to characterize the system response. From this response, values for proportional gain, reset
time, and rate time are developed. This feature of online tuning in industrial controllers is interesting, and
permits the concept of the computer automatically adjusting to changing process conditions [11-12].
10 Digital Control and State Variable Methods
Multiloop single computer systems have variability in available interface and software design. Both the
single-loop and multiloop controllers may be used in stand-alone mode, or may be interfaced to a host
computer for distributed operation. The reducing costs and increasing power of computing systems, has
tended to make distributed computing systems for larger installations, far more cost effective than those built
around one large computer. However, the smaller installation may be best catered for by a single multiloop
controller, or even a few single-loop devices.
Control of large and complex processes using distributed computer control systems (DCCS), is facili-
tated by adopting a multilevel or hierarchical view point of control strategy. The multilevel approach sub-
divides the system into a hierarchy of simpler control design problems. On the lowest level of control (direct
process control level), the following tasks are handled: acquisition of process data, i.e., collection of instan-
taneous values of individual process variables, and status messages of plant control facilities (valves, pumps,
motors, etc.) needed for efficient direct digital control; processing of collected data; plant hardware moni-
toring, system check and diagnosis; closed-loop control and logic control functions, based on directives
from the next ‘higher’ level.
Supervisory level copes with the problems of determination of optimal plant work conditions, and genera-
tion of relevant instructions to be transferred to the next ‘lower’ level. Adaptive control, optimal control, plant
performance monitoring, plant coordination and failure detections are the functions performed at this level.
Production scheduling and control level is responsible for production dispatching, inventory control,
production supervision, production re-scheduling, production reporting, etc.
Plant(s) management level, the ‘highest’ hierarchical level of the plant automation system, is in charge of
the wide spectrum of engineering, economic, commercial, personnel, and other functions.
It is, of course, not to be expected that in all available distributed computer control systems, all four
hierarchical levels are already implemented. For automation of small-scale plants, any DCCS having at least
two hierarchical levels, can be used. One system level can be used as a direct process control level, and the
second one as a combined plant supervisory, and production scheduling and control level. Production
planning and other enterprise-level activities, can be managed by the separate mainframe computer or the
computer centre. For instance, in a LAN (Local Area Network)-based system structure, shown in Fig. 1.7a,
the ‘higher’ automation levels are implemented by simply attaching the additional ‘higher’ level computers
to the LAN of the system [89].
LAN
PLANT
Supervisory computer
Transfer Automatic
CAD/CAM FMS system inspection
Raw Material
Products
DNC Manufacturing Assembly
system cell station
The development of control system analysis and design can be divided into three eras. In the first era,
we have the classical control theory, which deals with techniques developed during the 1940s and 1950s.
Classical control methods—Routh-Hurwitz, Root Locus, Nyquist, Bode, Nichols—have in common the use
of transfer functions in the complex frequency (Laplace variable s) domain, and the emphasis on the graphi-
cal techniques. Since computers were not available at that time, a great deal of emphasis was placed on
developing methods that were amenable to manual computation and graphics. A major limitation of the
classical control methods was the use of single-input, single-output (SISO) control configurations. Also, the
use of the transfer function and frequency domain limited one to linear time-invariant systems. Important
results of this era will be discussed in Part I of this book.
In the second era, we have modern control (which is not so modern any longer), which refers to state-
space based methods developed in the late 1950s and early 1960s. In modern control, system models are
Introduction 13
directly written in the time domain. Analysis and design are also carried out in the time domain. It should be
noted that before Laplace transforms and transfer functions became popular in the 1920s, engineers were
studying systems in the time domain. Therefore, the resurgence of time-domain analysis was not unusual, but
it was triggered by the development of computers and advances in numerical analysis. As computers were
available, it was no longer necessary to develop analysis and design methods that were strictly manual.
Multivariable (multi-input, multi-output (MIMO)) control configurations could be analysed and designed.
An engineer could use computers to numerically solve or simulate large systems that were nonlinear and/or
time-varying. Important results of this era—Lyapunov stability criterion, pole-placement by state feedback,
state observers, optimal control—will be discussed in Part II of this book.
Modern control methods initially enjoyed a great deal of success in academic circles, but they did not
perform very well in many areas of application. Modern control provided a lot of insight into system struc-
ture and properties, but it masked other important feedback properties that could be studied and manipulated
using the classical control theory. A basic requirement in control engineering is to design control systems
that will work properly when the plant model is uncertain. This issue is tackled in the classical control theory
using gain and phase margins. Most modern control design methods, however, inherently require a precise
model of the plant. In the years since these methods were developed, there have been few significant
implementations and most of them have been in a single application area—the aerospace industry. The
classical control theory, on the other hand, is going strong. It provides an efficient framework for the design
of feedback controls in all areas of application. The classical design methods have been greatly enhanced by
the availability of low-cost computers for system analysis and simulation. The graphical tools of classical
design can now be more easily used with computer graphics for SISO as well as MIMO systems.
During the past three decades, the control theory has experienced a rapid expansion, as a result of the
challenges of the stringent requirements posed by modern systems such as: flight vehicles, weapon control
systems, robots, and chemical processes; and the availability of low-cost computing power. A body of
methods emerged during this third era of control-theory development, which tried to provide answers to the
problems of plant uncertainty. These techniques, commonly known as robust control, are a combination of
modern state-space and classical frequency-domain techniques. For a thorough understanding of these new
methods, we need to have adequate knowledge of state-space methods, in addition to the frequency-domain
methods. This has guided the preparation of this text.
Robust control system design has been dominated by linear control techniques, which rely on the key
assumption of availability of uncertainty model. When the required operation range is large, and a reliable
uncertainty model could not be developed, a linear controller is likely to perform very poorly. Nonlinear
controllers, on the other hand, may handle the nonlinearities in large range operation, directly. Also,
nonlinearities can be intentionally introduced into the controller part of a control system, so that the model
uncertainties can be tolerated. Advances in computer technology have made the implementation of nonlinear
control schemes—feedback linearization, variable structure sliding mode control, adaptive control,
gain-scheduling—a relatively simple task.
The third era of control-theory development has also given an alternative to model-based design meth-
ods: the knowledge-based control. In this approach, we look for a control solution that exhibits intelligent
behaviour, rather than using purely mathematical methods to keep the system under control.
Model-based control techniques have many advantages. When the underlying assumptions are satisfied,
many of these methods provide good stability, robustness to model uncertainties and disturbances, and speed of
response. However, there are many practical deficiencies of these ‘crisp’ (‘hard’ or ‘inflexible’) control algo-
rithms. It is generally difficult to accurately represent a complex process by a mathematical model. If the
process model has parameters whose values are partially known, ambiguous, or vague, crisp control algorithms
that are based on such incomplete information, will not usually give satisfactory results. The environment with
14 Digital Control and State Variable Methods
which the process interacts, may not be completely predictable and it is normally not possible for a crisp
algorithm, to accurately respond to a condition that it did not anticipate, and that it could not ‘understand’.
Intelligent control is the name introduced to describe control systems in which control strategies are
based on AI techniques. In this control approach, which is an alternative to model-based control approach,
a behavioural (and not mathematical) description of the process is used, which is based on qualitative
expressions and experience of people working with the process. Actions can be performed either as a result
of evaluating rules (reasoning), or as unconscious actions based on presented process behaviour after a
learning phase. Intelligence comes in as the capability to reason about facts and rules, and to learn about
presented behaviour. It opens up the possibility of applying the experience gathered by operators and
process engineers. Uncertainty about the knowledge can be handled alongwith ignorance about the structure
of the system.
Fuzzy logic, and neural networks are very good methods to model real processes which cannot be described
mathematically. Fuzzy logic deals with linguistic and imprecise rules based on expert’s knowledge. Neural
networks are applied in the case where we do not have any rules but several data.
The main feature of fuzzy logic control is that a control engineering knowledge base (typically in terms of a
set of rules), created using expert’s knowledge of process behaviour, is available within the controller and the
control actions are generated by applying existing process conditions to the knowledge base, making use of an
inference mechanism. The knowledge base and the inference mechanism can handle noncrisp and incomplete
information, and the knowledge itself will improve and evolve through learning and past experience.
In the neural network based control, the goal of artificial neural network is to emulate the mechanism of
human brain function and reasoning, and to achieve the same intelligence level as the human brain in learn-
ing, abstraction, generalization and making decisions under uncertainty.
In the conventional design exercises, the system is modelled analytically by a set of differential equations,
and their solution tells the controller how to adjust the system’s control activities for each type of behaviour
required. In a typical intelligent control scheme, these adjustments are handled by an intelligent controller, a
logical model of thinking processes that a person might go through in the course of manipulating the system.
This shift in focus from the process to the person involved, changes the entire approach to automatic control
problems. It provides a new design paradigm such that a controller can be designed for complex, ill-defined
processes without knowing quantitative input-output relations, which are otherwise required by conven-
tional methods.
The ever-increasing demands of the complex control systems being built today, and planned for the
future, dictate the use of novel and more powerful methods in control. The potential for intelligent control
techniques in solving many of the problems involved is great, and this research area is evolving rapidly. The
emerging viewpoint is that model-based control techniques should be augmented with intelligent control
techniques in order to enhance the performance of the control systems. The developments in intelligent
control methods should be based on firm theoretical foundations (as is the case with model-based control
methods), but this is still at its early stages. Strong theoretical results guaranteeing control system properties
such as stability are still to come, although promising results reporting progress in special cases have been
reported recently. The potential of intelligent control systems clearly needs to be further explored and both
theory and applications need to be further developed. A brief account of nonlinear control schemes both the
conventional and the intelligent, will be given in Part III of this book.
The tools of classical linear control system design are the Laplace transform, stability testing, root locus, and
frequency response. Laplace transformation is used to convert system descriptions in terms of integro-
Introduction 15
differential equations to equivalent algebraic relations involving rational functions. These are conveniently
manipulated in the form of transfer functions with block diagrams and signal flow graphs [155].
The block diagram of Fig. 1.8 represents the basic structure of feedback control systems. Not all systems
can be forced into this format, but it serves as a reference for discussion.
In Fig. 1.8, the variable y(t) is the controlled variable of the system. The desired value of the controlled
variable is yr(t), the command input. yr(t) and y(t) have the same units. The feedback elements with transfer
function H(s) are system components that act on the controlled variable y(t) to produce the feedback signal
b(t). H(s) typical represents the sensor action to convert the controlled variable y(t) to an electrical sensor
output signal b(t).
+ e
w
–
+ y
yr r + e u m+
A (s ) D (s) G A (s ) G P (s )
–
b
H (s )
The reference input elements with transfer function A(s) convert the command signal yr(t) into a form
compatible with the feedback signal b(t). The transformed command signal is the actual physical input to the
system. This actual signal input is defined as the reference input.
The comparison device (error detector) of the system compares the reference input r(t) with the feedback
signal b(t) and generates the actuating error signal e$ (t). The signals r(t), b(t), and e$ (t) have the same units. The
controller with transfer function D(s) acts on the actuating error signal to produce the control signal u(t).
The control signal u(t) has the knowledge about the desired control action. The power level of this signal
is relatively low. The actuator elements with transfer function GA(s), are the system components that act
on the control signal u(t) and develop enough torque, pressure, heat, etc. (manipulated variable m(t)), to
influence the controlled system. GP(s) is the transfer function of the controlled system.
The disturbance w(t) represents the undesired signals that tend to affect the controlled system. The
disturbance may be introduced into the system at more than one location.
The dashed-line portion of Fig. 1.8 shows the system error e(t) = yr – y(t). Note that the actuating error
signal e$ (t) and the system error e(t) are two different variables.
The basic feedback system block diagram of Fig. 1.8 is shown in abridged form in Fig. 1.9. The output
Y(s) is influenced by the control signal U(s) and the disturbance signal W(s) as per the following relation:
Y(s) = GP(s) GA(s) U(s) + GP(s) W(s) (1.1a)
= G(s) U(s) + N(s) W(s) (1.1b)
where G(s) is the transfer function from the control signal U(s) to the output Y(s), and N(s) is the transfer
function from the disturbance input W(s) to the output Y(s). Using Eqns (1.1), we can modify the block
diagram of Fig. 1.9 to the form shown in Fig. 1.10. Note that in the block diagram model of Fig. 1.10, the
plant includes the actuator elements.
16 Digital Control and State Variable Methods
W (s)
W (s) N (s )
= D(s) H(s)
LM A(s ) Y (s)
r Y (s)
OP (1.2b)
N H (s) Q
Using Eqns (1.2a) and (1.2b), we can simplify Fig. 1.10 to obtain the structure shown in Fig. 1.11.
W (s) N (s )
W (s) N (s )
W (s)
E (s ) U (s) + + Y (s)
D (s) G (s) Mw ( s )
–1
R (s ) + + Y (s)
H (s) M (s)
Fig. 1.15 Block diagram without reference input Fig. 1.16 Reduced block diagram model
for system of Fig. 1.13
The transfer functions given by Eqns (1.3) and (1.4) are referred to as closed-loop transfer functions. The
denominator of these transfer functions has the term D(s)G(s)H(s) which is the multiplication of all the
transfer functions in the feedback loop. It may be viewed as the transfer function between the variables R(s)
and B(s) if the loop is broken at the summing point. D(s)G(s)H(s) may therefore be given the name open-
loop transfer function. The roots of denominator polynomial of D(s)G(s)H(s) are the open-loop poles, and
the roots of numerator polynomial of D(s)G(s)H(s) are the open-loop zeros.
The roots of the characteristic equation
1 + D(s)G(s)H(s) = 0 (1.6)
are the closed-loop poles of the system. These poles indicate whether or not the system is bounded-input
bounded-output (BIBO) stable, according to whether or not all the poles are in the left half of the complex
plane. Stability may be tested by the Routh stability criterion.
A root locus plot consists of a pole-zero plot of the open-loop transfer function of a feedback system,
upon which is superimposed the locus of the poles of the closed-loop transfer function as some parameter is
varied. Design of the controller (compensator) D(s) can be carried out using the root locus plot. One begins
with simple compensators, increasing their complexity until the performance requirements can be met. Prin-
cipal measures of transient performance are peak overshoot, settling time, and rise time. The compensator
poles, zeros, and multiplying constant are selected to give feedback system pole locations, that result in
acceptable transient response to step inputs. At the same time, the parameters are constrained so that the
resulting system has acceptable steady-state response to important inputs, such as steps and ramps.
Frequency response characterizations of systems have long been popular because of the ease and practi-
cality of steady-state sinusoidal response measurements. These methods also apply to systems in which
rational transfer function models are not adequate, such as those involving time delays. They do not require
explicit knowledge of system transfer function models; experimentally obtained open-loop sinusoidal
response data can directly be used for stability analysis and compensator design. A stability test, the Nyquist
criterion, is available. Principal measures of transient performance are gain margin, phase margin, and
bandwidth. The design of the compensator is conveniently carried out using the Bode plot and the Nichols
chart. One begins with simple compensators, increasing their complexity until the transient and steady-state
performance requirements are met.
There are two approaches to carrying out the digital controller (compensator) design. The first approach
uses the methods discussed above to design an analog compensator, and then transform it into a digital one.
The second approach, first transforms analog plants into digital plants, and then carries out the design using
digital techniques. The first approach performs discretization after design; the second approach performs
Introduction 19
discretization before design. The classical approach to designing a digital compensator directly using an
equivalent digital plant for a given analog plant, parallels the classical approach to analog compensator
design. The concepts and tools of the classical digital design procedures will be given in Chapters 2–4. This
background will also be useful in understanding and applying the state-variable methods to follow.
This text is concerned with digital control and state variable methods for a special class of control systems,
namely time-invariant, lumped, and deterministic systems. We do not intend to solve all the problems that
can be posed under the defined category. Coverage of digital control theory and practice is modest. Various
concepts from interdisciplinary fields of computer science and computer engineering which relate to digital
control system development—number representation, logical descriptions of algorithmic processes, compu-
ter arithmetic operations, computer system hardware and software—are beyond the scope of this book. In
fact, a course on control engineering need not include these topics because specialized courses on computer-
system architecture are normally offered in undergraduate curricula of all engineering disciplines.
It is assumed that the reader has had an introductory course in control engineering concentrating on
the basic principles of feedback control and covering various classical analog methods of control system
design. The classical digital methods of design are developed in Part I of this book, paralleling and extend-
ing considerably the similar topics in analog control.
State variable analysis and design methods are usually not covered in an introductory course. It is
assumed that the reader is not exposed to the so-called modern control theory. Our approach in Part II of this
book is to first discuss state variable methods for continuous-time systems, and then give a compact presen-
tation of the methods for discrete-time systems, using the analogy with the continuous-time case.
This text also prepares a student for the study of advanced control methods. However, detailed coverage
of these methods is beyond the scope of the book; only a brief account is given in Part III.
There are eleven chapters in the book in addition to this introductory chapter. In each chapter, analysis/
design examples are interspersed to illustrate the concepts involved. At the end of each chapter, there are a
number of review examples that take the reader to a higher level of application; some of these examples also
serve the purpose of extending the text material. The same approach is followed in unsolved problems.
Answers to problems have been given to inspire confidence in the reader.
The examples we have considered in this book are generally low-order systems. Such a selection of
examples helps in conveying the fundamental concepts of feedback control without the distraction of large
amounts of computations, inherent in high-order systems. Many of the real-life design problems are more
complex than the ones discussed in this book. High-order systems are common and, in addition, several
parameters are to be varied during design stage to investigate their effect on the system performance. Com-
puter-Aided-Design (CAD) tools are extremely useful for complex control problems. Several software
packages with computer graphics are available commercially for CAD of control systems [151–154].
Let us now go through the organization of the chapters. Chapters 2–4 deal with digital control theory and
practice. The philosophy of presentation is that the new material should be closely related to material
already familiar, and yet, by the end, a direction to wider horizons should be indicated. The approach leads
us, for example, to relate the z-transform to the Laplace transform and to describe the implications of poles
and zeros in the z-plane to those known meanings attached to poles and zeros in the s-plane. Also, in devel-
oping the design methods we relate the digital control design methods to those of continuous-time systems.
Chapter 2 introduces the sampling theorem and the phenomenon of aliasing. Methods to generate
discrete-time models which approximate continuous-time dynamics, and stability analysis of these models
are also included in this chapter.
20 Digital Control and State Variable Methods
Chapter 3 considers the hardware (analog and digital) of the control loop with emphasis on modelling.
Models of some of the widely used digital control systems are also included.
Chapter 4 establishes a toolkit of design-oriented techniques. It puts forward alternative design methods
based on root-locus and Bode plots. Design of digital controllers using z-plane synthesis is also included in
this chapter. References for the material in Chapters 2–4 are [11–12, 23–25, 30–31, 52, 80–98].
Chapters 5–8 deal with state variable methods in automatic control. Chapter 5 is on state variable analysis.
It exposes the problems of state variable representation, diagonalization, solution, controllability, and
observability. The relationship between the transfer function and state variable models is also given.
Although it is assumed that the reader has the necessary background on vector-matrix analysis, a reasonably
detailed account of vector-matrix analysis is provided in this chapter for convenient reference.
State variable analysis concepts, developed in continuous-time format in Chapter 5, are extended to
digital control systems in Chapter 6.
The techniques of achieving desired system characteristics by pole-placement using complete state
variable feedback are developed in Chapter 7. Also included is the method of using the system output to
form estimates of the states for use in state feedback. Results are given for both continuous-time and
discrete-time systems.
Lyapunov stability analysis is introduced in Chapter 8. In addition to stability analysis, Lyapunov func-
tions are useful in solving some optimization problems. We discuss in this chapter, the solution of linear
quadratic optimal control problem through Lyapunov synthesis. Results are given for both continuous-time
and discrete-time systems. References for the material in Chapters 5–8 are [27–28, 99–119, 122–124].
Describing function and phase-plane methods, which have demonstrated great utility in analysis of
nonlinear systems, have been paid considerable attention in Chapter 9. Also included is stability analysis of
nonlinear systems using Lyapunov functions. References for the material in Chapter 9 are [125-129].
The concepts of feedback linearization, model reference adaptive control, system identification and self-
tuning control, and variable structure control are briefly introduced in Chapter 10. Also included in this
chapter, is an introduction to an emerging nonlinear-control architecture—the reinforcement learning
control. For detailed study, refer [120–121, 125–136, 147–150].
A tutorial introduction to knowledge-based tools (neural networks, support vector machines, fuzzy logic,
genetic algorithms) for control system design is given in Chapters 11 and 12. Rigorous characterization of
theoretical properties of intelligent control methodology is not our aim in our tutorial presentation; rather,
we focus on the development of systematic engineering procedures, which will guide the design of controller
for a specific problem. For detailed study, refer [137–146].
Appendices A and B provide an introduction to the MATLAB environment for computer-aided control
system design.
Signal Processing in Digital
2 Control
Digital control systems offer many advantages over their analog counterparts. Of course, there are possible
problems also. Let us first look at the advantages of digital control over the corresponding analog control
before we talk of the price one has to pay for the digital option.
Figure 2.2 depicts a block diagram of a digital control system showing a configuration of the basic control
scheme. The basic elements of the system are shown by the blocks.
Controlled
Disturbance
output
Digital
set-point
Final
A/D Computer D/A control Plant
element
Clock
Anti-aliasing
S/H Sensor
filter
The analog feedback signal coming from the sensor is usually of low frequency. It may often include high
frequency ‘noise.’ Such noise signals are too fast for control system to correct; low-pass filtering is often
needed to allow good control performance. The anti-aliasing filter shown in Fig. 2.2 serves this purpose. In
digital systems, the phenomenon called aliasing introduces some new aspects to the noise problems. We will
study this phenomenon later in this chapter.
The analog signal, after anti-aliasing processing, is converted into digital form by the A/D conversion
system. The conversion system usually consists of an A/D converter preceded by a sample-and-hold (S/H)
device. The A/D converter converts a voltage (or current) amplitude at its input into a binary code represent-
ing a quantized amplitude value closest to the amplitude of the input. However, the conversion is not
instantaneous. Input signal variation, during the conversion time of the A/D converter, can lead to erroneous
results. For this reason, high performance A/D conversion systems include a S/H device, which keeps the
input to the A/D converter, constant during its conversion time.
24 Digital Control and State Variable Methods
The digital computer processes the sequence of numbers by means of an algorithm and produces a new
sequence of numbers. Since data conversions and computations take time, there will always be a delay when
a control law is implemented using a digital computer. The delay, which is called the computational delay,
degrades the control system performance. It should be minimized by the proper choice of hardware and by
the proper design of software for the control algorithm. Floating-point operations take a considerably longer
time to perform (even when carried out by arithmetic co-processor) than the fixed-point ones. We therefore
try to execute fixed-point operations whenever possible. Alternative realization schemes for a control
algorithm will be given in the next chapter.
The D/A conversion system in Fig. 2.2 converts the sequence of numbers in numerical code into a
piecewise continuous-time signal. The output of the D/A converter is fed to the plant through the actuator
(final control element) to control its dynamics.
The basic control scheme of Fig. 2.2 assumes a uniform sampling operation, i.e., only one sampling rate
exists in the system and the sampling period is constant. The real-time clock in the computer, synchronizes
all the events of A/D conversion–computation–D/A conversion.
The control scheme of Fig. 2.2 shows a single feedback loop. In a control system having multiple loops,
the largest time constant involved in one loop may be quite different from that in other loops. Hence, it may
be advisable to sample slowly in a loop involving a large time constant, while in a loop involving only small
time constants, the sampling rate must be fast. Thus, a digital control system may have different sampling
periods in different feedback paths, i.e., it may have multiple-rate sampling. Although digital control
systems with multi-rate sampling are important in practical situations, we shall concentrate on single-rate
sampling. (The reader interested in multi-rate digital control systems may refer Kuo [87]).
The overall system in Fig. 2.2 is hybrid in nature; the signals are in a sampled form (discrete-time signals/
digital signals) in the computer and in continuous-time form in the plant. Such systems have traditionally
been called sampled-data control systems. We will use this term as a synonym to computer control systems/
digital control systems.
In the present chapter, we focus our attention on digital computer and its analog interfacing. For the time
being, we delink the digital computer from the plant. The link will be re-established in the next chapter.
Figure 2.3a shows an analog signal y(t)—it is defined at the continuum of times, and its amplitudes assume
a continuous range of values. Such a signal cannot be stored in digital computers. The signal, therefore, must
be converted to a form that will be accepted by digital computers. One very common method to do this is
to record sample values of this signal at equally spaced instants. If we sample the signal every 10 msec,
for example, we obtain the discrete-time signal sketched in Fig. 2.3b. The sampling interval of 10 msec
corresponds to a sampling rate of 100 samples/sec. The choice of the sampling rate is an important one,
since it determines how accurately the discrete-time signal, can represent the original signal.
In a practical situation, the sampling rate is determined by the range of frequencies present in the original
signal. Detailed analysis of uniform sampling process, and the related problem of aliasing will appear later
in this chapter.
Notice that the time axis of the discrete-time signal in Fig. 2.3b, is labelled simply ‘sample number’ and
index k has been used to denote this number (k = 0, 1, 2, ...). Corresponding to different values of sample
number k, the discrete-time signal assumes the same continuous range of values assumed by the analog
signal y(t). We can represent the sample values by a sequence of numbers ys (refer Fig. 2.3b):
ys = {1.7, 2.4, 2.8, 1.4, 0.4, ...}
Signal Processing in Digital Control 25
y (t) y ( t)
3 3
2 2
1 1
0 10 20 30 40 0 1 2 3 4
t (msec) Sample number k
y q (k ) (a) (b)
3
k Digital word
0 10
2
1 10
2 11
1
3 01
4 00
k
0 1 2 3 4
(c) (d)
Fig. 2.3 Sampling, quantization and coding of an analog signal
In general,
ys = {y(k)}, 0 ≤ k < ∞
where y(k) denotes the kth number in the sequence.
The sequence defined above is one-sided sequence; ys = 0 for k < 0. In digital control applications, we
normally encounter one-sided sequences.
Although, strictly speaking, y(k) denotes the kth number in the sequence, the notation given above is often
unnecessarily cumbersome, and it is convenient and unambiguous to refer to y(k) itself as a sequence.
Throughout our discussion on digital control, we will assume uniform sampling, i.e., sample values of the
analog signal are extracted at equally spaced sampling instants. If the physical time, corresponding to the
sampling interval is T seconds, then the kth sample y(k), gives the value of the discrete-time signal at t = kT
seconds. We may, therefore, use y(kT) to denote a sequence wherein the independent variable is the physical time.
The signal of Fig. 2.3b is defined at discrete instants of time. The sample values are, however, tied to a
continuous range of numbers. Such a signal, in principle, can be stored in an infinite-bit machine because a
finite-bit machine can store only a finite set of numbers.
A simplified hypothetical 2-bit machine can store four
numbers given alongside:
Binary number Decimal equivalent
The signal of Fig. 2.3b can be stored in such a machine if the
00 0 sample values are quantified to four quantization levels. Figure
01 1 2.3c shows a quantized discrete-time signal for our hypotheti-
10 2 cal machine. We have assumed that any value in the interval
[0.5, 1.5) is rounded to 1, and so forth. The signals for which
11 3
both time and amplitude are discrete, are called digital signals.
26 Digital Control and State Variable Methods
After sampling and quantization, the final step required in converting an analog signal to a form accept-
able to digital computers is coding (or encoding). The encoder maps each quantized sample value into a
digital word. Figure 2.3d gives coded digital signal, corresponding to the analog signal of Fig. 2.3a for our
hypothetical 2-bit machine.
The device that performs the sampling, quantization, and coding is an A/D converter. Figure 2.4 is a
block diagram representation of the operations performed by an A/D converter.
Continuous-time
continuous-amplitude Digital
signal words
Discrete-time Discrete-time
continuous-amplitude discrete-amplitude
signal signal
Fig. 2.4 Operations performed by an A/D converter
It may be noted that the quantized discrete-time signal of Fig. 2.3c and the coded signal of Fig. 2.3d carry
exactly the same information. For the purpose of analytical study of digital systems, we will use the quantized
discrete-time form for digital signals.
The number of binary digits carried by a device is its word length, and this is obviously an important
characteristic related to the resolution of the device—the smallest change in the input signal that will pro-
duce a change in the output signal. The A/D converter that generates signals of Fig. 2.3 has two binary digits
and thus four quantization levels. Any change, therefore, in the input over the interval [0.5, 1.5) produces no
change in the output. With three binary digits, 23 quantization levels can be obtained, and the resolution of
the converter would improve.
The A/D converters in common use have word lengths of 8 to 16 bits. For an A/D converter with a word
length of 8 bits, an input signal can be resolved to one part in 28, or 1 in 256. If the input signal has a range
of 10 V, the resolution is 10/256, or approximately 0.04 V. Thus, the input signal must change by at least
0.04 V, in order to produce a change in the output.
With the availability of converters with resolution ranging from 8 to 16 bits, the quantization errors do not
pose a serious threat in the computer control of industrial processes. In our treatment of the subject, we
assume quantization errors to be zero. This is equivalent to assuming infinite-bit digital devices. Thus we
treat digital signals as if they are discrete-time signals with amplitudes assuming a continuous range of
values. In other words, we make no distinction between the words ‘discrete-time’ and ‘digital.’
A typical topology of a single-loop digital control system is shown in Fig. 2.2. It has been assumed that the
measuring transducer and the actuator (final control element) are analog devices, requiring respectively A/D
and D/A conversion at the computer input and output. The
Digital Discrete-time Analog
signal signal D/A conversion is a process of producing an analog signal
words
from a digital signal and is, in some sense, the reverse of
the sampling process discussed above.
Zero-order The D/A converter performs two functions: first,
Decoder
hold generation of output samples from the binary-form
Fig. 2.5 Operations performed by a D/A digital signals produced by the machine, and second, con-
converter version of these samples to analog form. Figure 2.5 is
Signal Processing in Digital Control 27
a block diagram representation of the operations performed by a D/A converter. The decoder maps each
digital word into a sample value of the signal in discrete-time form. It is usually not possible to drive a
load, such as a motor, with these samples. In order to deliver sufficient energy, the sample amplitude
might have to be so large that it is infeasible to be generated. Also large-amplitude signals might saturate
the system being driven.
The solution to this problem is to smooth the output samples to produce a signal in analog form. The
simplest way of converting a sample sequence into a continuous-time signal is to hold the value of the
sample until the next one arrives. The net effect is to convert a sample to a pulse of duration T—the sample
period. This function of a D/A converter is referred to as a zero-order hold (ZOH) operation. The term zero-
order refers to the zero-order polynomial used to extrapolate between the sampling times (detailed discus-
sion will appear later in this chapter). Figure 2.6 shows a typical sample sequence produced by the decoder,
and the analog signal1 resulting from the zero-order hold operation.
y (k ) y h ( t)
3 3
2 2
1 1
k t
0 1 2 3 4 0 T 2T 3T 4T
(a) (b)
Fig. 2.6 (a) Sampled sequence (b) Analog output from ZOH
1
In the literature, including this book, the terms ‘continuous-time signal’ and ‘analog signal’ are frequently
interchanged.
28 Digital Control and State Variable Methods
Full scale
7/8
(ratio to full scale)
6/8
Analog output
5/8
4/8
3/8
2/8
1/8
3R
2R R R 2R
–
A
V0
2R 2R 2R +
b0 b1 b2
– V ref
Fig. 2.7 Three-bit D/A converter
Similarly, if b0 = 1 and b2 = b1 = 0, then the equivalent circuit is as shown in Fig. 2.8c. The output
voltage is
i 1
V0 = 3R 0 = Vref
8 8
In this way, we find that when the input data is b2b1b0 (where the bi’s are either 0 or 1), then the output
voltage is
V0 = (b22–1 + b12–2 + b02–3)VFS (2.1)
where VFS = Vref = full scale output voltage.
The circuit and the defining equation for an n-bit D/A converter easily follow from Fig. 2.7 and Eqn. (2.1),
respectively.
Signal Processing in Digital Control 29
3R
1
i
2 2
2R 2R
–
1 1 A
i i
2 2 2 2 V0
i2
2R +
– V ref
(a)
3R
1
i
2R R 2R 4 1
–
1 1 1
i i i
2 1 2 1 4 1 V0
i1 +
2R 2R 1
i
4 1
– V ref
(b)
3R
1
i
2R R R 2R 8 0
–
1 1 1 1
i i i i
2 0 2 0 4 0 8 0 V0
2R i0 2R 2R +
1 1
i i
4 0 8 0
– Vref
(c)
Fig. 2.8 Equivalent circuits of the D/A converter shown in Fig. 2.7;
(a) b0 = b1 = 0, b2 = 1; (b) b0 = 0, b1 = 1, b2 = 0; (c) b0 = 1, b1 = b2 = 0.
Clock
Digital
output
V0
D /A V FS
There are a number of basic discrete-time signals which play an important role in the analysis of signals and
systems. These signals are direct counterparts of the basic continuous-time signals.2 As we shall see, many of
the characteristics of basic discrete-time signals are directly analogous to the properties of basic continuous-
time signals. There are, however, several important differences in discrete time, and we will point these out
as we examine the properties of these signals.
2
Chapter 2 of the companion book [155].
Signal Processing in Digital Control 31
Unit Sample Sequence The unit sample sequence contains only one nonzero element and is defined by
(Fig. 2.11a)
d (k) =
RS1 for k = 0
(2.2a)
T0 otherwise
The delayed unit sample sequence, denoted by d (k – n), has its nonzero element at sample time n (Fig. 2.11b):
d (k – n) =
RS1 for k = n
(2.2b)
T0
otherwise
One of the important aspects of the unit sample sequence is that an arbitrary sequence can be represented
as a sum of scaled, delayed unit samples. For example, the sequence r (k) in Fig. 2.11c can be expressed as
r(k) = r(0)d (k) + r(1)d (k – 1) + r(2)d (k – 2) + L
¥
= å r(n)d (k – n) (2.3)
n = 0
r(0), r(1), K , are the sample values of the sequence r(k). This representation of a discrete-time signal is
found useful in the analysis of linear systems through the principle of superposition.
d (k ) d (k – n ) r (k )
1 1
k k k
0 1 2 3 0 1 2 n 0 1 2 3
(a) (b) (c)
1 1
k 3 5
k k
0 1 2 0 1 n 0 1
(d) (e)
(f)
Fig. 2.11 Basic discrete-time signals
As we will see, the unit sample sequence plays the same role for discrete-time signals and systems, that
the unit impulse function does for continuous-time signals and systems. For this reason, the unit sample
sequence is often referred to as the discrete-time impulse. It is important to note that a discrete-time impulse
does not suffer from the mathematical complexity that a continuous-time impulse suffers from. Its definition
is simple and precise.
32 Digital Control and State Variable Methods
Unit Step Sequence The unit step sequence is defined as3 (Fig. 2.11d)
m(k) =
RS1 for k ³ 0
(2.4)
T0 otherwise
The delayed unit step sequence, denoted by m(k – n), has its first nonzero element at sample time n (Fig. 2.11e):
m(k – n) =
RS1 for k ³ n
(2.5)
T0 otherwise
An arbitrary discrete-time signal r(k) switched on to a system at k = 0 is represented as r(k)m(k).
Sinusoidal Sequence A one-sided sinusoidal sequence has the general form (Fig. 2.11f )
r(k) = A cos(W k + f) m(k) (2.6)
The quantity W is called the frequency of the discrete-time sinusoid and f is called the phase. Since k is a
dimensionless integer, the dimension of W must be radians (we may specify the units of W to be radians/
sample, and units of k to be samples).
The fact that k is always an integer in Eqn. (2.6) leads to some differences between the properties of
discrete-time and continuous-time sinusoidal signals. An important difference lies in the range of values the
frequency variable can take on. We know that for the continuous-time signal r(t) = A cos w t = real {Ae jw t},
w can take on values in the range (– ∞ , ∞ ). In contrast, for the discrete-time sinusoid r(k) = A cos Wk =
real {Ae jWk}, W can take on values in the range [– p, p].
To illustrate the property of discrete-time sinusoids, consider W = p + x, where x is a small number
compared with p. Since
e jWk = e j(p + x)k = e j(2p – p + x)k = e j(– p + x)k
a frequency of (p + x) results in a sinusoid of frequency (– p + x). Suppose now, that W is increased to 2p.
Since e j2pk = e j0, the observed frequency is 0. Thus, the observed frequency is always between – p and p, and
is obtained by adding (or subtracting) multiples of 2p to W until a number in that range is obtained.
The highest frequency that can be represented by a digital signal is therefore p radians/sample interval.
The implications of this property for sequences obtained by sampling sinusoids and other signals will be
discussed in Section 2.11.
Example 2.1 In order to establish a feeling for the discrete-time systems, we study the signal processing
algorithm given by the difference equation
x(k + 1) = – a x(k) + r(k); x(0) = 0 (2.9)
where a is a real constant.
We shall obtain a closed-form solution of this equation by, what amounts to a brute force method
(z-transform method of solving linear difference equations will appear in Section 2.7). When solved repeti-
tively, Eqn. (2.9) yields
x(0) = 0; x(1) = r(0)
x(2) = – a r(0) + r(1); x(3) = (– a)2 r(0) – a r(1) + r(2)
M
The general term becomes (r(k) = 0 for k < 0),
x(k) = (– a)k – 1 r(0) + (– a)k – 2 r(1) + L + r(k – 1) (2.10)
Examining this equation, we note that the response x(k) is a linear combination of the input samples r(0),
r(1), ..., r(k – 1), and there appears to be a definite structure of the various weights.
The response of linear discrete-time systems to an impulse input d (k) (defined in Eqn. (2.2a)) will be of
special interest to us. Let us denote this response, called the impulse response, by g(k).
For the system described by Eqn. (2.9), the impulse response obtained from Eqn. (2.10) is given by
g(k) =
RS0 k -1
for k = 0
(2.11)
T(-a ) for k ³ 1
Signal Processing in Digital Control 35
The question of whether or not the solution decays, is more closely related to the magnitude of a than to
its sign. In particular, for |a | > 1, g(k) grows with increasing k while it decays when |a | < 1. The nature of
time functions of the form (2.11) for different values of a will be examined in Section 2.9.
c2
x 2 (k )
+
r (k ) + + + x 1 (k) + y (k)
c1
+ + +
0 0
x 2 d (k ) x 1 d (k )
a2
+
+
a1
...
system
rp yq discrete-time system of Fig. 2.14.
In general, the state variable formulation may
...
be visualized in block diagram form as shown in
x1 x2 xn Fig. 2.15. We have depicted a multi-input, multi-
output (MIMO) system which has p inputs, q out-
n state variables puts, and n state variables; the different variables
Fig. 2.15 Structure of a general discrete-time system are represented by the input vector r(k), the out-
put vector y(k) and the state vector x(k), where
36 Digital Control and State Variable Methods
LM r ( k ) OP 1 LM y (k ) OP LM x (k ) OP
1 1
r (k ) y ( k ) x (k)
r(k) = M
MM M PPP ; y(k) = MM M PP ; x (k) = MM M PP
Δ 2 Δ 2 Δ 2
MNr ( k )PQ p
MN y (k )PQ MN x (k )PQ
q n
Assuming that the input is switched on to the system at k = 0 (r(k) = 0 for k < 0), the initial state is given by
Δ
x(0) = x0, a specified n × 1 vector
The dimension of the state vector defines the order of the system. The dynamics of an nth-order linear
time-invariant system are described by equations of the form
x1(k + 1) = f11 x1(k) + f12 x2(k) + L + f1n xn(k) + g11 r1(k)
+ g12 r2(k) + L + g1p rp(k)
x2(k + 1) = f21 x1(k) + f22 x2(k) + L + f2n xn(k) + g21 r1(k)
+ g22 r2(k) + L + g2p rp(k)
M (2.13)
xn(k + 1) = fn1 x1(k) + fn2 x2(k) + L + fnn xn(k) + gn1 r1(k)
+ gn2 r2(k) + L + gnp rp(k)
where the coefficients fij and gij are constants.
In the vector-matrix form, Eqns (2.13) may be written as
Δ
x(k + 1) = Fx(k) + Gr(k); x(0) = x0 (2.14)
where
LM f 11 f 12 K f1nO LMg 11 g12 K g1 p OP
f f 22 K f PP g g22 K g2 p
F= M G= M P
21 2n 21
and
MM M M M P MM M M M P
Nf n1 f n2 K f Q
nn
P Ng n1 gn2 K g Q
np
P
are, respectively, n × n and n × p constant matrices. Equation (2.14) is called the state equation of the system.
The output variables at t = kT are linear combinations of the values of the state variables and input
variables at that time, i.e.,
y(k) = Cx(k) + Dr(k) (2.15)
where
LM
c11 c12 K c1n OP
d11 d12 K d1 p LM OP
c21 c22 K c2 n d 21 d 22 K d 2 p
C=
M
MM M M
and D = PP
M M M
MM PP
MMNc
q1 cq 2 K cqn
PPQ MMNd q1 d q 2 K d qp
PPQ
are, respectively, q × n and q × p constant matrices. Equation (2.15) is called the output equation of the system.
The state equation (2.14) and the output equation (2.15) together give the state variable model of the
MIMO system4:
Δ
x(k + 1) = Fx(k) + Gr(k); x(0) = x0 (2.16a)
y(k) = Cx(k) + Dr(k) (2.16b)
4
We have used lower case bold letters to represent vectors and upper case bold letters to represent matrices.
Signal Processing in Digital Control 37
For single-input (p = 1) and single-output (q = 1) system, the state variable model takes the form
Δ
x(k + 1) = Fx(k) + gr(k); x(0) = x0 (2.17a)
y(k) = cx(k) + dr(k) (2.17b)
where g is n × 1 column vector, c is 1 × n row vector and d is a scalar:
g1 LM OP
g
g = M P ; c = [c
2
c2 L cn]
MM M PP 1
Ng Q n
Example 2.2 The discrete-time system of Fig. 2.16 has one dynamic element (unit delayer); it is there
fore, a first-order system. The state of the system at any k is described by x(k)—the output of the dynamic
element.
The equation of the input summing junction is
x(k + 1) = 0.95 x(k) + r(k); x(0) = 0 (2.18a)
This is the state equation of the first-order system.
The output y(k) is given by the following output equation:
y(k) = 0.0475 x(k) + 0.05 r(k) (2.18b)
Equations (2.18a) and (2.18b) together constitute the state variable model of the first-order system.
0.05
+
r (k) + x (k + 1) x (k) y (k)
0.0475
+
+
0.95
Let us study the response of the system of Fig. 2.16 to the unit step sequence
m(k) =
RS1 for k ³ 0
(2.19a)
T0 for k < 0
and the unit alternating sequence
r(k) =
RS(-1) k
for k ³ 0
(2.19b)
T0 for k < 0
We will first solve Eqn. (2.18a) for x(k) and then use Eqn. (2.18b) to obtain y(k).
The solution of Eqn. (2.18a) directly follows from Eqn. (2.10):
x(k) = (0.95)k – 1 r(0) + (0.95)k – 2 r(1) + L + r(k – 1)
k -1
= å (0.95)k – 1 – i r(i) (2.20)
i=0
38 Digital Control and State Variable Methods
MN 1 - 0.95 PQ 0.05
The output
0.0475
y1(k) = [1 – (0.95)k ] + 0.05; k ≥ 0
0.05
= 1 – (0.95)k + 1; k ≥ 0 (2.21)
Consider now the system excited by the unit alternating input given by Eqn. (2.19b). It follows from
Eqn. (2.20) that for this input, the state
k -1
1
x(k) = å (0.95)k – 1 – i (– 1) i = [(0.95)k – (– 1)k]
i=0 195
.
The output
y2(k) = 0.0475 x(k) + 0.05 (– 1)k
0.05
[(– 1)k + (0.95)k + 1]; k ≥ 0
= (2.22)
195
.
From Eqns (2.21) and (2.22), we observe that the steady-state values of y1(k) and y2(k) are
1
(– 1)k for large k
y1(k) = 1 for large k; y2(k) =
39
Thus, the discrete-time system of Fig. 2.16 readily transmits a unit step and rejects a unit alternating
input (reduces its magnitude by a factor of 39). Since the unit alternating signal is a rapidly fluctuating
sequence of numbers while the unit step can be viewed as a slowly fluctuating signal, the discrete-time
system of Fig. 2.16 represents a low-pass digital filter. In Example 2.11, we will study the frequency-domain
characteristics of this filter.
1 - ak + 1
k
5
å aj =
1- a
; a ¹1
j=0
Signal Processing in Digital Control 39
analysed using a single nth-order difference equation as its model. General form of nth-order linear difference
equation relating output y(k) to input r(k) is given below:
y(k) + a1y(k – 1) + L + any(k – n) = b0r(k) + b1r(k – 1) + L + bmr(k – m)
The coefficients ai and bj are real constants; m and n are integers with m £ n.
We will consider the general linear difference equation in the following form:
y(k) + a1y(k – 1) + L + any(k – n)= b0r(k) + b1r(k – 1) + L + bnr(k – n) (2.23)
There is no loss of generality in this assumption; the results for m = n be used for the case of m < n by
setting appropriate bj coefficients to zero.
If the input is assumed to be switched on at k = 0 (r(k) = 0 for k < 0), then the difference equation model
(2.23) gives the output at instant ‘0’ in terms of the past values of the output; y(– 1), y(– 2), ..., y(– n), and the
present input r(0). Thus the initial conditions of the model (2.23) are {y(– 1), y(– 2), ..., y(– n)}.
Since the difference equation model (2.23) represents a time-invariant system, the choice of the initial
point on the time scale is simply a matter of convenience in analysis. Shifting the origin from k = 0 to k = n,
we get the equivalent difference equation model:
y(k + n) + a1 y(k + n – 1) + L + an y(k) = b0r(k + n) + b1r(k + n – 1) + L + b0r(k) (2.24)
Substituting k = 0 in Eqn. (2.24), we observe that the output at instant ‘n’ is expressed in tems of n values
of the past outputs: y(0), y(1), ..., y(n – 1), and in terms of inputs: r(0), r(1), ..., r(n). If k is incremented to
take on values k = 0, 1, 2, ..., etc., the y(k); k = n, n +1 , ..., can easily be generated by the iterative procedure.
Given { y(– 1), y(– 2), ..., y(– n)}, the initial conditions { y(0), y(1), ..., y(n – 1)}of the model (2.24) can be
determined by successively substituting k = – n, – n + 1, ..., – 2, – 1 in Eqn. (2.24).
In this book, we have not accommodated the classical methods of solution of linear difference equations
of the form (2.23) for given initial conditions and/or external inputs. Our approach is to transform the model
(2.23) to other forms which are more convenient for analysis and design of digital control systems. Our
emphasis is on the state variable models and transfer functions.
In Chapter 6, we will present methods of conversion of difference equation models of the form (2.23), to
state variable models. We will use state variable models to obtain the system response to given initial condi-
tions and external inputs, to construct digital computer simulation diagrams, and to design digital control
algorithms using modern methods of design.
Later in this chapter, we will present the z-transform technique for transforming difference equation
model (2.23) to transfer function form. We will use transfer function models to study input-output behaviour
of discrete-time systems; and to design digital control algorithms using classical methods of design.
As a consequence of Eqn. (2.25), a linear time-invariant system is completely characterized by its im-
pulse response g(k) in the sense that given g(k), it is possible to use Eqn. (2.25) to compute the output to any
input r(k). Equation (2.25) is commonly called the convolution sum.
It should be pointed out that the summation in Eqn. (2.25) is not really infinite in a practical situation,
since for causal systems, g(k – j) resulting from the input d (k – j) is zero for k < j. This is because a causal
system cannot respond until the input is applied. Thus, for a causal system with input r(k)m(k), Eqn. (2.25)
modifies to
k
y(k) = å r( j) g(k – j); k ≥ 0 (2.26)
j=0
Another important observation concerns the symmetry of the situation. If we let k – j = m in Eqn. (2.26),
we get
0
y(k) = å r(k – m) g(m)
m=k
Reversing the order of summation,
k
y(k) = å g(m) r(k – m) (2.27)
m=0
The symmetry shows that we may reverse the roles of r( . ) and g( . ) in the convolution formula.
We may remind the reader here, that whenever impulse response models are used to describe a system,
the system is always implicitly assumed to be linear, time-invariant, and initially relaxed.
We now transform r(k) and g(k) using the mapping
f (k) ® F(z)
where
¥
Δ
F(z) = å f ( k ) z – k ; z is a complex variable (2.28)
k=0
Y(z) =
¥ ¥ L
å y ( k ) z – k = å M å r ( j) g ( k
¥ OP
– j) z – k
k=0 k =0 j=0MN PQ
Changing the order of summations, gives
¥ ¥
Y(z) = å r ( j)z – j å g(k – j ) z –( k – j )
j=0 k=0
Since g(k – j) = 0 for k < j, we can start the second summation at k = j. Then, defining the index m = k – j, we
can write
¥ ¥
Y(z) = å r ( j ) z – j å g (m) z – m
j=0 m=0
There are basically two ways to approach the z-transform. One way is to think in terms of systems that are
intrinsically discrete. Signal processing by a digital computer, as we have seen in the previous section, is an
example of such systems. In fact, intrinsically discrete-time systems arise in a number of ways. A model of
the growth of cancer is discrete, because the cancer cells divide at discrete points in time. A macroeconomic
model is usually discrete, because most economic data is usually reported monthly and quarterly. Represent-
ing the discrete instants of time by the integer variable k(k = 0, 1, 2, ...), we denote the output of a SISO
system by the sequence y(k); k ³ 0, and the input by the sequence r(k); k ³ 0.
The alternative approach to the z-transform is in terms of sampled-data systems. This is the approach we
will adopt because it best fits the problem we intend to solve, namely, the control of continuous-time systems
by a digital signal processor (refer Fig. 2.2). Sampling a continuous-time signal defines the discrete instants
of time. Interestingly, we will see that the z-transform (2.28) defined for analyzing systems that are intrinsi-
cally discrete, is equally useful for sampled-data systems.
d T (t)
x*(t) =
T
xa (t) x*(t) x a (t) x a ( t) dT ( t )
Impulse
Modulator
(a)
dT
0 T 2T 3T t
(b)
Fig. 2.19 (a) Representation of sampling as impulse modulator (b) Representation of impulse train
Signal Processing in Digital Control 43
We will eliminate the impulse function by simply taking the Laplace transform of x*(t) to obtain (refer
Chapter 2 of the companion book [155] for definitions and properties of impulse function, and Laplace
transform)
¥
Δ
L [x*(t)] = X*(s) = z
0
xa (t )d T (t )e – st dt
¥ ¥
= å
k = 00
z xa (t )d (t – kT )e – st dt
¥
= å xa ( kT )e – skT (2.32b)
k =0
This expression for X *(s) represents a Laplace transform, but it is not a transform that is easy to use
because the complex variable s occurs in the exponent of the transcendental function e. By contrast, the
Laplace transforms that we have used previously in the companion book [155], have mostly been ratios of
polynomials in the Laplace variable s, with real coefficients. These latter transforms are easy to manipulate
and interpret.
Ultimately, we will be able to achieve these same ratios of polynomials in a new complex variable z by
transforming X *(s) to reach what we will call the z-plane.
We remind the reader here that X*(s) is the notation used for Laplace transform of impulse modulated
signal x*(t); the ‘star’ distinguishes it from X(s)—the conventional Laplace transform of the unsampled
continuous function xa(t). We have used the same complex plane (s-plane) for Laplace transform of “starred”
functions and conventional functions. This is the most compact approach used almost universally.
d (k) =
RS1 for k = 0
T0 otherwise
The z-transform of the elementary signal is
¥
Z [d (k)] = å d (k )z –k = z 0 = 1; | z| > 0 (2.39)
k =0
Signal Processing in Digital Control 45
Unit Step Sequence The unit step sequence is defined as
m (k) =
RS1 for k ³ 0
T0 otherwise
The z-transform is
¥ ¥
Z [m (k)] = å m( k ) z – k = å z – k
k =0 k =0
Using the geometric series formula
¥
1
å xk =
1– x
; |x| < 1,
k =0
this becomes
1 z
Z [m (k)] = –1
= (2.40)
1– z z–1
Note that this equation holds only if the infinite sum converges, that is if |z–1| < 1 or |z| > 1. Thus, the
region of convergence is the area outside the unit circle in the z-plane.
Sampled Ramp Function Discrete form of y(t) = tm (t) is of the form
y(k) =
RSkT for k ³ 0
∞ ∞
dX ( z) d
dz
= ∑ dz x(k )z – k = ∑ (– k ) x(k )z – k –1
k =0 k =0
Consequently,
¥
dX ( z)
–z
dz
= å k x( k ) z – k
k =0
or
dX ( z)
Z [kT x(k)] = – Tz (2.41)
dz
For x(k) = m (k), we obtain
x(k) =
RSe – akT
for k ³ 0
T0 otherwise
46 Digital Control and State Variable Methods
Then
¥ ¥
– akT – k
X(z) = å e z = å (e aT z) – k
k =0 k =0
¥
= å a – k ; a = e aT z
k =0
1 e aT z z
= –1 = aT– aT =
1–a e z–1 z – e
This equation holds only if the infinite sum converges, that is, if |e–aT z–1 |< 1 or |z| > |e–aT|. The result holds
for both real and complex a.
Sampled Sinusoids Discrete form of x(t) = A cos (wt + f) is of the form
x(k) =
RS
A cos(w kT + f ) for k ³ 0
0 T otherwise
The transform of sampled sinusoids can be found by expanding the sequence into complex exponential
components.
x(k) = A
FG e j (wkT + f )
+ e – j (wkT + f ) IJ
H 2 K
Then
¥ ¥
A A
X(z) =
2
å e jf e jwkT z – k + 2
å e – jf e jwkT z – k
k =0 k =0
jf – jf
A ze A ze
= +
2 z – e – jwT 2 z – e jwT
Az
LM z(e
+ e – jf ) e j (wT + f ) + e – j (wT + f )
–
jf
OP
=
2 N 2 Q
z2 – 2
e jwT
+ e – jwT
z+1
FG IJ
2 H K
Az z cos f – cos(wT + f )
= ; |z| > 1
z 2 – 2 z cos wT + 1
Given the z-transform of A cos(wkT + f ), we can obtain z-transform of Ae–akT cos(wkT + f) as follows.
¥
Z [e–akT x(k)] = å x ( k )e – akT z – k
k =0
∞
= ∑ x(k )(ze aT ) – k = X ( ze aT ) (2.43)
k =0
Noting that
Az[ z cos f – cos(wT + f )]
Z [A cos (wkT + f )] =
z 2 – 2 z cos wT + 1
we substitute zeaT for z to obtain the z-transform of Ae–akT cos(wkT + f ), as follows:
Aze aT [ ze aT cos f – cos(wT + f )]
Z [Ae–akT cos (wkT + f )] = ; |z| > e–aT (2.44)
z 2 e 2 aT – 2 ze aT cos wT + 1
Signal Processing in Digital Control 47
1
X(s) =
s( s + 1)
Whenever a function in s is given, one approach for finding the corresponding z-transform is to convert X(s)
into x(t) and then find the z-transform of x(kT ) = x(k); T is the sampling interval.
The inverse Laplace transform of X(s) is
x(t) = 1–e–t; t ³ 0
Hence
Δ
x(kT) = x(k) = 1 –e–kT; k ³ 0
z z (1 – e – T ) z
X(z) = Z [x(k)] = – = ; |z| > 1
z – 1 z – e–T ( z – 1)( z – e – T )
We summarize the z-transforms we have derived up to this point, plus some additional transforms in
Table 2.1. The table lists commonly encountered functions x(t); t ³ 0 and z-transforms of sampled version of
these functions, given by x(kT ). We also include in this table, the Laplace transforms X(s) corresponding to
the selected x(t). We have seen in Example 2.3, that whenever a function in s is given, one approach for
finding the corresponding z-transform is to convert X(s) into x(t), and then find its z-transform. Another
approach is to expand X(s) into partial functions and use z-transform table to find the z-tranforms of the
expanded terms. Table 2.1 will be helpful for this second approach.
All the transforms listed in the table, can easily be derived from first principles. It may be noted that in
this transform table, regions of convergence have not been specified. In our applications of systems analysis,
which involve transformation from time-domain to z-domain and inverse transformation, the variable z acts
as a dummy operator. If transform pairs for sequences of interest to us are available, we are not concerned
with the region of convergence.
Contd.
48 Digital Control and State Variable Methods
Table 2.1 Contd.
w (sin wT ) z
sin wt sin wkT
s2 + w 2 z 2 – ( 2 cos wT ) z + 1
s z 2 – (cos wT ) z
cos wt cos wkT
s2 + w 2 z 2 – ( 2 cos wT ) z + 1
w (e – aT sin wT ) z
e–at sin wt e–akT sin w kT
( s + a )2 + w 2 z 2 – (2e – aT cos wT ) z + e –2 aT
s+ a z 2 – (e – aT cos wT ) z
e–at cos wt e–akT cos w kT
( s + a )2 + w 2 z – (2e– aT cos wT ) z + e –2 aT
2
Shifting Theorem: Advance (forward shift) z-transformation of difference equations written in terms
of advanced versions of the input and output variables (refer Eqn. (2.24)) requires the following results.
¥ ¥
Z [ y(k + 1)] = å y ( k + 1) z – k = z å y ( k + 1) z –( k + 1)
k =0 k =0
Letting k + 1 = m, yields
¥
Z [ y(k + 1)] = z å y ( m) z – m = z
LM å y(m) z
¥
–m
– y ( 0)
OP
k =0 Nk =0 Q
= zY(z) – zy(0) (2.45a)
Use of this result in a recursive manner leads to the following general result:
Z [y(k + n)] = zn Y(z) – zn y(0) –zn–1 y(1) – L – z2 y(n –2) – zy(n – 1) (2.45b)
Shifting Theorem: Delay (backward shift) z-transformation of difference equations written in terms of
delayed versions of input and output variables (refer Eqn. (2.23)) requires the following results.
¥
Z [ y(k – 1)] = å (k – 1) z – k
k =0
= y(– 1)z0 + y(0)z–1 + y(1)z–2 + L
= z–1
LM å y( k ) z OP + y (–1)
¥
–k
N
k =0 Q
= z–1 Y(z) + y(–1) (2.46a)
Use of this result in a recursive manner leads to the following general result:
Z [y(k – n)] = z–n Y(z) + z–(n–1) y(– 1) + z–(n–2) y(– 2) + L
+ z–1 y(– n + 1) + y(– n) (2.46b)
If y(k) = 0 for k < 0, we have
Z [y(k – n)] = z–n Y(z) (2.47)
Signal Processing in Digital Control 49
Example 2.4 Let us find the z-transforms of unit-step functions that are delayed by 1 sampling period,
and n sampling periods respectively.
Using the shifting theorem given by Eqn. (2.47), we have
–1
Z [m(k – 1)] = z–1 Z [m (k)] = z–1
FG 1 IJ = z
H1 – z–1 K 1– z –1
Also
–n
Z [m(k – n)] = z–n Z [m (k)] = z–n
FG 1 IJ = z
H1 – z –1 K 1– z –1
Remember that multiplication of the z-transform X(z) by z has the effect of advancing the signal x(k) by
one sampling period, and that multiplication of the z-transform X(z) by z–1 has the effect of delaying the
signal x(k) by one sampling period. In control engineering and signal processing, X(z) is frequently
expressed as a ratio of polynomials in z–1 as follows (refer Table 2.1):
z 2 – (e – aT cos wT ) z
Z [e–akT cos w kT ] = (2.48a)
z – (2e – aT cos wT ) z + e –2aT
2
1 – (e – aT cos wT ) z –1
= (2.48b)
1 – (2e – aT cos wT ) z –1 + e –2aT z –2
z–1 is interpreted as the unit delay operator.
In finding the poles and zeros of X(z), it is convenient to express X(z) as a ratio of polynomials z, as is
done in Eqn. (2.48a). In this and the next chapter, X(z) will be expressed in terms of powers of z, as given by
Eqn. (2.48a), or in terms of powers of z–1, as given by Eqn. (2.48b), depending on the circumstances.
Example 2.5 Analogous to the operation of integration, we can define the summation operation
k
x(k) = å y(i ) (2.49)
i =0
In the course of deriving an expression for X(z) in terms of Y(z), we shall need the infinite series sum:
¥
1 z
å (az –1) k =
1 – az –1
=
z –a
(2.50)
k =0
–1
which converges, provided that |az | < 1, or |z| > a.
Successive values of x(k) are:
x(0) = y(0)
x(1) = y(0) + y(1)
M
x(k) = y(0) + y(1) + L + y(k)
Thus, X(z) is the infinite sum given below.
¥
X(z) = å x(k ) z –k = x(0) + z–1 x(1) + L + z–k x(k) + L
k =0
=
F z I [y(0) + z y(1) + z –1 –2
y(2) + L]
H z – 1K
=
F z I LM å y(k )z OP
¥
–k
H z – 1K N Q
k =0
Therefore,
z
X(z) = Y(z) (2.51)
z–1
Example 2.6 We observe that the transforms of the elementary functions (see Table 2.1) contain a factor
of z in the numerator, e.g.,
z
Z [m(k)] =
z–1
where m (k) is a unit-step sequence.
To ensure that the partial fraction expansion will yield terms corresponding to those tabulated, it is cus-
tomary to first expand the function Y(z)/z, if Y(z) has one or more roots at the origin, and then multiply the
resulting expansion by z.
For instance, if Y(z) is given:
2 z 2 – 15. z z ( 2 z – 15 .)
Y(z) = 2
= ,
z – 15 . z + 0.5 ( z – 0.5)( z – 1)
we are justified in writing
Y (z) 2 z – 15
. A1 A2
= = +
z ( z – 0.5)( z – 1) z – 0.5 z – 1
Constants A1 and A2 can be evaluated by applying the conventional partial fraction expansion rules.
A1 = (z – 0.5)
LMY (z) OP = 1; A2 = (z – 1)
LMY (z) OP =1
NzQ z = 0.5 NzQ z =1
Signal Processing in Digital Control 51
Y ( z) 1 1
= +
z z – 0.5 z – 1
or
z z
Y(z) = +
z – 0.5 z – 1
Using the transform pairs from Table 2.1,
y(k) = (0.5)kT + 1; k ³ 0
Example 2.7 When Y(z) does not have one or more zeros at the origin, we expand Y(z), instead of Y(z)|/z,
into partial fractions and utilize shifting theorem given by Eqn. (2.47) to obtain inverse z-transform.
In applying the shifting theorem, notice that if
Z –1[Y(z)] = y(k) then Z –1[z–1Y(z)] = y(k – 1)
Let us consider an example:
10
Y(z) =
( z – 1)( z – 0.2)
We first expand Y(z) into partial fractions:
12.5 12.5
Y(z) =–
z – 1 z – 0.2
Notice that the inverse z-transform of 1/(z–1) is not available in Table 2.1. However, using the shifting
theorem, we find that
Z –1
LM
1 OP
= Z –1 z
–1 zLM F = I OP RS
1; k = 1, 2, K
z–1N Q z –1 N H KQ T
0; k ≤ 0
Also,
Z –1
LM 1 OP
= Z –1 z
–1 LM
z F =
I OP RS
(0.2) k – 1 ; k = 1, 2, K
N
z – 0.2 Q N
z – 0.2 H 0 KQ T ;k £ 0
Therefore,
y(k) = Z –1[Y(z)] =
RS
12.5 1 – ( 0.2 ) k –1 ; k = 1, 2, K
0 T ;k ≤ 0
which can be written as
y(k) =12.5[1 – (0.2)k–1]m (k–1)
or
m
zY(z) – z y(0) – Y(z) = lim å [ y( k + 1) – y ( k )]z – k
m® ¥
k =0
Letting z ® 1 on both sides,
m
lim [(z – 1)Y(z)] = y(0) + lim lim å [ y(k + 1) – y ( k )]z – k
z®1 z®1 m® ¥
k =0
Interchanging the order of limits on the right-hand side, we have
m
lim [(z – 1)Y(z)] = y(0) + lim
z®1
å [ y ( k + 1) –
m® ¥ k
y ( k )] = y (¥)
=0
a
x(¥) = lim 1 – e – akT = 1
k ®¥
f
2.7 TRANSFER FUNCTION MODELS
The very first step in the analytical study of a system is to set up mathematical equations to describe the
system. Because of different analytical methods used, or because of different questions asked, we may often
set up different mathematical equations to describe the same system.
We have seen earlier in Section 2.5 (Eqn. (2.26)) that the input r(k) and output y(k) of any linear time-
invariant discrete-time system that is initially relaxed at k = 0, can be described by an equation of the form
k
y(k) = å r ( j) g(k – j ); k ³ 0 (2.53)
j=0
This is called the convolution sum. The function g(k) is defined for k ³ 0 and is called the impulse
response of the system.
Signal Processing in Digital Control 53
The application of z-transform to Eqn. (2.53) gives us an extremely useful mathematical description, of a
linear time-invariant discrete-time system (refer Eqn. (2.29)).
Y(z) = Z [(y(k)] = G(z)R(z) (2.54)
where
Δ Δ
R(z) = Z [(r(k)] and G(z) = Z [(g(k)]
We see that by applying the z-transform, a convolution sum is transformed into an algebraic equation.
The function G(z) is called the transfer function of the discrete-time system.
The transfer function of a linear time-invariant discrete-time system is, by definition, the z-transform of
the impulse response of the system.
An alternative definition of transfer function follows from Eqn. (2.54).
Z [ y ( k )] Y (z)
G(z) = = System (2.55)
System
Z [r ( k )] initially relaxed R( z ) initially relaxed
(b0 + b1 z -1 + L + bn z - n ) R( z)
Y(z) =
1 + a1 z -1 + L + a n z - n
Therefore, the transfer function G(z) of the discrete-time system represented by difference equation (2.23) is
-1 -
Y ( z ) b0 + b1 z + L + bn z n
G(z) = = (2.56)
R( z ) 1 + a1 z -1 + L + a n z - n
54 Digital Control and State Variable Methods
The same result can be obtained by taking the z-transformation of the shifted difference equation (2.24).
We first consider the case with n = 2, and then present the general result.
y(k + 2) + a1y(k + 1) + a2y(k) = b0r(k + 2) + b1r(k + 1) + b2r(k) (2.57)
The z-transform of Eqn (2.57) gives (using the shifting theorem given by Eqns (2.45)):
[z2Y(z) – z2y(0) – zy(1)] + a1[zY(z) – zy(0)] + a2Y(z)
= b0[z2R(z) – z2r(0) – zr(1)] + b1[zR(z) – zr(0)] + b2R(z)
or
(z2 + a1z + a2) Y(z) = (b0z2 + b1z + b2) R(z) + z2 [y(0) – b0r(0)]
+ z[y(1) + a1y(0) – b0r(1) – b1r(0)] (2.58)
Since the system is initially at rest, and switched on at k = 0, we have y(k) = 0 for k < 0, and r(k) = 0 for
k < 0. To determine the initial conditions y(0) and y(1), we substitute k = – 2 and k = – 1, respectively, into
Eqn. (2.57).
y(0) + a1y(–1) + a2y(–2) = b0r(0) + b1r(–1) + b2r(–2)
which simplifies to
y(0) = b0r(0) (2.59a)
and
y(1) + a1y(0) + a2 y(–1) = b0r(1) + b1r(0) + b2r(–1)
or
y(1) = –a1y(0) + b0r(1) + b1r(0) (2.59b)
By substituting Eqns (2.59) into Eqn. (2.58), we get
(z2 + a1z + a2)Y(z) = (b0z2 + b1z + b2) R(z)
Therefore
Y ( z) b z 2 + b1z + b2 b + b1z –1 + b2 z –2
= 02
G(z) = = 0
R( z) z + a1 z + a 2 1 + a1z –1 + a 2 z –2
Therefore, we can express the general transfer function model (2.56) as
Y (z) b z n + b1z n – 1 + L + bn
G(z) = = 0n (2.60a)
R(z ) z + a1 z n – 1 + L + an
We will represent the numerator polynomial of G(z) by N(z), and the denominator polynomial by D(z):
N (z )
G(z) = (2.60b)
D(z )
where
N(z) = b0 zn + b1 zn –1 + L + bn; D(z) = zn + a1 zn –1 + L + an
The terminology used in connection with G(s)—the transfer function of continuous-time systems6—is
directly applicable in the case of G(z).
The highest power of the complex variable z in the denominator polynomial D(z) of the transfer function
G(z) determines the order of the transfer function model. The denominator polynomial D(z) is called the
characteristic polynomial.
6
Chapter 2 of reference [155].
Signal Processing in Digital Control 55
The roots of the equation
D(z) = 0 (2.61a)
are called the poles of the transfer function G(z), and roots of the equation
N(z) = 0 (2.61b)
are called the zeros.
Equation (2.61a) is called the characteristic equation; the poles are the characteristic roots.
In Section 2.9, we will show that if the poles of the transfer function G(z) of a discrete-time system lie
inside the unit circle in the complex z-plane, the discrete-time system is stable.
Y(z) =
LM 0.0475 OP
+ 0.05 R(z)
N z - 0.95 Q
Therefore, the transfer function G(z) of the discrete-time system of Fig. 2.22 is
Y (z) 0.05z
G(z) = = (2.65)
R( z ) z - 0.95
0.05
R (z) X (z ) + Y (z)
+ z–1 +
0.0475
+
0.95
(a)
56 Digital Control and State Variable Methods
0.05
R (z) + Y (z)
1
0.0475
z – 0.95 +
(b)
Fig. 2.22 Equivalent representations of the discrete-time system of Fig. 2.16
z –1
4zLM F I OP LMz –1 F 4z I OP
g(k) = Z –1
z–
1
MN GG JJ P –
Z –1
MN GG z – 1 JJ P
2 H KQ H 4KQ
k –1 k –1
=4
F 1I –4
F 1I ;k ³ 1
H 2K H 4K
The impulse input thus excites the system poles without creating any additional response term.
(ii) The z-transform of m(k) is (refer Table 2.1)
z
Z [m(k)] =
z–1
z
Letting R(z) = , we obtain
z–1
Y(z) =
1 z LM
=
zOP
F z–
1 IF
z–
1 z–1 IN z–
1
z–
Q F
1
( z – 1)
IF I
H 4 KH 2 K 4 2H KH K
16 8
z z
–8z
= 3 + + 3
1 1 z2
1 –31
z– z–
144 4 2443 2 Excitation poles
System poles
The inverse transform operation gives (refer Table 2.1)
L16 F 1 I – 8F 1I +
k k
8 k OP
y(k) = MM 3 H 4 K
(1)
144 42444
H 2 K3 2 23
1 PQ
MN Transient response Steady - state response
The transient response terms correspond to system poles excited by the input m(k). These terms
vanish as k ® ¥.
The second response term arises due to the excitation pole, and has the same nature as the input
itself except for a modification in magnitude caused by the system’s behaviour to the specified input.
Since the input exists as k ® ¥, the second response term does not vanish and is called the steady-state
response of the system.
The steady-state response can be quickly obtained without doing the complete inverse transform
operation by use of the final value theorem (Eqn. (2.52)):
lim y(k) = lim (z – 1)Y(z)
k ®¥ z®1
if (z – 1)Y(z) has no poles on the boundary and outside of the unit circle in the complex z-plane.
y(k) =
LM 20 F – 1I k
–
4 1 FI k
–
32 OP
(–1) k m (k)
N 3 H 2K 15 4HK 5 Q
2.8 FREQUENCY RESPONSE
Using the Laplace transform, we were able to show that if we applied the input r(t) = R0 cos wt to a linear
time-invariant system with transer function G(s), the steady-state output yss was of the form (refer [155])
yss = lim y(t) = R0|G( jw)| cos(w t + f)
t ®¥
where f = ÐG( jw)
A similar result can be obtained for discrete-time systems. Let G(z) be the z-transform of a discrete linear
time-invariant system, and let the input to this system be r(kT) = R0cos(w kT), with T the sampling period.
Signal Processing in Digital Control 59
Then
R0 z ( z – cos wT ) R0 z ( z – cos wT )
Z [r(kT )] = =
2
z – 2z cos wT + 1 az – e faz – e f jwT – jwT
Suppose
m
k Õ ( z – pi )
i =1
G(z) = n
; |a j| < 1 (2.66)
Õ (z – a j )
j =1
Az A* z n Bjz
Y(z) =
z – e jwT
+
z – e – jwT
+ åz–a
j =1 j
Now
a fa R0 ( z – cos wT )
A = z – e jwT
fa
z – e jwT z – e – jwT f G(z) z = e jwT
=
a
R0 e jωT – 0.5 e jωT + e – jωT R f a f
G e jωT = 0 G e jwT = |A|e jq a f
e jωT – e – jωT 2
*
The other residue A is the complex conjugate of A. Taking the inverse transform of Y(z), we obtain
n
Ae jw kT
+ A * – j w kT
e å B j (a j ) k
y(k) = 144424443 + 1 j =1
4 4244 3
Steady - state component
Transient component
If |aj| < 1 for j = 1, 2, K, n, then
n
k
lim
k ®¥
å B j ca j h =0
j =1
Thus,
Δ 2| A| e j (wkT +q ) + e – j (wkT +q )
yss = lim y(kT ) = Aejw kT + A*e–jw kT =
k ®¥ 2
= 2|A| cos(w kT + q )
a f
= R0 G e jwT cos(wkT + q ) (2.67)
We have obtained a result that is analogous to that for continous-time systems. For a sinusoidal input,
the steady-state output is also sinusoidal; scaled by the gain factor |G(e jwT)|, and shifted in phase by
q = ÐG(e jwT). An important difference is that in the continous-time case we have |G( jw)|, while in the
discrete-time case we have |G(e jwT)|. The implications of this difference are discussed later in this chapter.
The steady-state response is also given by (2.67) when the poles of G(z) in Eqn.(2.66) are repeated with
|aj| < 1. This can easily be verified.
60 Digital Control and State Variable Methods
Example 2.11 The discrete-time system of Fig. 2.22 is described by the transfer function (refer Eqn.(2.65))
Y (z) 0.05 z
G(z) = =
R( z) z – 0.95
The given input sequence is
r(k) = R0 cos(W k) = Re {R0e jW k}
The output is then given by
y(k) = Re Z
RS -1 LMG(z) R z 0 OPUV = Re |RSZ LM 0.05 R z OP|UV
-1 0
2
T N z-e jW
QW |T N (z - 0.95) (z - e ) Q|W jW
R|
= Re S Z -1 LM 0.0475 R 0 FG z IJ + G(e ) R z OP U|V jW 0
|T N 0.95 - e jW H z - 0.95K ( z - e ) Q |W jW
where
0.05 e j W
G(e jW ) = G( z ) z = e jW =
e j W - 0.95
The inverse z-transform operation yields
y(k) = Re
LM 0.0475 R (0.95) + G(e ) R e OP
0 k jW
0
jWk
N10.444 jW
95 - e24443
1442443Q
Transient Steady-state
component component
This equation shows that as k increases, the transient component dies out. When this happens, the output
expression becomes
y( k ) = yss(k) = Re {G(e jW ) R0 e jWk}
k very large
1.2
0.2p 0.4p
0
Magnitude
0.8
– 30°
0.4
– 60°
0
0.2p 0.4p
– 90°
Fig. 2.23 Frequency-response curves of the discrete-time system of Fig. 2.22
Signal Processing in Digital Control 61
Stability is concerned with the qualitative analysis of the dynamic response of a system. This section
is devoted to the stability analysis of linear time-invariant discrete-time systems. Stability concepts and
definitions used in connection with continuous-time systems7 are directly applicable here.
A linear time-invariant discrete-time system described by the state variable model (refer Eqns (2.17)),
Δ
x(k + 1) = Fx(k) + gr(k); x(0) = x0
y(k) = cx(k) + d r(k)
has two sources of excitation:
(i) the initial state x0 representing initial internal energy storage; and (ii) the external input r(k).
The system is said to be in equilibrium state xe = 0, when both the initial internal energy storage and the
external input are zero.
In the stability study, we are generally concerned with the questions listed below.
(i) If the system with zero input (r(k) = 0; k ³ 0) is perturbed from its equilibrium state xe = 0 at k = 0, will
the state x(k) return to xe, remain ‘close’ to xe, or diverge from xe?
(ii) If the system is relaxed, will a bounded input r(k); k ³ 0, produce a bounded output y(k) for all k?
The first notion of stability is concerned with the ‘boundedness’ of the state of an unforced system in
response to arbitrary initial state, and is called zero-input stability. The second notion is concerned with the
boundedness of the output of a relaxed system in response to bounded input, and is called bounded-input,
bounded-output (BIBO) stability.
7
Chapter 5 of reference [155].
62 Digital Control and State Variable Methods
Now take a bounded input, i.e.,
|r(k)| < M; 0 £ k < ¥
where M is an arbitrary but finite positive constant. With this input,
¥
|y(k)| £ M å |g( j)|
j=0
and if condition (2.68) holds true, |y(k)| is finite; hence the output is bounded and the system is BIBO stable.
The condition (2.68) is also necessary, for if we consider the bounded input
R| +1 if g ( j) > 0
r(k – j) = S 0 if g( j) = 0
|T-1 if g ( j) < 0
then the output at any fixed value of k is given by
¥ ¥
|y(k)| = å g( j )r ( k -
j = 0
j) = å | g( j )|
j=0
Thus, unless the condition given by (2.68) is true, the system is not BIBO stable.
The condition (2.68) for BIBO stability can be translated into a set of restrictions on the location of poles
of the transfer function G(z) in the z-plane. Consider the discrete-time system shown in Fig. 2.24. The block-
diagram analysis gives the following input-output relation for this system.
Y (z ) Y ( z) z
= G(z) = 2
R( z ) z + a1 z + a 2
R (z) +
z–1 z–1 z
+ or Y(z) = 2 R(z)
z + a1z + a 2
For the impulse input, R(z) = 1. Therefore,
– a1 response transform
+
+ z
Y(z) = 2
z + a1z + a 2
– a2 The impulse response of the system is given
by
Fig. 2.24 A simple discrete-time system
y(k) = g(k) = Z – 1
LM z OP
2
Assume that the poles of the response transform Y(z) are real and distinct:
Nz +az+a Q
1 2
z2 + a1 z + a2 = (z – a1) (z – a2)
Partial fraction expansion of Y(z)/z is then of the form
Y (z) A1 A2
= +
z z - a1 z - a2
where A1 and A2 are real constants.
A1z A2 z
This gives Y(z) = + ; y(k) = A1(a1)k + A2(a2) k
z - a1 z - a2
Signal Processing in Digital Control 63
k k
The time functions (a1) and (a2) are the response functions contributed by the system poles at z = a1 and
z = a2, respectively. These time functions dictate the qualitative nature of the impulse response of the system.
A time function (a)k either grows or decays depending on |a | > 1 or |a | < 1, respectively. The growth or
decay is monotonic when a is positive and alternates in sign when a is negative. (a)k remains constant for
a = 1 and alternates in sign with constant amplitude for a = – 1 (Fig. 2.25).
z-plane
Unit circle
k
Fig. 2.25 The nature of response function (a ) for different values of a
Consider now the situation wherein the poles of response transform Y(z) are complex.
For the complex-conjugate pole pair at z = p = Roe jW and z = p* = Roe –jW of Y(z), the response y(k) is
obtained as follows.
Y (z) A A*
= +
z z − p z − p*
where A = |A| Ð f and A* is complex-conjugate of A.
The impulse response
y(k) = A(p)k + A* (p*)k = A(p)k + [A(p)k]*
z-plane
Unit circle
+
+
Fig. 2.26 The nature of response function (R0)k cos(Wk + f) for different values of R0
Response functions contributed by the real pole of multiplicity m can be evaluated as follows.
Consider the transform pair
z
« (a ) k
z -a
Application of the shifting theorem (Eqn. (2.47)) gives
1
« a k -1m( k - 1)
z-a
Using Eqn. (2.41),
−z
d F 1 I↔ kα k −1μ ( k − 1 or
z
« k a k -1 m (k - 1)
H
dz z − α K (z - a )2
From this pair, we may write (Eqn. (2.47)),
1
« ( k - 1)a k - 2 m ( k - 2)
( z - a )2
Performing differentiation operation once again, we have
-z
d LM1 OP
« k (k - 1) a k - 2 m (k - 2)
dz ( z - a ) 2
N Q
z 1
or 3
« k ( k - 1)a k - 2 m ( k - 2)
(z - a) 2!
Signal Processing in Digital Control 65
In general
z k ! (a ) k - m + 1
« m ( k - m + 1) (2.70)
(z - a )m ( k - m + 1) ! (m - 1) !
It can easily be established using final value theorem (Eqn. (2.52)) that each response function in Eqn. (2.69)
equals zero as k ® ¥ if |a| < 1. However, the response functions in Eqn. (2.69) grow without bound for |a| ³ 1.
Similar conclusions can be derived in case of response functions corresponding to complex-conjugate pair
of poles ( R0 e ±W ) of multiplicity m. The limit of each response function as k ® ¥ equals zero if R0 < 1. The
case of R0 ³ 1 contributes growing response functions.
From the foregoing discussion it follows that the nature of the response terms contributed by the
system poles (i.e., the poles of the transfer function G(z)), gives the nature of the impulse response g(k)
(= Z –1[G(z)]) of the system. This therefore answers the question of BIBO stability through condition (2.68),
which says that for a system with transfer function G(z) to be BIBO stable, it is necessary and sufficient that
¥
å |g(k)| < ∞
k =0
N ( z)
The nature of response terms contributed by various types of poles of G(z) = , i.e., the roots of the
D( z)
characteristic equation D(z) = 0, has already been investigated. Observing the nature of response terms
carefully, leads us to the following general conclusions on BIBO stability.
(i) If all the roots of the characteristic equation lie inside the unit circle in the z-plane, then the impulse
¥
response is bounded and eventually decays to zero. Therefore å |g(k)| is finite and the system is
k =0
BIBO stable.
(ii) If any root of the characteristic equation lies outside the unit circle in the z-plane, g(k) grows without
¥
bound and å |g(k)| is infinite. The system is therefore unstable.
k =0
(iii) If the characteristic equation has repeated roots on the unit circle in the z-plane, g(k) grows without
¥
bound and å |g(k)| is infinite. The system is therefore unstable.
k =0
(iv) If one or more non-repeated roots of the characteristic equation are on the unit circle in the
¥
z-plane, then g(k) is bounded but å |g(k)| is infinite. The system is therefore unstable.
k =0
An exception to the definition of BIBO stability is brought out by the following observations. Consider a
system with transfer function
N (z)
G(z) =
( z - 1)( z - e jW )( z - e - jW )
The system has non-repeated poles on the unit circle in the z-plane. The response functions contributed by
the system poles at z = 1 and z = e ± jW are respectively (l)k and cos(Wk + f). The terms (l)k and cos(W k + f) are
¥
bounded, å |g(k)| is infinite and the system is unstable in the sense of our definition of BIBO stability.
k=0
66 Digital Control and State Variable Methods
Careful examination of the input-output relation
N ( z)
Y(z) = G(z)R(z) = R(z)
( z - 1)( z - e jW )( z - e - jW )
shows that y(k) is bounded for all bounded r(k), unless the input has a pole matching one of the system poles
on the unit circle. For example, for a unit step input r(k) = m(k),
z zN ( z )
R(z) = and Y(z) =
z −1 ( z - 1) ( z - e jW )( z - e - jW )
2
The response y(k) is a linear combination of the terms cos(W k + f), (l)k, and k(l)k, and therefore y(k) ® ¥ as
k ® ¥. Such a system, which has bounded output for all bounded inputs, except for the inputs having poles
matching the system poles, may be treated as acceptable or non-acceptable. We will bring the situations
where the system has non-repeated poles on the unit circle under the class of marginally stable systems.
We will use the following terminology and tests for stability analysis of linear time-invariant systems
described by the transfer function G(z) = N(z)/D(z), with the characteristic equation D(z) = 0.
(i) If all the roots of the characteristic equation lie inside the unit circle in the z-plane, the system is stable.
(ii) If any root of the characteristic equation lies outside the unit circle in the z-plane, or if there is a
repeated root on the unit circle, the system is unstable.
(iii) If condition (i) is satisfied except for the presence of one or more non-repeated roots on the unit circle
in the z-plane, the system is marginally stable.
It follows from the above discussion that stability can be established by determining the roots of the
characteristic equations. All the commercially available CAD packages ([151–154]) include root-solving
routines. However, there exist tests for determining the stability of a discrete-time system, without finding
the actual numerical values of the roots of the characteristic equation.
A well-known criterion to test the location of zeros of the polynomial
D(z) = a0 zn + a1 zn – 1 + L + an – 1 z + an
where a’s are real coefficients, is the Jury stability criterion. The proof of this criterion is quite involved and
is given in the literature (Jury and Blanchard [98]). The criterion gives the necessary and sufficient condi-
tions for the roots to lie inside the unit circle. In the following, we present the Jury stability criterion without
proof.
Row z0 z1 z2 z3 L zk L zn – 2 z n –1 zn
1 an an – 1 an – 2 an – 3 L an – k L a2 a1 a0
2 a0 a1 a2 a3 L ak L an – 2 an – 1 an
3 bn – 1 bn – 2 bn – 3 bn – 4 L bn – k – 1 L b1 b0
4 b0 b1 b2 b3 L bk L bn – 2 bn – 1
5 cn – 2 cn – 3 cn – 4 cn – 5 L cn – k – 2 L c0
6 c0 c1 c2 c3 L ck L cn – 2
M
2n – 5 p3 p2 p1 p0
2n – 4 p0 p1 p2 p3
2n – 3 q2 q1 q0
(ii) All even-numbered rows are simply the reverse of the immediately preceding odd-numbered rows.
(iii) The elements for rows 3 through (2n – 3) are given by the following determinants:
an a n - 1- k
bk = ; k = 0, 1, 2, ..., n – 1
a0 ak +1
bn -1 bn - 2 - k
ck = ; k = 0, 1, 2, ..., n – 2 (2.74)
b0 bk + 1
M
p3 p2 - k
qk = ; k = 0, 1, 2
p0 pk +1
The procedure is continued until the (2n – 3)rd row is reached which will contain exactly three elements.
The necessary and sufficient conditions for polynomial D(z) to have no roots on and outside the unit circle
in the z-plane are:
D(1) > 0
D(– 1)
RS> 0 for n even
(2.75a)
T< 0 for n odd
| an | < | a0 |
| bn -1 | > | b0 | U|
| cn - 2 | > | c0 | |V
(n - 2) constraints (2.75b)
M ||
| q2 | > | q0 | W
The conditions on D(1), D(–1), and between a0 and an in (2.75a) form necessary conditions of stability
that are very simple to check without carrying out the Jury tabulation.
It should be noted that the test of stability given in (2.75) is valid only if the inequality conditions provide
conclusive results. Jury tabulation ends prematurely if, either the first and the last elements of a row are zero,
or, a complete row is zero. These cases are referred to as singular cases. These problems can be resolved by
expanding and contracting the unit circle infinitesimally, which is equivalent to moving the roots off the unit
circle. The transformation for this purpose is
z$ = (1 + e)z
where e is a very small real number.
This transformation can easily be applied since
(1 + e)n zn ≅ (1 + ne)zn
When e is a positive number, the radius of the unit circle is expanded to (1 + e), and when e is negative, the
radius of the unit circle is reduced to (1 – | e |). This is equivalent to moving the roots slightly. The difference
between the number of roots found inside (or outside) the unit circle when the circle is expanded and con-
tracted by e, is the number of roots on the circle [97].
Signal Processing in Digital Control 69
Usefulness of the Jury stability test for the design of a digital control system from the stability point of
view, will be demonstrated in the next chapter.
The Jury criterion is of marginal use in designing a feedback system; it falls far short of the root locus
method discussed in Chapter 4. The root locus technique of factoring a polynomial is intrinsically geometric,
as opposed to the algebraic approach of the Jury criterion. The root locus method enables us to rapidly
sketch the locus of all solutions to the characteristic polynomial of the closed-loop transfer function. The
sketch is usually only qualitative, but even so, it offers great insight by showing how the locations of the
poles of closed-loop transfer function change as the gain is varied. As we will see in Chapter 4, the root locus
approach has been reduced to a set of “rules”. Applied in an orderly fashion, these rules quickly identify all
closed-loop pole locations.
In the digital control structure of Fig. 2.2, discrete-time processing of continuous-time signals is accom-
plished by the system depicted in Fig. 2.27. The system is a cascade of an A/D converter followed by a
discrete-time system (computer program), followed by a D/A converter. Note that the overall system is
equivalent to a continuous-time system, since it
xa (t) x(k ) Computer y ( k ) y a ( t ) transforms the continuous-time input signal xa(t)
A/D program D/A into the continuous-time signal ya(t). However,
the properties of the system are dependent on the
choice of the discrete-time system and the sam-
pling rate.
In the special case of discrete-time signal
Sampling
process processing with a unit-gain algorithm, and negli-
gible time delay (i.e., y(k) = x(k)), the combined
Fig. 2.27 Discrete-time processing action of the A/D converter, the computer, and the
of continuous-time signals D/A converter can be described as a system that
Signal Processing in Digital Control 71
samples the analog signal and produces
S/H another analog signal that is constant over
x a ( t) ya (t) the sampling periods. Such a system is
called a sample-and-hold (S/H). Input-out-
put behaviour of a S/H system is described
diagrammatically in Fig. 2.28. In the follow-
ing, we develop an idealized model for S/H
systems.
t t S/H operations require modelling of two
Fig. 2.28 Input-output behaviour of a sample-and-
hold system processes:
(i) extracting the samples, and (ii) holding the result fixed for one period.
The impulse modulator effectively extracts the samples in the form of x(k)d (t – kT). The remaining
problem is to construct a linear time-invariant system which will convert this impulse into a pulse of height
x(k) and width T. The S/H may therefore be modelled by Fig. 2.29a, wherein the ZOH is a system whose
response to a unit-impulse d (t) is a unit-pulse gh0(t) of width T. The Laplace transform of the impulse
response gh0(t) is the transfer function of the hold operation, namely
¥ T
1 - e - sT
Gh0(s) = L –1[gh0(t)] = z
0
gh0(t) e–st dt = z
0
e -st dt =
s
(2.79)
Figure 2.29b is a block diagram representation of the transfer function model of the S/H operation.
T
xa(t) x*(t) y a( t )
ZOH
d ( t) gh0(t)
1 1
t 0 T t
(a)
T
X a( s ) 1 – e–sT Y a(s)
G h0(s) =
s
X *(s) = x (k) e–skT
k=0
(b)
Fig. 2.29 A model of a sample-and-hold operation
Practical Sample-and-Hold Circuit In a majority of practical digital operations, S/H functions are
performed by a single S/H device. It consists of a capacitor, an electronic switch, and operational amplifiers
(Fig. 2.30). Op amps are needed for isolation; the capacitor and switch cannot be connected directly to
analog circuitry because of the capacitor’s effect on the driving waveform.
72 Digital Control and State Variable Methods
–
–
+ VOUT
VIN + Hold
capacitor
Control
logic
Sample/hold
pulse
Fig. 2.30 A sample-and-hold device
Since the voltage between the inverting and non-inverting inputs of an op amp is in microvolts, we can
approximate this voltage to zero. This implies that the voltage from the inverting input (– input) to ground in
Fig. 2.30 is approximately VIN; therefore the output of first op amp is approximately VIN.
When the switch is closed, the capacitor rapidly charges to VIN , and VOUT is equal to VIN approximately.
When the switch opens, the capacitor retains its charge; the output holds at a value of VIN.
If the input voltage changes rapidly while the switch is closed, the capacitor can follow this voltage
because the charging time-constant is very short. If the switch is suddenly opened, the capacitor voltage
represents a sample of the input voltage at the instant the switch was opened. The capacitor then holds this
sample until the switch is again closed and a new sample taken.
As an illustration of the application of a sampler/
ZOH circuit, consider the A/D conversion system of
Fig. 2.31. The two subsystems in this figure corre-
xa (t) S/H A/D x (k) spond to systems that are available as physical
device Converter devices. The A/D converter converts a voltage (or
current) amplitude at its input into a binary code
Fig. 2.31 Physical configuration for A/D representing a quantized amplitude value closest to
conversion the amplitude of the input. However, the conversion
is not instantaneous. Input signal variation during
the conversion time of A/D converter (typical conversion times of commercial A/D units range from
100 nsec to 200 m sec), can lead to erroneous results. For this reason, a high performance A/D conversion
system includes a S/H device as in Fig. 2.31.
Although a S/H is available commercially as one unit, it is advantageous to treat the sampling and holding
operations separately for analytical purposes, as has been done in the S/H model of Fig. 2.29b. This model
gives the defining equation of the sampling process and the transfer function of the ZOH. It may be empha-
sized here that X*(s) is not present in the physical system but appears in the mathematical model; the sampler
in Fig. 2.29 does not model a physical sampler and the block does not model a physical data hold. However,
the combination does accurately model a sampler/ZOH device.
We can get further insight into the process of sampling by relating the spectrum of the continuous-time
signal to that of discrete-time sequence that is obtained by sampling.
Let us define the continuous-time signal by xa(t). Its spectrum is then given by Xa(jw), where w is the
frequency in radians per second. The sequence x(k) with value x(k) = xa(kT) is derived from xa(t) by periodic
sampling. Spectrum of x(k) is given by X(ejW) where the frequency W has units of radians per sample interval.
Signal Processing in Digital Control 73
st
The Laplace transform expresses an analog signal xa (t) as a continuous sum of exponemtials e ; s =
s + jw. The Fourier transform expresses xa(t) as a continuous sum of exponentrals ejwt. Similarly z-transform
expresses a sequence x(k) as a discrete sum of phasors z–k ; z = re jW. Fourier transform expresses x(k) as a
discrete sum of exponentials ejWk [31].
The Fourier transforms of xa(t) and x (k) are, respectively,
¥
Xa(jw) = z
-¥
xa(t) e –jw t dt (2.80)
¥
X(ejW) = å x(k) e –jWk (2.81)
k =-¥
We use the intermediate function x*(t)—the impulse modulated xa(t)—to establish a relation between Xa( jw)
and X(e jW ).
The Fourier transform of x*(t), denoted by X*(jw) is (refer Eqn. (2.30)) given by
¥
¥ ¥ ¥
= å z d (t - kT) x( k ) e- jw t dt = å x(k)e –jkwT (2.82)
k =-¥ -¥ k =-¥
(The summation over the interval – ¥ to ¥ is allowed, since x(k) = 0 for k < 0). We have arrived at our first
intermediate result. By comparing Eqn. (2.82) with Eqn. (2.81), we observe that
X(e jW )= X * ( jw ) W (2.83a)
w =
T
X(e jW ) is thus a frequency-scaled version of X*(jw) with the frequency scaling specified by
W = wT (2.83b)
*
We now determine X ( jw) in terms of the continuous-time spectrum Xa(jw). From Eqn. (2.30), we have
¥ ¥ ¥
x*(t) = å x(k) d (t – kT) = å xa(t) d (t – kT) = xa(t) å d (t – kT)
k =0 k =0 k =0
The summation over the interval – ¥ to ¥ is allowed since xa (t) = 0 for t < 0. Therefore,
¥
x*(t) = xa(t) å d (t – kT)
k =-¥
A non-sinusoidal periodic signal y(t) of period T0 can be expanded through the Fourier series [31]:
∞
y(t) = ∑ cn e jnω t ; 0
w0 = 2p /T0
n= –∞
T0 / 2
1
cn =
T0 z
- T0 / 2
y(t ) e – jnw 0 t dt
¥
Since å d (t – kT ) is a periodic function of period T, it can be expressed in terms of the following Fourier
k =-¥
series expansion.
74 Digital Control and State Variable Methods
¥ ¥ j
2p n t
å d(t – kT) = å cn e T
k =-¥ n=-¥
where
1
T /2 é ¥ ù - j 2p n t
cn = ò ê å d (t - kT ) ú e T dt
T - T /2 ëê k = -¥ ûú
T /2 2p nt
1 -j 1 - j0 1
=
T z
- T /2
d (t )e T dt =
T
e =
T
for all n
Substituting this Fourier series expansion into the impulse modulation process, we get
¥
x*(t) = xa(t) å d (t – kT)
k =-¥
¥ 2p nt
1 ¥ 2p nt
1
å a
j j
= xa(t)
T
å e T =
T n=-¥
x (t) e T
n=-¥
1 ¥ LM ¥ FG -j w -
2p n
t
IJ O
*
X ( jw) = å
T n=-¥ MN z x (t)e
H
a
T K dt P
PQ
-¥
¥
=
1 F 2p n I
å X GH jw - j T JK
a (2.84a)
T n=-¥
¥
X(e jW ) = X * j
F WI = 1 å Xa j
FG W
- j
2p k IJ (2.85b)
H TK T k =-¥
H T T K
Signal Processing in Digital Control 75
2.11.1 Aliasing
While sampling a continuous-time signal xa(t) to produce the sequence x(k) with values x(k) = xa(kT), we
want to ensure that all the information in the original signal is retained in the samples. There will be no
information loss if we can exactly recover the continuous-time signal from the samples. To determine the
condition under which there is no information loss, let us consider xa(t) to be a bandlimited signal with
maximum frequency wm, i.e.,
Xa(jw) = 0 for |w | > w m (2.86)
as shown in Fig. 2.32a. Figure 2.32b shows a plot of X*(jw) under the condition
ws p
= > wm (2.87a)
2 T
Figure 2.32c shows the plot of X(e jW ), which is derived from Fig. 2.32b by simply scaling the frequency axis.
Figure 2.34a shows a recording of the temperature in a thermal process. From this recording we observe that
there is an oscillation in temperature with a period of two minutes.
The sampled recording of the temperature obtained by measurement of temperature after every 1.8 min-
utes is shown in Fig. 2.34b. From the sampled recording, one might believe that there is an oscillation with
a period of 18 minutes. There seems to be loss of information because of the process of sampling.
The sampling frequency is ws = 2p /1.8 = p/0.9 rad/min, and the frequency of temperature oscillation is
w 0 = 2p /2 = p rad/min. Since w 0 is greater than ws/2, it does not lie in the passband of a lowpass filter with
a cut-off frequency ws/2. However, the frequency w 0 is ‘folded in’ at w s – w 0 = p /9 rad/min which lies in the
passband of the lowpass filter. The reconstructed signal has therefore a period of 18 minutes, which is the
period of the sampled recording.
Signal Processing in Digital Control 77
Digital control systems usually require the transformation of discrete-time sequences into analog signals. In
such cases, we are faced with the converse problem from that of sampling xa(t) to obtain x(k). The relevant
question now becomes—how can xa(t) be recovered from its samples.
We begin by considering the unaliased spectrum of X*(jw) shown in Fig. 2.32b. Xa(jw) has the same form
-p p
as X*(jw) over £ w £ . Xa(jw) can be recovered from X*( jw) by a lowpass filter.
T T
Ideal Lowpass Filter Consider the ideal lowpass filter shown in Fig. 2.33. It is characterized by G(jw)
defined below:
LMT for
–p
£w £
p
G(jw) = T T (2.88)
MN 0 otherwise
Note that the ideal filter given by Eqn. (2.88) has a zero phase characteristic. This phase characteristic stems
from our requirement that any signal whose frequency components are totally within the passband of the
filter, be passed undistorted.
We will need the following basic mathemical background in this section [31].
78 Digital Control and State Variable Methods
The Fourier transform pair:
∞
F [ y(t)] = Y( jw) =
Δ
z
–∞
y(t )e – jω t dt
∞
Δ 1
–1
F [ Y( jw)] = y(t) =
2π –∞
z Y ( jω )e jω t dω
Shifting Theorem:
F
LM yF t – T I OP = e – jwT/2
Y( jw)
N H 2KQ
The impulse response of the ideal lowpass filter is given by inverse Fourier transformation.
¥ p /T
1 1
g(t) =
2p z
-¥
G( jw) e jw t dw =
2p z
-p / T
Te jw t dw
T sin p t / T
= (e jp t / T - e - jp t / T ) = (2.89)
j 2p t pt/T
Figure 2.35 shows a plot of g(t) versus t. Notice that the response extends from t = – ∞ to t = ∞ . This
implies that there is a response for t < 0 to a unit impulse applied at t = 0 (i.e., the time response that begins
before an input is applied). This cannot be true in the physical world. Hence, such an ideal filter is physically
unrealizable.
g (t)
– 3T –T 0 T 3T t
Fig. 2.35 Impulse response of an ideal lowpass filter
Zero-order hold We consider polynomial holds as an approximation to the ideal lowpass filter. The ZOH
was considered in Section 2.10, and its transfer function was derived to be (Eqn. (2.79))
1 - e - sT
Gh0(s) =
s
Its frequency response is consequently given by
1 - e - jwT e - jwT / 2 (e jwT / 2 - e - jwT / 2 )
Gh0( jw) = =
jw jw
sin (wT / 2) - jwT / 2
= T e (2.90)
wT / 2
sin (wT / 2 )
Plot of versus w will be of the form shown in Fig. 2.35 with sign reversals at w =
wT / 2
2p 4p
, , L (i.e., w = ws, 2ws, K ). The sign reversals amount to a phase shift of –180º (it can be taken as
T T
+180º as well) at w = kws; k = 1, 2, K
Signal Processing in Digital Control 79
Equation (2.90) can therefore be expressed as
Gh0( jw) = | Gh0( jw)| ∠ Gh0( jw)
where
sin(wT / 2)
|Gh0( jw)| = T (2.91a)
wT / 2
and
-wT FG IJ 2p k
∠ Gh0( jw) = - 180º at w = ; k = 1, 2, ... (2.91b)
2 H K T
A plot of magnitude and phase characteristics of ZOH is shown in Fig. 2.36. The ideal lowpass filter is
shown by dashed lines in Fig. 2.36a. The phase of the ideal filter, at all frequencies, is zero.
It is obvious that the hold device does not have the ideal filter characteristics.
(i) The ZOH begins to attenuate at frequencies considerably below ws/2.
(ii) The ZOH allows high frequencies to pass through, although they are attenuated.
(iii) The factor e– jwT/2 in Eqn. (2.90) corresponds to a delay of T/2 in the time domain. This follows from
the shifting theorem of Fourier transforms. Therefore the linear phase characteristic introduces a time
delay of T/2. When ZOH is used in a feedback system, the lag characteristic of the device degrades
the degree of system stability.
|G h0( j w)|
(a) 0.637 T
0
ws ws 2ws 3ws w
2
G h0( j w)
ws 2ws 3ws w
0
–p
– 2p
(b) – 3p
– 4p
– 5p
Fig. 2.36 ZOH device (a) Gain, and (b) Phase characteristics
80 Digital Control and State Variable Methods
The higher-order holds, which are more sophisticated and which better approximate the ideal filter, are
more complex and have more time delay than the ZOH. As the additional time delay in feedback control
systems decreases the stability margin or even causes instability, higher-order holds are rarely justified in
terms of improved performance, and therefore the zero-order hold is widely used in practice.
Anti-aliasing Filter In practice, signals in control systems have frequency spectra consisting of low-
frequency components as well as high-frequency noise components. Recall that all signals with frequency
higher than ws/2 appear as signals of frequencies between 0 and ws/2 due to the aliasing effect. Therefore,
high-frequency noise will be folded in and will corrupt the low-frequency signal containing the desired
information.
To avoid aliasing, we must either choose the sampling frequency high enough (ws > 2wm, where wm is the
highest-frequency component present in the signal) or use an analog filter ahead of sampler (refer Fig. 2.2)
to reshape the frequency spectrum of the signal (so that the frequency spectrum for w > (1/2)ws is negli-
gible), before the signal is sampled. Sampling at very high frequencies introduces numerical errors. Anti-
aliasing filters are therefore, useful for digital control applications.
The synthesis of analog filters is now a very mature subject area. Extensive sets of tables exist, which
give, not only the frequency and phase response of many analog prototypes, but also the element values
necessary to realize those prototypes. Many of the design procedures for digital filters, have been developed
in ways that allow this wide body of analog filter knowledge, to be utilized effectively.
Every time a digital control algorithm is designed, a suitable sampling interval must be chosen. Choosing a
long sampling interval reduces both the computational load and the need for rapid A/D conversion, and
hence the hardware cost of the project.
However, as the sampling interval is increased, a number of potentially degrading effects start to become
significant. For a particular application, one or more of these degrading effects set the upper limit for the
sampling interval. The process dynamics, the type of algorithm, the control requirement and the characteris-
tics of input and noise signals, all interact to set the maximum usable value for T.
There is also a lower limit for the sampling interval. Digital hardware dictates the minimum usable value
for T.
We will discuss some of the factors which limit the choice of sampling interval. Some empirical rules for
the selection of sampling interval are also reported.
Most of the industrial processes that we are called upon to control are continuous-time processes. Math-
ematical models of continuous-time processes are usually based around differential equations or, equiva-
lently, around transfer functions in the operator s. A very extensive range of well-tried methods for control
system analysis and design are in the continuous-time form.
To move from the continuous-time form to the discrete-time form requires some mechanism for time
discretization (we shall refer to this mechanism simply as discretization). In this section, principles and
various methods of discretization will be presented. An understanding of various possible approaches helps
the formation of a good theoretical foundation for the analysis and design of digital control systems.
The main point is to be aware of the significant features of discretization and to have a rough quantitative
understanding of the errors that are likely to be introduced by various methods. We will shortly see that none
of the discretization methods preserves the characteristics of the continuous-time system exactly.
The specific problem of this section is: given a transfer function G(s), what discrete-time transfer function
will have approximately the same characteristics?
We present four methods for solution of this problem.
(i) Impulse-invariant discretization
(ii) Step-invariant discretization
(iii) Discretization based on finite-difference approximation of derivatives
(iv) Discretization based on bilinear transformation
1 ¥ F W 2 p kI
G(e jW ) =
T k =-¥
a å G GH j T - j T JK (2.93b)
w, in radians/second, is the physical frequency of the continuous-time function and W = wT, in radians, is the
observed frequency in its samples.
Thus, for a discrete-time system obtained from a continuous-time system through impulse invariance, the
discrete-time frequency response G(e jW ) is related to the continuous-time frequency response Ga( jw)
through replication of the continuous-time frequency response and linear scaling in amplitude and fre-
quency. If Ga( jw) is bandlimited and T is chosen so that aliasing is avoided, the discrete-time frequency
response is then identical to continuous-time frequency response, except for linear scaling in amplitude and
frequency.
Let us explore further the properties of impulse invariance. Applying the Laplace transform to
Eqn. (2.92), we obtain (refer Eqn. (2.32b))
¥
G*(s) = å g(k) e–skT (2.94a)
k =0
On the other hand, the z-transform of g (k) is, by definition,
¥
G(z) = å g(k) z – k (2.94b)
k =0
Comparing Eqns (2.94a) and (2.94b), it follows that
G( z) = G*(s) (2.95a)
z = e sT
Rewriting Eqn. (2.93a) in terms of the general transform variable s, gives a relationship between G*(s) and
Ga(s):
1 ∞ 2π k F I
G*(s) = ∑ Ga s − T
T k=−∞ H K (2.95b)
∞
1 F 2π k I
Therefore, G( z) =
T
∑ Ga s −
H T K (2.95c)
z=e sT
k=−∞
We note that impulse invariance corresponds to a transformation between G*(s) and G(z) represented by
the mapping
z = e sT= e (s ± jw)T = esT ∠ ± wT (2.96)
between the s-plane and the z-plane.
In the following, we investigate in more detail the mapping z = est. We begin by letting ga(t) = e–atm(t);
a > 0. The Laplace transform of this function is
1
Ga ( s) = (2.97a)
s+a
The starred transformation is (refer Eqn. (2.32b))
¥
e sT
G*(s) = å e - akT e - kTs = (2.97b)
k =0 e sT
- e - at
84 Digital Control and State Variable Methods
Under the mapping z = est, G*(s) is mapped into the z-transform
z
G ( z) = (2.97c)
z - e - aT
The function Ga(s) has a pole at s = – a. The poles of G*(s) are at s = – a ± j2mp / T; m = 0, 1, 2, .... Thus
G*(s) has a countably infinite number of poles, one of which is the pole of Ga(s) at s = – a, as shown in
Fig. 2.37a. We see that the poles of G*(s) consist of a pole of Ga(s) and copies of this pole, repeated at
intervals of 2p/T. The same would be true for any other function whose Laplace transform exists. The poles
of the Laplace transform will lie in a strip of width 2p/T centered on the real axis of the s-plane. This strip
is called the primary strip. These poles are then repeated in complementary strips, above and below the
primary strip (refer Fig. 2.37a).
Im (s)
5p/T
Im (z)
4p /T
Unit
3p /T circle
2p /T
p /T
Primary
Re (s)
strip –a Re (z)
–p /T
– 2p /T
– 3p /T
– 4p /T
– 5p /T
(b)
(a)
Fig. 2.37 Mapping primary strip to the z-plane
Suppose we map the primary strip of the s-plane into the z-plane. We begin by mapping the points of a
vertical line s = s + jw, where s < 0 is fixed. Under the mapping z = est, a point on this line maps to
z = e (σ + jω ) T = eσT e jωT
The term es T is a real number that can be thought of as a scaling factor for the unit phasor e jwT .
-p p
If £ w £ , and s is fixed with s < 0, then the mapping is a circle with radius less than one. If s = 0,
T T
the line segment, maps onto the unit circle. For clarity, the circles in Fig. 2.37b have been divided into
dashed and solid portions; the solid portions correspond to mapping for 0 £ w £ p /T and the dashed
p
portions correspond to mapping for - £ w £ 0 .
T
Signal Processing in Digital Control 85
The following points are worth noting at this juncture.
(i) The left half of the primary strip in the s-plane maps onto the interior of the unit circle, in the z-plane.
(ii) The imaginary axis between –jp /T and jp /T, associated with primary strip in the s-plane, maps onto
the unit circle in the z-plane.
(iii) The right half of the primary strip, in the s-plane, maps onto the region, exterior to the unit circle, in the
z-plane.
(iv) The same pattern holds for each of the complimentary strips.
The fourth point needs further discussion. We consider
g a ( t ) = cos(w t )
The corresponding Laplace transform is
s s
Ga ( s) = =
s2 + w 2 ( s - jw )( s + jw )
and the z-transform is
z ( z - cos wT )
G( z) = ( z - e jwT )( z - e - jwT )
The s-plane poles: s = jw and s = – jw, in the primary strip are mapped to the z-plane poles: z = e jw T and
z = e – jwT, respectively. However, these z-plane poles are also maps of s-plane poles: s = jw + 2p / T and
s = – jw + 2p / T; s = jw –2p /T and s = – jw – 2p / T; s = jw + 4p / T and s = –jw + 4p / T; s = jw – 4p /T and
s = – jw – 4p / T;..., in the complimentary strips. The z-plane poles: z = ejwT and z = e – jwT, cannot distinguish
the poles in the primary strip from the poles in the complimentary strips. Thus the largest frequency we can
distinguish is w = p/T, which is half of the sampling frequency 2p/T.
While sampling a continuous-time signal to produce the discrete-time sequence, we want to ensure that
all the information in the original signal is retained in the samples. There will be no information loss if we
can exactly recover the continous-time signal from the samples. To determine the condition under which
there is no information loss, let us consider the continous-time signal to be band-limited signal with maxi-
mum frequency wm. From Fig. 2.37, we observe that there is no information loss if
p
< wm
T
This, in fact, is the sampling theorem.
In summary, the use of impulse invariance corresponds to converting the continuous-time impulse
response to a discrete-time impulse response through sampling. To avoid aliasing, the procedure is restricted
to transforming band-limited frequency responses. Except for aliasing, the discrete-time frequency response
is a replication of the continuous-time frequency response, linearly scaled in amplitude and frequency.
Although useful for discretizing band-limited analog systems, the impulse-invariance method is unsuc-
cessful for discretizing transfer functions Ga(s) for which |Ga( jw)| does not approach zero for large w. In
these cases, an appropriate sampling rate cannot be found to prevent aliasing.
To overcome the problem of aliasing, we need a method in which the entire jw-axis in the s-plane, maps
uniquely onto the unit circle in the z-plane. This is accomplished by the bilinear transformation method,
described later in this section.
For a given analog system Ga(s), the impluse-invariant discrete-time system is obtained following the
procedure given below:
(i) Obtain the impulse response
ga(t) = L –1[Ga(s)]
86 Digital Control and State Variable Methods
(ii) Select a suitable sampling interval and derive samples g(k) from ga(t),
g(k) = ga (t ) t = kT
(iii) Obtain z-transform of the sequence g(k)
G(z) = Z [g(k)]
The three steps given above can be represented by the following relationship:
G(z) = Z [ L –1[Ga(s)] t = kT ] (2.98a)
This z-transform operation is commonly indicated as
G(z) = Z [Ga(s)] (2.98b)
Single factor building blocks of the Laplace and z-transform pairs are given in Table 2.1. Expanding any
Ga(s) into partial fractions, G(z) can be found by use of this table.
Example 2.14 With the background on analog design methods, the reader will appreciate the value of
being able to correlate particular patterns in the s-plane with particular features of system behaviour. Some of
the useful s-plane patterns, which have been used in analog design, are the loci of points in the s-plane with (i)
constant damping ratio z, and (ii) constant undamped natural frequency wn. In this example, we translate these
patterns in the primary strip of the s-plane onto z-plane using the basic relation z = e sT, where T is some chosen
sampling period.
Consider a second-order system with transfer function
K
Ga(s) = 2
s + 2zw n s + w n2
where z = damping ratio, and wn = undamped natural frequency.
The characteristic root locations in the s-plane are
2
s1, s2 = – z wn ± jwn 1 - z = – zw n ± jw d
Figure 2.38a shows a locus of the characteristic roots, with z held constant and wn varying. Figure 2.38b
shows a locus with wn held constant and z varying. The loci in Figs 2.38a and 2.38b, correspond to an
underdamped second-order system.
Define the sampling frequency by
w s = 2p /T
Corresponding to each point s = s + jw in the primary strip of the s-plane, there is a point
z = exp [(s + jw)2p /ws]
in the z-plane.
(i) Mapping of constant damping ratio loci
A point on the constant-z line in the second quadrant (Fig. 2.38a), can be expressed as
2
s = s + jwd = – zwn + jwn 1 - z
zw n zw n z
Since cot q = = = ,
wd wn 1 - z2 1 - z2
the s-plane point may be described by the relation
s = – wd cotq + jwd
The z-plane relation becomes
z = exp [(– wd cot q + jw d) 2p /ws] = exp [((– 2p cotq)/ws) w d] exp [j(2p/ws) wd]
where wd varies from 0 to ws/2.
Signal Processing in Digital Control 87
As per this equation, for a constant value of z (and hence cotq ), z is a function of wd only. The constant
damping ratio line in the s-plane maps into the z-plane as a logarithmic spiral (except for q = 0º and q = 90º).
The portion of z-line between wd = 0 and wd = ws /2 corresponds to one-half revolution of the logarithmic
spiral in the z-plane. Mapping of one representative constant-z line is shown in Fig. 2.38c.
jw jw
w
j p = j s
T 2 jwn
Constant- z
locus jwd jwd
q
– zwn s – zwn s
Constant-wn
locus
(a)
(b)
Im Im
Constant-z
wd = p / 2T locus (z = 0.6)
wd = 0
Re Re
1 1
wd = p / T
Constant-wn locus
(wn = 6p /10T)
(c) (d)
Fig. 2.38 Mapping of constant-z, and constant-wn loci from the s-plane to the z -plane
(ii) Mapping of constant undamped natural frequency loci
A point on the constant-wn locus in the second quadrant (Fig. 2.38b), can be expressed as
s = s + jwd = – zwn + jwd
It lies on the circle given by
s 2 + ω 2d = ω 2n
For points in the second quadrant,
s = – ω 2n − ω 2d
The locus of constant -wn in the z-plane is given by the relation
z= e
e− j
ω 2n −ω 2d + jω d T
y(t) = L –1
Ga ( s) RS UV
s T W
Output samples of the discrete-time system are defined to be
y(kT) = L –1 a
G ( s) RS UV
s T
t = kT W
The z-transform of this quantity yields the z-domain output of the discrete-time system. This gives
LM R G (s) U OP
Y(z) = Z L −1
MN ST s VW PQ
a
(2.99a)
t = kT
z
Since Z [m(k)] = , where m(k) is the unit-step sequence, the output y(k) of the discrete-time system G(z)
z −1
is given by
Y(z) = G(z) { z −z 1} (2.99b)
MN S| H s K a
V|P (2.100a)
T t = kT WQ
G(z) = (1 – z–1
L F G ( s) IJ OP
) MZ G a
or
N H s KQ (2.100b)
G(z) = Z
LM1 - e - sT
Ga ( s)
OP (2.100c)
This can easily be established.
N s Q
Let L –1
LM G ( s) OP = g (t), and Z [g (kT)] = G (z)
a
N s Q 1 1 1
LM G ( s) O
s PQ
- sT a
Then L –1 e = g (t – T ), and Z [g (kT – T)] = z –1
G1(z)
N 1 1
Signal Processing in Digital Control 89
Therefore,
Z
LM G ( s) - e
a - sT OP
Ga ( s)
= (1 – z–1) Z
LM
Ga ( s) OP
N s s Q s N Q
This establishes the equivalence of Eqns (2.100b) and (2.100c).
The right hand side of Eqn (2.100c) can be viewed as the z-transform of the analog system Ga (s),
preceded by zero-order hold (ZOH). Introducing a fictitious sampler and ZOH for analytical purposes, we
can use the model of Fig. 2.39 to derive a step-invariant equivalent of analog systems. For obvious reasons,
step-invariant equivalence is also referred to as ZOH equivalence. In the next chapter, we will use the ZOH
equivalence to obtain discrete-time equivalents of the plants of feedback control systems.
T
x(t) x*(t) y (t)
1 – e– sT Ga(s)
s
Equivalent discrete-time systems obtained by the step-invariance method, may exhibit the frequency fold-
ing phenomena and may, therefore, present the same kind of aliasing errors as found in impulse-invariance
method. Notice, however, that the presence of 1/s term in Ga (s)/s causes high-frequency attenuation. Conse-
quently, the equivalent discrete-time system obtained by the step-invariance method, will exhibit smaller
aliasing errors than that obtained by the impulse-invariance method.
As for stability, the equivalent discrete-time system obtained by the step-invariance method is stable if
the original continuous-time system is a stable one (refer Review Example 6.2).
Example 2.15 Figure 2.40 shows the model of a plant driven by a D/A converter. In the following,
wederive the transfer function model relating y(kT) to r(kT).
The standard D/A converters are designed in such a way, that the old value of the input sample is held
constant until a new sample arrives. The system of Fig. 2.40 can therefore be viewed as an analog system
Ga(s), preceded by zero-order hold, and we can use ZOH equivalence to obtain the transfer function model
relating y(kT) to r(kT).
ZOH equivalent (step-invariant equivalent) of Ga (s) can be determined as follows. Since
1 0.5 (s + 4) 1 1.5 0.5
Ga ( s) = = - +
s s(s + 1) (s + 2) s s + 1 s + 2
we have (refer Table 2.1)
Z
LM1 G (s)OP = z - 1.5z +
0.5z
z -1
G(z) =
z LM
-
1.5z
+
0.5z OP = 1 − 1.5( z − 1) + 0.5( z − 1)
z N
z - 1 z - e -T z - e -2 T Q z−e −T
z−e −2 T
1 - z -1 1
Therefore, s= ;z= (2.104)
T 1 - sT
is a mapping from the s-plane to the z-plane when the backward-difference method is used to discretize
Eqn. (2.101).
Signal Processing in Digital Control 91
The stability region in the s-plane can be mapped by Eqn. (2.104) into the z-plane as follows. Noting that
the stable region in the s-plane is given by Re(s) < 0, the stability region in the z-plane under the mapping
(2.104), becomes
F 1 - z -1I FG IJ
z-1
Re GH T JK
= Re
H K
Tz
<0
Writing the complex variable z as a + jb, we may write the last inequality as
Re G
F a + jb - 1IJ < 0
H a + jb K
or
L (a + jb - 1) aa - jb f OP = Re LMa - a + b + jb OP = a - a + b
Re M
2 2 2 2
<0
N 2
a + b 2
Q N a +b Q a +b 2 2 2 2
Unit circle
Re
s
s-plane z-plane
(a)
jw s-plane
jws/2
ja
ja
s
(b)
Fig. 2.41 (a) Mapping of the s-plane to the z-plane using backward difference approximation of
the derivative (b) Warping effect
The right-hand sides of Eqns (2.107a) and (2.107 b) become identical if we let
z -1
s= (2.108)
T
We may consider Eqn. (2.108) to be the mapping from the s-plane to the z-plane, when the forward-
difference method is used to discretize Eqn. (2.101).
One serious problem with the forward-difference approximation method is regarding stability. The left
hand side of the s-plane is mapped into the region Re FH
z −1 IK
< 0 or Re (z) < 1. This mapping shows that the
T
poles of the left half of the s-plane, may be mapped outside the unit circle in z-plane. Hence the discrete-time
system obtained by this method may become unstable.
Rectangular rules for integration Consider the continuous-time system (2.101):
y& (t) = – ay(t) + r(t) (2.109a)
t t
or y(t) = y(0) – a z
0
y (t ) d t + z
0
r (t ) dt (2.109b)
Signal Processing in Digital Control 93
In numerical analysis, the procedure known as the rectangular rule for integration proceeds by approxi-
mating the continuous-time function by continuous rectangles, as illustrated in Fig. 2.42, and then adding
their areas to compute the total integral. We thus approximate the area as given below:
(i) Forward rectangular rule for integration
kT
z
( k −1)T
y(t ) dt ≅ [y(k – 1)]T (2.110a)
z y ( t ) dt ≅ [y(k)]T
( k - 1) T
(2.110b)
With the forward rule for integration, the continuous-time system (2.109) is converted to the following
recursive algorithm:
y(k) = y(k – 1) – aTy(k – 1) + Tr (k – 1)
The z-transformation of this equation gives
Y(z) = z–1 Y(z) – aT z–1 Y(z) + T z–1 R(z)
y (t)
y (t)
0 T 2T 3T t 0 T 2T 3T t
(a) (b)
Fig. 2.42 (a) Forward rectangular rule, and (b) backward rectangular rule for integral approximation
Y ( z) 1
or =
R( z ) z-1
+a
T
Laplace transformation of Eqn. (2.109a) gives the transfer function of the continuous-time system:
Y ( s) 1
=
R( s) s+a
The forward rectangular rule for integration thus results in the s-plane to z-plane mapping:
z -1
s=
T
which is same as the one obtained by forward-difference approximation of derivatives (Eqn. (2.108)).
Similarly, it can easily be established that the backward rectangular rule for integration results in s-plane
to z-plane mapping, which is same as the one obtained by backward-difference approximation of derivatives
(Eqn. (2.104)).
94 Digital Control and State Variable Methods
Example 2.16 The simplest formula for the PID or three-mode controller is the addition of the proportional,
integral, and derivative modes:
LM t OP
u(t) = Kc e( t ) +
MN
1
TI z
0
e( t ) dt + TD
de( t )
dt PQ
(2.111)
where
u = controller output signal TI = integral or reset time
e = error (controller input) signal TD = derivative or rate time
K = controller gain
For the digital realization of the PID controller, it is necessary to approximate each mode in Eqn. (2.111)
using the sampled values of e(t).
The proportional mode requires no approximation since it is a purely static part:
uP (k) = Kc e(k)
The integral mode may be approximated by the backward rectangular rule for integration. If S(k – 1)
approximates the area under the e(t) curve up to t = (k – 1)T, then the approximation to the area under the e(t)
curve up to t = kT is given by (refer Eqn. (2.110b))
S(k) = S(k – 1) + Te (k)
A digital realization of the integral mode of control is as follows:
K
uI (k) = c S(k)
TI
where S(k) = sum of the areas under the error curve = S(k – 1) + Te(k)
The derivative mode may be approximated by the backward-difference approximation:
de(t ) e( k ) - e( k - 1)
=
dt t = kT T
K T
Therefore, uD(k) = c D [e(k) – e(k – 1)]
T
Bringing all the three modes together, results in the following PID algorithm:
u(k) = uP(k) + uI(k) + uD(k)
LM
= Kc e ( k ) +
1 T
S(k ) + D [e(k ) − e(k − 1)]
OP (2.112a)
N TI T Q
where S(k) = S(k – 1) + Te(k) (2.112b)
We can directly use the s-plane to z-plane mapping given by Eqn. (2.104) to obtain the discrete equivalent
(2.112) of the PID controller (2.111).
The PID controller (2.111), expressed in terms of operator s, is given by the input-output relation
LM
U(s) = Kc 1 +
1 OP
+ TD s E(s) (2.113a)
N TI s Q
The mapping (2.104):
1 - z -1
s=
T
corresponds to backward-difference approximation of derivatives. This mapping transforms Eqn. (2.113a)
to the following system.
Signal Processing in Digital Control 95
LM
U(z) = Kc 1 +
T FG1 T IJ
+ D (1 - z -1 ) E(z)
OP
N H
TI 1 - z -1 T K (2.113b)
Q
This is the input-output relation of the PID controller in terms of operator z. By the inverse transform
operation, we can express individual control modes by difference equations:
(i) uP(k) = Kc e(k)
K T
(ii) uI(k) – uI(k – 1) = c e(k)
TI
K T K
or uI(k) = uI(k – 1) + c e(k) = c S(k)
TI TI
where S(k) = S(k – 1) + T e(k)
K T
(iii) uD(k) = c D [e(k) – e(k – 1)]
T
Bringing all the three modes together results in the PID algorithm given by Eqns (2.112).
s=
2 z-1 FG IJ (2.114)
T z+1 H K
This transformation is invertible with the inverse mapping given by
1 + (T / 2) s
z= (2.115)
1 - (T / 2) s
The bilinear transformation also arises from a particular approximation method—the trapezoidal rule for
numerically integrating differential equations.
Let us consider a continuous-time system for which the describing equation is (Eqn. (2.101))
y& (t) = – ay(t) + r(t) (2.116a)
z z
t t
or y(t) = y(0) – a y(τ ) dτ + r (τ ) dτ (2.116b)
0 0
Laplace transformation of Eqn. (2.116a) gives the transfer function of the continuous-time system.
Y (s) 1
= Ga(s) =
R( s ) s+a
Applying bilinear transformation (Eqn. (2.114)) to this transfer function, we obtain
1
G(z) =
F
2 z -1 I
H
T z +1
+a
K
8
The transformation is called bilinear from consideration of its mathematical form.
96 Digital Control and State Variable Methods
z
kT
1
y(t )dt by [y(k) + y(k – 1)]T
2
( k -1) T
With this approximation, Eqn. (2.116b) can be converted to the
0 T 2T 3T t following recursive algorithm:
Fig. 2.43 Trapezoidal rule for
aT T
integral approximation y(k) = y(k – 1) – [y(k) + y(k – 1)] + [r(k) + r(k – 1)]
2 2
The z-transformation of this equation gives
aT T
Y(z) = z–1 Y(z) – [Y(z) + z–1 Y(z)] + [R(z) + z–1 R(z)]
2 2
T
(1 + z -1 )
Y(z) 2 1
or = =
R( z ) (1 - z ) +
- 1 aT -
(1 + z )1 2 z - 1 F I
2 T z +1
+a
H K
This result is identical to the one obtained from the transfer function of the continuous-time system by
bilinear transformation.
The nature of bilinear transformation is best understood from Fig. 2.44, which shows how the s-plane is
mapped onto the z-plane. As seen in the figure, the entire jw-axis in the s-plane, is mapped onto the unit
circle in the z-plane. The left half of s-plane is mapped inside the unit circle in the z-plane, and the right half
of s-plane is mapped outside the z-plane unit circle. These properties can easily be established. Consider, for
example, the left half of s-plane defined by Re (s) < 0. By means of Eqn. (2.114), this region of s-plane is
mapped into the z-plane region defined by
Re
s
s-plane z-plane
Fig. 2.44 Mapping of the s-plane to the z-plane using bilinear transformation
Signal Processing in Digital Control 97
By taking the complex variable z = a + jb, this inequality becomes
Re FH z − 1IK = Re FG α + jβ − 1IJ = Re LM (α − 1 + jβ ) (α + 1 − jβ ) OP
z +1 H α + jβ + 1K N (α + 1 + jβ ) (α + 1 − jβ ) Q
= Re M
L α − 1 + β + j 2 β OP < 0
2 2
N (α + 1) + β Q 2 2
which is equivalent to
a2 – 1 + b2 < 0 or a2 + b2 < 12
which corresponds to the inside of the unit circle in z-plane. The bilinear transformation thus produces a
stable discrete-time system for a stable continuous-time system.
Since the entire jw-axis of the s-plane is mapped once and only once onto the unit circle in the z-plane, the
aliasing errors inherent with impulse-invariant transformations are eliminated. However, there is again a
warping penalty.
Consider a pole in z-plane at z = ejaT, shown in Fig. 2.45c. Its inverse mapping in the s-plane using the
transformation s = ln z/T, gives s = ja (shown in Fig. 2.45a). Inverse mapping of the z-plane pole (Fig. 2.45b)
1 z -1
at z = ejaT, to the s-plane obtained using the bilinear transformation s = , is also shown in Fig. 2.45a:
T z +1
s=2z–1
Tz–1
Im (s) Approximate map
Im (z)
p /T
j 2 tan aT aT rad
T 2
Re(z)
ja
|s |= 0
|s |< 2/T
|s |>2/T
(b)
–s Re(s) Im(z)
= –2/T
aT rad
Re(z)
|s |= 0
|s |< 2/T
–p/T |s |>2/T
s = ln z/T
(a) (c) Exact map
Fig. 2.45 Mapping of vertical line in the s-plane to the z-plane
98 Digital Control and State Variable Methods
2 aT
= j tan (2.117)
T 2
Equation (2.117) is a measure of the frequency distortion or warping caused by the bilinear transforma-
tion. Whereas the exact mapping gives the s-plane pole at s = ja, approximate mapping gives the pole at
2 aT aT 2p aT
s = j tan . This mapping will be correct only if << p , i.e., if w s = >> a . When < 17° ,
T 2 2 T 2
2 aT
or about 0.3 rad, then j tan @ a . This means that in frequency domain, the bilinear transformation is
T 2
good only for small values wT / 2 .
Some additional information about the nature of the bilinear mapping can be obtained, by considering the
2 2
mapping of s-plane poles s = – s + jw. Figure 2.45a shows the regions of poles with s > , and s < ;
2 T T
the vertical line through -s = - in the left half of the s-plane, maps to a closed curve inside the unit circle
T
in z-plane (Fig. 2.45b). The distortions introduced by bilinear mapping are clearly visible when we compare
this mapping with exact mapping z = esT shown in Fig. 2.45c.
Example 2.17 A method that has been frequently used by practising engineers to approximate a sampled-
data system by a continuous-time system, relies on the approximation of the sample-and-hold operation by
means of a pure time delay. Consider the sampled-data system of Fig. 2.46a. The sinusoidal steady-state
transfer function of the zero-order hold is (refer Eqn. (2.90))
sin (wT / 2) - jw T / 2
Gh0( jw) = T e
wT / 2
u(k) u*(t)
r (t) + e (k ) y (t)
D (z) Gh0(s) G (s)
T T
–
(a)
r (t) + y (t)
D (s ) e –sT/2 G (s )
–
(b)
Fig. 2.46 Discretization of analog design
The sinusoidal steady-state transfer function of the impulse-modulation model of the open-loop system is
given by (refer Eqn. (2.84a))
Signal Processing in Digital Control 99
∞
Gh0 G*(jw) =
1
∑ FH
Gh 0 jω − j
2π nIK FH
G jω − j
2π n IK
T n= −∞
T T
Since in most control systems, G( jw) has low-pass filter characteristics, we can approximate the right hand
side of the equation given above just by the n = 0 term. At low frequencies, the magnitude of
sin(wT/2)/(w T/2) is approximately unity; therefore (refer Eqn. (2.90))
Gh0G*( jw) = G( jw) e–jwT/2
This means that the sample-and-hold operation can be approximated by a pure time delay of one-half the
sampling period T. Figure 2.46b shows the continuous-time approximation of the sampled-data system.
The approximating continuous-time system can be used for the design of the discrete-time system as
illustrated by the following example.
Consider that the transfer function of the controlled process of the system shown in Fig. 2.46a is
10
G(s) =
(1 + 0.5s) (1 + 0.1s) (1 + 0.05s)
We wish to design a digital controller for the process so that the closed-loop system acquires a damping ratio
of 0.4 without loss of steady-state accuracy. We select sampling time T = 0.04 sec for the proposed digital
controller. Our approach will be to first design an analog controller D(s) for the approximating continuous
time system in Fig. 2.46b (with G(s) = 10/[(1+ 0.5s)(1 + 0.1s)(1 + 0.05s)]), that meets the given design
specifications and then discretizing D(s) to obtain the digital controller D(z).
The plant model for the design of D(s) becomes
10 e −0.02s
GP(s) =
(1 + 0.5s) (1 + 0.1s) (1 + 0.05s)
Since the design is handled more conveniently in frequency domain in the presence of time delay, we can
translate damping ratio specification into equivalent phase margin specification and then proceed. Using the
standard frequency-domain design procedure9, we obtain the following analog compensator:
0.67s + 1
D(s) =
2s + 1
The bandwidth of the compensated system is wb = 10 rad/sec. Note that the sampling rate ws = 2p/T = 157 rad/
sec is factor of 16 faster than wb; therefore our selection of T = 0.04 sec is quite ‘safe’ (refer Section 2.13).
Using the bilinear transformation given by Eqn. (2.114), we obtain
which leads to
u(k) = 0.9802 u(k – 1) + 0.3416 e(k) – 0.3218 e(k – 1) where e(k) = r(k) – y(k)
This is the proposed algorithm for the digital control system of Fig. 2.46a. To make sure that with the
proposed design, the system will behave as expected, we must analyze the system response. Methods for
analysis of digital control systems are covered in the next chapter.
9
Chapters 8–10 of reference [155].
100 Digital Control and State Variable Methods
In this section, we have presented several methods for obtaining discrete-time equivalents for continuous-
time systems. The response between sampling points is different for each discretization method used. Fur-
thermore, none of the equivalent discrete-time systems can have complete fidelity. The actual (continuous-
time) response between any two consecutive sampling points, is always different from the response between
the same two consecutive sampling points that is taking place in each equivalent discrete-time system, no
matter what method of discretization is used.
It is not possible to say which equivalent discrete-time system is best for any given analog system, since
the degree of distortions in transient response and frequency response characteristics, depends on the sam-
pling frequency, the highest frequency component involved in the system, transportation lag present in the
system, etc. It may be advisable for the designer to try a few alternate forms of the equivalent discrete-time
systems, for the given analog system.
Review Examples
Review Example 2.1 Consider a first-order discrete-time system described by the difference equation
y(k + 1) + a1 y(k) = b0 r(k + 1) + b1 r(k) (2.118)
The input is switched to the system at k = 0 (r (k) = 0 for k < 0); the initial state y(– 1) of the system is
specified. Obtain a simulation diagram for the system.
Solution State variable models of discrete-time systems can easily be translated into digital computer
simulation diagrams. Methods of conversion of difference equation models to state variable models, will be
presented in Chapter 6.
It can easily be verified that the following state variable model represents the given difference
equation (2.118):
x(k + 1) = – a1x(k) + r(k)
y(k) = (b1 – a1b0) x(k) + b0r(k) (2.119)
In terms of the specified initial condition y(–1) of the difference equation model (2.118), the initial state x(0)
of the state variable model (2.119) is given by
- a1
x(0) = y(–1)
b1 - a1b0
Note that if the first-order discrete-time system is relaxed before switching on the input r(k) at k = 0, the initial
condition y(–1) = 0 for the model (2.118), and equivalently the initial condition x(0) = 0 for the model (2.119).
Figure 2.47 shows a simulation diagram for the given discrete-time system.
b0
x(0) d (k)
+ +
r (k) + x (k) + y (k )
+ b1
+
– a1
3z - 1 -2 z 2 + 5
8 z
Therefore Y(z) = 2
R( z ) + 2
z + 14 z - 1
8 z + 1
4 z- 1
8
For (refer Example 2.10)
z
R(z) = Z [(–1)k] = ,
z +1
z(3z - 1) -2 z 2 + 58 z
Y(z) = +
dz 2
i
+ 14 z - 18 ( z + 1) z 2 + 14 z - 18
-2 z 3 + 138 z 2 - 83 z
=
b gb g
z + 12 z - 14 ( z + 1)
Expanding Y(z)/z into partial fractions,
Y(z) -2 z 2 + 138 z - 83 9 - 101 -32
5
= = 2 + +
z c hc
z + 12 z - 14 ( z + 1) z + h 1
2 z- 1
4 z +1
102 Digital Control and State Variable Methods
Then (refer Table 2.1)
⎣⎢ 5
⎦⎥
Review Example 2.3 Consider a second-order discrete-time system described by the difference equation
3 1 1
y(k + 2) – 2 y(k + 1) + 2 y(k) = r(k + 1) + 2 r(k)
The system is initially relaxed (y(k) = 0 for k < 0) and is excited by the input
r(k) =
RS0 ; k = 0
; k > 0 T1
Shifting the difference equation by two sampling intervals, we obtain
y(k) – 23 y(k – 1) + 1
2 y(k – 2) = r(k – 1) + 1
2 r(k – 2)
z-transformation of this equation gives
z -1 + 1
2 z -2 z+ 1
2
Y(z) = R(z) =
1- 3
2 z -1
+ 1
2 z -2
cz - h (z - 1) R(z)
1
2
1 k 1 k
The system modes are ch
2 and (l)k. The mode ch 2 decays as k → ∞ , and the mode (l)k is constant (i.e.,
it remains within finite bounds for all k).
The input r(k) = m(k – 1)
Therefore R(z) = z –1 LM z OP = 1
N z − 1Q z − 1
z + 12
For this input, Y(z) =
b z− 1
2 g
(z − 1)2
It is observed that excitation pole matches one of the system poles. Though the system modes, as well as
the input, do not grow with increasing k, the effect of the pole-matching is to give rise to a time function, in
forced response of the system that grows indefinitely as k → ∞ . This is evident from the inverse transform
of Y(z) (refer Table 2.1)
A1 A2 A
Y(z) = + + 3
1 ( z − 1)2 z − 1
z−
2
1
A1 = z − Y ( z )F =4 I
2 H z=
1 K
2
2
A2 = ( z − 1) Y ( z) z =1 = 3
d
A3 = [( z − 1)2 Y ( z )] =–4
dz z =1
Therefore
4 3 −4
Y(z) = + +
z− 1
2 ( z − 1)2 z −1
Signal Processing in Digital Control 103
1 k -1
y(k) = 4ch 2 + 3( k - 1) (1) k -1 - 4(1) k - 1
1 k -1
= 4c h 2 + 3( k - 1) - 4; k ³ 1
= 4c h 1 k -1 + 3k - 7; k ³ 1
2
where r(k) =
RS1; k even ; y(–1) = r(–1) = 0
T0; k odd
Solution The z-transformation of the given equation yields
1 - z -1 z −1
Y(z) = R( z ) = R(z)
1+ z -1
z +1
For the given input,
2
1 1 z
R(z) = 1 + z–2 + z– 4 + L = = -2
= 2
1- x x = z -2 1- z z -1
Thus Y(z) = F z - 1I z2
= 2
z2
H z + 1K 2
z - 1 z + 2z + 1
We can expand Y(z) into a power series by dividing the numerator of Y(z) by its denominator:
1 - 2 z -1 + 3 z -2 - 4 z -3 + L
z 2 + 2z + 1 z 2
z2 + 2z + 1
– 2z – 1
– 2z – 4 – 2z–1
3 + 2z–1
3 + 6z–1 + 3z–2
– 4z–1 – 3z–2
M
Therefore Y(z) = 1 – 2z – 1 + 3z–2 – 4z–3 + L
and the values of y(k) are {1, – 2, 3, – 4, L }
Review Example 2.5 Through this simple example, we explain the phenomenon of aliasing.
Suppose the sampling rate is 10 Hz; ws = 20 p rad/sec, T = 0.1 sec. The primary strip in the s-plane
corresponding to this sampling rate is shown in Fig. 2.48a.
We try to sample 6 Hz sine wave (w0 = 12p). Note that the signal lies outside the primary strip. Consider the
mapping of the imaginary axis of s-plane to z-plane, as frequency increases from 0 to 6 Hz. The paths followed
as the frequency increases are shown in Fig. 2.48b.
104 Digital Control and State Variable Methods
Note that at a frequency of 5 Hz, the two paths meet at z = – 1. The 6 Hz (w0 = 12 p) sine wave will appear
to be (10 Hz – 6 Hz) = 4 Hz sine wave. The high frequency w0 = 12 rad/sec is ‘folded in’ about the folding
frequency p/T = 10p; and appears as low frequency at (ws – w0) =
2p
- w 0 = 8p . F I
T H K
Im (s)
Im (z)
12p
f = 3 Hz f = 2 Hz
10p
8p
f = 4 Hz f = 1 Hz
f=
–6 (wT = 0.2p = 36°)
Hz
36°
f = 5 Hz f = –5 Hz
Re (z)
Re (s) f=
z
–4H –1
H
f =
f=– z
f=–
2 Hz
3 Hz
f = 6 Hz
–8p
–10p
(a) (b)
Fig. 2.48
The high frequency w0, which shows up at (ws – w0) after sampling, is called the ‘alias’ of the primary-
strip frequency (ws – w0). The superimposition of the high-frequency behaviour onto the low frequency is
known as frequency folding or aliasing.
Take a sine wave of 6 Hz frequency and extract the samples with T = 0.1 sec. Examine the sampled
recording carefully; it has a frequency of 4 Hz.
The phenomenon of aliasing has a clear meaning in time. Two continuous sinusoids of different frequen-
cies (6 Hz and 4 Hz in the example under consideration) appear at the same frequency when sampled. We
cannot, therefore, distinguish between them, based on their samples alone.
To avoid aliasing, the requirement is that the sampling frequency ws , must be atleast twice the highest
frequency wm present in the signal, i.e., ws > 2wm. This requirement is formally known as the sampling
theorem.
Review Example 2.6 Find the response of the system shown in Fig. 2.49 to a unit impulse input.
Signal Processing in Digital Control 105
T=1
r(t) r*(t) 1 y (t)
1 – e–sT
s s(s + 1)
Fig. 2.49
Solution The discrete-time transfer function of the given system is obtained as follows (refer
Eqns (2.100)):
1 - e - sT 1
Gh0(s) = , Ga(s) =
s s(s + 1)
Y(z)
= Z [Gh0(s)Ga(s)] = (1 – z–1) Z
Ga ( s ) FH
IK
R( z ) s
= (1 – z–1 )ZM
L 1 OP = (1 – z ) Z L 1 − 1 + 1 O
–1
N s (s + 1) Q
2 MN s s s + 1QP 2
=
LM (ze -T
- z + Tz ) + (1 - e - T - Te - T ) OP
N ( z - 1)( z - e - T ) Q
For T = 1, we have
Y (z ) ze −1 + 1 − 2 e −1
=
R( z ) ( z − 1) ( z − e −1 )
0.3678z + 0.2642 0.3678z + 0.2642
= =
( z - 1)(z - 0.3679) z 2 - 1.3678z + 0.3679
For unit-impulse input, R(z) = 1.
0.3678z + 0.2642
Therefore Y(z) = 2
z - 1.3678z + 0.3679
We can expand Y(z) into a power series by dividing the numerator of Y(z) by its denominator:
0.3678 z -1 + 0.7675z -2 + 0.9145z -3 +L
2
z - 1.3678 z + 0.3678 0.3678 z + 0.2644
0.3678z - 0.5031 + 0.1353z -1
+ 0.7675 - 0.1353z -1
+ 0.7675 - 1.0497z -1 + 0.2823z -2
0.9145z -1 - 0.2823z -2
M
This calculation yields the response at the sampling instants, and can be carried on as far as needed. In
this case we have obtained y(kT) as follows:
y(0) = 0, y(T) = 0.3678, y(2T) = 0.7675, and y(3T) = 0.9145.
106 Digital Control and State Variable Methods
Review Example 2.7 A PID controller is described by the following relation between input e(t) and
output u(t):
1 t LM de(t ) OP
TI 0
u(t) = Kc e(t ) +
e(t ) dt + TD
N dt z (2.123)
Q
Using the trapezoidal rule for integration and backward-difference approximation for the derivatives, obtain
the difference-equation model of the PID algorithm. Also obtain the transfer function U(z)/E(z).
Solution By the trapezoidal rule for integration, we obtain
z kT
e(t ) dt = T LM e(0) + e(T ) + e(T ) + e(2T ) + L + e((k - 1)T ) + e(kT ) OP
0 N 2 2 2 Q
L
= TM å
k
e((i - 1)T ) + e(iT ) O
PP
MN i =1 2 Q
By backward-difference approximation for the derivatives (refer Eqn. (2.102)), we get
de(t ) e( kT ) - e((k - 1)T )
=
dt t = kT T
A difference-equation model of the PID controller is, therefore, given by
|RS
u(k) = Kc e( k ) +
T
å
k
e(i - 1) + e(i ) TD
+ [e(k ) - e(k - 1)]
|UV (2.124)
|T TI i =1 2 T |W
Let us now obtain the transfer function model of
e (t)
the PID control algorithm given by Eqn. (2.124).
Define (refer Fig. 2.50)
e(i - 1) + e(i )
= f (i); f (0) = 0
2
k k
f (T ) f (2 T ) e(i - 1) + e(i )
Then å = å f(i)
f (0) i =1 2 i =1
= Kc 1 +
LM T F z + 1I + T F z − 1I OP E(z)
D
(2.125)
N 2TI H z − 1K T H z K Q
This equation gives the transfer function model of the PID control algorithm. Note that we can obtain the
discrete-time transfer function model (2.125) by expressing the PID controller (2.123) in terms of operator
s and then using the mapping (2.104) for the derivative term, and the mapping (2.114) for the integral term
of the controller.
Review Example 2.8 Derive the difference equation model for the numerical solution of the differential
equation
d 2 y(t ) dy(t ) dy
2
+ a1 + a2 y(t ) = r(t); y(0) = y10 , (0) = y 20 , 0 ≤ t ≤ tf (2.126)
dt dt dt
Use backward difference approximation for the derivatives.
Solution We divide the interval 0 ≤ t ≤ tf into N equal intervals of width equal to step-length T:
tf
= T; t = kT, k = 0, 1, 2, ..., N
N
By backward difference approximation,
dy(t ) Δ y(k ) - y(k - 1)
= y& ( k ) = (2.127)
dt t = kT T
d 2 y (t ) Δ y&(k ) - y&(k - 1) 1
= y&&( k ) = = 2 [y(k) – 2y(k – 1) + y(k – 2)] (2.128)
dt 2 t = kT
T T
From Eqn. (2.127), we have
y10 - y( -1)
y&(0) = y20 =
T
Substituting Eqns (2.127) and (2.128) into (2.126) at t = kT, we obtain
1 a
2
[y(k) – 2y(k – 1) + y(k – 2)] + 1 [y(k) – y(k – 1)] + a2 y(k) = r(k)
T T
or Fa +
a1 1
+ 2 I y(k) – F a 1
+
2 I y(k – 1) + 1 y(k – 2) = r(k);
H 2
T T K HT T2 K T2
Problems
0.368
+ y (k)
r (k ) + +
0.264
– +
1.368
0.368
Fig. P 2.1
2.2 Consider the signal processing algorithm shown in Fig. P2.2. Represent the algorithm by (a) difference
equation model, (b) a state variable model, and (c) a transfer function model.
– 3 z–1 1 z–1 1
R (z) Y (z)
– 5
– 3
Fig. P 2.2
–1
+
R (z) + + Y (z)
z–1 2
+
1
–
2
Fig. P 2.3
Signal Processing in Digital Control 109
(a) Obtain the difference equation model and from there the transfer function model of the system.
(b) Find the impulse response of the system.
(c) Find the response of the system to unit step input m(k).
2.4 A filter often used as part of computer-controlled algorithms is shown in Fig. P2.4 (b and a are real constants).
(a) Find the impulse response to an impulse of
R (z) + Y (z)
b strength A.
z–1
(b) Find the step response to a step of strength A.
+
(c) Find the ramp response to a ramp function with a
a slope A.
(d) Find the response to sinusoidal input A cos(W k).
Fig. P 2.4
2.5 Solve the following difference equations:
1 3
(a) y(k + 2) + 3y(k + 1) + 2y(k) = 0; y(–1) = - , y(–2) =
2 4
(b) 2y(k) – 2y(k – 1) + y(k – 2) = r(k)
y(k) = 0 for k < 0 and
r(k) =
RS1; k = 0, 1, 2, . . .
T0; k < 0
2.6 Consider the difference equation:
y(k + 2) – 1.3679 y(k + 1) + 0.3679 y(k) = 0.3679 r(k + 1) + 0.2642 r(k)
y(k) = 0 for k ≤ 0, and r(k) = 0 for k < 0,
r(0) = 1, r(1) = 0.2142, r(2) = – 0.2142 ; r(k) = 0, k = 3, 4, 5, ...
Determine the output y(k).
2.7 Solve the following difference equation using z-transforms:
y(k) – 3y(k – 1) + 2y(k – 2) = r(k)
where r(k) =
RS1 for k = 0, 1 ; y(–2) = y(–1) = 0
T 0 for k ³ 2
Will the final value theorem give the correct value of y(k) as k → ∞ ? Why?
2.8 For the transfer function models and inputs given below, find the response y(k) as a function of k:
Y (z) 2z - 3 Y (z) - 6z + 1
(a) G(z) = = (b) G(z) = =
R( z ) ( z - 0.5) ( z + 0.3) R( z ) c
z - 1
2 hc
+ j 14 z - 1
2 - j 1
4 h
r(k) =
RS1; k =1
r(k) =
RS0; k < 0
T0; k = 0, 2, 3, 4, K T1; k = 0, 1, 2, 3, . . .
2.9 For the transfer function models and inputs given below, find the response y(k) as a function of k:
Y (z) 1 Y (z) 1
(a) G(z) = = (b) G(z) = =
R( z ) ( z - 0.5) ( z + 0.3) R( z ) ( z - 0.5)2 ( z - 0.1)
r(k) =
RS1; k even
r(k) =
RS0; k < 0
T0; k odd T1; k = 0, 1, 2, 3, K
2.10 Determine y( ∞ ) for the following Y(z) function (a is a real constant):
K[ z 3 - 2 az 2 + ( a3 - a2 + a)z ]
Y(z) =
( z - 1) ( z - a) ( z - a2 )
110 Digital Control and State Variable Methods
Assuming stable response, determine what the value of K must be for y(¥) = 1.
k !(a )k - m + 1
2.11 Given: y(k) = m (k - m + 1)
( k - m + 1) ! ( m - 1) !
Prove that y(k) decays to zero as k ® ¥ if |a| < 1.
2.12 A system has the transfer function
Y (z) 1
G(z) = = .
R( z ) z 2 + 1
Show that when the input r(k) is a unit step function, the output y(k) is bounded; and when the input
r(k) = {1, 0, –1, 0, 1, 0, –1, ...},
the output y(k) is unbounded.
Explain why a bounded input produces a bounded output in the first case but an unbounded output in the
second case.
2.13 Using Jury stability criterion, check if all the roots of the following characteristic equations lie within the unit
circle:
(a) z3 – 1.3 z2 – 0.08z + 0.24 = 0
(b) z4 – 1.368z3 + 0.4z2 + 0.08z + 0.002 = 0
2.14 Using Jury stability criterion, find if all the poles of the following transfer function lie inside the unit circle on
the z-plane.
3z 4 + 2 z 3 - z 2 + 4 z + 5
G(z) =
z + 0.5z 3 - 0.2 z 2 + z + 0.4
4
2.15 Figure P2.15 shows the input-output description of a D/A converter. The converter is designed in such a way
that the old value of the input sample is held constant, until a new sample arrives. Treating each sample of the
sequence r(kT) as an impulse function of strength equal to the value of the sample, the system of Fig. P2.15
becomes a continuous-time system. Determine the transfer function model of the system.
r (kT) y (t )
D/A
Fig. P 2.15
(b) Determine F ( z) in terms of F(s). Using this result, explain the relationship between the z-plane and
z = e sT
the s-plane.
2.19 Figure P2.19 shows two root paths in the s-plane:
(i) roots with the same time-constant t = 1/a;
(ii) roots with the same oscillation frequency w0.
Derive and sketch the corresponding root paths in the z-plane under the impulse-invariant transformation.
Sampling frequency is ws.
jw s /2 jw s /2
a w0
– jw s /2 – jw s /2
(i) (ii)
Fig. P 2.19
2.20 Figure P2.20 shows a discrete-time system. Determine the transfer function G(z) of this system assuming that
the samplers operate synchronously at intervals of T sec. Also find the unit-step response of the system.
T T
r(t) r*(t) 1 y (t ) y (k )
ZOH
(s + 1)
Fig. P 2.20
2.21 Figure P2.21 shows the model of a plant driven by a D/A converter. Derive the transfer function model relating
r(kT) and y(kT); T = 0.4 sec.
r(kT) 10 y (t )
D/A
s (s + 2)
Fig. P 2.21
Fig. P 2.26
2.27 A PID controller is described by the following relation between input e(t) and output u(t):
LM
U(s) = Kc 1 +
1 OP
+ TD s E ( s)
N TI s Q
(a) Derive the PID algorithm using the s-plane to z-plane maps—bilinear transformation for integration and
backward-difference approximation for the derivatives.
(b) Convert the transfer function model of the PID controller obtained in step (a) into a difference equation
model.
2.28 Derive difference equation models for the numerical solution of the following differential equation using (a) the
backward rectangular rule for integration, and (b) the forward rectangular rule for integration:
y& (t) + ay(t) = r(t); y(0) = y0
2.29 Consider the second-order system
&&
y + a y& + by = 0; y(0) = a, y& (0) = b
Approximate this equation with a second-order difference equation for computer solution. Use backward-dif-
ference approximation for the derivatives.
Models of Digital Control
3 Devices and Systems
3.1 INTRODUCTION
Now that we have developed the prerequisite signal processing techniques in Chapter 2, we can use them to
study closed-loop digital control systems. A typical topology of the type of systems to be considered in this
chapter, is shown in Fig. 3.1.
Command signal r (k)
Controlled
output
Controlled y (t )
A/D Computer D/A system
Clock
Analog
prefilter Sensor
Digital control systems with analog sensors include an analog prefilter between the sensor and the sampler
(A/D converter) as an anti-aliasing device. The prefilters are low-pass, and the simplest transfer function is
a
Hpf (s) =
s+ a
so that the noise above the prefilter breakpoint a, is attenuated. The design goal is to provide enough attenu-
ation at half the sample rate (ws /2) so that the noise above ws /2, when aliased into lower frequencies by the
sampler, will not be detrimental to the control-system performance.
Since the phase lag from the prefilter can significantly affect system stability, it is required that the con-
trol design be carried out with the analog prefilter included in the loop transfer function. An alternative
design procedure is to select the breakpoint and ws sufficiently higher than the system bandwidth, so that the
114 Digital Control and State Variable Methods
phase lag from the prefilter does not significantly alter the system stability, and thus the prefilter design
problem can be divorced from the control-law design problem. Our treatment of the subject is based on
this alternative design procedure. We, therefore, ignore the prefilter design and focus on the basic control-
system design. The basic configuration for this design problem is shown in Fig. 3.2, where
· G(s) = transfer function of the controlled plant (continuous-time system);
· H(s) = transfer function of the analog sensor; and
· D(z) = transfer function of the digital control algorithm.
r (k)
b (k) u (k )
A/D D (z) D/A G (s ) y (t)
A C
Computer Plant
H (s )
Sensor
Fig. 3.2 Block diagram for basic control system design
The analog and digital parts of the system are connected through D/A and A/D converters. The computer,
with its internal clock, drives the D/A and A/D converters. It compares the command signal r(k) with the
feedback signal b(k) and generates the control signal u(k), to be sent to the final control elements of the
controlled plant. These signals are computed from the digital control algorithm D(z), stored in the memory
of the computer.
There are two different approaches for the design of digital algorithms.
(i) Discretization of Analog Design
The controller design is done in the s-domain using analog design methods.1 The resulting analog
control law is then converted to discrete-time form, using one of the approximation techniques given
in Section 2.14.
(ii) Direct Digital Design
In this approach, we first develop the discrete-time model of the analog part of the loop—from C to A
in Fig. 3.2—that includes the controlled plant. The controller design is then performed using discrete-
time analysis.
An actual design process is often a combination of the two methods. First iteration to a digital design can
be obtained using discretization of an analog design. Then the result is tuned up using direct digital analysis
and design.
The intent of this chapter is to provide basic tools for the analysis and design of a control system that is to
be implemented using a computer. Mathematical models of commonly used digital control devices and
systems are developed. Different ways to implement digital controllers (obtained by the discretization of
analog design (Section 2.14) or by direct digital design (Chapter 4), are also given in this chapter.
1
Chapters 7–10 of reference [155].
Models of Digital Control Devices and Systems 115
Whenever a digital computer is used to control a continuous-time plant, there must be some type of interface
system that takes care of the communication between the discrete-time and the continuous-time systems. In
the system of Fig. 3.2, the interface function is performed by A/D and D/A converters.
T Simple models of the interface actions of A/D and
f (t) f (k )
D/A converters have been developed in Chapter 2. A
brief review is in order here.
(a)
Model of an A/D Converter A simple model of an
A/D converter is shown in Fig. 3.3a. A continuous-time
0 t 0 1 2 3 4 k function f (t), t ³ 0, is the input and the sequence of real
numbers f (k), k = 0, 1, 2, ..., is the output. The following
d T (t) relation holds between input and output:
f (k) = f (t = kT); T is the time interval between samples
(b)
(3.1)
f (t) Impulse f *(t) = f (t) d T (t)
The sequence f(k) can be treated as a train of impulses
modulator represented by continuous-time function f *(t):
Fig. 3.3 A model of an A/D converter f*(t) = f (0) d (t) + f (1) d (t – T) + f (2) d (t – 2T) + L
¥
= å f (k) d (t – kT ) (3.2)
k = 0
The sampler of Fig. 3.3a can thus be viewed as an ‘impulse modulator’ with the carrier signal
¥
d T (t) = å d (t – kT ) (3.3)
k = 0
and modulating signal f (t). A schematic representation of the modulation process is shown in Fig. 3.3b.
Model of a D/A Converter A simple model of a D/A converter is shown in Fig. 3.4a. A sequence of
numbers f (k), k = 0, 1, 2, ..., is the input, and the continuous-time function f + (t), t ³ 0 is the output. The
following relation holds between input and output:
f +(t) = f (k); kT £ t < (k + 1)T (3.4)
Each sample of the sequence f(k) may be
f (k) ZOH f +(t) treated as an impulse function of the form
f (k)d (t – kT). The zero-order hold (ZOH) of
(a)
Fig. 3.4a can thus be viewed as a linear time-
invariant system that converts the impulse
0 k 0 t f (k)d (t – kT) into a pulse of height f (k) and
width T. The D/A converter may, therefore,
be modelled by Fig. 3.4b, where the ZOH is a
f (k) f *(t) 1 – e – sT f +(t) system whose response to a unit impulse d (t),
(b) G h0(s) =
T s is a unit pulse gh0(t) of width T. The Laplace
transform of gh0(t) is the transfer function of
Fig. 3.4 A model of a D/A converter hold operation, namely (refer Eqn. (2.79))
116 Digital Control and State Variable Methods
1 - e - sT
Gh0(s) = Z [gh0(t)] = (3.5)
s
Figure 3.5 illustrates a typical example of an interconnection of discrete-time and continuous-time sys-
tems. In order to analyse such a system, it is often convenient to represent the continuous-time system
together with the ZOH by an equivalent discrete-time system.
We assume that the continuous-time system of Fig. 3.5 is a linear system with the transfer function G(s).
A block diagram model of the equivalent discrete-time system is shown in Fig. 3.6a. As seen from this
figure, the impulse modulated signal u*(t) is applied to two s-domain transfer functions in tandem. Since the
two blocks with transfer functions Gh0(s) and G(s) are not separated by an impulse modulator, we can con-
sider them as a single block with transfer function [Gh0(s)G(s)], as shown in Fig. 3.6b. The continuous-time
system with transfer function [Gh0(s)G(s)] has input u*(t) and output y(t). The output signal y(t) is read off at
discrete synchronous sampling instants kT; k = 0, 1, ..., by means of a mathematical sampler T(M).
u (k ) u* ( t ) y ( t) y (k )
(a) G h0(s) G (s)
T T (M )
u (k ) u* ( t ) y ( t) y (k )
(b) G h0(s)G (s)
T T (M )
We assume that g$ (t) is the impulse response of the continuous-time system Gh0(s)G(s):
g$ (t) = L –1[Gh0(s)G(s)] (3.6)
The input signal to the system is given by (refer Eqn. (3.2)),
¥
u*(t) = å u(kT)d (t – kT) (3.7)
k =0
This is a sequence of impulses with intensities given by u (kT). Since g$ (t) is the impulse response of the
system (response to the input d (t)), by super-position from Eqn. (3.7),
¥
y(t) = å u(jT) g$ (t – jT)
j = 0
At the sampling times t = kT, y(t) is given by
¥
y(kT) = å u( jT) g$ (kT – jT) (3.8)
j = 0
Models of Digital Control Devices and Systems 117
We can recognize it at once as discrete-time convolution (refer Eqn. (2.25)). Taking the z-transform of
both sides of Eqn. (3.8), we obtain (refer Eqn. (2.29)),
Y(z) = U(z) G$ (z) (3.9a)
where $
G (z) = Z [ g$ (kT )]
–1
= Z [L {Gh0(s)G(s)}|t = kT] (3.9b)
The z-transforming operation of Eqn. (3.9b) is commonly indicated as
G$ (z) = Z [Gh0(s)G(s)] = Gh0G(z) (3.10)
It may be carefully noted that since the two blocks Gh0(s) and G(s) are not separated by an impulse
modulator,
G$ (z) ¹ Z [Gh0(s)] Z [G(s)] (3.11a)
¹ Gh0(z) G(z) (3.11b)
It follows from Eqns (3.9), that the block diagram of Fig. 3.6b becomes the z-domain block diagram of
Fig. 3.7. We could, of course, directly draw the z-domain block diagram of Fig. 3.7 from Fig. 3.6b, which
implies that
Y(s) = Gh0(s)G(s)U*(s) « Y(z) = Gh0G(z)U(z) (3.12a)
or Z [Gh0(s)G(s)U*(s)] = Z [Gh0(s)G(s)] Z [U*(s)]
= Gh0G(z)U(z) (3.12b)
We can use the following relation (refer Eqns (2.100 b) and (2.100 c)) for evaluation of Gh0G(z):
Gh0G(z) = Z [Gh0(s)G(s)]
U (z ) Y (z)
G h0 G (z) = [G h0(s) G (s)] LM
= Z (1 - e - sT )
OP
G( s)
N s Q
Fig. 3.7 The z-domain equivalent of Fig. 3.6 –1
= (1 – z ) Z
LM OP
G(s )
(3.13)
N Q s
Single factor building blocks of the Laplace and z-transform pairs are given in in Table 2.1. Expanding
G(s)/s into partial fractions, Z [G(s)/s] can be found by using this table.
Consider now the basic sampled-data feedback system, whose block diagram is depicted in Fig. 3.8a. In
terms of impulse modulation, this block diagram can be redrawn as in Fig. 3.8b.
t
–
b (t)
H (s)
b (t)
H (s)
Consider first the subsystem shown in Fig. 3.12a. We can equivalently represent it as a block [G1(s)E(s)]
with input d (t), as in Fig. 3.12b. Now the input, and therefore, the output, does not change by imagining a
fictitious impulse modulator through which d (t) is applied to [G1(s)E(s)] as in Fig. 3.12c.
On application of Eqn. (3.12), we can write
E1(z) = Z [G1(s)E(s)] Z [d (k)] = Z [G1(s)E(s)] (3.19)
e (t) e 1 ( t) e 1 (k )
(a) G 1 (s )
T
d ( t) e 1 (t) e 1 (k )
(b) G 1 (s)E (s)
T
d (t) d * ( t) = d ( t) e 1 (t ) e 1 (k)
(c) G 1 (s)E (s )
T T
Example 3.1 Consider the sampled-data system shown in Fig. 3.13a. From the block diagram, we obtain
(refer Eqn. (3.15))
Y (z) Gh 0 G( z )
= (3.23)
R( z ) 1 + Gh 0 G( z )
Figure 3.13b gives the z-domain equivalent of Fig. 3.13a. The forward path transfer function
Gh0G(z) = Z [Gh0(s)G(s)]
= (1 – z–1) Z
LM G(s) OP = (1 – z ) Z LM 1 OP
–1
2
NsQ N s (s + 1) Q
= (1 – z–1
L 1 1 1 OP = (1 – z ) LM Tz
)ZM - + 2
–1
-
z
+
z OP
N s s s + 1Q N (z - 1) 2
z - 1 z - e -T Q
z(T - 1 + e - T ) + (1 - e - T - Te -T )
=
( z - 1) ( z - e - T )
r ( t) + 1 y ( t)
G h0(s) G (s ) =
T = 1 sec s (s + 1)
–
(a)
R (z ) + Y (z)
G h0G (z)
–
(b)
When T = 1, we have
ze -1 + 1 - 2e -1 0.3679 z + 0.2642
Gh0G(z) = -1
= 2
( z - 1) ( z - e ) z - 1.3679 z + 0.3679
Substituting in Eqn. (3.23), we obtain
Y (z ) 0.3679 z + 0.2642
= 2
R( z ) z - z + 0.6321
Models of Digital Control Devices and Systems 121
For a unit-step input,
z
R(z) =
z -1
and therefore
z(0.3679z + 0.2642) 0.3679z 2 + 0.2642 z
Y(z) = =
( z - 1) ( z 2 - z + 0.6321) z 3 - 2 z 2 + 1.6321z - 0.6321
By long-division process, we get
Y(z) = 0.3679 z–1 + z–2 + 1.3996 z–3 + 1.3996 z–4 + 1.1469 z–5 + 0.8944 z–6 + 0.8015 z–7+ L
Therefore, the sequence (k = 1, 2, ...)
y(kT) = {0.3679, 1, 1.3996, 1.3996, 1.1469, 0.8944, 0.8015, ...}
Note that the final value of y(kT) is (refer Eqn.
(2.52),
0.3679 0.2642
lim y(kT) = lim (z – 1)Y(z) = =1
k®¥ z®1 0.6321
The unit-step response is shown in Fig. 3.14. Also
shown in this figure is the unit-step response of the
continuous-time system (i.e., when T = 0). The
overshoot of the sampled system is 45%, in contrast
to 17% for the continuous-time system.
The performance of the digital system is, thus,
dependent on the sampling period T. Larger sam-
Fig. 3.14 The response of a second-order system: pling periods usually give rise to higher overshoots
(a) analog; (b) sampled in the step response, and may eventually cause insta-
bility if the sampling period is too large.
Example 3.2 Let us compare the stability properties of the system shown in Fig. 3.15, with and without a
sample-and-hold on the error signal.
Without sample-and-hold, the system in Fig. 3.15 has the transfer function
Y ( s) K
=
R( s) s 2 + 2 s + K
This system is stable for all values of K > 0.
Gh0G(z) = (1 – z–1) Z
LM K OP
2
N s (s + 2) Q
= (1 – z ) Z M F
–1 L K 1 - 1 / 2 + 1 / 2 I OP
N 2 H s s s + 2K Q
2
=
K
(1 – z ) M
L Tz - (1 / 2 )z + (1 / 2 )z OP
–1
2 -2 T
2 N (z - 1) z - 1 z - e Q
K L 2T ( z - e ) - ( z - 1) (1 - e ) O
-2 T -2 T
= M PQ -2 T
2 N 2( z - 1) ( z - e )
The characteristic equation of the sampled-data system is
1 + Gh0G(z) = 0
–2T –2T
or 4(z – 1)(z – e ) + 2KT(z – e ) – K(z – 1) (1 – e–2T) = 0
or z2 + z
LM 1 K F T - 1 + 1 e I - 1 - e OP + e
-2 T -2 T -2 T
+
1
K
LM
1 1 -2T
- e
OP
- Te -2T = 0
N2 H 2 2 K Q 2 N
2 2 Q
Case 1: T = 0.4 sec
For this value of sampling period, the characteristic polynomial becomes
D(z) = z2 + (0.062K – 1.449)z + 0.449 + 0.048K
Applying the Jury stability test (refer Eqns (2.73)–(2.75)), we find that the system is stable if the follow-
ing conditions are satisfied:
D(1) = 1 + 0.062K – 1.449 + 0.449 + 0.048K > 0
D(–1) = 1 – 0.062K + 1.449 + 0.449 + 0.048K > 0
| 0.449 + 0.048K | < 1
These conditions are satisfied for 0 < K < 11.479.
Case II: T = 3 sec
For this value of sampling period, the characteristic polynomial becomes
D(z) = z2 + (1.2506K – 1.0025) z + 0.0025 + 0.2457K
The system is found to be stable for 0 < K < 1.995.
Thus, the system which is stable for all K > 0 when T = 0 (continuous-time system), becomes unstable for
K > 11.479 when T = 0.4 sec. When T is further increased to 3 sec, it becomes unstable for K > 1.995. It
means that increasing the sampling period (or decreasing the sampling rate), reduces the margin of stability.
Figure 3.16 is the block diagram of a computer-controlled continuous-time system with dead-time. We
assume that the continuous-time system is described by transfer function of the form
Gp(s) = G(s) e -tD s (3.24)
where tD is the dead-time, and G(s) contains no dead-time.
Models of Digital Control Devices and Systems 123
The equivalent discrete-time system, shown by dotted lines in Fig. 3.16, is described by the model
Y (z)
= Z [Gh0(s)Gp(s)] = Gh0Gp(z) (3.25a)
U(z)
= (1 – z–1) Z LM1 e - t Ds
G(s) OP (3.25b)
Ns Q
If N is the largest integer number of sampling periods in tD, we can write
tD = NT + DT; 0 £ D < 1 (3.26)
(Given the capabilities of modern microprocessors, we can adjust the sampling frequency slightly so that tD = NT)
= e–amT z–1 LM 1 OP
N1 - e
- aT -1
z Q
e - amT
= (3.30)
z - e - aT
Substituting the z-transform results given by Eqns (3.29) and (3.30) in Eqn. (3.28), we get
Y (z) 1
= Gh0Gp(z) = (1 – z–1) z–N
1
-
LM
e - amT OP
U(z) a z - 1 z - e - aT
N Q
1
a
d i
1 - e - amT z + e - amT - e - aT
= (3.31)
z N +1 ( z - e - aT )
Table 3.1 has been generated by applying the procedure outlined above, to commonly occurring functions.
e -DTs 1
s z -1
e -DTs mT T
+
s2 z - 1 ( z - 1)2
2e -DTs
T2
LM m z2 2
+ (2m - 2m2 + 1)z + ( m - 1)2 OP
s3 N ( z - 1)3 Q
e - DTs e - amT
s+a z - e - aT
e - DTs 1 e - amTLM -
e- bmT OP
-
( s + a ) ( s + b) ( b - a) z - e aT
N z - e - bT Q
ae- DTs (1 - e- amT ) z + (e- amT - e - aT )
s( s + a ) ( z - 1) ( z - e - aT )
ae - DTs T amT - 1 e - amT
+ +
2
s (s + a) ( z - 1)2 a( z - 1) a( z - e - aT )
Models of Digital Control Devices and Systems 125
Example 3.3 The scheme of Fig. 3.17 produces a steady-stream flow of fluid with controlled temperature
q. A stream of hot fluid is continuously mixed with a stream of cold fluid, in a mixing valve. The valve
characteristic is such that, the total flow rate Q (m3/sec) through it is maintained constant, but the inflow qi
(m3/sec) of hot fluid may be linearly varied by controlling valve stem position x. The valve stem position x,
thus controls the temperature qi (ºC) of the outflow from the mixing valve. Due to the distance between the
valve and the point of discharge into the tank, there is a time delay between the change in qi and the discharge
of the flow with the changed temperature, into the tank.
x
Q i + qi
Q, q + q
Cold V
The differential equation governing the tank temperature is (assuming an initial equilibrium and taking all
variables as perturbations)
dq
Vrc = Qr c (qid – q) (3.32)
dt
where
q = tank fluid temperature, ºC
= temperature of the outflowing fluid from the tank;
c = specific heat of the fluid, Joules/(kg)(ºC);
V = volume of the fluid in the tank, m3;
r = fluid density, kg/m3;
Q = fluid flow rate, m3/sec; and
qid = temperature of the fluid entering the tank, ºC.
The temperature qid at the input to the tank at time t, however, is the mixing valve output temperature tD
seconds in the past, which may be expressed as
qid(t) = qi(t – tD) (3.33)
From Eqns (3.32)–(3.33), we obtain
q& (t) + aq (t) = aqi(t – tD)
where a = Q/V
126 Digital Control and State Variable Methods
q (s ) ae -tD
s
Therefore, Gp(s) = = (3.34)
q i ( s) s+a
To form the discrete-time transfer function of Gp(s) preceded by a zero-order hold, we must compute
LMF 1 - e I ae OP
- sT -t Ds
Gh0Gp(z) = Z
MNGH s JK s + a PQ
–1
= (1 – z ) Z M
L a e OP -t Ds
(3.35)
N s( s + a ) Q
For the specific values of tD = 1.5, T = 1, a = 1, Eqn. (3.35) reduces to
–1
G G (z) = (1 – z ) Z M
h0 p
L 1 e e OP - s -0.5 s
N s(s + 1) Q
–1 –1
= (1 – z ) z Z M
L 1 e OP -0.5s
N s(s + 1) Q
Using transform pairs of Table 3.1, we obtain
The application of conventional 8- and 16-bit microprocessors to control systems, is now well established.
Such processors have general purpose architectures which make them applicable for a wide range of tasks,
though none are remarkably efficient. In control applications, such devices may pose problems such as
inadequate speed, difficulties with numerical manipulation, and relatively high cost for the completed sys-
tem; the latter being due to both the programming effort and the cost of the peripheral hardware (memories,
I/O ports, timers/counters, A/D converters, D/A converters, PWM circuit, etc.).
Models of Digital Control Devices and Systems 127
In applications requiring small amounts of program ROM, data RAM, and I/O ports, single-chip
microcontrollers are ideally suited. In these chips, the capabilities in terms of speed of computation, on-chip
resources, and software facilities are optimized for control applications. Should the on-chip features be
insufficient to meet control requirements, the microcontroller chips allow for easy expansion.
The Intel microcontroller family (MCS-48 group, MCS-51 group, MCS-96 group) includes 8- and 16-bit
processors with the following on-chip resources—ROM, RAM, I/O lines, timer/counter, A/D converter, and
PWM output. The Motorola microcontroller family (HC 05 group, HC 11 group, HC 16 group) also pro-
vides microcontroller chips with similar features.
In many application areas, processing requirements for digital control systems, such as execution time
and algorithm complexity, have increased dramatically. For example, in motor control, short sampling time
constraints can place exacting requirements on algorithm execution time. New airframe designs and ex-
tended aircraft performance envelopes, increase the complexity of flight control laws. Controller complexity
also increases with number of interacting loops (e.g., in robotics), or the number of sensors (e.g., in vision
systems). For a growing number of real-time control applications, conventional single-processor systems are
unable to satisfy the new demands for increased speed and greater complexity and flexibility.
The dramatic advances in VLSI technology leading to high transistor packing densities have enabled
computer architects to develop parallel-processing architectures consisting of multiple processors; thus real-
izing high-performance computing engines at relatively low cost. The control engineer can exploit a range of
architectures for a variery of functions.
Parallel-processing speeds up the execution time for a task. This is achieved by dividing the problem into
several sub-tasks, and allocating multiple processors to execute multiple sub-tasks simultaneously. Parallel
architectures differ from one another in respect of nature of interconnectivity between the processing ele-
ments and the processing power of each individual processing element.
The transputer is a family of single-chip computers which incorporates features to support parallel process-
ing. It is possible to use a network of transputers to reduce the execution time of a real-time control law.
Digital signal processors (DSPs) offer an alternative strategy for implementation of digital controllers.
DSPs use architectures and dedicated arithmetic circuits, that provide high resolution and high speed arith-
metic, making them ideally suited for use as controllers.
Many DSP chips, available commercially, can be applied to a wide range of control problems. The Texas
Instruments TMS 320 family provides several beneficial features through its architecture, speed, and
instruction set.
TMS 320 is designed to support both numeric-intensive operations, such as required in signal processing,
and also general purpose computation, as would be required in high speed control. It uses a modified archi-
tecture, which gives it speed and flexibility—the program and data memory are allotted separate sections on
the chip, permitting a full overlap of the instruction fetch and execution cycle. The processor also uses
hardware to implement functions which had previously been achieved using software. As a result, a multi-
plication takes only 200 nsec, i.e., one instruction cycle, to execute. Extra hardware has also been included
to implement shifting and some other functions. This gives the design engineer the type of power previously
unavailable on a single chip.
Implementation of a control algorithm on a computer consists of the following two steps:
(i) Block diagram realization of the transfer function (obtained by the discretization of analog controller
(Section 2.14), or by the direct digital design (Chapter 4) that represents the control algorithm.
(ii) Software design based on the block diagram realization.
In the following, we present several different structures of block diagram realizations of digital control-
lers using delay elements, adders, and multipliers. Different realizations are equivalent from the input-output
point of view if we assume that the calculations are done with infinite precision. With finite precision in the
128 Digital Control and State Variable Methods
calculations, the choice of the realization is very important. A bad choice of the realization may give a
controller that is very sensitive to errors in the computations.
Assume that we want to realize the controller
U (z) b z n + b 1z n -1 + L + b n -1z + b n
D(z) = = 0n (3.37a)
E ( z) z + a 1 z n -1 + L + a n -1z + a n
where the ai’s and bi’s are real coefficients (some of them may be zero).
Transfer functions of all digital controllers can be rearranged in this form. For example, the transfer
function of PID controller, given by Eqn. (2.113b), can be rearranged as follows:
D(z) =
LM
U(z)
= Kc 1 +
T F1 I T
+ D (1 - z -1 )
OP
N
E( z ) H
TI 1 - z -1K T Q
KTF 1 c I + KT
=K + c D
(1 – z–1)
T H1 - z K T
c -1
I
2
b 0 z + b 1z + b 2
=
z 2 + a 1z + a 2
where
a1 = –1; a2 = 0
FG
b0 = Kc 1 +
T T IJ F2T KTI
+ D ; b1 = – Kc 1 + D ; b2 = c D
H TI T K H T TK
We shall now discuss different ways of realizing the transfer function (3.37a), or equivalently the transfer
function
U ( z ) b 0 + b 1z -1 + b 2 z -2 + L + b n -1z -( n -1) + b n z - n
D(z) = = (3.37b)
E( z ) 1 + a 1z -1 + a 2 z -2 + L + a n -1 z -( n -1) + a n z - n
The methods for realizing digital systems of the form (3.37) can be divided into two classes—recursive
and nonrecursive. The functional relation between the input sequence e(k) and the output sequence u(k) for
a recursive realization has the form
u(k) = f (u(k – 1), u(k – 2),..., e(k), e(k – 1), ...) (3.38)
For the linear time-invariant system of Eqn. (3.37b), the recursive realization has the form
u(k) = – a1u(k – 1) – a2u(k – 2) – L – anu(k – n) + b0e(k) + b1e(k – 1) + L + bne(k – n) (3.39)
The current output sample u(k) is a function of past outputs and present and past input samples. Due to the
recursive nature, the errors in previous outputs may accumulate.
The impulse response of the digital system defined by Eqn. (3.39), where we assume not all ai’s are zero,
has an infinite number of non-zero samples, although their magnitudes may become negligibly small as k
increases. This type of digital system is called an infinite impulse response (IIR) system.
The input-output relation for a nonrecursive realization is of the form
u(k) = f (e(k), e(k – 1), ...) (3.40a)
Models of Digital Control Devices and Systems 129
For a linear time-invariant system, this relation takes the form
u(k) = b0e(k) + b1e(k – 1) + b2e(k – 2) + L + bN e(k – N) (3.40b)
The current output sample u(k) is a function only of the present and past values of the input.
The impulse response of the digital system defined by Eqn. (3.40b), is limited to a finite number of
samples defined over a finite range of time intervals, i.e., the impulse response sequence is finite. This type
of digital system is called a finite impulse response (FIR) system.
The digital controller given by Eqn. (3.37b) is obviously an FIR digital system when the coefficients ai
are all zero. When not all ai’s are zero, we can obtain FIR approximation of the digital system by dividing its
numerator by the denominator and truncating the series at z–N; N ³ n:
U(z)
= D(z) @ a0 + a1z–1 + a2z–2 + L + aN z–N; N ³ n (3.41)
E( z )
Notice that we may require a large value of N to obtain a good level of accuracy.
In the following, we discuss the most common types of recursive and nonrecursive realizations of digital
controllers of the form (3.37).
b0
b1
b2
a1
a2
a3
Fig. 3.18 Block diagram realization of the transfer function of Eqn. (3.37) with n = 3
These three errors arise because of the practical limitations of the number of bits that represent various
signal samples and coefficients. The third type of error listed above may be reduced by mathematically
decomposing a higher-order transfer function into a combination of lower-order transfer functions. In this
way, the system may be made less sensitive to coefficient inaccuracies.
For decomposing higher-order transfer functions in order to reduce the coefficient sensitivity problem,
the following two approaches are commonly used. It is desirable to analyse each of these structures for a
given transfer function, to see which one is better with respect to the number of arithmetic operations
required, the range of coefficients, and so forth.
Cascade Realization The sensitivity problem may be reduced by implementing the transfer function
D(z) as a cascade connection of first-order and/or second-order transfer functions. If D(z) can be written as
a product of transfer functions D1(z),... , Dm(z), i.e.,
D(z) = D1(z) D2(z) L Dm(z),
then a digital realization for D(z) may be obtained by a cascade connection of m component realizations for
D1(z), D2(z), ... , and Dm(z), as shown in Fig. 3.19.
E (z) U (z)
D 1 (z) D 2 (z) D m (z)
E i (z) + U i (z)
+ z–1 bi +
–
ai
(a)
ej
E j (z) + U j (z)
+ z–1 z–1 fj +
–
cj
dj
(b)
Fig. 3.20 Realizations of (a) first-order and (b) second-order functions
Parallel Realization Another approach to reduce the coefficient sensitivity problem is to expand the
transfer function D(z) into partial fractions. If D(z) is expanded so that
D(z) = A + D1(z) + D2(z) + L + Dr(z),
where A is simply a constant, then a digital realization for D(z) may be obtained by a parallel connection of
(r + 1) component realizations for A, D1(z), ... , Dr(z), as shown in Fig. 3.21. Due to the presence of the
constant term A, the first-order and second-order functions can be chosen in simpler forms:
q
b r ej + fj z -1
D(z) = A + å 1 + ai z -1 + å + cj z -1 + dj z -2
i =1 i j = q + 11
The block diagram for
bi Ui (z )
Dj(z) = -1 =
1 + ai z E( z )
132 Digital Control and State Variable Methods
E (z) + U (z)
D 1 (z) +
+
Dr (z)
ei
fj
U i (z )
E (z) + U j (z)
bi + z–1 z–1
–
E (z)
+ z–1 cj
–
dj
ai
(a) (b)
Fig. 3.22 Realization of (a) first-order and (b) second-order functions
Example 3.4 Consider the digital controller with transfer function model
U ( z ) 2 - 0.6 z -1
D(z) = =
E( z ) 1 + 0.5z -1
Recursive realization of D(z) yields the block diagram shown in Fig. 3.23a. By dividing the numerator of
D(z) by the denominator, we obtain
D(z) = 2 – 1.6z–1 + 0.8z–2 – 0.4z–3 + 0.2z–4 – 0.1z–5 + 0.05z–6 – 0.025z–7 +L
Truncating this series at z–5, we obtain the following FIR digital system:
U(z)
= 2 – 1.6 z–1 + 0.8 z–2 – 0.4 z–3 + 0.2 z–4 – 0.1 z–5
E( z )
Figure 3.23b gives a realization for this FIR system. Notice that we need a large number of delay elements
to obtain a good level of accuracy. An advantage of this realization is that, because of the lack of feedback,
the accumulation of errors in past outputs is avoided in the processing of the signal.
– +
+ –
–
– – – – –
– –
+ +
Fig. 3.23 (a) Recursive realization (b) nonrecursive realization of a first-order function
The ultimate goal of control systems engineering is to build real physical systems to perform some specified
tasks. To accomplish this goal, design and physical implementation of a control strategy are required. The
134 Digital Control and State Variable Methods
standard approach to design is this: A mathematical model is built making necessary assumptions about
various uncertain quantities on the dynamics of the system. If the objective is well defined in precise math-
ematical terms, then control strategies can be derived mathematically (e.g., by optimizing some criterion of
performance). This is the basis of all model-based control strategies. This approach is feasible when it is
possible to specify the objective and the model, mathematically. Many sophisticated methods based on
model-based control approach will appear in later chapters of the book.
For motion control applications (position, and speed control systems), identification of mathemati-
cal models of systems close enough to reality is usually possible. However, for process control applica-
tions (pressure, flow, liquid-level, temperature, and composition control systems), identification of
process dynamics precisely can be expensive even if meaningful identification is possible. This is
because industrial processes are relatively slow and complex. In process-control field, therefore, it is
not uncommon to follow adhoc approach for controller development, when high demands on control-
system performance are not made. In the adhoc approach, we select a certain type of controller based
on past experience with the process to be controlled, and then set controller parameters by experiment
once the controller is installed. The ‘experimental design’ of controller settings has come to be known
as controller tuning.
Many years of experience have shown that a PID controller is versatile enough to control a wide variety
of industrial processes. The common practice is to interface a PID controller (with adjustment features) to
the process and adjust the parameters of the controller online, by trial-and-error, to obtain acceptable per-
formance. A number of tuning methods have been introduced to obtain fast convergence to control solution.
These methods consist of the following two steps:
(i) experimental determination of the dynamic characteristic of the control loop; and
(ii) estimation of the controller tuning parameters that produce a desired response for the dynamic charac-
teristics determined in first step.
It may be noted that for tuning purposes, simple experiments are performed to estimate important dynamic
attributes of the process. The approximate models have proven to be quite useful for process control appli-
cations (For processes whose dynamics are precisely known, the use of trial-and-error tuning is not justified
since many model-based methods to the design of PID controllers are available which predict the controller
parameters fairly well at the design stage itself). The predicted parameter values based on approximate
models simply provide initial trial values for the online trial-and-error approach. These trial values may turn
out to be a poor guess. Fine tuning the controller parameters online is usually necessary to obtain acceptable
control performance.
Some of the tuning methods which have been successfully used in process industry, will be described here.
or U(s) = Kc
LM1 + 1 OP E(s) (3.46b)
N T sQ I
where TI is the integral or reset time.
A PI controller has thus two adjustable or tuning parameters: Kc (or PB) and TI. The integral or reset
action in this controller removes the steady-state offset in the controlled variable. However, the integral
mode of control has a considerable destabilizing effect which, in most of the situations, can be compensated
by adjusting the gain Kc [155].
Some instrument manufacturers calibrate the integral mode parameter as the reset rate, which is simply
the reciprocal of the reset time.
Proportional-Integral-Derivative Controller Sometimes a mode faster than the proportional mode is
added to the PI controller. This new mode of control is the derivative action, also called the rate action, which
responds to the rate of change of error with time. This speeds up the controller action. The equation describing
the PID controller is as follows:
LM 1
t
de( t ) OP
MN T z
u(t) = Kc e(t ) +
e(t ) dt + T D (3.47a)
I 0 dt PQ
or
L 1 + T sOP E(s)
U(s) = K M1 +
c D (3.47b)
N Ts Q I
where TD is the derivative or rate time.
A PID controller has thus three adjustable or tuning parameters: Kc (or PB), TI, and TD. The derivative
action anticipates the error, initiates an early corrective action, and tends to increase the stability of the
system. It does not affect the steady-state error directly. A derivative control mode, in isolation, produces no
136 Digital Control and State Variable Methods
corrective effort for any constant error, no matter how large, and would, therefore, allow uncontrolled steady-
state errors. Thus, we cannot consider derivative modes in isolation; they will always be considered as
augmenting some other mode [155].
The block diagram implementation of Eqn. (3.47b) is sketched in Fig. 3.24a. The alternative form,
Fig. 3.24b, is more commonly used, because it avoids taking the rate of change of the set-point input to the
controller, thus preventing the undesirable derivative ‘kick’ on set-point changes by the process operator.
Due to the noise-accentuating characteristics of derivative operation, the lowpass-filtered derivative
TD s/(aTD s + 1) is actually preferred in practice (Fig. 3.24c). The value of the filter parameter a is not
adjustable but is built into the design of the controller. It is usually of the order of 0.05 to 0.3.
1
TI s
+
r + e + u
Kc
– +
TD s
y
(a)
1
TI s
+
r + e + u
Kc
– –
TD s
y
(b)
1
TI s
+
r + e + u
Kc
– –
TD s
a TD s + 1
y
(c)
Fig. 3.24 Block diagram of PID controller
The controller of Fig. 3.24 is considered to be noninteracting in that its derivative and integral modes
operate independently of each other (although proportional gain affects all the three modes). Noninteraction
is provided by the parallel functioning of integral and derivative modes. By contrast, many controllers have
derivative and integral action applied serially to the controlled variable, resulting in interaction between
them. Many of the analog industrial controllers realize the following interacting PID control action.
Models of Digital Control Devices and Systems 137
U(s) = K c¢
LM T ¢ s + 1 OP LM1 + 1 OP E(s)
D
(3.48)
NaT ¢ s + 1Q N T ¢s Q
D I
The first term in brackets is a derivative unit attached to the standard PI controller serially, to create the PID
controller (Fig. 3.25a). The derivative unit installed on the controlled-variable input to the controller avoids
the derivative kick (Fig. 3.25b).
1
T¢I s
+
r + e TD¢ s + 1 + u
K¢c
aTD¢ s + 1
–
y (a)
1
TI¢ s
r + e + + u
K¢c
–
b
¢ s +1
TD
a TD¢ s + 1
y (b)
Fig. 3.25 Alternative realization schemes for PID control action
Most commercially available tunable controllers use the noninteracting version of PID control. The
discussion that follows applies to noninteracting PID control.
+
–
The PID control unit receives the error signal e developed by the set-point control unit, and generates an
appropriate control signal uC. Adjustment features provided in the control unit, for generating appropriate
control signals, include tuning of the three parameters Kc, TI, and TD.
The manual/automatic control unit has a switch which determines the mode of control action. When the
switch is in the auto (A) position, the control signal uC calculated by PID control unit is sent to the process
(in such a case, the process is controlled in closed loop). When the switch is in the manual (M) position, the
PID control unit ‘freezes’ its output. The control signal uM can then be changed manually by the operating
personnel (the process is then controlled in open loop).
The basic structure of a process controller shown in Fig. 3.26 is common for electronic, and computer-
based controllers. These controllers are different in terms of realization of adjustment features.
1 A
4
y (t)
A
1 A
4
t
(b) Set-point change
Fig. 3.27 QDR response
PI and PID tuning parameters that produce quarter-decay response, are not unique. For each setting of the
integral and derivative times, there will usually be a setting of the controller gain that produces quarter-
decay response. The settings given in Table 3.2 are the figures based on experience; these settings have
produced fast response for most industrial loops.
Table 3.2 QDR tuning formulas based on ultimate gain and period
y (t)
h yss = K u
0.632 yss
0 tD tD + t t
At the point t = tD on the time axis, the process output variable leaves the initial steady-state with a maximum rate of
change (refer Eqn. (3.51)):
d
Dy(t ) FI
= KDu
1
=
Dyss
dt t =t D
HKt t
The time-constant t is the distance on the time axis between the point t = tD, and the point at which the
tangent to the model response curve, drawn at t = tD, crosses the new steady-state.
Note that the model response at t = tD + t is given by
Dy (tD + t) = KDu(1 – e–1) = 0.632 Dyss
The process reaction curve of Fig. 3.28 can be matched to the model response of Fig. 3.29 by the follow-
ing estimation procedure.
The model parameter K is given by
Change in process output at steady-state Dyss
K= = (3.52)
Step change in process input Du
The estimation of the model parameters tD and t can be done by, at least, three methods; each of which
results in different values.
Tangent Method This method makes use of the line that is tangent to the process reaction curve at the
point of maximum rate of change. The time-constant is then defined as the distance on the time axis, between
the point where the tangent crosses the initial steady-state of the output variable, and the point where it
crosses the new steady-state value. The dead-time is the distance on the time axis, between the occurrence of
the input step change, and the point where the tangent line crosses the initial steady-state. These estimates are
indicated in Fig. 3.30a.
Tangent-and-Point Method In this method, tD is determined in the same manner as in the earlier method,
but the value of t is the one that forces the model response to coincide with the actual response at t = tD + t.
Construction for this method is shown in Fig. 3.30b. The value of t obtained by this method is usually less
than that obtained by the earlier method, and the process reaction curve is usually closer to the response of the
model obtained by this method compared to the one obtained by the earlier method.
142 Digital Control and State Variable Methods
y (t) Two-points Method The least precise step in
the determination of tD and t by the previous two
methods, is the drawing of the line tangent to the
process reaction curve at the point of maximum rate
of change. To eliminate this dependence on the tan-
0 t gent line, it is proposed that the values of tD and t
tD t be selected such that the model and the actual
(a) Tangent method
response coincide at two points in the region of
high rate of change. The two points recommended
y (t)
are (tD + 13 t ) and (tD + t ). To locate these points,
we make use of Eqn. (3.51):
yss
0.632 yss Dy(tD + 13 t ) = KDu[1 – e–1/3] = 0.283 Dyss
Dy(tD + t ) = KDu [1 – e–1] = 0.632 Dyss
0 t These two points are labelled t 1 and t 2 in
tD t
Fig. 3.30c. Knowing t1 and t2, we can obtain the
(b) Tangent-and-point method values of tD and t.
y (t) tD + t = t2; tD + 13 t = t1
which reduces to
3
h yss t = 2
(t2 – t1); tD = t2 – t (3.53)
0.632 h yss where t1 = time at which Dy(t) = 0.283 Dyss
0.283 yss
0 t1 t2 t t2 = time at which Dy(t) = 0.632 Dyss
(c) Two-points method
Tuning for QDR Response Besides the formulas
Fig. 3.30 Estimation of model parameters for QDR response tuning based on the ultimate gain
and period of the loop (refer Table 3.2), Ziegler and
Nichols also developed tuning formulas based on the parameters of a first-order model fit to the process reaction
curve. These formulas are given in Table 3.3 [12].
Ke - t D s
Table 3.3 QDR tuning formulas based on process reaction curve: process model G(s) =
ts + 1
Controller Gain Integral time Derivative time
P Kc = t /KtD — —
PI Kc = 0.9t /KtD TI = 3.33 tD —
PID Kc = 1.5t /KtD TI = 2.5tD TD = 0.4tD
with parameters
Kc = controller gain; TI = integral time; and TD = derivative time.
For small sample times T, this equation can be turned into a difference equation by discretization. Various
methods of discretization were presented in Section 2.14.
144 Digital Control and State Variable Methods
Approximating the derivative mode by the backward-difference approximation and the integral mode by
backward integration rule, we obtain (refer Eqns (2.112))
LM
u(k) = Kc e(k ) +
1 T
S(k ) + D (e(k ) - e(k - 1))
OP (3.56)
N TI T Q
S(k) = S(k – 1) + Te(k)
where u(k) = the controller output at sample k;
S(k) = the sum of the errors; and
T = the sampling interval.
This is a nonrecursive algorithm. For the formation of the sum, all past errors e(×) have to be stored.
Equation (3.56) is known as the ‘absolute form’ or ‘position form’ of the PID algorithm. It suffers from one
particular disadvantage which is manifest when the process it is controlling, is switched from manual to auto-
matic control. The initial value of the control variable u will simply be (e(k – 1) = S(k – 1) = 0 in Eqn. (3.56))
u(0) = Kc 1 +
TLM T
+ D e(0)
OP
TIN T Q
Since the controller has no knowledge of the previous sample values, it is not likely that this output value
will coincide with that previously available under manual control. As a result, the transfer of control will
cause a ‘bump’, which may seriously disturb the plant operation. This can only be overcome by laboriously
aligning the manual and computer outputs or, by adding complexity to the controller so that it will automati-
cally ‘track’ the manual controller.
Practical implementation of the PID algorithm includes the following additional features.
(i) It is seldom desirable for the derivative mode of the controller to respond to set-point changes. This is
because the set-point changes cause large changes in the error that last for only one sample; when the
derivative mode acts on this error, undesirable pulses or ‘derivative kicks’ occur on the controller
output—right after the set-point is changed. These pulses, which last for one sampling interval, can be
avoided by having the derivative mode act on the controlled variable, rather than on the error.
(ii) A pure derivative term should not be implemented, because it will give a very large amplification of
the measurement noise. The gain of the derivative must thus be limited. This can be done by approxi-
mating the transfer function TD s as follows:
TD s
TD s @
a TD s + 1
where a is the filter parameter, whose value is not adjustable but is built into the design of the
controller. It is usually of the order of 0.05 to 0.3.
The PID controller, therefore, takes the form (refer Fig. 3.24c):
LM
U(s) = Kc E (s) +
1
E( s ) -
TsD O
Y ( s )P (3.57)
N Ts I aT s + 1
D Q
Discretization of this equation results in the following PID algorithm:
L
u(k) = K Me(k ) +
c
1 O
S(k ) + D(k )P (3.58)
N T I Q
S(k) = S(k – 1) + Te(k)
a TD TD
D(k) = D(k – 1) – [ y(k) – y(k – 1)]
aTD + T aTD + T
Models of Digital Control Devices and Systems 145
Velocity PID Algorithm This is a recursive algorithm characterized by the calculation of the current
control variable u(k) based on the previous control variable u(k – 1) and correction terms. To derive the
recursive algorithm, we subtract from Eqn. (3.56)
LM
u(k – 1) = Kc e(k - 1) +
1 T
S( k - 1) + D (e(k - 1) - e(k - 2))
OP (3.59)
N TI T Q
This gives
LM
u(k) – u(k – 1) = Kc e(k ) - e(k - 1) +
T T
e(k ) + D [e( k ) - 2e(k - 1) + e( k - 2)]
OP (3.60)
N TI T Q
Now, only the current change in the control variable
Du(k) = u(k) – u(k – 1) (3.61)
is calculated. This algorithm is known as the ‘incremental form’ or ‘velocity form’ of the PID algorithm. The
distinction between the position and velocity algorithms is significant only for controllers with integral effect.
The velocity algorithm provides a simple solution to the requirement of bumpless transfer. The problem
of bumps arises mainly from the need for an ‘initial condition’ on the integral; and the solution adopted is to
externalize the integration as shown in Fig. 3.31. The external integration may take the form of an electronic
integrator but frequently the type of actuating element is changed, so that recursive algorithm is used with
actuators which, by their very nature, contain integral action. Stepper motor (refer Section 3.8) is one such
actuating element.
Incremental Auto
e (k )
PID
algorithm u (k) u (k )
1
s
Manual
Fig. 3.31 Control scheme of bumpless transfer
Practical implementation of this algorithm includes the features of avoiding derivative kicks and filtering
measurement noise. Using Eqn. (3.58) we obtain
LM
Du(k) = Kc e(k ) - e(k - 1) +
T
e( k ) -
T
D( k - 1) -
TD
( y(k ) - y(k - 1))
OP (3.62)
N TI a TD + T a TD + T Q
a TD TD
D(k) = D( k - 1) - [ y(k ) - y(k - 1)] (3.63)
a TD + T a TD + T
where y(k) = controlled variable; Du(k)= incremental control variable = u(k) – u(k – 1);
e(k) = error variable; Kc = controller gain;
TI = integral time; TD = derivative time; and T= sampling interval.
Tuning Rules for Digital Controllers Though tuning formulas that are specifically applicable to digital
control algorithms have been developed [12], the most popular and widely used tuning approach for digital
PID controllers is to apply rules of Tables 3.2–3.3 with a simple correction to account for the effect of
sampling. When a continuous-time signal is sampled at regular intervals of time, and is then reconstructed by
146 Digital Control and State Variable Methods
holding the sampled values constant for each sampling interval, the reconstructed signal is effectively delayed
by approximately one half of the sampling interval, as shown in Fig. 3.32a (also refer Example 2.17). In the
digital control configuration of Fig. 3.32b, the D/A converter holds the output of the digital controller
constant between updates, thus adding one half the sampling time to the dead-time of the process components.
The correction for sampling is then, simply, to add one half the sampling time to the dead-time obtained from
the process reaction curve.
1
tCD = tD + 2 T (3.64)
where tCD is the corrected dead-time, tD is the dead-time of the process, and T is the sampling interval.
Continuous
signal
Reconstructed
signal
T
2
T 2T 3T 4T 5T 6T t
(a)
A/D
(b)
Fig. 3.32 Time delay introduced by sampling and reconstruction
The tuning formulas given in Table 3.3 can directly be used for digital PID controllers with tD replaced by tCD.
Notice that the online tuning method, based on ultimate gain and period, inherently incorporates the effect of
sampling when the ultimate gain and period are determined with the digital controller included in the loop.
Tuning rules of Table 3.2 can, therefore, be applied to digital control algorithms without any correction.
This section describes the hardware features of the design of a microprocessor-based controller for tempera-
ture control in an air-flow system.
Figure 3.33 shows the air-flow system, provided with temperature measurement and having a heater grid
with controlled power input. Air, drawn through a variable orifice by a centrifugal blower, is driven past the
Models of Digital Control Devices and Systems 147
heater grid and through a length of tubing, to the atmosphere again. The temperature sensing element con-
sists of a bead thermistor fitted to the end of a probe inserted into the air stream 30 cms from the heater. The
task is to implement a controller, in the position shown by dotted box, to provide temperature control of the
air stream. It is a practical process control problem in miniature, simulating the conditions found in furnaces,
boilers, air-conditioning systems, etc.
Adjustable orifice
Heater Thermistor
The functions within the control loop can be broken down as follows:
(a) sampling of the temperature measurement signal at an appropriate rate;
(b) transfer of the measurement signal into the computer;
(c) comparison of the measured temperature with a stored desired temperature, to form an error signal;
(d) operation on the error signal by an appropriate algorithm, to form an output signal; and
(e) transfer of the output signal, through the interface, to the power control unit.
Amplifier Wheatstone
bridge
R
230 V
50 Hz
Triac control
pulses 0 tp T 2T Time
(a) (b)
r + e u y
D (z) G h0(s) G (s)
T
–
Controller Process
Triacs and firing circuit
Digital number °C
1
Feedback circuit
Fig. 3.36 A model for the temperature control system
To develop the digital controller D(z) for the process, we will follow the approach of controller tuning
(refer Section 3.5). A simple tuning procedure consists of the following steps:
(i) Obtain experimentally the dynamic characteristics of the process, either by open-loop or closed-loop tests.
(ii) Based on dynamic characteristics of a process, tuning rules have been developed by Ziegler and
Nichols (refer Tables 3.2–3.3). Use these rules to obtain initial settings of the controller parameters
Kc, TI, and TD of the PID controller
1
D(s) = Kc 1 +
LM
+ TD s
OP (3.66)
TI s N Q
(iii) Discretize the PID controller to obtain digital control algorithm for the temperature control process.
Thumb rules given in Section 2.13 may be followed for initial selection of sampling interval T.
In digital mode, the PID controller takes the form (refer Eqn. (2.125))
LM
D(z) = Kc 1 +
T F z + 1I + T F z - 1I OP = U(z)
D
(3.67)
N 2TI H z - 1K T H z K Q E(z)
(iv) Implement the digital PID controller. Figure 3.37 shows a realization scheme for the controller; the
proportional, integral, and derivative terms are implemented separately and summed up at the output.
(v) Fine tune Kc, TI, TD and T to obtain acceptable performance.
150 Digital Control and State Variable Methods
E (z) + + U (z )
Kc T / (2 T I) + z– 1 + +
+ +
TD / T z– 1 –
+
An open-loop test was performed on the air-flow system (Fig. 3.33) to obtain its dynamic characteristics.
Input : heater power
Output : air temperature
The test was carried out with a dc input signal. A wattmeter, on the input side, measured the heater power,
and a voltmeter, on the output side, measured the output (in volts) of the bridge circuit, which is proportional
to the air temperature in ºC.
Figure 3.38 shows the response for a step input of 20 watts. This process reaction curve was obtained for
a specific orifice setting.
40
30
20
Volts
24.8
10
0 10 20 30 40
t (seconds)
Fig. 3.38 Process reaction curve of the air-flow system
Approximation of the process reaction curve by a first-order plus dead-time model is obtained as follows
(refer Fig. 3.29):
The change in the process output at steady-state is found to be Dyss = 24.8 volts. Therefore the process gain
24.8
K= = 1.24 volts/watt
20
The line that is tangent to the process reaction curve at the point of maximum rate of change gives tD =
0.3 sec. The time at which the response is 0.632Dyss is found to be 0.83 sec. Therefore t + tD = 0.83; which
gives t = 0.53 sec. (It may be noted that the response is oscillatory in nature; therefore, a second-order model
will give a better fit. However, for coarse tuning, we have approximated the response by a first-order plus
dead-time model).
Models of Digital Control Devices and Systems 151
The process reaction curve of the air-flow system is thus represented by the model
Ke -tDs . e - 0.3s
124
G(s) = = (3.68)
ts + 1 0.53 s + 1
Taking a sampling interval T = 0.1 sec, we have (refer Eqn. (3.64))
1
tCD = tD + T = 0.35 sec
2
Using tuning formulas of Table 3.3, we obtain the following parameters for the PID controller.
Kc = 1.5t /(KtCD) = 1.832
TI = 2.5t CD = 0.875 (3.69)
TD = 0.4tCD = 0.14
This section describes hardware features of the design of a microprocessor based controller for a position
control system. The plant of our digital control system is an inertial load, driven by an armature-controlled
dc servomotor. The plant also includes a motor-drive circuit. The output of the drive circuit is fed to the
armature of the motor which controls the position of the motor shaft. In addition, it also controls the direc-
tion of rotation of the motor shaft.
Figure 3.39 gives hardware description of the position control system. Let us examine briefly the function
of each block.
Input port Output port
Digital
signal Micro-
Pre-
generator computer D/A amplifier
Commanded position
Input port Servo-
amplifier
Controlled position
Shaft Servomotor
encoder +
Load
The block labelled digital signal generator, interfaced to the microcomputer through an input port,
enables the user to feed the desired position (set point) of the motor shaft. A keyboard matrix can be used for
entering numerical commands into the digital system.
The microcomputer compares the actual position of the motor shaft with the desired position at each
sampling instant, and generates an error signal. The error signal is then processed as per the control algo-
rithm (to be given later), resulting in a control signal in digital form. The digital control signal is converted
152 Digital Control and State Variable Methods
to a bipolar (can be + ve or –ve) analog voltage in the D/A converter interfaced to the microcomputer. This
bipolar signal is processed in preamplifier and servoamplifier (power amplifier), enabling the motor to be
driven in one direction for positive voltage at preamplifier input, and in opposite direction for a negative
voltage.
With these units, the block diagram of Fig. 3.39 also shows a shaft encoder for digital measurement of
shaft position/speed. We now examine in detail the principle of operation of this digital device.
VII II
101 001
VI III
111 011
V IV
110 010
Fig. 3.40 Absolute encoder
Models of Digital Control Devices and Systems 153
Figure 3.40 is an example of an ‘absolute encoder’, so called because for a given angle the digital output
must always be the same. Note that a cyclic (Gray) binary code is normally used on absolute encoders (in
cyclic codes, only one bit changes between adjacent numbers). If a natural binary-code pattern were used, a
transition from, say 001 to 010, would produce a race between the two right-hand bits. Depending on which
photosensor responded faster, the output would go briefly through 011 or 000. In either case, a momentary
false bit pattern would be sent. Cyclic codes avoid such races. A cyclic code can be converted into natural
binary code by either hardware or computer software.
Encoders similar to Fig. 3.40 have been widely used. But they have certain disadvantages.
(i) The resolution obtainable with these encoders is limited by the number of tracks on the encoder disk.
The alignment of upto ten detectors and the laying out of ten tracks is still quite difficult and thus
expensive.
(ii) The resulting digital measurement is in a cyclic code and must usually be converted to natural binary
before use.
(iii) The large number of tracks and detectors, inevitably increases the chance of mechanical and/or electri-
cal failure.
For these reasons, another form of encoder is commonly used today and is known as the incremental
encoder. The basis of an incremental encoder is a single track served by a single detector, and laid out in
equal segments of ‘0’ and ‘1’, as in Fig. 3.41. As the track moves relative to the detector, a pulse train is
generated, and can be fed to a counter to record how much motion has occurred. With regard to this scheme
of measurement, the following questions may be raised.
(i) How do we know which direction the motion was?
(ii) If we can record only the distance moved, how do we know where we were?
Detector
Track motion
relative to
Counter
detector
The answer to the first question involves the addition of a second detector. Figure 3.42a shows two
detectors, spaced one half of a segment apart. As the track moves relative to the detectors (we assume at a
constant rate), the detector outputs vary with time, as shown in the waveforms of Fig. 3.42b. We can see that
the relative ‘phasing’ of the A and B signals depends upon the direction of motion, and so gives us a means
of detecting the direction.
For example, if signal B goes from ‘0’ to ‘1’ while signal A is at ‘1’, the motion is positive. For the same
direction, we see that B goes from ‘1’ to ‘0’ whilst A is at ‘0’. For negative motion, a similar but different pair
of statements can be made. By application of some fairly simple logic, it is possible to control a reversible
counter as is indicated in Fig. 3.43
This method of direction-sensing is referred to as quadrature encoding. The detectors are one half of a
segment apart, but reference to the waveforms of Fig. 3.42 shows that there are two segments to one cycle;
so the detectors are one-quarter of a cycle apart, and hence the name.
154 Digital Control and State Variable Methods
Segment
– +
Track motion
A B relative to
(a) detector
A
0
1
Positive
motion B
0
1
Negative
motion B
0
Time proportional to steady-state motion
(b)
Fig. 3.42 Quadrature encoding
Encoder
A Up
Logic Reversible
counter
Down
B
Quadrature outputs
Fig. 3.43 Direction-detecting circuit for an incremental encoder
The solution to the second problem also requires an additional detector working on a datum track as
shown in Fig. 3.44. The datum resets the counter every time it goes by.
We have thus three detectors in an incremental encoder. But this is still a lot less than on an absolute
encoder.
In an analog system, speed is usually measured by a tachogenerator attached to the motor shaft. This is
because the time differentiation of analog position signal presents practical problems.
Models of Digital Control Devices and Systems 155
Segment
A B Datum track
Datum detector
Encoder
A Up
Logic Reversible
counter
Down
B
Reset
Datum output
In a digital system, however, it is relatively easy to carry out step-by-step calculation of the ‘slope’ of the
position/time curve. We have the position data in digital form from the shaft encoder, so the rest is fairly
straightforward.
A B Encoder Interface Implementation In a position
Preset control control system, the load is connected to the motor through
a gear train. The encoder may be connected to the load
shaft/motor shaft directly or through a pulley system.
D Reversible To know the shaft position, the number of pulses
Q U/D obtained at the output of detector A or detector B have
CLK counter
to be counted. To know the direction of rotation, the
Digital output relative phasing of the outputs of detectors A and B
has to be sensed. To implement the direction sensing,
Fig. 3.45 A simple encoder interface circuit a negative edge-triggered D-flipflop may be used
(Fig. 3.45). This flipflop has two inputs:
(i) clock input, derived from the output of detector A of the encoder; and
(ii) ‘D’ input, derived from the output of detector B of the encoder.
Every time the flipflop is triggered on the 1 ® 0 transition of waveform A, the output of the D flipflop is
either 1 or 0, depending on the direction of rotation of the shaft. The output of the D flipflop thus serves as
the control for the up/down input of the counter, reversing the direction of its count whenever the shaft
reverses its direction.
3.7.2 Control Algorithm
The mathematical model of the position control under study is given by the block diagram of Fig. 3.46. The
magnitude of the digital output of the shaft encoder can be interpreted directly as the position of the motor
156 Digital Control and State Variable Methods
shaft in degrees, by proper design of the encoder interface. Similarly, the magnitude of the digital reference
input can be interpreted directly as reference input in degrees, by proper design of the keyboard matrix
interface. The error e (degrees) in position is processed by the control algorithm with transfer function D(z).
The control signal u (in volts) is applied to the preamplifier through the D/A converter. The plant
(preamplifier + servoamplifier + dc motor + load) is described by the transfer function
q ( s) 94
= G(s) = (3.70)
V ( s) s(0.3s + 1)
r + e u V q
D (z) G h0(s) G (s )
T
– Volts
Controller D/A Plant
To design the digital controller D(z) for this plant, we will follow the approach of discretization of analog
design (refer Section 2.14). The design requirements may be fixed as z = 0.7 and wn @ 10. The first step is to
find a proper analog controller D(s) that meets the specifications. The transfer function
( s + 3.33)
D(s) = Kc
s+a
cancels the plant pole at s = –3.33. The characteristic roots of
1 + D(s)G(s) = 0
give z = 0.7 and wn = 10 if we choose Kc = 0.32 and a = 14.
0.32(s + 3.33)
The controller D(s) = (3.71)
s + 14
gives the following steady-state behaviour:
Kv = lim sG(s)D(s) = 7.15
s®0
This may be considered satisfactory.
The discretized version of the controller D(s) is the proposed digital controller D(z) for the control loop
of Fig. 3.46. The D(z) will perform as per the specifications if the lagging effect of zero-order hold is
negligible. We take a small value for sampling interval T to satisfy this requirement. For a system with wn =
10 rad/sec, a very ‘safe’ sample rate would be—a factor of 20 faster than wn, yielding
ws = 10 ´ 20 = 200 rad/sec
2p
and T= @ 0.03 sec
ws
The dominant time constant of the plant is 0.3 sec. The sampling interval T is one-tenth of this value.
We use the bilinear transformation given by
s=
2 z-1 F I
T z +1H K
Models of Digital Control Devices and Systems 157
to digitize D(s). This results in
22.4 z - 20.27
D(z) =
80.67z - 52.67
0.278 - 0.25z -1 U ( z )
= = (3.72a)
1 - 0.653z -1 E( z )
The control algorithm is, therefore, given by
u(k) = 0.653 u(k – 1) + 0.278 e(k) – 0.25 e(k – 1) (3.72b)
This completes the digital algorithm design.
The explosive growth of the computer industry in recent years has also meant an enormous growth for
stepping motors, because these motors provide the driving force in many computer peripheral devices. Step-
ping motors can be found, for example, driving the paper-feed mechanism in printers. These motors are also
used exclusively in floppy disk drives, where they provide precise positioning of magnetic head on the disks.
The X and Y coordinate pens in plotters, are driven by stepping motors.
The stepping motor can be found performing countless tasks outside the computer industry as well. The
most common application is probably in analog quartz watches where tiny stepping motors drive the hands.
These motors are also popular in numerical-control applications (positioning of the workpiece and/or the
tool in a machine according to previously specified numerical data).
A stepping motor is especially suited for applications mentioned above because, essentially, it is a device
that serves to convert input information in digital form to an output that is mechanical. It thereby provides a
natural interface with the digital computer. A stepping motor, plus its associated drive electronics, accepts a
pulse-train input and produces an increment of rotary displacement for each pulse. We can control average
speed by manipulating pulse rate, and motor position by controlling the total pulse count.
Two types of stepping motors are in common use—the permanent magnet (PM), and the variable
reluctance (VR). Attention here is directed first to the PM motor.
4
Q1 Q2 Q3 Q4
Step Q1 Q2 Q3 Q4
1 ON OFF ON OFF
CCW rotation
CW rotation
2 ON OFF OFF ON
3 OFF ON OFF ON
4 OFF ON ON OFF
Direction
CW/CCW logic input
Fig. 3.49 Stepping motor driver (four phase)
b Pull-out torque
Torque
a Pull-in torque
Slew
c range
T1
Pull-in range
T2
S1 S2 S3 S4 S5
Stepping rate
Fig. 3.51 Torque versus stepping rate characteristics
For a frictional load requiring torque T1 to overcome friction, the maximum slewing rate at which the motor
can run is S4. S5 is the maximum slewing rate at which the unloaded motor can run without losing steps.
Curve c in Fig. 3.51 gives the pull-in torque with external inertia. It is obvious that if the external load
results in a pull-in torque curve c, the torque developed by the motor at step rate S1 is T2 < T1. The stepping
motors are more sensitive to the inertia of the load than they are to its friction.
Figure 3.52 also shows a simple drive circuit for the stepping motor. Power transistors Q1-Q4 act as
switching elements.
When a power transistor is turned off, a high voltage builds up due to di/dt, which may damage the
transistor. This surge in voltage can be suppressed by connecting a diode in parallel with each winding in the
polarity shown in Fig. 3.52. Now, there will be a flow of circulating current after the transistor is turned off,
and the current will decay with time.
3.8.5 Comments
Stepping motors present a number of pronounced advantages, as compared to conventional electric motors:
(i) Since the stepping-motor shaft angle bears an exact relation to the number of input pulses, the motor
provides an accurate open-loop positioning system without the need for closing the loop with a posi-
tion encoder, comparator, and servoamplifier, as is done in conventional closed-loop systems.
(ii) If the stepping motor receives a continuous train of pulses at constant frequency, it rotates at a constant
speed provided neither the load torque nor the pulse frequency are excessive for the given motor. The
stepping motor can thus take the place of a velocity servo, again, without the need for a closed-loop
system. By changing pulse frequency, the motor speed can be controlled. Even low velocities can be
maintained accurately, which is difficult to do with conventional dc motors.
(iii) By driving several motors from the same frequency source, synchronized motions at different points in
a machine are easily obtained. Using standard frequency-divider chips, we can drive a motor at a
precise fraction of another motor’s speed, giving an electronic gear train.
(iv) If the motor stator is kept energized during standstill, the motor produces an appreciable holding
torque. Thus, the load position can be locked without the need for clutch-brake arrangements. The
motor can be stalled in this manner indefinitely, without adverse effects.
Models of Digital Control Devices and Systems 163
There are, of course, also certain drawbacks.
(i) If the input pulse rate is too fast, or if the load is excessive, the motor will ‘miss’ steps, making the
speed and position inaccurate.
(ii) If the motor is at rest, an external disturbing torque greater than the motor’s holding torque, can twist
the motor shaft away from its commanded position by any number of steps.
(iii) With high load inertias, overshooting and oscillations can occur unless proper damping is applied, and
under certain conditions, the stepping motor may become unstable.
(iv) The stepping motors are only available in low or medium hp ratings, upto a couple of hp (in theory,
larger stepping motors could be built, but the real problem lies with the controller—how to get large
currents into and out of motor windings at a sufficiently high rate, inspite of winding inductance).
(v) Stepping motors are inherently low-speed devices, more suited for low-speed applications because
gearing is avoided. If high speeds are required, this of course becomes a drawback.
Since the cost and simplicity advantages of stepping-motor control systems erode when motion sensors
and feedback loops are added, much effort has gone into improving the performance of open-loop systems:
(i) As explained earlier in connection with Fig. 3.51, the permissible pulse rate for starting an inertia load
(i.e., the pull-in rate), is much lower than the permissible pulse rate once the motor has reached maxi-
mum speed (pull-out rate). A good controller brings the motor upto its maximum speed gradually, a
process called ramping2, in such a manner that no pulses are lost. Similarly, a good controller controls
deceleration when the motor is to be stopped.
(ii) Various schemes for improving damping to prevent overshooting and oscillations when the motor is to
be stopped, are available. Mechanical damping devices provide a simple solution, but these devices
reduce the available motor torque and also, mostly, require a motor with a double-ended shaft. There-
fore, electronic damping methods are usually preferred. A technique called back-phase damping con-
sists of switching the motor into the reverse direction using the last few pulses of a move.
(iii) The more sophisticated controllers are able to provide so-called microstepping. This technique per-
mits the motor shaft to be positioned at places other than the natural stable points of the motor. It is
accomplished by proportioning the current in two adjacent motor windings. Instead of operating the
winding in the on-off mode, the current in one winding is decreased slightly, but increased in the
adjacent winding.
(iv) Complex drive circuits that offer good current build-up without loss at high stepping rates, are used.
Although the advantages of stepping-motor drives in open-loop systems are most obvious, closed-loop
applications also exist. A closed-loop stepping motor drive can be analysed using classical techniques
employed for continuous-motion systems. For a detailed account of stepping motors, refer [52].
A great deal of what has been said in this book so far about control systems seems exotic: algorithms for
radar tracking, drives for rolling mills, filters for extracting information from noisy data, methods for
numerical control of machine tools, fluid-temperature control in process plants etc. Underlying most of these
are much more mundane tasks: turning equipment (pumps, conveyor belts, etc.) on and off; opening and
closing of valves (pneumatic, hydraulic); checking sensors to be certain they are working; sending alarms
when monitored signals go out of range; etc. Process control plants and manufacturing floors share this need
for simple, but important, tasks.
2
Refer [96] for detailed description of hardware and software.
164 Digital Control and State Variable Methods
These so-called logic control functions can be implemented using one of the most ingenious devices ever
devised to advance the field of industrial automation. So versatile are these devices, that they are employed
in the automation of almost every type of industry. The device, of course, is the programmable controller,
and thousands of these devices go unrecognized in process plants and factory environments—quietly moni-
toring security, manipulating valves, and controlling machines and automatic production lines.
Industrial applications of logic control fall mainly into two types; those in which the control system is
entirely based on logic principles, and those that are mainly of a continuous feedback nature and use a
‘relatively small’ amount of logic in auxiliary functions such as start-up/shut-down, safety interlocks and
overrides, and mode switching. Programmable controllers, originally intended for ‘100%’ logic systems,
have, in recent years, added the capability of conventional feedback control; making them very popular—
since one controller can now handle in an integrated way all aspects of operation of a practical system, that
includes both types of control problems. General purpose digital computers could also handle such situa-
tions, but they are not as popular as the programmable controllers, for the following reasons:
In theory, general-purpose computers can be programmed to perform most of the functions of program-
mable controllers. However, these machines are not built to operate reliably under industrial conditions,
where they can be exposed to heat, humidity, corrosive atmosphere, mechanical shock and vibration, elec-
tromagnetic noise, unreliable ac power with dropping voltages, voltage spikes etc. A programmable control-
ler is a special-purpose computer especially designed for industrial environments. A general-purpose com-
puter is a complex machine, capable of executing several programs or tasks simultaneously, and in any
order. By contrast, a programmable controller typically executes its tiny program continuously hundreds of
millions of times before being interrupted to introduce a new program. General-purpose computers can be
interfaced with external equipment with special circuit cards. In programmable controllers by comparison,
the hardware interfaces for connecting the field devices are actually a part of the controller and are easily
connected. The software of the controllers is designed for easy use by plant technicians. A programmable
controller is thus a special-purpose device for industrial automation applications—requiring logic control
functions and simple PID control functions; it cannot compete with conventional computers when it comes
to complex control algorithms and/or fast feedback loops, requiring high program execution speeds.
Early devices were called ‘programmable logic controllers (PLCs)’, and were designed to accept on-off
(binary logic) voltage inputs from sensors, switches, relay contacts, etc., and produce on-off voltage outputs
to actuate motors, solenoids, control relays, lights, alarms, fans, heaters, and other electrical equipment. As
many of today’s ‘programmable controllers’ also accept analog data, perform simple arithmetic operations,
and even act as PID (proportional-integral-derivative) process controllers, the word ‘logic’ and the letter ‘L’
were dropped from the name long ago. This frequently causes confusion, since the letters ‘PC’ mean differ-
ent things to different people; the most common usage of these letters being for ‘Personal Computer’. To
avoid this confusion, there has been a tendency latety to restore the letter ‘L’ and revive the designation
‘PLC’. We will follow this practice.
Before the era of PLCs, hardwired relay control panels were, in fact, the major type of logic systems, and
this historical development explains why the most modern, microprocessor-based PLCs still are usually
programmed according to relay ladder diagrams. This feature has been responsible for much of the wide-
spread and rapid acceptance of PLCs; the computer was forced to learn the already familiar human language
rather than making the humans learn a new computer language. Originally cost-effective for only large-scale
systems, small versions of PLCs are now available.
A sequenced but brief presentation of building blocks of a PLC, ladder diagrams, and examples of
industrial automation, follows [23–25]. It is not appropriate here to teach the reader the internal details,
performance specifications and programming details for any particular manufacturer’s PLC. These aspects
are described in manufacturers’ literature.
Models of Digital Control Devices and Systems 165
3.9.1 Logic Controls for Industrial Automation
A definition of logic controls, that adequately describes most applications, is that they are controls that work
with one-bit binary signals. That is, the system needs only to know that a signal is absent or present; its exact
size is not important. This definition excludes the field of digital computer control discussed so far in the
book. Conventional computer control also uses binary signals (though usually with many bits), the type of
application and the analysis methods are quite different for logic controls and conventional computer
controls, which is why we make the distinction.
Logic control systems can involve both combinational and sequential aspects. Combinational aspects are
implemented by a proper interconnection of basic logic elements such as AND, OR, NOT, so as to provide a
desired output or outputs, when a certain combination of inputs exists. Sequential effects use logic elements
together with memory elements (counters, timers, etc.), to ensure that a chain of events occurs in some desired
sequence. The present status of outputs depends, both, on the past and present status of inputs.
It is important to be able to distinguish between the nature of variables in a logic control system, and those
in a conventional feedback control system. To define the difference, we consider an example that employs
both the control schemes.
Figure 3.53 shows a tank with a valve that controls flow of liquid into the tank, and another valve that
controls flow out of the tank. A transducer is available to measure the level of the liquid in the tank. Also
shown is the block diagram of a feedback control system, whose objective is to maintain the level of the
liquid in the tank at some preset, or set-point value. We assume that the controller operates according to PID
mode of control, to regulate the level against variations induced from external influences. This is a continu-
ous variable control system because, both the level and the control valve setting can vary over a range to
achieve the desired regulation.
Input flow
Control valve
Controller Set-point
Solenoid
operated valve V 1
Photoelectric sensor
Empty Bottles Filled Bottles
Fixed
Rollers
LS
Limit Switch
Feed Motor Outfeed Motor Drive
Drive (always ON
M1 during process)
M2
Fig. 3.53 Composite conventional and logic control
166 Digital Control and State Variable Methods
The liquid-level control system is a part of the continuous bottle filling process. Periodically, a bottle
comes into position under the outlet valve. The level must be maintained at the set-point while the outlet
valve is opened and the bottle filled. This requirement is necessary to assure a constant pressure head during
bottle-filling. Figure 3.53 shows a pictorial representation of process hardware for continuous bottle-filling
control. The objective is to fill bottles moving on a conveyor, from the constant-head tank. This is a typical
logic control problem. We are to implement a control program that will detect the position of a bottle under
the tank outlet via a mechanically actuated limit switch, stop the feed motor M1 to stop the feed conveyor,
open the solenoid-operated outlet valve V1, and then fill the bottle until the photo sensor detects the filled
position. After the bottle is filled, it will close the valve V1, and restart the conveyor to continue to the next
bottle. The start and stop push buttons (PB) will be included for the outfeed motor, and for the start of the
bottle-filling process. Once the start PB is pushed, the outfeed motor M2 will be ON until the stop PB is
pushed. The feed motor M1 is energized once the system starts (M2 ON), and is stopped when the limit
switch detects the correct position of the bottle.
The sensors used for the logic control problem have characteristics different from those used for the
regulator problem. For the regulator problem, the level sensor is an analog device producing analog signal as
its output. For the logic control problem, sensors used are binary sensors producing on-off (binary logic)
signals. For example, a limit-switch consists of mechanically actuated electrical contacts. The contacts open
or close when some object reaches a certain position (i.e., limit), and actuates the switch. Hence, limit-
switches are binary sensors. Photoelectric sensors consist, basically, of a source emitting a light beam and a
light-sensing detector receiving the beam. The object to be sensed interrupts the beam, thereby making its
presence known without physical contact between sensor and object. The filled-bottle state of the product
can thus be sensed by a binary photoelectric sensor.
The system of Fig. 3.53 involves solenoid and electric motors as motion actuators. Thus, when the logic
controller specifies that ‘output valve be opened’, it may mean moving a solenoid. This is not done by a
simple toggle switch. Instead, one would logically assume that a small switch may be used to energize a relay
with contact ratings that can handle the heavy load. Similarly, an on-off voltage signal from the logic
controller may actuate a thyristor circuit to run a motor.
Power Supply
CPU
Signals from Input Signals to
Output
switches, Module solenoids,
Module
sensors, etc. Memory motors, etc.
Input devices such as push-buttons, sensors, and limit switches are connected to the input interface
circuit, called the input module. This section gathers information from the outside environment, and sends
Models of Digital Control Devices and Systems 167
it on to the CPU. Output devices such as solenoids, motor controls, indicator lights and alarms are connected
to the output interface circuit, called the output module. This section is where the calculation results from the
CPU are output to the outside environment. With the control application program (stored within the PLC
memory) in execution, the PLC constantly monitors the state of the system through the field input devices;
and based on the program logic, it then determines the course of action to be carried out at the field output
devices. This process of sequentially reading the inputs, executing the program in memory, and updating the
outputs is known as scanning.
Input Module Intelligence of an automated system is greatly dependent on the ability of a PLC to read
in the signals from various types of input field devices. The most common class of input devices in an
automated system is the binary type. These devices provide input signals that are ON/OFF or OPEN/
CLOSED. To the input interface circuit, all binary input devices are essentially a switch that is either open or
closed, signalling a 1(ON) or 0(OFF). Some of the binary input field devices alongwith their symbolic repre-
sentation are listed in Fig. 3.55.
PB LS
LS LS LS
(a) (b) (c) (d) (e)
Fig. 3.55 (a) Push-button, (b) Position limit switch, (c) Level limit switch, (d) Temperature
limit switch, (e) Pressure limit switch
As mentioned earlier, a switch is a symbolic representation of the field input device, interfaced to the
input module of the PLC. The device may be a manually operated push button, mechanically actuated limit
switch (the contacts open/close when some object reaches a certain position and actuates the switch), prox-
imity switch (device based on inductive/capacitive/magnetic effect which, with appropriate electronics, can
sense the presence of an object without a physical contact with the object), photoelectric sensor, level sen-
sor, temperature sensor, shaft encoder, etc. The main purpose of the input module is to condition the various
signals, received from the field devices, to produce an output to be sensed by the CPU. The signal condition-
ing involves converting power-level signals from field devices to logic-level signals acceptable to the CPU,
and providing electrical isolation so that there is no electrical connection between the field device (power)
and the controller (logic). The coupling between the power and the logic sections is normally provided by an
optical coupler.
During our discussion on PLC programming, it will be helpful if we keep in mind the relationship be-
tween the interface signals (ON/OFF) and their mapping and addressing used in the program. When in
operation, if an input signal is energized (ON), the input interface circuit senses the field device’s supplied
voltage and converts it to a logic-level signal acceptable to the CPU, to indicate the status of the device. The
field status information provided to the standard input module is placed into the input table in memory
through PLC instructions. The I/O address assignment document of the PLC manufacturer identifies each
field device by an address. During scanning, the PLC reads the status of all field input devices, and places
this information at the corresponding address locations.
Output Module An automation system is incomplete without means for interface to the field output
devices. The output module provides connections between the CPU and output field devices. The output
module receives from the CPU logic-level signals (1 or 0).
The main purpose of the output interface circuit is to condition the signals received from the CPU, to
produce outputs to actuate the output field devices. The signal conditioning circuit consists, primarily, of the
168 Digital Control and State Variable Methods
logic and power sections, coupled by an isolation circuit. The output interface can be thought of as a simple
switch through which power can be provided to control the output device.
During normal operation, the CPU sends to the output table, at predefined address locations, the output
status according to the logic program. If the status is 1, ON signal will be passed through the isolation circuit,
which, in turn, will switch the voltage to the field device through the power section of the module.
The power section of the output module may be transistor based, triac based, or simply, relay ‘contact
based’ circuit. The relay circuit output interface allows the output devices to be switched by NO (normally-
open) or NC (normally-closed) relay contact. When the processor sends the status (1 or 0) to the module
(through output table) during the output update, the state of the contact will change. If a 1 is sent to the
module from the processor, a normally open contact will close, and a normally closed contact will change to
an open position. If a 0 is sent, no change occurs to the normal state of the contacts. The contact output can
be used to switch either ac or dc loads; switching small currents at low voltages. High power contact outputs
are also available for switching of high currents.
Some of the output field devices, alongwith their symbolic representation, are given in Fig. 3.56.
SOL
PL AH
(a) (b) (c) (d)
H
NO NC
(e) (f) (g)
Fig. 3.56 (a) Motor, (b) Solenoid, (c) Pilot lamp, (d) Alarm horn, (e) Heater,
(f) Relay contact (Normally-Open), (g) Relay contact (Normally-Closed)
I/O Rack Enclosures Once we have the CPU programmed, we get information in and out of the PLC
through the use of input and output modules. The input module terminals receive signals from switches, and
other input information devices. The output module terminals provide output voltages to energize motors
and valves, operate indicating devices, and so on.
For small PLC systems, the input and output terminals may be included on the same frame as the CPU. In
large systems, the input and output modules are separate units; modules are placed in groups on racks, and
the racks are connected to the CPU via appropriate connector cables.
Generally speaking, there are three categories of rack enclosures—the master rack, the local rack, and
the remote rack. A master rack refers to the enclosure containing the CPU module. This rack may, or may
not, have slots available for the insertion of I/O modules. The larger the PLC system, the less likely that the
master rack will have I/O housing capability or space. A local rack is an enclosure which is placed in the
same location or area where the master rack is housed. If a master rack contains I/O, it can also be considered
a local rack. In general, a local rack contains a local I/O processor which receives and sends data to and from
the CPU.
As the name implies, remote racks are enclosures containing I/O modules located far away from the CPU.
A remote rack contains an I/O processor which communicates I/O information just like the local rack.
Timers/Counters Timers and counters play an important part in many industrial automation systems. The
timers are used to initiate events at defined intervals. The counters, on the other hand, are used to count the
occurrences of any defined event.
Models of Digital Control Devices and Systems 169
Basically the operation of both the timer and the counter is same, as a timer operates like a counter. The
counter shown in Fig. 3.57a, counts down from Set Value when its execution condition (count input) goes
from OFF to ON. When the value reaches zero, the counter contact point is turned ON. It is reset with a reset
input. The Set Value is decided by the programmer, and stored in the internal register of the counter through
control program instructions. The count input signal may refer to any event which may occur randomly.
When a count input signal occurs at fixed frequency, i.e., after every fixed interval of time, the counter
performs as a timer. Now 10 pulses, i.e., counts, will mean an elapsed time of 5 seconds, if the signal is
occurring after a regular interval of 0.5 seconds. The timer, shown in Fig. 3.57b, is activated when its
execution condition goes ON and starts decreasing from the Set Value. When the value reaches zero, the
timer contact point is turned ON. It is reset to Set Value when the execution condition goes OFF.
Count input
Counter Start input Timer
Reset input
Set Value Set Value
(a) (b)
Fig. 3.57 (a) Counter, (b) Timer
Memory Map It is unlikely that two different PLCs will have identical memory maps, but a generalization
of memory organization is still valid in the light of the fact that all PLCs have similar storage requirements. In
general, all PLCs must have memory allocated for the four items described below.
Executive The executive software is a permanently stored collection of programs that are considered a part
of the system itself. These programs direct system activities such as execution of the control program, com-
munication with peripheral devices, and other housekeeping activities. The executive area of memory is not
accessible to the user.
Scratch Pad It is a temporary storage used by the CPU to store a relatively small amount of data for interim
calculations or control.
Data Table This area stores any data associated with the control program, such as timer/counter set values,
and any other stored constants or variables that are used by the control program. This section also retains the
status information of the system inputs once they have been read, and the system outputs once they have
been set by the control program.
User Program This area provides storage for any programmed instructions entered by the user. The
control program is stored in this area.
The Data Table and the User Program areas are accessible and are required by the user for control
application. The Executive and Scratch Pad areas together are normally referred to as ‘system memory’, and
Data Table and User Program areas together are labelled as ‘application memory’.
Data Table Memory Area The data table area of the PLC’s application memory is composed of several
sections described below.
Input Table The input table is an array of bits that stores the status of discrete inputs which are connected
to input interface circuit. The maximum number of bits in the input table is equal to the maximum number of
field inputs that can be connected to the PLC. For instance, a controller with 128 inputs would require an
input table of 128 bits. If the PLC system has 8 input modules, each with 16 terminal points, then the input
table in PLC memory (assuming 16 bit word length) will look like that in Fig. 3.58.
170 Digital Control and State Variable Methods
Rack
Terminal 12
Input
Slot
15 13 10 08 06 04 02 00
0 0 0 1 000
Bit
address
002
Input module
with 16 terminals
placed in 004
master rack
007
Word
address
Fig. 3.58 An illustrative input table
Each terminal point on each of the input modules will have an address by which it is referenced. This
address will be a pointer to a bit in the input table. Thus, each connected input has a bit in the input table that
corresponds exactly to the terminal to which the input is connected. The address of the input device can be
interpreted as word location in the input table corresponding to the input module, and bit location in the
word corresponding to the terminal of the input module to which the device is connected.
Several factors determine the address of the word location of each module. The type of module, input or
output, determines the first number in the address from left to right (say, 0 for input, and 1 for output). The
next two address numbers are determined by the rack number and the slot location where the module is
placed. Figure 3.58 graphically illustrates a mapping of the input table, and the modules placed in rack 0
(master rack). Note that the numbers associated with address assignment depend on the PLC model used.
These addresses can be represented in octal, decimal, or hexadecimal. We have used decimal numbers.
The limit switch connected to the input interface (refer Fig. 3.58) has an address of 00012 for its corre-
sponding bit in the input table. This address comes from the word location 000 and the bit number 12; which
are related to the rack position where the module is installed, and the module’s terminal connected to the
field device, respectively. If the limit switch is ON (closed), the corresponding bit 00012 will be 1; if the
limit switch is OFF (open), its corresponding bit will be 0.
During PLC operation, the processor will read the status of each input in the input modules, and then
place this value (1 or 0) in the corresponding address in the input table. The input table is constantly chang-
ing—to reflect the changes in the field devices connected to the input modules. These changes in the input
table take place during the reading part of the processor scan.
Output Table The output table is an array of bits that controls the status of output devices, which are
connected to the output interface circuit. The maximum number of bits available in the output table is equal
to the maximum number of output field devices that can be interfaced to the PLC. For instance, a controller
with a maximum number of 128 outputs would require an output table of 128 bits.
Each connected output has a bit in the output table that corresponds exactly to the terminal to which the
output is connected. The bits in the output table are controlled (ON/OFF) by the processor, as it interprets
the control program logic. If a bit in the table is tuned ON (logic 1), then the connected output is switched
Models of Digital Control Devices and Systems 171
ON. If a bit is cleared or turned OFF (logic 0), the output is switched OFF. Remember that the turning ON or
OFF, of the field devices occurs during the update of outputs after the end of the scan.
Storage Area This section of the data table may be subdivided in two parts consisting of a work bit storage
area and a word storage area. The purpose of this data table section is to store data that can change, whether
it is a bit or a word (16 bits). Work bits are internal outputs which are normally used to provide interlocking
logic. The internal outputs do not directly control output field devices. When the processor evaluates the
control program, and any of these outputs is energized (logic 1), then this internal output, in conjunction with
other internal and/or real signals from field devices, forms an interlocking logic sequence that drives an
output device or another internal output.
The outputs of timers and counters are used as internal outputs which are generated after a time interval
has expired, or a count has reached a set value.
Assume that the timer/counter table in storage area has 512 points. Address assignment for these points
depends on the PLC model used. We will use TIM/CNT000 to TIM/CNT512 as the addresses of these
points. The word storage area will store the set values of timers/counters.
In our application examples given in the next subsection, we shall use word addresses 000 to 007 for input
table, and addresses 100 to 107 for output table. The input devices will be labelled with numbers such as
00000,..., 00015, and output devices with numbers such as 10000, ..., 10015.
We shall use word addresses 010 to 017 for internal outputs. Examples of typical work bits (internal
outputs) are 01000, ..., 01015. TIM/CNT000 to TIM/CNT512 are the typical addresses of timer/counter
points.
1 3 5 7 9 Time
(a) Switch interpretation (b) Timing chart
B C
Output
Inputs A+B=C
Input 1
A A
0
Output 1
B
B 0
1 3 5 7 9 Time
(a) Switch interpretation (b) Timing chart
B
A Output A=B
Input
1
A
0
1
B
0
A B
1
C C
0
1 3 5 7 9 Time
(a) Ladder diagram (b) Timing chart
Fig. 3.62 AND NOT function
174 Digital Control and State Variable Methods
Consider now the logic system
A+ B =C
read as “A OR NOT B equals C ”.
The ladder diagram and timing chart for this system are given in Fig. 3.63.
00000 10000
(a)
00000
10000
(b)
10000
00000
00001 10000
(c)
10000
1
00000
0
1
(d) 00001
0
1
10000
0
1 3 5 7 9
Fig. 3.64 Start/Stop pushbutton system
Trap door
Automatic
weigh
station
Overweight track
Fig. 3.65 Automatic weigh station on a conveyor system
176 Digital Control and State Variable Methods
The variables of the logic system are defined as follows (refer Fig. 3.66a). 00000 represents the pressure
switch connected to terminal 00 of input module 000. It senses the overweight item on the automatic weigh
station. The bit 00000 in the input table latches 1 for the overweight item. 10000 represents a solenoid
connected to terminal 00 of the output module 100, which pushes the trap door open. When the bit 10000 in
the output table latches 1, the trap door is open and when the bit is 0, the trap door is closed.
Fig. 3.66
For a 4 sec delay, the set value 0040 is stored in word storage area of memory. Count down of this number
to 0000 will give an elapsed time of 4 seconds in our PLC system wherein we assume that the timer counts
time-based intervals of 0.1 sec (40 counts will mean an elapsed time of 4 sec).
The timer TIM000 is activated when its execution condition goes ON and starts decreasing from the set
value. When the value reaches 0000, the timer contact point is tuned ON. It is reset to set value when the
execution condition goes OFF. The timer contact point works as internal work bit (A work bit/internal output
is for use of program only; it does not turn ON/OFF external field devices).
It is obvious from the ladder diagram of Fig. 3.66a that once an overweight item is detected, the trap door
opens; it remains open for 4 sec, and thereafter it closes. Figure 3.66b shows the timing chart for the logic
system.
Part sensor
Box sensor
Box conveyor
Fig. 3.68). The work bit is 1 when packaging line control is ON, and it is 0 when packaging line control is
OFF. The work bit is useful where the same combination of input signals appears repeatedly in the ladder
diagram. We will shortly see that work bit 01000 is helpful in simplifying the ladder diagram.
The event sequences are as follows.
(i) Box proximity sensor in ‘0’ state; box conveyor will start, keeping part conveyor standstill.
(ii) Box proximity sensor in ‘1’ state; box conveyor will
stop, signalling the start of the part conveyor.
(iii) Part proximity sensor in ‘1’ state and box proximity sensor
in ‘1’ state; this state signals the execution of the counter.
A counter counts down how many times input is turned
ON. It counts down from set value, when its execution condi-
tion (count input) goes from OFF to ON. It decrements one
count every time the input signal goes from OFF to ON. When
the value reaches 0000, the counter contact point is turned
ON. It is reset with a reset input. The counter contact point
works as internal work bit.
The execution signal for our counter is generated by part
proximity sensor 00002 and reset signal is generated by box prox-
imity sensor 00003. For counting to occur, we need both the part
proximity sensor and the box proximity sensor in ‘1’ state.
(iv) Assume that set value 0010 of count has been loaded in
word storage area of memory. When the value reaches
0000, the work bit CNT010 takes ‘1’ state, which starts
the box conveyor.
(v) Box proximity switch gets deactivated and count stops.
Fig. 3.68 Ladder diagram of logic system The timing chart is shown in Fig. 3.69.
178 Digital Control and State Variable Methods
1
00000
0
1
00001
0
1
01000
0
1
00002
0
1
00003
0
1
CNT010
0
1
10000
0
1
10001
0
Time
Fig. 3.69 Timing chart
Review Examples
Review Example 3.1 We have so far used the z-transform technique to obtain system response at the
sampling instants only. In a large number of cases, this information is adequate because, if the sampling
theorem is satisfied, then the output will not vary too much between any two consecutive sampling instants.
In certain cases, however, we may need to find the response between consecutive sampling instants. Often,
for example, hidden oscillations, that may or may not decay with time, are present. We can compute ripple
(response between sampling instants) by introducing a fictitious delay of DT seconds at the output of
the system, where 0 £ D £ 1 and T is the sampling period. By varying D between 0 and 1, the output y(t) at
t = kT – DT (where k = 1, 2, ...) may be obtained.
In Example 3.1, unit-step response of the sampled-data system of Fig. 3.13a was obtained. The sampling
period T = 1 sec, and the output at the sampling instants is given by
y(T ) = 0.3679, y(2T ) = 1, y(3T ) = 1.3996, y(4T ) = 1.3996,
y(5T ) = 1.1469, y(6T ) = 0.8944, y(7T ) = 0.8015, ...
We now introduce at the output a fictitious delay of DT seconds with D = 0.5 as shown in Fig. 3.71. The
output y$ (kT) can be determined as follows:
Y$ (z) = Z [Gh0 (s) e–DTs] E(z)
E(z) = R(z) – Y(z)
Y(z) = Z [Gh0(s)G(s)] E(z)
r ( t) e* (t) y (t) y (t )
+ 1
G h0 (s) G (s ) = eE Ts
T s(s + 1)
–
R( z)
Therefore E(z) =
1 + Z [Gh 0 ( s)G( s )]
Z [Gh 0 ( s) G(s )e - DTs ]
Y$ ( z ) = R(z) (3.73)
1 + Z [Gh 0 (s) G(s)]
Models of Digital Control Devices and Systems 181
Referring to Example 3.1, we have
0.3679 z + 0.2642
Z [Gh0(s)G(s)] = 2
z - 1.3679 z + 0.3679
Referring to Table 3.1, we get
Z [Gh0(s)G(s)e–DTs] = (1 – z–1)
LM 1 2 -
0.5
+
0.6065 OP
N (z - 1) ( z - 1) ( z - 0.3679) Q
0.1065 z 2 + 0.4709 z + 0.0547
=
z 3 - 1.3679 z 2 + 0.3679 z
Referring to Eqn. (3.73) and noting that R(z) = z/(z – 1), we have
0.1065 z -1 + 0.4709 z -2 + 0.0547 z -3
Y$( z ) =
1 - 2 z -1 + 1.6321 z -2 - 0.6321 z -3
This equation can be expanded into an infinite series in z–1:
Y$ ( z ) = 0.1065 z–1 + 0.6839 z–2 + 1.2487 z–3 + 1.4485 z–4
+ 1.2913 z–5 + 1.0078 z–6 + 0.8236 z–7 + 0.8187 z–8 + L
Therefore
y$ (T ) = y(0.5T) = 0.1065; y$ (2T ) = y(1.5T) = 0.6839; y$ (3T ) = y(2.5T) = 1.2487;
y$ (4T ) = y(3.5T) =1.4485; y$ (5T ) = y(4.5T) = 1.2913; y$ (6T ) = y(5.5T) = 1.0078;
y$ (7T ) = y(6.5T) = 0.8236; y$ (8T ) = y(7.5T) = 0.8187; L
These values give the response at the midpoints between pairs of consecutive sampling points. Note that
by varying the value of D between 0 and 1, it is possible to find the response at any point between two
consecutive sampling points.
Review Example 3.2 Reconsider the sampled-data system of Example 3.2 (Fig. 3.15). The characteristic
polynomial of the system is
D(z) = 1 + Gh0G(z) = z2 – az + b
where a = 1 + e–2T – 0.5K (T + 0.5e–2T – 0.5)
b = e–2T + 0.5K (0.5 – 0.5e–2T – Te–2T)
Employing stability constraints (2.75a) of the Jury stability criterion, we get
(i) D(1) = 1 – a + b > 0
(ii) D(– 1) = 1 + a + b > 0
(iii) b < 1
Thus, for a stable system, 1+a+b>0 (3.74a)
1–b>0 (3.74b)
1–a+b>0 (3.74c)
Substituting for a and b into (3.74a) and solving for K, yields
4
K< -2 T
T - (1 - e )/(1 + e -2 T )
182 Digital Control and State Variable Methods
From (3.74b), we get
2
K< 2T 2T
0.5 (Te )/(1 e )
and from (3.74c),
e–2T < 1
Table 3.4 indicates the values of K obtained for various values of T from (3.74a) and (3.74b). A sketch of
T versus the boundary value of K for a stable system is shown in Fig. 3.72. Note that lim K = ¥.
T® 0
Unstable region
T
Fig. 3.72 T versus boundary value of K for stability
3
In addition to parameter quantization error, accuracy of a realization is affected by the error due to quantization of
the input signal, and the error due to accumulation of round-off errors in arithmetic operations.
Models of Digital Control Devices and Systems 183
is the characteristic equation with roots l1, l2, K, ln:
D (z, a1, a2, ..., an) = (z – l1) (z – l2) L (z – ln) (3.77)
We shall consider the effect of parameter aj on the root lk. By definition,
D(lk, aj) = 0
If aj is changed to aj + daj, then lk also changes and the new polynomial is
¶D ¶D
D(lk + dlk, aj + daj) = D(lk, aj) + dlk + daj + L = 0
¶z z = lk ¶a j
z = lk
Neglecting the higher-order terms, we obtain
dlk = –
FG ¶D / ¶a IJ j
daj (3.78)
H ¶D / ¶z K z = lk
From Eqn. (3.76),
¶D
= lnk- j
¶a j
z = lk
and from Eqn. (3.77),
¶D
= P (lk – li)
¶z z = lk i=k
Problems
3.1 Find Y(z)/R(z) for the sampled-data closed-loop system of Fig. P3.1.
184 Digital Control and State Variable Methods
H (s )
Fig. P3.1
3.2 For the sampled-data feedback system with digital network in the feedback path as shown in Fig. P3.2, find
Y(z)/R(z).
y (k)
H (z )
T
Fig. P3.2
3.3 Find Y(z) for the sampled-data closed-loop system of Fig. P3.3.
H (s )
Fig. P3.3
3.4 Obtain the z-transform of the system output for the block diagram of Fig. P3.4.
H 2 (s)
r (t ) e (k ) u * (t ) + y ( t)
+ +
H 1 (s ) D (z ) G h0 (s) G p (s )
– T T
Fig. P3.4
3.5 Obtain the transfer function Y(z)/R(z) of the closed-loop control system shown in Fig. P3.5. Also obtain the
transfer function between X(z) and R(z).
r ( t) + + e (k) u * (t) x ( t) y (t)
D (z) G h0 (s) G 1 (s ) G 2 (s )
– – T T
Fig. P3.5
Models of Digital Control Devices and Systems 185
3.6 Consider the block diagram of a digital control system shown in Fig. P3.6; r(t) stands for reference input and
w(t) for disturbance. Obtain the z-transform of the system output when r(t) = 0.
w (t)
+ y (t)
r ( t) + e (k) u * ( t) +
D (z) G h0 (s) G (s)
– T T
Fig. P3.6
3.7 Shown in Fig. P3.7 is the block diagram of the servo control system for one of the joints of a robot. With D(z)
= 1, find the transfer function model of the closed-loop system. Sampling period T = 0.25 sec.
Compensator Preamplifier Gears
qR (k ) + 1 1 qM 1 qL ( t)
D (z) D /A 20
– s+1 s 20
Motor
qL (k )
Shaft
encoder
Fig. P3.7
3.8 The plant of the speed control system shown in Fig. P3.8 consists of load, armature-controlled dc motor and a
power amplifier. Its transfer function is given by
w (s) 185
=
V( s ) 0.025 s + 1
Find the discrete-time transfer function w(z)/wr(z) for the closed-loop system. Sampling period T = 0.05 sec.
KF
+
w r (k ) + + v(t) w(t)
KP D/A Plant
–
w (k ) Shaft
encoder
Fig. P3.8
186 Digital Control and State Variable Methods
3.9 For the system shown in Fig. P3.9, the computer solves the difference equation u(k) = u(k – 1) + 0.5 e(k), where e(k)
is the filter input and u(k) is the filter output. If the sampling rate fs = 5 Hz, find Y(z)/R(z).
r (k ) + e(k ) u (k ) 1 y (t)
Digital
D/A
filter s (s + 1)
–
y (k )
A/D
Fig. P3.9
3.10 Consider the sampled-data system shown in Fig. P3.10. Find Y(z)/R(z) when (i) tD = 0.4 sec, (ii) tD = 1.4 sec.
Fig. P3.10
3.11 Figure P3.11 shows an electrical oven provided with temperature measurement by a thermocouple and having
a remotely controlled, continuously variable power input. The task is to design a microprocessor-based control
system to provide temperature control of the oven.
Temperature-
measuring device Microcontroller
Oven
Continuously-variable
electrical input Power supply
Fig. P3.11
The functions within the control loop can be broken down as follows:
(i) sampling of the output of thermocouple;
(ii) transfer of temperature signal into the computer;
(iii) comparison of the measured temperature with the stored desired temperature, to form an error signal;
(iv) operation on the error signal by an appropriate algorithm, to form a control signal; and
(v) processing of the control signal and its transfer through the interface to the power control unit.
Suggest suitable hardware to implement these control-loop functions. Make a sketch of the system showing
how the hardware is connected.
Models of Digital Control Devices and Systems 187
3.12 (a) A unity feedback system has the open-loop transfer function
5
G(s) =
s(s + 1)( s + 2)
Using the Routh stability criterion, show that the closed-loop system is stable.
(b) A sampler and ZOH are now introduced in the forward path (Fig. P3.12). Show that the stable linear
continuous-time system becomes unstable upon the introduction of sampler and ZOH.
r (t ) + 5 y (t)
G h0(s)
T = 1 sec s(s + 1) ( s + 2)
–
Fig. P3.12
R (s) + 1 – e– Ts K Y (s)
T s (s + 3)
–
Fig. P3.14
R (s) + K Y (s)
G h0(s)
T s(s + 1)
–
Fig P3.15
3.16 Consider the system shown in Fig. P3.16. Using Jury stability criterion, find the range of K > 0 for which the
system is stable.
188 Digital Control and State Variable Methods
R (s) + 1 – e– Ts Ke–Ts Y (s )
T = 1 sec s s(s + 1)
–
Fig. P3.16
3.17 (a) A unity feedback system has the open-loop transfer function
Y (s ) 4500 K
G(s) = = ; K = 14.5
R( s) s(s + 361.2)
Find the response y(t) of the system to a unit-step input.
(b) A sampler and ZOH are now introduced in the forward path (Fig. P3.17). For a unit-step input, determine
the output y(k) for first five sampling instants when (i) T = 0.01 sec, and (ii) T = 0.001 sec. Compare the
result with that obtained earlier in part (a) above.
r (t) + y (t)
G h0(s) G (s)
T
–
Fig. P3.17
3.18 For the sampled-data system shown in Fig. P3.18, find the output y(k) for r(t) = unit step.
r (t) + 1 y (t)
ZOH G (s) =
T = 1 sec s+1
–
1
H (s ) =
s
Fig. P3.18
3.19 For the sampled-data system of Fig. P3.19, find the response y(kT); k = 0, 1, 2, ..., to a unit-step input r(t). Also,
obtain the output at the midpoints between pairs of consecutive sampling points.
r (t) + y ( t)
1
ZOH
T = 1 sec s+1
–
Fig. P3.19
3.20 Consider the digital controller defined by
U ( z) 4( z - 1) ( z 2 + 12
. z + 1)
D(z) = =
E (z) ( z + 0.1) ( z 2 - 0.3z + 0.8)
Models of Digital Control Devices and Systems 189
Realize this digital controller in the cascade scheme and in parallel scheme. Use one first-order section and one
second-order section.
3.21 Consider the digital controller defined by
U (z) 10( z 2 z 1)
D(z) = = 2
E ( z) z ( z 0.5)( z 0.8)
Draw a parallel realization diagram.
3.22 Consider the temperature control system shown in Fig. P3.22a. A typical experimental curve, obtained by
opening the steam valve at t = 0 from fully closed position to a position that allows a flow Qm of 1 kg/min with
initial sensor temperature q of 0 ºC is shown in Fig. P3.22b.
(a) Approximate the process reaction curve by a first-order plus dead-time model using two-points method of
approximation.
(b) Calculate the QDR tuning parameters for a PID controller. The PID control is to be carried out with a
sampling period of 1 min on a computer control installation.
Dial
10 °C
20 °C
Environment
30 °C
40 °C
Steam
boiler Radiator
Valve
Room
qss = 30
0.632 qss
0.283 qss
0 25 65 t, min
(b)
Fig. P3.22
3.23 Consider the liquid-level control system shown in Fig. 1.6. The digital computer was programmed to act as
adjustable-gain proportional controller with a sampling period of T = 10 sec. The proportional gain was
increased in steps. After each increase, the loop was disturbed by introducing a small change in set-point, and
the response of the controlled variable (level in tank 2) was observed. The proportional gain of 4.75 resulted in
oscillatory behaviour, with amplitude of oscillations approximately constant. The period of oscillations
measured from the response is 800 sec.
The PC implements the digital PI control algorithm. Determine tuning parameters for the controller:
LM
Du(k) = u(k) – u(k – 1) = Kc e( k ) - e( k - 1) +
T
e(k )
OP
N TI Q
190 Digital Control and State Variable Methods
where
u(k) = output of controller at kth sampling instant
Du(k) = change in output of controller at kth sampling instant
e(k) = error at kth sampling instant
T = sampling time
TI = integral time
Kc = proportional gain
3.24 A traffic light controller is to be designed for a road, partly closed to traffic for urgent repair work (Fig. P3.24).
North traffic light will go GREEN for 30 sec with South traffic light giving RED signal. For the next 15 sec,
both the traffic lights will give RED signals. Thereafter South traffic light will go GREEN for 30 sec with North
traffic light giving RED signal. Both the traffic lights will give RED signal for the next 15 sec. Then this cycle
repeats.
Develop a PLC ladder diagram that accomplishes this objective.
Fig. P3.24
3.25 Consider the tank system of Fig. P3.25. Valve V1 opens on pressing a pushbutton PB1 and liquid begins to fill
the tank. At the same time, the stirring motor M starts operations. When the liquid level passes LL2 and reaches
LL1, the valve V1 closes and the stirring motor stops. When PB1 is pressed again, the valve V2 opens and starts
draining the liquid. When the liquid level drops below LL2, valve V2 closes. This cycle is repeated five times.
A Buzzer will go high after 5 repetitions. The buzzer will be silenced by pressing push button PB2. The process
will now be ready to take up another filling-stirring-draining operation under manual control. Develop a PLC
ladder diagram that accomplishes this objective.
3.26 A control circuit is to be developed to detect and count the number of products being carried on an assembly
line (Fig. 3.26). A sensor activates a counter as a product leaves the conveyor and enters the packaging section.
When the counter counts five products, the circuit energizes a solenoid. The solenoid remains energized for a
period of 2 seconds; the time being measured by a software timer. When the set-time has lapsed, the solenoid is
deenergized, causing it to retract; and the control circuit is ready for the next cycle.
Develop a suitable PLC ladder diagram.
Models of Digital Control Devices and Systems 191
M
Liquid
V1
LL1
LL2 Solenoid
Sensor
Conveyor
V2
3.27 In the system of Fig. P3.27, a PLC is used to start and stop the motors of a segmented conveyor belt. This allows
only belt sections carrying an object to move. Motor M3 is kept ON during the operation. Position of a product
is first detected by proximity switch S3, which switches on the motor M2. Sensor S2 switches on the motor M1
upon detection of the product. When the product moves beyond the range of sensor S2, a timer is activated and
when the set-time of 20 sec has lapsed, motor M2 stops. Similarly, when the product moves beyond the range
of sensor S1, another timer is activated and when the set-time of 20 sec (for unloading the product) has lapsed,
motor M1 stops.
Develop a suitable ladder diagram for control.
S3
S2
S1
M3
M2
M1
Fig. P3.27
3.28 The system of Fig. P3.28 has the objective of drilling a hole in workpiece moved on a carriage. When the start
button PB1 is pushed and LS1 is ON (workpiece loaded), feed carriage motor runs in CW direction, moving the
carriage from left to right. When the work comes exactly under the drill, which is sensed by limit switch LS2,
the motor is cut-off and the work is ready for drilling operation. A timer with a set-time of 7 sec is activated.
When timer set-value has lapsed, the motor reverses, moving the carriage from right to left. When the work
piece reaches LS1 position, the motor stops.
The motor can be stopped by a stop pushbutton while in operation.
Develop a suitable ladder diagram for PLC control.
192 Digital Control and State Variable Methods
Drill
LS1 LS2
Clamp
Fig. P3.28
Design of Digital Control
4 Algorithms
4.1 INTRODUCTION
During recent decades, the design procedures for analog control systems have been well formulated and a
large body of knowledge accumulated. The analog-design methodology, based on conventional techniques
of root locus and Bode plots or the tuning methods of Ziegler and Nichols, may be applied to designing
digital control systems. The procedure would be to first design the analog form of the controller, or compen-
sator, to meet a particular set of performance specifications. Having done this, the analog form can be
transformed to a discrete-time formulation. This approach is based on the fact that a digital system with a
high sampling rate approximates to an analog system. The justification for using digital control under these
circumstances must be that the practical limitations of the analog controller are overcome, the implementa-
tion cheaper, or that the supervisory control and communications more easily implemented.
However, the use of high sampling rates wastes computer power, and can lead to problems of arithmetic
precision, etc. One is, therefore, driven to find methods of design which take account of the sampling process.
The alternative approach is to design controllers directly in the discrete-time domain, based on the speci-
fications of closed-loop system response. The controlled plant is represented by a discrete-time model which
is a continuous-time system observed, analysed, and controlled at discrete intervals of time. This approach
provides a direct path to the design of digital controllers. The features of direct digital design are that sample
rates are generally lower than for discretized analog design, and the design is directly ‘performance based’.
Figure 4.1 shows the basic structure of a digital control system. The design problem generally evolves around
the choice of the control function D(z), in order to impart a satisfactory form to the closed-loop transfer
function. The choice is constrained by the form of the function Gh0G(z) representing the fixed process elements.
r (t) + y (t)
D (z) G h0 (s) G (s)
– T T
Control ZOH Process
algorithm
H (s)
Sensor
Fig. 4.1 Basic structure of a digital control system
194 Digital Control and State Variable Methods
A wide variety of digital-design procedures is available; these fall into two categories:
(i) direct synthesis procedures; and
(ii) iterative design procedures.
The direct synthesis procedures assume that the control function D(z) is not restricted in any way by
hardware or software limitations, and can be allowed to take any form demanded by the nature of the fixed
process elements and the specifications of the required system performance. This design approach has found
wider applications in digital control systems—than has the equivalent technique used with the analog sys-
tems. In a digital control system, realization of the required D(z) may involve no more than programming a
special purpose software procedure. With analog systems, the limitation was in terms of the complications
involved in designing special purpose analog controllers.
The design obtained by a direct synthesis procedure will give perfect nominal performance. However,
the performance may be inadequate in the field because of the sensitivity of the design to plant disturbances and
modelling errors. It is important that a control system is robust in its behaviour with respect to the discrepancies
between the model and the real process, and uncertainties in disturbances acting on the process. Robustness
property of some of the standard control structures, such as a three-term (PID) control algorithm, has been very
well established. The design of such algorithms calls for an iterative design procedure where the choice of
control function D(z) is restricted to using a standard algorithm with variable parameters; the designer must
then examine the effect of the choice of controller parameters on the system performance, and make an appro-
priate final choice. The iterative design procedures for digital control systems are similar to the techniques
evolved for analog system design, using root locus and frequency response plots.
Figure 4.2 summarizes the basic routes to the design of digital controllers for continuous-time processes.
Continuous-time Process
Differential Experimentally obtained Differential
equations discrete data equations
Continuous-time
plant model Continuous-time
Identification of discrete-
model
time model
Discrete-time
approximation
Digital controller
r (t) + y (t)
G h0 (s) G (s)
– T
H (s)
In Section 1.4, we have described a generalized, operational block diagram of a feedback system
(Revisiting the section will be helpful). It was shown that the generalized, non-unity feedback block diagram
196 Digital Control and State Variable Methods
can be converted to a unity-feedback structure when the sensor transfer function is equal to the transfer
function representing the reference input elements. This, in fact, is quite common; the two transfer functions
in many control system designs are assumed to have zero-order dynamics and are equal.
The majority of the systems we deal with, in practice, belong to the class under consideration in this
chapter. However, the control system design techniques presented in the chapter, are not limited to this class.
There are control design problems wherein the sensor transfer function H(s) (of first or higher-order), is
explicitly present in the feedback path (Fig. 4.3a); the open-loop tranfer function G(s) or G(s)H(s), has poles
in the right half s-plane; and/or the oscillations in feedback system cannot be tolerated, and the system is
required to be overdamped. A detailed treatment of such problems is given in the companion book [155]; the
principles given therein for continuous-time control, have direct extension to discrete-time control. Our
decision to leave these extensions to the reader, is prompted only by the desire to save space for other topics.
The central concerns of controller design are for good relative stability and speed of response, good steady-
state accuracy, and sufficient robustness. Requirements on time response need to be expressed as constraints
on z-plane pole and zero locations, or on the shape of the frequency response in order to permit design in the
transform domain. In this section, we give an outline of specifications of controller design in the z-plane.
Our attention will be focused on the unity feedback systems1 of the from shown in Fig. 4.3b, with the
open-loop transfer function Gh0G(z) = Z [Gh0(s)G(s)], having no poles outside the unit circle in the
z-plane. Further, the feedback system of Fig. 4.3b is desired to be an underdamped system.
The nature of transient response of a linear control system is revealed by any of the standard test signals—
impulse, step, ramp, parabola—as this nature is dependent on system poles only and not on the type of the
input. It is, therefore, sufficient to specify the transient response to one of the standard test signals; a step is
generally used for this purpose. Steady-state response depends on both the system and the type of input.
From the steady-state viewpoint, the ‘easiest’ input is generally a step since it requires only maintaining the
output at a constant value, once the transient is over. A more difficult problem is the tracking of a ramp input.
Tracking of a parabola is even more difficult since a parabolic funciton is one degree faster than the ramp
funciton. In practice, we seldom find it necessery to use a signal faster than a parabolic function; character-
istics of actual signals which the control systems encounter, are adequately represented by step, ramp, and
parabolic functions.
1
It is assumed that the reader is familiar with the design of unity and nonunity feedback continuous-time systems.
With this background, the results presented in this chapter for unity feedback discrete-time systems, can easily be
extended for the nonunity feedback case.
Design of Digital Control Algorithms 197
For quantitative analysis, we consider the unity-feedback discrete-time system shown in Fig. 4.3b. The
steady-state error is the difference between the reference input r(k) and the controlled output y(k), when
steady-state is reached, i.e., steady-state error
* = lim e(k) = lim [r(k) – y(k)]
ess (4.1a)
k ®¥ k®¥
Using the final value theorem (Eqn. (2.52)),
* = lim [(z – 1)E(z)]
ess (4.1b)
z®1
provided that (z – 1) E(z) has no poles on the boundary and outside of the unit circle in the z-plane.
For the system shown in Fig. 4.3b, define
= lim
LM(z - 1) R(z) OP (4.3b)
z®1 N 1 + G G( z ) Q h0
Thus, the steady-state error of a discrete-time system with unity feedback, depends on the reference input
signal R(z), and the forward-path transfer function Gh0G(z). By the nature of the limit in Eqns (4.3), we see
that the result of the limit can be zero, or can be a constant different from zero. Also, the limit may not exist,
in which case, the final-value theorem does not apply. However, it is easy to see from basic definition (4.1a)
that ess* = ¥ in this case anyway, because E(z) will have a pole at z = 1 that is of order higher than one.
Discrete-time systems, having a finite nonzero steady-state error when the reference input is a zero-order
polynomial input (a constant), are labelled ‘Type-0’. Similarly, a system that has finite nonzero steady-state
error to a first-order polynomial input (a ramp), is called a ‘Type-1’ system, and a system with finite nonzero
steady-state error to a second-order polynomial input (a parabola), is called a ‘Type-2’ system.
Let the reference input to the system of Fig. 4.3b be a step function of magnitude unity. The z-transform
of discrete form of r(t) = m (t) is (refer Eqn. (2.40))
z
R(z) = (4.4a)
z 1-
Substituting R(z) into Eqn. (4.3b), we have
* = lim 1 1
ess =
z ® 1 1 + Gh 0 G( z ) 1 + lim Gh 0 G( z )
z®1
In terms of the position error constant Kp, defined as
Kp = lim Gh0G(z) (4.4b)
z®1
the steady-state error to unit-step input becomes
* = 1
ess (4.4c)
1 + Kp
198 Digital Control and State Variable Methods
For a ramp input r(t) = tm (t); the z-transform of its discrete form is (refer Eqn. (2.42))
Tz
R(z) = (4.5a)
( z - 1)2
Substituting into Eqn. (4.3b), we get
* = lim
T 1
ess =
z ® 1 ( z - 1)[1 + Gh 0 G( z )]
lim
z - 1 LM
Gh 0 G( z) OP
z ®1 T N Q
In terms of velocity error constant Kv, defined as
1
Kv = lim [(z – 1)Gh0G(z)] (4.5b)
T z®1
the steady-state error to unit-ramp input becomes
* =
1
ess (4.5c)
Kv
For a parabolic input r(t) = (t2/2) m (t); the z-transform of its discrete form is (from Eqns (2.41)–(2.42))
T 2 z( z + 1)
R(z) = (4.6a)
2( z - 1) 3
Substituting into Eqn. (4.3b), we get
* = lim
T2 1
ess =
z®1 ( z - 1)2 [1 + Gh 0 G( z )] LMF z - 1I 2
OP
lim Gh 0 G ( z)
z ®1
NH T K Q
In terms of acceleration error constant Ka, defined as
1
Ka = 2 lim [(z – 1)2 Gh0G(z)] (4.6b)
T z®1
the steady-state error to unit-parabolic input becomes
* =
1
ess (4.6c)
Ka
As said earlier, discrete-time systems can be classified on the basis of their steady-state response to
polynomial inputs. We can always express the forward-path transfer function Gh0G(z) as
K P( z - zi )
i
Gh0G(z) = ; pj ¹ 1, zi ¹ 1 (4.7)
( z - 1) N P( z - p j )
j
N
Gh0G(z) in Eqn. (4.7) involves the term (z – 1) in the denominator. As z ® 1, this term dominates in
determining the steady-state error. Digital control systems are, therefore, classified in accordance with the
number of poles at z = 1 in the forward-path transfer function, as described below.
Type-0 System If N = 0, the steady-state errors to various standard inputs, obtained from Eqns (4.1)–(4.7), are
1 K ( z – zi )
i
in response to unit-stepinput; Kp
1 Kp (z – p j )
* =
ess j z 1 (4.8a)
in response to unit- rampinput
in response to unit- parabolicinput
Design of Digital Control Algorithms 199
Thus a system with N = 0, or no pole at z = 1 in Gh0G(z), has a finite non-zero position error, and infinite
velocity and acceleration errors at steady-state.
Type-1 System If N = 1, the steady-state errors to various standard inputs are
0 in response to unit-step input;
K
( z – zi )
* =
1 T i
ess in response to unit- rampinput; K v (4.8b)
Kv (z – p j )
j z 1
in response to unit- parabolic input
Thus a system with N = 1, or one pole at z = 1 in Gh0G(z), has zero position error, a finite non-zero velocity
error, and infinite acceleration error at steady-state.
Type-2 System If N = 2, the steady-state errors to various standard inputs are
0 in response to unit-step input
0 in response to unit- ramp input
* =
ess K (4.8c)
( z – zi )
1 T2 i
in response to unit- parabolic input; K a
Ka (z – p j )
j z 1
Thus a system with N = 2, or two poles at z = 1 in Gh0G(z), has zero position and velocity errors, and a finite
non-zero acceleration error at steady-state.
Steady-state errors for various inputs and systems are summarized in Table 4.1.
1
Unit-step 0 0
1 + Kp
1
Unit-ramp ¥ 0
Kv
1
Unit-parabolic ¥ ¥
Ka
1 1
Kp = lim Gh 0G ( z ); Kv = lim [( z - 1) Gh0G( z )]; Ka = 2 lim [( z - 1) 2 Gh0G ( z )]
z ®1 T z®1 T z® 1
The development above indicates that, in general, increased system gain K, and/or addition of poles at
z = 1 to the open-loop transfer function Gh0G(z), tend to decrease steady-state errors. However, as will be
seen later in this chapter, both large system gain and the poles at z = 1 in the loop transfer function, have
destabilizing effects on the system. Thus, a control system design is usually a trade off between steady-state
accuracy and acceptable relative stability.
200 Digital Control and State Variable Methods
Example 4.1 In the previous chapter, we have shown that sampling usually has a deterimental effect on
the transient response and the relative stability of a control system. It is natural to ask what the effect of
sampling on the steady-state error of a closed-loop system will be? In other words, if we start out with a
continuous-time system and then add S/H to form a digital control system, how would the steady-state errors of
the two systems compare, when subject to the same type of input?
Let us first consider the system of Fig. 4.3b without S/H. Assume that the process G(s) is represented by
Type-1 transfer function:
K (1 + t a s)(1 + t b s) L (1 + t m s)
G(s) =
s(1 + t 1 s )(1 + t 2 s ) L (1 + t n s)
having more poles than zeros.
The velocity error constant
Kv = lim sG(s) = K
s®0
The steady-state error of the system to unit-step input is zero, to unit-ramp input is 1/K, and to unit-parabolic
input is ¥.
We now consider the system of Fig. 4.3b with S/H:
Gh0G(z) = (1 – z–1) Z
LM K (1 + t s)(1 + t s) L (1 + t s) OP
a b m
2
N s (1 + t s)(1 + t s) L (1 + t s) Q
1 2 n
) Z LM + O
K K
= (1 – z–1 1
2
N s s + terms due to the non-zero poles PQ
= (1 – z–1)M
L KTz + K z + terms due to the non-zero poles OP
1
2
N (z - 1) z - 1 Q
It is important to note that the terms due to the non-zero poles do not contain the term (z – 1) in the
denominator. Thus, the velocity error constant is
1
Kv = lim [(z – 1)Gh0G(z)] = K
T z®1
The steady-state error of the discrete-time system to unit-step input is zero, to unit-ramp input is 1/K, and
to unit-parabolic input is ¥. Thus, for a Type-1 system, the system with S/H has exactly the same steady-
state error as the continuous-time system with the same process transfer function (this, in fact, is true for
Type-0 and Type-2 systems also).
Equations (4.5b) and (4.6b) may purport to show that the velocity error constant and the acceleration
error constant of a digital control system depend on the sampling period T. However, in the process of
evaluation, T gets cancelled, and the error depends only on the parameters of the process and the type
of inputs.
Allowable
tolerance
Mp
1.0
tr t
tp
ts
The peak overshoot, Mp, is the peak value of the response curve measured from unity. The time at which
peak occurs is referred to as the peak time, tp.
The time required for the response to damp out all transients, is called the settling time, ts. Theoretically,
the time taken to damp out all transients may be infinity. In pratice, however, the transient is assumed to be
over when the error is reduced below some acceptable value. Typically, the acceptable level is set at two or
five percent of the final value.
The use of root locus plots for the design of digital control systems necessitates the translation of time-
domain performance specifications into desired locations of closed-loop poles in the z-plane. However, the
use of frequency response plots necessitates the translation of time-domain specifications in terms of
frequency response features such as bandwidth, phase margin, gain margin, resonance peak, resonance
frequency, etc.
Specifications in Terms of Root Locations in z-plane Our approach is to first obtain the transient
response specifications in terms of characteristic roots in the s-plane, and then use the relation
z = esT (4.9)
to map the s-plane characteristic roots to the z-plane.
The transient response of Fig. 4.4 resembles the unit-step response of an underdamped second-order system
Y ( s) w 2n
= 2 (4.10)
R( s) s + 2zw n s + w n2
where
z = damping ratio, and wn = undamped natural frequency.
The transient response specifications in terms of rise time tr, peak time tp, peak overshoot Mp, and settling
time t s can be approximated to the parameters z and wn of the second-order system defined by Eqn. (4.10),
using the following correlations2:
p - cos -1 z
tr (0% to 100%) = (4.11)
wn 1 - z2
2
Chapter 6 of reference [155].
202 Digital Control and State Variable Methods
p
tp = (4.12)
wn 1 - z2
Mp = exp ( - pz 1 - z2 ) (4.13)
4
ts (2% tolerance band) = (4.14)
zw n
Peak overshoot is used mainly for relative stability. Values in excess of about 40% may indicate that the
system is dangerously close to absolute instability. Many systems are designed for 5 to 25% overshoot. No
overshoot at all is sometimes desirable. However, this usually penalizes the speed of response needlessly.
The specification on speed of response in terms of tr, tp and/or ts, should be consistent as all these depend
on z and wn. The greater the magnitude of wn when z is constant, the more rapidly does the response
approach the desired steady-state value. The value of wn is limited by measurement noise considerations—
a system with large wn has large bandwidth and will, therefore, allow the high frequency noise signals to
affect its performance.
We need to now convert the specifications on z and wn into guidelines on the placement of poles and
zeros in the z-plane, in order to guide the design of digital controls. We do so through the mapping (4.9).
Figure 4.5 illustrates the translation of specifications on z and wn to the characteristic root locations in the
z-plane (referring to Section 2.14 will be helpful). The s-plane poles
s1,2 = – zwn ± jwn 1 - z 2 = – zwn ± jwd (4.15a)
for constant z, lie along a radial line in the s-plane (Fig. 4.5a). In the z-plane,
1- z 2
z1,2 = e -zw n T e ± jw n T = r e ± jq (4.15b)
jw
j3ws/2
Im
Constant-w n
locus
jws/2
jwd
Constant- z
locus r
s Re
q
Constant- w n
locus
– jws/2 Constant- z
locus
Unit
circle
– j3ws/2
(a) (b)
Fig. 4.5 Mapping of s-plane patterns on the z-plane
Design of Digital Control Algorithms 203
-zw n T
The magnitude of z (i.e., the distance to the origin) is r = e and the angles with the positive real axis of
the z-plane, measured positive in the counterclockwise direction, are q = wnT 1 - z 2 . It should be observed
that the z-plane pole locations depend on the s-plane positions, as well as the sampling interval T.
As wn increases for a constant-z, the magnitude of z decreases and the phase angle increases; constant-z
locus is a logarithmic spiral in the z-plane (Fig. 4.5b). Increasing wn negatively, gives the mirror image.
In Fig. 4.5a, the s-plane has been divided into strips of width ws, where ws = 2p/T is the sampling
frequency. The primary strip extends from w = –ws/2 to + ws/2, and the complimentary strips extend from
– ws/2 to –3ws/2, ... , for negative frequencies, and from ws/2 to 3ws/2,..., for positive frequencies. We will
assume that the low-pass analog filtering characteristics of the continuous-time plant and the ZOH device,
attenuate the responses due to the poles in the complimentary strips; only the poles in the primary strip,
generally, need be considered.
Figure 4.5 illustrates the mapping of constant-z locus in the primary strip of the s-plane to the z-plane. As
the imaginary parts ± jwd = ± jwn 1 - z 2 of the s-plane poles move closer to the limit ± jws/2 of the
primary strip, the angles q = ± wdT = ± wnT 1 - z 2 of the z-plane poles approach the direction of the
negative real axis. The negative real axis in the z-plane, thus, corresponds to the boundaries of the primary
strip in the s-plane. Figure 4.5 also shows the mapping of a constant-wn locus, in the primary strip of the
s-plane, to the z-plane.
In the z-plane, the closed-loop poles must lie on the constant-z spiral to satisfy peak overshoot require-
ment, also the poles must lie on constant-wn curve to satisfy speed of response requirement. The intersection
of the two curves (Fig. 4.5b) provides the preferred pole locations, and the design aim is to make the root
locus pass through these locations.
If one chooses the following boundaries for the system response:
T = 1 sec
Peak overshoot £ 15% Þ z ³ 0.5
8
Settling time £ 25 sec Þ wn ³ ,
25
the acceptable boundaries for the closed-loop pole locations in z-plane are shown in Fig. 4.6.
In the chart of Fig. 4.6, the patterns are traced for various natural frequencies and damping ratios. Such a
chart is a useful aid in root-locus design technique. We will be using this chart in our design examples.
Dominant Poles Most control systems found in practice are of high order. The preferred locations of
closed-loop poles given by Fig. 4.5b, realize the specified transient performance only if the other closed-
loop poles and zeros of the system have negligible effect on the dynamics of the system, i.e., only if the
closed-loop poles corresponding to specified z and wn, are dominant.
In the following, we examine the relationship between the pole-zero patterns and the corresponding step-
responses of discrete-time systems. Our attention will be restricted to the step responses of the discrete-time
system with transfer function
Y (z) K ( z - z1 )( z - z2 ) K ( z - z1 )( z - z2 )
= = (4.16)
R( z ) ( z - p )( z - re )( z - re ) ( z - p)( z 2 - 2r cos q z + r 2 )
jq - jq
Fig. 4.6 Plot of an acceptable region for poles of a second-order system to satisfy dynamic
response specifications
Im z-plane
We assume that the roots of the equation
z = 0.5 z2 – 2r cosq z + r 2 = 0
are the preferred closed-loop poles corresponding to the
18° specified values of z and wn. Complex-conjugate pole
pairs corresponding to z = 0.5 with q = 18º, 45º and 72º,
Re will be considered in our study. The pole pair with q = 18º
is shown in Fig. 4.7.
To study the effect of zero location, we let z2 = p and
explore the effect of the (remaining) zero location z1 on
Unit circle the transient performance. We take the gain K to be such
Fig. 4.7 A complex-conjugate pole pair of that the steady-state output value equals the step size. For
the system (4.16) a unit-step input,
Design of Digital Control Algorithms 205
Y(z) =
LM K ( z - z1 ) OP F z I (4.17)
Nz 2
- 2 r cos q z + r 2 Q H z - 1K
1 - 2 r cos q + r 2
with K=
(1 - z1 )
The major effect of the zero z1 on the step response y(k) is to change the peak overshoot, as may be seen
from the step responses plotted in Fig. 4.8a. Figure 4.8b shows plots of peak overshoot versus zero location
for three different cases of complex-conjugate pole pairs. The major feature of these plots is that the zero has
very little influence when on the negative real axis, but its influence is dramatic when it comes near +1.
500
100
y (k )
(z = 0.5, q = 72° )
50
30
1.0
20
z1 = 0.8
10 (z = 0.5, q = 18° )
5
k – 1.0 – 0.5 0 0.5 1.0
Zero location
(a) (b)
50
30 (z = 0.5, q = 18° )
Rise time (log scale)
Number of samples
20
(z = 0.5, q = 45° )
10
5
3
2 (z = 0.5, q = 72° )
1
– 1.0 – 0.5 0 0.5 1.0
Pole location
(c)
Fig. 4.8 (a) Effect of an extra zero on a discrete-time second-order system, z = 0.5, q = 18º;
(b) effect of an extra zero on a discrete-time second-order system; and (c) effect of an
extra pole on a discrete-time second-order system
To study the influence of a third pole on a basically second-order response, we again consider the system
(4.16), but this time, we fix z1 = z2 = –1 and let p vary from near –1 to near +1. In this case, the major
206 Digital Control and State Variable Methods
influence of the moving singularity is on the rise time of the step response. Figure 4.8c shows plots of rise
time versus extra pole location, for three different cases of complex-conjugate pole pairs. We see here that
the extra pole causes the rise time to get very much longer as the location of p moves toward z = +1, and
comes to dominate the response.
Our conclusions from these plots are that the addition of a pole, or a zero, to a given system has only a
small effect—if the added singularities are in the range 0 to –1. However, a zero moving toward z = +1
greatly increases the system overshoot. A pole placed toward z = +1 causes the response to slow down and
thus, primarily, affects the rise time—which is being progressively increased. The pole pair corresponding
to specified z and wn, is a dominant pole pair of the closed-loop system only if the influence of additional
poles and zeros is negligibly small on the dynamic response of the system.
Specifications in Terms of Frequency Response Features The translation of time-domain specifica-
tions into desired locations of pair of dominant closed-loop poles in z-plane, is useful if the design is to be
carried out by using root locus plots. The use of frequency response plots necessitates the translation of time-
domain performance specifications in terms of frequency response features.
All the frequency-domain methods of continuous-time systems can be extended for the analysis and
design of digital control systems. Consider the system shown in Fig. 4.3b. The closed-loop transfer function
of the sampled-data system is
Y (z) Gh 0 G ( z )
= (4.18)
R( z ) 1 + G h 0 G ( z )
Just as in the case of continuous-time systems, the absolute and relative stability conditions of the closed-
loop discrete-time system can be investigated by making the frequency response plots of Gh0G(z). The
frequency response plots of Gh0G(z) are obtained by setting z = e jwT, and then letting w vary from – ws /2 to
ws /2. This is equivalent to mapping the unit circle in the z-plane onto the Gh0G(ejwT)-plane. Since the unit
circle in the z-plane is symmetrical about the real axis, the frequency response plot of Gh0G(e jw T) will also be
symmetrical about the real axis, so that only the portion that corresponds to w = 0 to w = ws /2 needs to be
plotted.
A typical curve of (refer Eqn. (4.18))
Y jw T Gh 0 G(e jwT)
(e ) = , (4.19)
R 1 + Gh 0 G(e jwT )
the closed-loop frequency response, is shown in Fig. 4.9. The amplitude ratio and phase angle will approxi-
mate the ideal 1.0 Ð 0º for some range of ‘low’ frequencies, but will deviate for high frequencies. The height
Mr (resonance peak) of the peak is a relative stability criterion; the higher the peak, the poorer the relative
stability. Many systems are designed to exhibit a resonance peak in the range 1.2 to 1.4. The frequency w r
(resonance frequency) at which this peak occurs, is a speed of response criterion; the higher the w r, the faster
the system. For systems that exhibit no peak (sometimes the case), the bandwidth wb is used for speed
of response specifications. Bandwidth is the frequency at which amplitude ratio has dropped to 1/ 2 times
its zero-frequency value. It can, of course, be specified even if there is a peak.
Alternative measures of relative stability and speed of response are stability margins and crossover
frequencies. To define these measures, a discussion of the Nyquist stability criterion in the z-plane is
required. Given the extensive foundation for the Nyquist criterion for continuous-time systems, that we laid
in Chapter 8 of the companion book [155], it will not take us long to present the criterion for the discrete-
time case.
Design of Digital Control Algorithms 207
1.0 0
Y Mr
(e jwT )
Decibels
R
0
wr w
Y
(e jwT ) 0°
R w
1.0 0
–3
Decibels
Y
(e jwT )
R 0.707
0 wb w
Fig. 4.9 Closed-loop frequency response criteria
Im(z) Im(Gh0G)
C1 Gh0G(C2) Gh0G(C3)
C3
–1
Re(Gh0G)
Re(z)
C2 Gh0G(C1)
1
GM
/T
Re(Gh0G)
–1
M Gh0G(ej T)
wg
0
(c) Relative stability margins
Fig. 4.10
Note that the locus Gh0G(C1) in Fig. 4.10b, is directly obtained from Gh0G(e jwT) for 0 £ w £ p /T, whereas
the locus Gh0G(C2) is the same information, with the phase reflected about 180°; Gh0G(C3) is inferred from
Fig. 4.10a based on pole-zero configuration.
In the case of open-loop transfer function Gh0G(z) with no poles outside the unit circle, the closed-loop
system of Fig. 4.3b is stable if
N = number of clockwise encirclements of the critical point –1 + j0 made by the Gh0G(e jwT ) locus of the
Nyquist plot
=0
Note that the necessary information to determine relative stability is contained in the portion Gh0G(C1) of
the Nyquist plot, which corresponds to the frequency response of the open-loop system Gh0G(z). This por-
tion of the Nyqusit plot of Fig. 4.10b has been redrawn in Fig. 4.10c. Gain and phase margins are defined so
as to provide a two-dimensional measure of how close the Nyquist plot is to encircling the –1 + j0 point,
and they are identical to the definitions developed for continuous-time systems. The Gain Margin (GM) is
the inverse of the amplitude of Gh0G(e jwT ) when its phase is 180°, and is a measure of how much gain of the
system can be increased before instability results. The Phase Margin (FM) is the difference between 180°
and the phase of Gh0G(e jwT ) when its amplitude is 1. It is a measure of how much additional phase lag, or
Design of Digital Control Algorithms 209
time delay, can be tolerated before instability results, because the phase of a system is highly related to these
characteristics.
The Nyquist plot in Fig. 4.10c intersects the negative real axis at frequency wf. This frequency at which
the phase angle of Gh0G(e jwT) is 180°, has been designated as the phase crossover frequency. The gain
margin of the closed-loop system of Fig. 4.3b, is defined as the number
1
GM = jw T
Gh 0 G(e f )
For stable systems, GM is always a number greater than one.
A unit circle, centered at the origin, has been drawn in Fig. 4.10 c in order to identify the point at which
the Nyquist plot has unity magnitude. The frequency at this point has been designated wg, the gain crossover
frequency. The phase margin of the closed-loop system of Fig. 4.3b, is defined as
FM = 180° + ÐGh0G(e jw gT )
For stable systems, F M is always positive.
The GM and F M are both measures of relative stability. General numerical design goals for these mar-
gins cannot be given since systems that satisfy other specific performance criteria may exhibit a wide range
of these margins. It is possible, however, to give useful lower bounds—the gain margin should usually
exceed 2.5 and the phase margin exceed 30°.
For continuous-time systems, it is often pointed out that the phase margin is related to the damping ratio z
for a standard second-order system; the approximate relation being z = FM/100. The FM, from a z-plane
frequency response analysis, carries the same implications about the damping ratio of the closed-loop system.
The gain crossover frequency wg is related to the bandwidth of the system. The larger the wg, the wider
the bandwidth of the closed-loop system, and the faster its response.
The translation of time-domain specifications in terms of frequency response features, is carried out by
using the explicit correlations for second-order system (4.10). The following correlations are valid approxi-
mations for higher-order systems dominated by a pair of complex conjugate poles3.
1
Mr = ; z £ 0.707 (4.20)
2z 1 - z 2
wr = wn 1 - 2z 2 (4.21)
1
wb = wn 1 - 2z 2 + (2 - 4z 2 + 4z 4 ) 2 (4.22)
R| 1
U|
FM = tan–1 2z S| 1 + 4z 4 - 2z 2 2
V|
T W
@ 100z (4.23)
3
Chapter 9 of reference [155].
210 Digital Control and State Variable Methods
We now introduce the function
1
S(z) = (4.24b)
1 + D( z )Gh 0 G( z )
which we call the sensitivity function of the control system, for reasons to be explained later. To reduce the
effects of disturbances, it turns out that S(e jwT ) must be made small over the frequency band of disturbances.
If constant disturbances are to be suppressed, S(1) should be made small. If D(z)Gh0G(z) includes an inte-
grator (which means that D(z) or Gh0G(z) has a pole at z = 1), then the steady-state error due to constant
disturbance is zero. This may be seen as follows. Since for a constant disturbance of amplitude A, we have
Az
W(z) = ,
z -1
the steady-state value of the output is given by
yss = lim (z – 1)Y(z) = lim (z – 1)S(z)W(z) = lim AS(z)
z®1 z®1 z®1
which is equal to zero if D(z)Gh0G(z) has a pole at z = 1.
Note that the point where the disturbance enters the system is very important in adjusting the gain of
D(z)Gh0G(z). For example, consider the system shown in Fig. 4.11b. The closed-loop transfer function for
the disturbance is
Y (z) Gh 0 G( z )
=
W ( z) 1 + D( z )Gh 0 G( z )
W (z)
R (z ) = 0 + + +
D (z ) G h0G (z) Y (z)
–
(a)
W (z)
R (z ) = 0 + + +
D (z ) G h0G (z) Y (z)
–
(b)
R (z ) = 0 + Y (z)
D (z ) G h0G (z)
–
+
+
(c) Wn(z)
Fig. 4.11 Disturbance rejection
In this case, the steady-state error due to constant disturbance W(z) is not equal to zero when Gh0G(z) has
a pole at z = 1. This may be seen as follows.
Let Gh0G(z) = Q(z)/(z – 1)
Design of Digital Control Algorithms 211
where Q(z) is a rational polynomial of z, such that Q(1) ¹ 0 and Q(1) ¹ ¥; and D(z) is a controller which
does not have pole at z = 1. Then
( z - 1)Gh 0 G( z ) AzQ( z ) A
yss = lim W(z) = lim =
z ® 1 1 + D( z )Gh 0 G( z ) z ® 1 z - 1 + D( z )Q( z ) D(1)
Thus the steady-state error is non-zero; the magnitude of the error can be reduced by increasing the
controller gain.
Figure 4.11c gives a block diagram of the situation where measurement noise Wn(z) enters the system
through feedback link. The closed-loop transfer function for this disturbance is
Y ( z) D ( z ) Gh 0 G ( z )
= (4.25)
Wn ( z) 1 + D ( z ) Gh 0 G ( z )
Thus, the measurement noise is transferred to the output whenever | D(z)Gh0G(z) | > 1. Hence, large gains
of D(z)Gh0G(z) will lead to large output errors due to measurement noise. This is in conflict with the distur-
bance-rejection property with respect to configurations of Figs 4.11a and 4.11b. To solve this problem, we
can generally examine the measuring instrument and modify the filtering, so that it satisfies the requirements
of a particular control problem.
All the frequency response methods of continuous-time systems4, are directly applicable for the analysis and
design of digital control systems. For a system with closed-loop transfer function
Y (z ) Gh 0 G( z )
= (4.29)
R( z ) 1 + Gh 0 G( z )
the absolute and relative stability conditions can be investigated by making the frequency response plots of
Gh0G(z). The frequency response plots of Gh0G(z) can be obtained by setting
z = e jwT; T = sampling interval (4.30)
4
Chapters 8–10 of reference [155].
Design of Digital Control Algorithms 213
and then letting the frequency w vary from –ws /2 to ws/2; ws = 2p/T. Computer assistance is normally
required to make the frequency response plots (refer Problem A.8 in Appendix A).
Since the frequency appears in the form z = e jwT, the discrete-time transfer functions are typically not
rational functions and the simplicity of Bode’s design technique is altogether lost in the z-plane. The
simplicity can be regained by transforming the discrete-time transfer function in the z-plane, to a different
plane (called w) by the bilinear transformation (refer Eqn. (2.115))
1 + wT / 2
z= (4.31a)
1 - wT / 2
By solving Eqn. (4.31a) for w, we obtain the inverse relationship
2 z -1
w= (4.31b)
T z +1
Through the z-transformation and the w-transformation, the primary strip of the left half of the s-plane
is first mapped into the inside of the unit circle in the z-plane, and then mapped into the entire left half of the
w-plane. The two mapping processes are depicted in Fig. 4.12. Notice that as s varies from 0 to jws/2 along
the jw-axis in the s-plane, z varies from 1 to –1 along the unit circle in the z-plane, and w varies from 0 to ¥
along the imaginary axis in the w-plane. The bilinear transformation (4.31) does not have any physical
significance in itself and, therefore, all w-plane quantities are fictitious quantities that correspond to the
physical quantities of either the s-plane or the z-plane. The correspondence between the real frequency w,
and the fictitious w-plane frequency, denoted as n, is obtained as follows:
From Eqn. (4.31b),
2 e jwT - 1 2 e jwT / 2 - e - jwT / 2 2 wT
jn = jwT
= jwT / 2 - jwT / 2
= j tan
T e +1 T e +e T 2
2 wT
or n= tan (4.32)
T 2
w-plane
s-plane z-plane
Im
jw Im
jws/2
0 s Re 0 Re
1
– jws/2
(a) (b) z = e sT
2 z–1
(c) w =
T z+1
Fig. 4.12 Diagrams showing mappings from s-plane to z-plane and from z-plane to w-plane
214 Digital Control and State Variable Methods
Thus a nonlinear relationship or ‘warping’ exists between the two frequencies w and n. As w moves from 0
to ws/2, n moves from 0 to ¥ (Fig. 4.13).
nT
2
0
ws ws w
4 2
Fig. 4.13 Relationship between the fictitious frequency n and actual frequency w
Gh0G(z) = (1 – z–1) Z
LM 50 OP = 0.215(z + 0.85) (4.35)
2
N s (s + 5) Q (z - 1)(z - 0.61)
By use of the bilinear transformation
wT
1+
z= 2 = 1 + 0.05w
wT 1 - 0.05w
1-
2
Design of Digital Control Algorithms 215
Gh0G(z) can be transformed into Gh0G(w) given below:
w F w IF I
Gh0G(w) =
10 1 -
20H 1+
246.67KH K (4.36)
w F I
w 1+
4.84 H K
Notice that the gain of Gh0G(w) is precisely the same as that of G(s)—it is 10 in both the cases. This will
always be true for a Gh0G(w) computed using the bilinear transformation given by Eqns (4.31). The gain of
10 in Eqn. (4.36) is the Kv of the uncompensated system (4.35).
We also note that in Eqn. (4.36), the denominator looks very much similar to that of G(s), and that the
denominators will be the same as T approaches zero. This would also have been true for any zeros of Gh0G(w)
that corresponded to zeros of G(s), but our example does not have any. Our example also shows the creation
of a right-half plane zero of Gh0G(w) at 2/T, and the creation of a fast left-half plane zero when compared to
the original G(s). The transfer function Gh0G(w) is thus a nonminimum phase function.
To summarize, the w-transformation maps the inside of the unit circle in the z-plane, into the left half of
the w-plane. The magnitude and phase of Gh0G( jn) are the magnitude and phase of Gh0G(z) as z takes on
values around the unit circle. Since Gh0G( jn) is a rational function of n, we can apply all the standard
straight line approximations to the log-magnitude and phase curves.
To obtain Gh0G(w) = Gh 0 G ( z ) 1 + wT / 2
z=
1 - wT / 2
the following ready-to-use formula may be used.
m
K P ( z + ai )
i =1
Gh0G(z) = n
(4.37a)
( z - 1) l P ( z + b j )
j =1
m FG
K P (1 + ai ) 1 -
w IJ l-m+n
m
P 1+
FG w IJ
Gh0G(w) =
i =1 H 2/T K i =1 H ( 2/T ) [(1 + ai )/(1 - ai )] K (4.37b)
n n F1 + I
j =1
l
P (1 + b j )T w l
P
j =1
GH ( 2/T )[(1 + wb )/(1 - b )]JK j j
The design of analog control systems usually falls into one of the following categories: (1) lead compen-
sation, (2) lag compensation, (3) lag-lead compensation. Other more complex schemes, of course, do exist,
but knowing the effects of these three basic types of compensation, gives a designer much insight into the
design problem. With reference to the design of digital control systems by Bode plots, the basic forms of
compensating network D(w) have also been classified as lead, lag, and lag-lead. In the following paragraphs,
we briefly review the fundamental frequency-domain features of these compensators.
Lead Compensation A simple lead compensator model in the w-plane is described by the transfer
function
1 + wt
D(w) = ; 0 < a < 1, t > 0 (4.38)
1 + a wt
The zero-frequency gain of the compensator is found by letting w = 0. Thus, in Eqn. (4.38), we are
assuming a unity zero-frequency gain for the compensator. Most of the designs require a compensator with
a nonunity zero-frequency gain to improve steady-state response, disturbance rejection, etc. A nonunity
216 Digital Control and State Variable Methods
zero-frequency gain is obtained by multiplying the right side of Eqn. (4.38) by a constant equal to the value
of the desired zero-frequency gain. For the purpose of simplifying the design procedure, we normally add
the required increase in gain to the plant transfer function, and design the unity zero-frequency gain compen-
sator given by Eqn. (4.38), based on the new plant transfer function. Then the compensator is realized as the
transfer function of (4.38) multiplied by the required gain factor.
The Bode plot of the unity zero-frequency gain lead compensator is shown in Fig. 4.14. The maximum
phase lead fm of the compensator is given by the relation
1 - sin f m
a= (4.39)
1 + sin f m
and it occurs at the frequency
nm =
F 1I F 1 I
H t K H at K (4.40)
Slope = 20 dB / decade
dB
D( j ) 20 log 1
20 log 1
0
90°
45°
D( j ) m
0°
1/ m = 1/ 1/
log
Fig. 4.14 Bode plot of lead compensator
The phase lead is introduced in the vicinity of the gain crossover frequency of the uncompensated
system—in order to increase the system’s phase margin. Lead compensation increases the system gain at
higher frequencies, thereby increasing the system bandwidth and hence the speed of response. However, a
system with large bandwidth may be subjected to high-frequency noise problems.
Lag Compensation A simple lag compensator model in the w-plane is described by the transfer
function
1 + wt
D(w) = ; b > 1, t > 0 (4.41)
1 + b wt
Design of Digital Control Algorithms 217
The Bode plot of this unity zero-frequency gain compensator is shown in Fig. 4.15.
0
dB
Slope = – 20 dB/decade 20 log b
D ( j n)
0°
D ( j n)
– 45 °
– 90 °
1/bt 1/t
log n
Fig. 4.15 Bode plot of lag compensator
Since the lag compensator reduces the system gain in the high frequency range, without reducing the gain
at low frequencies, the total system gain can be appreciably increased by a nonunity zero-frequency gain
obtained by multiplying the right side of Eqn. (4.41) by a constant. This is equivalent to increasing the gain
for the entire frequency range, and then attenuating the magnitude curve in the high frequency region. This
results in an appreciable increase in gain in the low frequency range of the lag-compensated system, thereby
improving steady-state accuracy.
In the design method using Bode plots, the attenuation property of lag compensator is utilized; the phase
lag characteristic is of no consequence. The attenuation provided by the lag compensator in the high fre-
quency range shifts the gain crossover frequency to a lower value, and gives the system sufficient phase
margin. So that a significant phase lag will not be contributed near the new gain crossover, the upper corner
frequency 1/t of D(w) is placed far below the new gain crossover.
With the reduction in system gain at high frequencies, the system bandwidth gets reduced and thus the
system has a slower speed of response. This may be an advantage if high frequency noise is a problem.
Lag-lead Compensation Equations (4.38) and (4.41) describe simple first-order compensators. In many
system design problems, however, the system specifications cannot be satisfied by a first-order compensator.
In these cases, higher-order compensators must be used. To illustrate this point, suppose that smaller steady-
state errors to ramp inputs are required for a type-2 system; this requires an increase in the low-frequency
gain of the system. If phase-lead compensation is employed, this increase in gain must be reflected at all
frequencies. It is then unlikely that one first-order section of phase-lead compensation can be designed to
give adequate phase margin. One solution to this problem would be to cascade two first-order lead compensa-
tors. However, if the noise in the control system is a problem, this solution may not be acceptable. A different
approach is to cascade a lag compensator with a lead compensator. This compensator is usually referred to
as a lag-lead compensator.
218 Digital Control and State Variable Methods
Example 4.3 Consider the feedback control system shown in Fig. 4.16. The plant is described by the
transfer function
K
G(s) =
s( s + 5)
Design a digital control scheme for the system to meet the following specifications:
(i) the velocity error constant Kv ³ 10;
(ii) peak overshoot Mp to step input £ 25%, and
(iii) settling time ts (2% tolerance band) £ 2.5 sec.
e ( t) e (k) u (k) u * (t)
r (t) + y ( t)
D (z) G h0(s) G (s)
– T T
Gh0G(z) = Z
LM1 - e FG 50 IJ OP = 0.215(z + 0.85)
- Ts
(4.42)
N s H s(s + 5)K Q (z - 1)(z - 0.61)
10F1 -
wI F w I
G G(w) = G G ( z ) =
H 20 K H 1+
wT
246.67K
(4.43)
wF1 + I
h0 h0 1+
2 w
H 4.84 K
z=
1-
wT
2
10F1 -
jn I F jn I
Gh0 G( jn) = G G ( w) =
H 20 K H 1+
246 .67 K
(4.44)
jn F 1 + I
h0
j n
H 4.84 K
w = jn
Design of Digital Control Algorithms 219
The Bode plot of Gh0G( jn) (i.e., the uncompensated system) is shown in Fig. 4.17. We find from this plot,
that the uncompensated system has gain crossover frequency nc1 = 6.6 rad/sec and phase margin FM1 @ 20º.
The magnitude versus phase angle curve of the uncompensated system is drawn in Fig. 4.18. The bandwidth5
of the system is read as
nb1 = 11
In terms of the real frequency, the bandwidth (Eqn. (4.32))
2
w b1 = tan -1 b1
F
n T I
= 10 rad/sec
T H 2 K
It is desired to raise the phase margin to 40º without altering Kv. Also the bandwidth should not increase.
Obviously, we should first try a lag compensator.
From the Bode plot of uncompensated system, we observe that the phase margin of 40º is obtained if the
gain crossover frequency is reduced to 4 rad/sec. The high frequency gain –20 log b of the lag compensator
(Fig. 4.15) is utilized to reduce the gain crossover frequency. The upper corner frequency 1/t of the compen-
sator is placed one octave to one decade below the new gain crossover, so that the phase lag contribution of
the compensator, in the vicinity of the new gain crossover, is made sufficiently small. To nullify the small
5
The –3dB closed-loop gain contour of the Nichols chart has been used to determine bandwidth. The contour has
been constructed using the following table obtained from the Nichols chart.
Degrees –90 –100 – 120 –140 –160 –180 –200 – 220
dB 0 –1.5 – 4.18 – 6.13 –7.28 –7.66 –7.28 – 6.13
220 Digital Control and State Variable Methods
16
G h0 G ( jn) 2
8 D ( jn)G h0G ( jn) 3
2
n
Magnitude (dB) 5
0
6 3
n
–8 5.5
11 Locus for
12 6
M = – 3 dB
– 16
10
phase lag contribution which will still be present, the gain crossover frequency is reduced to a value nc2
where the phase angle of the uncompensated system is
f = –180º + FMs + e;
FMs is the specified phase margin and e is allowed a value 5º–15º.
The uncompensated system (Fig. 4.17) has a phase angle
f = –180º + FMs + e = –180º + 40º + 10º = –130º
at nc2 = 3 rad/sec. Placing the upper corner frequency of the compensator two octaves below nc2, we have
1 n 3
= c22 =
t (2 ) 4
To bring the magnitude curve down to 0 dB at nc2, the lag compensator must provide an attenuation of
9 dB (Fig. 4.17). Therefore
20 log b = 9 or b = 2.82
The lower corner frequency of the compensator is then fixed at
1
= 0.266
bt
The transfer function of the lag compensator is then
1 + tw 1 + 133
. w
D(w) = =
1 + bt w 1 + 3.76w
Phase lag introduced by the compensator at nc2 = tan–1(1.33 nc2) – tan–1 (3.76nc2) = 75.93º – 84.93º = –9º.
Therefore, the safety margin of e = 10º is justified.
The open-loop transfer function of the compensated system becomes
w F w IF w IF I
D(w)Gh0G(w) =
10 1 -
20 H1+
246.67 KH1+
0.75 KH K
w 1+
w
1+F w IF I
4.84 H 0.266 KH K
Design of Digital Control Algorithms 221
The Bode plot of D(w)Gh0G(w) is shown in Fig. 4.17, from where the phase margin of the compensated
system is found to be 40º and the gain margin is 15 dB. The magnitude versus phase angle curve of the
compensated system is shown on Nichols chart in Fig. 4.18. The bandwidth of the compensated system is
FG
2
nb2 = 5.5 w b 2 =
n T
tan -1 b 2
F I
= 5.36 rad/sec
IJ
H
T 2 H K K
Therefore, the addition of the compensator has reduced the bandwidth from 10 rad/sec to 5.36 rad/sec.
However, the reduced value lies in the acceptable range.
2 z -1
Substituting w=
T z +1
in D(w), we obtain
L z - 0.928I OP = 1
Zero-frequency gain of D(z) = lim M0.362F
N H z - 0.974 K Q
z ®1
The digital controller D(z) has a pole-zero pair near z = 1. This creates a long tail of small amplitude in the
step response of the closed-loop system. This behaviour of the lag-compensated system will be explained
shortly, with the help of root locus plots.
To evaluate the true effectiveness of the design, we write the closed-loop transfer function of the compen-
sated system (Fig. 4.19) and therefrom obtain the response to step input. Computer assistance is usually
needed for this analysis.
Example 4.4 Reconsider the feedback control system of Example 4.3 (Fig. 4.16). We now set the following
goal for our design
(i) Kv ³ 10
(ii) Phase margin @ 40º
(iii) Bandwidth @ 12 rad/sec.
222 Digital Control and State Variable Methods
Sampling interval T = 0.1 sec corresponds to a sampling frequency which is about five times the closed-loop
bandwidth. A smaller value of T is more appropriate for the present design problem which requires higher
speed of response; we will however take T = 0.1 sec to compare our results with those of Example 4.3.
Following the initial design steps of Example 4.3, we find that K = 50 meets the requirement on steady-
state accuracy. For K = 50 and T = 0.1 sec, we have (refer Eqn. (4.44))
F jn IF jn I
Gh0G( jn) =
H
10 1 -
20 KH1+
246.67K
F jnI
H
jn 1 +
4.84K
The uncompensated system has a gain crossover frequency nc1 = 6.6 rad/sec, phase margin FM1 @ 20º
and bandwidth nb1 = 11(w b1 = 10 rad/sec). This follows from Figs 4.20 and 4.21.
It is desired to raise the phase margin to 40º without altering Kv. The bandwidth should also increase.
Obviously, we should try a lead compensator for this situation.
The phase margin FM1 = 20º of the uncompensated system falls short of the specified phase margin FMs
= 40º by 20º. Additional phase margin can be provided by a lead compensator (Fig. 4.14), so placed that its
corner frequencies 1/t and 1/at are on either side of the gain crossover frequency nc1 = 6.6 rad/sec. The
compensator so placed will increase the system gain in the vicinity of nc1; this will cause the gain crossover
to shift to the right—to some unknown value nc2. The phase lead provided by the compensator at nc2 adds to
the phase margin of the system.
Design of Digital Control Algorithms 223
16
2
G h0G ( jn)
3
8 D ( jn) G h0G ( jn) n
5 5
n
6
0
Magnitude (dB)
10
11 15
–8
12 22.5
25 Locus for
M = – 3 dB
– 16
Phase margin of the uncompensated system at nc1 is FM1. At nc2, which is expected to be close to nc1, let us
assume the phase margin of the uncompensated system to be (FM1 – e) where e is allowed a value 5º – 15º. The
phase lead required at nc2 to bring the phase margin to the specified value FMs, is given by
fl = FMs – (FM1 – e) = FMs – FM1 + e
In our design, we will force the frequency nm of the compensator to coincide with nc2, so that maximum
phase lead fm of the compensator is added to the phase margin of the system. Thus we set
nc2 = nm
Therefore fm = fl
The a-parameter of the compensator can then be computed from (refer Eqn. (4.39))
1 - sin f m
a=
1 + sin f m
Since at nm, the compensator provides a dB-gain of 20 log (1 / a ) , the new crossover frequency nc2 = nm
can be determined as that frequency at which the uncompensated system has a dB-gain of –20 log (1/ a ) .
For the design problem under consideration,
fl = 40º – 20º + 15º = 35º
1 - sin 35º
Therefore a= = 0.271
1 + sin 35º
The magnitude contribution of the compensator at nm is 20 log (1/ 0.271) = 5.67dB.
From Bode plot of Fig. 4.20, we obtain
nc2 = 9.4 = nm
Therefore (refer Eqn. (4.40))
F 1I F 1 I = n
H t K H at K m = 9.4
224 Digital Control and State Variable Methods
1 1 4.893
or = a ( vm ) = 4.893 and = = 18.055
t at 0.271
Since the compensator zero is very close to a pole of the plant, we may cancel the pole with the zero, i.e.,
we may choose
1 1
= 4.84; = 17.86
t at
The transfer function of the lead compensator becomes
1 + tw 1 + 0.21w
D(w) = =
1 + atw 1 + 0.056 w
Substituting
2 z -1
w=
T z +1
in D(w), we obtain
2.45( z - 0.616)
D(z) =
z - 0.057
The open-loop transfer function of the compensated system is
F I F1 + w I
w
D(w)Gh0G(w) =
H
10 1 -
K H 246.67K
20
wF1 +
w I
H 17.86 K
The Bode plot of D(w)Gh0G(w) is shown in Fig. 4.20, from where the phase margin of the compensated
system is found to be 38º, and gain margin is 7.5 dB. The magnitude versus phase angle curve of the compen-
sated system is shown in Fig. 4.21. The bandwidth of the compensated system is
Design of compensation networks using the root locus plots is a well established procedure in analog control
systems. This is essentially a trial-and-error method where, by varying the controller parameters, the roots of
the characteristic equation are relocated to favourable locations. In the present section, we shall consider the
application of root locus method to the design of digital control systems.
Consequently, given the pole-zero configuration of F(z), the construction of the root loci on the z-plane
involves the following steps:
(i) A search for the points on the z-plane that satisfy the angle condition given by Eqn. (4.48c).
(ii) The value of K at a given point on a root locus is determined from the magnitude condition given by
Eqn. (4.48b).
The root locus method developed for continuous-time systems can be extended to discrete-time systems
without modifications, except that the stability boundary is changed from the jw axis in the s-plane, to the
unit circle in the z-plane. The reason the root locus method can be extended to discrete-time systems is that
the characteristic equation (4.45) for the discrete-time system, is of exactly the same form as the equation for
root locus analysis in the s-plane. However, the pole locations for closed-loop systems in the z-plane must be
interpreted differently from those in the s-plane.
We assume that the reader is already familiar with the s-plane root locus technique. We shall concentrate
on the interpretation of the root loci in the z-plane with reference to the system performance, rather than the
construction of root loci on the z-plane. Rules of construction of root loci are summarized in Table 4.2 for
ready reference.6
Table 4.2 Rules for construction of Root Locus Plot of 1 + F(z) = 0
m
K P ( z - zi )
i =1
F(z) = n
; K ³ 0, n ³ m; zi: m open-loop zeros; pj: n open-loop poles
P (z - p j )
j = 1
(i) The root locus plot consists of n root loci as K varies from 0 to ¥. The loci are symmetric with respect to the real axis.
(ii) As K increases from zero to infinity, each root locus originates from an open-loop pole with K = 0, and termi-
nates either on an open-loop zero or on infinity with K = ¥. The number of loci terminating on infinity equals
the number of open-loop poles minus zeros.
Contd.
6
Chapter 7 of reference [155].
226 Digital Control and State Variable Methods
Table 4.2 Contd.
(iii) The (n – m) root loci which tend to infinity, do so along straight-line asymptotes radiating out from a single
point z = – s A on the real axis (called the centroid), where
å (real parts of open-loop poles) - å (real parts of open-loop zeros)
– sA =
n-m
These (n – m) asymptotes have angles
( 2 q + 1)180 º
fA = ; q = 0, 1, 2, ..., (n – m – 1)
n-m
(iv) A point on the real axis lies on the locus if the number of open-loop poles plus zeros on the real axis to the right
of this point, is odd. By use of this fact, the real axis can be divided into segments on-locus and not-on-locus;
the dividing points being the real open-loop poles and zeros.
(v) The intersections (if any) of root loci with the imaginary axis can be determined by use of the Routh criterion.
(vi) The angle of departure, fp of a root locus from a complex open-loop pole, is given by
fp = 180º + f
where f is the net angle contribution at this pole of all other open-loop poles ans zeros.
(vii) The angle of arrival, f z of a locus at a complex zero, is given by
f z = 180º – f
where f is the net angle contribution at this zero of all other open-loop poles and zeros.
(viii) Points at which multiple roots of the characteristic equation occur (breakaway points of root loci) are the
solutions of
n
P (z - p j )
dK j =1
= 0, where K = – m
dz P ( z - zi )
i =1
K
G(s) = (4.49a)
s(s + 2)
which, when preceded by a zero-order hold (T = 0.2 sec), has the discrete-time transfer function (refer
Table 2.1)
Design of Digital Control Algorithms 227
Gh0G(z) = (1 – z – 1) Z
LM K OP
=
K ¢( z - b )
(4.49b)
Ns 2
( s + 2) Q ( z - a1 )( z - a 2 )
where K¢ = 0.01758K, b = – 0.876, a1 = 0.67, a2 = 1.
The root locus plot of
1 + Gh0G(z) = 0 (4.50)
can be constructed using the rules given in Table 4.2. Gh0G(z) has two poles at z = a1 and z = a2, and a zero
at z = b. From rule (iv), the parts of the real axis between a1 and a2, and between – ¥ and b constitute sections
of the loci. From rule (ii), the loci start from z = a1 and z = a2; one of the loci terminates at z = b, and the other
locus terminates at – ¥. From rule (viii), the breakaway points (there are two) may be obtained by solving
for the roots of
dK ¢ ( z - a1 ) ( z - a2 )
= 0, where K ¢ = –
dz ( z - b)
However, we can show that for this simple two-pole and one zero configuration, the complex-conjugate
section of the root locus plot is a circle. The breakaway points are easily obtained from this result, which is
proved as follows:
Let z = x + jy
Equation (4.49b) becomes
K ¢( x + jy - b) K ¢( x - b + jy )
Gh0G(z) = =
( x + jy - a1 )( x + jy - a2 ) ( x - a1 )( x - a 2 ) - y 2 + jy ( 2 x - a1 - a 2 )
On the root loci, z must satisfy Eqn. (4.50).
Therefore
y y (2 x - a1 - a2 )
Ð Gh0G(z) = tan–1 – tan–1 = (2q + 1) 180º
x-b ( x - a1 )( x - a2 ) - y 2
Taking the tangent of both sides of this equation, yields
y y (2 x - a1 - a2 )
-
x - b ( x - a1 ) ( x - a2 ) - y 2
1+
y LMy (2 x - a1 - a2 ) OP = 0
N
x - b ( x - a1 ) ( x - a2 ) - y 2 Q
1 2 x - a1 - a2
or - =0
x - b ( x - a1 ) ( x - a2 ) - y 2
Simplifying, we get
(x – b)2 + y2 = (b – a1)(b – a2) (4.51)
which is the equation of a circle with the centre at the open-loop zero z = b, and the radius equal to
[(b – a1) (b – a2)]1/2.
The root locus plot for the system given by Eqn. (4.49b), is constructed in Fig. 4.22. The limiting value
of K for stability may be found by graphical construction or by the Jury stability test. We illustrate the use of
graphical construction.
228 Digital Control and State Variable Methods
Im
K = 22.18
P
¥ K K= K= 0 K= 0
– 0.876 0.67 Re
Unit circle
Fig. 4.22 Root locus plot for the system of Example 4.5
By rule (ix) of Table 4.2, the value of K¢ at point P where the root locus crosses the unit circle is given by
(Phasor length from P to pole at z = 1) (Phasor length from P to pol e z = 0.67)
K¢ =
(Phasor length from P to zero at z = – 0.876)
0.85 ´ 0.78
= = 0.39 = 0.01758K
1.7
0.39
Therefore K = = 22.18
0.01758
The relative stability of the system can be investigated by superimposing the constant-z loci on the system
root locus plot. This is shown in Fig. 4.23. Inspection of this figure shows that the root locus intersects the
z = 0.3 locus at point Q. The value of K¢ at point Q is determined to be 0.1; the gain
K = K¢/0.01758 = 5.7
The value of wn for K¢ = 0.1, may be obtained by superimposing constant-wn loci on the root locus plot
and locating the constant-wn locus which passes through the point Q. From Fig. 4.23, we observe that none
of the constant-wn loci on the standard chart passes through the point Q; we have to make a guess for the
wn value. We can, instead, construct a constant-wd locus passing through the point Q and from there obtain
wn more accurately.
s1, 2 = - zw n ± jw n 1 - z 2 = – zw n ± jw d
The radial line passing through the point Q makes an angle q = 25º with the real axis (Fig. 4.23). This is
a constant-wd locus with wd given by
25 ´ p
wdT = rad
180
25p
Therefore w nT 1 - z 2 =
180
This gives wn = 2.29 rad/sec.
The value of K¢ at the breakaway point R, located at z = 0.824, is determined to be 0.01594. Therefore,
the gain K = 0.01594/0.01758 = 0.9067 results in critical damping (z = 1) with the two closed-loop poles at
z = 0.824.
230 Digital Control and State Variable Methods
A pole in the s-plane at s = – a has a time constant of t = 1/a and an equivalent z-plane location of e–aT =
e–T/t. Thus, for the critically damped case,
e–0.2/t = 0.824
or t = 1.033 = time constant of the closed-loop poles.
In the frequency-response design procedure described in the previous section, we attempted to reshape
the open-loop frequency response to achieve certain stability margins, steady-state response characteristics
and so on. A different design technique is presented in this section—the root-locus procedure. In this proce-
dure, we add poles and zeros through a digital controller, so as to shift the roots of the characteristic
equation to more appropriate locations in the z-plane. Therefore, it is useful to investigate the effects of
various pole-zero configurations of the digital controller on the root locus plots.
Lead Compensation A simple lead compensator model in the w-plane is described by the transfer func-
tion (refer Eqn. (4.38))
1 + wt
D(w) = ; a < 1, t > 0
1 + a wt
The bilinear transformation
2 z -1
w=
T z +1
transforms D(w) into the following D(z).
D(z) =
1 + 2t /T LM z + (1 - 2t/T )/(1 + 2t /T ) OP
1 + 2at /T N z + (1 - 2at/T )/(1 + 2at / T ) Q
Since t and a are both positive numbers and since a < 1, the pole and zero of D(z) always lie on the real
axis inside the unit circle in the z-plane; the zero is always to the right of the pole. A typical pole-zero
configuration of a lead compensator
z - a1
D(z) = Kc1 (4.52)
z - a2
is shown in Fig. 4.24a.
For the purpose of simplifying the design pro-
cedure, we normally associate the gain Kc1 with
Im Im the plant transfer function, and design the lead
Unit circle Unit circle
compensator
z - a1
D(z) = (4.53a)
z - a2
based on the new plant transfer function. It
Re Re
may be noted that D(z) given by Eqn. (4.53a) is
not a unity-gain model; the dc gain of D(z) is
given by
(a) (b)
lim
FG z - a IJ = FG 1 - a IJ
1 1
(4.53b)
Fig. 4.24 Pole-zero configurations of compensators z®1 H z - a K H1 - a K
2 2
Design of Digital Control Algorithms 231
To study the effect of a lead compensator on the root loci, we consider a unity feedback sampled-data
system with open-loop transfer function
K ( z + 0.368)
Gh0G(z) = ; T = 1 sec (4.54)
( z - 0.368)( z - 0.135)
The root locus plot of the uncompensated system is shown in Fig. 4.25a. The plot intersects the z = 0.5
locus7 at point P. The value of gain K at this point is determined to be 0.3823.
Constant-wd locus passing through point P is a radial line at an angle of 82º with the real axis (Fig. 4.25a).
Therefore
82p
wdT = wnT 1 - z 2 =
180
This gives wn = 1.65 rad/sec
Since Gh0G(z) given by Eqn. (4.54) is a Type-0 system, we will consider position error constant Kp to
study steady-state accuracy. For K = 0.3823,
0.3823 (1 + 0.368)
Kp = lim Gh0G(z) = = 0.957
z®1 (1 - 0.368)(1 - 0.135)
We now cancel the pole of Gh0G(z) at z = 0.135 by the zero of the lead compensator, and add a pole at
z = – 0.135, i.e., we select
z - 0135
.
D(z) =
z + 0135
.
Figure 4.25b shows the root locus plot of lead compensated system. The modified locus has moved to the
left, toward the more stable part of the plane. The intersection of the locus with the z = 0.5 line is at point Q.
The value of wn at this point is determined to be 2.2 rad/sec. The lead compensator has thus increased wn and
hence the speed of response of the system. The gain K at point Q is determined to be 0.433. The position
error constant of the lead compensated system is given by
0.433( z + 0.368)
Kp = lim D(z)Gh0G(z) = lim = 0.82
z®1 z®1 ( z - 0.368)( z + 0.135)
7
For a given z, the constant-z curve may be constructed using Eqn. (4.15b). The following table gives the real and
imaginary coordinates of points on some constant-z curves.
Fig. 4.25 Root locus plot for (a) uncompensated; (b) lead compensated; and
(c) lag compensated system
The lead compensator has thus given satisfactory dynamic response, but the position error constant is too
low. We will shortly see how Kp can be increased by lag compensation.
The selection of the exact values of pole and zero of the lead compensator is done by experience and by
trial-and-error. In general, the zero is placed in the neighbourhood of the desired dominant closed-loop
poles, and the pole is located at a reasonable distance to the left of the zero location.
Lag Compensation A simple lag compensator model in the w-plane is described by the transfer function
(refer Eqn. (4.41))
1 + wt
D(w) = ; b > 1, t > 0
1 + b wt
The bilinear transformation
2 z -1
w=
T z +1
transforms D(w) into the following D(z).
D(z) =
1 + 2t /T LM z + (1 - 2t/T )/(1 + 2t/T ) OP
1 + 2 bt /T N z + (1 - 2bt /T )/(1 + 2bt / T ) Q
Design of Digital Control Algorithms 233
Since t and b are both positive numbers and since b > 1, the pole and zero of D(z) always lie on
the real axis inside the unit circle; the pole is always to the right of the zero. A typical pole-zero configura-
tion of the lag compensator
z - b1
D(z) = K c2 (4.55)
z - b2
is shown in Fig. 4.24b. Note that both the pole and the zero have been shown close to z = 1. This, as we shall
see, gives better stability properties.
Again, we will associate the gain Kc2 with the plant transfer function and design the lag compensator
z - b1
D(z) = (4.56)
z - b2
based on the new plant transfer function. The dc gain of the lag compensator given by (4.56), is equal to
z - b1 1 - b1
lim = (4.57)
z®1 z - b2 1 - b2
To study the effect of lag compensator on the root loci, we reconsider the system described by Eqn. (4.54):
K ( z + 0.368)
Gh0G(z) = ; T = 1 sec
( z - 0.368)( z - 0135 . )
The root locus plot of the uncompensated system is shown in Fig. 4.25a. At point P, z = 0.5, wn = 1.65 and
K = 0.3823 (Kp = 0.957).
We now cancel the pole of Gh0G(z) at z = 0.368 by the zero of the lag compensator, and add a pole at z =
0.9, i.e., we select
z - 0.368
D(z) =
z - 0.9
Figure 4.25c shows the root locus plot of the lag compensated system. The intersection of the locus with
z = 0.5 line is at point R. The value of wn at this point is determined to be 1.2 rad/sec. The lag compensator
has thus reduced wn and hence the speed of response. The value of the gain K at point R is determined to be
0.478. The position error constant of the lag compensated system is
0.478( z + 0.368)
Kp = lim D(z)Gh0G(z) = lim = 7.56
z®1 z ® 1 ( z - 0135
. )( z - 0.9)
Thus we have been able to increase position error constant appreciably by lag compensation.
If both the pole and the zero of the lag compensator are moved close to z = 1, then the root locus plot of
the lag compensated system moves back towards its uncompensated shape. Consider the root locus plot of
the uncompensated system shown in Fig. 4.25a. The angle contributed at point P by additional pole-zero pair
close to z = 1 (called a dipole), will be negligibly small; therefore the point P will continue to lie on the lag
compensated root locus plot. However, the lag compensator
z - b1
D(z) =
z - b2
will raise the system Kp (refer Eqn. (4.57)), by a factor of (1 – b1)/(1 – b2).
The following examples illustrate typical digital control system design problems carried out in the
z-plane, using the root locus technique. As we shall see, the design of digital compensation using root locus
plots is essentially a trial-and-error method. The designer may rely on a digital computer to plot out a large
number of root loci by scanning through a wide range of possible values of the compensator parameters, and
select the best solution. However, one can still make proper and intelligent initial ‘guesses’ so that the
amount of trial-and-error effort is kept to a minimum.
234 Digital Control and State Variable Methods
Example 4.6 Consider the feedback control system shown in Fig. 4.26. The plant is described by the
transfer function
K
G(s) =
s( s + 2)
Design a digital control scheme for the system to meet the following specifications;
(i) the velocity error constant Kv = 6;
(ii) peak overshoot Mp to step input £ 15%, and
(iii) settling time ts (2% tolerance band) £ 5 sec.
r e u y
+
D (z ) G h0(s) G (s )
– T T
Solution The transient accuracy requirements correspond to z = 0.5 and wn = 1.6. We select T = 0.2 sec.
Note that sampling frequency ws = 2p/T is about 20 times the natural frequency; therefore, our choice of
sampling period is satisfactory.
The transfer function Gh0G(z) of the plant, preceded by a ZOH, can be obtained as follows:
Gh0G(z) = (1 – z–1) Z
LM K OP
2
N s ( s + 2) Q
0.01758K ( z + 0.876) K ¢( z + 0.876)
= = (4.58)
( z - 1)(z - 0.67) ( z - 1)( z - 0.67)
Im
The root locus plot of this system for
0 £ K¢ < ¥ was earlier constructed in Fig. 4.22.
Complex-conjugate sections of this plot are
Locus
shown in Fig. 4.27. The plot intersects the
for z = 0.5
z = 0.5 locus at point P. At this point wn = 1.7
rad/sec, K¢ = 0.0546.
P q = 17° Therefore, the transient accuracy require-
ments (z = 0.5, wn = 1.6) are almost satisfied by
gain adjustment only. Let us now examine the
– 0.876 0.67 Re
steady-state accuracy of the uncompensated
system (D(z) = 1) with K¢ = 0.0546.
The velocity error constant Kv of the sys-
tem is given by
1
Kv = lim (z – 1)Gh0G(z)
T z ®1
Root locus
Unit circle 5(0.0546)(1 + 0.876)
= = 1.55
Fig. 4.27 Root locus plot for system (4.58) (1 - 0.67)
Design of Digital Control Algorithms 235
The specified value of Kv is 6. Therefore, an increase in Kv by a factor of 3.87 (= 6/1.55) is required.
The objective before us now is to introduce a D(z) that raises the system Kv by a factor of 3.87, without
appreciably affecting the transient performance of the uncompensated system, i.e., without appreciably
affecting the root locus plot in the vicinity of point P. This objective can be realized by a properly designed
lag compensator, as is seen below.
We add the compensator pole and zero as shown in Fig. 4.28. Since both the pole and the zero are very
close to z = 1, the scale in the vicinity of these points has been greatly expanded. The angle contributed by
the compensator pole at point P, is almost equal to the angle contributed by the compensator zero. There-
fore, the addition of dipole near z = 1 does not appreciably disturb the root locus plot in the vicinity of point
P. It only slightly reduces wn. The lag compensator
z - 0.96
D(z) =
z - 0.99
raises the system Kv by a factor of (1 – 0.96)/(1 – 0.99) = 4.
Note that because of lag compensator, a third closed-loop pole has been added. This pole, as seen from
Fig. 4.28, is a real pole lying close to z = 1. This pole, fortunately, does not disturb the dominance of the
complex conjugate closed-loop poles. The reason is simple.
The closed-loop pole, close to z = 1, has a long time constant. However, there is a zero close to this
additional pole. The net effect is that the settling time will increase because of the third pole, but the ampli-
tude of the response term contributed by this pole will be very small. In system response, a long tail of small
amplitude will appear which may not appreciably degrade the performance of the system.
Example 4.7 Reconsider the feedback control system of Example 4.6 (Fig. 4.26). We now set the following
goal for our design.
(i) Kv ³ 2.5
(ii) z @ 0.5
(iii) ts (2% tolerance band) £ 2 sec
236 Digital Control and State Variable Methods
The transient accuracy requirements correspond to z = 0.5 and wn = 4. For sampling interval T = 0.2 sec,
the sampling frequency is about eight times the natural frequency. A smaller value of T is more appropriate
for the present design problem—which requires higher speed of response. We will however take T = 0.2 sec
to compare our results with those of Example 4.6.
Following the initial design steps of Example 4.6, we find that
0.01758K ( z + 0.876) K ¢( z + 0.876)
Gh0G(z) = =
( z - 1)(z - 0.67) ( z - 1)( z - 0.67)
Complex conjugate sections of the root locus plot superimposed on z = 0.5 line are shown in Fig. 4.27.
The root locus plot intersects the constant-z locus at point P. At this point, wn = 1.7 rad/sec. The specified
value of wn is 4. Therefore, the transient accuracy requirements cannot be satisfied by only gain adjustment.
The natural frequency wn can be increased by lead compensation. To design a lead compensator, we
translate the transient performance specifications into a pair of dominant closed-loop poles, add open-loop
poles and zeros through D(z) to reshape the root locus plot, and force it to pass through the desired closed-
loop poles.
Point Q in Fig. 4.29 corresponds to the desired closed-loop pole in the upper half of z-plane. It is the point
of intersection of the z = 0.5 locus and the constant-wd locus, with wd given by
wd = wn 1 - z 2 = 3.464 rad/sec
For this value of wd, constant-wd locus is a radial line at an angle of wdT
F 180 I = 39.7º with the real axis.
HpK
Im
Locus
for z = 0.5
Q q = 39.7°
51.26°
Unit circle
If the point Q is to lie on the root locus plot of the compensated system, then the sum of the angles
contributed by open-loop poles and zeros of the plant, and the pole and zero of the compensator at the point
Q, must be equal to ± (2q + 1)180º; q = 0, 1, 2, K
Design of Digital Control Algorithms 237
The sum of the angle contributions due to open-loop poles and zero of the plant at plant Q, is
17.10º – 138.52º – 109.84º = – 231.26º
Hence the compensator D(z) must provide +51.26º. The transfer function of the compensator may be
assumed to be
z - a1
D(z) =
z - a2
If we decide to cancel the pole at z = 0.67 by the zero of the compensator at z = a1, then the pole of the
compensator can be determined (from the condition that the compensator must provide + 51.26º) as a point
at z = 0.254 (a2 = 0.254). Thus, the transfer function of the compensator is obtained as
z - 0.67
D(z) =
z - 0.254
The open-loop transfer function now becomes
0.01758 K ( z + 0.876)( z - 0.67) 0.01758 K ( z + 0.876) K ¢ ( z + 0.876)
D(z)Gh0G(z) = = =
( z - 0.254)( z - 1)( z - 0.67) ( z - 0.254)( z - 1) ( z - 0.254)( z - 1)
The value of K¢ at point Q, obtained from Fig. 4.29 by graphical construction, is 0.2227. Therefore K = 12.67.
The velocity error constant of the compensated system is given by
1
Kv = lim [(z – 1)D(z)Gh0G(z)] = 2.8
T z®1
It meets the specification on steady-state accuracy.
If it is required to have a large Kv, then we may include a lag compensator. The lag-lead compensator can
satisfy the requirements of high steady-state accuracy and high speed of response.
From the viewpoint of microprocessor implementation of the lag, lead, and lag-lead compensators, the
lead compensators present the least coefficient quantization problems, because the locations of poles and
zeros are widely separated, and the numerical inaccuracies in realization of these compensators will result in
only small deviations in expected system behaviour. However, in the case of lag compensators and lag-lead
compensators, the lag section may result in considerable coefficient quantization problems, because the
locations of poles and zeros are usually close to each other (they are near the point z = 1). Numerical
problems associated with realization of compensator coefficients, may lead to significant deviations in
expected system behaviour.
Much of the style of the transform domain techniques we have been discussing in this chapter, grew out of
the limitations of technology which was available for realization of the compensators with pneumatic com-
ponents, or electric networks and amplifiers. In the digital computer, such limitations on realization are, of
course, not relevant, and one can ignore these particular constraints. One design method which eliminates
these constraints begins from the very direct point of view that we are given a process (plus hold) transfer
function, Gh0G(z), that we want to construct a desired transfer function, M(z), between input r and output y
and that we have the computer transfer function, D(z), to do the job as per the feedback control structure of
Fig. 4.30.
238 Digital Control and State Variable Methods
r + e u u + (t) y
D (z) G h0(s) G (s )
T T
–
Computer ZOH Process
8
Pole excess of M(z) = {number of finite poles of M(z) – number of finite zeros of M(z)}.
Design of Digital Control Algorithms 239
process models used for design practically never describe the process behaviour exactly, the corresponding
poles and zeros will not be cancelled exactly; the cancellation will be approximate. For poles and zeros of
Gh0G(z) which are sufficiently spread in the inner of the unit disc in the z-plane, the approximation in cancel-
lation leads to only small deviations of the assumed behaviour M(z) in general. However, one has to be
careful if Gh0G(z) has poles or zeros on or outside the unit circle. Imperfect cancellation may lead to weakly
damped or unstable behaviour. Therefore, the design of digital controllers, according to Eqn. (4.60), has to
be restricted to cancellation of poles and zeros of Gh0G(z) located inside the unit circle. This imposes certain
restrictions on the desired transfer function M(z) as is seen below.
Assume that Gh0G(z) involves an unstable (or critically stable) pole at z = a. Let us define
G1 ( z)
Gh0G(z) =
z -a
where G1(z) does not include a term that cancels with (z – a). Then the closed-loop transfer function becomes
G ( z)
D( z ) 1
z -a
M(z) = (4.63)
G ( z)
1 + D( z ) 1
z -a
Since we require that no zero of D(z) cancel the pole of Gh0G(z) at z = a, we must have
1 z-a
1 – M(z) = =
G1 ( z) z - a + D( z )G1 ( z )
1 + D( z )
z -a
that is, 1 – M(z) must have z = a as a zero. This argument applies equally if Gh0G(z) involves two or more
unstable (or critically stable) poles.
Also note from Eqn. (4.63) that if poles of D(z) do not cancel zeros of Gh0G(z), then the zeros of Gh0G(z)
become zeros of M(z).
Let us summarize what we have stated concerning cancellation of poles and zeros of Gh0G(z).
(i) Since the digital controller D(z) should not cancel unstable (or critically stable) poles of Gh0G(z), all
such poles of Gh0G(z) must be included in 1 – M(z) as zeros.
(ii) Zeros of Gh0G(z) that lie on or outside the unit circle should not be cancelled with poles of D(z); all
such zeros of Gh0G(z) must be included in M(z) as zeros.
The design procedure, thus, essentially involves the following three steps:
(I) The closed-loop transfer function M(z) of the final system is determined from the performance speci-
fications, and the fixed parts of the system, i.e., Gh0G(z).
(II) The transfer function D(z) of the digital controller is found using the design formula (4.60).
(III) The digital controller D(z) is synthesized.
Step (I) is certainly the most difficult one to satisfy. In order to pass step (I), a designer must fulfil the
following requirements.
(i) The digital controller D(z) must be physically realizable.
(ii) The poles and zeros of Gh0G(z) on or outside the unit circle should not be cancelled by D(z).
(iii) The system specifications on transient and steady-state accuracy should be satisfied.
Example 4.8 The plant of sampled-data system of Fig. 4.30 is described by the transfer function
1
G(s) = (4.64a)
s(10s + 1)
240 Digital Control and State Variable Methods
The sampling period is 1 sec.
The problem is to design a digital controller D(z) to realize the following specifications:
(i) Kv ³ 1
(ii) z = 0.5, and
(iii) ts (2% tolerance band) £ 8 sec.
The selection of a suitable M(z) is described by the following steps.
(i) The z-transfer function of the plant is given by (refer Table 2.1)
Gh0G(z) = (1 – z–1) Z
LM 1 OP = 0.04837 (z + 0.9672) (4.64b)
2
N s (10s + 1) Q ( z - 1)( z - 0.9048)
Since Gh0G(z) has one more pole than zero, M(z) must have a pole excess of at least one.
(ii) Gh0G(z) has a pole at z = 1. This must be included in 1– M(z) as zero, i.e.,
1 – M(z) = (z – 1)F(z) (4.65)
where F(z) is a ratio of polynomials of appropriate dimensions.
(iii) The transient accuracy requirements are specified as z = 0.5, wn = 1(ts = 4/zwn). With a sampling
period T = 1 sec, this maps to a pair of dominant closed-loop poles in the z-plane with
-zw n T
| z1, 2 | = e = 0.6065
0.866 ´ 180
Ð z1, 2 = ± wnT 1 - z 2 = ± = ± 49.64º
314
.
This corresponds to
z1, 2 = 0.3928 ± j 0.4621
The closed-loop transfer function, M(z), should have dominant poles at the roots of the equation
D(z) = z2 – 0.7856 z + 0.3678 = 0 (4.66)
The steady-state accuracy requirements demand that steady-state error to unit-step input is zero, and
steady-state error to unit-ramp input is less than 1/Kv.
E(z) = R(z) – Y(z) = R(z)[1 – M(z)] = R(z) (z – 1)F(z)
*
ess = lim z( z - 1) F( z) = 0
unit step z®1
Thus, with the choice of M (z) given by Eqn. (4.65), the steady-state error to unit step input is always zero.
* Tz
ess = lim (z – 1) (z – 1)F(z) = T F(1) = 1/Kv
unit ramp z®1 ( z - 1) 2
For T = 1 and Kv = 1,
F(1) = 1 (4.67)
From Eqns (4.65) and (4.66), we observe that
z -a
F(z) =
z 2 - 0.7856z + 0.3678
meets the requirements on realizability of D(z), cancellation of poles and zeros of Gh0G(z), and transient
accuracy. The requirement on steady-state accuracy is also met if we choose a such that (refer Eqn. (4.67))
1-a
=1
1 - 0.7856 + 0.3678
Design of Digital Control Algorithms 241
This gives a = 0.4178
z - 0.4178 ( z - 1)( z - 0.4178)
Therefore F(z) = 2
; 1 – M(z) = 2
z - 0.7856 z + 0.3678 z - 0.7856 z + 0.3678
0.6322 z - 0.05
M(z) = 2
(4.68)
z - 0.7856 z + 0.3678
Now, turning to the basic design formula (4.60), we compute
D(z) =
1 LMM ( z)
=
OP
( z - 1)(z - 0.9048) LM
0.6322 z - 0.05 OP
Gh 0 G( z) 1 - M ( z)
N (0.04837)( z + 0.9672) ( z - 1)( z - 0.4178)
Q N Q
(z - 0.9048)( z - 0.079)
= 13.07 (4.69)
( z + 0.9672 )(z - 0.4178)
A plot of the step response of the resulting design is provided in Fig. 4.31, which also shows the control
effort. The underdamped response settles within a two percent band of the desired value of unity in less
than 8 sec. We can see the oscillation of u(k)—associated with the pole of D(z) at z = –0.9672, which is
quite near the unit circle. Strong oscillations of u(k) are often considered unsatisfactory, even though the
process is being controlled as was intended. In the literature, poles near z = –1 are often referred to as
ringing poles.
To avoid the ringing effect, we could include the zero of Gh0G(z) at z = – 0.9672 in M(z) as zero, so that
this zero of Gh0G(z) is not cancelled with pole of D(z). M(z) may have additional poles at z = 0, where the
transient is as short as possible. The result will be a simpler D(z) with a slightly more complicated M(z).
242 Digital Control and State Variable Methods
Review Examples
Review Example 4.1 Consider the digital control system shown in Fig. 4.32. The transfer function of
the plant is G(s) = 1/[s(s + 1)]. Design a lead compensator D(z) in the w-plane such that the phase margin in
50º, the gain margin is at least 10 dB, and the velocity error constant Kv is 2. Assume that the sampling period
is 0.2 sec.
r + e u y
D (z) G h0(s) G (s )
T T
–
Compensator ZOH Plant
Gh0G(z) = (1 – z–1) Z
LM 2 OP = 0.03746 LM z + 0.9356 OP
2
N s (s + 1) Q N (z - 1)( z - 0.8187) Q
By use of the bilinear transformation
1 + wT/2 1 0.1w
z= =
1 - wT/2 1 0.1w
Gh0G(z) can be transformed to Gh0G(w) given below (refer Eqns (4.37)).
FG
2 1-
w IJ FG1 + w IJ
Gh0G(w) =
H 10 K H 300.6K
F w IJ
w G1 +
H 0.997 K
The Bode plot of Gh0G(jn) is shown in Fig. 4.33. The phase margin can be read from the Bode plot as 32º
and the gain margin as 14.2 dB.
Design of Digital Control Algorithms 243
It is desired to raise the phase margin to 50º without altering Kv. Also the gain margin should be at least
10 dB. We now design a lead compensator
1 + wt
D1(w) = ; a < 1, t > 0
1 + a wt
to meet these objectives. We choose the zero of the compensator at 0.997 (This choice cancels a pole
of Gh0G(w)). Addition of this zero shifts the gain crossover frequency of the uncompensated system to
nc = 1.8. The phase margin of the uncompensated system at nc is FM1 = 22º. The phase lead required at
nc to bring the phase margin to the specified value FMs = 50º, is given by
fl = F Ms – FM1 + e = 50º – 22º + 3º = 31º
nm =
1 1F I= 0.997 ´ 3.27 = 1.8
H K
t at
which is same as the gain crossover frequency.
Thus, the compensator transfer function is
w
1+
D1(w) = 0.997 (4.70)
w
1+
3.27
244 Digital Control and State Variable Methods
The magnitude and phase angle curves for the compensated open-loop transfer function are shown by solid
curves in Fig. 4.33. From these curves, we see that the phase margin is 51º and the gain margin is 11.5 dB.
The compensator transfer function given by Eqn. (4.70) will now be transformed back to the z-plane by
the bilinear transformation
2 z-1 z -1
w= = 10
T z+1 z+1
This gives D1(z) = 2.718
FG
z - 0.8187 IJ
H
z - 0.5071 K
The system gain K was determined to be 2. Therefore, for the plant of the system of Fig. 4.32, the digital
controller is given by
U (z)
= D(z) = 2.718 K
FG
z - 0.8187 IJ
= 5.436
FG
z - 0.8187 IJ
E ( z) H
z - 0.5071 K H
z - 0.5071 K
Review Example 4.2 Consider the digital control configuration shown in Fig. 4.32. The transfer function
e -1.5 s
G(s) =
s +1
describes a process of temperature control via mixing (refer Example 3.3). In the following, we design a
digital compensator for the temperature control process; the sampling interval T is assumed to be 1 sec.
The transfer function Gh0G(z) derived in Example 3.3 is repeated below.
z + 0.6066
Gh0G(z) = 0.3935 2
z ( z - 0.3679 )
Since Gh0G(z) is a type-0 transfer function, the system will have a steady-state error to a constant com-
mand or disturbance. If we assume that such a behaviour in steady-state is unacceptable, we can correct the
problem by including integral control through the transfer function
Kz
D1(z) =
z -1
The effective plant transfer function is now
( z + 0.6066) K ¢( z + 0.6066)
D1(z)Gh0G(z) = 0.3935K =
z ( z - 1)( z - 0.3679) z ( z - 1)( z - 0.3679)
The unity-feedback root locus plot for this transfer function is sketched in Fig. 4.34. The point P on the
FG
root locus corresponds to z = 0.5, and wn = 0.423 q = w n T 1 - z 2 =
21p
.
IJ
H 180 K
The natural frequency wn has to be raised to improve the speed of response. We employ a lead compen-
sation which cancels the plant pole at z = 0.3679 and the plant zero at z = – 0.6066. The open-loop transfer
function of the lead-compensated system becomes
D2(z)D1(z)Gh0G(z) =
z - 0.3679 LM K ¢ ( z + 0.6066) OP=
K¢
z + 0.6066 z (Nz - 1 )( z - 0.3679 )Q z ( z - 1)
The root locus plot is sketched in Fig. 4.35. The point Q on the root locus corresponds to z = 0.5, wn = 0.826,
Kv = K¢ = 0.45.
Suppose we wish to raise Kv to 1. A lag compensator
z - 0.9
D3(z) =
z - 0.9545
Design of Digital Control Algorithms 245
Im
Locus
for z = 0.5
P q = 21°
Re
Unit circle
Fig. 4.34 Root locus plot of mixing flow plant with integral control
will raise Kv by a factor of (1 – 0.9)/(1 – 0.9545). The lag pole-zero pair are very close to each other, and do
not change the root locus near the dominant roots significantly. However, the lag compensation does intro-
duce a small, but very slow transient, whose effect on dynamic response needs to be evaluated, especially in
terms of the response to disturbances.
Im
Locus q = 41°
for z = 0.5
Q
Re
Unit circle
Fig. 4.35 Root locus plot of mixing flow plant with integral control and lead compensation
246 Digital Control and State Variable Methods
Problems
4.1 For the system shown in Fig. P4.1, find
(i) position error constant, Kp,
(ii) velocity error constant, Kv, and
(iii) acceleration error constant, Ka.
Express the results in terms of K1, K2, J, and T.
r + e + 1 q 1 q
K1 G h0(s)
T Js s
– –
K2
Fig. P4.1
4.2 Consider the analog control system shown in Fig. P4.2a. Show that the phase margin of the system is about 45º.
We wish to replace the analog controller by a digital controller as shown in Fig. P4.2b. First, modify the
analog controller to take into account the effect of the hold that must be included in the equivalent digital
control system (the zero-order hold may be approximated by a pure time delay of one half the sampling period
T (Fig. P4.2c), and then a lag compensator D1(s) may be designed to realize the phase margin of 45º). Then, by
using the bilinear transformation, determine the equivalent digital controller.
Compare the velocity error constants of the original analog system of Fig. P4.2a, and the equivalent digital
system of Fig. P4.2b.
r + 1.57 y
D (s) = 1
– s(s + 1)
(a)
y
r + 1 – e– sT 1.57
D 1 (z )
T = 1.57 T s s(s + 1)
–
(b)
y
r + 1.57 e – sT/2
D 1 (s)
s(s + 1)
–
(c)
Fig. P4.2
Design of Digital Control Algorithms 247
4.3 A unity feedback system is characterized by the open-loop transfer function
0.2385( z + 0.8760)
Gh0G(z) =
( z - 1)(z - 0.2644)
The sampling period T = 0.2 sec.
Determine steady-state errors for unit-step, unit-ramp, and unit-acceleration inputs.
4.4 Predict the nature of the transient response of a discrete-time system whose characteristic equation is given by
z2 – 1.9z + 0.9307 = 0
The sampling interval T = 0.02 sec.
4.5 The system of Fig. P4.5 contains a disturbance input W(s), in addition to the reference input R(s).
(a) Express Y(z) as a function of the two inputs.
(b) Suppose that D2(z) and D3(z) are chosen such that D3(z) = D2(z)Gh0G(z). Find Y(z) as a function of the two inputs.
(c) What is the advantage of the choice in part (b) if it is desired to minimize the response Y(z) to the distur-
bance W(s)?
D 2 (z) W (s)
+ + Y (s )
R (s ) + + +
D 3 (z) D 1 (z) G h0 (s) G (s)
T – T
Fig. P4.5
4.6 Consider the system of Fig. P4.6. The design specifications for the system require that
(i) the steady-state error to a unit-ramp reference input be less than 0.01, and
(ii) a constant disturbance w should not affect the steady-state value of the output.
Show that these objectives can be met if D(z) is a proportional-plus-integral compensator.
w
+
r + + 1 y
D (z) G h0(s)
– T T s+1
Fig. P4.6
4.7 Consider the feedback system shown in Fig. P4.7. The nominal values of the parameters K and t of the plant
G(s) are both equal to 1. Find an expression for the sensitivity S(z) of the closed-loop transfer function M(z),
with respect to incremental changes in open-loop transfer function Gh0G(z). Plot |S(ejwT)| for 0 £ w £ ws/2, where
ws is the sampling frequency. Determine the bandwidth of the system if it is designed to have |S(ejwT)| < 1.
r + K y
G h0(s) G (s ) =
T = 0.5 sec ts + 1
–
Fig. P4.7
248 Digital Control and State Variable Methods
4.8 A unity feedback digital control system has open-loop transfer function
0.368z + 0.264
Gh0G(z) = 2 ; T = 1 sec
z - 1.368z + 0.368
jwT
The function Gh0G(e ) may be used to obtain frequency response plots of the system. This function is,
however, irrational. Prove that the relation
2 nT
w = tan -1
T 2
approximates Gh0G(e jwT ) to a rational function Gh0G( jn).
For Gh0G( jn), construct the Bode plot, and the log-magnitude versus phase angle plot and obtain the gain
margin, the phase margin and the bandwidth nb. What is the corresponding value of wb? The –3 dB contour of
the Nichols chart may be constructed using the following table:
4.9 Consider the control system of Fig. P4.9, where the plant transfer function
1
G(s) = , and T = 0.1 sec
s( s + 2)
(a) Increase the plant gain to the value that results in Kv = 5. Then find the phase margin.
(b) Design a lead compensator that results in 55º phase margin with Kv = 5.
(c) Design a lag compensator that results in 55º phase margin with Kv = 5.
(d) Obtain the bandwidth realized by the three designs corresponding to parts (a), (b) and (c). Comment on the
result.
(e) Is the selection of T = 0.1 sec justified from closed-loop bandwidth considerations?
r + e u y
D (z ) G h0 (s) G (s)
– T T
Compensator ZOH Plant
Fig. P4.9
4.10 Consider the control system of Fig. P4.9, where the plant transfer function is G(s) = 1/s2, and T = 0.1 sec.
Design a lead compensator such that the phase margin is 50º and the gain margin is at least 10 dB. Obtain the
velocity error constant Kv of the compensated system.
Can the design be achieved using a lag compensator? Justify your answer.
4.11 Consider the control system of Fig. P4.9, where the plant transfer function is
K
G(s) = , and T = 0.1 sec
s(s + 5)
The performance specifications are given as
(i) velocity error constant Kv ³ 10,
(ii) phase margin FM ³ 60º, and
(iii) bandwidth wb = 8 rad/sec
(a) Find the value of K that gives Kv = 10. Determine the phase margin and the bandwidth of the closed-loop
system.
(b) Show that if lead compensation is employed, the system bandwidth will increase beyond the specified
value, and if lag compensation is attempted, the bandwidth will decrease sufficiently so as to fall short of
the specified value.
Design of Digital Control Algorithms 249
(c) Design a lag section of a lag-lead compensator to provide partial compensation for the phase margin. Add
a lead section to realize phase margin of 60º. Check the bandwidth of the lag-lead compensated system.
(d) Find the transfer function D(z) of the lag-lead compensator and suggest a realization scheme.
4.12 Shown in Fig. P4.12a is a closed-loop temperature control system. Controlled electric heaters maintain the
desired temperature of the liquid in the tank. The computer output controls electronic switches (triacs), to vary
the effective voltage supplied to the heaters, from 0 V to 230 V. The temperature is measured by a thermocouple
whose output is amplified to give a voltage in the range required by A/D converter. A simplified block diagram
of the system, showing perturbation dynamics, is given in Fig. P4.12b.
(a) Consider the analog control loop of Fig. P4.12c. Determine K that gives 2% steady-state error to a step
input.
(b) Let D(z) = K obtained in part (a). Is the sampled-data system of Fig. P4.12b stable for this value of D(z)?
(c) Design a lag compensator for the system of part (b), such that 2% steady-state error is realized, the phase
margin is greater than 40º and the gain margin is greater than 6 dB. Give the total transfer function D(z) of
the compensator.
(d) Can the design of part (c) be achieved using a lead compensator? Justify your answer.
+
–
+
–
Fig. P4.12
250 Digital Control and State Variable Methods
4.13 (a) Consider a unity-feedback system with open-loop transfer function
K ( z - z1 )
Gh0G(z) = ;0£K<¥
( z - p1 )(z - p2 )
The poles and zero of this second-order transfer function lie on the real axis; the poles are adjacent or
congruent, with the zero to their left. Prove that the complex-conjugate section of the root locus plot is a
circle with the centre at z = z1, and the radius equal to ( z1 - p1 ) ( z1 - p2 ) .
K ( z - 0.9048)
(b) Given Gh0G(z) =
( z - 1)2
Sketch the root locus plot for 0 £ K < ¥. Using the information in the root locus plot, determine the range
of values of K for which the closed-loop system is stable. Also determine the value of K for which the
system closed-loop poles are real and multiple.
4.14 A sampled-data feedback control system is shown in Fig. P4.14. The controlled process of the system is
described by the transfer function
K
G(s) = ;0£K<¥
s( s + 1)
The sampling period T = 1 sec.
(a) Sketch the root locus plot for the system on the z-plane and from there obtain the value of K that results in
marginal stability.
(b) Repeat part (a) for (i) T = 2 sec, (ii) T = 4 sec, and compare the stability properties of the system with
different values of sampling interval.
r + y
G h0(s) G (s )
– T
Fig. P4.14
4.15 The digital process of a unity feedback system is described by the transfer function
K ( z + 0.717)
Gh0G(z) = ; T = 1 sec
( z - 1)( z - 0.368)
Sketch the root locus plot for 0 £ K < ¥ and from there obtain the following information:
(a) The value of K that results in marginal stability. Also find the frequency of oscillations.
(b) The value of K that results in z = 1. What are the time constants of the closed-loop poles?
(c) The value of K that results in z = 0.5. Also find the natural frequency wn for this value of K. You may use
the following table to construct a constant-z locus on the z-plane corresponding to z = 0.5.
Re 0.891 0.64 0.389 0.169 0 –0.113 –0.174 –0.188 –0.163
Im 0.157 0.37 0.463 0.464 0.404 0.310 0.207 0.068 0
4.16 The characteristic equation of a feedback control system is
z2 + 0.2A z – 0.1 A = 0
Sketch the root loci for 0 £ A < ¥, and therefrom obtain the range of parameter A for which the system is stable.
4.17 The block diagram of a sampled-data system using a dc motor for speed control is shown in Fig. P4.17. The
encoder senses the motor speed, and the output of the encoder is compared with the speed command. Sketch the
root locus plot for 0 £ K < ¥.
Design of Digital Control Algorithms 251
(a) For K = 1, find the time constant of the closed-loop pole.
(b) Find the value of K which results in a closed-loop pole whose time constant is less than or equal to one
fourth of the value found in part (a).
Use the parameter values:
Km = 1, tm = 1, T = 0.1 sec, P = 60 pulses/revolution.
wr + Km w
G h0(s) K
T tm s + 1
–
ZOH PWM Motor
amplifier
PT
2p
Encoder
Fig. P4.17
1
4.18 Consider the system shown in Fig. P4.9 with G(s) = and T = 0.2 sec.
s(s + 1)
(a) Design a lead compensator so that the dominant closed-loop poles of the system will have z = 0.5 and
wn = 4.5.
(b) Obtain the velocity error constant Kv of the lead compensated system.
(c) Add a lag compensator in cascade so that Kv is increased by a factor of 3. What is the effect of the lag
compensator on the transient response of the system?
(d) Obtain the transfer function D(z) of the lag-lead compensator, and suggest a realization scheme.
Use root locus method.
4.19 Consider the system shown in Fig. P4.9 with
1
G(s) = ; T = 1 sec
( s + 1)( s + 2)
Design a compensator D(z) that meets the following specifications on system performance:
(a) z = 0.5
(b) wn = 1.5, and
(c) Kp ³ 7.5
Use root locus method.
4.20 The block diagram of a digital control system is shown in Fig. P4.9. The controlled process is described by the
transfer function
K
G(s) = 2 ; T = 1 sec
s
which may represent a pure inertial load.
(a) The dominant closed-loop poles of the system are required to have z = 0.7, wn = 0.3 rad/sec. Mark the
desired dominant closed-loop pole locations in the z-plane. The root loci must pass through these points.
(b) Place the zero of the compensator D(z) below the dominant poles and find the location of pole of D(z), so
that the angle criterion at the dominant poles is satisfied. Find the value of K, so that the magnitude
criterion at the dominant poles is satisfied.
(c) Find the acceleration error constant, Ka.
(d) Your design will result in specified values of z and wn for the closed-loop system response, only if
the dominance condition is satisfied. Find the third pole of the closed-loop system and comment on the
effectiveness of your design.
252 Digital Control and State Variable Methods
4.21 The configuration of a commercial broadcast videotape positioning system is shown in Fig. P4.21. The rela-
tionship between the armature voltage (applied to drive motor) and tape speed at the recording and playback
heads, is approximated by the transfer function G(s). The delay term involved, accounts for the propagation of
speed changes along the tape, over the distance of physical separation of the tape drive mechanism and the
recording and playback heads. The tape position is sensed by a recorded signal on the tape itself.
G (s) =
qr + 40 e–s/120 1 q
D (z ) D /A
s + 40 s
–
A /D 1
Position sensor
Fig. P4.21
Design the digital controller that should result in zero steady-state error to any step change in the desired
tape position. The closed-loop poles of the system are required to lie within a circle of radius 0.56. Take the
sampling interval T = 1/120 sec.
4.22 Consider the sampled-data system shown in Fig. P4.22; the plant is known to have the transfer function
1
G(s) =
s(s + 1)
A sampling period of T = 0.1 sec is to be used.
(a) Design a digital controller to realize the following specifications:
(i) z = 0.8,
(ii) wn = 2p/10T, and
(iii) Kv ³ 5.
(b) Design a digital controller so that the response to unit-step input is
y(k) = 0, 0.5, 1, 1, K
Find the steady-state error to unit-ramp input.
r + e u y
D (z ) G h0(s) G (s )
– T T
Fig. P4.22
4.23 In the control configuration of Fig. P4.22, find the control algorithm D(z) so that the response to a unit-step
function will be y(t) = 1– e–t. The plant transfer function is
1
G(s) =
10 s + 1
Assume that the sampling interval T = 2 sec.
Part II
STATE VARIABLE METHODS IN AUTOMATIC CONTROL:
CONTINUOUS-TIME AND SAMPLED-DATA SYSTEMS
In Part I of the book, we have developed some general procedures for the design of controllers. Our
discussion was basically centered around the generalized operational block diagram of a feedback
system, shown in Fig.1.8.
We have assumed in our presentation, that the dynamic behaviour of the plant can be represented (or
approximated with “sufficient” accuracy) by a linear time-invariant nth order system, which is described
by a strictly proper, minimal (controllable and observable) rational transfer function GP(s). We have also
assumed that any external disturbances that affect the plant, can be represented by a single, additive
signal w(t), with known dynamic properties (refer Fig.1.8). The dynamics in the feedback path (often
attributed to the sensor), was assumed to be characterized by the proper minimal transfer function H(s),
which produces a continuous measure of the potentially noisy output y(t).
We placed a restriction on the design of controllers: the controller can be represented by a linear time-
invariant system, whose single output (for the single-input single-output (SISO) systems) u(t) is produced
by the input r(t) – b(t) = ê(t). Therefore, its dynamic behaviour can be described by
U(s) = D(s)[R(s) – B(s)]
where D(s) is the proper minimal transfer function of the controller, whose degree defines the order of the
controller.
We have observed that in many cases involving the so-called classical control techniques, the transfer
function A(s) (corresponding to the reference-input elements (Fig.1.8)), is assumed to be equal to H(s).
This implies the more restrictive unity-feedback configuration depicted in Fig. 1.12. However, the choice
of A(s)H(s) (e.g., A(s) = 1) would imply non-unity-feedback structure; the design procedures for this
structure have been developed in our companion book [155]. In the vast majority of applications, the
unity-feedback configuration is preferred because the error (e(t) = r(t) – y(t) = yr(t) – y(t)) is explicitly
present—both to drive the controller, and to be zeroed via feedback.
In this part of the book, we intend to relax the restrictions we have so far imposed on the development
of general procedures for the design of controllers. We know that the output y(t) does not represent the
complete dynamic state of the plant at time t; it is the state vector x(t)=[x1(t), …, xn(t)]T which carries
complete knowledge on the dynamics at time t. In the output-feedback configurations of the form shown
in Fig. 1.8, only partial information on the dynamical state of the plant is fed back. We will relax this
restriction and allow the complete state x(t) to be fed back.
In the classical configuration of Fig. 1.8, the controller output u(t) is produced by one input:
[r(t) – b(t)]. We will relax this restriction also, and allow the controller u(t) to be a function of r(t), and
b(t) independently.
The control law will take the form
u(t) = kR r(t)–kx(t)
where kR (scalar) is the reference control gain, and k (1 ´ n vector) is the state feedback gain.
Design procedures for such a control law will require state-space formulation for the dynamic systems
in the feedback loop. We, therefore, begin our discussion with development of state variable models, and
their analysis (Chapters 5 and 6). This will be followed by development of design procedures (Chapters
7 and 8).
Control System Analysis
5.1 INTRODUCTION
In Part I of this book, we have seen that the root-locus method and the frequency-response methods are quite
powerful for the analysis and design of feedback control systems. The analysis and design are carried out
using transfer functions, together with a variety of graphical tools such as root-locus plots, Nyquist plots,
Bode plots, Nichols chart, etc. These techniques of the so called classical control theory have been greatly
enhanced by the availability, and low cost, of digital computers for system analysis and simulation. The
graphical tools can now be more easily used with computer graphics.
The classical design methods suffer from certain limitations, due to the fact that the transfer function
model is applicable only to linear time-invariant systems, and that, there too, it is generally restricted to
single-input, single-output (SISO) systems. This is because the classical design approach becomes highly
cumbersome for use in multi-input, multi-output (MIMO) systems. Another limitation of the transfer func-
tion technique is that it reveals only the system output for a given input and provides no information about
the internal behaviour of the system. There may be situations where the output of a system is stable and yet
some of the system elements may have a tendency to exceed their specified ratings. In addition to this, it may
sometimes be necessary, and advantageous, to provide a feedback proportional to the internal variables of a
system, rather than the output alone, for the purpose of stabilizing and improving the performance of a
system.
The limitations of classical methods, based on transfer function models, have led to the development of
state variable approach of analysis and design. It is a direct time-domain approach which provides a basis
for modern control theory. It is a powerful technique for the analysis and design of linear and nonlinear,
time-invariant or time-varying MIMO systems. The organization of the state variable approach is such that
it is easily amenable to solution through digital computers.
It will be incorrect to conclude from the foregoing discussion, that the state variable design methods can
completely replace the classical design methods. In fact the classical control theory, comprising a large body
of use-tested knowledge, is still going strong. State variable design methods prove their mettle in applica-
tions that are intractable by classical methods.
The state variable formulation contributes to the application areas of classical control theory in a differ-
ent way. To compute the response of G(s) to an input R(s), requires the expansion of {G(s)R(s)} into partial
fractions; which, in turn, requires computation of all the poles of {G(s)R(s)}, or all the roots of a polynomial.
256 Digital Control and State Variable Methods
The roots of a polynomial are very sensitive to their coefficients (refer Review Example 3.3). Furthermore,
to develop a computer program to carry out partial fraction expansion is not simple. On the other hand, the
response of state variable equations is easy to program. Its computation does not require the computation of
roots or eigenvalues. Therefore, it is less sensitive to parameter variations. For these reasons, it is desirable
to compute the response of G(s) through state variable equations. State variable formulation is thus the most
efficient form of system representation—from the stand point of computer simulation. For this reason, many
Computer-Aided-Design (CAD) packages, handling both the classical and the modern tools of control
system design, use this notation. It is, therefore, helpful for the control engineer to be familiar with state
variable methods of system representation and analysis.
Part-II of this text presents an introduction to a range of topics which fall within the domain of state
variable analysis and design. Our approach is to build on, and complement, the classical methods of analysis
and design. State variable analysis and design methods use vector and matrix algebra and are, to some
extent, different from those based on transfer functions. For this reason, we have not integrated the state
variable approach with the frequency-domain approach based on transfer functions.
We have been mostly concerned with SISO systems in the text so far. In the remaining chapters also, our
emphasis will be on the control of SISO systems. However, many of the analysis and design methods based
on state variable concepts are applicable to both SISO and MIMO systems with almost equal convenience;
the only difference being the additional computational effort for MIMO systems, which is taken care of by
CAD packages. A specific reference to such results will be made at appropriate places in these chapters.
This section is intended to be a concise summary of facts about vectors and matrices. Having them all at
hand will minimize the need to consult a book on matrix theory. It also serves to define the notation and
terminology which are, regrettably, not entirely standard.
No attempt has been made at proving every statement made in this section. The interested reader is urged
to consult a suitable book (for example [27, 28]) for details of proofs.
5.2.1 Matrices1
Basic definitions and algebraic operations associated with matrices are given below.
Matrix The matrix
LMa 11 a12 L a1m OP
L a2 m
A= M PP
a 21 a22
= [aij] (5.1)
MM M M M
PQ
Na n1 an 2 L anm
is a rectangular array of nm elements. It has n rows and m columns. aij denotes (i, j)th element, i.e., the
element located in ith row and jth column. A is said to be a rectangular matrix of order n ´ m.
When m = n, i.e., the number of columns is equal to that of rows, the matrix is said to be a square matrix
of order n.
A n ´ 1 matrix, i.e., a matrix having only one column is called a column matrix. A 1 ´ n matrix, i.e., a
matrix having only one row is called a row matrix.
Diagonal Matrix A diagonal matrix is a square matrix whose elements off the principal diagonal are all
zeros (aij = 0 for i ¹ j ). The following matrix is a diagonal matrix.
1
We will use upper case bold letters to represent matrices and lower case bold letters to represent vectors.
Control System Analysis Using State Variable Methods 257
LMa 11 0 L 0 OP
0 a22 L 0
L = M
MM M M M P
P = diag [a 11 a12 L anm] (5.2)
N0 0 L a Q
nn
P
Unit (identity) Matrix A unit matrix I is a diagonal matrix whose diagonal elements are all equal to
unity (aii = 1, aij = 0 for i ¹ j).
LM1 0 L 0 OP
1 L 0
I = M
0
MM M M M
PP
N0 0 L 1
PQ
Whenever necessary, an n ´ n unit matrix will be denoted by In.
Null (zero) Matrix A null matrix 0 is a matrix whose elements are all equal to zero.
LM0 0 L 0 OP
0 L 0 P
0 =M
0
MM M M MP
N0 0 L 0Q
P
Whenever necessary, the dimensions of the null matrix will be indicated by two subscripts: 0nm.
Lower-triangular Matrix A lower-triangular matrix L has all its elements above the principal diagonal
equal to zero; lij = 0 if i < j for 1 £ i £ n and 1 £ j £ m.
LMl 11 0 L 0 OP
l22 L 0
L =M PP
l 21
MM M M M
PQ
Nl n1 ln 2 L lnm
Upper-triangular Matrix An upper-triangular matrix U has all its elements below the principal diagonal
equal to zero; uij = 0 if i > j for 1 £ i £ n and 1 £ j £ m.
LMu 11 u12 L u1m OP
0 u22 L u2 m
U= M
MM M M M
PP
N0 0 L unm
PQ
Matrix Transpose If the rows and columns of an n ´ m matrix A are interchanged, the resulting m ´ n
matrix, denoted as AT, is called the transpose of the matrix A. Namely, if A is given by Eqn. (5.1), then
LM a 11 a21 L an1 OP
L an 2 PP
A =M
T a 12 a22
MM M M M
PQ
Na 1m a2 m L anm
258 Digital Control and State Variable Methods
Some properties of the matrix transpose are
(i) (AT)T = A (ii) (kA)T = kAT, where k is a scalar
(iii) (A + B)T = AT + BT (iv) (AB)T = BTAT
Symmetric Matrix If a square matrix A is equal to its transpose;
A = AT,
then the matrix A is called a symmetric matrix.
Skew-symmetric Matrix If a square matrix A is equal to the negative of its transpose;
A = –AT,
then the matrix A is called a skew-symmetric matrix.
Conjugate Matrix If the complex elements of a matrix A are replaced by their respective conjugates,
then the resulting matrix is called the conjugate of A.
Conjugate Transpose The conjugate transpose is the conjugate of the transpose of a matrix. Given a
matrix A, the conjugate transpose is denoted by A* , and is equal to conjugate of AT.
Hermitian Matrix If a square matrix A is equal to its conjugate transpose;
A = A* ,
then the matrix A is called a Hermitian matrix. For matrices whose elements are all real (real matrices),
symmetric and Hermitian mean the same thing.
Skew-Hermitian Matrix If a square matrix A is equal to the negative of its conjugate transpose;
A = – A* ,
then the matrix A is called a skew-Hermitian matrix. For real matrices, skew-symmetric and skew-Hermitian
mean the same thing.
Determinant of a Matrix Determinants are defined for square matrices only. The determinant of the
n ´ n matrix A, written as |A|, or det A, is a scalar-valued function of A. It is found through the use of minors
and cofactors.
The minor mij of the element aij is the determinant of a matrix of order (n – 1) ´ (n – 1), obtained from A
by removing the row and the column containing aij.
The cofactor cij of the element aij is defined by the equation
cij = (– 1)i + j mij
Determinants can be evaluated by the method of Laplace expansion. If A is an n ´ n matrix, any arbitrary
row k can be selected and |A| is then given by
n
|A| = å akj ckj
j =1
Similarly, Laplace expansion can be carried out with respect to any arbitrary column l, to obtain
n
|A| = å ail cil
i =1
Laplace expansion reduces the evaluation of an n ´ n determinant down to the evaluation of a string of
(n – 1) ´ (n – 1) determinants, namely, the cofactors.
Some properties of determinants are
(i) det AB = (det A)(det B) (ii) det AT = det A
n
(iii) det kA = k det A; A is n ´ n matrix and k is scalar
(iv) The determinant of any diagonal or triangular matrix is the product of its diagonal elements.
Control System Analysis Using State Variable Methods 259
Singular Matrix A square matrix is called singular if the associated determinant is zero.
Nonsingular Matrix A square matrix is called nonsingular if the associated determinant is non-
zero.
Adjoint Matrix The adjoint matrix of a square matrix A is found by replacing each element aij of matrix
A, by its cofactor cij and then transposing.
LM1/ a
11 0 L 0 OP
L –1 =M
0 1/ a22 L 0
PP = diag
LM 1 1
L
1 OP
MM M M M
PQ Na
11 a22 a nn Q
N0 0 L 1/ ann
Rank of a Matrix The rank r(A) of a matrix A is the dimension of the largest array in A with a non-zero
determinant. Some properties of rank are
(i) r(AT ) = r (A)
(ii) The rank of a rectangular matrix cannot exceed the lesser of the number of rows or the number of
columns. A matrix whose rank is equal to the lesser of the number of rows and number of columns is
said to be of full rank.
r(A) £ min (n, m); A is n ´ m matrix
(iii) The rank of a product of two matrices cannot exceed the rank of the either:
r(AB) £ min [r(A), r(B)]
Trace of a Matrix The trace of a square matrix A is the sum of the elements on the principal diagonal.
tr A = å aii (5.5)
i
260 Digital Control and State Variable Methods
Some properties of trace are
(i) tr AT = tr A (ii) tr (A + B) = tr A + tr B
(iii) tr AB = tr BA; tr AB ¹ (tr A)(tr B) (iv) tr P–1AP = tr A
Partitioned Matrix A matrix can be partitioned into submatrices or vectors. Broken lines are used to
show the partitioning when the elements of the submatrices are explicitly shown. For example
LMa 11 a12 a13 OP
A = Ma 21 a22 a23 PP
MNa 31 a32 a33 Q
The broken lines indicating the partitioning are sometimes omitted when the context makes it clear that
partitioned matrices are being considered. For example, the matrix A given above may be expressed as
A=
LMA 11 A12 OP
NA 21 A 22 Q
We will be frequently using the following forms of partitioning.
(i) Matrix A partitioned into its columns:
A = [ a1 a2 L am]
where
LM a OP
1i
a = M P = ith column in A
a2i
i
MM M PP
Na Q
ni
Ny Qn
= yTx
Vector Norm The concept of norm of a vector is a generalization of the idea of length. For the vector
LM x OP1
x
x= M P
2
MM M PP
Nx Q n
the Euclidean vector norm || x || is defined by
|| x || = (x12 + x22 + L + xn2)1/2 = (xTx)1/2 (5.6a)
In two or three dimensions, it is easy to see that this definition for the length of x satisfies the conditions
of Euclidean geometry. It is a generalization to n dimensions of the theorem of Pythagoras.
For any nonsingular matrix P, the vector
y = Px
has the Euclidean norm
|| y || = [(P x)T(P x)]1/2 = (xT PT P x)1/2
Letting Q = PT P, we write
|| y || = (xTQ x)1/2
or
|| x ||Q = (xTQ x)1/2 (5.6b)
We call || x ||Q the norm of x with respect to Q. It is, in fact, a generalization of the norm defined in (5.6a)
in that it is a measure of the size of x ‘weighted’ by the matrix Q.
Matrix Norm The norm of a matrix is a measure of the ‘size’ of the matrix (not its dimension). For
the matrix
LMa 11 a12 L a1n OP
a a22 L a2 n
A= M
21
MM M M M
PP
Nan1 an 2 L ann
PQ
262 Digital Control and State Variable Methods
the Euclidean matrix norm || A || is defined by
L
|| A || = M
n
aij2
OP 1/ 2
|| A || = max
e x A Ax j
T T
= max
FG x A Ax IJ
T T 1/ 2
x
ex x j T 1/ 2 x H xx K T
The maximum value of the ratio in this expression can be determined in terms of the eigenvalues2 of the
matrix ATA. The real symmetric matrix ATA has all real and non-negative eigenvalues and the maximum
value of the ratio (xTATAx)/(xTx) is equal to the maximum eigenvalue of ATA (for proof, refer [107]).
Therefore,
|| A || = (Maximum eigenvalue of ATA)1/2 (5.6d)
3
This definition of the matrix norm is known as the spectral norm of A.
The square roots of the eigenvalues of ATA are called the singular values of A. The spectral norm of A is
equal to its largest singular value.
Singular values of a matrix are useful in numerical analysis. The ratio of the largest to the smallest singu-
lar values of A, called the condition number of A, is a measure of how close the matrix A comes to being
singular. The matrix A is therefore ‘ill-conditioned’ if its condition number is large.
Orthogonal Vectors Any two vectors which have a zero scalar product are said to be orthogonal vectors.
Two n ´ 1 vectors x and y are orthogonal if
xTy = 0
A set of vectors is said to be orthogonal if, and only if, every two vectors from the set are orthogonal:
xTy = 0 for all x ¹ y in the set.
Unit Vector A unit vector x$ is, by definition, a vector whose norm is unity; || x$ || = 1. Any non-zero vector
x can be normalized to form unit vector.
x
x$ =
|| x ||
Orthonormal Vectors A set of vectors is said to be orthonormal if, and only if, the set is orthogonal and
each vector in this orthogonal set is a unit vector.
Orthogonal Matrix Suppose that {x1, x2, K , xn} is an orthogonal set:
x iT xi = 1, for all i
and
2
The roots of the equation
|lI – A| = 0
are called the eigenvalues of matrix A. Detailed discussion will appear in Section 5.6.
3
Refer [105] for other valid vector and matrix norms.
Control System Analysis Using State Variable Methods 263
Ga = 0
If the m ´ m matrix G has a non-zero determinant, then G– 1 exists, and
a = G– 10 = 0 (5.7b)
This contradicts the assumption of at least one non-zero ai. The matrix G is called the Grammian matrix.
A necessary and sufficient condition for the set {xi} to be linearly dependent is that |G| = 0.
Linear Independence and Rank The column rank of a matrix A is equal to maximum number of linearly
independent columns in A.
The maximum number of linearly independent columns of a matrix is equal to the maximum number of
linearly independent rows. Therefore, the column rank of A = the row rank of A = r (A), which is, in turn,
equal to the order of the largest square array in A whose determinant does not vanish.
Vector Functions In Section 5.8, we will require a test for the linear independence of the rows of a matrix
whose elements are functions of time.
264 Digital Control and State Variable Methods
Consider a matrix
LM f at ff 12 t
11 af
L f 1m t f1 t a f OP LM a f OP
F(t) = M M M M = M P MM P
MN f at f
n1 af
f n 2 t L f nm t fn t a f PQ N a f PQ
fi(t); i = 1, K , n are the n row vectors of matrix F; each vector has m components.
The scalar product of two 1 ´ m vector functions fi(t) and fj(t) on [t0, t1] is by definition,
t1
< fi , fj > = z
t0
fi(t)fjT(t) dt
The set of n row-vector functions {f1(t), K , fn(t)} are linearly dependent if there exists a set of n scalars
ai, at least one of which is not zero, which satisfies
a1f1(t) + a2f2(t) + L + anfn(t) = 01 ´ m
LM f (t) OP
11 LM f (t) OP
21 LM f (t) OP
n1 LM0OP
or a1 MM M PP + a 2 MM M PP + L + a n MM M PP = MM0M PP
N f (t ) Q
1m N f (t ) Q
2m N f (t ) Q
nm NQ
Equivalently, the n rows fi(t) are linearly dependent if
a T F(t) = 0 (5.8a)
for some
a1 LM OP
a= M ¹ 0 MM PP
an N Q
The Grammian matrix of functions fi(t), i = 1, K , n; where fi(t) is the ith row of the matrix F(t), is given
by (refer Eqns (5.7)),
t1
W(t0, t1) = z
t0
F(t)FT(t) dt (5.8b)
The functions f1(t), K , fn(t), which are the rows of the matrix F(t), are linearly dependent on [t0, t1] if, and
only if, the n ´ n constant matrix W(t0, t1) is singular.
We will be mostly concerned with SISO system configurations of the type shown in the block diagram of
Fig. 5.1. The plant in the figure is a physical process, characterized by the state variables x1, x2, K , xn, the
output variable y and the input variable u.
r + u y
kR Plant
–
x1
k1
x2
k2
xn
kn
Zero
friction B
(a) (b)
Fig. 5.2
All other voltage and current variables associated with the network are related to e1, e2, e3 and input u,
through linear algebraic equations. This means that their values (at all instants of time) can be obtained from
the knowledge of the network variables e1, e2, e3 and the input variable u, merely by linear combinations. In
other words, the reduced set {e1(t), e2(t), e3(t)} of network variables with the input variable u(t), completely
represents the status of the network at time t.
For the purpose of finding a mathematical model to represent a system, we will naturally choose a mini-
mal set of variables that describes the status of the system. Such a set would be obtained when none of the
selected variables is related to other variables and the input, through linear algebraic equations. A little
consideration shows that there is redundancy in the set{e1(t), e2(t), e3(t)} for the network of Fig. 5.2a; a set
of two variables, say{e1(t), e2(t)}, with the input u(t) represents the network completely at time t.
Manipulation of the network equations obtained earlier, gives
de1( t ) 1 1
=- 4 e1 t
( ) + 4 u(t )
dt
268 Digital Control and State Variable Methods
de2( t ) 1 1
=- 8 e1 t
( ) + 8 u( t )
dt
This set of equations constitutes a mathematical model for the system. It is a set of two first-order differ-
ential equations. Its complete solution for any given u(t) applied at t = t0, will require a knowledge of the
value of the selected variables {e1, e2} at t = t0. To put it differently, we can say that if the values of {e1, e2}
at t = t0 are known, then the values of these variables at any time t > t0, in response to a given input u( t0 ,t ) , can
be obtained by the solution of the two first-order differential equations. A set of system variables having this
property, is called a set of state variables. The set of values of these variables at any time t is called the state
of the system at time t. The set of first-order differential equations relating the first derivative of the state
variables with the variables themselves and the input, is called a set of state equations. It is also to be noted
that the number of state variables needed to form a correct and complete model of the system is equal to the
order of the system.
An important point regarding the concept of state of a system is that the choice of state variables is not
unique. In the network of Fig. 5.2a, instead of voltages {e1, e2}, the voltages {e2, e3} or {e3, e1} may be taken
as state variables to define the state of the system. In fact, any set of variables x1(t) and x2(t), given by
LM OP L
x1 (t ) p11 p12 e1 (t )OP LM OP
N Q MN
x 2 (t )
=
p21 p22 e2 (t ) QN Q
where pij are constants such that the matrix
P=
LM
p11 p12 OP
N
p21 p22 Q
is nonsingular, is qualified to describe the state of the system of Fig. 5.2a because we can express the
capacitor voltages in terms of the selected variables x1(t) and x2(t). This brings out additional facts that there
are infinitely many choices of state variables for any given system, and that the selected state variables may
not correspond to physically measurable quantities of the system. Later in this chapter, we will see that all
the choices of state variables are not equally convenient. Usually, state variables are chosen so that they
correspond to physically measurable quantities, or lead to particularly simplified calculations.
For a particular goal of study of a given physical system, we may not be interested in the total information
about the system at a particular time. We may be interested only in a part of the total information. This is
called the output of the system, which can be obtained algebraically from the information of the system state
and the input. The output is, by definition, a physical attribute of the system and is measurable. For example,
in the electric network of Fig. 5.2a, the information of interest may be the voltage across the resistor. The
output
y(t) = – e1(t) + u(t)
As another example of the state of a system, consider the mechanical network shown in Fig. 5.2b. The
force F(t) is the input variable. Defining the displacement y(t) of the mass as the output variable, we obtain
the following input-output model for the system:
d 2 y( t ) dy(t )
M 2 + B + Ky(t) = F(t)
dt dt
An alternative form of the input-output model is the transfer function model:
Y (s ) 1
=
F ( s) Ms 2 + Bs + K
The set of forces, velocities, and displacements, associated with all the elements of the mechanical net-
work at any time t, represents the status of the network at that time. A little consideration shows that values
Control System Analysis Using State Variable Methods 269
of all the system variables (at all instants of time) can be obtained from the knowledge of the system vari-
ables y(t) and v(t), and the input variable F(t), merely by linear combinations. The dynamics of y(t) and v(t)
are given by the following first-order differential equations:
dy (t )
= v(t)
dt
dv(t ) K B 1
=– y(t) – v(t) + F(t)
dt M M M
The variables {y(t), v(t)} are, therefore, the state variables of the system of Fig. 5.2b, and the two
first order differential equations given above, are the state equations of the system. Using standard symbols
for state variables and input variable, we can write the state equations as
x& 1 = x2
K B 1
x& 2 = – x1 – x2 + u
M M M
D D D
x1(t) = y(t); x2(t) = v(t); u(t) = F(t)
Defining y(t) as the output variable, the output equation becomes
y = x1
We can now appreciate the following definitions.
State The state of a dynamic system is the smallest set of variables (called state variables) such that
the knowledge of these variables at t = t0, together with the knowledge of the input for t ³ t0, completely
determines the behaviour of the system for any time t ³ t0.
State Vector If n state variables x1, x2, K , xn, are needed to completely describe the behaviour of a given
system, then these n state variables can be considered the n components of a vector x. Such a vector is called
a state vector.
State Space The n-dimensional space whose coordinate axes consist of the x1-axis, x2-axis, K , xn-axis, is
called a state space.
State Trajectory At any time t0, the state vector (and hence the state of the system) defines a point in the
state space. As time progresses and the system state changes, a set of points will be defined. This set of
points, the locus of the tip of the state vector as time progresses, is called the state trajectory of the system.
State space and state trajectory in two-dimensional cases are referred to as the phase plane and phase
trajectory, respectively.
4
Chapter 2 of reference [155]
270 Digital Control and State Variable Methods
x& 1(t) = a11 x1(t) + a12 x2(t) + L + a1n xn(t) +b1 u(t)
x& 2(t) = a21 x1(t) + a22 x2(t) + L + a2n xn(t) + b2 u(t) (5.10a)
M
x& n(t) = an1 x1(t) + an2 x2(t) + L + ann xn(t) + bnu(t)
where the coefficients aij and bi are constants. These n first-order differential equations are called state
equations of the system.
Integration of Eqn. (5.10a) gives
t
xi(t) = xi(t0) + z
t0
[ai1 x1(t) + L + ain xn(t) + bi u(t)]dt; i = 1, 2, K , n
Thus, the n state variables and hence the state of the system can be determined uniquely at any
t > t0, if each state variable is known at t = t0, and the control force u(t) is known throughout the interval t0 to t.
The output y(t) at any time t will be a function of x1(t), x2(t), K, xn(t). However, in some cases, the output
may also depend upon the instantaneous value of the input u(t). For linear systems, the output is a linear
combination of the state variables and the input:
y(t) = c1 x1(t) + c2 x2(t) + L + cn xn(t) + d u(t) (5.10b)
where ci and d are constants. The algebraic equation (5.10b) is called output equation of the system.
Since every real-world system has some nonlinearity, a mathematical model of the form (5.10) is an
approximation to reality. Many real-world nonlinearities involve a ‘smooth’ curvelinear relation between
independent and dependent variables. Nonlinear functions fi(×) and g(×) of the form
x& i(t) = fi (x1(t), x2(t), K , xn(t), u(t)); xi(t0) =D xi0 (5.11a)
y(t) = g(x1(t), x2(t), K , xn(t), u(t)) (5.11b)
may be linearized about a selected operating point using the multivariable form of the Taylor series:
One of the advantages of state variable formulation is that an extremely compact vector-matrix notation
can be used for the mathematical model. Using the laws of matrix algebra, it becomes much less cumber-
some to manipulate the equations.
In the vector-matrix notation, we may write Eqns (5.10) as
LM x& (t) OP LMa
1 11 a12 L a1n OP LM x (t) OP L b O LM x bt g OP LM x OP
1 1 1 0
0
1
LM x (t)OP
1
x (t )
Lc ] M
MM M PPP + d u(t)
2
y(t) = [c1 c2 n (5.12b)
N x ( t )Q
n
Example 5.1 Two very usual applications of dc motors are in speed and position control systems.
Figure 5.3 gives the basic block diagram of a speed control system. A separately excited dc motor drives
the load. A dc tachogenerator is attached to the motor shaft; speed signal is fedback and the error signal is
used to control the armature voltage of the motor.
Reference signal corresponding Controlled output (speed)
to desired speed
er + u dc motor
Controller +
load
–
Tachogenerator
La Ra
ia
eb J, B
u
a fOP LM
B KT OP a f L O
LMx&1 t
=
-
J
MM J x1 t
PP LMN a fOPQ MM PP
+
0
1 u(t)
N a fQ
x& 2 t K
- b - a
R x2 t La N Q
LaMN La PQ
y(t) = x1(t)
5
In MKS untis, Kb = KT; Section 3.5 of reference [155].
Control System Analysis Using State Variable Methods 273
Let us assign numerical values to the system parameters.
For the parameters6
Ra= 1 ohm, La = 0.1 H, J = 0.1 kg-m2, B = 0.1 (newton-m)/(rad/sec), Kb = KT = 0.1, (5.16)
the plant model becomes
x& (t) = Ax(t) + bu(t)
(5.17)
y(t) = cx(t)
where A=
LM-1 OP ; b = LM 0OP; c = [1
1
0]
N -1 -10Q N10Q
Example 5.2 Figure 5.5 gives the basic block diagram of a position control system. The controlled vari-
able is now the angular position q (t) of the motor shaft:
dq ( t )
= w (t) (5.18)
dt
Controlled output (position)
Reference signal corresponding
to desired position
er + dc motor
u q
Controller +
load
–
Error signal Armature voltage
Position sensor
LMx&1 (t )
0
OP 1
B
LM 0
KT x1 t 0 OP L a f O L O
x& 2 (t ) =
MM
0 -
PP J MMJ x 2 t + 0 u(t)
1
PP MM a f PP MM PP
N
x&3 (t ) Q
0 -
Kb
La
-
Ra
MN
La
x3 t L a
PQ MN a f PQ MMN PPQ
y(t) = x1(t)
6
These parameters have been chosen for computational convenience
274 Digital Control and State Variable Methods
For the system parameters given by (5.16), the plant model for position control system becomes
x& (t) = Ax(t) + bu(t)
(5.19)
y(t) = cx(t)
where
0LM 1 0 OP 0 LM OP
A = 0 -1
MM PP
1 ; b = 0 ; c = [1
MM PP 0 0]
N
0 -1 -10 10 Q N Q
In Examples 5.1 and 5.2 discussed above, the selected state variables are the physical quantities of the
systems which can be measured.
We will see in Chapter 7 that in a physical system, in addition to output, other state variables could be
utilized for the purpose of feedback. The implementation of design with state variable feedback becomes
straightforward if the state variables are available for feedback. The choice of physical variables of a system
as state variables therefore helps in the implementation of design. Another advantage of selecting physical
variables for state variable formulation is that the solution of state equation gives time variation of variables
which have direct relevance to the physical system.
x=
LM OP LM OP
x1
=
w
N Q NQ
x2 ia
We now define new state variables as
x 1 = w, x 2 = – w + ia
or
LM OP LM
x = 1 =
x x1
=
OP LM
1 0 x1OP LM OP
N Q N
x2 - x1 + x 2 Q N
-1 1 x 2QN Q
We can express velocity x1(t) and armature current x2(t) in terms of the variables x 1(t) and x 2(t):
x = Px (5.23)
with
P=
LM OP
1 0
N Q
1 1
Using Eqns (5.22) and (5.17), we obtain the following state variable model for the system of Fig. 5.4, in
terms of the transformed state vector x (t):
x& (t) = Ax (t) + b u(t)
(5.24)
y(t) = c x (t)
where
A = P–1A P =
LM 1 0OP LM-1 1OP LM1 0OP = LM 0 1 OP
N -1 1Q N-1 -10 Q N1 1Q N -11 -11 Q
b = P b= M
–1 L 1 0OP LM 0OP = LM 0OP
N -1 1Q N10Q N10Q
c = cP = [1 0] M
L1 0OP = [1 0]
N1 1Q
x 1(t0) = x1(t 0); x 2(t0) = – x1(t0) + x2(t0)
Equations (5.24) give an alternative state variable model of the system previously represented by Eqns
(5.17). x (t) and x(t) both qualify to be state vectors of the given system (the two vectors individually char-
acterize the system completely at time t), and the output y(t), as we shall see shortly, is uniquely determined
from either of the models (5.17) and (5.24). State variable model (5.24) is thus equivalent to the model
(5.17), and the matrix P given by Eqn. (5.23) is an equivalence or similarity transformation.
The state variable model given by Eqns (5.24) is in a canonical (special) form. In Chapter 7, we will use
this form of model for pole-placement design by state feedback.
+
+ x1
b1 ò +
c1
+ +
a11
a21 +
u y
a12 +
a22
+
+ +
b2 ò c2
+ x2
+
x20
Fig. 5.6 State diagram for the system (5.25)
We shall derive the transfer function of a SISO system from the Laplace-transformed version of the state and
output equations. Refer Section 5.2 for the vector and matrix operations used in the derivation.
Consider the state variable model (Eqns (5.13)):
x& (t) = Ax(t) + bu(t); x(t0) =D x0 (5.26)
y(t) = cx(t) + du(t)
Control System Analysis Using State Variable Methods 277
Taking the Laplace transform of Eqns (5.26), we obtain
sX(s) – x0 = AX(s) + bU(s)
Y(s) = cX(s) + dU(s)
where
D D D
X(s) = L [x(t)]; U(s) = L [u(t)]; Y(s) = L [y(t)]
Manipulation of these equations, gives
(sI – A)X(s) = x0 + bU(s); I is n ´ n identity matrix
or X(s) = (sI – A)–1x0 + (sI – A)–1bU(s) (5.27a)
Y(s) = c(sI – A)–1x0 + [c(sI – A)–1b + d]U(s) (5.27b)
Equations (5.27) are algebraic equations. If x0 and U(s) are known, X(s) and Y(s) can be computed from
these equations.
In the case of a zero initial state (i.e., x0 = 0), the input-output behaviour of the system (5.26) is deter-
mined entirely by the transfer function
Y( s )
= G(s) = c(sI – A)–1b + d (5.28)
U( s)
We can express the inverse of the matrix (sI – A) as
(s I − A) +
(sI – A)–1 = (5.29)
| s I − A|
where
|sI – A| = determinant of the matrix (sI – A)
(sI – A)+= adjoint of the matrix (sI – A)
Using Eqn. (5.29), the transfer function G(s) given by Eqn. (5.28) can be written as
c ( s I − A) + b
G(s) = +d (5.30)
| s I − A|
For a general nth-order matrix
LM
a11 a12 L a1n OP
a21 a22 L a2 n
A= MM
M M M
, PP
MNa
n1 an 2 L ann
PQ
the matrix (sI – A) has the following appearance:
LMs - a 11 - a12 L - a1n OP
-a s - a22 L - a2 n
(sI – A) = M PP
21
MM M M M
PQ
N- a
n1 - an 2 L s - ann
If we imagine calculating det(sI – A), we see that one of the terms will be the product of diagonal
elements of (sI – A):
(s – a11)(s – a22) L (s – ann) = sn + a¢1 sn – 1 + L + a¢n,
a polynomial of degree n with the leading coefficient of unity. There will be other terms coming from the off-
diagonal elements of (sI – A), but none will have a degree as high as n. Thus | sI – A| will be of the following
form:
| sI – A| = D(s) = sn + a 1 sn – 1 + L + a n (5.31)
where ai are constant scalars.
278 Digital Control and State Variable Methods
This is known as the characteristic polynomial of the matrix A. It plays a vital role in the dynamic
behaviour of the system. The roots of this polynomial are called the characteristic roots or eigenvalues of
matrix A. These roots, as we shall see in Section 5.7, determine the essential features of the unforced
dynamic behaviour of the system (5.26).
The adjoint of an n ´ n matrix is itself an n ´ n matrix, whose elements are the cofactors of the original
matrix. Each cofactor is obtained by computing the determinant of the matrix that remains when a row and a
column of the original matrix are deleted. It thus follows that each element in (sI – A)+ is a polynomial in s
of maximum degree (n – 1). Adjoint of (sI – A) can therefore be expressed as
(sI – A)+ = Q1 sn – 1 + Q2 sn – 2 + L + Qn – 1 s + Qn (5.32)
where Qi are constant n ´ n matrices.
We can express transfer function G(s) given by Eqn. (5.30) in the following form:
c[ Q 1 s n - 1 + Q 2 s n - 2 + L + Q n - 1 s + Q n ] b
G(s) = +d (5.33)
sn + a1 sn -1 + L + a n -1 s + a n
G(s) is thus a rational function of s. When d = 0, the degree of numerator polynomial of G(s) is strictly
less than the degree of the denominator polynomial and, therefore, the resulting transfer function is a strictly
proper transfer function. When d ¹ 0, the degree of numerator polynomial of G(s) will be equal to the degree
of the denominator polynomial, giving a proper transfer function. Further,
d = lim [G(s)] (5.34)
s®¥
From Eqns (5.31) and (5.33) we observe that the characteristic polynomial of matrix A of the system
(5.26) is same as the denominator polynomial of the corresponding transfer function G(s). If there are no
cancellations between the numerator and denominator polynomials of G(s) in Eqn. (5.33), the eigenvalues
of matrix A are same as the poles of G(s). We will take up in Section 5.9, this aspect of the correspondence
between state variable models and transfer functions. It will be proved that for a completely controllable and
completely observable state variable model, the eigenvalues of matrix A are same as the poles of the corre-
sponding transfer function.
Example 5.4 Consider the position control system of Example 5.2. The plant model of the system is
reproduced below:
7
Section 3.4 of reference [155]
280 Digital Control and State Variable Methods
10 10
= 3 2
= 2
s + 11 s + 11 s s( s + 11 s + 11)
–10 –1
–1
8
The proof of relation (5.44b) is quite involved and will not be presented here. Refer [108].
Control System Analysis Using State Variable Methods 281
The algorithm given by Eans (5.44), called the resolvent algorithm, is convenient for hand calculation
and also easy to implement on a digital computer.
Example 5.5 Here we again compute (sI – A)–1 which appeared in Example 5.4, but this time using the
resolvent algorithm (5.44).
Q1 = I, a1 = – tr(A) = 11
Q2 = A + a1I
LM11 1 0 OP 1
MM 0
= 0
PP
10 1 ; a2 = – 2 tr(AQ2) = 11
N -1 1 Q
Q3 = AQ2 + a2I
LM11 10 1OP
1
MM 0
= 0
PP
0 0 ; a3 = – 3 tr(AQ3) = 0
N 0 0 Q
As a numerical check, we see that the relation
0 = AQ3 + a 3I
is satisfied. Therefore,
Q1 s2 + Q 2 s + Q 3
(sI – A)–1 = F(s) =
s3 + a 1 s2 + a 2 s + a 3
1
LMs 2
+ 11 s + 11 s + 10 1 OP
=
s(s 2 + 11s + 11) MM 0 s( s + 10) s PP
N 0 -s s(s + 1) Q
Cayley-Hamilton Theorem Using resolvent algorithm, we develop here a fundamental property of the
characteristic equation. To this end, we write from Eqns (5.44a)
Q 2 = A + a 1I
Q3 = AQ2 + a2I = A2 + a1A + a2I
M
Qn = An – 1 + a1An – 2 + L + an – 1I
AQn = An + a1An – 1 + L + an – 1A = – anI
Therefore,
An + a1An – 1 + L + an – 1A + anI = 0 (5.45)
This is the well-known result known as the Cayley-Hamilton theorem. Note that this equation is same as
the characteristic equation
sn + a1sn – 1 + L + an – 1s + an = 0 (5.46)
i i
with the scalar s in the latter replaced by the matrix A ( i = 1, 2, K , n).
282 Digital Control and State Variable Methods
Thus, another way of stating the Cayley-Hamilton theorem is as follows: Every matrix satisfies its own
characteristic equation.
Later we will use the resolvent algorithm and the Cayley-Hamilton theorem for evaluation of the state
transition matrix required for the solution of the state equations.
In the last section, we studied the problem—finding the transfer function from the state variable model of a
system. The converse problem—finding a state variable model from the transfer function of a system, is the
subject of discussion in this section. This problem is quite important because of the following reasons:
(i) Quite often the system dynamics is determined experimentally using standard test signals like a step,
impulse, or sinusoidal signal. A transfer function is conveniently fitted to the experimental data in
some best possible manner.
There are, however, many design techniques developed exclusively for state variable models. In
order to apply these techniques, experimentally obtained transfer function descriptions must be real-
ized into state variable models.
(ii) Realization of transfer functions into state variable models is needed even if the control system design
is based on frequency-domain design methods. In these cases, the need arises for the purpose of
transient response simulation. Many algorithms and numerical integration computer programs de-
signed for solution of systems of first-order equations are available, but there is not much software for
the numerical inversion of Laplace transforms. Thus, if a reliable method is needed for calculating the
transient response of a system, one may be better off converting the transfer function of the system to
state variable description, and numerically integrating the resulting differential equations, rather than
attempting to compute the inverse Laplace transform by numerical methods.
We shall discuss here the problem of realization of transfer function into state variable models.
Note the use of the term ‘realization’. A state variable model that has a prescribed rational function
G(s) as its transfer function, is the realization of G(s). The term ‘realization’ is justified by the fact
that by using the state diagram corresponding to the state variable model, the system with the transfer
function G(s) can be built in the real world by an op amp circuit.9
The following three problems are involved in the realization of a given transfer function into state vari-
able models:
(i) Is it possible at all, to obtain state variable description from the given transfer function?
(ii) If yes, is the state variable description unique for a given transfer function?
(iii) How do we obtain the state variable description from the given transfer function?
The answer to the first problem has been given in the last section. A rational function G(s) is realizable by
a finite dimensional linear time-invariant state model if and only if G(s) is a proper rational function. A
proper rational function will have state model of the form:
x& (t) = Ax(t) + bu(t)
(5.47)
y(t) = cx(t) + du(t)
where A, b, c and d are constant matrices of appropriate dimensions. A strictly proper rational function will
have state model of the form
x& (t) = Ax(t) + bu(t)
(5.48)
y(t) = cx(t)
9
Section 2.13 of reference [155]
Control System Analysis Using State Variable Methods 283
Let us now turn to the second problem. In the last section, we saw that there are innumerable systems that
have the same transfer function. Hence, the representation of a transfer function in state variable form is
obviously, not unique. However, all these representations will be equivalent.
In the remaining part of this section, we deal with the third problem. We shall develop three standard, or
‘canonical’ representations of transfer functions.
A linear time-invariant SISO system is described by transfer function of the form
b s m + b 1s m – 1 + L + b m
G(s) = 0 n ;m £ n
s + a 1 s n -1 + L + a n
where the coefficients ai and bi are real constant scalars. Note that there is no loss in generality to assume
the coefficient of sn to be unity.
In the following, we derive results for m = n; these results may be used for the case m < n by setting
appropriate bi coefficients equal to zero. Therefore, our problem is to obtain a state variable model corre-
sponding to the transfer function
b sn + b1 sn - 1 + L + b n
G(s) = 0 n (5.49)
s + a1 sn -1 + L + a n
5.5.1 First Companion Form
Our development starts with a transfer function of the form
Z (s) 1
= n (5.50)
U( s ) s + a1 sn - 1 + L + a n
which can be written as
(sn + a1sn – 1 + L + an) Z(s) = U(s)
The corresponding differential equation is
pnz(t) + a1pn – 1z(t) + L + anz(t) = u(t)
where
k
D d z t
pkz(t) =
af
dt k
Solving for highest derivative of z(t), we obtain
pnz(t) = – a1pn – 1z(t) – a2pn – 2 z(t) – L – anz(t) + u(t) (5.51)
Now consider a chain of n integrators as shown in Fig. 5.8. Suppose that the output of the last integrator
is z(t); then, the output of the just previous integrator is pz = dz/dt, and so forth. The output from the first
integrator is pn – 1z(t), and thus, the input to this integrator is pnz(t). This leaves only the problem of obtain-
ing pnz(t) for use as input to the first integrator. In fact, this is already specified by Eqn. (5.51). Realization
of this equation is shown in Fig. 5.8.
u + pnz pn – 1 z pn – 2z pz z
ò ò ò ò
–
1 2 n–1 n
+ + +
+ + +
A realization of the transfer function (5.52b) has already been developed. Figure 5.8 shows this realiza-
tion. The output of the last integrator is z(t) and the inputs to the integrators in the chain—from the last to the
first— are the n successive derivatives of z(t).
Realization of the transfer function (5.52a) is now straightforward. The output
y(t) = b0 pnz(t) + b1pn – 1z(t) + L + bnz(t),
is the sum of the scaled versions of the inputs to the n integrators. Figure 5.10 shows complete realization of
the transfer function (5.49). All that remains to be done is to write the corresponding differential equations.
To get one state variable model of the system, we identify the output of each integrator in Fig. 5.10 with
a state variable starting at the right and proceeding to the left. The corresponding differential equations,
using this identification of state variables, are
x& 1 = x2
x& 2 = x3
M (5.53a)
x& n – 1 = xn
x& n = – an x1 – an – 1 x2 – L – a1 xn + u
+ + + + y
+ + + +
0 1 2 n–1 n
u + xn xn – 1 x2 x1 z
1 2 n–1 n
+ + +
+ + +
n n–1 n–2 1 0
x1 x2 xn – 1 xn
+ + + + +
+ + + + y
– – – –
n n–1 n–2 1
We can now write differential equations for the realization given by Fig. 5.11. To get one state variable
model, we identify the output of each integrator in Fig. 5.11 with a state variable—starting at the left and
proceeding to the right. The corresponding differential equations are
x& n = xn – 1 – a1 (xn + b0u) + b1u
x& n – 1 = xn – 2 – a2 (xn + b0u) + b2u
M
x& 2 = x1 – an – 1 (xn + b0u) + bn – 1u
x& 1 = – an (xn + b0u) + bnu
and the output equation is
y = x n + b0 u
The state and output equations, organized in vector-matrix form, are given below:
x& (t) = Ax(t) + bu(t)
y(t) = cx(t) + du(t) (5.56)
with
LM0 0 L 0 -a n OP b n - an b 0LM OP
1 0 L 0 -a n - 1
MM
A= 0 1 L 0
PP b
-a n - 2 ; b = n - 1
- a n -1 b 0
MM PP
MM
M M M M
PP M
MN PQ
b 1 - a 1b 0
MN
0 0 L 1 -a 1 PQ
c = [0 0 L 0 1]; d = b0
Compare A, b, and c matrices of the second companion form with that of the first. We observe that A, b,
and c matrices of one companion form correspond to the transpose of the A, c, and b matrices, respectively,
of the other.
There are many benefits derived from the companion forms of state variable models. One obvious benefit
is that both the companion forms lend themselves easily to simple analog computer models. Both the
companion forms also play an important role in pole-placement design through state feedback. This will be
discussed in Chapter 7.
Control System Analysis Using State Variable Methods 287
5.5.3 Jordan Canonical Form
In the two canonical forms (5.54) and (5.56), the coefficients of the denominator of the transfer function
appear in one of the rows or columns of matrix A. In another of the canonical forms, the poles of the transfer
function form a string along the main diagonal of the matrix. This canonical form follows directly from the
partial fraction expansion of the transfer function.
The general transfer function under consideration is (refer Eqn. (5.49))
-1
b 0 sn + b 1 sn + L + bn
G(s) = n n -1
s + a1 s + L + an
By long division, G(s) can be written as
-1 - 2
b 1¢ s n + b ¢2 s n + L + b ¢n
G(s) = b0 + n n -1
= b0 + G¢(s)
s + a1 s + L + an
The results are simplest when the poles of the transfer function are all distinct. The partial fraction
expansion of the transfer function, then has the form.
Y (s) r1 r2 rn
G(s) = = b0 + + +L+ (5.57)
U(s) s - l1 s - l2 s - ln
The coefficients ri (i = 1, 2, K, n) are the residues of the transfer function G¢(s) at the corresponding
poles at s = li (i = 1, 2, K, n). In the form of Eqn. (5.57), the transfer function consists of a direct path with
gain b0, and n first-order transfer functions in parallel. A block diagram representation of Eqn. (5.57) is shown
in Fig. 5.12. The gains, corresponding to the residues, have been placed at the outputs of the integrators.
This is quite arbitrary. They could have been located on the input side, or indeed, split between the input and
the output.
+
+ +
+ +
+ +
+ +
+
+
N0 0 L l Q
n N1Q
It is observed that for this canonical state variable model, the matrix L is a diagonal matrix with the poles
of G(s) as its diagonal elements. The unique decoupled nature of the canonical model is obvious from Eqns
(5.58); the n first-order differential equations are independent of each other:
x&i(t)= li xi(t) + u(t); i = 1, 2, K , n (5.59)
This decoupling feature, as we shall see later in this chapter, greatly helps in system analysis.
The block diagram representation of Fig. 5.12 can be turned into hardware only if all the poles at s = l1,
l2, ..., ln are real. If they are complex, the feedback gains and the gains corresponding to the residues, are
complex. In this case, the representation must be considered as being purely conceptual; valid for theoretical
studies, but not physically realizable. A realizable representation can be obtained by introducing an equiva-
lence transformation.
Suppose that s = s + jw , s = s – jw and s = l are the three poles of a transfer function. The residues at the
pair of complex conjugate poles must be themselves complex conjugates. Partial fraction expansion of the
transfer function, with a pair of complex conjugate poles and a real pole, has the form
p + jq p - jq r
G(s) = d + + +
s - (s + j w ) s - (s - j w ) s - l
A state variable model for this transfer function is given below (refer Eqns (5.58)):
x& = L x + bu
(5.60)
y = cx + du
with
LMs + j w 0 0 OP 1 LM OP
L= s - jw 0 ; b = 1 ; c = [p + jq
MM 00 l
PP MM PP p – jq r]
N 0 Q 1 NQ
Introducing an equivalence transformation
x = Px
with
1 /2LM - j1/ 2 0 OP
P = 1 /2 j1/ 2 0
MM 0 PP
N 0 1 Q
Control System Analysis Using State Variable Methods 289
we obtain (refer Eqns (5.22))
x& (t) = A x (t) + b u(t)
(5.61)
y(t) = c x(t) + du(t)
where
–1
LM1 1 0OP LMs + jw 0 0 OP LM1/2 - j1/ 2 0 OP LM s w 0 OP
A =P LP = j - j 0 s - jw 0 = -w s
MM0 0 1PP MM 00 0 1/ 2
PM
l QP MN 0
j1/ 2
P M
1 QP MN 0
0
l QP
P
N QN 0 0 0
LM2OP
b = P –1b = 0 ; c = cP = [ p q r]
MM1PP
NQ
When the transfer function G(s) has repeated poles, the partial fraction expansion will not be as simple
as Eqn. (5.57). Assume that G(s) has m distinct poles at s = l1, l2, K, lm of multiplicity n1, n2, K, nm,
respectively; n = n1 + n2 + L + nm. That is, G(s) is of the form
-1 - 2
b 1¢ s n + b ¢2 s n + L + b n¢
G(s) = b 0 + n1
(5.62)
(s - l 1 ) ( s - l 2 ) L ( s - l m ) nm
n2
+ +
+ +
+ + +
+ + +
We can now write differential equations for the realization of Hi(s), given by Fig. 5.13. To get one state
variable formulation, we identify the output of each integrator with a state variable—starting at the right and
proceeding to the left. The corresponding differential equations are
x&i1 = li xi1 + xi2
x& i2 = li xi2 + xi3 (5.64a)
M
x&ini = li xini + u
and the output is given by
yi = ri1 xi1 + ri2 xi2 + L + rini xini (5.64b)
If the state vector for the subsystem is defined by
xi = [xi1 xi2 L xini ]T
then Eqns (5.64) can be written in the standard form
x& i = L ixi + biu
(5.65)
yi = ci xi
where
LMl i 1 0 L 0 0OP L0O
MM 0 li 1 L 0 0P MM0PP
L = M
i MM M M M P
M ; b = M M P ; c = [r
P M0 P
i i i1 ri2 L rini ]
0 L li 1P MM PP
MM 00 0
0 0 L 0 l Q
P
P N1 Q
N i
Note that matrix L i has two diagonals—the principal diagonal has the corresponding characteristic root
(pole), and the superdiagonal has all 1’s. In matrix theory, a matrix having this structure is said to be in
Jordan form. For this reason, we identify the realization (5.65) as Jordan canonical form.
According to Eqn. (5.63), the overall trans-
0 fer function G(s) consists of a direct path with
gain b0 and m subsystems, each of which is
+ in the Jordan canonical form, as shown in
x1 = 1x1 + b1u y1 + y
Fig. 5.14. The state vector of the overall sys-
y1 = c1x1 +
u tem consists of the concatenation of the state
vectors of each of the Jordan blocks:
x2 = 2x2 + b2u y2 +
y2 = c2x2 +
LM x OP
1
x
x= M P
2
(5.66a)
xm = m xm + bm u ym
MM M PP
ym = cm xm Nx Q
m
Since there is no coupling between any of
Fig. 5.14 Subsystems of Jordan canonical form the subsystems, the L matrix of the overall
combined into overall system system is ‘block diagonal’:
Control System Analysis Using State Variable Methods 291
LM L 1 0 L 0 OP
0 L2 L 0
L=M PP (5.66b)
MM M M M
PQ
N0 0 L Lm
where each of the submatrices L i is in the Jordan canonical form (5.65). The b and c matrices of the overall
system are the concatenations of the bi and ci matrices respectively of each of the subsystems:
LM b OP
1
b
b = M P ; c = [c
2
1 c 2 L c m ] ; d = b0 (5.66c)
MM M PP
Nb Q
m
The state variable model (5.58) derived for the case of distinct poles, is a special case of Jordan canonical
form (5.66) where each Jordan block is of 1 ´ 1 dimension.
Example 5.6 In the following, we obtain three different realizations for the transfer function
s + 3 Y ( s)
G(s) = =
s 3 + 9 s 2 + 24 s + 20 U( s)
First Companion Form Note that the given G(s) is a strictly proper fraction; the realization will therefore
be of the form (5.48), i.e., the parameter d in the realization {A, b, c, d} is zero.
The state variable formulation in the first companion form, can be written just by inspection of the given
transfer function. Referring to Eqns (5.54), we obtain
LM x& OP LM 0
1 1 OP LM x OP LM0OP
0 1
MM x&& PP = M 0
2 0
P 1
MM x PP + M0P u
2
N x Q MN-20
3 -24 -9QP N x Q MN1 PQ 3
LM x OP 1
y = [3 1 0] M x P 2
MN x PQ 3
Figure 5.15a shows the state diagram in signal flow graph form.
MM x& PP = MM1
2 0 -24
PP MM xx PP + MM10PP u
2
N x& Q N0
3 1 -9 QN Q NQ3
y = x3
292 Digital Control and State Variable Methods
Figure 5.15b shows the state diagram.
1
1 sE 1 sE 1 sE 1
u x3 x2 x1 3
(a)
y
E 9
E 24
E 20
1
sE 1 1 1
3 x1 1 sE x2 1 sE x3 1
(b) u y
E 9
E 24
E 20
2/9
sE 1 sE 1 x1 1/3
(c) 1 x2 1
u y
E 2
E 2 1 E 2/9
1 sE x3
E 5
Fig. 5.15 Three realizations of given G(s)
Jordan Canonical Form The given transfer function G(s) in the factored form:
s+3
G(s) =
( s + 2)2 (s + 5)
Using partial fraction expansion, we obtain
1/ 3 2/ 9 -2/ 9
G(s) = 2
+ +
( s + 2) s+2 s+5
A matrix of the state variable model in Jordan canonical form will be block-diagonal; consisting of two
Jordan blocks (refer Eqns (5.65)):
L1 =
LM-2 1 OP
; L 2 = [–5]
N0 -2 Q
The corresponding bi and ci vectors are (refer Eqns (5.65)):
b1 =
LM0OP ; c 1 = [ 13 2
9 ]; b2 = [1] ; c2 = [– 29 ]
N1Q
Control System Analysis Using State Variable Methods 293
The state variable model of the given G(s) in Jordan canonical form is, therefore, given by (refer
Eqns (5.66))
LM x& OP LM-2
1 1 0 OP LM x OP LM 0 OP
1
MM x& PP = MM 00
2 -2 0
PP MM xx PP + MM 11 PP u
2
N x& Q N
3 0 -5 QN Q N Q
3
LM x OP
1
-2
y = [ 13 2
9 9 ] Mx P2
MN x PQ
3
Figure 5.15c shows the state diagram. We note that Jordan canonical state variables are not completely
decoupled. The decoupling is blockwise; state variables of one block are independent of state variables of all
other blocks. However, the state variables of one block, among themselves, are coupled; the coupling is
unique and simple.
The last section was concerned with the derivation of state variable models for a given transfer function. Out
of infinitely many realizations possible for a given transfer function, we have derived the following three
‘standard’ or canonical forms:
(i) First companion form
(ii) Second companion form
(iii) Jordan form
Consider now the situation where the system dynamics is already known in the form of a state variable
model. For example, state equations representing the dynamics of a physical system may be obtained by the
application of physical laws. However, state variables in such a formulation may not be as convenient as
some other canonical state variables. Transformation of an original state variable model to a canonical form
may, therefore, be helpful in solving analysis and design problems.
In this section, we deal with the problem of transformation of a given state variable model to Jordan
canonical form (transformation of a given model to other canonical forms will be taken up in Section 5.9,
and to companion forms in Chapter 7).
Given state variable model:
x& (t) = Ax(t) + bu(t)
(5.67)
y(t) = cx(t) + du(t)
where A, b, c and d are constant matrices of dimensions n ´ n, n ´ 1, 1 ´ n and 1 ´ 1 respectively.
The problem is to find an equivalence transformation
x = Px (5.68)
such that the equivalent model (refer Eqns (5.22))
x& (t) = P – 1AP x (t) + P –1bu(t)
(5.69)
y(t) = cP x(t) + du(t)
is in Jordan canonical form.
294 Digital Control and State Variable Methods
5.6.1 Eigenvalues
For a general nth-order matrix
LMa 11 a12 L a1n OP
a a22 L a2 n
A=M PP
21
MM M M M
PQ
Na n1 an 2 L ann
the determinant
l - a11 - a12 L - a1n
- a21 l - a22 L - a2 n
|l I – A| =
M M M
- an1 - an 2 L l - ann
On expanding the determinant we find that |l I – A | , called the characteristic polynomial of the matrix A,
is a polynomial of degree n:
|l I – A| = D(l ) = l n + a 1l n – 1 + L + an – 1l + an
where ai are constant scalars.
The equation
D(l) = ln + a1ln – 1 + L + an – 1l +an = 0 (5.70)
is called the characteristic equation of the matrix A, and its n roots are called characteristic roots, or
characteristic values, or eigenvalues of the matrix A. When A represents the dynamic matrix of a linear
system, the eigenvalues determine the dynamic response of the system (the next section will establish this
fact), and also turn out to be the poles of the corresponding transfer function (refer Eqn. (5.31)).
Eigenvalues of a matrix A are invariant under equivalence transformation (refer Eqn. (5.37)), i.e.,
|lI – A| = |lI – P –1AP|
for any nonsingular matrix P.
5.6.2 Eigenvectors
Consider an n ´ n matrix A with eigenvalues {l1, l2, L, ln}. We start with the assumption of distinct
eigenvalues; later we will relax this assumption.
Case I: All Eigenvalues are Distinct State transformation to Jordan canonical form requires a trans-
formation matrix P such that
LM l1 0 L 0 OP
0 l2 L 0
P
P –1AP = L = M (5.71)
MM M M M P
N 0 0 L l Q
Pn
LMv OP 1i
v
v = M P = ith column of P
2i
(5.72b)
i
MM M PP
Nv Q ni
or ( l iI – A)vi = 0 (5.73)
This is a set of n homogeneous equations in n unknowns v1i, v2i, K, vni.
There are two questions of interest with regard to Eqn. (5.73):
(i) whether a solution to Eqn. (5.73) exists; and,
(ii) if the answer to the first question is yes, how many linearly independent solutions occur?
We consider an example to answer these questions. Refer Section 5.2 for the basic definitions from linear
algebra used in the sequel.
LM-4 1 0 OP
-3
A=
MM 00 1
-2
PP
N 0 Q
has the characteristic equation
l +4 -1 0
|l I – A| = 0 l +3 -1
0 0 l+2
= (l + 4)(l + 3)(l + 2) = 0
Therefore, the eigenvalues of A are l1 = – 2, l 2 = – 3 and l 3 = – 4.
Consider a set of homogeneous equations
(l1I – A)v1 = 0
LM2 -1 0 OP LMv11 OP LM0OP
-1
or
MM00 1
PP MMv
21 PP = MM0PP (5.74)
N 0 0 Q Nv
31 Q N0Q
296 Digital Control and State Variable Methods
It is easy to check that rank of the matrix (l1I – A) is two, i.e.,
r (l1I – A) = 2
A highest-order array having a nonvanishing determinant, is
LM2 -1OP ,
N0 1Q
which is obtained from (l1I – A) by omitting the third row and the third column. Consequently, a set of
linearly independent equations is
2 v 11 – v 21 = 0
v 21 = v 31
or
LM2 -1OP LMv OP =
11 LM 0 OP
N0 1Q Nv Q 21 Nv Q31
-1
Therefore,
LMv OP =
11 LM2 -1OP LM 0 OP = LMv / 2OP
31
Nv Q
21 N0 1Q Nv Q Nv Q 31 31
There are three components in v1 and two equations governing them; therefore, one of the three compo-
nents can be arbitrarily chosen. For v 31 = 2, a solution to Eqn. (5.74) is
LM1OP
v1 =
MM22PP
NQ
A different choice for v 31 leads to a different solution to Eqn. (5.74). In fact, this set of equations has
infinite solutions as demonstrated below:
For v 31 = 2a (with a arbitrary), the solution
LM1OP
v1 = a 2
MM PP
2 NQ
Obviously, this solution is non-unique. However, all non-trivial solutions have a unique direction, and
they differ only in terms of a scalar multiplier. There is, thus, only one independent solution.
Corresponding to the eigenvalue l2 = – 3, a linearly independent solution to homogeneous equations
(l2I – A)v2 = 0
is given by
LM1OP
v2 =
MM10PP
NQ
And for l3 = – 4, the equations
(l 3I – A)v3 = 0
Control System Analysis Using State Variable Methods 297
have a linearly independent solution
LM2OP
v3 = 0
MM PP
N0Q
In general, the number of equations that the vector vi in (5.73) has to obey, is equal to r(liI – A) where
r(M) denotes the rank of matrix M. There are n components in vi (n = number of columns of (liI – A));
therefore (n – r(liI – A)) components of vi can be arbitrarily chosen. Thus the number of linearly independ-
ent solutions of the homogeneous equation (5.73) = [n – r(liI – A)] = g (l iI – A), where g (M) denotes the
nullity of matrix M.
We have the following answers to the two questions raised earlier with regard to Eqn. (5.73):
(i) For Eqn. (5.73) to have a non-trivial solution, rank of (liI – A) must be less than n, or, equivalently,
det(liI – A) = 0. This condition is satisfied by virtue of the fact that li is an eigenvalue.
(ii) The number of linearly independent solutions to Eqn. (5.73), is equal to nullity of (l i I – A).
The nullity of matrix (liI – A) does not exceed the multiplicity of the eigenvalue li (refer Lancaster and
Tismenetsky [28] for proof of the result). Therefore, for distinct eigenvalue li, there is one, and only one,
linearly independent solution to Eqn. (5.73). This solution is called the eigenvector of A associated with the
eigenvalue li.
Theorem 5.1 Let v1, v2, K, vn be the eigenvectors associated with the distinct eigenvalues l1, l2, K, ln,
respectively, of matrix A. The vectors v1, v2, K, vn are linearly independent and the nonsingular matrix
P = [v1 v2 L vn]
transforms matrix A into Jordan canonical form.
Proof Let a1v1 + a2v2 + L + anvn = 0 (5.75)
If it can be shown that this implies that a1 = a2 = L = an = 0, then the set {vi} is linearly independent.
Define
Ti = liI – A
Note that Tivi = 0
and Tivj = (li – lj)vj if i ¹ j
Multiplying Eqn. (5.75) by T1 gives
a2(l1 – l2)v2 + a3(l1 – l3) v3 + L + an(l1 – ln)vn = 0
Multiplying this in turn by T2, T3, K, Tn – 1, gives
a3 (l1 – l3)(l2 – l3)v3 + L + an(l1 – ln)(l2 – ln)vn = 0
M
an – 1 (l1 – ln – 1)(l2 – ln – 1) L (ln – 2 – ln – 1)vn – 1
+ an (l1 – ln)(l2 – ln) L (ln – 2 – ln)vn = 0 (5.76)
an(l1 – ln)(l2 – ln) L (ln – 2 – ln)(ln – 1 – ln)vn = 0 (5.77)
298 Digital Control and State Variable Methods
Since vn ¹ 0 and ln ¹ li for i ¹ n, Eqn. (5.77) requires that an = 0. This, plus Eqn. (5.76), requires that
an – 1 = 0
Continuing this reasoning shows that Eqn. (5.75) requires ai = 0 for i = 1, 2, K, n; so the eigenvectors vi
are linearly independent.
The matrix P, constructed by placing the eigenvectors (columns) together, is therefore a nonsingular
matrix.
As per Eqns (5.71)–(5.73), P –1AP = L .
LM -4 1 0 OP
-3
A=
MM 00 1
-2
PP
N 0 Q
for which we found, in Example 5.7, the eigenvalues and eigenvectors to be
LM1OP LM1OP LM2OP
l 1 = – 2, v1 = 2 ;l 2= – 3, v2 = M1P ; l 3= – 4, v3 = M0P
MM2PP
NQ NM0PQ NM0PQ
The transformation matrix
LM
1 1 2 OP
P= 2 1 0
MM P
N2 0 0PQ
This gives
–1 1
LM0 0 2 OP LM -4 1 0 OP LM1 1 2 -2 OP LM 0 OP
0
-4 -3 -3 0 =L
P AP =
4 MM02 -2
4
PM 0
1 PQ MN 0
1
P M2
-2 PQ MN2
1 0 = 0
0PQ
P MM -4
PP
N 0 0 N 0 0 Q
which is the diagonal matrix (a special case of Jordan canonical form) with eigenvalues of A as its diagonal
elements. In fact, L could be written down directly without computing P –1AP.
x& = Ax + bu
y = cx
LM -9 1 0 OP LM2OP
with A = -26 0 1 ; b = 5 ; c = [1 2 – 1]
MM-24 0QP
P MM0PP
N 0 NQ
The characteristic equation
|lI – A| = 0
Ll + 9 -1 0 l2
OP LM l 1 OP
adj(lI – A) = adj M 26 l -1 = -26l - 24MM l2 + 9l l+9 PP
MM 24 0 l
PP
-24l -24 l2 + 9l + 26
N Q N Q
LM 4 -2 1 OP LM OP
1
For l1 = – 2, adj(l I – A) = 28 -14 7 ; v1 = 7
1 MM48 -24 12
PP MM PP
N 12 Q N Q
LM 9 -3 1O
P6P ; v = LM16OP
For l2 = – 3, adj(l I – A) = 54 -18
2 MM72 -24 8QP
2 MM8PP
N NQ
L16 -4 1O L1O
For l3 = – 4, adj(l I – A) = M80 -20 5P ; v = M5P
3 MM96 -24
P MM6PP
6PQ
3
N NQ
In each case, the columns of adj(liI – A) are linearly related. In practice, it is necessary to calculate only
one (non-zero) column of the adjoint matrix.
300 Digital Control and State Variable Methods
The transformation matrix
LM 1 1 1 OP
P = [v1 v2 v] = 7 6 5
3 MM12 PP
N 8 6 Q
State transformation
x = Px
results in the following model (refer Eqns (5.22)):
x& = L x + b u
y = cx
with
–1 1
LM -4 2 -1 OP LM -9 1 0 OP LM 1 1 1 OP LM-2 0 0 OP
L = P AP = – -6 2 -26 -3 0
2 MM-1618 PM
-1QP MN-24
0 1
P0P MM127 6 5 = 0
P M
6QP MN 0 0 -4
PP
N 4 0 QN 8 Q
–1
LM -1OP
b= P b = -3 ; c = cP = [3 5 5]
MM 6PP
N Q
Case II: Some Eigenvalues are Multiple Roots of the Characteristic Equation For notational con-
venience, we assume that matrix A has an eigenvalue l1 of multiplicity n1, and all other eigenvalues l n1 + 1 ,
K, ln are distinct, i.e.,
|lI – A| = ( l - l 1 ) n1 ( l - l n1 + 1 ) L (l – ln)
Recall the result stated earlier: the nullity g of matrix (liI – A) does not exceed the multiplicity of li.
Therefore,
1 £ g (l1I – A)£ n1
g ( l n1 + 1 I – A) = 1
M
g (lnI – A) = 1
We know that the number of linearly independent eigenvectors associated with an eigenvalue li is equal
to the nullity g of the matrix (liI – A). Thus, when one or more eigenvalues is a repeated root of the
characteristic equation, a full set of n linearly independent eigenvectors may, or may not, exist.
It is convenient to consider three sub-classifications for Case II.
Case II1: Nullity of (l1I – A) = n1 In this case, the vector equation
(l1I – A)v = 0
has n1 linearly independent solutions, say, v1, v2, K, vn1. We have thus, a full set of n1 eigenvectors associ-
ated with multiple eigenvalue l1.
The remaining (n – n1) eigenvectors are obtained from the vector equations
(ljI – A)vj = 0, j = n1 + 1, K, n
Each of these vector equations has only one linearly independent solution.
Control System Analysis Using State Variable Methods 301
The matrix
P = [v1 v 2 L vn 1 vn1+1 L vn]
LM l1 0 L 0 0 L 0 OP
MM 0 l1 L 0 0 L 0
M M M M L M P
P
gives P –1AP = L =
MM 0 0 L l1 0 L 0P
P
MM 0 0 L 0 l n1 +1 L 0P
P
MM M M M M M P
N 0 0 L 0 0 L l PQ
n
Case II 2: Nullity of (l1I – A) = 1 For this case, there is only one eigenvector associated with l1, regard-
less of multiplicity n1. This eigenvector is given by the linearly independent solution of the vector equation
(l1I – A)v = 0
The solution to this equation may be found as in Case I.
We have seen in Cases I and II1, that the transformation matrix P yields a diagonal matrix L if, and only
if, P has a set of n linearly independent eigenvectors. When nullity of the matrix (l1I – A) is one, n linearly
independent eigenvectors cannot be constructed and, therefore, the transformation to a diagonal matrix is
not possible.
The simplest form to which matrix A, having a multiple eigenvalue l1 of multiplicity n1 with g (l1I – A)
= 1 and all other distinct eigenvalues, can be reduced is the Jordan canonical form:
LM L 1 0 L 0 OP
0 L n1 L 0
L=M PP
+1
MM M M M
PQ
N0 0 L Ln
where the Jordan blocks L i are
LM l 1 1 0 L 0 OP
0 l1 1 L 0
L1 =M PP
MM M M M M
PQ
N0 0 0 L l1
x& = L x + bu
y = cx + du
where L is a block diagonal matrix with Jordan blocks L 1, ..., L m corresponding to the eigenvalues
l1, ..., lm, respectively, on its principal diagonal; each Jordan block L i corresponding to the eigenvalue li is
again a block diagonal matrix with g (i) sub-blocks on its principal diagonal; g (i) being the number of
linearly independent eigenvectors associated with the eigenvalue li:
LML 1 0 L 0 OP
0 L2 L 0
L =M P
(n ´ n) MM M M M P
P
N0 0 L L Qm
LML 1i 0 L 0 OP
Li 0 L 2i L 0
=M PP ; i = 1, 2, K, m
( ni ´ ni ) MM M M M
PQ
N0 0 L L g ( i )i
LM l i 1 0 L 0 OP
0 li 1 L 0
L ki =M PP
; k = 1, 2, K, g (i)
MM M M M M
PQ
N0 0 0 L li
The topic of computation of eigenvectors and generalized eigenvectors for systems with multiple
eigenvalues is much too detailed and specialized for this book to treat (Refer Gopal [105] and Brogan
[106]). Over the years, experts have developed excellent general-purpose computer programs for the
efficient and accurate determination of eigenvectors and generalized eigenvectors [152-154].
In this book, the usefulness of the transformation of state variable models to Jordan canonical form will
be illustrated through system examples having distinct eigenvalues.
LM0 0 -2 OP 0 LM OP
x& = 0 1 0 x; x(0) = 1
MM 1 PP MM PP
N 0 3 Q 0 NQ
By direct computation, we have
-1
LM s 0 2 OP ( s I - A) +
(sI – A)– 1 = 0 s -1 0 =
MM-1 s-3
PP | s I - A|
N 0 Q
Control System Analysis Using State Variable Methods 307
2 +
LM(s - 1) (s - 3) 0 -2( s - 1) OP
|sI – A| = (s – 1) (s – 2); (sI – A) (s - 1) (s - 2)
=
MM (s 0- 1) 0
s(s - 1) PQ
P
N 0
LM (s - 3) 0
-2 O
MM (s - 1) (s - 2) ( s - 1) (s - 2) PP
1 PP
eAt = L – 1 [(sI – A)– 1] = L –1
MM 0 (s - 1)
0
PP
MN (s - 1)1(s - 2) 0
s
( s - 1) (s - 2) Q
LM 2 e - e
t 2t
0 2 et - 2 e2t OP
=M 0 et 0 PP
MN - e + e
t 2t
0 2 e - et
2t
Q
Consequently, the free response of the system is
At
LM 0 OP t
x(t) = e x(0) = e
MM 0 PP
N Q
Note that x(t) could be more easily computed by taking the inverse Laplace transform of
X(s) = [(sI – A)– 1x(0)].
Evaluation Using Similarity Transformation Suppose that A is an n ´ n nondiagonal matrix with distinct
eigenvalues l1, l2, ..., ln. We define the diagonal matrix L as
LM l 1 0 0 L 0 OP
0 l2 0 L 0
L= M PP
MM M M M M
PQ
N0 0 0 L ln
A and L are similar matrices; there exists a nonsingular transformation matrix P such that (refer
Eqns (5.22))
L = P –1AP
Now
1 22 1 –1 2 2
P –1eAtP = P –1[I + At + A t + L ] P = I + P –1APt + P A Pt + L
2! 2!
1 –1 1 22
L t + L = eL
t
= I + P –1APt + P APP –1APt 2 + L = I + L t +
2! 2!
308 Digital Control and State Variable Methods
Lt Lt
Thus the matrices eAt and e are similar. Since L is diagonal, e is given by
LMe l 1t
0 0 L 0 OP
l 2t
0 e 0 L 0
eLt = M PP
MM M M M M
PP
MN 0 0 0 L e l nt Q
The matrix exponential eAt of matrix A with distinct eigenvalues l1, l2, ..., ln may, therefore, be evalu-
ated using the following relation:
LMe l1 t
0 L 0 OP
l2 t
0 e L 0
=P M PP P
Lt
eAt = P e P –1 –1
(5.93)
MM M M M
PP
MN 0 0 L eln t Q
where P is a transformation matrix that transforms A into the diagonal form.
(For the general case wherein matrix A has multiple eigenvalues, refer [105]. Also refer Review Example 5.3
given at the end of this chapter).
x& =
LM 0 1OP x; x(0) = LM0OP
N-2 -3Q N1Q
The characteristic equation for this system is
l -1
|lI – A| = =0
2 (l + 3)
or (l + 1)(l + 2) = 0
Therefore, the eigenvalues of system matrix A are
l1 = – 1, l2 = – 2
Eigenvectors v1 and v2 corresponding to the eigenvalues l1 and l2, respectively, can be determined from
the adjoint matrix (lI – A)+ (refer Eqn. (5.79)).
(lI – A)+ =
LM(l + 3) 1 OP
N -2 l Q
For l = l = – 1,
1
(l I – A) = M
1
L 2 1OP ; v = LM 1OP
+
1
N-2 -1Q N-1Q
For l = l = – 2,
2
(l I – A) = M
2
L 1 1OP ; v = LM 1OP
+
2
N -2 -2 Q N -2 Q
The transformation matrix P that transforms A into diagonal form, is
P= M
L 1 1OP
N-1 -2Q
Control System Analysis Using State Variable Methods 309
The matrix exponential
eAt = P
LMe-t
0 OP P = L 1 1 O LMe
–1
-t
0 OP L 2 1O
N0 e -2 t
Q MN-1 -2PQ N0 e -2 t Q MN-1 -1PQ
=
LM 2e -t
- e -2 t e - t - e -2 t OP
-t -2 t -t -2 t
N -2 e + 2e -e + 2e Q
Consequently, the free response of the system is
x(t) = eAtx(0) =
LM e -t
- e -2 t OP
-t -2 t
N- e + 2e Q
Evaluation Using Cayley-Hamilton Technique The state transition matrix may be evaluated using a
technique based on the Cayley-Hamilton theorem. To begin, with, we restate the theorem proved earlier in
Section 5.4 (refer Eqns (5.45)–(5.46)).
Every square matrix A satisfies its own characteristic equation.
Thus if we have, for an n ´ n matrix A, the characteristic equation
D(l) = |lI – A| = ln + a1ln – 1 + L + a n – 1 l + an = 0,
then, according to this theorem
D(A) = An + a1 An– 1 + L + an–1 A + an I = 0
where I is an identity matrix and 0 is a null matrix.
This theorem provides a simple procedure for evaluating the function of a matrix. In the study of linear
systems, we are mostly concerned with functions which can be represented as a series of the powers of a
matrix. Consider the matrix polynomial
f (A) = a0I + a1A + a2A2 + L + anAn + an + 1An + 1 + L (5.94a)
This matrix polynomial, which is of degree higher than the order of A, can be computed by consideration
of the scalar polynomial
f (l) = a0 + a1l + a2l2 + L + anln + an + 1ln + 1 + L (5.94b)
Dividing f (l) by the characteristic polynomial D(l), we get
f(l ) g(l )
= q(l) + (5.95a)
D(l ) D(l )
where g(l) is the remainder polynomial of the following form:
g(l) = b0 + b1l + L + bn – 1ln – 1 (5.95b)
Equation (5.95a) may be written as
f (l) = q(l)D(l) + g(l) (5.96)
Assume that the n ´ n matrix A has n distinct eigenvalues l1, l2, ..., ln;
D(li) = 0; i = 1, 2, ..., n
If we evaluate f (l) in Eqn. (5.96) at the eigenvalues l1, l2, ..., ln, we have
f (li) = g(li), i = 1, 2, ..., n (5.97)
310 Digital Control and State Variable Methods
The coefficients b0, b1, ... , bn–1 in Eqn. (5.95b) can be computed by solving the set of n simultaneous
equations obtained by successively substituting l1, l2, ... , ln in Eqn. (5.97).
Substituting A for l in Eqn. (5.96), we get
f (A) = q(A)D(A) + g(A)
Since D(A) is identically zero, it follows that
f(A) = g(A) = b0I + b1A + L + bn – 1 An – 1
If A possesses an eigenvalue lk of multiplicity nk, then only one independent equation can be obtained by
substituting lk into Eqn. (5.97). The remaining (nk –1) linear equations, which must be obtained in order to
solve for bi’s, can be found by differentiating both sides of Eqn. (5.97). Since
LM d j
D( l )
OP = 0 ; j = 0, 1, ..., (nk – 1),
j
N dl Q l = lk
it follows that
LM dj
f (l )
OP =
LM dj
g( l )
OP ; j = 0, 1, ... , (nk – 1)
j j
N dl Q l = lk N dl Q l = lk
The formal procedure of evaluation of the matrix polynomial f(A) is given below.
D
(i) Compute D(l) = |lI – A|
(ii) Find the roots of D(l) = 0, say
D(l) = (l – l1)n1 (l – l2)n2 L (l – lm)nm (5.98a)
where n1 + n2 + L + nm = n. In other words, D(l) has root li with multiplicity ni. If li is a complex
number, then its complex conjugate is also a root of D(l).
(iii) Form a polynomial g(l ) of degree (n – 1); i.e.,
g(l) = b0 + b1l + L + bn – 1ln – 1 (5.98b)
where the unknown parameters b0, b1, ..., bn – 1 are to be solved in Step (v).
(iv) Form the following n equations:
LM d j
O
f (l ) P =
LM d j
g( l )
OP ;
j = 0, 1, K , (ni – 1)
(5.98c)
j i = 1, 2, K , m
N dl j
Q l = li N dl Q l = li
(v) Solve for the n unknown parameters b0, b1, ... , bn – 1 from the n equations in Step (iv).
Then
f(A) = g(A) = b0I + b1A + L + bn – 1An – 1 (5.98d)
A=
LM 0 1OP
N-2 -3Q
Solution The characteristic polynomial is
l -1
D(l) = |lI – A| = = (l + 1)(l + 2)
2 l +3
Control System Analysis Using State Variable Methods 311
The roots of D(l) = 0 are l1 = – 1, l2 = – 2.
Since A is of second order, the polynomial g(l) will be of the following form:
g(l) = b0 + b1l
The coefficients b0 and b1 are evaluated from equations
f(l1) = (l1)10 = g(l1) = b0 + b1l1
f(l2) = (l2)10 = g(l2) = b0 + b1l2
The result is
b0 = – 1022, b1 = – 1023
Therefore
The Cayley-Hamilton technique allows us to solve the problem of evaluation of eAt, where A is a constant
n ´ n matrix. Since the matrix power series
A2 t 2 An t n
eAt = I + At + +L+ +L
2! n!
converges for all A and for all finite t, the matrix polynomial f(A) = eAt can be expressed as a polynomial
g(A) of degree (n – 1). This is illustrated below with the help of an example.
x& = Ax
with
LM0 0 -2 OP LM0OP
A= 0 1 0 ; x(0) = 1
MM 1 3QP
P MM0PP
N
In the following, we evaluate the function
0 NQ
f(A) = eAt
using the Cayley-Hamilton technique.
The characteristic polynomial of matrix A is
l 0 2
D(l) = |lI – A| = 0 (l - 1) 0 = (l – 1)2 (l – 2)
-1 0 (l - 3)
The characteristic equation D(l) = 0 has a second-order root at l1 = 1 and a simple root at l2 = 2.
Since A is of third order, the polynomial g (l) will be of the form
g(l) = b0 + b1l + b2l2
The coefficients b0, b1, and b2 are evaluated using the following relations:
f(l1) = g(l1)
d d
f(l ) = g( l )
dl l = l1 dl l = l1
f(l2) = g(l2)
312 Digital Control and State Variable Methods
These relations yield the following set of simultaneous equations.
et = b0 + b1 + b2
tet = b1 +2b2
e2t = b0 + 2b1 + 4b2
Solving these equations, we obtain
b0 = – 2tet + e2t
b1 = 3tet + 2et – 2e2t, and
b2 = e2t – et – tet
Hence, we have
eAt= g(A) = b0I + b1A + b2A2
= (– 2tet + e2t)I + (3tet + 2et – 2e2t)A + (e2t – et – tet)A2
LM2e t
- e2 t 0 2e t - 2e 2 t OP
=M 0 et 0 PP
MN-e t
+ e2 t 0 2e - e t
2t
Q
Consequently, the free response (u(t) = 0) of the system is
At
LM 0 OP t
x(t) = e x(0) = e
MM 0 PP
N Q
This result is identical to the one obtained earlier in Example 5.10.
or e–Atx(t) – x(0) = z
0
e - At bu(t) dt
If the initial state is known at t = t0, rather than t = 0, Eqn. (5.100) becomes
t
x(t) = e
A t ( –t0 )
x(t0) + z
t0
eA(t – t)bu(t)dt (5.101)
where
f (t) = eAt
Equation (5.102) is the solution of Eqn. (5.80). This equation is called the state transition equation. It
describes the change of state relative to the initial conditions x(t0) and the input u(t).
Example 5.14 For the speed control system of Fig. 5.3, the following plant model was derived in Example 5.1
(refer Eqns. (5.17)):
x& = Ax + bu
y = cx
with
A=
LM-1 OP ; b = LM 0OP ; c = [ 1 0 ]
1
N-1 -10Q N10Q
State variables x1 and x2 are the physical variables of the system:
x1(t) = w (t), angular velocity of the motor shaft
x2(t) = ia(t), armature current
The output
y(t) = x1(t) = w (t)
In the following, we evaluate the response of this system to a unit step input, under zero initial conditions.
(sI – A)–1 =
LMs + 1 -1 OP = 1
-1
LMs + 10 1 OP
N 1 s + 10Q s + 11s + 11 N -1 s + 1Q 2
LM s + 10 1 OP
(s + a )(s + a ) (s + a )( s + a )
= M
MM (s + a -)(1s + a ) (s + as )(+s1+ a ) PPP ; a = 1.1125, a
1 2 1 2
1 2 = 9.8875
N 1 2 Q 1 2
314 Digital Control and State Variable Methods
eAt = L –1[(sI – A)–1]
=
LM1.0128e- a1 t
- 0.0128e - a2 t 0.114e - a1 t - 0 .114e - a2 t OP
- a1 t - a2 t - a1 t - a2 t
N -0.114e + 0 .114e -0 .0128e + 1.0128e Q
u(t) = 1; t ³ 0; x(0) = 0
Therefore,
t t LM . de
114 - a1 ( t - t )
- e - a2 (t - t ) i OP
x(t) = z
0
eA(t – t )bdt = z
0
MN114
. d - 0.1123e - a1 ( t - t )
+ 8.8842e - a2 ( t - t )
iPQ
dt
=
LM 0.9094 - 1.0247 e - a1 t
+ 0.1153 e - a2 t OP
- a1 t
N- 0.0132 + 0.1151e - 0.1019 e - a2 t Q
The output
y(t) = w(t) = 0.9094 – 1.0247 e– 1.1125t + 0.1153e– 9.8875t; t ³ 0
Controllability and observability are properties which describe structural features of a dynamic system.
These properties play an important role in modern control system design theory; the conditions on control-
lability and observability often govern the control solution.
To illustrate the motivation of investigating controllability and observability properties, we consider the
problem of the stabilization of an inverted pendulum on a motor-driven cart.
Example 5.15 Figure 5.16 shows an inverted pendulum with its pivot mounted on a cart. The cart is driven
by an electric motor. The motor drives a pair of wheels of the cart; the whole cart and the pendulum become the
‘load’ on the motor. The motor at time t exerts a torque T(t) on the wheels. The linear force applied to the cart
is u(t); T(t) = Ru(t), where R is the radius of the wheels.
The pendulum is obviously unstable. It can, however, be kept
upright by applying a proper control force u(t). This somewhat
artificial system example represents a dynamic model of a space
booster on take off—the booster is balanced on top of the rocket
engine thrust vector.
dm From inspection of Fig. 5.16, we construct the differential
r
H
CG
mg
z
V u
0 Pivot H
(a) (b)
Fig. 5.17
u x = Ax + bu z
Plant
z = cx
u x
x = Ax + b u x
Observer
E k E k
(a) (b)
Fig. 5.18 Control system with state feedback
318 Digital Control and State Variable Methods
A study of controllability and observability properties, presented in this section, provides a basis for the
state-feedback design problems discussed in Chapter 7. Further, these properties establish the conditions for
complete equivalence between the state variable and transfer function representations.
To study the controllability property, we may assume, without loss of generality, that x1 º 0. Therefore,
if the system (5.107) is controllable, there exists an input u[0, t1] such that
t1
– x0 = z
0
e–At bu(t ) dt (5.108)
From this equation, we observe that complete controllability of a system depends on A and b, and is
independent of output matrix c. The controllability of the system (5.107) is frequently referred to as the
controllability of the pair {A, b}.
It may be noted that according to the definition of controllability, there is no constraint imposed on the
input or on the trajectory that the state should follow. Further, the system is said to be uncontrollable
although it may be ‘controllable in part’.
From the definition of controllability, we observe that by complete controllability of a plant we mean that
we can make the plant do whatever we please. Perhaps this definition is too restrictive in the sense that we
are asking too much of the plant. But if we are able to show that system equations satisfy this definition,
certainly there can be no intrinsic limitation on the design of the control system for the plant. However, if the
system turns out to be uncontrollable, it does not necessarily mean that the plant can never be operated in a
satisfactory manner. Provided that a control system will maintain the important variables in an acceptable
region, the fact that the plant is not completely controllable, is immaterial.
Another important point which the reader must bear in mind, is that almost all physical systems are
nonlinear in nature to a certain extent, and a linear model is obtained after making certain approximations.
Small perturbations of the elements of A and b may cause an uncontrollable system to become controllable.
It may also be possible to increase the number of control variables and make the plant completely controlla-
ble (controllability of multi-input systems will be discussed in Section 5.10).
Control System Analysis Using State Variable Methods 319
A common source of uncontrollable state variable models arises when redundant state variables are
defined. No one would intentionally use more state variables than the minimum number needed to character-
ize the behaviour of the dynamic system. In a complex system with unfamiliar physics, one may be tempted
to write down differential equations for everything in sight and, in doing so, may write down more equations
than are necessary. This will invariably result in an uncontrollable model for the system.
Observability For the linear system given by Eqns (5.107), if the knowledge of the output y and the input
D
u over a finite interval of time [0, t1] suffices to determine the state x(0) = x0, the state x0 is said to be
observable. If all initial states are observable, the system is said to be completely observable, or simply
observable otherwise, the system is said to be unobservable.
The output of the system (5.107) is given by
t
z
y(t) = c eAt x0 + c eA(t – t )bu(t )dt + du(t)
0
The output and the input can be measured and used, so that the following signal h (t) can be obtained from
u and y.
t
T
z
h(t) =D y(t) – c eA(t – t )b u(t )dt – d u(t) = c eAtx0
0
(5.109)
Tz z
AT t T T
c ce At
dt Vx 0
= e A t c T h( t ) dt (5.110)
0 W 0
When the signal h(t) is available over a time interval [0, t1], and the system (5.107) is observable, then the
initial state x0 can be uniquely determined from Eqn. (5.110).
From Eqn. (5.110) we see that complete observability of a system depends on A and c, and is independent
of b. The observability of the system (5.107) is frequently referred to as the observability of the pair {A, c}.
Note that the system is said to be unobservable, although it may be ‘observable in part’. Plants that are not
completely observable can often be made observable by making more measurements (observability of multi-
output systems will be discussed in Section 5.10). Alternately, one may examine feedback control schemes
which do not require complete state feedback.
I. W(0, t1) = z0
e–Atb bT e-A
Tt
dt (5.111)
is nonsingular.
320 Digital Control and State Variable Methods
II. The n ´ n controllability matrix
D
U = [b Ab A2b L An – 1b] (5.112)
has rank equal to n, i.e., r(U) = n.
Since Test II can be computed without integration, it allows the controllability of a system to be easily
checked.
Proof of Test I
Sufficiency: If W(0, t1) given in Eqn. (5.111) is nonsingular, the input
Tt
u(t) = – bT e-A W–1(0, t1)x0 (5.113)
can be applied to the system. This input satisfies the condition given in Eqn. (5.108):
t1 t1
z
0
z T
e - At bu(t ) dt = - e - At bb T e - A t W -1 (0, t1 )x 0 dt
0
R| t1
U|
=– S|
T z
0
T
e - At b b T e-A tdt W –1(0, t1)x0 = – x0
V|
W
Necessity: Assume that the system is controllable, though W(0, t1) is singular for any t1. Then, as per the
results given in Eqns (5.8), the n rows of e– Atb are linearly dependent, i.e., there exists a nonzero n ´ 1 vector
a such that
aTe– At b = 0 (5.114)
From the assumption of controllability, there exists an input u satisfying Eqn. (5.108); therefore from
Eqns (5.108) and (5.114),
t1
– a Tx0 = z
0
a Te– Atb u(t) dt = 0 (5.115)
holds for any initial state x0. By choosing x0 = a, Eqn. (5.115) gives (refer Eqn. (5.6a)),
a T a = [|| a ||]2 = 0
This is true only for a = 0, which contradicts the nonzero property of a . Therefore, the nonsingularity of
W(0, t1) is proved.
Proof of Test II
Sufficiency: It is first assumed that though r (U) = n, the system is not controllable, and by showing that
this is a contradiction, the controllability of the system is proved.
By the above assumption,
r (U) = n and W(0, t1) is singular.
Therefore Eqn. (5.114) holds, i.e.,
a Te– At b = 0; t ³ 0, a ¹ 0
Derivatives of the above equation at t = 0, yield (refer Eqn. (5.87)),
a TAk b = 0; k = 0, 1, ..., (n – 1)
which is equivalent to
a T [b Ab ××× An – 1b] = aT U = 0
Control System Analysis Using State Variable Methods 321
Therefore, n rows of controllability matrix U are linearly dependent (refer Eqn. (5.8a)). This contradicts
the assumption that r(U) = n; hence the system is completely controllable.
Necessity: It is assumed that the system is completely controllable but r (U) < n. From this assumption,
there exists nonzero vector a satisfying
aTU = 0
or
a TAk b = 0; k = 0, 1, ..., (n – 1) (5.116a)
– At
Also from the Cayley-Hamilton theorem, e can be expressed as a linear combination of I, A, ..., An–1:
e– At = b0I + b1A + L + bn – 1 An–1 (5.116b)
From Eqns (5.116a) and (5.116b), we obtain
a Te– Atb = 0, t ³ 0, a ¹ 0
and therefore (refer Eqns (5.8)),
t1
z
0
Tt
aTe– Atb bT e-A a dt = a TW(0, t1) a = 0
Since the system is completely controllable, W(0, t1) should be nonsingular from Test I; this contradicts
the assumption that a is nonzero. Therefore, r(U) = n.
Example 5.16 Recall the inverted pendulum of Example 5.15, shown in Fig. 5.16, in which the object is
to apply a force u(t) so that the pendulum remains balanced in the vertical position. We found the linearized
equations governing the system to be:
x& = Ax + bu
where x = [q q& z z& ]T
LM 0 1 0 0 OP LM 0 OP
16.3106 0 0 0 -1.4458
A= M
MM 0 0 0 1P
P ;b= M
M 0
PP
N-1.0637 0 0 0Q
P MN 0.9639PQ
z(t) = horizontal displacement of the pivot on the cart
q (t) = rotational angle of the pendulum.
To check the controllability of this system, we compute the controllability matrix U:
LM 0 -1.4458 0 -23.5816 OP
-1.4458 0 - 23.5816 0
U = [b Ab A b A b] = M
2 3
MM 0 0.9639 0 1.5379
PP
N 0.9639 0 1.5379 0
PQ
Since |U| = 420.4851, U has full rank, and by Theorem 5.2, the system is completely controllable. Thus if
the angle q departs from equilibrium by a small amount, a control always exists which will drive it back to
zero.10 Moreover, a control also exists which will drive both q and z, as well as their derivatives, to zero.
10
This justifies the assumption that q(t ) @ 0 , provided we choose an appropriate control strategy.
322 Digital Control and State Variable Methods
It may be noted that Eqn. (5.113) suggests a control law to prove the sufficiency of the controllability test.
It does not necessarily give an acceptable solution to the control problem. The open-loop control given by
Eqn. (5.113) is normally, not acceptable. In Chapter 7, we will derive a state-feedback control law for the
inverted pendulum. As we shall see, for such a control to exist, complete controllability of the plant is a
necessary requirement.
Example 5.17 Consider the electrical network shown in Fig. 5.19. Differential equations governing the
dynamics of this network, can be obtained by various standard methods. By use of nodal analysis, for example,
we get
de e - e2 e - e0
C1 1 + 1 + 1 =0
dt R3 R1
de2 e - e1 e - e0
C2 + 2 + 2 =0
+ R1 R2 dt R3 R2
e0 The appropriate state variables for the network are the capacitor
R3
voltages e1 and e2. Thus, the state equations of the network are
e1 e2
C1 C2 x& = Ax + be0
where x = [e1 e2]T
LM- F 1 + 1 I 1 1 OP LM
1 OP
Fig. 5.19 GH R R JK C
A= M P
R3 C1 RC
MM
1
1
3 1
FG 1 IJ PP
1 1
MM
; b= 11 1 PP
- +
MN R C 3 2 H R2 K PQ
R3 C2 MN
R2 C2 PQ
The controllability matrix of the system is
LM 1 -
1
+
1 FG
1
-
1 IJ OP
U = [b Ab] = M
RC
1 1 ( R1C1 ) 2
H
R3 C1 R2 C2 R1C1 KP
MM 1 -
1
+
1 FG
1
-
1 IJ PP
MN R C
2 2 ( R2 C2 ) 2
H
R3 C2 R1C1 R2 C2 K PQ
We see that under the condition
R1C1 = R2C2
r (U) = 1 and the system becomes ‘uncontrollable’. This condition is the one required to balance the bridge,
and in this case, the voltage across the terminals of R3 cannot be influenced by the input e0.
is nonsingular.
II. The n ´ n observability matrix
LM c OP
cA
V= M
D
MM M PP (5.118)
NcA n- 1 PQ
has rank equal to n, i.e., r(V) = n.
Proof Using the definning equation (5.110), this theorem can be proved in a manner similar to Theorem 5.2.
Example 5.18 We now return to the inverted pendulum of Example 5.16. Assuming that the only output
variable to be measured is q (t), the position of the pendulum, then the linearized equations governing the
system are
x& = Ax + bu
y = cx
LM 0 1 0 0 OP LM 0 OP
-1. 4458
where A= MM160.3106 0
0
0
0
0
1P
P ;b= M
M 0
PP
MN-1.0637 0 0 0Q
P MN 0.9639PQ
c= [1 0 0 0]
The observability matrix
LM c OP LM 1 0 0 0 OP
V= MMcAcA PP = MM160.3106
2
1
0
0
0
0
0P
P
MNcA PQ MN 0
3
16.3106 0 0Q
P
|V| = 0, and therefore, by Theorem 5.3, the system is not completely observable.
Consider now, the displacement z(t) of the cart as the output variable. Then
c = [0 0 1 0]
and the observability matrix
LM 0 0 1 0 OP
V= MM-01.0637 0
0
0
0
1
0
PP
MN 0 -1.0637 0 0
PQ
|V| = 1.1315 ¹ 0; the system is therefore completely observable. The values of z& (t), q (t) and q& (t) can all
be determined by observing z(t) over an arbitrary time interval. Observer design for the inverted-pendulum
system is given in Chapter 7.
324 Digital Control and State Variable Methods
( A ) n - 1 b = P–1An–1b
Therefore,
U = [P–1b P–1Ab L P–1An –1b] = P–1U
where U = [b Ab L An – 1b] (5.119b)
Since P–1 is nonsingular,
r ( U ) = r (U) (5.119c)
II. A similar relationship can be shown for the observability matrices.
N0 0 L ln
PQ
bn
MN PQ
Theorem 5.4 The system (5.120) is completely controllable if, and only if, none of the elements of the
column matrix b is zero, and (5.120) is completely observable if, and only if, none of the elements of the row
matrix c is zero.
Control System Analysis Using State Variable Methods 325
Proof The controllability matrix
U = [b L b L L n – 1b]
LM b1 b1l 1 L b1ln1 - 1 OP
b2 l n2 - 1
=M PP
b
2 b2 l 2 L
MM M M M
PP
MNb
n bn l n L bn l nn - 1 Q
1 l1 L ln1 - 1
1 l2 L ln2 - 1
|U| = b1 ´ b2 ´ L ´ bn ¹ 0 if bi ¹ 0, i = 1, 2, ..., n.
M M M
1 ln L lnn - 1
This proves the first part of the theorem. The second part can be proved in a similar manner.11
In frequency-domain analysis, it is tacitly assumed that the dynamic properties of a system are completely
determined by the transfer function of the system. That this is not always the case is illustrated by the
following examples.
x& = Ax + bu
y = cx (5.121)
with A=
LM-2 1
;b=
OP
LM OP
1
; c = [0 1]
N1 -2 NQ
1Q
The controllability matrix
L1 -1OP
U = [b Ab] = M
N1 -1Q
Since r(U) = 1, the second-order system (5.121) is not completely controllable. The eigenvalues of
matrix A are the roots of the characteristic equation
s + 2 -1
|sI – A| = =0
-1 s + 2
The eigenvalues are obtained as – 1, – 3. The modes of the transient response are therefore e– t and e– 3t.
The transfer function of the system (5.121) is calculated as
N -1 s+2 Q N1Q
11
Refer Gopal [105] for controllability and observability tests using Jordan canonical representation of systems with
multiple eigenvalues
326 Digital Control and State Variable Methods
LM s + 2 1 OP
= [0 1] M
(s + 1)(s + 3)
MM (s + 1)(1 s + 3)
(s + 1)(s + 3)
s+2 PP LMN11OPQ = s +1 1
N (s + 1)(s + 3) PQ
We find that because of pole-zero cancellation, both the eigenvalues of matrix A do not appear as poles in
G(s). The dynamic mode e–3t of the system (5.121), does not show up in input-output characterization given by
the transfer function G(s). Note that the system under consideration is not a completely controllable system.
with A=
LM -2 OP LM OP
1
;b=
1
; c = [1 –1]
N Q NQ
1 -2 0
The observability matrix
L c O L 1 -1 OP
V=M P =M
NcAQ N-3 3 Q
Since r(V) = 1, the second-order system (5.122) is not completely observable.
The eigenvalues of matrix A are – 1, – 3. The transfer function of the system (5.122) is calculated as
G(s) = c(sI – A)– 1b
LM s + 2 1 OP
= [1 –1] ( s + 1) ( s + 3) ( s + 1) ( s + 3)
MM 1 s + 2
1
0
=
1
s + 3
PP LMN OPQ
MN
( s + 1) ( s + 3) ( s + 1) ( s + 3) PQ
The dynamic mode e–t of the system (5.122), does not show up in the input-output characterization given by
the transfer function G(s). Note that the system under consideration is not a completely observable system.
In the following, we give two specific state transformations to reveal the underlying structure imposed
upon a system by its controllability and observability properties (for proof, refer [105]). These results are
then used to establish equivalence between transfer function and state variable representations.
Theorem 5.5 Consider an nth-order system
x& = Ax + bu (5.123a)
y = cx
Assume that
r(U) = r[b Ab L An – 1b] = m < n
Consider the equivalence transformation
x = P x = [ P1 P2] x (5.123b)
where P1 is composed of m linearly independent columns of U, and (n – m) columns of P2 are chosen arbitrar-
ily so that matrix P is nonsingular.
The equivalence transformation (5.123b) transforms the system (5.123a) to the following form:
LM x& OP = LMA
1 c A12 OP L x O + LMb OP u
1 c
Nx& Q N 0
2 A 22 Q MNx PQ N 0 Q
2
= A x + bu (5.123c)
Control System Analysis Using State Variable Methods 327
y = [c1 c2 ]
LM x OP = c x
1
Nx Q
2
where the m-dimensional subsystem
x& 1 = A c x1 + bc u + A12 x2
is controllable from u (the additional driving term A12 x 2 has no effect on controllability); the (n – m) dimen-
sional subsystem
x& 2 = A 22 x 2
is not affected by the input and is, therefore, entirely uncontrollable.
This theorem shows that any system which is not completely controllable, can be decomposed into
controllable and uncontrollable subsystems shown in Fig. 5.20. The state model (5.123c) is said to be in
controllability canonical form.
u x1
x1= A cx1 + b cu + A 12 x2 c1
y
+
x2
x2= A 22 x2 c2
In Section 5.4, it was shown that the characteristic equations and transfer functions of equivalent systems
are identical. Thus, the set of eigenvalues of matrix A of system (5.123a) is same as the set of eigenvalues of
matrix A of system (5.123c), which is a union of the subsets of eigenvalues of matrices Ac and A 22 . Also the
transfer function of system (5.123a) must be the same as that of (5.123c). The transfer function of (5.123a)
is calculated from Eqn. (5.123c) as 12
-1
G(s) = c1 c2
LMsI - A - A OP LMb OP
c 12 c
N 0 sI - A Q N0Q 22
= c1 c2
LM(s I - A ) (s I - A ) A (s I - A
c
–1
c
–1
12 22 )
–1
OP LMb OP
c
N 0 (s I - A ) 22
–1
Q N0Q
= c1 ( s I - A c ) –1 bc
Therefore, the input-output relationship for the system is dependent only on the controllable part of
the system. We will refer to the eigenvalues of Ac as controllable poles and the eigenvalues of A 22 as
uncontrollable poles.
Only the controllable poles appear in the transfer function model; the uncontrollable poles are cancelled
by the zeros.
12
LMA
1 A2 OP LMB 1 B2 OP = LM I 0OP
N0 A3 Q NB 3 B4 Q N0 I Q
gives
LM
B1 B 2
=
A1-1 OP LM - A1-1 A 2 A 3-1 OP
N
B3 B4 0 Q MN A 3-1 PQ
328 Digital Control and State Variable Methods
x = Qx = M P x
LQ O 1
(5.124b)
NQ Q 2
where Q1 is composed of l linearly independent rows of V, (n – l) rows of Q2 are chosen arbitrarily so that
matrix Q is nonsingular.
The equivalence transformation (5.124b) transforms the system (5.124a) to the following form:
LM x& OP = LM A
1 0 0OP L x O + LM b OP u = A x + b u
1 1
Nx& Q NA
2 21 A Q MNx PQ
22 2 Nb Q
2
(5.124c)
y = [ c0
Lx O 1
0]M P = c x
Nx Q 2
where the l-dimensional subsystem
x& 1 = A 0 x1 + b1 u
y = c 0 x1
is observable from y, and the (n – l)-dimensional subsystem
x& 2 = A 22 x2 + b2 u + A 21 x1
has no effect upon the output y, and is therefore entirely unobservable, i.e., nothing about x 2 can be inferred
from output measurement.
This theorem shows that any system which is not completely observable, can be decomposed into the
observable and unobservable subsystems shown in Fig. 5.21. The state model (5.124c) is said to be in
observability canonical form.
u x1 y
x1= A 0x1 + b 1u c0
x2= A 22 x2 + b2 u + A 21 x1
G(s) = [ c 0
Ls I - A
0]M 0 0 OP LM b OP -1
1
N - A s I - A Q Nb Q
21 22 2
= [c0
L
0]M
( sI - A ) 0
-1
0 OP LM b OP
1
-1 -1 -1
N ( s I - A )
22 A ( sI - A )
21 0 ( sI - A 22 ) Q Nb Q
2
= c0 ( s I - A 0 ) - 1 b1 (5.125)
which shows that the unobservable part of the system does not affect the input-output relationship. We will
refer to the eigenvalues of A0 as observable poles and the eigenvalues of A 22 as unobservable poles.
We now examine the use of state variable and transfer function models of a system to study its dynamic
properties.
We know that a system is asymptotically stable if all the eigenvalues of the characteristic matrix A of its
state variable model, are in the left-half of complex plane. Also, we know that a system is (bounded-input
bounded-output) BIBO stable if all the poles of its transfer function model are in the left-half of complex
plane. Since, in general, the poles of the transfer function model of a system are a subset of the eigenvalues
of the characteristic matrix A of the system, asymptotic stability always implies BIBO stability.
The reverse, however, may not always be true because the eigenvalues of the uncontrollable and/or
unobservable part of the system are hidden from the BIBO stability analysis. These may lead to instability of
a BIBO stable system. When a state variable model is both controllable and observable, all the eigenvalues
of characteristic matrix A appear as poles in the corresponding transfer function. Therefore BIBO stability
implies asymptotic stability only for completely controllable and completely observable system.
To conclude, we may say that the transfer function model of a system represents its complete dynamics
only if the system is both controllable and observable.
Many of the analysis results developed in earlier sections of this chapter for SISO systems have obvious
extensions for MIMO systems.
Consider a general MIMO system shown in the block diagram of Fig. 5.22. The input variables are
represented by u1, u2, ..., up, and the output variables by y1, y2, ..., yq. The state, as in the case of SISO
systems, is represented by variables x1, x2, ..., xn.
The state variable model for a MIMO system takes the following form:
0
x& (t ) = Ax(t) + Bu(t); x(t0) =D x (5.126a)
u1 y1
y(t) = Cx(t) + Du(t) (5.126b)
u2 MIMO y2
system where
up yq LMa 11 a12 L a1n OP
b11 b12 L b1 p LM OP
a a22 L a2 n b21 b22 L b2 p
A= M
MM M
21
M M
;B=
M
PP
M M
MM PP
x1 x2 xn
Na n1 an 2 L ann
PQ
bn1 bn 2 L bnp
MN PQ
Fig. 5.22 A general MIMO system
330 Digital Control and State Variable Methods
The output
LM t OP
y(t) = C e At x ( 0 ) +
MN z
0
e A( t - t ) Bu(t ) dt + Du(t)
PQ
(5.127b)
In the transform domain, the input-output behaviour of the system (5.126) is determined entirely by the
matrix (refer Eqn. (5.28))
G(s) = C(sI – A)–1 B + D (5.128a)
This matrix is called the transfer function matrix of system (5.126), and it has the property that the input
U(s) and output Y(s) of Eqns (5.126) are related by
Y( s ) = G( s) U( s) (5.128b)
( q ´1) ( q ´ p ) ( p ´1)
whenever x0 = 0.
In an expanded form, Eqn. (5.128b) can be written as
The (i, j)th element Gij(s) of G(s) is the transfer function relating the ith output to the jth input.
Example 5.21 The scheme of Fig. 5.23 describes a simple concentration control process. Two concentrated
solutions of some chemical with constant concentrations C1 and C2 are fed with flow rates Q1(t) = Q1 + q1(t),
and Q2(t) = Q2 + q2(t), respectively, and are continuously mixed in the tank. The outflow from the mixing
tank is at a rate Q(t) = Q + q(t) with concentration C(t) = C + c(t). Let it be assumed that stirring causes
perfect mixing so that the concentration of the solution in the tank is uniform throughout, and equals that of
the outflow. We shall also assume that the density remains constant.
Let V(t) = V + v(t) be the volume of the fluid in the tank.
Control System Analysis Using State Variable Methods 331
Controller
Q 1, C 1 Q 2, C 2
Feed 1 Feed 2
V
H
C
Q, C Flow
sensor
Outgoing stream
Concentration
analyser
V
Q = k
A
For small perturbations about the steady-state, Eqn. (5.130) can be linearized using Eqn. (5.11c):
k ¶ V (t )
Q(t) – Q = (V(t) – V )
A ¶ V (t ) V= V
332 Digital Control and State Variable Methods
k V Q
or q(t) = v(t) = v(t)
2V A 2V
From the foregoing equations, we obtain the following relations describing perturbations about
steady-state:
1Q
v& (t) = q1(t) + q2(t) – v(t) (5.131a)
2 V
1 CQ
C v& (t ) + Vc&( t ) = C1 q1(t) + C2 q2(t) – v(t) – Q c(t) (5.131b)
2 V
(Second-order terms in perturbation variables have been neglected)
The hold-up time of the tank is
V
t=
Q
Let us define
x1(t) = v(t), x2(t) = c(t), u1(t) = q1(t), u2(t) = q2(t), y1(t) = q(t), and y2(t) = c(t)
In terms of these variables, we get the following state model from Eqns (5.131):
LM- 1 0 OP L 1 1 OP
x& (t) = M t
2 x(t) + M C − C C2 − C u(t) (5.132a)
1P 1
MN 0 t PQ MN V
- V
PQ
L 1 0OP x(t)
y(t) = M 2t (5.132b)
MN 0 1 PQ
For the parameters
Q1 = 10 litres/sec, Q2 = 20 litres/sec, C1 = 9 g-moles/litre, C2= 18 g-moles/litre, V = 1500 litres,
the state variable model becomes
x& (t) = Ax(t) + Bu(t) (5.133a)
y(t) = Cx(t) (5.133b)
with
A=
LM-0.01 0 OP
;B=
1 1 LM ;C=
0.01 0 OP LM OP
N 0 -0.02 Q-0.004 0.002
N 0 1 Q N Q
In the transform domain, the input-output behaviour of the system is given by
Y(s) = G(s) U(s)
where
G(s) = C(sI – A)–1B
For A, B, and C given by Eqns (5.133), we have
(sI – A) =
LMs + 0.01 0 OP
N 0 s + 0.02 Q
Control System Analysis Using State Variable Methods 333
L L 1
0.01 0O M s + 0.01 0 OP L 1 1 OP
–1
G(s) = C(sI – A) B =M
N 0 1PQ MMN 0 1 PP MN-0.004 0.002 Q
s + 0.02 Q
LM 0.01 0.01 OP
= M s + 0.01 s + 0.01 P (5.134)
MN s-+0.004 0.002
P
0.02 s + 0.02 Q
Controllability Test The necessary and sufficient condition for the system (5.126) to be completely
controllable, is that the n ´ np matrix
D
U = [B AB A2B L An – 1B] (5.135)
has rank equal to n, i.e., r (U) = n.
Observability Test The necessary and sufficient condition for the system (5.126) to be completely
observable, is that the nq ´ n matrix
LM C OP
CA
V= M
D
MM M PP (5.136)
NCA n -1 PQ
has rank equal to n, i.e., r (V) = n.
Controllability and Observability of State Variable Model in Jordan Canonical Form The con-
trollability and observability properties can be determined by the inspection of the system equations in
Jordan canonical form. A MIMO system with distinct eigenvalues l1, l2, ..., ln has the following Jordan
canonical state model.
x& = L x + Bu (5.137a)
y = Cx + Du (5.137b)
with
We have been using Jordan canonical structure only for systems with distinct eigenvalues. Refer [105] for
controllability and observability tests using Jordan canonical representation of systems with multiple
eigenvalues.
Example 5.22 Consider the mixing-tank system discussed in Example 5.21. Suppose the feeds Q1 and Q2
have equal concentrations, i.e., C1 = C2 = C0 (Fig. 5.23). Then the steady-state concentration C in the tank
is also C0, and from Eqn. (5.132a) we have
LM- 1 0 OP L1 1OP u(t)
x& (t) = M 2t P x(t) + M
1 N0 0 Q
MN 0 - P
tQ
This state variable model is in Jordan canonical form. Since one row of the B matrix is a zero row, the
system is not completely controllable. As is obvious from the Jordan canonical model, the input u(t) affects
only the state variable x1(t), the incremental volume. The variable x2(t), the incremental concentration, has
no connection with the input u(t).
If C1 ¹ C2, the system is completely controllable.
Review Examples
Y ( s) 10(s + 4)
=
R( s) s( s + 1)( s + 3)
Construct three different state models for this system:
(a) One where the system matrix A is a diagonal matrix.
(b) One where A is in first companion form.
(c) One where A is in second companion form.
Solution
(a) The given transfer function can be expressed as
Y (s) 10(s + 4) 40/3 -15 5/3
= = + +
R( s ) s(s + 1)(s + 3) s s +1 s +3
Therefore,
40/3 -15 5/3
Y(s) = R(s) + R(s) + R(s)
s s +1 s+3
40 / 3 40
Let X1(s) = R(s); this gives x&1 = r
s 3
-15
X2(s) = R(s); this gives x& 2 + x2 = – 15r
s +1
Control System Analysis Using State Variable Methods 335
5/ 3 5
X3(s) = R(s); this gives x& 3 + 3x3 = r
s+3 3
In terms of x1, x2 and x3, the output y(t) is given by
y(t) = x1(t) + x2(t) + x3(t)
A state variable formulation, for the given transfer function, is defined by the following matrices:
LM
0 0 0 40 / 3 OP LM OP
L = 0 -1 0 ; b = -15 ; c = [1 1 1]; d = 0
MM
0 0 -3
PP MM PP
N 5/ 3 Q N Q
Note that the coefficient matrix A is diagonal, and the state model is in Jordan canonical form.
We now construct two state models for the given transfer function in companion form. To do this, we
express the transfer function as
Y ( s) 10(s + 4) 10 s + 40 b s 3 + b 1s 2 + b 2 s + b 3
= = 3 = 03 ;
2
R( s) s( s + 1)( s + 3) s + 4 s + 3s s + a 1s 2 + a 2 s + a 3
b0 = b1 = 0, b2 = 10, b3 = 40, a1 = 4, a2 = 3, a3 = 0
(b) With reference to Eqns (5.54), we obtain the following state model in the first companion form:
LM0 1 0 OP LM0OP
A= 0 0 1 ; b = 0 ; c = [40 10 0]; d = 0
MM
0 -3 - 4
PP MM PP
N 1 Q NQ
(c) With reference to Eqns (5.56), the state model in second companion form becomes
LM0 0 0 OP LM40OP
A = 1 0 - 3 ; b = 10 , c = [0 0 1]; d = 0
0 1 -4
MM PP MM PP
N 0 Q N Q
Review Example 5.2 A linear time-invariant system is characterized by the homogeneous state equation
LM x& OP = LM0
1 1OP LM x OP1
N x& Q N0
2 -2Q N x Q 2
(a) Compute the solution of the homogeneous equation assuming the initial state vector
x(0) =
LM1OP
N0Q
Employ both the Laplace transform method and the canonical transformation method.
(b) Consider now that the system has a forcing function and is represented by the following non-
homogeneous state equation:
LM x& OP = LM0
1 1 OP LM x OP + LM0OP u
1
N x& Q N0
2 -2 Q N x Q N1Q 2
(sI – A) =
LM s -1 OP
N0 s + 2Q
we obtain
LM1 1 OP
–1
= Ms s( s + 2 )
(sI – A)
MN0 1 PP
s+2 Q
Hence
adj(lil – A) =
LMl + 2 1 OP i
N 0 lQ i
For l1 = 0, adj(l I – A) = M
1
L2 1OP
N0 0 Q
The eigenvector v1 corresponding to the eigenvalue l1 is therefore, given by
v1 =
LM1OP
N0Q
For l2 = – 2, adj (l2I – A)=
LM0 1 OP
N0 -2 Q
The eigenvector v2 corresponding to the eigenvalue l2 is given by
v2 =
LM 1OP
N-2Q
The transformation matrix
P=
LM1 1OP
N0 -2 Q
Control System Analysis Using State Variable Methods 337
gives
P–1AP = L =
LM0 OP
0
N0 -2Q
The state transition matrix (refer Eqn. (5.93))
Now
LM t
OP
t
bu(t )dt = MM
1
2 z [1 - e -2 ( t - t ) ]dt
PP = LM- 1
+ 12 t + 14 e -2 t OP
z eA(t – t ) 0
t
PP MN
4
1
2 (1 - e
-2 t
) PQ
0 MM
N z
0
e -2( t - t ) dt
Q
Therefore,
1 1 –2t
x1(t) = - 14 + 2 t+ 4e
x2(t) = 1
2 (1 – e–2t)
d d
f (l ) = g(l )
dl l = l1 dl l = l1
M
n -1
d d n -1
f (l ) = g(l )
dln -1 l = l1
dln -1 l = l1
Solving, we get
b0 = el1t
t l 1t
b1 = e
1!
t 2 l 1t
b2 = e
2!
M
t n -1
bn – 1 = e l 1t
( n - 1) !
Therefore,
eL t = b0I + b1( L – l1I) + L + bn –1(L – l1I)n – 1
LM0 1 0 0 L 0OP
0 0 1 0 L 0
(L – l I) = M 1
MM M M M M M
PP
N0 0 0 0 L 0
PQ
LM0 0 1 0 L 0O
0 0 0 1 L 0P
( L – l I)( L – l I) = M
1 1
P
MM M M M M MP
P
N0 0 0 0 L 0Q
M
LMb 0 b1 b2 L bn -1 OP
0 b0 b1 L bn - 2
e Lt =M PP
MM M M M M
PQ
N0 0 0 L b0
LMe l 1t
te l 1t t 2 e l 1t/ 2 ! L t n -1e l 1t/( n - 1) ! OP
l 1t l 1t
0 e te L t n - 2 e l 1t/(n - 2 ) !
=M PP
MM M M M M
PP
l 1t
MN 0 0 0 L e Q
Control System Analysis Using State Variable Methods 339
Review Example 5.4 The motion of a satellite in the equatorial (r, q) plane is given by [122] the state
equation
LM x& OP LM 0
1
2
1 0 0 OP LM x OP LM0
1 0 OP
MM xx&& PP = MM3w0
2 0
0
0 2w
0 1
PP MM xx PP + MM10
2 0
0
PP LMuu OP = Ax + Bu
1
3
MN x& PQ MN 0
4 -2w 0 0
3
PQ MN x PQ MN0
4 1
PQ N Q
2
where w is the angular frequency of the satellite in circular, equatorial orbit; x1(t) and x3(t) are, respectively,
the deviations in position variables r(t) and q(t) of the satellite; and x2(t) and x4(t) are, respectively, the
deviations in velocity variables r& (t) and q& (t). The inputs u1(t) and u2(t) are the thrusts ur and uq in the radial
and tangential directions, respectively, applied by small rocket engines or gas jets (u = 0 when x = 0).
(a) Prove that the system is completely controllable.
(b) Suppose that the tangential thruster becomes inoperable. Determine the controllability of the system
with the radial thruster alone.
(c) Suppose that the radial thruster becomes inoperable. Determine the controllability of the system with
the tangential thruster alone.
(d) Prove that the system is completely observable from radial (x1 = r) and tangential (x3 = q ) position
measurements.
(e) Suppose that the tangential measuring device becomes inoperable. Determine the observability of the
system from radial position measurement alone.
(f) Suppose that the radial measurements are lost. Determine the observability of the system from tangen-
tial position measurement alone.
Solution
(a) The controllability matrix
U = [B AB A2B A3B]
Consider the matrix:
LM0 0 1 OP
0
1 0 0 2w
U1 = [B AB] = M
MM0 0 0 1
PP
N0 1 -2w 0Q
P
|U1| = – 1
Therefore r(U1) = r(U) = 4; the system is completely controllable.
(b) With u2 = 0, the B matrix becomes
LM0OP
1
b=M P
MM0PP
N0Q
The controllability matrix
340 Digital Control and State Variable Methods
LM0 1 0 -w 2 OP
2
1 0 -w 0
U = [b Ab A2b A b] = M
3 PP
MM0 0 -2w 0
PPQ
MN0 -2w 0 2w 3
1 0 -w 2
|U| = – 0 -2w 0 = –[– 2w (2w3 – 2w3)] = 0
-2w 0 2w 3
Therefore, r (U) < 4, and the system is not completely controllable with u1 alone.
(c) With u1 = 0, the B matrix becomes
0 LM OP
0
b=M P
MM0PP
N1Q
The controllability matrix
LM0 0 2w 0 OP
0 2w 0 - 2w 3
U=M
MM0 1 0 - 4w 2
PP
N1 0 - 4w 2 0
PQ
0 2w - 2w 3
|U| = 2w 0 1 - 4w 2 = –12w 4 ¹ 0
1 0 0
Therefore, r(U) = 4, and the system is completely controllable with u2 alone.
(d) The observability matrix
C LM OP
CA
V=M
MMCA PPP
2
3
NCA Q
Taking radial and tangential position measurements as the outputs, we have
y1 = x1; y2 = x3
or y = Cx =
LM1 0 0 0
x
OP
N0 0 1 0 Q
Consider the matrix
LM1 0 0 0 OP
LC O 0
V =M P =M
1
0 1 0
PP
NCAQ MM0 1 0 0
PQ
N0 0 0 1
|V1| ¹ 0
Control System Analysis Using State Variable Methods 341
Therefore, r(V1) = r(V) = 4, and the system is completely observable.
(e) With x3 = 0, the C matrix becomes
c = [1 0 0 0]
The observability matrix
LM c OP LM 1 0 0 0 OP
cA 0 1 0 0
V= M 2
P =M
MMcA PP MM 3w 2
0 0 2w
PP
3
NcA Q N 0 -w 2 0 0
PQ
|V| = 0
Therefore, r(V) < 4, and the system is not completely observable from y1 = x1 alone.
(f) With x1 = 0, the C matrix becomes
c = [0 0 1 0]
The observability matrix
LM 0 0 1 0 OP
0 0 0 1
V=M
MM 0 - 2w 0 0
PP
N - 6w 3
0 0 - 4w 2
PQ
|V| = – 12w4 ¹ 0
Therefore, r (V) = 4, and the system is completely observable from y2 = x3 alone.
Problems
5.1 Figure P5.1 shows a control scheme for controlling the azimuth angle of a rotating antenna. The plant consists of an
armature-controlled dc motor with dc generator used as an amplifier. The parameters of the plant are given below:
Motor torque constant, KT = 1.2 N-m/amp
Motor back emf constant, Kb = 1.2 V/(rad/sec)
Generator gain constant, Kg = 100 V/amp
Motor to load gear ratio, n = (q& L / q& M ) = 1/2
Rg Lg Ra La
qM
eg eb
qL
J, B
Lf
Rf
u
+ –
Fig. P5.1
342 Digital Control and State Variable Methods
x1 = q
Potentiometer
Ia
–
u = ef Rf
r (t) + KA
–
–
Lf J, B
x 3 = if
R=1 W
x2 = q
Tachogenerator
Fig. P5.2
5.3 Figure P5.3 shows the block diagram of a motor-driven, single-link robot manipulator with position and veloc-
ity feedback. The drive motor is an armature-controlled dc motor; ea is armature voltage, ia is armature current,
qM is the motor shaft position and q& M is motor shaft velocity. qL is the position of the robot arm.
Taking qM, q& M and ia as state variables, derive a state model for the feedback system.
5.4 Figure P5.4 shows the block diagram of a speed control system with state variable feedback. The drive motor is
an armature-controlled dc motor with armature resistance Ra, armature inductance La, motor torque constant
KT, inertia referred to motor shaft J, viscous friction coefficient referred to motor shaft B, back emf constant
Kb, and tachogenerator constant Kt. The applied armature voltage is controlled by a three-phase full-converter.
We have assumed a linear relationship between the control voltage ec and the armature voltage ea, er is the
reference voltage corresponding to the desired speed.
Taking x1 = w (speed) and x2 = ia (armature current) as the state variables, u = er as the input, and y = w as the
output, derive a state variable model for the feedback system.
Control System Analysis Using State Variable Methods 343
k2
0.5
– – qL
ea 1 ia 1 1 qM 1
38
+ 2s + 21 2s + 1 s 20
+
k1 qM
–
+
qR
Fig. P5.3
ia
k2
–
er + + ec + 1 1 w
k1 Kc KT
sL a + R a Js + B
– –
ea Kb
Kt
Fig. P5.4
x& =
LM -3 1OP x + LM0OP u
N-2 0Q N1Q
y = [1 0] x
A similarity transformation is defined by
x = Px =
LM 2 -1OP x
N-1 1Q
(a) Express the state model in terms of the states x (t).
(b) Draw state diagrams in signal-flow graph form for the state models in x(t) and x (t).
(c) Show by Mason’s gain formula that the transfer functions for the two state diagrams in (b) are equal.
5.6 Consider a double-integrator plant described by the differential equation
d 2q( t )
= u(t)
dt 2
344 Digital Control and State Variable Methods
(a) Develop a state equation for this system with u as the input, and q and q& as the state variables x1 and x2,
respectively.
(b) A similarity transformation is defined as
x = Px =
1 0
x
LM OP
1 1 N Q
Express the state equation in terms of the states x (t).
(c) Show that the eigenvalues of the system matrices of the two state equations in (a) and (b), are equal.
5.7 A system is described by the state equation
LM
0 1 0 OP
0 LM OP
&x = 0 0 1 x + 0 u; x(0) = x 0
MM PP MM PP
-1 0 -3
N 1Q NQ
Using the Laplace transform technique, transform the state equation into a set of linear algebraic equations in
the form
X(s) = G(s)x0 + H(s)U(s)
5.8 Give a block diagram for the programming of the system of Problem 5.7 on an analog computer.
5.9 The state diagram of a linear system is shown in Fig. P5.9. Assign the state variables, and write the dynamic
equations of the system.
1
–1
–1
Fig. P5.9
3
y1 (0)
+ – +
u1 + + + +
3
y1
– +
2
4
–
+ + +
u2 3 y2
– +
y2(0)
4
Fig. P5.10
Control System Analysis Using State Variable Methods 345
5.11 Derive transfer functions corresponding to the following state models:
(a) x& =
LM 0 1OP x + LM1OP u; y = [1 0] x (b) x& =
LM-3 1OP x + LM0OP u; y = [1 0] x
N-2 -3Q N0Q N-2 0Q N1Q
5.12 Derive the transfer function matrix corresponding to the following state model, using resolvent algorithm.
LM 2 -1 0OP LM-1 0 OP
x& =
MM-11 01 21PP x + MM 01 0 u
2 QP
P
N Q N
y=M
L1 1 0OP x
N1 0 1Q
5.13 Figure P5.13 shows the block diagram of a control system with state variable feedback and integral control. The
plant model is
LM x& OP = LM-3 2OP LM x OP + LM1OP u
1 1
N x& Q N 4 -5Q N x Q N0Q
2 2
y = [0 1] x
(a) Derive a state model of the feedback system.
(b) Derive the transfer function Y(s)/R(s).
r + x3 + u y
(× )dt – 3.5 Plant
– – –
x1 x2
2
1.5
Fig. P5.13
5.14 Construct state models for the systems of Fig. P5.14a and Fig. P5.14b, taking outputs of simple lag blocks as
state variables.
1
+ y
u + 1 + s+1
– s+1
u + 1 + + y
1 s
–
s+2
1
(a)
s+2
(b)
Fig. P5.14
346 Digital Control and State Variable Methods
5.15 Derive a state model for the two-input, two-output feedback control system shown in Fig. P5.15. Take outputs
of simple lags as state variables.
r1 + – u1 1 y1
+
K1
s+1
+
5
s+5
0.4
s + 0.5
r2 + + y2
u2 4 +
K2
– s+2
Fig. P5.15
5.16 Construct state models for the following transfer functions. Obtain different canonical form for each system.
s+3 5 s 3 + 8s 2 + 17s + 8
(i) (ii) (iii)
s 2 + 3s + 2 ( s + 1)2 ( s + 2) ( s + 1) ( s + 2) ( s + 3)
Give block diagrams for the analog computer simulation of these transfer functions.
5.17 Construct state models for the following differential equations. Obtain a different canonical form for each system.
(i) &&&
y + 3&&
y + 2 y& = u& + u (ii) &&&
y + 6 y&& + 11y& + 6y = u (iii) &&&
y + 6 y&& + 11y& + 6y = &&&
u + 8u&& + 17u& + 8u
5.18 Derive two state models for the system with transfer function
Y (s ) 50(1 + s / 5)
=
U ( s) s(1 + s / 2) (1 + s / 50)
(a) One for which the system matrix is a companion matrix.
(b) One for which the system matrix is diagonal.
5.19 (a) Obtain state variable model in Jordan canonical form for the system with transfer function
Y (s) 2s2 + 6s + 5
=
U ( s ) ( s + 1)2 ( s + 2)
(b) Find the response y(t) to a unit-step input using the state variable model in (a).
(c) Give a block diagram for analog computer simulation of the transfer function.
5.20 Find the eigenvalues and eigenvectors for the following matrices.
LM OP
1 1 LM
-3 2 OP 0 1 LM
0 OP
(i) (ii) (iii) 3 0 2
0 2N Q -1 0N Q -12 -7 -6
MM PP
N Q
5.21 (a) If l1, l2, L, ln are distinct eigenvalues of
0 LM
1 0 L 0 OP
0 0 1 L 0
A = M
MM
M M M
PP
0 0
MM 0 L 1
PP
MN
-a n -a n -1 -a n - 2 L -a 1 PQ
Control System Analysis Using State Variable Methods 347
prove that the matrix
LM 1 1 L 1 OP
L
Ml
P =M l
1
2
l2
l22 L
ln
l2n
PP
1
MM M M M
PP
MNl n -1
1 ln2-1 L lnn-1 PQ
transforms A into Jordan canonical form.
(b) Using the result in (a), find the eigenvalues and eigenvectors of the following matrix:
LM 0 1 OP
0
A =
MM-240 -260 1
-9 PQ
P
N
5.22 Consider the matrix
LM 0 1 OP
0
A = 0 0 1
MM-2 - 4 - 3 QP
P
N
(a) Suggest a transformation matrix P such that L = P–1AP is in Jordan canonical form.
(b) Matrix L in (a) has complex elements. Real arithmetic is often preferable, and can be achieved by further
transformation. Suggest a transformation matrix Q-such that Q–1LQ has all real elements.
5.23 Given the system
x& =
-4 3 LM
x = Ax
OP
-6 5 N Q
Determine eigenvalues and eigenvectors of matrix A, and use these results to find the state transition matrix.
5..24 Using Laplace transform method, find the matrix exponential eAt for
(a) A =
LM
0 -3 OP (b) A =
LM
0 1 OP
1 -4
N Q -3 - 4
N Q
5.25 Using the Cayley-Hamilton technique, find eAt for
(a) A =
LM
0 1 OP (b) A =
LM
0 2 OP
-6 - 5
N Q -2 - 4
N Q
5.26 Given the system
x& =
-2 1LM x+
1
u
OP LM OP
1 -2N 1 Q NQ
(a) Obtain a state diagram in signal-flow graph form.
(b) From the signal-flow graph, determine the state equation in the form
X(s) = G(s)x(0) + H(s)U(s)
(c) Using inverse Laplace transformation, obtain the
(i) zero-input response to initial condition
0 0
x(0) = [ x1 x 2 ]T;
(ii) zero-state response to unit-step input.
5.27 A linear time-invariant system is described by the following state model:
LM
0 1 0 0 OP LM OP
x& = 0 0 1 x+ 0 u
MM
-6 -11 -6
PP MM PP
N 2 Q NQ
y = [1 0 0] x
348 Digital Control and State Variable Methods
Diagonalize the coefficient matrix of the state model using a similarity transformation, and from there obtain
the explicit solutions for the state vector and output when the control force u is a unit-step function and the
initial state vector is
x(0) = [0 0 2]T
5.28 Consider the system
x& =
LM
0 1
x+
0 OP
u; x(0) =
1 LM OP LM OP
-2 -3N 1 Q 1 NQ NQ
y = [1 0] x
(a) Determine the stability of the system.
(b) Find the output response of the system to unit-step input.
5.29 Find the response of the system
x& =
LM
0 1
x+
OP LM OP
2 1
u; x(0) =
0 LM OP
-2 -3
N Q N Q
0 1 0 NQ
y=M
L1 0O
N1 1PQ x
to the following input:
u(t) = M
Lu (t) OP = LM m (t ) OP ; m (t) is unit-step function.
1
-3 t
Nu (t)Q Ne m (t )Q
2
5.30 Figure P5.30 shows the block diagram of a control system with state variable feedback and feedforward control.
The plant model is
x& =
-3 2 LM x+
1
u
OP LM OP
4 -5 N 0 Q NQ
y = [0 1]x
(a) Derive a state model for the feedback system.
(b) Find the output y(t) of the feedback system to a unit-step input r(t); the initial state is assumed to be zero.
y = x2
r + u
7 Plant
–
x1
3
+
+
1.5
Fig. P5.30
x& =
LM 0 1OP x
N-1 -2Q
Find a set of states x1(1) and x2(1) such that x1(2) = 2.
5.32 Consider the system
LM 0 1 0 OP
x& = 0 2 x
MM-123 -7 -6
PP
N Q
Control System Analysis Using State Variable Methods 349
(a) Find the modes of the system.
(b) Find the initial condition vector x(0) which will only excite the mode corresponding to the eigenvalue with
the most negative real part.
5.33 Consider the system
x& (t) =
LM OP
0 1
x(t)
N Q
2 1
y(t) = [1 2] x(t)
(a) Show that the system modes are e–t and e2t.
(b) Find a set of initial conditions such that the mode e2t is suppressed in y(t).
5.34 The following facts are known about the linear system
x& (t) = Ax(t).
If x(0) =
LM OP
1 LM
, then x(t) =
e -2 t OP
-2
N Q N-2e -2 t Q
If
L 1O L
x(0) = M P , then x(t) = M
e -t OP
-t
-
N Q
1 Ne- Q
Find eAt and hence A.
5.35 Show that the pair {A, c} is completely observable for all values of a i ’s.
LM0 0 L 0 -an OP
0 L 0 - a n -1
M1
A = M0 1 L 0 - a n-2
PP
MM M M M M
PP
MN0 0 L 1 - a1 PQ
c = [0 0 L 0 1]
5.36 Show that the pair {A, b} is completely controllable for all values of ai’s.
LM
0 1 0 L 0 OP LM0 OP
0 0 1 L 0
A = M
MM M M M ;b=
PP MM0M PP
0
MM 0 0 L 1
PP MM0 PP
MN
-a n -a n -1 -a n - 2 L -a 1 PQ MN1 PQ
5.37 Given the system
-1 0 LM 0 OP
0 1 LM 0 1
OP LM 2 OP
x& = 0 -2 0 x + 2 0 u; y =
MM PP MM PP x
0 0 -3 N 0 1 Q N
0 1
Q N 0 Q
What can we say about controllability and observability—without making any further calculations?
5.38 Determine the controllability and observability properties of the following systems:
(i) A =
-2 1 LM ;b=
OP LM OP
1
; c = [1 –1]
1 -2N Q NQ
0
(ii) A= M
L -1 0 OP ; b = LM2OP ; c = [0 1]
N 0 -2Q N5Q
LM-1 0 0 OP LM1 0OP L1 1 2 OP
(iii) A = M 0 -2 0 ;B= 1 2 ;C= M
MN 0 0 -3 PPQ MMN2 1PPQ N3 1 5 Q
350 Digital Control and State Variable Methods
LM0 1 0OP 0 LM OP
(iv) A = M0 0 1 ; b = 0 ; c = [10
PP 0 0]
MN0 -2 -3
MM PP
Q1 NQ
LM0 0 0O L 40 O
(v) A= 1 0 -3P ; b = M10 P ; c = [0 0 1]
MM0 P MM 0 PP
-4 PQ
N 1 N Q
1
5.39 The following models realize the transfer function G(s) = .
s +1
(i) A =
LM-2 1 OP L O
;b=
1
; c = [0 1]
N1 -2 Q MN PQ
1
(ii) A= M
L-1 0OP LM OP
;b=
1
; c = [1 0]
N0 -3 Q NQ 1
L-2 0O L0 O
(iii) A= M P ; b = M P ; c = [0 1]
N0 -1Q N1 Q
Investigate the controllability and observability properties of these models.
Find a state variable model, for the given transfer function, which is both controllable and observable.
5.40 Consider the systems
(i) A =
LM0 -2OP ; b = LM1OP ; c = [0 1]
N1 -3Q N1Q
LM 0 1 0OP LM0OP
(ii) A= M 0 0 1 ; b = 0 ; c = [4 5 1]
MN-6 -11 -6PPQ MMN1PPQ
Determine the transfer function in each case. What can we say about controllability and observability
properties—without making any further calculations?
5.41 Consider the system
1 1LM 0 0OP LM OP
x& = 0 -2 MM 1 x + 1 u; y = [1 0 0] x
PP
0 0 -1
MM PP
N -2 Q N Q
(a) Find the eigenvalues of A and from there determine the stability of the system.
(b) Find the transfer function model and from there determine the stability of the system.
(c) Are the two results the same? If not, why?
5.42 Given a transfer function
10 Y (s )
G(s) = =
s( s + 1) U ( s)
Construct three different state models for this system:
(a) One which is both controllable and observable.
(b) One which is controllable but not observable.
(c) One which is observable but not controllable.
5.43 Prove that the transfer function
G(s) = Y(s)/U(s)
of the system
x& (t) = Ax(t) + bu(t)
y(t) = cx(t) + du(t)
is invariant under state transformation x(t) = P x (t); P is a constant nonsingular matrix.
State Variable Analysis of
6.1 INTRODUCTION
In the previous chapter of this book, we treated in considerable detail, the analysis of linear continuous-time
systems using state variable methods. In this chapter, we give a condensed review of the same methods for
linear discrete-time systems. Since the theory of linear discrete-time systems—very closely—parallels the
theory of linear continuous-time systems, many of the results are similar. For this reason, the comments in
this chapter are brief, except in those cases where the results for discrete-time systems deviate markedly
from the continuous-time situation. For the same reason, many proofs are omitted.
We will be mostly concerned with single-input, single-output (SISO) system configurations of the
type shown in the block diagram of Fig. 6.1. The plant in the figure, is a physical process characterized by
continuous-time input and output variables. A digital computer is used to control the continuous-time plant.
The interface system that takes care of the communication between the digital computer and the continuous-
time plant consists of analog-to-digital (A/D) converter and digital-to-analog (D/A) converter. In order to
analyse such a system, it is often convenient to represent the continuous-time plant, together with the D/A
converter and the A/D converter, by an equivalent discrete-time system.
Sensor
A/D
The discrete-time systems we will come across can, therefore, be classified into two types.
(i) Inherently discrete-time systems (digital processors), where it makes sense to consider the system at
discrete instants of time only, and what happens in between is irrelevant.
352 Digital Control and State Variable Methods
(ii) Discrete-time systems that result from considering continuous-time systems at discrete instants of
time only.
A discrete-time system is a transformation, or operator, that maps a given input sequence u(k) into an output
sequence y(k). Classes of discrete-time systems are defined by placing constraints on the transformation. As
they are relatively easy to characterize mathematically, and as they can be designed to perform useful signal
processing functions, the class of linear time-invariant systems will be studied here.
In the control structure of Fig. 6.1, the digital computer transforms an input sequence into a form which is,
in some sense, more desirable. Therefore, the discrete-time systems we consider here, are in fact computer
programs. Needless to say, digital computers can do many things other than control dynamic systems; it is
our purpose to examine their characteristics when doing this elementary control task.
State variable model of a SISO discrete-time system consists of a set of first-order difference equations
relating state variables x1(k), x2(k), ..., xn(k) of the discrete-time system to the input u(k); the output y(k) is
algebraically related to the state variables and the input. Assuming that the input is switched on to the system
at k = 0 (u(k) = 0 for k < 0), then the initial state is given by
D x0; a specified n × 1 vector
x(0) =
The dynamics of a linear time-invariant system is described by equations of the form:
D 0
x(k + 1) = Fx(k) + gu(k); x(0) = x (6.1a)
y(k) = cx(k) + du(k) (6.1b)
LM x (k) OP
1
x (k )
x(k) = M
MM M PPP = n × 1 state vector of nth-order system
2
where
N x (k )Q
n
LM g OP
1
g
g = M P = n × 1 constant column matrix
2
MM M PP
nNg Q
c = [c1 c2 L cn] = 1 × n constant row matrix
d = scalar, representing direct coupling between input and output
Equation (6.1a) is called the state equation of the system, Eqn. (6.1b) is called the output equation; the two
equations together give the state variable model of the system.
State Variable Analysis of Digital Control Systems 353
6.2.1 Conversion of State Variable Models to Transfer Functions
In the study of linear time-invariant discrete-time equations, we may also apply the z-transform techniques.
Taking the z-transform of Eqns (6.1), we obtain:
zX(z) – zx0 = FX(z) + gU(z)
Y(z) = cX(z) + dU(z)
where D Z [x(k)]; U(z) D Z [u(k)]; Y(z) D Z [y(k)]
X(z) = = =
Manipulation of these equations, gives
(zI – F) X(z) = zx0 + gU(z); I is n × n identity matrix
or X(z) = (zI – F)–1 zx0 + (zI – F)–1 gU(z) (6.2a)
–1 0 –1
Y(z) = c(zI – F) zx + [c(zI – F) g + d] U(z) (6.2b)
0
Equations (6.2) are algebraic equations. If x and U(z) are known, X(z) can be computed from these equa-
tions.
In the case of zero initial state (i.e., x0 = 0), the input-output behaviour of the system (6.1) is determined
entirely by the transfer function
Y (z)
= G(z) = c(zI – F)–1 g + d (6.3a)
U(z)
( zI - F ) + g
=c +d (6.3b)
| zI - F |
where (zI – F)+ = adjoint of the matrix (zI – F)
|zI – F | = determinant of the matrix (zI – F)
|lI – F | is the characteristic polynomial of matrix F. The roots of this polynomial are the characteristic
roots or eigenvalues of matrix F.
From Eqn. (6.3b), we observe that the characteristic polynomial of matrix F of the system (6.1), is same
as the denominator polynomial of the corresponding transfer function G(z). If there are no cancellations
between the numerator and denominator polynomials of G(z) in Eqn. (6.3b), the eigenvalues of matrix F are
same as the poles of G(z).
In a later section, we shall see that for a completely controllable and observable state variable model, the
eigenvalues of matrix F are same as the poles of the corresponding transfer function.
In what follows, we shall use two of the structures presented in Section 3.4 for obtaining canonical state
variable models corresponding to the general transfer function
n n -1
Y ( z) b 0 z + b 1z + L + b n - 1z + b n
G(z) = = n n -1 (6.5)
U(z) z + a 1z + L + a n - 1z + a n
Revisiting Section 3.4 at this stage will be helpful in our discussion.
First Companion Form A direct realization structure for the system described by Eqn. (6.5) is shown in
Fig. 6.2. Notice that n delay elements have been used in this realization. The coefficients a1, a2, ..., an appear
as feedback elements, and the coefficients b0, b1, ..., bn appear as feedforward elements. To get one state
variable model, we identify the output of each unit delayer with a state variable—starting at the right and
proceeding to the left. The corresponding difference equations are
x1(k + 1) = x2(k)
x2(k + 1) = x3(k)
M (6.6a)
xn – 1(k + 1) = xn(k)
xn(k + 1) = – an x1(k) – an – 1 x2(k) – L – a1 xn(k) + u(k)
+ + +
+ + +
+ +
+ +
Fig. 6.2 A direct realization structure for system given by Eqn. (6.5)
Careful examination of Fig. 6.2 reveals that there are two paths from the output of each unit delayer to the
system output: one path upward through the box labelled bi, and a second path down through the box
labelled ai and thence through the box labelled b0. As a consequence
y(k) = (bn – an b0) x1(k) + (bn–1 – an–1 b0) x2(k) + L + (b1 – a1 b0) xn(k) + b0 u(k) (6.6b)
The state and output equations (6.6), organized in vector-matrix form, are given below.
x(k + 1) = Fx(k) + gu(k)
(6.7)
y(k) = cx(k) + du(k)
State Variable Analysis of Digital Control Systems 355
LM 0 1 0 L OP L0O
0
M0 0 1 L 0
P MM0PP
with F=M M M M M P ; g = MMP
MM 0 0 0 L 1 P
P MM0PP
NM-a n -a n -1 -a n - 2 L -a QP 1 NM1QP
c = [bn – anb0, bn–1 – an –1 b0, K, b1 – a1b0]; d = b0
The matrix F in Eqns (6.7) has a very special structure—the coefficients of the denominator of the trans-
fer function preceded by minus signs form a string along the bottom row of the matrix. The rest of the matrix
is zero except for the ‘superdiagonal’ terms which are all unity. A matrix with this structure is said to be in
companion form. We call the state variable model (6.7) the first companion form1 state model for the trans-
fer function (6.5); another companion form follows.
Second Companion Form In the first companion form, the coefficients of the denominator of the transfer
function appear in one of the rows of the F matrix. There is another companion form in which the coefficients
appear in a column of the F matrix. This can be obtained from another direct realization structure shown in
Fig. 6.3. We identify the output of each unit delayer with a state variable—starting at the left and proceeding
to the right. The corresponding difference equations are
xn(k + 1) = xn–1(k) – a1(xn(k) + b0u(k)) + b1u(k)
xn–1(k + 1) = xn–2(k) – a2(xn(k) + b0u(k)) + b2u(k)
M
x2(k + 1) = x1(k) – an–1(xn(k) + b0u(k)) + bn–1u(k)
x1(k + 1) = – an(xn(k) + b0u(k)) + bnu(k)
y(k) = xn(k) + b0u(k)
u (k)
n n–1 1 0
+ + + +
+ + + y (k )
– – –
x1 (k ) x n – 1 (k )
n n–1 1 x n (k )
Fig. 6.3 An alternative direct realization structure for the system given by Eqn. (6.5)
The state and output equations, organized in vector-matrix form, are given below.
x(k + 1) = Fx(k) + gu(k)
(6.8)
y(k) = cx(k) + du(k)
1
The pair (F, g) of Eqns (6.7) is completely controllable for all values of ai’s (Refer Problem 5.36).
356 Digital Control and State Variable Methods
LM0 0 L 0 -a n OP LM
b n - a nb 0 OP
0 L 0 -a n -1
with
M1
F = M0 1 L 0 -a n - 2 ; g =
PP
b n -1 - a n -1 b 0
MM PP
MM M M M M
PP M
MN PQ
b 1 - a 1b 0
NM0 0 L 1 -a 1 PQ
c = [0 0 L 0 1]; d = b0
Comparing the F, g and c matrices of the second companion form2 with that of the first, we observe that
F, g, and c matrices of one companion form correspond to the transpose of F, c, and g matrices, respectively,
of the other.
Both the companion forms of state variable models play an important role in pole-placement design
through state feedback. This will be discussed in Chapter 7.
Jordan Canonical Form In the two canonical forms (6.7) and (6.8), the coefficients of the denominator of
the transfer function appear in one of the rows or columns of matrix F. In another of the canonical forms, the
poles of the transfer function form a string along the main diagonal of the matrix. The canonical form follows
directly from the parallel realization structure of transfer function. We shall first discuss the case where all
poles are distinct. Then we shall consider the case where multiple poles are involved.
Case I: The transfer function involves distinct poles only
Assume that z = li (i = 1, 2, ..., n) are the distinct poles of the given transfer function (6.5). Partial-fraction
expansion of the transfer function gives
Y (z) b z n + b 1 z n - 1 + L + b n -1 z + b n
= G(z) = 0n
U(z) z + a 1 z n -1 + L + a n -1 z + a n
b 1¢ z n -1 + b 2¢ z n - 2 + L + b ¢n
= b0 +
z n + a 1 z n -1 + L + a n
b 1¢ z n -1 + b ¢2 z n - 2 + L + b ¢n
= b0 + = b0 + G¢(z)
( z - l 1 )( z - l 2 ) L ( z - l n )
r1 r2 rn
= b0 + + +L+ (6.9)
z - l1 z - l2 z - ln
The coefficients ri (i = 1, 2, ..., n) are the residues of the transfer function G¢(z) at the corresponding poles
at z = li (i = 1, 2, ..., n). A parallel realization structure of the transfer function (6.9) is shown in Fig. 6.4.
Identifying the outputs of the delayers with the state variables results in the following state and output
equations:
x(k + 1) = L x(k) + gu(k)
(6.10)
y(k) = cx(k) + du(k)
LMl1 0 L 0 OP 1LM OP
0 l2 L 0 1
with L= MMM M M
PP
;g=
M
MM PP
MN
0 0 L ln
PQ 1
MN PQ
c = [r1 r2 L rn]; d = b0
2
The pair {F, c} of Eqns (6.8) is completely observable for all values of ai’s (Refer Problem 5.35).
State Variable Analysis of Digital Control Systems 357
It is observed that for this canonical state variable model, the matrix L is a diagonal matrix with the poles of
G(z) as its diagonal elements.
+
u (k ) + x1(k) + y (k )
r1
+ +
+ xn(k)
rn
+
Fig. 6.4 A parallel structure realization for the system given by Eqn. (6.9)
+ + y1 (k )
+ +
+ + +
1 1 1
LML 1 0 L 0 OP
0 L m +1 L 0
L=M PP
MM M M M
PQ
N0 0 L Ln
LMl 1 1 0 L 0O
0 l1 1 L 0 P m ´ m sub- matrix corresponding
with L =M P=
1
MM M M M M P to eigenvalue l of multiplicity m
P 1
N0 0 0 L l Q
1
Systems that consist of an interconnection of a discrete-time system and a continuous-time system are
frequently encountered. An example of particular interest occurs when a digital computer is used to control
a continuous-time plant. Whenever such interconnections exist, there must be some type of interface system
that takes care of the communication between the discrete-time and continuous-time systems. In the system
of Fig. 6.1, the interface function is performed by D/A and A/D converters.
Simple models of the interface actions of D/A and A/D converters have been developed in Chapter 2. A
brief review is in order here.
A simple model of A/D converter is shown in Fig. 6.6. A continuous-time function f(t), t ³ 0, is the input,
and the sequence of real numbers f(k), k = 0, 1, 2, ..., is the output; the following relation holds between input
and output:
f (k) = f (t = kT ); T is the time interval between samples (6.13a)
A simple model of D/A converter is shown in Fig. 6.7. A sequence of numbers f(k), k = 0, 1, 2, ..., is the
input, and the continuous-time function f +(t), t ³ 0, is the output; the following relation holds between input
and output:
f +(t) = f(k); kT £ t < (k + 1)T (6.13b)
f (k) f + ( t)
Zero-order hold
0 1 2 3 k t
Fig. 6.7 A model of a D/A converter
Figure 6.8 illustrates a typical example of an interconnection of discrete-time and continuous-time systems.
In order to analyse such a system, it is often convenient to represent the continuous-time system together
with the zero-order hold (ZOH); and the sampler by an equivalent discrete-time system.
We assume that the continuous-time system of Fig. 6.8 is a linear system with state variable model
x& (t) = Ax(t) + bu+(t) (6.14a)
y(t) = cx(t) + du+(t) (6.14b)
where x(t) is n ´ 1 state vector, u+(t) is scalar input, y(t) is scalar output; A, b, c, and d are, respectively, n ´ n,
n ´ 1, 1 ´ n, and 1 ´ 1 real constant matrices.
360 Digital Control and State Variable Methods
z
x(t) = e A (t -t 0 ) x(t 0 ) + eA(t – t ) bu+(t) dt
t0
(6.15)
z
g = eA(T – s ) bds
0
With q = T – s, we get
T
z
g = eAq bdq
0
If we are interested in the value of x(t) (or y(t)) between sampling instants, we first solve for x(kT) for any
k using Eqn. (6.17), and then use Eqn. (6.16) to determine x(t) for kT £ t < (k + 1)T.
Since we have a sampler in configuration of Fig. 6.8 (refer Eqn. (6.13a)), we have from Eqn. (6.14b),
y(kT) = cx(kT) + du(kT)
State description of the equivalent discrete-time system of Fig. 6.8 is, therefore, of the form:
x(k + 1) = Fx(k) + gu(k) (6.18a)
y(k) = cx(k) + du(k) (6.18b)
where F = eAT (6.18c)
T
z
g = eAq bdq
0
(6.18d)
State Variable Analysis of Digital Control Systems 361
AT AT
Machine Computation of e There are several methods available for computing e . Some of these
methods have been discussed in the earlier chapter. Standard computer programs based on these methods are
available.
In the following, we present an alternative technique of computing eAT. The virtues of this technique are
its simplicity and the ease of programming.
The infinite series expansion for F = eAT is
1 2 2 1 3 3
F = eAT = I + AT + AT + A T +L
2! 3!
¥
AiT i
= å i ! ; A0 = I (6.19)
i = 0
For a finite T, this series is uniformly convergent (Section 5.7). It is, therefore, possible to evaluate F
within prescribed accuracy. If the series is truncated at i = N, then we may write the finite series sum as
N
Ai T i
F = å (6.20)
i = 0 i!
which represents the infinite series approximation. The larger the N, the better is the approximation. We
evaluate F by a series in the form
FG
F = I + AT I +
AT RS
I+
AT
I+L+
AT
I+
LM
AT
L F I OP UV IJ (6.21)
H 2 T 3 N -1 N
N H K QWK
which has better numerical properties than the direct series of powers. Starting with the innermost factor,
this nested product expansion lends itself easily to digital programming. The empirical relation giving the
number of terms, N, is
N = min {3 || AT || + 6, 100} (6.22)
where || AT || is a norm of the matrix AT. There are several different forms of matrix norms commonly used.
Any one of them may be used in Eqn. (6.22). Two forms of matrix norms are defined in Section 5.2.
The relation (6.22) assumes that no more than 100 terms are included. The series eAT will be accurate to,
at least, six significant figures.
The integral in Eqn. (6.18d) can be evaluated term by term, to give
LM F I + Aq + 1 A q
T
I OP ¥
AiT i + 1
MNz H
2 2
g= +L dq b =
K å b (6.23)
0
2! PQ i = 0 (i + 1) !
¥
AiT i
= å (i + 1) !
Tb
i = 0
F AT A 2T 2 I T b = (e AT
– I) A–1b
= I+ GH 2!
+
3!
+L JK (6.24)
The transition from Eqn. (6.23) to (6.24) is possible only for a nonsingular matrix A. For a singular A, we
may evaluate g from Eqn. (6.23) by the approximation technique described above. Since the series expan-
sion for g converges faster than that for F, it suffices to determine N for F from Eqn. (6.22) and apply the
same value for g.
362 Digital Control and State Variable Methods
Example 6.1 Figure 6.9 shows the block diagram of a digital positioning system. Defining the state
variables as
x1(t) = q (t), x2(t) = q& (t),
the state variable model of the plant becomes
x& (t) = Ax(t) + bu+(t)
y(t) = cx(t) (6.25)
with A=
0 1 LM
;b=
0 OP
; c = [1 0]
LM OP
0 -5 N 1 Q NQ
e (k) u (k ) u +(t)
r ( t) + k1z 2 + k 2z + k3 1 (t)
G h0(s)
T z (z – 1) s (s + 5)
–
= 0.1 sec ZOH
Digital Processor Plant
| lI – A | =
l -1 LM
=0
OP
0 l +5 N Q
Therefore l1 = 0, l2 = – 5
Since A is of second order, the polynomial g(l) will be of the form (refer Eqns (5.98)),
g(l) = b0 + b1l
The coefficients b0 and b1 are evaluated from the following equations:
1 = b0
e–5t = b0 – 5b1
The result is b0 = 1
b1 = 15 (1 – e–5t )
where F = eAT =
LM
1 15 (1 - e -5T ) OP
0 e -5T N Q
LM T
OP
T
bdq = MM
z 1
5 (1 - e -5q )dq
PP = LM 1
(T − 15 + 15 e −5T ) OP
g = eAq z 0
T
PP MN
5
1
5 (1 − e
−5 T
) PQ
0 MM
N z
0
e -5q dq
Q
State Variable Analysis of Digital Control Systems 363
For T = 0.1 sec,
F=
LM1 0.0787OP ; g = LM0.0043OP
N0 0.6065Q N0.0787Q
Consider now the digital processor. The input-output model of the processor is
U ( z ) k1 z 2 + k2 z + k3
=
E( z ) z( z - 1)
Direct digital realization of the processor is shown in Fig. 6.10. Taking outputs of unit delayers as state
variables, we get the following state description for the processor dynamics (refer Eqns (6.8)):
k1
k2
k3 z–1 1 z–1 1
e u
x3 x4
1
Fig. 6.10 Realization of digital processor of positioning system shown in Fig. 6.9
The processor input is derived from the reference input and the position feedback (Fig. 6.9):
e(k) = r(k) – x1(k) (6.28)
From Eqns (6.26)–(6.28), we get the following state variable model for the feedback system of Fig. 6.9.
LM x (k + 1)OP LM1-0.0043k
1 1 0.0787 0 0.0043 OP LM x (k) OP LM0.0043k OP
1 1
MN x (k + 1)PQ MN -(k-k+ k )
3
4 2
3
1
0
0
0
1
0
1
PQ 3 k3
MN x (k )PQ MN k + k PQ
4 2 1
(6.29)
LM x (k) OP
1
x (k )
0] M
MM x (k )PPP
2
y(k) = [1 0 0
3
N x (k )Q
4
364 Digital Control and State Variable Methods
Consider a state equation of a single-input system which includes delay in control action:
x& (t) = Ax(t) + bu+(t – tD) (6.30)
+
where x is n ´ 1 state vector, u is scalar input, tD is the dead-time, and A and b are respectively n ´ n and
n ´ 1 real constant matrices.
The solution of Eqn. (6.30) with t0 as initial time is
t
x(t) = e
A(t -t 0 )
z
x(t0) + e A( t - t ) bu + (t - t D )dt
t0
With s = kT + T – t, we get
T
z
x(kT + T) = eAT x(kT) + eAs bu+(kT + T – tD – s ) ds
0
(6.31)
z
x(kT + T) = eAT x(kT) + eAs bu+(kT + T – NT – DT – s ) ds
0
We introduce a parameter m such that
m=1–D (6.32b)
Then
T
z
x(kT + T ) = eAT x(kT ) + eAs bu+(kT – NT + mT – s )ds
0
(6.33)
Since we use a ZOH, u+ is piecewise constant. The nature of the integral in Eqn. (6.33), with respect to
variable s, becomes clear from the sketch of the piecewise constant input u+ over a segment of time axis near
t = kT – NT (Fig. 6.11). The integral runs for s from 0 to T—which corresponds to t from kT – NT + mT
backward to kT – NT – T + mT. Over this period, the control first takes on the value u(kT – NT ) and then the
value u(kT – NT – T ). Therefore we can break the integral in Eqn. (6.33) into two parts as follows:
LM e
mT OP LM e
T OP
MN z MN z
As As
x(kT + T) = eAT x(kT) + bds u(kT – NT) + bds u(kT – NT – T)
0 PQ mT PQ
= Fx(kT) + g1u(kT – NT – T) + g2u(kT – NT) (6.34a)
mT
g2 = z0
eAs bds (6.34d)
u + (t ) s = mT
s=T s=0
u(kT – NT )
u(kT – NT – T )
t
kT – NT – T kT – NT + T
kT – NT
kT – NT – T + mT kT – NT + mT
Fig. 6.11
Setting q = s – mT in Eqn. (6.34c), we get
DT DT
g1 = z
0
eA(mT + q) bdq = eAmT z
0
eAq bdq (6.34e)
The matrices/vectors F, g1 and g2 can be evaluated by series truncation method discussed in the earlier
section.
Equation (6.34a) can be expressed in the standard state variable format. To do this, we consider first the
case of N = 0. For this case, Eqn. (6.34a) becomes
x(k + 1) = Fx(k) + g1u(k – 1) + g2u(k)
We must eliminate u(k – 1) from the right-hand side, which we do by defining a new state
xn +1(k) = u(k – 1)
The augmented state equation is given by
LM x(k + 1) OP LM
=
F g1 OP LM x(k) OP + LMg OP u(k)
2
(6.35)
Nx n +1 ( k + 1)Q N0 0 Q N x (k )Q N 1 Q
n +1
n+2 n+2
MM M PP = MM M M M M MP M
P M M PP + MM M PP u(k) (6.36)
MM x (k + 1) PP MM 0
n+ N 0 0 0 L 1P M x
P0Q MN x ((kk))PPQ MMN10PPQ
n +N
N x (k + 1)Q N 0
n + N +1 0 0 0 L n + N +1
Example 6.2 In the following, we reconsider the tank fluid temperature control system discussed in
Example 3.3 (see Fig. 3.17). The differential equation governing the tank fluid temperature was found to be
x&1 (t) = – x1(t) + u(t – 1.5) (6.37)
where
x1(t) = q(t) = tank fluid temperature
u(t) = qi(t) = temperature of the incoming fluid (control temperature)
tD = 1.5 sec
Assume that the system is sampled with period T = 1 sec. From Eqn. (6.32), we have
N = 1, D = 0.5, m = 0.5
Equations (6.34b), (6.34d), and (6.34e) give
F = e–1 = 0.3679
0 .5
g2 = z
0
e–s ds = 1 – e–0.5 = 0.3935
0 .5
g1 = e–0.5 z
0
e–q dq = e–0.5 – e–1 = 0.2387
The discrete-time model of the tank fluid temperature control system becomes (refer Eqn. (6.34a))
x1(k + 1) = 0.3679 x1(k) + 0.2387 u(k – 2) + 0.3935 u(k – 1) (6.38)
Let us introduce two new states, defined below.
x2(k) = u(k – 2)
x3(k) = u(k – 1)
The augmented state equation becomes
x(k + 1) = Fx(k) + gu(k)
(6.39)
y(k) = cx(k)
LM0.3679 0.2387 0.3935 OP 0 LM OP
with F= 0 0 1 ;g= 0
MM 0 PP MM PP
N 0 0 Q1 NQ
c = [1 0 0]
State Variable Analysis of Digital Control Systems 367
From Eqns (6.39), the transfer function model is given as follows:
Y (z)
G(z) = = c(zI – F)–1 g
U(z)
LMz -0.3679 -0.2387 -0.3935 OP -1
LM0OP
-1 MM0PP
= [1 0 0]
MM 00 z
PP
N 0 z Q N1Q
z2 LM 0.2387z 0.2387 + 0.3935z OP L0O
= 2
1
z ( z - 0.3679)
[1 0 0] 0 MM z( z - 0.3679) z - 0.3679 PP MM0PP
0 N 0 z( z - 0.3679) Q MN1PQ
0.2387 + 0.3935z 0.3935(z + 0.6066)
= = (6.40)
z 2 ( z - 0.3679) z 2 ( z - 0.3679)
Note that the same result was obtained earlier in Example 3.3.
where D Z [x(k)]
X(z) =
Solving for X(z), we get
X(z) = (zI – F)–1zx(0)
The state vector x(k) can be obtained by inverse transforming X(z):
x(k) = Z –1[(zI – F)–1z] x(0)
Comparing this equation with Eqn. (6.45b), we get
Fk = f (k) = Z –1[(zI – F)–1z] (6.47)
LM 4 / 3 + -1/ 3 5/3
+
-5 / 3 OP
z + 0.2 z + 0.8 z + 0.2 z + 0.8
=M
MN z-0+.80/.32 + z0+.8/03.8 -1/ 3 4/3 PP
+
z + 0.2 z + 0.8 Q
State Variable Analysis of Digital Control Systems 369
k –1 –1
Therefore f (k) = F = Z [(zI – F) z]
LM 4
3
z
- 13
z 5
3
z
- 53
z OP
–1 z + 0.2 z + 0.8 z + 0.2 z + 0.8
=Z MM -0.8 z
+ 3 0.8 z -1 z
+ 3 4 z PP
N 3
z + 0.2 z + 0.8 3
z + 0.2 z + 0.8 Q
=
LM 4
3 ( -0.2 )
k
- 1
3 ( -0.8)
k 5
3 ( -0.2 )
k
- 5
3 ( -0.8)
k
OP
MN -0.8
3 ( -0.2)
k
+ 0.8
3 ( -0.8)
k -1
3 ( -0.2 )
k
+ 4
3 ( -0.8)
k
PQ
Evaluation Using Similarity Transformation Suppose that F is an n ´ n non-diagonal matrix with distinct
eigenvalues l1, l2, ..., ln. We define the diagonal matrix
0 L 0 LMl 1 OP
l2 L 0 0
L=M PP
M M MM M PQ
0 L ln N0
F and L are similar matrices; there exists a nonsingular matrix P such that (refer Eqns (5.22))
L = P–1 FP
Now P F P = P–1 [FF L F]P
–1 k
LMl k
1 0 L 0 OP
lk2
=M
0 L 0P
Lk
MM M M M P
P
0 L kn MN 0 l PQ
The state transition matrix Fk of matrix F with distinct eigenvalues l1, l2, ..., ln may, therefore, be evaluated
using the following relation:
LMl k
1 0 L 0 OP
l k2
=P M
0 L 0P
Fk = P L k P–1 P –1
(6.48)
MM M M M P
P
0 L kn MN 0 l PQ
where P is a transformation matrix that transforms F into the diagonal form (For the general case where
matrix F has multiple eigenvalues, refer [105]; also refer Review Example 6.5 given at the end of this
chapter).
F=
LM 0 1OP
N-2 -3Q
The characteristic equation of the system is
|lI – F| = l2 + 3l + 2 = 0
which yields l1 = – 1 and l2 = – 2 as the eigenvalues of F.
370 Digital Control and State Variable Methods
Since the matrix F is in companion form, the eigenvectors3, and hence the transformation matrix, can
easily be obtained (refer Problem 5.21).
P=
1 1
=
LMOP LM OP
1 1
l1 l 2 N Q N Q
-1 -2
gives the diagonalized matrix
L = P–1 FP =
-1 0 LM OP
0 -2 N Q
From Eqn. (6.48), we may write
Fk
L(-1) 0 OP P
=P M
k
–1
k
N 0 (-2) Q
L 1 1OP LM(-1) 0 OP LM 2 1OP
=M
k
L 2(-1) - (-2)
=M
k
( -1) - ( -2 ) O
k k k
Evaluation Using Cayley-Hamilton Technique The Cayley-Hamilton technique has already been explained
in the earlier chapter. We illustrate the use of this technique for evaluation of Fk by an example.
F=
LM 0 1OP
N-1 -2Q
Let us evaluate f(F) = Fk.
Matrix F has two eigenvalues at l1 = l2 = –1.
Since F is of second order, the polynomial g(l) will be of the form (refer Eqns (5.98)):
g(l) = b0 + b1l
The coefficients b0 and b1 are evaluated from the following equations:
f (–1) = (–1)k = b0 – b1
d d
f (l ) = k(–1)k –1 = g (l ) = b1
dl l = -1 dl l = -1
= (1 – k) (–1)k
LM1 0OP – k(–1) LM 0 1OP k
N 0 1Q N-1 -2Q
= (–1)k
LM(1 - k) -k OP
N k (1 + k)Q
3
Refer Section 5.6 for methods of determination of eigenvectors for a given general matrix F.
State Variable Analysis of Digital Control Systems 371
State Transition Equation The solution of the non-homogeneous state difference equation (6.41) is
given by Eqn. (6.44). In terms of the state transition matrix f (k), Eqn. (6.44) can be written in the form
k -1
x(k) = f (k) x(0) + å f (k – 1 – i) gu(i) (6.49)
i = 0
This equation is called the state transition equation; it describes the change of state relative to the initial
conditions x(0) and the input u(k).
x1(0) = 1 = x2(0)
y(k) = x1(k)
Find y(k) for k ³ 1.
Solution For the given state equation, we have
F=
LM 0 1OP
N-2 -3Q
For this F, f (k) = Fk was evaluated in Example 6.4:
f (k) = Fk =
LM 2(-1) k
- ( -2 ) k ( -1) k - ( -2 ) k OP
k k k k
N-2(-1) + 2 ( -2 ) -( -1) + 2 ( -2 ) Q
k -1
The state x(k) = Fk x(0) + å Fk – 1 – i gu(i)
i = 0
With
L0O L1O
g = M P , x(0) = M P , and u(k)= (–1)k,
N1Q N1Q
we get
k -1
y(k) = x1(k) = 3(–1)k – 2(– 2)k + å [(–1)k – 1 – i – (–2)k – 1 – i] (–1)i
i = 0
k -1
1 i
= 3(–1)k – 2(–2)k + k(– 1)k – 1 – (–2)k – 1 å
i = 0
ch2
Since4
1 k
k -1
å 1 i
ch =
1- ch
2
=–2[ 1 k
ch - 1] , we have
2 1 - 12 2
i = 0
k
1 - ak +1
4
å aj =
1- a
; a ¹ 1.
j = 0
372 Digital Control and State Variable Methods
In this section, we study the controllability and observability properties of linear time-invariant systems
described by state variable model of the following form:
x(k + 1) = Fx(k) + gu(k) (6.50a)
y(k) = cx(k) + du(k) (6.50b)
where F, g, c and d are respectively n ´ n, n ´ 1, 1 ´ n, and 1 ´ 1 matrices. x is n ´ 1 state vector, and y and
u are, respectively, output and input variables.
6.6.1 Controllability
For the linear system given by Eqns (6.50), if there exists an input u(k); k Î [0, N – 1] with N a finite positive
integer, which transfers the initial state x(0) =D x0 to the state x1 at k = N, the state x0 is said to be controllable.
If all initial states are controllable, the system is said to be completely controllable or simply controllable.
Otherwise, the system is said to be uncontrollable.
The following theorem gives a simple controllability test.
Theorem 6.1 The necessary and sufficient condition for the system (6.50) to be completely controllable is
that the n ´ n controllability matrix,
D [g
U = Fg F2g L Fn – 1 g] (6.51)
has rank equal to n, i.e., r (U) = n.
Proof Solution of Eqn. (6.50a) is
k -1
x(k) = Fkx(0) + å Fk –1– i g u(i)
i =0
D x 0 and x(n) D x1, we obtain
Letting x(0) = =
x1 – Fnx0 = Fn – 1g u(0) + Fn – 2g u(1) + L + g u(n – 1)
LM u(n - 1) OP
u(n - 2)
or x1 – Fnx0 = [g Fg L Fn – 1 g] M
MM M PPP (6.52)
N u( 0 ) Q
Since g is an n ´ 1 matrix, we find that each of the matrices g, Fg, ..., Fn – 1 g is an n ´ 1 matrix. Therefore
U = [g Fg L Fn – 1 g]
is an n ´ n matrix. If the rank of U is n, then for arbitrary states x0 and x1, there exists a sequence of
unconstrained control signals u(0), u(1), ..., u(n – 1) that satisfies Eqn. (6.52). Hence, the condition that the
rank of the controllability matrix is n gives a sufficient condition for complete controllability.
To prove that the condition r (U) = n is also a necessary condition for complete controllability, we
assume that
r[g Fg L F n –1 g] < n
The matrix U is therefore singular and for arbitrary x0 and x1, a solution {u(0), u(1), ..., u(n – 1)} satisfy-
ing Eqn. (6.52) does not exist.
Let us attempt a solution of the form {u(0), u(1), ..., u(N – 1)}; N > n. This will amount to adding
columns Fng, Fn+1g, ..., FN–1 g in the U matrix. But by Cayley-Hamilton theorem, f(F) = Fj; j ³ n is a linear
combination of F n–1, L, F 1, F0 (refer Eqn. (5.98d)) and therefore columns F ng, F n+1g, ..., FN–1g add no
State Variable Analysis of Digital Control Systems 373
new rank. Thus, if a state cannot be transferred to some other state in n sampling intervals, no matter
how long the input sequence {u(0), u(1), ..., u(N – 1)}; N > n is, it still cannot be achieved. Consequently,
we find that the rank condition given by Eqn. (6.51) is necessary and sufficient condition for complete
controllability.
6.6.2 Observability
For the linear system given by Eqns (6.50), if the knowledge of the input u(k); k Î [0, N – 1] and the output
D
y(k); k Î [0, N – 1] with N a finite positive integer, suffices to determine the state x(0) = x0, the state x0 is
said to be observable. If all initial conditions are observable, the system is said to be completely observable,
or simply observable. Otherwise, the system is said to be unobservable.
The following theorem gives a simple observability test.
Theorem 6.2 The necessary and sufficient condition for the system (6.50) to be completely observable is
that the n × n observability matrix
LM c OP
cF
M
V = M cF 2
PP (6.53)
MM M PP
MNcF
n -1 PQ
has rank equal to n, i.e., r (V) = n.
Proof The solution of Eqns (6.50) is
LM cF
k -1
k -1 - i
OP
y(k) = cFkx(0) +
MN å
i = 0
g u(i ) + du(k)
PQ
This gives y(0) = cx(0) + du(0)
y(1) = cFx(0) + cg u(0) + du(1)
M
y(n – 1) = cFn – 1x(0) + cFn – 2g u(0) + cFn – 3g u(1) + L + cg u(n – 2) + du(n – 1)
From these equations, we may write
LM y(0) - du(0) OP LM c OP
MM y(1) - cg u(0) - du(1)
= PP MM cFcF
2
PP x 0
= V × x0
MN y(n - 1) - cF n-2
M
PQ MM M PP n×n n ×1
5
Refer Gopal [105] for the case of multiple eigenvalues.
State Variable Analysis of Digital Control Systems 375
6.6.5 Loss of Controllability and Observability due to Sampling
Sampling of a continuous-time system gives a discrete-time system with system matrices that depend on the
sampling period. How will that influence the controllability and observability of the sampled system? To get
a controllable sampled system, it is necessary that the continuous-time system also be controllable, because
the allowable control signals for the sampled system—piecewise constant signals—are a subset of allowable
control signals for the continuous-time system. However, it may happen that the controllability is lost for
some sampling periods.
The conditions for unobservability are more restricted in the continuous-time case because the output has to
be zero over a time interval, while the sampled system output has to be zero only at the sampling instants. This
means that the continuous output may oscillate between the sampling times and be zero at the sampling instants.
This condition is sometimes called hidden oscillations. The sampled system can thus be unobservable—even if
the corresponding continuous-time system is observable.
The harmonic oscillator can be used to illustrate the preceding discussion. The transfer function model of
the oscillator system is
Y ( s) w2
= 2 (6.58)
U ( s) s + w2
From this model, we have
y + w2y = w2u
&&
1
Define y& x1 = y; x2 =
w
This gives the following state variable representation of the oscillator system:
LM x& OP = LM 0 w OP LM x OP + LM 0 OP u
1 1
N x& Q N-w 0 Q N x Q Nw Q
2 2
(6.59)
Lx O
y = [1 0] M P
1
Nx Q 2
The discrete-time state variable representation of the system is obtained as follows. Noting that
A=
LM 0 w OP , b = LM 0 OP
N-w 0 Q Nw Q
we have
GH MNw s Q K
t=T
LM s w OP
=L –1
MM s
2
+ w2 s + w2
2
PP =
LM cos wT sin wT OP
-w s N- sin wT cos wT Q
Ns 2
+ w2 s + w2
2
Q t =T
and
LM e
T OP LM F cos wq
T
sin wq IJ dq OP LM 0 OP = LM 1 - cos w T OP
MNz MN z GH - sin wq
Aq
g= dq b =
0 PQ 0
cos wq K PQ N w Q N sin wT Q
376 Digital Control and State Variable Methods
Hence, the discrete-time state variable representation of the oscillator system becomes
LM
x1 ( k + 1)OP LM
=
cos w T sin w T x1 (k ) OP LM+
OP LM
1 - cos w T
u(k)
OP
N
x 2 (k + 1) Q N QN
- sin w T cos w T x 2 ( k ) Q N
sin w T Q (6.60)
y(k) = [1
L x (k) OP
0] M
1
N x ( k )Q
2
The determinants of the controllability and observability matrices are
| U| = [g Fg] = – 2 sinwT (1 – coswT )
| V| =
LM c OP = sinwT
NcFQ
Both controllability and observability are lost for wT = np, n = 1, 2, ... (i.e., when the sampling interval is
half the period of oscillation of the harmonic oscillator, or an integer multiple of that period), although the
corresponding continuous-time system given by Eqns (6.59), is both controllable and observable.
Loss of controllability and/or observability due to sampling occurs only when the continuous-time system
has oscillatory modes and the sampling interval is half the period of oscillation of an oscillatory mode, or an
integer multiple of that period. This implies that controllability and observability properties of a continuous-
time system, are preserved after introduction of sampling if, and only if, for every eigenvalue of the
characteristic equation, the relation
Re li = Re lj
2np (6.61)
implies Im (li – lj) ¹
T
where T is the sampling period and n = ± 1, ± 2, ... .
We know that controllability and/or observability is lost when the transfer function corresponding to a
state model has common poles and zeros. The poles and zeros are functions of sampling interval. This
implies that if the choice of sampling interval does not satisfy the condition given by (6.61), pole-zero
cancellation will occur in passing from the continuous-time to the discrete-time case; the pole-zero cancella-
tion will not take place if the continuous-time system does not contain complex poles.
It is very unlikely that the sampling interval chosen for a plant control system, would be precisely the one
resulting in loss of controllability and/or observability. In fact the rules of thumb, for the choice of sampling
interval given in Section 2.13, imply a sampling interval of about one-tenth of the period of oscillation of an
oscillatory mode, and not just half.
The state variable model of the multi-input, multi-output (MIMO) system takes the following form (refer
Eqns (2.14)–(2.15)):
x(k + 1) = Fx(k) + Gu(k); x(0) =D x0 (6.62a)
y(k) = Cx(k) + Du(k) (6.62b)
F, G, C, and D are, respectively, n ´ n, n ´ p, q ´ n and q ´ p constant matrices, x is n ´ 1 state vector,
u is p ´ 1 input vector, and y is q ´ 1 output vector.
Many of the analysis results developed in earlier sections of this chapter for SISO systems, have obvious
extensions for the system (6.62).
The solution of the state equation (6.62a) is given by (refer Eqn. (6.44))
State Variable Analysis of Digital Control Systems 377
k -1
x(k) = Fkx(0) + å F k -1- i Gu(i ) (6.63a)
i = 0
The output
LM k -1 O
k
y(k) = C F x(0) + å F k -1- i Gu(i) P + Du(k) (6.63b)
MN i = 0 PQ
In the transform domain, the input-output behaviour of the system (6.62) is determined entirely by the
transfer function matrix (refer Eqns (6.3))
G (z) = C(zI – F)–1 G + D (6.64a)
The output Y( z ) = G( z) U( z ) (6.64b)
q × 1 q × p p × 1
The necessary and sufficient condition for the system (6.62) to be completely controllable is that the
n ´ np matrix
D [G FG
U= F2G L Fn – 1 G] (6.65)
has rank equal to n.
The necessary and sufficient condition for the system (6.62) to be completely observable is that the nq ´ n
matrix
C LM OP
CF
V= M D
MM M PP (6.66)
N CF n -1 PQ
has rank equal to n.
A MIMO system with distinct eigenvalues6 l1, l2, ..., ln has the following Jordan canonical state model.
x(k + 1) = L x(k) + Gu(k)
(6.67)
y(k) = Cx(k) + Du(k)
with
LMl 1 0 L 0 OP LMg 11 g12 L g1 p OP Lc 11 c12 L c1n OP
L=M
0
MM M
l2 L 0
P ;G= M
g
MM M
21 g22 L g2 p
M P
P ; C = MM M M M PP
M M P M
N0 0 L l Q
n
P Ng n1 gn 2 L g Q
np
P MNc q1 cq 2 L cqn Q
The system (6.67) is completely controllable if, and only if, none of the rows of G matrix is a zero row,
and (6.67) is completely observable if, and only if, none of the columns of C matrix is a zero column.
Example 6.7 The scheme of Fig. 5.23 (refer Example 5.21) describes a simple concentration control
process. Mathematical model of the plant, given by Eqns (5.133), is reproduced below:
x& = Ax + Bu
(6.68)
y = Cx
6
Refer Gopal [105] for the case of multiple eigenvalues.
378 Digital Control and State Variable Methods
with A=
LM- 0.01 0
;B=
OP 1 1 LM
;C=
0.01 0 OP LM OP
N 0 - 0.02 Q
- 0.004 - 0.002 N 0 1 Q N Q
The state, input, and output variables are deviations from steady-state values:
x1 = incremental volume of fluid in the tank (litres)
x2 = incremental outgoing concentration (g-moles/litre)
u1 = incremental feed 1 (litres/sec)
u2 = incremental feed 2 (litres/sec)
y1 = incremental outflow (litres/sec)
y2 = incremental outgoing concentration (g-moles/litre)
Matrix A in Eqns (6.68) is in diagonal form; none of the rows of B matrix is a zero row, and none of the
columns of C matrix is a zero column. The state model (6.68) is, therefore, completely controllable and
observable.
With initial values of x1 and x2 equal to zero at t = 0, a step of 2 litres/sec in feed 1 results in
LM et OP
MNz
A( t - t )
y(t) = C Bu(t ) dt
0 PQ
with
LM e
eAt =
- 0.01t
0 OP
- 0 .02 t
N0 e Q
and
L2O
u(t ) = M P
N0Q
Solving for y(t), we get
LM 2e t
OP
y(t) = C MM t
z
0
-0 .01( t - t )
dt
PP = C LM (1 - e 2
0.01
- 0.01t
) OP
- 0.02 t
MM- z 0.008e -0.02( t - t )
dt P N- 0.4 (1 - e )Q
N0 PQ
Therefore y1(t) = 2(1 – e–0.01t ) (6.69a)
y2(t) = – 0.4(1 – e–0.02t ) (6.69b)
Suppose that the plant (6.68) forms part of a process commanded by a process control computer. As
a result, the valve settings change at discrete instants only and remain constant in between. Assuming
that these instants are separated by time period T = 5 sec, we derive the discrete-time description of the
plant.
x(k + 1) = Fx(k) + Gu(k) (6.70a)
y(k) = Cx(k) (6.70b)
F = eA T =
LMe - 0.01T
0 OP L
0.9512 0 OP
Q MN
- 0.02 T
= (6.70c)
N0 e 0 0.9048 Q
State Variable Analysis of Digital Control Systems 379
LM e T T
OP
T
Bdq = MM
z - 0 .01q
dq z e - 0.01q dq
PP = LM 4.88 4.88 OP
G= z eAq 0
MM- 0.004z e
T
0
T
N- 0.019 0.0095 Q (6.70d)
0
N 0
- 0.02q
dq 0.002 e z
0
- 0.02q
dq P
PQ
Matrix F in Eqns (6.70) is in diagonal form; none of the rows of G matrix is a zero row, and none of the
columns of C matrix is a zero column. The state model (6.70) is, therefore, completely controllable and
observable.
With initial values of x1 and x2 equal to zero at k = 0, a step of 2 litres/sec in feed 1 results in
LM Fk -1
k - 1- i
OP
y(k) = C
MN å
t = 0
Gu(i )
PQ
with Fk =
LM(0.9512) k
0 OP and u(i) =
LM2OP
N 0 (0.9048) k Q N0Q
Solving for y(k), we get
k -1
y1(k) = 0.01x1(k) = 0.01 å 9.76(0.9512)k – 1 – i
i = 0
Comparison of y1(k) and y2(k) with y1(t) and y2(t), shows that the two sets of responses match exactly at
the sampling instants.
Review Examples
Review Example 6.1 Give three different canonical state variable models corresponding to the transfer
function
4 z 3 - 12 z 2 + 13z - 7
G(z) =
( z - 1) 2 ( z - 2)
380 Digital Control and State Variable Methods
Solution The given transfer function is
Y (z ) 4 z 3 - 12z 2 + 13z - 7 b 0 z 3 + b 1 z 2 + b 2 z + b 3
G(z) = = = 3
U ( z) z 3 - 4 z 2 + 5z - 2 z + a 1z 2 + a 2 z + a 3
The controllable canonical state model (first companion form) follows directly from Eqns (6.5) and (6.7):
LM x (k + 1) OP LM0 1
1 0 OP LM x (k) OP LM0OP
1
MM x (k + 1)PP = M0 0
2 P4P MM xx ((kk))PP + MM01PP u(k)
1 2
N x (k + 1)Q MN2 -5
3 QN Q NQ
3
L x (k) O
1
y(k) = [1 – 7 4] MM x (k )PP + 4u(k)
2
MN x (k )PQ
3
The observable canonical state model (second companion form) follows directly from Eqns (6.5) and (6.8):
LM x (k + 1) OP LM0
1 0 2 OP LM x (k) OP LM 1 OP
1
MM x (k + 1)PP = MM1
2 0 -5 P M x (k)P + M-7 P u(k)
2
N x (k + 1)Q N0
3 1 4 PQ MN x ( k )PQ MN 4 PQ
3
LM x (k) OP
1
y(k) = [0 0 1] M x (k )P + 4u(k)
2
MN x (k )PQ
3
The state variable model in Jordan canonical form follows from Eqns (6.11) and (6.12):
Y (z) 4 z 3 - 12 z 2 + 13z - 7 4z 2 - 7z + 1
= G(z) = = 4 +
U (z) z 3 - 4 z 2 + 5z - 2 ( z - 1) 2 ( z - 2)
2 1 3
=4+ 2
+ +
( z - 1) ( z - 1) ( z - 2)
LM x$ (k + 1) OP LM1
1 1 0 OP LM x$ (k) OP LM0OP
1
N x (k + 1)Q N0
3 0 2 QN Q NQ
3
LM x$ (k) OP
1
y(k) = [2 1 3] M x$ ( k )P + 4u(k)
2
NM x$ (k)QP
3
Review Example 6.2 Prove that a discrete-time system obtained by zero-order-hold sampling of an
asymptotically stable continuous-time system is also asymptotically stable.
State Variable Analysis of Digital Control Systems 381
Solution Consider an asymptotically stable continuous-time system
x& (t) = Ax(t) (6.72)
We assume for simplicity, that the eigenvalues l1, l2, ..., ln of matrix A are all distinct. Let P be a
transformation matrix such that
LMl 1 0 L 0OP
0 l2 L 0
P–1 AP = L = M P
MM M M M P
P
N0 0 L l Q n
The zero-order-hold sampling of the continuous-time system (6.72) results in a discrete-time system
x(k + 1) = Fx(k)
Review Example 6.3 Consider a unity feedback system with the plant
x& = Ax + bu
y = cx
where A=
LM0 1 OP
;b=
0
; c = [1
LM OP 0]
N0 -2 Q K N Q
(a) Find the range of values of K for which the closed-loop system is stable.
382 Digital Control and State Variable Methods
(b) Introduce now a sampler and zero-order hold in the forward path of the closed-loop system. Show
that sampling has a destabilizing effect on the stability of the closed-loop system. To establish this
result, you may find the range of values of K for which the closed-loop digital system is stable when
(i) T = 0.4 sec, and (ii) T = 3 sec; and then compare with that obtained in (a) above.
Solution Consider the feedback system of Fig. 6.12a. Substituting
u = r – y = r – x1
in the plant model, we get the following state variable description of the closed-loop system:
LM x& OP = LM 0
1 x1
+
01
r
OP LM OP LM OP
2 N x& Q N- K
-2 x 2 K QN Q N Q
The characteristic equation of the closed-loop system is
l2 + 2l + K = 0
The closed-loop system is stable for all values of K > 0.
Figure 6.12b shows a block diagram of the closed-loop digital system. The discrete-time description of
the plant is obtained as follows:
x(k + 1) = Fx(k) + g u(k)
y(k) = cx(k)
T
where F = eAT; and g = eAq b dq z
0
r + u x y = x1
x = Ax + b u c
–
Plant
(a)
r + e u y = x1
ZOH Plant
T
–
(b)
Fig. 6.12
FLs LM 1 1 OP
Now e At
=L –1
[( sI - A ) ] = L -1 –1
GH MN0
-1OP IJ = L
-1
–1
MM s s( s + 2 )
PP
s + 2Q K 1
N0 s+2 Q
=
LM1 1
2
(1 - e -2 t ) OP
-2 t
N0 e Q
State Variable Analysis of Digital Control Systems 383
Therefore F = eAT =
LM1 1
2
(1 - e -2 T ) OP
-2 T
N0 e Q
T LM K (1 - e -2q
)OP LMT - + 1 1 -2 T
e OP
g= z
0
MN 2 Ke - 2q PQ dq =
1
2 K
N 1- e
2 2
- 2T
Q
The state variable description of the closed-loop digital system, becomes
x(k + 1) =
LM1 - 1
2
K (T - 21 + 12 e -2 T ) 1
2
(1 - e -2 T ) OP x(k) + 1
K
LMT - + 1
2
1 - 2T
2
e OP r(k)
MN - 1
2
K (1 - e -2 T ) e -2 T
PQ 2
N 1-e - 2T
Q
The characteristic equation is given by
l2 + [ - (1 + e - 2 T ) + 1
2 K (T - 12 + 12 e - 2 T )] l + e –2T + 1
2 K( 12 – 1
2 e–2T – Te–2T ) = 0
Case I: T = 0.4 sec
For this value of sampling period, the characteristic polynomial becomes
D(l) = l2 + (0.062K – 1.449)l + 0.449 + 0.048K
Applying the Jury stability test (refer Eqns (2.73)–(2.75)), we find that the system is stable if the following
conditions are satisfied:
D(1) = 1 + 0.062K – 1.449 + 0.449 + 0.048K > 0
D(– 1) = 1 – 0.062K + 1.449 + 0.449 + 0.048K > 0
| 0.449 + 0.048K | < 1
These conditions are satisfied for 0 < K < 11.479.
Case II: T = 3 sec
For this value of the sampling period, the characteristic polynomial becomes
D(l) = l2 + (1.2506K – 1.0025)l + 0.0025 + 0.2457K
The system is found to be stable for 0 < K < 1.995.
Thus, the system which is stable for all K > 0 when T = 0 (continuous-time system), becomes unstable for
K > 11.479 when T = 0.4 sec. When T is increased to 3 sec, it becomes unstable for K > 1.995. It means that
increasing the sampling period (or decreasing the sampling rate) reduces the margin of stability.
Review Example 6.4 A closed-loop computer control system is shown in Fig. 6.13. The digital controller
is described by the difference equation
e2(k + 1) + ae2(k) = be1(k)
The state variable model of the plant is given below:
x& = Ax + bu
y = cx
with A=
LM0 1OP ; b = LM0OP ; c = [1 0]
N0 - 1Q N1Q
384 Digital Control and State Variable Methods
Obtain discrete-time state description for the closed-loop system.
Fig. 6.13
Solution Given A=
LM0 1OP
N0 - 1Q
LM 1 1 OP L OP
1 - e- t
eAt = L –1[(s I – A) –1] = L –1 MM s s(s +1 1) PP = MN10 e- t Q
N0 s +1 Q
The discretized state equation of the plant is
x(k + 1) = Fx(k) + gu(k) (6.73a)
where F = eA T =
LM1 1 - e- T OP
N0 e- T Q
LM (1 - e T OP
Mz
-q
) dq
T
z
g = eAq b dq = M 0
T
PP = LMT - 1 + e OP -T
-T
(6.73b)
0 MM z e -q
dq PP N 1 - e Q
N 0 Q
For T = 1 sec, we have
F=
LM1 0.632OP ; g = LM0.368OP (6.73c)
N0 0.368Q N0.632Q
Consider now, the feedback system of Fig. 6.13 with the plant described by the equation (refer Eqns 6.73)):
LM x ( k + 1) OP = LM 1
1 0.632 OP L x (k ) O + LM0.368OP e (k)
1
N x (k + 1) Q N 0
2 0.368 Q MN x ( k )PQ N0.632Q
2
2 (6.74)
e2(k) may be taken as the third state variable x3(k) whose dynamics are given by
x3(k + 1) = – a x3(k) + b e1(k) = – a x3(k) + b (r(k) – x1(k)) = – b x1(k) – a x3(k) + b r(k) (6.75)
From Eqns (6.74)–(6.75), we get the following state variable model for the closed-loop digital system of
Fig. 6.13:
x1 (k + 1)LM OP
1 0.632 0.368 x1 (k ) LM 0 OP LM OP LM OP
x 2 (k + 1) = 0 0.368 0.632 x 2 ( k ) + 0 r(k)
MM PP PP
MM PP MM MM PP
x 3 (k + 1) N -b 0 Q N
- a x3 ( k ) b QN Q NQ
State Variable Analysis of Digital Control Systems 385
LM x (k) OP
1
y(k) = [1 0 0] M x (k )P
2
MN x (k )PQ
3
LMl 1 1 0 L 0 OP
l1 1 L 0
L
MM 0M M M M
PP
=
n ´ n MM 0 0 0 L 1
PP
MN 0 0 0 L l1 PQ
Compute L k using the Cayley-Hamilton technique.
Solution Equations (5.98) outline the procedure of evaluation of functions of a matrix using the
Cayley-Hamilton technique.
The matrix L has n eigenvalues at l = l1. To evaluate f( L ) = L k, we define (refer Eqn. (5.98b)) the
polynomial g(l) as
g(l) = b0 + b1 l + L + b n –1 l n – 1
This polynomial may be rearranged as
g(l) = b0 + b1(l – l1) + L + b n – 1 (l – l1)n – 1
The coefficients b0, b1, ..., bn – 1 are given by the following equations (refer Eqns (5.98c)):
f(l1) = g(l1)
d d
f (l ) = g(l )
dl l = l1 dl l = l1
M
n -1
d dn-1
f (l ) = g (l )
dln - 1 l = l1
dln - 1 l = l1
Solving, we get
b0 = l k1
b1 = k lk1 -1
1!
b2 = k ( k - 1) lk1 - 2
2!
M
k ( k - 1)( k - 2) L ( k - n + 2) k - n + 1
bn – 1 = l1
(n - 1) !
386 Digital Control and State Variable Methods
=
k (k - 1)(k - 2) L (k - n + 2)(k - n + 1)( k - n) L 1 1
lk1 - n + 1
LM OP
(k - n + 1)(k - n) L 1 (n - 1) ! N Q
k!
= lk - n + 1
( k - n + 1) !(n - 1) ! 1
Therefore (refer Review Example 5.3),
L k = b0I + b1( L – l1I) + L + bn – 1 ( L – l1I)n –1
LMl k k k -1
l1
k ( k - 1) k - 2
l1 L
k ! l1
k- n +1
OP
1
MM 1! 2! (k - n + 1) !(n - 1) ! PP
k k -1
0 lk1 l1 L ·
=M 1! PP
MM 0 0 lk1 L ·
PP
MM M M M M
PQ
N0 0 0 L lk1
Problems
6.1 A system is described by the state equation
LM
-3 1 0 -3OP LM OP
x(k + 1) = - 4 0 1 x(k) + -7 u(k); x(0) = x0
MM PP MM PP
N
-1 0 0 0 Q N Q
Using the z-transform technique, transform the state equation into a set of linear algebraic equations in the form
X(z) = G(z)x0 + H(z)U(z)
6.2 Give a block diagram for digital realization of the state equation of Problem 6.1.
6.3 Obtain the transfer function description for the following system:
LM x (k + 1) OP = LM2
1
-5 OP LM x (k) OP + L1O u(k); y(k) = 2x (k)
1
N x (k + 1)Q N
2
1
2
-1 Q N x (k)Q MN0PQ
2
1
LM x (k + 1) OP = LM2
1 -5 OP LM x (k ) OP + L1
1 -2 OP LMuu ((kk))OP
0 1
N x (k + 1)Q N
2
1
2
- 1Q N x ( k )Q MN0
2 1 Q MMNu (k)PPQ
3 2
3
z–1
1/2 5
1
1/4
–1 z–1 6
U (z) Y (z)
–1/2
–1 3 2
2 –7
z–1
1/3
Fig. P6.5
6.6 Set up a state variable model for the system of Fig. P6.6.
+ + y1
u1 + + +
3 2
+
12 2
+
7
+
u2 + – + y2
– +
Fig. P6.6
388 Digital Control and State Variable Methods
6.7 Obtain the companion form realizations for the following transfer functions. Obtain different companion form
for each system.
Y (z) 3z 2 - z - 3
(i) = 2 1
R( z ) z + 3 z - 23
Y (z) -2z 3 + 2z 2 - z + 2
(ii) =
R( z ) z 3 + z 2 - z - 34
6.8 Obtain the Jordan canonical form realizations for the following transfer functions.
Y (z) z 3 + 8z 2 + 17z + 8
(i) =
R( z ) ( z + 1) ( z + 2) ( z + 3)
Y (z) 3z 3 - 4 z + 6
(ii) =
R( z ) ( z - 13 )3
6.9 Find state variable models for the following difference equations. Obtain different canonical form for each
system.
(i) y(k + 3) + 5 y(k + 2) + 7 y(k + 1) + 3 y(k) = 0
(ii) y(k + 2) + 3 y(k + 1) + 2 y(k) = 5 r(k + 1) + 3 r(k)
(iii) y(k + 3) + 5 y(k + 2) + 7 y(k + 1) + 3 y(k) = r(k + 1) + 2 r(k)
6.10 Given
F=
LM 0 1OP
N- 3 4Q
Determine f(k) = Fk using
(a) the z-transform technique;
(b) similarity transformation; and
(c) Cayley-Hamilton technique.
6.11 Consider the system
with F=
LM 0 1OP ; g = LM1OP ; c = [1 0]
N- 0.16 - 1Q N1Q
Find the closed-form solution for y(k) when u(k) is unit-step sequence.
6.12 Consider the system
x(k + 1) = Fx(k) + gu(k)
y(k) = Cx(k) + du(k)
C=M
L-3 4OP ; d = LM- 2OP ; u(k) = c h , k ³ 0
1 k
2
N-1 1Q N 0Q
Find the response y(k), k ³ 0.
State Variable Analysis of Digital Control Systems 389
6.13 Consider the system
x(k + 1) = Fx(k)
LM-1 1 0 OP
with F= -1 0
MM 00 PP
N 0 -2 Q
(a) Find the modes of the free response.
(b) Find x(k) for
x(0) = [0 1 1]T
6.14 Consider the continuous-time system
Y (s ) 1
Ga(s) = =
R( s) s( s + 2)
Insert sample-and-hold devices and determine the vector difference state model for digital simulation of the
continuous-time system when the computation interval is T = 1 sec. Use the following methods to obtain the
simulation model.
(a) Obtain G(z) by taking the z transform of Ga(s) when it is preceded by a sampler-and-hold; convert G(z)
into a vector difference state model.
(b) Obtain a continuous-time state model for the given Ga(s); insert sample-and-hold and discretize the model.
6.15 Consider a continuous-time system
x& (t) =
LM-2 2OP x(t) + LM-1OP u(t)
N 1 - 3Q N 5Q
y(t) = [2 – 4] x(t) + 6 u(t)
Insert sample-and-hold devices and determine the vector difference state model for digital simulation of the
continuous-time system when the computation interval T = 0.2.
6.16 The plant of a single-input, single-output digital control system is shown in the block diagram of Fig. P6.16,
where u(t) is the control input and w(t) is a unit-step load disturbance. Obtain the state difference equations of
the plant. Sampling period T = 0.1 second.
w (t)
+
u ( t) + 1 1 y (t)
10 s
10 s + 1
Fig. P6.16
6.17 The mathematical model of the plant of a two-input, two-output temperature control system is given below:
x& = Ax + Bu
y = Cx
A=
LM- 0.1 0OP ;B=
100 LM0
;C=
1 0 OP LM OP
N 0.1 Q
- 0.1 N
0 100 0 1 Q N Q
For the computer control of this system, obtain the discrete-time model of the plant. Sampling period T =
3 seconds.
6.18 Consider the closed-loop control system shown in Fig. P6.18.
(a) Obtain the z-transform of the feedforward transfer function.
(b) Obtain the closed-loop transfer function, and convert it into a state variable model for digital simulation.
390 Digital Control and State Variable Methods
R (s ) + 1 – e– Ts 1 Y (s)
T = 1 sec s s(s + 1)
–
Fig. P6.18
6.19 The mathematical model of the plant of a control system is given below:
Y (s) e -0. 4 s
= Ga(s) =
U(s) s +1
For digital simulation of the plant, obtain a vector difference state model with T = 1 sec as the sampling period.
Use the following methods to obtain the plant model:
(a) Sample Ga(s) with a zero-order hold and convert the resulting discrete-time transfer function into a state
model.
(b) Convert the given Ga(s) into a state model and sample this model with a zero-order hold.
6.20 Determine zero-order hold sampling of the process
x& (t) = – x(t) + u(t – 2.5)
with sampling interval T = 1.
6.21 Convert the transfer function
Y (s ) e - st D
= Ga(s) = ; 0 £ tD < T
U ( s) s2
into a state model and sample this model with a zero-order hold; T is the sampling interval.
6.22 The plant of a unity-feedback continuous-time control system is described by the equations
x& =
LM0 1OP
x+
0 LM OP
u
N0 -2 Q 2 NQ
y = x1
(a) Show that the continuous-time closed-loop system is stable.
(b) A sampler and zero-order hold are now introduced in the forward loop. Show that the stable linear
continuous-time system becomes unstable upon the introduction of a sampler and a zero-order hold with
sampling period T = 3 sec.
6.23 The block diagram of a sampled-data system is shown in Fig. P6.23.
(a) Obtain a discrete-time state model for the system.
(b) Obtain the equation for intersample response of the system.
r + u 1 1 1 y
ZOH s+2 s+1 s
– T
Plant
Fig. P6.23
6.24 The block diagram of a sampled-data system is shown in Fig. P6.24. Obtain the discrete-time state model of the
system.
Given A=
LM 0 1OP ; b = LM0OP ; c = [1 0]
N- 2 - 3Q N1Q
State Variable Analysis of Digital Control Systems 391
r + u x y
ZOH x = Ax + bu c
– T = 1 sec
Plant
Fig. P6.24
6.25 A closed-loop computer control system is shown in Fig. P6.25. The digital compensator is described by the
difference equation
e2(k + 1) + 2e2(k) = e1(k)
The state model of the plant is, as given in Problem 6.24. Obtain the discrete-time state model for the system.
r + e 1 (k) e 2 (k) u y
Digital
ZOH Plant
compensator
– T = 1 sec
Fig. P6.25
6.26 Consider the closed-loop analog control system shown in Fig. P6.26. For computer control of the process,
transform the controller transfer function into a difference equation using backward-difference approximation
of the derivative.
Sample the process model with a zero-order hold and obtain the state variable model of the closed-loop com-
puter-controlled system. Take T = 0.1 sec as sampling interval.
Fig. P6.26
(a) x(k + 1) =
LM1 -2OP x(k) + LM 1 -1OP u(k)
N1 -1Q N0 0 Q
y(k) = M
L1 0OP x(k)
N0 1 Q
(b) x(k + 1) = M
L-1 1OP x(k) + LM0OP u(k)
N 0 -1Q N1 Q
y(k) = [1 1] x(k)
392 Digital Control and State Variable Methods
6.28 Consider the following continuous-time control system:
LM x& (t ) OP = LM 0 1OP LM x (t) OP + LM0OP u(t)
1 1
N x& (t )Q N-1 0Q N x (t)Q N1Q
2 2
y(t) = x1(t)
Show that the system is completely controllable and completely observable. The control signal u+(t) is now
generated by processing the signal u(t), through a sampler and a zero-order hold. Study the controllability and
observability properties of the system under this condition. Determine the values of the sampling period for
which the discretized system may exhibit hidden oscillations.
6.29 For the digital system shown in Fig. P6.29, determine what values of T must be avoided so that the system will
be assured of complete controllability and observability.
r 1 y
ZOH +
T (s + 0.02) 2 + 2 s+1
Fig. P6.29
7.1 INTRODUCTION
The design techniques presented in the preceding chapters are based on either frequency response or the root
locus. These transfer function-based methods have been referred to as classical control design. The goal of
this chapter is to solve the identical problems using different techniques based on state variable formulation.
The use of the state-space approach has often been referred to as modern control design. However, since the
state-space method of description for differential equations is over 100 years old, and was introduced in the
control design in the late 1950s, it seems somewhat misleading to refer to it as ‘modern’. We prefer to refer
to the two approaches to design as state variable methods and transform methods.
The transform methods of design are powerful methods of practical design. Most control systems are
designed using variations of these methods. An important property of these methods is robustness. The
resultant closed-loop system characteristics tend to be insensitive to small inaccuracies in the system model.
This property is very important because of the difficulty in finding an accurate linear model of a physical
system and also, because many systems have significant nonlinear operations.
The state variable methods appear to be much more dependent on having an accurate system model for
the design process. An advantage of these methods is that the system representation provides a complete
(internal) description of the system, including possible internal oscillations or instabilities that might be
hidden by inappropriate cancellations in the transfer function (input/output) description. The power of state
variable techniques is especially apparent when we design controllers for systems with more than one con-
trol input or sensed output. However, in this chapter, we will illustrate the state variable design methods
using single-input, single-output (SISO) systems. Methods for multi-input, multi-output (MIMO) design are
discussed in Chapter 8.
In this chapter, we present a design method known as pole placement or pole assignment. This method is
similar to the root-locus design in that, the closed-loop poles may be placed in desired locations. However,
pole-placement design allows all closed-loop poles to be placed in desirable locations, whereas the root-
locus design procedure allows only the two dominant poles to be placed. There is a cost associated with
placing all closed-loop poles, however, because placing all closed-loop poles requires measurement and
feedback of all the state variables of the system.
In many applications, all the state variables cannot be measured because of cost considerations, or
because of the lack of suitable transducers. In these cases, those state variables that cannot be measured
394 Digital Control and State Variable Methods
must be estimated from the ones that are measured. Fortunately, we can separate the design into two phases.
During the first phase, we design the system as though all states of the system will be measured. The second
phase is concerned with the design of the state estimator. In this chapter, we consider both phases of the
design process, and the effects that the state estimator has on closed-loop system operation.
Figure 7.1 shows how the state-feedback control law and the state estimator fit together, and how the
combination takes the place of, what we have been previously referring to as, dynamic compensation. We
will see in this chapter that the estimator-based dynamic compensators are very similar to the classical
compensators of Chapter 4, inspite of the fact that they are arrived at by entirely different means.
r + u y
kR Plant Sensor
–
Control law
x
Estimator
k
State vector
Constant estimate
gain matrix
Compensation
Fig. 7.1 Schematic diagram of a state-feedback control system
An important aspect of the feedback system design is the stability of the control system. Whatever we want
to achieve with the control system, its stability must be assured. Sometimes the main goal of a feedback
design is actually to stabilize a system if it is initially unstable, or to improve its stability if transient phenom-
ena do not die out sufficiently fast.
The purpose of this section is to investigate how the stability properties of linear systems can be improved
by state feedback.
Consider the single-input linear time-invariant system with nth-order state differential equation
x& (t) = Ax(t) + bu(t) (7.1)
If we suppose that all the n state variables x1, x2, ..., xn can be accurately measured at all times, it is
possible to implement a linear control law of the form
u(t) = – k1x1(t) – k2x2(t) – L – kn xn(t) = – kx(t) (7.2)
where k = [k1 k2 L kn]
is a constant state-feedback gain matrix. With this state-feedback control law, the closed-loop system is
described by the state differential equation
x& (t) = (A – bk) x(t) (7.3)
and the characteristic equation of the closed-loop system is
| sI – (A – bk) | = 0 (7.4)
Pole-Placement Design and State Observers 395
When evaluated, this yields an nth-order polynomial in s
containing the n gains k1, k2, ..., kn. The control-law design
u
Plant then consists of picking the gains so that the roots of Eqn.
– (7.4) are in desirable locations. In the next section, we find
that under a mildly restrictive condition (namely, the system
(7.1) must be completely controllable), all the eigenvalues of
(A – bk) can be arbitrarily located in the complex plane by
+ x1
k1 choosing k suitably (with the restriction that complex
+ eigenvalues occur in complex-conjugate pairs). If all the
eigenvalues of (A – bk) are placed in the left-half plane, the
+ x 2
closed-loop system is, of course, asymptotically stable; x(t)
k2 will decay to zero irrespective of the value of x(0)—the initial
+ perturbation in the state. The system state is thus maintained
at zero value inspite of disturbances that act upon the system.
xn Systems with this property are called regulator systems. The
kn
origin of state space is the equilibrium state of the system.
Control configuration for a state regulator is shown in
Fig. 7.2 Control configuration for a Fig. 7.2. In this structure, there is no command input (r = 0).
state regulator Control systems in which the output must follow the command
signals (called servo systems) will be considered later.
Selection of desirable locations for the closed-loop poles requires some iteration by the designer. Some
of the issues in their selection will be discussed later in this chapter. For now, we will assume that the desired
locations are known, say,
s = l1, l2, K, ln
Then the desired characteristic equation is
(s – l1)(s – l2) L (s – ln) = 0 (7.5)
The required elements of k are obtained by matching
coefficients in Eqns (7.4) and (7.5), thus forcing the system
characteristic equation to be identical with the desired equation.
An example should clarify this pole placement idea.
x& = Ax + bu =
LM OP
0 1
x+
0
u
LM OP (7.6)
0 0N Q 1 NQ
To stabilize the system, the input signal is chosen to be of the form
u(t) = – k1x1(t) – k2x2(t) = – kx(t)
The state equation for the closed-loop system (Fig. 7.4), then becomes
x& = (A – bk)x =
FG L
0 1 OP LM OP
0
[k1 k2 ] x =
IJ
0 LM
1
x
OP
H MN
0 0
-
Q NQ
1 K
- k1 - k 2
N Q
Satellite The characteristic equation of the closed-loop
system is
|sI – (A – bk)| = s2 + k2s + k1 = 0 (7.7)
u 1 x2 1 x1
s s Suppose that the design specifications for this
– – system require z = 0.707 with a settling time of 1 sec
FG 4 IJ
= 1 or zw n = 4 . The closed-loop pole
H zw n K
k2 locations needed are at s = – 4 ± j4. The desired
characteristic equation is
k1 (s + 4 + j4) (s + 4 – j4) = s2 + 8s + 32 (7.8)
Equating the coefficients with like powers of s in
Fig. 7.4 Simulation diagram for the satellite Eqns (7.7) and (7.8) yields
control system k1 = 32, k2 = 8
The calculation of the gains using the technique illustrated in this example, becomes rather tedious when the
order of the system is larger than three. There are, however, ‘canonical’ forms of the state variable equations
where the algebra for finding the gains is especially simple. One such canonical form—useful in control-law
design—is the controllable canonical form. Consider a system represented by the transfer function
Y ( s) b s n -1 + b 2 s n - 2 + L + b n
= 1 n
U ( s) s + a 1 s n -1 + L + a n
A companion-form realization of this transfer function is given below (refer Eqns (5.54)):
x& = Ax + bu (7.9)
y = cx
Pole-Placement Design and State Observers 397
where
LM 0 1 0 L 0 OP L0O
M
A=M M
0 0 1 L 0
PP ; b = MM0M PP
MM 0 M M M
P MM PP
0 0 L 1 P MM0PP
MN-a n -a n -1 -a n - 2 L -a PQ 1 N1 Q
c = [bn bn – 1 L b2 b1 ]
The matrix A in Eqns (7.9) has a very special structure: the coefficients of the denominator of the transfer
function preceded by minus signs, form a string along the bottom row of the matrix. The rest of the matrix is
zero except for the superdiagonal terms, which are all unity. It can easily be proved that the pair (A,b) is
completely controllable for all values of a i’s. For this reason, the companion-form realization given by
Eqns (7.9) is referred to as the controllable canonical form.
One of the advantages of the controllable canonical form is that the controller gains can be obtained from
it, just by inspection. The closed-loop system matrix
LM 0 1 0 L 0 OP
L
MM 0M 0
M
1
M
0
M
PP
A – bk =
MM 0 0 0 L 1
PP
MN- a - k
n 1 - a n - 1 - k2 - a n - 2 - k3 L - a - k PQ
1 n
Consider the linear time-invariant system (7.1) with state feedback control law (7.2); the resulting closed-
loop system is given by Eqn. (7.3). In the following, we shall prove that a necessary and sufficient condition
for arbitrary placement of closed-loop eigenvalues in the complex plane (with the restriction that complex
eigenvalues occur in complex-conjugate pairs), is that the system (7.1) is completely controllable. We shall
first prove the sufficient condition, i.e., if the system (7.1) is completely controllable, all the eigenvalues of
(A – bk) in Eqn. (7.3) can be arbitrarily placed.
In proving the sufficient condition on arbitrary pole-placement, it is convenient to transform the state
equation (7.1) into the controllable canonical form (7.9). Let us assume that such a transformation exists and
is given by
x = Px (7.10)
398 Digital Control and State Variable Methods
LM p 11 p12 L p1n p1 OP LM OP
p p22 L p2 n p2
=M
MM M
21
M M
x=
M
x PP MM PP
Np n1 pn 2 L pnn pn
PQ MN PQ
pi = [pi1 pi2 L pin]; i = 1, 2, ..., n
Under the transformation (7.10), system (7.1) is transformed to the following controllable canonical model:
x& = A x + b u (7.11)
where
LM 0 1 0 L 0OP LM0OP
0 0 1 L 0
A = PAP–1
M
=M M
PP b = Pb = M0M P
MM 0 M M M
PP MM PP
0 0 1 M 0P
MN- a n - a n -1 - a n-2 L - a PQ 1
MN1PQ
n n–1
| sI – A | = s + a1 s + L + an – 1 s + an = |sI – A|
(Characteristic polynomial is invariant under equivalence transformation)
The first equation in the set (7.10) is given by
x1 = p11 x1 + p12 x2 + L + p1n xn = p1x
Taking the derivative on both sides of this equation, we get
x&1 = p1 x& = p1Ax + p1bu
But x&1 (= x 2 ) is a function of x only as per the canonical model (7.11).
Therefore
p1 b = 0 and x 2 = p1Ax
Taking derivative on both sides once again, we get
p1Ab = 0 and x 3 = p1A2x
Continuing the process, we obtain
p1 An – 2b = 0 and x n = p1An – 1x
Taking derivative once again, we obtain
p1 An – 1b = 1
Thus
LM p 1 OP
pA
x = Px = M
MM M
1 PP x
Np A 1
n -1 PQ
where p1 must satisfy the conditions
p1b = p1Ab = L = p1An – 2b = 0, p1An – 1b = 1
Pole-Placement Design and State Observers 399
From Eqn. (7.11), we have
LM0OP LM p b 1 OP
M0P Mp Ab
Pb = M M P = M M
1 PP
MM0PP MMp A 1
n-2
bP
P
NM1QP NM p A 1
n -1
b QP
or
p1[b Ab L An –2b An – 1b] = [0 0 L 0 1]
This gives
p1 = [0 0 L 0 1]U – 1
where
U = [b Ab L An –1b]
is the controllability matrix, which is nonsingular because of the assumption of controllability of the
system (7.1).
Therefore, the controllable state model (7.1) can be transformed to the canonical form (7.11) by the
transformation
x = Px (7.12)
LMp1 OP
pA
where P=M
1
MMM PP ; p 1 = [0 0L0 1]U –1
Np A
1
n -1 PQ
Under the equivalence transformation (7.12), the state-feedback control law (7.2) becomes
u = – kx = – k x (7.13)
where k = kP –1 = [ k1 k2 L k n ]
With this control law, system (7.11) becomes
x& = ( A - b k ) x
LM 0 1 0 L 0 OP
0
L
MM 0M 0
M
1
M L
0
M
0
M
PP
=M
MM 0 0 0 0 1
PP x (7.14)
MN-a M- k M M M M PP
n 1 -a n -1 - k2 -a n - 2 - k3 L -a 2 - k n -1 -a - k Q
1 n
Nx& Q N 0
2 A 22 Q MNx PQ N 0 Q
2
LM p 1 OP
pA
PP ; p = [0 0L0 1]U -1
P=M
1 1
(7.21)
MM M PQ U = [b Ab L A n - 1b ]
n -1
Np A1
Step 3: Using the desired eigenvalues (desired closed-loop poles) l1, l2, ..., ln, write the desired character-
istic polynomial:
(s – l 1)(s – l 2) L (s – l n) = sn + a1 sn –1 + L + an – 1 s + an (7.22)
and determine the values of a1, a2, L, an–1, an.
Step 4: The required state-feedback gain matrix is determined from the following equation:
k = [an – an an –1 – an –1 L a1 – a1] P (7.23)
There are other approaches also, for the determination of the state-feedback gain matrix k. In what follows,
we shall present a well-known formula, known as the Ackermann’s formula, which is convenient for compu-
ter solution.
From Eqns (7.23) and (7.21), we get
LM(0 0 L 0 1) U -1 OP
-1
(0 0 L 0 1) U A
k = [an – an an –1 – an–1 L a1 –a ] M PP
MM
1
M
PP
MN(0 0 L 0 1) U -1 A n - 1 Q
= [0 0L0 1]U –1 [(a1 – a1)An –1 + (a2 – a2)An –2 + L + (an – an)I] (7.24)
The characteristic polynomial of matrix A is (Eqn. (7.20))
|sI – A | = sn + a1s n–1 + a2sn – 2 + L + an –1s + an
Since the Cayley-Hamilton theorem states that a matrix satisfies its own characteristic equation, we have
An + a1An –1 + a2An – 2 + L + an – 1A + anI = 0
Therefore An = – a1An –1 – a2An – 2 – L – an – 1A – anI (7.25)
From Eqns (7.24) and (7.25), we get
k = [0 0L0 1]U–1 f (A) (7.26a)
where
f (A) = An + a1An –1 + a2An –2 + L + an –1A + anI (7.26b)
n –1
U = [b Ab L A b] (7.26c)
Equations (7.26) describe the Ackermann’s formula for the determination of the state-feedback gain matrix k.
Example 7.2 Recall the inverted pendulum of Example 5.15, shown in Fig. 5.16, in which the object is to
apply a force u(t) so that the pendulum remains balanced in the vertical position. We found the linearized
equations governing the system to be:
x& = Ax + bu
where x = [q q& z z& ]T
402 Digital Control and State Variable Methods
LM 0 1 0 0 OP LM 0 OP
16.3106 0 0 0 -1.4458
A=M
MM 0 0 0 1
PP
;b=
0
MM PP
N-1.0637 0 0 0Q
P MN 0.9639 PQ
z(t) = horizontal displacement of the pivot on the cart
q (t) = rotational angle of the pendulum
It is easy to verify that the characteristic polynomial of matrix A is
| sI – A | = s4 – 16.3106s2
Since there are poles at 0, 0, 4.039, and – 4.039, the system is quite unstable, as one would expect from
physical reasoning.
Suppose we require a feedback control of the form
u(t) = – kx = – k1x1 – k2x2 – k3x3 – k4x4,
such that the closed-loop system has the stable pole configuration given by multiple poles at –1. We
verified in Example 5.16 that the system under consideration is a controllable system; therefore, such a feed-
back gain matrix k does exist. We will determine the required k by using the design equations (7.17)–(7.23).
The controllability matrix
0 LM -14458
. 0 -235816
. OP
-14458
. 0 -235816
. 0
U = [b Ab A2b A b] = M
3 PP
MM 0 0.9639 0 15379
.
PQ
N 0.9639 0 15379
. 0
LM 0 0.0750 0 11500
. OP
0.0750 0 11500
. 0 P
U =M –1
MM 0 -0.0470 0 -0.0705P
N -0.0470 0 -0.0705 0
PQ
Therefore
p1 = [– 0.0470 0 – 0.0705 0]
LM p OP LM-0.0470
1 0 -0.0705 0 OP
pA P M 0 -0.0470 0 -0.0705 PP
P=M
1
MMp A PP = MM-0.6917
1
2
0 0 0
PQ
3
Np A Q N 0
1 -0.6917 0 0
|sI – A| = s4 + a1 s3 + a2 s2 + a3 s + a4 = s4 + 0s3 – 16.3106s2 + 0 s + 0
|sI – (A – bk) | = s4 + a1 s3 + a2 s2 + a3 s + a4 = (s + 1)4 = s4 + 4s3 + 6s2 + 4s + 1
k = [a4 – a4 a3 – a3 a2 – a2 a1 – a1]P
= [1 4 22.3106 4]P = [–15.4785 –2.9547 –0.0705 –0.2820]
This feedback control law yields a stable closed-loop system so that the entire state vector, when disturbed
from the zero state, returns asymptotically to this state. This means that not only is the pendulum balanced
(q ® 0), but that the cart returns to its origin as well (z ® 0).
Pole-Placement Design and State Observers 403
Example 7.3 Let us use Ackermann’s formula to the state-regulator design problem of Example 7.1. The
plant model is given by (Eqn. (7.6))
x& = Ax + bu =
LM0 1OP x + LM0OP u
N0 0 Q N1Q
The desired characteristic polynomial is (Eqn. (7.8))
s2 + a1s + a2 = s2 + 8s + 32
To use Ackermann’s formula (7.26) to calculate the gain matrix k, we first evaluate U–1 and f(A):
U = [b
LM0 1OP; U = LM0
Ab] = –1
1 OP
N1 0 Q N1 0 Q
f (A) = A2 +a A+a I= M
1
L0 1OP LM0
2
1O
P0Q + 8 LMN0 0OPQ + 32 LMN0 1OPQ = LMN 0 32OPQ
0 1 1 0 32 8
N0 0 Q N0
Now using Eqn. (7.26a), we obtain
k = [0 1] U–1 f (A) = [0 1]
LM0 1OP LM32 8 OP = [32 8]
N1 0Q N 0 32Q
The solution is seen to be the same as that obtained in Example 7.1.
Comments 1. Through the pole-placement design procedure described in the present section, it is always
possible to stabilize a completely controllable system by state feedback, or to improve its stability by assign-
ing the closed-loop poles to locations in the left-half complex plane. The design procedure, however, gives
no guidance as to where, in the left-half plane, the closed-loop poles should be located.
It appears that we can choose the magnitude of the real part of the closed-loop poles to be arbitrarily
large, making the system response arbitrarily fast. However, to increase the rate at which the plant responds,
the input signal to the plant must become larger, requiring large values of gains. As the magnitudes of the
signals in a system increase, the likelihood of the system entering nonlinear regions of operation, increases.
For very large signals, this nonlinear operation will occur for almost every physical system. Hence, the linear
model that is used in design no longer accurately models the physical system.
Thus, the selection of desired closed-loop poles requires a proper balance of bandwidth, overshoot,
sensitivity, control effort, and other design requirements. If the system is of second-order, then the system
dynamics (response characteristics) can be precisely correlated to the locations of the desired closed-loop
poles. For higher-order systems, the location of the closed-loop poles and the response characteristics are
not easily correlated. Hence, in determining the state-feedback gain matrix k for a given system, it is desir-
able to examine, by computer simulations, the response characteristics for several different matrices k (based
on several different characteristic equations), and choose the one that gives the best overall performance.
2. For the case of single-input systems, the gain matrix k, which places the closed-loop poles at the
desired locations, is unique.
If the dynamic system under consideration
x& = Ax + Bu
has more than one input, that is, B has more than one column, then the gain matrix K in the control law
u = – Kx
404 Digital Control and State Variable Methods
has more than one row. Since each row of K furnishes n gains (n is the order of the system) that can be
adjusted, it is clear that in a controllable system there will be more gains available—than are needed—to
place all of the closed-loop poles. This is a benefit: the designer has more flexibility in the design; it is
possible to specify all the closed-loop poles and still be able to satisfy other requirements. How should these
other requirements be specified? The answer to this question may well depend on the circumstances of the
particular application. A number of results using the design freedom in multi-input systems to improve
robustness of the control system, have appeared in the literature. We will not be able to accommodate these
results in this book.
The non-uniqueness in the design of state-feedback control law for multi-input systems, is removed by
optimal control theory which is discussed in Chapter 8.
The pole-placement design procedure introduced in the preceding sections results in control law of the form
u(t) = – kx(t) (7.27)
which requires the ability to directly measure the entire state vector x(t). Full state-feedback control for
many second-order systems, requires feedback of position and rate variables which can easily be measured.
However, for most of the higher-order systems, full state measurements are not practical. Thus, either a new
approach that directly accounts for the non-availability of the entire state vector (Chapter 8) is to be devised,
or a suitable approximation of the state vector must be determined. The latter approach is much simpler in
many situations.
The purpose of this section is to demonstrate the estimation of all the state variables of a system, from the
measurements that can be made on the system. If the estimate of the state vector is denoted by x$ , it would be
nice if the true state in the control law given by Eqn. (7.27), could be replaced by its estimate:
u(t) = – kx$ (t) (7.28)
This indeed is possible, as we shall see in the next section.
A device (or a computer program) that estimates the state variables is called a state observer, or simply an
observer. If the state observer estimates all the state variables of the system, regardless of whether some state
variables are available for direct measurement, it is called a full-order state observer. However, if accurate
measurements of certain states are possible, we may estimate only the remaining states, and the accurately
measured signals are then used directly for feedback. The resulting observer is called a reduced-order state
observer.
Plant
u x y
x = Ax + bu c
+ +
+ x x y –
b n
c
+ n-parallel
integrators
Observer
Substituting for x& (t) and x&$ (t) from Eqns (7.29) and (7.31) respectively, we get
~
x& (t) = Ax(t) + bu(t) – Ax$ (t) – bu(t) – mc(x(t) – x$ (t))
= (A – mc) ~
x (t) (7.33)
The characteristic equation of the error is given by
| sI – (A – mc) | = 0 (7.34a)
~
If m can (we hope) be chosen so that (A – mc) has stable and reasonably fast roots, x (t) will decay to zero
irrespective of ~
x (0). This means that x$ (t) will converge to x(t) regardless of the value of x$ (0), and further-
more, the dynamics of the error can be chosen to be faster than the open-loop dynamics. Note that Eqn.
(7.33) is independent of applied control. This is a consequence of assuming A, b and c to be identical in the
plant and the observer. Therefore, the estimation error ~ x converges to zero and remains there, independent
of any known forcing function u(t) on the plant and its effect on the state x(t). If we do not have a very
accurate model of the plant (A, b, c), the dynamics of the error are no longer governed by Eqn. (7.33).
However, m can typically be chosen so that the error system is stable and the error is acceptably small, even
with small modelling errors and disturbance inputs.
The selection of m can be approached in exactly the same fashion as the selection of k in the control law
design. If we specify the desired location of the observer-error roots as
s = l1, l2, K, ln,
the desired observer characteristic equation is
(s – l1) (s – l2) L (s – ln) = 0 (7.34b)
and one can solve for m by comparing coefficients in Eqns (7.34a) and (7.34b). However, as we shall see
shortly, this can be done only if the system (7.29) is completely observable.
The calculation of the gains using this simple technique becomes rather tedious when the order of the
system is larger than three. As in the controller design, there is an observable canonical form for which the
observer design equations are particularly simple. Consider a system represented by the transfer function
Y ( s) b s n -1 + b 2 s n - 2 + L + b n
= 1 n
U ( s) s + a 1 s n -1 + L + a n
A companion-form realization of this transfer function is given below (refer Eqns (5.56)):
x& = Ax + bu
(7.35)
y = cx
where
LM0 0 L 0 -a n OP LM b n OP
0 L 0 -a n -1
M 1
PP MMbb n -1 PP
A = M0 1 L 0 -a n - 2 ; b = 0L0
MM M M M M
PP MM Mn-2
PP ; c = [0 1]
MN0 0 L 1 -a 1 PQ MN b 1
PQ
It can easily be proved that the pair (A,c) is completely observable for all values of ai’s. For this reason,
the companion form realization given by Eqn. (7.35) is referred to as observable canonical form.
Pole-Placement Design and State Observers 407
One of the advantages of the observable canonical form is that the observer gains m can be obtained from
it, just by inspection. The observer-error matrix is
LM 0 0 L 0 -a n - m1 OP
1 0 L 0 -a n -1 - m2
M
(A – mc) = M 0 1 L 0 -a n - 2 - m3
PP
MM M M M M
PP
MN 0 0 L 1 -a 1 - m n PQ
which has the characteristic equation
sn + (a1 + mn) sn –1 + L + (an – 2 + m3)s2 + (an –1 + m2) s + an + m1 = 0
and the observer gains can be found by comparing the coefficients of this equation with Eqn. (7.34b).
A procedure for observer design, therefore, consists of transforming the given state variable model to
observable canonical form, solving for the observer gains, and transforming the gains back to the original
state.
We can, however, directly use the equations of the control-law design for computing the observer gain
matrix m, if we examine the resemblance between the estimation and control problems. In fact, the two
problems are mathematically equivalent. This property is called duality. The design of a full-order observer
requires the determination of the gain matrix m such that (A – mc) has desired eigenvalues li; i = 1, 2, ..., n.
This is mathematically equivalent to designing a full state-feedback controller for the ‘transposed auxiliary
system’,
z& (t) = ATz(t) + cTh(t) (7.36a)
with feedback
h(t) = – mTz (t) (7.36b)
so that the closed-loop auxiliary system
z& (t) = (AT – cTmT )z(t) (7.37)
has eigenvalues li; i = 1, 2, ..., n.
Since
det W = det WT,
one obtains
det [sI – (AT – cTmT)] = det [sI – (A – mc)]
i.e., the eigenvalues of (AT – cTmT) are same as the eigenvalues of (A – mc).
By comparing the characteristic equation of the closed-loop system (7.19) and that of the auxiliary system
(7.37), we obtain the duality relations given in Table 7.1 between the control and estimation problems. The
Ackermann’s control-design formula given by Eqns (7.26) becomes the observer-design formula if the
substitutions of Table 7.1 are made.
A necessary and sufficient condition for
Table 7.1 Duality between control and estimation determination of the observer gain matrix m for
the desired eigenvalues of (A – mc), is that the
Control Estimation
auxiliary system (7.36) be completely controlla-
A AT ble. The controllability condition for this system
b cT is that the rank of
k mT
[cT ATcT L (AT)n –1 cT]
408 Digital Control and State Variable Methods
is n. This is the condition for complete observability of the original system defined by Eqns (7.29). This
means that a necessary and sufficient condition for estimation of the state of the system, defined by Eqns
(7.29), is that the system be completely observable.
Again by duality, we can say that for the case of single-output systems, the gain matrix m, which places
the observer poles at desired locations, is unique. In the multi-output case, the same pole configuration can
be achieved by various feedback gain matrices. This non-uniqueness is removed by optimal control theory
which is discussed in Chapter 8.
Example 7.4 We will consider the satellite control system of Example 7.3. The state equation of the plant is
x& = Ax + bu
with A =
LM0 1OP ; b = LM0OP
N0 0Q N1Q
x1 = q, the orientation of the satellite; x2 = q&
We assume that the orientation q can be accurately measured from the antenna signal; therefore
y = cx(t)
with c = [1 0]
Let us design a state observer for the system. We choose the observer to be critically damped with a
=
LM0 0OP LM0 0OP + 20 LM0 0OP + 100 LM1 0OP = LM100 0 OP
N1 0 Q N1 0 Q N1 0 Q N0 1Q N 20 100 Q
The observer gain matrix is given by the equation
mT = [0 1]
LM100 0 OP
= [20 100]
N 20 100 Q
Therefore m=
LM 20OP
N100Q
Pole-Placement Design and State Observers 409
Example 7.5 Consider once again the inverted-pendulum system of Example 7.2. Suppose that the only
output available for measurement is z(t), the position of the cart. The linearized equations governing this
system are
x& = Ax + bu; y = cx
LM 0 1 0 0 OP
0 LM OP
16.3106 0 0 0 -1.4458
where A=M
MM 0 0 0 1
;b= PP
0
MM
; c = [0 PP 0 1 0]
N -1.0637 0 0 0Q
P MN 0.9639PQ
We verified in Example 5.18 that this system is completely observable. In the following, we design a
full-order observer for this system. We choose the observer pole locations as – 2, – 2 ± j1, – 3. The corre-
sponding characteristic equation is
s4 + 9s3 + 31s2 + 49s + 30 = 0
The transposed auxiliary system is given by
LM0 0 -1.0637 0 OP
0 0 0 -1.0637
U = [cT ATcT (AT)2cT (A ) c ] = M
T 3 T
MM1 0 0 0
PP
N0 1 0 0
PQ
LM 0 0 1 0O
0 0 0 1P
U–1 =M
MM-0.9401 0 0 0P
P
N0 -0.9401 0 0Q
P
Therefore
p1 = [0 – 0.9401 0 0]
LMp 1 OP L 0 -0.9401 0 0 OP
p ( A ) P M - 0.9401
T
0 0 0
P=M PP
MMp ( A ) PP = MMM 0
1
T 2
1 - 15.3333 0 1
1
T 3
Np ( A ) Q N-15.3333 0 1 0
PQ
| sI – AT | = s4 + a1s3 + a2s2 + a3s + a4 = s4 + 0s3 – 16.3106s2 + 0s + 0
mT = [a4 – a4 a3 – a3 a2 – a2 a1 – a1] P
= [30 49 47.3106 9] P = [–184.0641 –753.6317 9 47.3106]
LM-184.0641OP
-753.6317
Therefore m=M
MM 9 PPP
N 47.3106 Q
With this m, the observer
x&$ = (A – mc) x$ + bu + my
will process the cart position y(t) = z(t) and input u(t), to continuously provide an estimate x$ (t) of the state
vector x(t); and any errors in the estimate will decay at least as fast as e–2t.
x(t) =
LM x (t ) OP
1
Nx (t )Qe
If we partition the system matrices accordingly, the complete description of the system is given by
LM x& OP = LMa
1 11 OP LM x OP + LM b OP u
a 1e 1 1
(7.38a)
Nx& Q Na
e e1 A ee
Q Nx Q Nb Q
e e
y = [1
Lx O
0] M P 1
(7.38b)
Nx Qe
Pole-Placement Design and State Observers 411
The dynamics of the unmeasured state variables are given by
x& e = Aee xe + a e1 x1 + b e u (7.39)
14243
known input
where the two rightmost terms are known and can be considered as an input into the xe dynamics. Since x1 = y,
measured dynamics are given by the scalar equation
x&1 = y& = a11 y + a1e xe + b1u (7.40)
If we collect the known terms of Eqn. (7.40) on one side, we get
y& - a y - b1u = a1exe (7.41)
144112443
known measurement
Note that Eqns (7.39) and (7.41) have the same relationship to the state xe that the original equations (7.38)
had to the entire state x. Following this line of reasoning, we can establish the following substitutions in the
original observer-design equations, to obtain an (reduced-order) observer of xe:
x ¬ xe
A ¬ Aee
bu ¬ ae1 y + beu (7.42)
y ¬ y& – a11 y – b1u
c ¬ a1e
Making these substitutions into the equation for full-order observer (Eqn. (7.31)), we obtain the equation of
the reduced-order observer:
x&$ e = Aee x$ e + a1e14
y2+ b e u + m ( y& - a11 y - b1u – a1e x$ e)
43 1442443
(7.43)
input measurement
If we define the estimation error as
~
x e = xe – x$ e (7.44)
the dynamics of error are given by subtracting Eqn. (7.43) from Eqn. (7.39):
x& = (A – ma ) ~
~
e x
ee 1e e (7.45)
Its characteristic equation is given by
| sI – (Aee – ma1e) | = 0 (7.46)
We design the dynamics of this observer by selecting m so that Eqn. (7.46) matches a desired reduced-
order characteristic equation. To carry out the design using state regulator results, we form a ‘transposed
auxiliary system’
z& (t) = A Tee z (t) + a1e
T
h(t)
(7.47)
h(t) = – mT z (t)
Use of Ackermann’s formula given by Eqns (7.26) for this auxiliary system gives the gains m of the
reduced-order observer. We should point out that the conditions for the existence of the reduced-order
observer are the same as for the full-order observer—namely observability of the pair (A, c).
Let us now look at the implementational aspects of the reduced-order observer given by Eqn. (7.43). This
equation can be rewritten as
x&$ = (A – ma ) x$ + (a – ma )y + (b – mb )u + m y&
e ee 1e e e1 11 e 1 (7.48)
412 Digital Control and State Variable Methods
The fact that the reduced-order observer requires the derivative of y(t) as an input, appears to present a
practical difficulty. It is known that differentiation amplifies noise, so if y is noisy the use of y& is unaccept-
able. To get around this difficulty, we define the new state as
x ¢e =D x$ e – my (7.49a)
Then, in terms of this new state, the implementation of the reduced-order observer is given by
. ee – ma1e) x$ e + (ae1 – ma11)y + (be – mb1)u
x& e¢ = (A (7.49b)
and y& no longer appears directly. A block-diagram representation of the reduced-order observer is shown in
Fig. 7.7.
y
ae1 – ma11
m
+ + + + x
u xe xe e
be – mb1
n–1
+
n – 1 parallel
integrators
A ee – ma1e
Example 7.6 In Example 7.4, a second-order observer for the satellite control system was designed with
the observer poles at s = – 10, – 10. We now design a reduced-order (first-order) observer for the system
with observer pole at s = – 10.
The plant equations are
x&1
=
0 1 x1LM OP LM OP LM OP LM OP
+
0
u
x&2 0 0 x2 N Q N QN Q NQ
1
Lx O
1
y = [1 0] M P
Nx Q
2
The partitioned matrices are
LMa 11 a1e OP LM OP LM OP LM OP
=
0 1 b
= 1 =
0
Na e1 Aee Q N Q N Q NQ
0 0 be 1
From Eqn. (7.46), we find the characteristic equation in terms of m:
s – (0 – m) = 0
We compare it with the desired equation
s + 10 = 0
Pole-Placement Design and State Observers 413
which yields,
m = 10
The observer equations are (refer Eqns. (7.49))
x& 2¢ = – 10 x$ 2 + u
x$ 2 = x 2¢ + 10y
This completes the design of the reduced-order observer which estimates the angular velocity of the satellite
from the measurement of the angular position.
In Sections 7.2–7.4 we studied the design of control laws for systems in which the state variables are all
accessible for measurement. We promised to overcome the difficulty of not being able to measure all the
state variables by the use of an observer to estimate those state variables that cannot be measured. Then in
Section 7.5, we studied the design of observers for systems with known inputs, but not when the state esti-
mate is used for the purpose of control. We are now ready to combine the state-feedback control law with the
observer to obtain a compensator for linear systems in which not all the state variables can be measured.
Consider the completely controllable and completely observable system defined by the equations
x& = Ax + bu
y = cx (7.50)
Suppose we have designed a state-feedback control law
u = – kx (7.51)
using the methods of Section 7.4. And also suppose we have designed a full-order observer
x$& = A x$ + bu + m(y – c x$ ) (7.52)
using the methods of Section 7.5.
For the state-feedback control based on the observed state x$ ,
u = – k x$ (7.53)
The control system based on combining the state-feedback control law and state observer, has the con-
figuration shown in Fig. 7.8. Note that the number of state variables in the compensator is equal to the order
of the embedded observer and hence is equal to the order of the plant. Thus, the order of the overall closed-
loop system, when a full-order observer is used in the compensator, is 2n for a plant of order n. We are
interested in the dynamic behaviour of the 2nth-order system comprising the plant and the compensator.
With the control law (7.53) used, the plant dynamics become
x& = Ax – bk x$ = (A – bk)x + bk(x – x$ ) (7.54)
Plant Sensor
u x y
x = Ax + bu c
x x = Ax + bu
–k
+ m (y – cx )
Control law Observer
Compensator
Fig. 7.8 Combined state-feedback control and state estimation
414 Digital Control and State Variable Methods
The difference between the actual state x and observed state x$ , has been defined as the error ~
x:
~
x = x – x$
Substitution of the error vector into Eqn. (7.54) gives
x& = (A – bk)x + bk ~
x (7.55)
Note that the observer error was given by Eqn. (7.33), repeated here:
x& = (A – mc) ~
~ x (7.56)
Combining Eqns (7.55) and (7.56) we obtain
LMx& OP = LMA - bk OP LMxOP
bk
(7.57)
N~x& Q N 0 A - mcQ N~ xQ
Equation (7.57) describes the dynamics of the 2n-dimensional system of Fig. 7.8. The characteristic equation
for the system is
| sI – (A – bk) | | sI – (A – mc) | = 0
In other words, the poles of the combined system consist of the union of control and observer roots. This
means that the design of the control law and the observer can be carried out independently. Yet, when they
are used together the roots are unchanged. This is a special case of the separation principle which holds
in much more general contexts and allows for the separate design of control law and estimator in certain
stochastic cases.
To compare the state-variable method of design with the transform methods discussed in earlier chapters,
we obtain the transfer function model of the compensator used in the control system of Fig. 7.8. The state
variable model for this compensator is obtained by including the feedback law u = – k x$ (since it is part of the
compensator) in the observer equation (7.52).
x$& = (A – bk – mc) x$ + my
(7.58)
u = – k x$
The formula for conversion of state variable model to the transfer function model is given by Eqn. (5.28).
Applying this result to the model given by Eqn. (7.58), we obtain
U (s )
= D(s) = k(sI – A + bk + mc)–1m (7.59)
- Y ( s)
Figure 7.9 shows the block diagram representation of the system with observer-based controller.
R (s) = 0 U (s ) Y (s)
D (s) Plant
–
Note that the poles of D(s) in Eqn. (7.59) were neither specified nor used during the state-variable design
process. It may even happen that D(s) has one or more poles in the right-half plane; the compensator, in other
words, could turn out to be unstable. But the closed-loop system, if so designed, would be stable. There is,
however, one problem if the compensator is unstable. The open-loop poles of the system are the poles of the
plant and also the poles of the compensator. If the latter are in the right-half plane, then the closed-loop poles
may be in the right-half plane when the loop gain becomes too small. Robustness considerations put certain
restrictions on the use of unstable compensators to stabilize a system.
Pole-Placement Design and State Observers 415
Example 7.7 In this example, we study the closed-loop system obtained by implementing the state-feed-
back control law of Example 7.3 and state-observer design of Examples 7.4 and 7.6, for the attitude control
of a satellite. The plant model is given by
x& = Ax + bu; y = cx
with
A=
LM OP
0 1
;b=
0LM OP
; c = [1 0]
N Q
0 0 1 NQ
In Example 7.3, the gain matrix required to place the closed-loop poles at s = – 4 ± j4 was calculated to be
k = [32 8]
If both the state variables are available for feedback, the control law becomes
u = – kx = – [32 8]x
resulting in the closed-loop system
x& = (A – bk)x =
LM 0 1OP x
N-32 -8Q
Figure 7.10a shows the response of the system to an initial condition x(0) = [1 0]T. Assume now that the
state-feedback control law is implemented using a full-order observer. In Example 7.4, the observer gain
matrix was calculated to be
m=
20 LM OP
100 N Q
1
(a)
(b)
0.5
(c)
0.8 1.0
0
0.2 0.4 0.6
t (sec)
– 0.5
Fig. 7.10 Initial condition response; (a) without observer (b) with full-order observer, and
(c) with reduced-order observer
416 Digital Control and State Variable Methods
The state variable model of the compensator, obtained by cascading the state-feedback control law and the
state observer, is obtained as (refer Eqns (7.58))
x&$ = (A – bk – mc) x$ + my =
-20 1 LM
x$ +
20
y
OP LM OP
-132 -8 N 100 Q N Q
u = – k x$ = – [32 8] x$
The compensator transfer function is (refer Eqn. (7.59))
U ( s) 1440 s + 3200
D(s) = = k(sI – A + bk + mc)–1m = 2
-Y ( s ) s + 28s + 292
The state variable model of the closed-loop system can be constructed as follows:
x&1 = x2
x& 2 = u = – 32 x$1 – 8 x$ 2
MM xx&&$ PP = MM 200
2 0
0
-32 -8
-20 1
PP MM xx$ PP
2
1 1
2
MN x&$ PQ MN100
0 -132 2 -8Q
P MN x$ PQ
Figure 7.10b shows the response to an initial condition
[1 0 0 0]T
Consider now the implementation of state-feedback control law using reduced-order observer. In
Example 7.6, the following model was obtained to estimate the state x2 (state x1 is directly measured and
fedback, and is not estimated using an observer):
x$ 2 = x 2¢ + 10y
x& 2¢ = –10 x$ 2 + u
The control law is given by
u = – 32x1 – 8 x$ 2
From these equations, the following transfer function model of the compensator is obtained:
U ( s) 112(s + 2.86)
=
- Y ( s) s + 18
The reduced-order compensator is precisely the lead network; this is a pleasant discovery, as it shows that
the classical and state variable methods can result in exactly the same type of compensation.
The state variable model of the closed-loop system with the reduced-order compensator is derived below.
x&1 = x2
x& 2 = u = – 32x1 – 8 x$ 2 = – 32x1 – 8( x 2¢ + 10x1) = – 112x1 – 8 x 2¢
x& 2¢ = – 10 x$ 2 + u = – 10 x$ 2 – 32x1 – 8 x$ 2
= – 18( x 2¢ + 10x1) – 32x1 = – 18 x 2¢ – 212x1
Pole-Placement Design and State Observers 417
Therefore
LM x& OP LM 0
1 1 0 OP LM x OP
1
MM x&& PP = MM-112
2 0 -8
P Mx P2
N x ¢ Q N-212
2 0 -18PQ MN x ¢ PQ
2
Comments 1. Underlying the separation principle is a critical assumption, namely, that the observer in-
cludes an exact dynamic model of the plant—the process under control. This assumption is almost never
valid in reality. In practical systems, the precise dynamic model is rarely known. Even that which is known
about the real process dynamics, is often too complicated to include in the observer. Thus, the observer
must, in practice, be configured to use only an approximate model of the plant. This encounter with the real
world does not vitiate the separation principle, but means that the effect of an inaccurate plant model must be
considered. If the design achieved through use of the separation principle is robust, it will be able to tolerate
uncertainty of the plant dynamics. Doyle and Stein [124] have proposed a ‘design adjustment procedure’ to
improve robustness with observers.
2. One of the considerations in the design of a gain matrix k in the state-feedback control law, is that the
resulting control signal u must not be too large; the use of large control effort increases the likelihood of the
system entering nonlinear regions of operation. Since the function of the observer is only to process data,
there is no limitation on the size of the gain matrix m for its realization. (Nowadays, it is all but certain that
the entire compensator would be realized by a digital computer. With floating-point numerics, a digital
computer would be capable of handling variables of any reasonable dynamic range). Though the realization
of observer may impose no limitation on the observer dynamics, it may, nevertheless, be desirable to limit
the observer speed of response (bandwidth). Remember that real sensors are noisy, and much of the noise
occurs at relatively high frequencies. By limiting the bandwidth of the observer, we can attenuate and
smoothen the noise contribution to the compensator output—which is the control signal.
3. The desired closed-loop poles, to be generated by state-feedback are chosen to satisfy the performance
requirements. The poles of the observer are usually chosen so that the observer response is much faster than
the system response. A rule of thumb is to choose an observer response at least two to five times faster than
the system response. This is to ensure a faster decay of estimation errors compared with the desired dynam-
ics, thus causing the closed-loop poles generated by state-feedback to dominate the total response. If the
sensor noise is large enough to be a major concern, one may decide to choose the observer poles to be slower
than two times the system poles, which would yield a system with lower bandwidth and more noise-smooth-
ing. However the total system response in this case will be strongly influenced by the observer poles. Doyle
and Stein [124] have shown that the commonly suggested approach of ‘speeding-up’ observer dynamics will
not work in all cases. They have suggested that procedures which drive some observer poles toward stable
plant zeros and the rest toward infinity achieve the desired objective.
4. A final comment concerns the reduced-order observer. Due to the presence of a direct transmission
term (see Fig. 7.7), the reduced-order observer has much higher bandwidth from sensor to control, com-
pared with the full-order observer. Therefore, if sensor noise is a significant factor, the reduced-order
observer is less attractive, since the potential savings in complexity is more than offset by the increased
sensitivity to noise.
418 Digital Control and State Variable Methods
In the state regulator design studied in Section 7.4, the characteristic equation of the closed-loop system is
chosen so as to give satisfactory transients to disturbances. However, no mention is made of a reference
input or of design considerations to yield good transient response with respect to command changes. In
general, these considerations should be taken into account in the design of a control system. This can be
done by proper introduction of the reference input into the system equations.
Consider the completely controllable SISO linear time-invariant system with nth-order state variable model
x& (t) = Ax(t) + bu(t)
(7.60)
y(t) = cx(t)
We assume that all the n state variables can be accurately measured at all times. Implementation of appropri-
ately designed control law of the form
u(t) = – kx(t)
results in a state regulator system: any perturbation in the system state will asymptotically decay to the
equilibrium state x = 0.
Let us now assume that for the system given by Eqns (7.60), the desired steady-state value of the control-
led variable y(t) is a constant reference input r. For this servo system, the desired equilibrium state xs is a
constant point in state space and is governed by the equations
cxs = r (7.61)
We can formulate this command-following problem as a ‘shifted regulator problem’, by shifting the origin
of the state space to the equilibrium point xs. Formulation of the shifted regulator problem is as follows.
Let us be the needed input to maintain x(t) at the equilibrium point xs, i.e. (refer Eqns (7.60)),
0 = Axs + bus (7.62)
Assuming for the present that a us exists that satisfies Eqns (7.61)–(7.62), we define shifted input,
shifted state, and shifted controlled variable as
u~ (t) = u(t) – us
~
x (t) = x(t) – xs (7.63)
~
y (t) = y(t) – r
The shifted variables satisfy the equations
x& = A ~
~ x + b u~ (7.64)
~y = c~
x
This system possesses a time-invariant asymptotically stable control law
u~ = – k ~
x (7.65)
The application of this control law ensures that
~x ® 0 (x(t) ® xs, y(t) ® r)
In terms of the original state variables, total control effort
u(t) = – kx(t) + us + kxs (7.66)
Manipulation of Eqn. (7.62) gives
(A – bk)xs + b(us + kxs) = 0 or xs = – (A – bk)–1b(us + kxs)
or cxs = r = – c(A – bk)–1b(us + kxs)
Pole-Placement Design and State Observers 419
w This equation has a unique solution for (us + kxs):
(us + kxs) = Nr
r + u y where N is a scalar feedforward gain, given by
N Plant
– (N)–1 = – c(A – bk)–1b (7.67)
The control law (7.66), therefore, takes the form
x
u(t) = – kx(t) + Nr (7.68)
k The block diagram of Fig. 7.11 shows the configu-
ration of feedback control system with feedforward
Fig. 7.11 Control configuration of a servo system compensation for non-zero equilibrium state.
Example 7.8 The system considered in this example is the attitude control system for a rigid satellite. The
plant equations are (refer Example 7.1)
x& = Ax + bu; y = cx
where
A=
LM0 1OP ; b = LM0OP ; c = [1 0]
N0 0Q N1Q
x1(t) = position q (t); x2(t) = velocity q& (t)
The reference input r = qr is a step function. The desired steady-state is
xs = [qr 0]T,
which is a non-null state.
As the plant has integrating property, the steady-state value us of the input must be zero (otherwise the
output cannot stay constant). For this case, the shifted regulator problem may be formulated as follows:
~
x =x –q; ~ x =x
1 1 r 2 2
Shifted state variables satisfy the equation
~
x& = A~x + bu
The state-feedback control
u = – k~
x
results in dynamics of ~
x given by
x& = (A – bk) ~
~ x
In Example 7.1, we found that the eigenvalues of (A – bk) are placed at the desired locations – 4 ± j4 when
k = [k1 k2] = [32 8]
The control law expressed in terms of the original state variables is given as
u = – k1 ~
x1 – k2 ~
x 2 = – k1x1 – k2x2 + k1qr = – kx + k1qr
~
As t approaches infinity, x ® 0 (x ® [q 0]T ), and u ® 0.
r
Figure 7.12 shows a configuration for attitude control of the satellite.
In fact, control configuration of the form shown in Fig. 7.12 may be used for any SISO plant with integrating
property.
420 Digital Control and State Variable Methods
r + + u 1 x2 1 y = x1 =
k1
s s
– –
k2
Control configuration of Fig. 7.12 produces a generalization of proportional and derivative feedback but it
does not include integral control unless special steps are taken in the design process. One way to introduce
integral control is to augment the state vector with the desired integral. More specifically, for the system
(7.60), we can feedback the state x as well as the integral of the error in output by augmenting the plant state
x with the extra ‘integral state’ z, defined by the equation
t
z
z(t) = (y(t) – r)dt
0
(7.69a)
where r is the constant reference input of the system. Since z(t) satisfies the differential equation
z& (t) = y(t) – r = cx(t) – r (7.69b)
it is easily included by augmenting the original system (7.60) as follows:
N-1Q N c 0Q MN z PQ N0Q s
s
Now define new state variables as follows, representing the deviations from the steady-state:
~
x =
LM
x - xs ~ OP
; u = u – us (7.72a)
z - zs
N Q
In terms of these variables, Eqn. (7.71) becomes
~ ~ + b u~
x& = Ax (7.72b)
Pole-Placement Design and State Observers 421
A=
LMA 0OP , b = LMbOP
N c 0Q N0Q
The significance of this result is that, by defining the deviations from steady-state as state and control
variables, the design problem has been reformulated to be the standard regulator problem, with ~ x = 0 as the
desired state. We assume that an asymptotically stable solution to this problem exists, and is given by
u~ = – k ~
x
Partitioning k appropriately and using Eqns (7.72a) yields
k = [kp ki]
u – us = – [kp ki]
LMx - x OP = – k (x – x ) – k (z – z )
s
p s i s
Nz - z Q s
The steady-state terms must balance, therefore
t
z
u = – kp x – ki z = – kp x – ki (y(t) – r)dt
0
(7.73)
The control, thus, consists of proportional state feedback and integral control of output error. At steady-
state, ~
x& = 0; therefore
lim z& (t)® 0 or lim y(t) ® r
t ®¥ t®¥
Thus, by integrating action, the output y is driven to the no-offset condition.
This will be true even in the presence of constant disturbances acting on the plant. Block diagram of
Fig. 7.13 shows the configuration of feedback control system with proportional state feedback and integral
control of output error.
w
r + + u y
ki Plant
– –
x
kp
Y ( s) 1
=
U ( s) s + 3
with a constant reference command signal. We wish to have integral control with closed-loop poles at wn = 5
and z = 0.5, which is equivalent to asking for a desired characteristic equation
s2 + 5s + 25 = 0
The plant model is
x& = – 3x + u; y = x
422 Digital Control and State Variable Methods
Augmenting the plant state x with the integral state z—defined by the equation
t
z
z(t) = (y(t) – r)dt
0
we obtain
LM x& OP = LM-3 0OP LMxOP + LM1OP u + LM 0OP r
N z& Q N 1 0Q N z Q N0Q N-1Q
In terms of state and control variables representing deviations from the steady-state:
~
x =
LM
x - xs ~ OP
; u = u – us
z - zs
N Q
the state equation becomes
~ L-3 0OP ~x + LM1OP u~
x& = M
N 1 0 Q N0Q
We can find k from
F L-3 0O + L1O kIJ = s + 5s + 25
det G sI - M 2
H N 1 0PQ MN0PQ K
or s2 + (3 + k1)s + k2 = s2 + 5s + 25
Therefore
k = [2 25] = [kp ki]
The control
t
z
u = – kp x – ki z = – 2x – 25 (y(t) – r)dt
0
The control configuration is shown in Fig. 7.14, along with a disturbance input w. This system will behave
according to the desired closed-loop roots (wn = 5, z = 0.5) and will exhibit the characteristics of integral
control: zero steady-state error to a step r and zero steady-state error to a constant disturbance w.
w
+
r + 1 + 1 y
25
s s+3
– –
This section covers the key results on the pole-placement design, and state observers for discrete-time
systems. Our discussion will be brief because of the strong analogy between the discrete-time and continu-
ous-time cases. Consider the discretized model of the given plant:
Pole-Placement Design and State Observers 423
x(k + 1) = Fx(k) + gu(k)
y(k) = cx(k) (7.74)
where x is the n ´ 1 state vector, u is the scalar input, y is the scalar output; F, g, and c are, respectively,
n ´ n, n ´ 1 and 1 ´ n real constant matrices; and k = 0, 1, 2, ...
We will carry out the design of digital control system for the plant (7.74) in two steps. One step assumes
that we have all the elements of the state vector at our disposal for feedback purposes. The next step is to
design a state observer which estimates the entire state vector, when provided with the measurements of the
system indicated by the output equation in (7.74).
The final step will consist of combining the control law and the observer, where the control law calcula-
tions are based on the estimated state variables rather than the actual state.
Example 7.10 Consider the problem of attitude control of a rigid satellite. A state variable model of the
plant is (refer Eqn. (7.6))
x& = Ax + bu =
LM0 1OP x + LM0OP u
N0 0 Q N1Q
where x1 = q is the attitude angle and u is the system input.
The discrete-time description of the plant (assuming that the input u is applied through a zero-order hold
(ZOH)) is given below (refer Section 6.3):
x(k + 1) = Fx(k) + gu(k) (7.83)
T
LM1 T OP ; g = e LM T /2 OP
2
F = eAT =
N0 1 Q z
At
where bdt =
0 NT Q
The characteristic equation of the open-loop system is
z-1 -T
| zI – F | = = (z – 1)2 = 0
0 z-1
With the control law
u(k) = – kx(k) = – [k1 k2] x(k)
the closed-loop system becomes
x(k + 1) = (F – gk)x(k)
The characteristic equation of the closed-loop system is
|zI – (F – gk)| = z2 + (Tk2 + (T2/2)k1 – 2) z + (T2/2)k1 – Tk2 + 1 = 0 (7.84a)
We assume that T = 0.1 sec, and the desired characteristic roots of the closed-loop system are z1.2 =
0.875 Ð ± 17.9º.
Note that these roots correspond to z = 0.5, and wn = 3.6 (refer Eqns (4.15)):
-zw n T ± jw n T 1 - z 2
z1, 2 = e e
The desired characteristic equation is then (approximately)
z2 – 1.6z + 0.70 = 0 (7.84b)
Matching coefficients in Eqns (7.84a) and (7.84b), we obtain
k1 = 10, k2 = 3.5
u (k) x(k) y (k )
x (k + 1) = Fx (k) + gu( k) c
+ +
+ x(k + 1) x(k) y (k) –
g c
+
n-parallel
unit delayers
m
Observer
Fig. 7.15 Prediction observer
A difference equation describing the behaviour of the error is obtained by subtracting Eqn. (7.85) from
Eqn. (7.74):
~
x (k + 1) = (F – mc) ~ x (k) (7.86)
where
~
x = x – x$
The characteristic equation of the error is given by
| zI – (F – mc)| = 0 (7.87a)
Assuming that the desired characteristic equation is
(z – l1)(z – l2) L (z – ln) = 0, (7.87b)
the required elements of m are obtained by matching coefficients in Eqns (7.87a) and (7.87b). A necessary
and sufficient condition for the arbitrary assignment of eigenvalues of (F – mc), is that the system (7.74) is
completely observable.
The problem of designing a full-order observer is mathematically equivalent to designing a full state-
feedback controller for the ‘transposed auxiliary system’
z (k + 1) = FTz(k) + cTh(k) (7.88a)
with feedback
h(k) = – mTz(k) (7.88b)
so that the closed-loop auxiliary system
z (k + 1) = (FT – cTmT)z(k) (7.88c)
has eigenvalues li; i = 1, 2, ..., n.
426 Digital Control and State Variable Methods
This duality principle may be used to design full-order state observers by Ackermann’s formula (7.82), or
by design procedure given in Eqns (7.78)–(7.81).
Current Observer The prediction observer given by Eqn. (7.85) arrives at the state estimate x$ (k) after
receiving measurements up through y(k – 1). Hence the control u(k) = – k x$ (k) does not utilize the information
on the current output y(k). For higher-order systems controlled with a slow computer, or any time the sample
rates are fast compared to the computation time, this delay between making a measurement and using it in
control law may be a blessing. In many systems, however, the computation time required to evaluate Eqn.
(7.85) is quite short—compared to the sample period—and the control based on prediction observer may not
be as accurate as it could be.
An alternative formulation of the state observer is to use y(k) to obtain the state estimate x$ (k). This can be
done by separating the estimation process into two steps. In the first step we determine x (k + 1), an approxi-
mation of x(k + 1) based on x$ (k) and u(k), using the model of the plant. In the second step, we use y(k + 1)
to improve x (k + 1). The improved x (k + 1) is x$ (k + 1). The state observer based on this formulation is
called the current observer. The current observer equations are given by
x (k + 1) = F x$ (k) + gu(k) (7.89a)
x$ (k + 1) = x (k + 1) + m[y(k + 1) – c x (k + 1)] (7.89b)
In practice, the current observer cannot be implemented exactly because it is impossible to sample, perform
calculations, and output with absolutely no time elapse. However, the errors introduced due to computa-
tional delays will be negligible if the computation time is quite short—compared to the sample period.
The error equation for the current observer is similar to the error equation for the prediction observer,
given in (7.86). The current-estimate error equation is obtained by subtracting Eqns (7.89) from (7.74).
~
x (k + 1) = x(k + 1) – x$ (k + 1)
= Fx(k) + gu(k) – F x$ (k) – gu(k) – mc[x(k + 1) – x (k + 1)]
= F~x (k) – mcF ~x (k) = (F – mcF) ~x (k) (7.90)
Therefore, the gain matrix m is obtained exactly as before, except that c is replaced by cF.
Reduced-Order Observer The observers discussed so far, are designed to reconstruct the entire state
vector, given measurements of some of the states. To pursue an observer for only the unmeasured states, we
partition the state vector into two parts: one part is x1 which is directly measured, and the other part is xe,
representing the state variables that need to be estimated. If we partition the system matrices accordingly, the
complete description of the system (7.74) is given by
LM
x1 ( k + 1)OP LMf
= 11 1e
f OP LM
x1 ( k ) OP LM OP
g
+ 1 u(k) (7.91a)
x e ( k + 1)
N Q N f e1 Fee x e ( k )
QN ge
Q N Q
y(k) = [1 0]
LM x ( k ) OP
1
(7.91b)
Nx ( k )Q
e
The portion describing the dynamics of unmeasured states is
xe(k + 1) = Fee xe(k) + f e1 x1 ( k ) + g e u( k ) (7.92)
144 42444 3
known input
The measured dynamics are given by the scalar equation
y ( k + 1) - f y ( k ) - g1u( k ) = f1exe(k) (7.93)
14444411 2444443
known measurement
Equations (7.92) and (7.93) have the same relationship to the state xe that the original equation (7.74) had to
the entire state x. Following this reasoning, we arrive at the desired observer by making the following sub-
stitutions into the observer equations:
Pole-Placement Design and State Observers 427
x ¬ xe
F ¬ Fee
gu(k) ¬ fe1 y(k) + geu(k) (7.94)
y(k) ¬ y(k + 1) – f11 y(k) – g1u(k)
c ¬ f1e
Thus, the reduced-order observer equations are
x$ e (k + 1)= Fee x$ e (k) + f e1 y ( k ) + g e u ( k ) + m ( y(k + 1) - f11 y(k) - g1u(k ) - f1ex$ e (k )) (7.95)
144 42444 3 14444444 4244444444 3
input measurement
Subtracting Eqn. (7.95) from (7.92) yields the error equation
~
x e (k + 1) = (Fee – mf1e) ~
x e (k) (7.96)
where
~
x e = xe – x$ e
The characteristic equation is given by
|zI – (Fee – m f1e) | = 0 (7.97)
We design the dynamics of this observer by selecting m so that Eqn. (7.97) matches a desired reduced-order
characteristic equation. The design may be carried out directly or by using duality principle.
x x (k + 1) = Fx (k) + gu( k)
–k
+ m [y(k) – cx (k)]
Control law Observer
Compensator
Fig. 7.16 Combined state-feedback control and state estimation
1
We will design the compensator only for the prediction observer case. The other observers give very similar results.
428 Digital Control and State Variable Methods
The formula for conversion of a discrete-time state variable model to the transfer function model is given by
Eqn. (6.3). Applying this result to the model (7.98), we obtain
U(z)
= D(z) = k(zI – F + gk + mc)–1m (7.99)
-Y ( z )
Example 7.11 As an example of complete design, we will add a state observer to the satellite attitude
control considered in Example 7.10. The system equations of motion are (refer Eqn. (7.83))
u – us = – [kp ki]
LM
x - xs OP
= – kp(x – xs) – ki(v – vs)
N
v - vs Q
The steady-state terms must balance, therefore
u(k) = – kp x(k) – kiv(k) (7.110)
~ ~
At steady-state, x (k + 1) – x (k) = 0; therefore
v(k + 1) – v(k) = 0 = y(k) – r, i.e., y(k) ® r
The block diagram of Fig. 7.17 shows the control configuration.
w
r + + – v (k ) + u (k) y (k)
ki Plant
– + –
x(k)
kp
– v(k – 1)
Example 7.12 Consider the problem of digital control of a plant described by the transfer function
1
G(s) =
s+3
Pole-Placement Design and State Observers 431
Discretization of the plant model gives
Gh0G(z) =
Y (z)
=Z
LMF 1 - e I F 1 I OP- sT
U(z) MNGH s JK H s + 3K PQ
= (1 – z–1 )ZM
L 1 OP = 1 FG 1 - e IJ -3T
-3T
N s( s + 3) Q 3 H z - e K
For a sampling interval T = 0.1 sec,
0.0864
Gh0G(z) =
z - 0.741
The difference equation model of the plant is
y(k + 1) = 0.741y(k) + 0.0864u(k)
The plant has a constant reference command signal. We wish to design a PI control algorithm that results in
system response characteristics: z = 0.5, wn = 5. This is equivalent to asking for the closed-loop poles at
2
z1,2 = e -zw n Te ± jw n T 1- z = 0.7788 Ð ± 24.82º = 0.7068 ± j0.3269
The desired characteristic equation is therefore
(z – 0.7068 – j0.3269)(z – 0.7068 + j0.3269) = z2 – 1.4136z + 0.6065 = z2 + a1z + a2 = 0
Augmenting the plant state y(k) with the ‘integral state’ v(k) defined by
v(k) = v(k – 1) + y(k) – r,
we obtain
LM
y ( k + 1)
=
OP LM
OP LM OP LM OP LM OP
0.741 0 y ( k )
+
0.0864
u(k) +
0
r
N
v( k + 1) Q NQN Q N Q N Q
0.741 1 v( k ) 0.0864 -1
In terms of state variables representing deviations from the steady-state:
~
x =M
L y - y OP , s
Nv - v Q s
the state equation becomes
x (k + 1) = F ~
~ x (k) + g u~ (k)
where
F =
LM0.741 0OP ; g = LM0.0864OP
N0.741 1Q N0.0864Q
By Ackermann’s formula (7.82),
k = [0 1]U–1 f ( F )
where
f ( F ) = F 2 + a1 F + a2 I =
LM 0108
. 0 OP
N0.2425 01929
. Q
-1
U –1
= [g F g] -1 L0.0864
=M
0.064 OP =
1 LM 0.15 -0.064 OP
N0.0864 0.15 Q 7.43 ´ 10 - 3 N-0.0864 0.0864 Q
This gives
k = [1.564 2.243]
432 Digital Control and State Variable Methods
The control algorithm is given by
u(k) = – 1.564y(k) – 2.243v(k)
Example 7.13 The system considered in this example is the attitude control system for a rigid satellite.
The plant equations are (refer Example 7.10)
x(k + 1) = Fx(k) + gu(k)
Pole-Placement Design and State Observers 433
where
F=
LM1 T OP ; g = LM T /2 OP 2
N0 1 Q N T Q
x1(k) = position state q ; x2(k) = velocity state w
The reference input r = qr, a step function. The desired steady-state
xs = [qr 0]T
which is a non-null state.
As the plant has integrating property, the steady-state value us of the input must be zero (otherwise the
output cannot stay constant). For this case, the shifted regulator problem may be formulated as follows:
~
x =x –q; ~ x =x
1 1 r 2 2
Shifted state variables satisfy the equations
~
x (k + 1) = F ~
x (k) + gu(k)
The state-feedback control
u(k) = – k ~
x (k)
results in the dynamics of ~
x given by
~
x (k + 1) = (F – gk) ~
x (k)
We now determine the gain matrix k such that the response to an arbitrary initial condition is deadbeat. The
desired characteristic equation is
z2 = 0
Using Ackermann’s formula (7.82), we obtain
k = [0 1]U–1 f (F)
where
L1 2TOP ; U LM- 1 2
3 OP
f (F) = F 2
=M –1
= [g Fg] –1
=M T 2T
N0 1Q
MN T1 -
1 PP
2
2T Q
This gives
k= LM 1 3 OP
NT2
2T Q
For T = 0.1 sec, k = [100 15]
The control law expressed in terms of original state variables is given as
u(k) = – k1 ~
x1 (k) – k2 ~
x 2 (k) = – 100(x1(k) – qr) – 15x2(k)
Example 7.14 Reconsider the problem of attitude control of a satellite. For implementation of the design
of the previous example, we require the states x1(k) and x2(k) to be measurable. Assuming that the output y(k)
434 Digital Control and State Variable Methods
= x1(k) is the only state variable that can be measured, we design a state observer for the system. It is desired
that the error vector exhibits deadbeat response. The measurement equation is
y(k) = cx(k) = [1 0]x(k)
The prediction observer for the system is given as
x$ (k + 1) = F x$ (k) + gu(k) + m(y(k) – c x$ (k))
The gains m may be calculated by solving the state regulator design problem for the ‘transposed auxiliary
system’
z(k + 1) = FTz(k) + cTh(k)
h(k) = – mTz(k)
The desired characteristic equation is
z2 = 0
Using Ackermann’s formula, we obtain
mT = [0 1]U–1 f (FT)
where
f (FT) = (FT)2 =
LM 1 0OP ; U –1
= [cT FTcT]–1 =
LM1 OP
-1/ T
N2T 1Q N0 1/ TQ
This gives
mT = [2 1/T]
Review Example 7.1 DC motors are widely used in speed-control drives. In most applications, the
armature voltage of the motor is controlled in a closed-loop feedback system. Figure 7.18a shows a plant
model of a speed control system.
The state variables of the plant can be chosen as the motor shaft velocity w (t), and the armature current
ia(t). If both the state variables are used in feedback, then two voltages proportional, respectively, to these
two state variables must be generated. The generation of the voltage proportional to w (t) can be achieved by
use of a tachogenerator. A voltage proportional to ia(t) can be generated by inserting a sampling resistor Rs
in the armature circuit, as shown in Fig. 7.18a. It may, however, be noted that if Rs is very small, the voltage
across Rs may consist largely of noise; and if Rs is large, the voltage is more accurate, but a considerable
amount of power is wasted in Rs and the efficiency of the system is reduced.
In modern speed-control drives, thyristor rectifier is used as a power amplifier [5]. The thyristor rectifier
is supplied by an external single-phase or three-phase ac power, and it amplifies its input voltage u, to
produce an output voltage ea, which is supplied to the armature of the dc motor. The state-feedback control,
requiring the feedback of both the motor-shaft velocity and the armature current can, in fact, be effectively
used to provide current-limiting protective feature to prevent damage to the thyristors.
Pole-Placement Design and State Observers 435
ac supply
La Ra
Thyristor
rectifier
ia
u ea Motor
Tacho
TL
,J
,B
Rs
(a)
x 2 = ia TL
–
u + 1 + 1
Kr KT
La s + R a + R s Js + B
–
Kb
Rs
x1 =
Kt
(b)
Fig. 7.18 Plant model of a speed-control system
The voltage u is fed to the driver of the thyristor rectifier. The driver produces time-gate pulses that
control the conduction of the thyristors in the rectifier module. The rectified output voltage ea depends on
the firing angle of the pulses relative to the ac supply waveform. A linear relationship between the input
voltage u and the output voltage ea can be obtained when a proper firing control scheme is used. The time
constants associated with the rectifier are negligibly small. Neglecting the dynamics of the rectifier, we get
ea(t) = Kr u(t)
where Kr is the gain of the rectifier.
Figure 7.18b shows the functional block diagram of the plant with
B = viscous-friction coefficient of motor and load,
J = moment of inertia of motor and load,
KT = motor torque constant,
Kb = motor back-emf constant,
TL = constant load torque,
La = armature inductance, and
Ra + Rs = armature resistance.
436 Digital Control and State Variable Methods
As seen from Fig. 7.18b, the plant is a type-0 system. A control law of the form
u(t) = – kx + Nr
can shape the dynamics of the state variables x1(t) = w (t) and x2(t) = i a(t) with zero steady-state error in
w (t) to constant reference input r. The closed-loop system will, however, be a type-0 system resulting in
steady-state errors to constant disturbances. We assume that steady-state performance specifications require
a type-1 system. Hence we employ state feedback with integral control. A block diagram of the control
configuration is shown in Fig. 7.19.
wr er + k1 k3 + u
Kt + Plant
Kt sK t
– –
ia
k2 /R s Rs
Kt
A=
-0.5LM 10 OP ;b=
0
;g =
-10 LM OP LM OP
N
-0.1 -10 Q 100 0 N Q N Q
We define an additional state variable x3 as
t
x3 = z
0
(w – r) dt,
i.e., x& 3 = w – r = x1 – r
Augmenting this state variable with the plant equations, we obtain
x& = A x + b u + Gw
where
x = [x1 x2 x3]T; w = [TL r]T
LM-0.5 10 0 OP 0 -10 0LM OP LM OP
A = M -0.1 -10 0 ; b = 100 ; G =
PP 0 0
MM PP MM PP
MN 1 0 0 Q 0 0 -1 N Q N Q
Pole-Placement Design and State Observers 437
The controllability matrix
U = [b A b A 2b]
LM 0 1,000 -10,500 OP
= 100 -1,000 9,900
MM 0 1,000QP
P
N 0
The determinant of U is nonzero. The pair ( A, b ) is, therefore, completely controllable and the conditions
for pole placement by state feedback and integral control, are satisfied.
The characteristic polynomial of the closed-loop system is given by
LM s + 0.5 -10 0 OP
| sI - ( A - b k )| = 0.1 + 100k s + 10 + 100 k2 100k3
MM -1 1 PP
N 0 s Q
= s3 + (10.5 + 100k2) s2 + (6 + 50k2 + 1,000k1)s + 1,000k3 (7.116a)
Let the desired characteristic polynomial be
s3 + 87.5 s2 + 5,374.5 s + 124,969 = (s + 35.4)(s + 26.05 + j53.4)(s + 26.05 – j53.4) (7.116b)
The quadratic term has a natural frequency wn = 59.39 rad/sec, and a damping ratio z = 0.44.
Matching the corresponding coefficients of Eqns (7.116a) and (7.116b), we obtain
k1 = 5.33, k2 = 0.77, k3 = 124.97
With these values of the feedback gains, the state variable model of the closed-loop system becomes
LM x& OP LM -0.5
1 10 OP LM x OP LM-10
0 1 0 OP LT O
L
MM x&& PP = M-5331.
2 -87 -12497 M x P +
P 2 M 0 0 M P
P NrQ
N x Q MN 1
3 0 0PQ MN x PQ MN 0
3 -1PQ
At steady-state, x& = 0 and, therefore, the motor velocity x1 = w (t) will approach the constant reference set
point r as t approaches infinity, independent of the disturbance torque TL.
Review Example 7.2 One of the most common uses of feedback control is to position an inertia load
using an electric motor. The inertia load may consist of a very large, massive object such as a radar antenna
or a small object such as a precision instrument. Armature-controlled dc motors are used in many applica-
tions for positioning the load.
We consider here a motor-driven inertia system described by the following equations (refer Eqns (5.14)).
dq(t )
u(t) = Ra ia(t) + Kb w (t) = Ra ia(t) + Kb
dt
dw (t ) d 2q (t )
KT ia(t) = J =J
dt dt 2
where
u = applied armature voltage,
Ra = armature resistance,
ia = armature current,
q = angular position of the motor shaft,
438 Digital Control and State Variable Methods
w = angular velocity of the motor shaft,
Kb = back emf constant,
KT = motor torque constant, and
J = moment of inertia referred to the motor shaft.
Taking x1 = q, and x2 = q& = w as the state variables, we obtain the following state variable equations for the
system.
x&1 = x2
KT Kb K
x& 2 = – x2 + T u = – a x 2 + b u
JRa JRa
Assume that the physical parameters of the motor and the load yield a = 1, b = 1. Then
x& = Ax + bu
where
A=
LM0 1OP ; b = LM0OP
N0 -1Q N1Q
The discrete-time description of this system, with sampling period T = 0.1 sec, is given by the following
equations (refer Section 6.3).
x(k + 1) = Fx(k) + gu(k) (7.117)
where
T
F = eAT =
LM1 0.0952 OP z
; g = eAt bdt =
0.00484 LM OP
N0 0.905 Q 0
0.0952 N Q
In this model, x1(k) is the shaft position and x2(k) is the shaft velocity. We assume that x1(k) and x2(k) can
easily be measured using shaft encoders.
We choose the control configuration of Fig. 7.20 for digital positioning of the load; qr is a constant
reference command. In terms of the error variables
~
x (k) = x (k) – q ; ~x (k) = x (k) (7.118)
1 1 r 2 2
the control signal
u(k) = – k1 ~ x 2 (k) = – k~
x1 (k) – k2 ~ x (k) (7.119)
where the gain matrix
k = [k1 k2]
r + + u (k )
k1 ZOH Plant
– –
T = 0.1 sec
x2 (k )
k2
T = 0.1 sec
x 1 (k )
=
LM1 - 0.00484k 1 OP
0.0952 - 0.00484 k2 ~
x (k) (7.120)
N - 0.0952k 1 0.905 - 0.0952 k2Q
The characteristic equation is
| zI – (F – gk) | = z2 + (0.00484k1 + 0.0952k2 – 1.905)z + 0.00468k1 – 0.0952k2 + 0.905 = 0 (7.121a)
We choose the desired characteristic-equation zero locations, to be
z1, 2 = 0.888 ± j0.173 = 0.905 Ð ± 11.04º
Note that this corresponds to z = 0.46 and wn = 2.17 (refer Eqns (4.15)):
-zw n T ± jw n T 1 - z 2
z1, 2 = e e
The desired characteristic equation is given by
(z – 0.888 – j0.173)(z – 0.888 + j0.173) = z2 – 1.776z + 0.819 = 0 (7.121b)
Equating coefficients in Eqns (7.121a) and (7.1121b) yields the equations
0.00484k1 + 0.0952k2 = – 1.776 + 1.905
0.00468k1 – 0.0952k2 = 0.819 – 0.905
These equations are linear in k1 and k2 and upon solving yield
k1 = 4.52, k2 = 1.12
The control law is therefore given by
u(k) = – k1 ~
x1 (k) – k2 ~
x 2 (k) = – 4.52(x1(k) – qr) – 1.12x2(k)
The implementation of this control law, requires the feedback of the states x1(k) and x2(k). If we measure
x1(k) using a shaft encoder and estimate x2(k) using a state observer, the control configuration will take the
form shown in Fig. 7.21.
The state-feedback control has been designed for z = 0.46, wn = 2.17; zwn @ 1 sec. The reduced-order
observer for estimating velocity x2(k) from measurements of position x1(k) is a first-order system; we choose
the time constant of this system to be 0.5 sec. Hence, the desired pole location3 in the observer design
problem is
z = e–T/t = e– 0.1/0.5 = 0.819
The observer characteristic equation is then
z – 0.819 = 0 (7.122)
3
The pole at s = – 1/t is mapped to z = e–T/t; T = sampling interval.
440 Digital Control and State Variable Methods
+ + u (k)
r
k1 ZOH Plant
– –
T = 0.1 sec
x 2 (k ) x 1 (k )
k2 Observer
Problems
7.1 Consider an nth-order single-input, single-output system
x& = Ax + bu; y = cx
and assume that we are using feedback of the form
u = – kx + r
where r is the reference input signal.
Show that the zeros of the system are invariant under state-feedback.
7.2 A regulator system has the plant
LM 0 1 0OP LM0OP
x& = 1 x + 0 u; y = [1 0 0] x
MM-60 0
-6 PQ
P MM1PP
N -11 NQ
Pole-Placement Design and State Observers 441
(a) Design a state-feedback controller which will place the closed-loop poles at – 2 ± j3.464, – 5. Give a block
diagram of the control configuration.
(b) Design a full-order state observer; the observer-error poles are required to be located at – 2 ± j3.464, – 5.
Give all the relevant observer equations and a block diagram description of the observer structure.
(c) The state variable x 1(which is equal to y) is directly measurable and need not be observed. Design
a reduced-order state observer for the plant; the observer-error poles are required to be located at
– 2 ± j3.464. Give all the relevant observer equations.
7.3 A regulator system has the plant
x& = Ax + bu; y = cx
with
LM0 0 -6 OP LM1 OP
A= 1 0 -11 ; b = 0 ; c = [0 0 1]
MM0 -6 QP
P MM0 PP
N 1 NQ
(a) Compute k so that the control law u = – kx, places the closed-loop poles at – 2 ± j3.464, – 5. Give the state
variable model of the closed-loop system.
(b) For the estimation of the state vector x, we use an observer defined by
x$& = (A – mc) x$ + bu + my
Compute m so that the eigenvalues of (A – mc) are located at – 2 ± j3.464, – 5.
(c) The state variable x3 (which is equal to y) is directly measurable and need not be observed. Design a
reduced-order observer for the plant; the observer-error poles are required to be located at – 2 ± j3.464.
Give all the relevant observer equations.
7.4 Consider the system
x& = Ax + Bu; y = cx + du
where
A=
LM-2 -1OP ; B = LM1 0OP ; c = [0 1]; d = [2 0]
N 1 0Q N1 1Q
Design a full-order state observer so that the estimation error will decay in less than 4 seconds.
7.5 Consider the system
x& =
LM1 0OP x + LM1OP u; y = [2 – 1] x
N0 0Q N1Q
Design a reduced-order state observer that makes the estimation error to decay at least as fast as e–10t.
7.6 Consider the system with the transfer function
Y (s ) 9
=
U ( s) s 2 - 9
(a) Find (A, b, c) for this system in observable canonical form.
(b) Compute k so that the control law u = – kx places the closed-loop poles at – 3 ± j3.
(c) Design a full-order observer such that the observer-error poles are located at – 6 ± j6. Give all the relevant
observer equations.
(d) Suppose the system has a zero such that
Y ( s) 9(s + 1)
= 2
U(s) s -9
Prove that if u = – kx + r, there is a feedback matrix k such that the system is unobservable.
442 Digital Control and State Variable Methods
7.7 The equation of motion of an undamped oscillator with frequency w 0 is
y + w 20 y = u
&&
(a) Write the equations of motion in the state variable form with x1 = y and x2 = y& as the state variables.
(b) Find k1 and k2 such that u = – k1x1 – k2x2 gives closed-loop characteristic roots with wn = 2w 0 and z = 1.
(c) Design a second-order observer that estimates x1 and x2, given measurements of x1. Pick the characteristic
roots of the state-error equation with wn = 10w0 and z = 1. Give a block diagram of the observer-based
state-feedback control system.
(d) Design a first-order observer that estimates x2, given measurements of x1. The characteristic root of
the state-error equation is required to be located at –10w0. Give a block diagram of the observer-based
state-feedback control system.
7.8 A regulator system has the plant
x& =
LM 0 1OP x + LM0OP u; y = [1 0] x
N20.6 0Q N1Q
(a) Design a control law u = – kx so that the closed-loop system has eigenvalues at –1.8 ± j2.4.
(b) Design a full-order state observer to estimate the state vector. The observer matrix is required to have
eigenvalues at – 8, – 8.
(c) Find the transfer function of the compensator obtained by combining (a) and (b).
(d) Find the state variable model of the complete observer-based state-feedback control system.
7.9 A regulator system has the double integrator plant
Y (s) 1
=
U(s) s 2
(a) Taking x1 = y and x2 = y& as state variables, obtain the state variable model of the plant.
(b) Compute k such that u = – kx gives closed-loop characteristic roots with wn = 1, z = 2 / 2 .
(c) Design a full-order observer that estimates x1 and x2, given measurements of x1. Pick the characteristic
roots of the state-error equation with wn = 5, z = 0.5.
(d) Find the transfer function of the compensator obtained by combining (b) and (c).
(e) Design a reduced-order observer that estimates x2 given measurements of x1; place the single observer pole
at s = – 5.
(f) Find the transfer function of the compensator obtained by combining (b) and (e).
7.10 A servo system has the type-1 plant described by the equation
x& = Ax + bu; y = cx
where
LM0 1 OP LM0OP
0
A= 0 -1 1 ; b = 0 ; c = [1 0 0]
MM0 -2PQ
P MM1PP
N 0 NQ
(a) If u = – kx + Nr, compute k and N so that the closed-loop poles are located at –1 ± j1, – 2; and y(¥) = r, a
constant reference input.
(b) For the estimation of the state vector x, we use a full-order observer
x&$ = (A – mc) x$ + bu + my
Compute m so that observer-error poles are located at – 2 ± j2, – 4.
(c) Replace the control law in (a) by u = – k x$ + Nr, and give a block diagram of the observer-based servo system.
7.11 A plant is described by the equation
x& =
LM-1 0OP x + LM1OP u; y = [1 3] x
N 0 -2Q N1Q
Pole-Placement Design and State Observers 443
Add to the plant equations an integrator z& = y – r (r is a constant reference input) and select gains k, ki so that if
u = – kx – ki z, the closed-loop poles are at – 2, –1 ± j 3 . Give a block diagram of the control configuration.
7.12 Figure P7.12 shows the block diagram of a position control system employing a dc motor in armature control
mode; q (rad) is the motor shaft position, q& (rad/sec) is the motor shaft velocity, ia (amps) is the armature
current, and KP (volts/rad) is the sensitivity of the potentiometer. Find k1, k2 and k3 so that the dominant poles of
the closed-loop system are characterized by z = 0.5, wn = 2, non-dominant pole is at s = – 10; and the steady-state
error to constant reference input is zero.
KP
u x3 = ia x2 = x1 =
+ k1 + + 1 1 1
KP 0.1 s + 1 s+1 s
– – – –
0.1
k3
k2
KP
Fig. P7.12
7.13 A dc motor in armature control mode has been used in speed control system of Fig. P7.13 employing state-
feedback with integral control; w (rad/sec) is the motor shaft velocity, ia (amps) is the armature current and Kt
(volts/(rad/sec)) is the tachogenerator constant. Find k1, k2 and k3 so that the closed-loop poles of the system are
placed at –1 ± j 3 , –10; and the steady-state error to constant reference input is zero.
Kt
u x2 = i a x1 =
+ k1 k3 + + 1 1
+
Kt sK t 0.1 s + 1 s+1
– – –
0.1
k2
Kt
Fig. P7.13
444 Digital Control and State Variable Methods
7.14 The control law u = – kx – k1qr for position control system of Fig. P7.12 is to be replaced by u = – k x$ + k1qr
where x$ is the estimate of the state vector x given by the observer system
x&$ = (A – mc) x$ + bu + mq
Find the gain matrix m which places the eigenvalues of (A – mc) at – 3 ± j 3 , – 10. Give a block diagram of the
observer-based position control system.
7.15 Consider the position control system of Fig. P7.15 employing a dc motor in armature control mode with state
variables defined on the diagram. Full state-feedback is employed, with position feedback being obtained from
a potentiometer, rate feedback from a tachogenerator and current feedback from a voltage sample across a
resistance in the armature circuit. KA is the amplifier gain. Find the adjustable parameters KA, k2, and k3 so that
the closed-loop poles of the system are placed at – 3 ± j3, – 20.
x1 = K P
k1 = 1 Pot
–
r La Ra
KP +
KA
–
– ia
J, B
x3 = 0.1 ia
k3
0.1
x2 = K t
k2 Tacho
Fig. P7.15
Given:
Potentiometer sensitivity, KP = 1 volt/rad
Tachogenerator constant, Kt = 1 volt/(rad/sec)
Armature inductance, La = 0.005 H
Armature resistance, Ra = 0.9 W
Moment of inertia of motor and load, J = 0.02 N-m/(rad/sec2)
Viscous-friction coefficient of motor and load, B=0
Back emf constant, Kb = 1 volt/(rad/sec)
Motor torque constant, KT = 1 N-m/amp
7.16 Consider the position control system of Fig. P7.16 employing a dc motor in the field control mode, with state
variables defined on the diagram. Full state-feedback is employed with position feedback being obtained from a
potentiometer, rate feedback from a tachogenerator and current feedback from a voltage sample across a resistor
connected in the field circuit. KA is the amplifier gain.
Pole-Placement Design and State Observers 445
Find the adjustable parameters KA, k2, and k3 so that the closed-loop system has dominant poles characterized by
z = 0.5, wn = 2, and the third pole at s = – 10.
Given:
Potentiometer sensitivity, KP = 1 volt/rad
Tachogenerator constant, Kt = 1 volt/(rad/sec)
Field inductance, Lf = 20 H
Field resistance, Rf = 99 W
Moment of inertia of motor and load, J = 0.5 N-m/(rad/sec2)
Viscous-friction coefficient of motor and load, B = 0.5 N-m/(rad/sec)
Motor torque constant, KT = 10 N-m/amp
x1 = K P
k1 = 1 Pot
–
r
KP Rf
+ Ia
KA
–
–
Lf
J, B
x 3 = if
k3
x2 = K t
k2 Tacho
Fig. P7.16
7.17 Figure P7.17 shows control configuration of a type-1 servo system. Both the state variables x1 and x2, are
assumed to be measurable. It is desired to regulate the output y to a constant value r = 5. Find the values of k1,
k2 and N so that
(i) y(¥) = r = 5
(ii) The closed-loop characteristic equation is
s2 + a1s + a2 = 0
7.18 A speed control system, employing a dc motor in the armature control mode, is described by the following state
equations:
dw (t ) B K 1
= – w (t ) + T ia (t ) - TL
dt J J J
dia ( t ) K R 1
= – b w (t ) - ia (t ) + u(t )
dt L L L
446 Digital Control and State Variable Methods
r + u y = x1
N
s(s + )
–
x2
k2 s
k1
Fig. P7.17
where
ia(t) = armature current, amps
u(t) = armature applied voltage, volts
w (t) = motor velocity, rad/sec
B = viscous-friction coefficient of motor and load = 0
J = moment of inertia of motor and load = 0.02 N-m/(rad/sec2)
KT = motor torque constant = 1 N-m/amp
Kb = motor back emf constant = 1 volt/(rad/sec)
TL = constant disturbance torque (magnitude not known)
L = armature inductance = 0.005 H
R = armature resistance = 1 W
The design problem is to find the control u(t) such that
di (t ) dw(t )
(i) lim a = 0 and lim = 0, and (ii) lim w (t) = constant set-point r.
t ®¥ dt t ®¥ dt t ®¥
Show that the control law of the form
t
z
u(t) = – k1w (t) – k2ia(t) – k3 (w (t) – r)dt
0
can meet these objectives. Find k1, k2, and k3 so that the closed-loop poles are placed at –10 ± j10, –300. Suggest
a suitable scheme for implementation of the control law.
7.19 Figure P7.19 shows a process consisting of two interconnected tanks. h1 and h2 represent deviations in tank
levels from their steady-state values H1 and H2 respectively; q represents deviation in the flow rate from its
steady-state value Q . The flow rate q is controlled by signal u via valve and actuator. A disturbance flow rate w
enters the first tank via a returns line from elsewhere in the process. The differential equations for levels in the
tanks are given by
h& = – 3h + 2h + u + w
1 1 2
h&2 = 4h1 – 5h 2
(a) Compute the gains k1 and k2 so that the control law u = – k1h1(t) – k2h2(t) places the closed-loop poles at
– 4, – 7.
(b) Show that the steady-state error in the output y(t) = h2(t), in response to constant disturbance input w, is
non-zero.
(c) Add to the plant equations, an integrator z& (t) = y(t) and select gains k1, k2 and k3 so that the control law
u = – k1h1(t) – k2h2(t) – k3z(t) places the closed-loop poles at –1, – 2, – 7. Find the steady-state value of the
output in response to constant disturbance w. Give a block diagram depicting the control configuration.
Pole-Placement Design and State Observers 447
u
Actuator
Q+q
H 1 + h1 H 2 + h2
w
Fig. P7.19
A=
LM
-3 2 OP
; b=
1 LM OP
; c = [0 1]
N
4 -5 Q 0 NQ
w is a disturbance input to the system.
A control law of the form u = – kx + Nr is proposed; r is a constant reference input.
(a) Compute k so that the eigenvalues of (A – bk) are – 4, – 7.
(b) Choose N so that the system has zero steady-state error to reference input, i.e., y(¥) = r
(c) Show that the steady-state error to a constant disturbance input w, is non-zero for the above choice of N.
(d) Add to the plant equation, an integrator equation (z(t) being the state of the integrator):
z& (t) = y(t) – r
and select gains k1, k2 and k3 so that the control law u = – k1x1(t) – k2 x2(t) – k3 z(t) places the eigenvalues
of closed-loop system matrix at – 1, – 2, – 7.
(e) Draw a block diagram of the control scheme employing integral control and show that the steady-state error
to constant disturbance input, is zero.
7.21 Consider a plant consisting of a dc motor, the shaft of which has the angular velocity w (t) and which is driven by
an input voltage u(t). The describing equation is
w& (t) = – 0.5 w (t) + 100 u(t) = Aw(t) + bu(t)
It is desired to regulate the angular velocity at the desired value w 0 = r.
(a) Use control law of the form u = – Kw (t) + Nr. Choose K that results in closed-loop pole with time constant
0.1 sec. Choose N that guarantees zero steady-state error, i.e., w(¥) = r.
(b) Show that, if A changes to A + d A subject to (A + dA – bK ) being stable, then the above choice of N will no
longer make w (¥) = r. Therefore, the system is not robust under changes in system parameters.
(c) The system can be made robust by augmenting it with an integrator
z& = w – r
where z is the state of the integrator. To see this, first use a feedback of the form u = – K1w(t) – K2z(t)
and select K1 and K2 so that the characteristic polynomial of the closed-loop system becomes D(s) =
s2 + 11s + 50. Show that the resulting system will have w (¥) = r no matter how the matrix A changes so
long as the closed-loop system remains asymptotically stable.
448 Digital Control and State Variable Methods
7.22 A discrete-time regulator system has the plant
LM 0 1 OP
0 LM0 OP
x(k + 1) = 0 0 1 x(k) + 0 u(k)
MM-4 -1QP
P MM1 PP
N -2 NQ
1
Design a state-feedback controller which will place the closed-loop poles at – 2 ± j 12 , 0. Give a block diagram
of the control configuration.
7.23 Consider a plant defined by the following state variable model:
x(k + 1) = Fx(k) + Gu(k); y(k) = cx(k) + du(k)
where
LM 1
2
1 0 OP LM 1 4 OP
F = M -1 0 1 ;G= 0 ; c = [1 0 0]; d = [0 4]
MN 0 0 PQ
P MM-30 2 PQ
P
0 N
Design a prediction observer for the estimation of the state vector x; the observer-error poles are required to lie at
– 12 ± j 14 , 0. Give all the relevant observer equations and a block diagram description of the observer structure.
7.24 Consider the system defined by
LM 0 1 0 OP L0 O
x(k + 1) = x(k) + M0 P u(k)
MM-0.50 0 1
. PQ
P MM1 PP
N -0.2 11 NQ
Determine the state-feedback gain matrix k such that when the control signal is given by u(k) = – kx(k), the
closed-loop system will exhibit the deadbeat response to any initial state x(0). Give the state variable model of
the closed-loop system.
7.25 Consider the system
x(k + 1) =
LM 0 1OP x(k) + LM0OP u(k); y(k) = [1 1] x(k)
N-0.16 -1Q N1 Q
Design a current observer for the system; the response to the initial observer error is required to be deadbeat.
Give all the relevant observer equations.
7.26 Consider the plant defined in Problem 7.24. Assuming that only y(k) = x 2(k) is measurable, design a reduced-
order observer such that the response to the observer error is deadbeat. Give all the relevant observer
equations.
7.27 A discrete-time regulator system has the plant
x(k + 1)
LM 2 -1OP x(k) + LM4OP u(k); y(k) = [1 1] x(k) + 7u(k)
N-1 1Q N 3Q
(a) Design a state-feedback control algorithm u(k) = – kx(k) which places the closed-loop characteristic roots
at ± j 12 .
(b) Design a prediction observer for deadbeat response. Give the relevant observer equations.
(c) Combining (a) and (b), give a block diagram of the control configuration. Also obtain state variable model
of the observer-based state-feedback control system.
Pole-Placement Design and State Observers 449
7.28 A regulator system has the plant with transfer function
Y (z) z -2
=
U ( z ) (1 + 0.8z -1 ) (1 + 0.2 z -1 )
(a) Find (F, g, c) for the plant in controllable canonical form.
(b) Find k1 and k2 such that u(k) = – k1 x1(k) – k2 x2(k) gives closed-loop characteristic roots at 0.6 ± j0.4.
(c) Design a first-order observer that estimates x2, given measurements of x1; the response to initial observer
error is required to be deadbeat.
(d) Give a z-domain block diagram of the closed-loop system.
7.29 Consider the system
x(k + 1) = Fx(k) + gu(k); y(k) = cx(k)
where
F=
LM 0.16 OP
2.16
; g=
-1
;
LM OP c = [1 1]
N-0.16 -116
. Q 1 N Q
(a) Design a state-feedback control algorithm which gives closed-loop characteristic roots at 0.6 ± j 0.4.
(b) Design a reduced-order observer for deadbeat response.
(c) Find the transfer function of the compensator obtained by combining (a) and (b). Give a block diagram of
the closed-loop system showing the compensator in the control loop.
7.30 A double integrator plant is to be controlled by a digital computer employing state-feedback. Figure P7.30
shows a model of the control scheme. Both the state variables x1 and x2 are assumed to be measurable.
(a) Obtain the discrete-time state variable model of the plant.
(b) Compute k1 and k2 so that the response y(t) of the closed-loop system has the parameters: z = 0.5, wn = 4.
(c) Assume now that only x1 is measurable. Design a prediction observer to estimate the state vector x; the
estimation error is required to decay in a deadbeat manner.
(d) Find the transfer function of the compensator obtained by combining (b) and (c).
Plant
x2 x1 = y
u (k ) 1 – e– sT 1 1
– – s s s
T = 0.1 sec
k2
T = 0.1 sec
k1
Fig. P7.30
7.31 Figure P7.31 shows the block diagram of a digital positioning system. The plant is a dc motor driving inertia
load. Both the position q, and velocity q& , are measurable.
(a) Obtain matrices (F, g, c) of the discrete-time state variable model of the plant.
(b) Compute k1 and k2 so that the closed-loop system positions the load in a deadbeat manner in response to
any change in step command qr.
450 Digital Control and State Variable Methods
(c) Assume now that the position q is measured by a shaft encoder and a second-order state observer is used to
estimate the state vector x from plant input u and measurements of q. Design a deadbeat observer. Give a
block diagram of the observer-based digital positioning system.
(d) Design a first-order deadbeat observer to estimate velocity w from measurements of position q.
Plant
u (k) x2 = x1 =
r + + 1 – e– sT 1 1
k1
– – s s+1 s
x 2 (k )
k2
T = 0.1 sec
x 1 (k )
T = 0.1 sec
Fig. P7.31
8.1 INTRODUCTION
It should be obvious by now that stability plays a major role in control systems design. We have earlier
introduced, in Chapters 2 and 5, the concept of stability based on the dynamic evolution of the system state
in response to arbitrary initial state, representing initial energy storage. State variable model
x& (t) = Ax(t); x(t = 0) = D x0 (8.1)
0
is most appropriate to study dynamic evolution of the state x(t), in response to the initial state x with zero
external input. At the origin of the state space, x& (t) = 0 for all t; the origin is, thus, the equilibrium point of
the system and xe = 0 is the equilibrium state. This system is marginally stable if, for all possible initial
states, x0, x(t) remains thereafter within finite bounds for t > 0. This is true if none of the eigenvalues of A are
in the right half of the complex plane, and eigenvalues on the imaginary axis, if any, are simple (A multiple
eigenvalue on the imaginary axis would have a response that grows in time and could not be stable). Further-
more, the system is asymptotically stable if for all possible initial states x0, x(t) eventually decays to zero as
t approaches infinity. This is true if all the eigenvalues of A are inside the left half of the complex plane.
This concept of stability, in fact, follows from Lyapunov stability theory. A.M. Lyapunov considered the
stability of general nonlinear systems described by state equation of the form
x& (t) = f(x (t)); x (0) =D x0 (8.2)
If f (x) = Ax, then we have the linear case considered throughout the book. We assume that the equation
has been written so that x = 0 is an equilibrium point, which is to say that f (0) = 0, i.e., the system will
continue to be in equilibrium state xe = 0 for all time. This equilibrium point is said to be stable in the sense
of Lyapunov, if we are able to select a bound on initial condition x0, that will result in state trajectories x(t),
that remain within a chosen finite limit. The system is asymptotically stable at x = 0, if it is stable in the sense
of Lyapunov and, in addition, the state x(t) approaches zero as time t approaches infinity. The term ‘margin-
ally stable’ used in earlier chapters of the book, in fact, is an adaptation of the term “stable in the sense of
Lyapunov”, for our specific needs in linear system analysis.
No new results are obtained by the use of Lyapunov’s method for the stability analysis of linear time-
invariant systems. Simple and powerful methods discussed in earlier chapters are adequate for such systems.
However, Lyapunov functions supply certain performance indices and synthesis data of linear time-invariant
452 Digital Control and State Variable Methods
systems. Chapter 10 will demonstrate the use of Lyapunov functions in variable structure sliding mode
control, and model reference adaptive control. In this chapter, we introduce the concept of Lyapunov stabil-
ity and the role it plays in optimal control design.
The Lyapunov’s method of stability analysis, in principle , is the most general method for determination
of stability of nonlinear systems. The major drawback which seriously limits its use in practice, is the diffi-
culty often associated with the construction of the Lyapunov function required by the method. Guidelines for
construction of Lyapunov functions for nonlinear systems will be given in Chapter 9. For linear time-
invariant systems of main concern in this chapter, the quadratic function (refer Section 5.2) is adequate for
demonstrating Lyapunov stability. The concept of Lyapunov stability, and working knowledge required for
synthesis of linear time-invariant systems, will be provided here, in this chapter, before we start the discus-
sion on optimal control. Detailed account of Lyapunov stability will be given later in Chapter 9.
0 0
x(0) x(0)
(a) (b)
Fig. 8.1 Stability definitions
To prove stability results for systems described by equations of the form (8.3), Lyapunov introduced a
function that has many of the properties of energy. The basic Lyapunov stability result is given below.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 453
8.2.2 Lyapunov Stability Theorems
For the system (8.3), sufficient conditions of stability are as follows.
Theorem 8.1 Suppose that there exists a scalar function V(x) which satisfies the following properties:
(i) V (x) > 0; x ¹ 0
(ii) V (0) = 0 (8.4)
(iii) V (x) is continuous and has continuous partial derivatives with respect to all components of x.
.
(iv) V (x) £ 0 along trajectories of Eqn. (8.3).
We call V (x) having these properties, a Lyapunov function for the system. Properties (i) and (ii) mean
that, like energy, V (x) > 0 if any state is different from zero, but V (x) = 0 when the state is zero. Property
(iii) ensures that V (x) is a smooth function and, generally, has the shape of a bowl near the equilibrium.
A visual analysis may be obtained by considering the
V = k3 z = V(x) 0 0 0
surface
(x1 , x2, V(x ))
V(x1, x2 ) = 1
2
p1 x12 + 1
2
p2 x 22 ; p1 > 0, p2 > 0
This is a paraboloid (a solid generated by rotation of
parabola about its axis of symmetry) surface as shown in
Fig. 8.2. The value V (x1, x2) = ki (a constant) is represented
by the intersection of V (x1, x2) surface and the plane z = ki.
V = k2 This intersection results in a closed curve, an oval. If one
d a fi
plots a trajectory from the point x10 , x 20 , V x 0 , the trajec-
tory crosses the ovals V(x1, x2) = ki for successively
V = k1 smaller values of V(x1, x2), and moves towards the point
corresponding to V(x1, x2) = 0, which is the equilibrium
point. Figure 8.2 shows a typical trajectory.
x1 Property (iv) guarantees that any trajectory moves in a
way, so as never to climb higher on the bowl, than where
x2 it. started out. If property (iv) was made stronger so that
V (x) < 0 for x ¹ 0, then the trajectory must be drawn to
Fig. 8.2 Constant-V curves the origin (The trajectory in Fig. 8.2, in fact, corresponds
.
to this case, i.e., V (x) < 0).
The Lyapunov stability theorem states that, given the system of equations x& = f (x) with f (0) = 0, if there
exists a Lyapunov function for this equation, then the origin is stable in the sense of Lyapunov; in addition,
.
if V (x) < 0, x ¹ 0, then the stability is asymptotic.
This theorem on asymptotic stability and stability in the sense of Lyapunov applies in a local sense if the
region ||x(0)|| < d is small (refer Fig. 8.1); the theorem applies in the global sense when the region includes
the entire state space. The value of Lyapunov function for global stability becomes infinite with infinite
deviation (i.e., V(x) ® ¥ as ||x|| ® ¥).
The determination of stability through Lyapunov analysis centres around the choice of a Lyapunov
function V (x). Unfortunately, there is no universal method for selecting the Lyapunov function which is
unique for a given nonlinear system. Several techniques have been devised for the systematic construction of
Lyapunov functions; each is applicable to a particular class of systems. If a Lyapunov function cannot be
found, it in no way implies that the system is unstable. It only means that our attempt in trying to establish the
stability of an equilibrium state has failed. Therefore, faced with specific systems, one has to use experience,
intuition, and physical insights to search for an appropriate Lyapunov function. An elegant and powerful
454 Digital Control and State Variable Methods
Lyapunov analysis may be possible for complex systems if engineering insight and physical properties are
properly exploited. Inspite of these limitations, Lyapunov’s method is the most powerful technique available
today for the stability analysis of nonlinear systems.
For linear time-invariant systems of main concern in this chapter, the quadratic function (refer Section
5.2) is adequate for demonstrating Lyapunov stability. Consider the function
V(x) = xT Px (8.5)
where P is a symmetric positive definite matrix. The quadratic function (8.5) satisfies properties (i), (ii) and
(iii) of a Lyapunov function. We need to examine property (iv), the derivative condition, to study the stabil-
ity properties of the system under consideration.
Discrete-Time Systems: In the following, we extend the Lyapunov stability theorem to discrete-time systems:
x (k + 1) = f (x (k)); f (0) = 0 (8.6)
Our discussion will be brief because of the strong analogy between the discrete-time and continuous-
time cases.
Theorem 8.2 Suppose that there exists a Lyapunov function V(x(k)) which satisfies the following properties:
(i) V (x) > 0; x ¹ 0
(ii) V (0) = 0
(8.7)
(iii) V (x) is a smooth function; it is continuous for all x.
(iv) DV (x (k)) = [V(x (k + 1)) – V(x(k))] £ 0 along trajectories of Eqn. (8.6).
The Lyapunov stability theorem states that, given the system of equations, x (k + 1) = f (x (k)); f (0) = 0,
if there exists a Lyapunov function for this equation, then the origin is stable in the sense of Lyapunov; in
addition, if DV (x (k)) < 0 for x ¹ 0, then the stability is asymptotic.
As has been said earlier, the Lyapunov theorems give only sufficient conditions on the stability of the
equilibrium state of a nonlinear system and, furthermore, there is no unique way of constructing a Lyapunov
function. For a linear system, a Lyapunov function can always be constructed and both the necessary and
sufficient conditions on stability established.
Example 8.1 Let us determine the stability of the system described by the following equation:
x& = Ax
with
A=
LM-1 -2OP
N 1 -4 Q
We will first solve Eqn. (8.9) for P for an arbitrary choice of real symmetric positive definite matrix Q. We
may choose Q = I, the identity matrix. Equation (8.9) then becomes
ATP + PA = – I
or
LM-1 OP LM
1 p11 p12 OP LM
+ 11
p p12 -1 -2OP LM =
-1 0 OP LM OP (8.11)
N QN
-2 -4 p12 p22 Q N p12 p22 QN
1 -4 0 -1 Q N Q
Note that we have taken p12 = p21. This is because the solution matrix P is known to be a positive definite real
symmetric matrix for a stable system.
From Eqn. (8.11), we get
– 2 p11 + 2 p12 = – 1
– 2 p11 – 5 p12 + p22 = 0
– 4 p12 – 8 p22 = – 1
Solving for pij’s, we obtain
P=
LM p
11 p12 23
= 607
OP LM - 7
60
OP
Np12 p22 - 60 Q MN 11
60 PQ
Using Sylvester’s test (Section 5.2), we find that P is positive definite. Therefore, the system under consid-
eration is globally asymptotically stable at the origin.
In order to illustrate the arbitrariness in the choice of Q, consider
Q=
0 0LM OP (8.12)
0 1 N Q
This is a positive semidefinite matrix. This choice of Q is permissible since it satisfies the condition (8.10),
as is seen below.
Q=
LM OP LM OP
0 0
=
0
[0 1] = HTH
N Q NQ
0 1 1
L H OP = r LM0 1 OP = 2
rM
NHAQ N1 – 4Q
It can easily be verified that with the choice of Q given by Eqn. (8.12), we derive the same conclusion about
the stability of the system as obtained earlier with Q = I.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 457
8.3.2 Stability of Discrete-Time Linear Systems
Consider a linear system described by the state equation
x(k + 1) = Fx(k) (8.13)
where F is n ´ n real constant matrix.
Theorem 8.4 The linear system (8.13) is globally asymptotically stable at the origin if, and only if, for any
given symmetric positive definite matrix Q, there exists a symmetric positive definite matrix P, that satisfies
the matrix equation
FT PF – P = – Q (8.14)
Proof Let us first prove the sufficiency of the result. Assume that a symmetric positive definite matrix P
exists, which is the unique solution of Eqn. (8.14). Consider the scalar function
V(x) = xTPx
Note that
V(x) > 0 for x ¹ 0 and V(0) = 0
The difference
DV(x) = V(x(k + 1)) – V(x(k))
= xT(k + 1)Px(k + 1) – xT(k)Px(k)
Using Eqns (8.13)–(8.14), we get
NH F n -1 PQ
where r (.) stands for rank of a matrix.
Example 8.2 Let us determine the stability of the system described by the following equation:
x(k + 1) = Fx(k)
458 Digital Control and State Variable Methods
with
F=
LM-1 -2OP
N 1 - 4Q
We will first solve Eqn. (8.14) for P for an arbitrary choice of real symmetric positive definite matrix Q. We
may choose Q = I, the identity matrix. Equation (8.14) then becomes
FTPF – P = – I
or
LM -1 1OP LM p
11 p12 OP LM-1 -2OP - LM p 11 p12 OP = LM-1 0OP
N-2 -4Q N p 12 p22 Q N 1 -4Q N p 12 p22 Q N 0 -1Q
or – 2p12 + p22 = – 1
2p11 + p12 – 4p22 = 0
4p11 + 16p12 + 15p22 = – 1
Solving for pij’s, we obtain
P=
LM p
11 p12OP LM
=
- 43
60
11
30
OP
Np12 p22 Q N 11
30 - 4
15 Q
Using Sylvester’s test (Section 5.2) we find that P is negative definite. Therefore, the system under consid-
eration is unstable.
In previous chapters, we encountered various methods for designing feedback control laws, ranging from
root-locus and Bode-plot techniques to pole-placement by state feedback and state estimation. In each case,
the designer was left with decisions regarding the locations of closed-loop poles. We have given a fairly
complete treatment of these design techniques for linear time-invariant single-variable systems.
Here in this chapter, a somewhat different approach to design is taken. The performance of the system is
measured with a single scalar quantity—the performance index. A configuration of the controller is selected
and free parameters of the controller that optimize (minimize or maximize as the case may be) the perform-
ance index are determined. In most industrial control problems, the nature of the performance index is such
that the design process requires its minimization.
The design approach based on parameter optimization consists of the following steps:
(i) Compute the performance index J as a function of the free parameters k1, k2, K, kn, of the system with
fixed configuration:
J = J(k1, k2, K, kn) (8.16)
(ii) Determine the solution set ki of the equations
¶J
= 0; i = 1, 2, K, n (8.17)
¶k i
Equations (8.17) give the necessary conditions for J to be minimum. From the solution set of these
equations, find the subset that satisfies the sufficient conditions, which require that the Hessian matrix
given below is positive definite.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 459
LM ¶ J 2
¶ 2J
L
¶ 2J OP
2
MM ¶k 2
1
¶k1¶k 2 ¶k1¶k n PP
¶ J ¶ 2J ¶ 2J
H = M ¶k ¶k
MM M 2 1 ¶k 22
L
¶k 2 ¶k n
PP (8.18)
MM ¶ J
2
M
2
M
2
PP
¶ J ¶ J
MN ¶k ¶k L
¶k n2
PP
n 1 ¶k n ¶k 2 Q
¶2J ¶ 2J
Since = ,
¶ki ¶k j ¶k j ¶k i
the matrix H is always symmetric.
(iii) If there are two or more sets of ki satisfying the necessary as well as sufficient conditions of minimiza-
tion of J, then compute the corresponding J for each set. The set that gives the smallest J is the
optimum set.
Selection of an appropriate performance index is as much a part of the design process, as the minimization of
the index. We know that the performance of a control system can be adequately specified in terms of settling
time, peak overshoot, and steady-state error. The performance index could then be chosen as
J=D K (settling time) + K (peak overshoot) + K (steady-state error)
1 2 3
where the Ki are weighing factors.
Although the criterion seems reasonable, it is not trackable analytically. A compromise must be made
between specifying a performance index which includes all the desired system characteristics, and a per-
formance index which can be minimized with a reasonable amount of computation.
In the following, we present several performance indices which include the desired system characteristics
and, in addition, have good mathematical trackability. These indices often involve integrating some function
of system error over some time interval when the system is subjected to a standard command or disturbance
such as step. A common example is the integral of absolute error (IAE) defined by
¥
D
IAE = z
0
|e(t)| dt
If the index is to be computed numerically, the infinite upper limit can be replaced by the limit tf , where tf is
large enough so that e(t) is negligible for t > tf . This index is not unreasonable since both the fast but highly
oscillatory systems and the sluggish systems will give large IAE value (see Fig. 8.3). Minimization of IAE by
adjusting system parameters will provide acceptable relative stability and speed of response. Also, a finite
value of IAE implies that the steady-state error is zero.
Another similar index is the integral of time multiplied by absolute error (ITAE), which exhibits the
additional useful features that the initial large error (unavoidable for a step input) is not heavily weighted,
whereas errors that persist are more heavily weighted.
¥
D
ITAE = z
0
t | e(t)| dt
The integral of square error (ISE) and integral of time multiplied by square error (ITSE) indices are analo-
gous to IAE and ITAE criteria, except that the square of the error is employed for three reasons: (i) in some
applications, the squared error represents the system’s power consumption, (ii) squaring the error weighs
large errors more heavily than small errors, and (iii) the squared error is much easier to handle analytically.
460 Digital Control and State Variable Methods
¥
D
ISE = z
0
e2(t) dt
¥
ITSE = z
D te2(t) dt
y
r Gain Gain Gain
too high optimum too low
IAE
t
Fig. 8.3 The IAE optimal response criterion
The system whose design minimizes (or maximizes) the selected performance index with no constraints
on controller configuration is, by definition, optimal.
The difference between parameter optimization and optimal control problems is that no constraint on
controllers is imposed on the latter. In optimal design, the designer is permitted to use controllers of any
degree and any configuration, whereas in parameter optimization the configuration and the type of control-
lers are predetermined. Since there is no constraint imposed on controllers, optimal design results in a better
system, i.e., lower value of the performance index.
However, because of considerations other than minimization of the performance index, one may not build
an optimal control system. For example, optimal solutions to the problem of control of a linear time-invari-
ant plant may result in a nonlinear and/or time-varying system. Hardware realization of such an optimal
control law may be quite difficult and expensive. Also, in many control problems, the optimal solution gives
an open-loop control system which is successful only in the absence of meaningful disturbances. In practical
systems, then, it may be more sensible to seek suboptimal control laws: we select a feedback control con-
figuration and the type of controller, based on considerations of cost, availability of components, etc., and
then determine the best possible values of the free parameters of the controller that minimize the given
performance index. Modifications in control configuration and the type of controller are made until a satis-
factory system is obtained—which has performance characteristics close to the optimal control system we
have worked out in theory.
There exists an important class of optimal control problems for which quite general results have been
obtained. It involves control of linear systems with the objective of minimizing the integral of a quadratic
performance index. An important feature of this class of problems is that optimal control is possible by
feedback controllers. For linear time-invariant plants, the optimal control results in a linear time-invariant
closed-loop system. The implementation of optimal control is, therefore, simple and less expensive. Many
problems of industrial control belong to this class of problems—linear quadratic optimal control problems.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 461
As we shall see later in this chapter, the linear quadratic optimal control laws have some computational
advantage, and a number of useful properties. The task of the designer shifts to the one of specifying various
parameters in the performance index.
In the previous chapters, we have been mostly concerned with the design of single-variable systems.
Extensions of the root-locus method and the Bode/Nyquist-plot design to multivariable cases have been
reported in the literature. However, the design of multivariable systems using these techniques is much more
complicated than the single-variable cases. Design of multivariable systems through pole-placement can
also be carried out; the computations required are however highly complicated.
The optimal control theory provides a simple and powerful tool for designing multivariable systems.
Indeed, the equations and computations required in the design of optimal single-variable systems and those
in the design of optimal multivariable systems are almost identical. We will use, therefore, in this chapter,
the multi-input, multi-output (MIMO) state variable model in the formulation of optimal control problem.
The objective set for the rest of this chapter is the presentation of simple, and analytically solvable,
optimal control and parameter optimization problems. This will provide insight into optimal and suboptimal
structures and algorithms that may be applied in practical cases. For detailed study, specialized books on
optimal control [109–124] should be consulted. A moderate treatment of the subject is also available in
reference [105].
Commercially available software [152–154] may be used for solving complex optimal/suboptimal control
problems.
z
J = [y(t) – yr]2 dt
0
(8.19a)
z
= e2(t) dt
0
(8.19b)
where yr is the command or set-point value of the output, y(t) is the actual output, e(t) = y(t) – yr is the error
of the system.
This criterion, which has good mathematical trackability properties, is acceptable in practice, as a meas-
ure of system performance. The criterion penalizes positive and negative errors equally. It penalizes heavily
on large errors; hence a small J usually results in a system with small overshoot. Since the integration is
carried out over [0, ¥), a small J limits the effect of small error lasting for long time and, thus, results in a
small settling time. Also, a finite J implies that the steady-state error is zero.
The optimal design obtained by minimizing the performance index given by Eqns (8.19) may be
unsatisfactory, because it may lead to excessively large magnitudes of control signals. A more realistic
solution to the problem is reached, if the performance index is modified to account for physical constraints
like saturation in physical devices. Therefore, a more realistic performance index is of the form:
¥
z
J = e2(t) dt
0
(8.20a)
z0
u2(t) dt (8.21)
We would, very much, like to replace the performance criterion given by (8.20) by the following quadratic
performance index:
¥
J= z
0
[e2(t) + u2(t)] dt
By adjusting the weighting factor l, we can weigh the relative importance of the system error and the
expenditure of energy. By increasing l, i.e., by giving sufficient weight to control effort, the amplitude of the
control signal, which minimizes the overall performance index, may be kept within practical bounds,
although at the expense of the increased system error. Note that as l ® 0, the performance index reduces to
the integral square error criterion. In this case, the magnitude of u(t) will be very large and the constraint
given by (8.20b) may be violated. If l ® ¥, the performance index reduces to the one given by Eqn. (8.21),
and the optimal system that minimizes this J is one with u = 0. From these two extreme cases, we conclude
that if l is properly chosen, then the constraint of Eqn. (8.20b) will be satisfied.
Example 8.3 For the system of Fig. 8.4, let us compute the value of K that minimizes ISE for the unit-
step input.
For the system under consideration,
E ( s) s
r + 1 y =
e K u R( s) s + K
s
– For unit-step input,
1
Controller Plant E(s) =
s+ K
Therefore, e(t) = e–Kt
Fig. 8.4 Control system for parameter
¥
optimization
0
z
1
ISE = e2(t) dt =
2K
Obviously, the minimum value of ISE is obtained as K ® ¥. This is an impractical solution, resulting in
excessive strain on the physical components of the system.
Sound engineering judgement tells us that we must include the ‘cost’ of the control effort in our perform-
ance index. The quadratic performance index
¥
J= z
0
[e2(t) + u2(t)] dt
z
J = [e2(t) + lu2(t)] dt; l = 0.5
0
For the system under consideration,
J 1 K
J= +l
2K 2
2 ¶J
= 0 gives
=1 ¶K
Example 8.4 Consider the liquid-level system shown in Fig. 8.6. h represents the deviation of liquid head
from the steady-state value H .
The pump controls the liquid head h by supplying liquid at a rate ( Qi + qi) m3/sec to the tank. We shall
assume that the flow rate qi is proportional to the error in liquid level (desired level – actual level). Under
these assumptions, the system equations are [155]:
dh rgh
(i) A = qi –
dt R
where A = area of cross-section of the tank;
D incremental change in pressure across
R = total resistance offered by the tank outlet and pipe (R =
the restriction/incremental change in flow through the restriction);
r = density of the liquid, and
g = acceleration due to gravity.
464 Digital Control and State Variable Methods
Desired
level Actual level
Controller
Measurement
system
H +h
Q i +qi
Pump R
Fig. 8.6 A liquid-level system
(ii) qi = Ke
where e = error in liquid level and K = gain constant
R
Let A = 1, and = 1. Then
rg
H ( s) 1
=
Qi ( s) s + 1
The block diagram representation is given in Fig. 8.7. The output y(t) = h(t) is the deviation in liquid head
from steady-state value. Therefore, the output y(t) is itself the error which is to be minimized. Let us pose the
problem of computing the value of K that minimizes the ISE for the initial condition y(0) = 1.
y (0)
+ y(t) = h(t)
e qi = u + +
K
– –
Process
Fig. 8.7 Block diagram representation of the system shown in Fig. 8.6
z
J = [y2(t) + u2(t)] dt
0
From Fig. 8.7, we have
u(t) = – Ky(t)
Therefore,
u(t) = – Ke–(1 + K)t
1 K2
J= +
2 (1 + K ) 2 (1 + K )
¶J b g
= 0 gives K = 2 -1
¶K
Note that
¶ 2J 2
= >0
¶K 2 (1 + K ) 3
The minimum value of J is d 2 -1 . i
8.5.1 State Regulator Problem
The performance index given by Eqn. (8.22), is a translation of the requirement of regulation of the system
output, with constraints on amplitude of the input applied to the plant. We now extend the proposed perform-
ance index for the control problem where all the state variables of the system are to be regulated. We use
multivariable formulation of the plant model.
Consider the control problem where the objective is to maintain the system state given by the n ´ 1 state vector
x(t), near the desired state xd (which, in many cases, is the equilibrium point of the system) for all time.
Relative to the desired state xd, (x(t) – xd) can be viewed as the instantaneous system error. If we trans-
form the system coordinates such that the desired state becomes the origin of the state space, then the new
state x(t) is itself the error.
One measure of the magnitude of the state vector x(t) (or of its distance from the origin) is the norm || x(t) ||
defined by
||x(t)||2 = xT(t)x(t)
Therefore,
¥ ¥
z z
J = [xT(t)x(t)] dt = [ x12 (t) + x 22 (t) + L + x n2 (t)] dt
0 0
is a reasonable measure of the system transient response.
In practical systems, the control of all the states of the system is not equally important. To be more
general,
¥
z
J = [xT(t)Qx(t)]dt
0
(8.23)
with Q as n × n real, symmetric, positive definite (or positive semidefinite) constant matrix, can be used as
a performance measure. The simplest form of Q one can use is the diagonal matrix:
466 Digital Control and State Variable Methods
LMq 1 0 L 0 OP
0 q2 L 0
Q= M P
MM M M MP
P
N0 0 L q Q
n
The ith entry of Q represents the weight the designer places on the constraint on the state variable xi(t). The
larger the value of qi relative to the other values of q, the more control effort is spent to regular xi(t).
The design obtained by minimizing the performance index of the form (8.23) may be unsatisfactory in
practice. A more realistic solution is obtained if the performance index is modified by adding a penalty term
for physical constraints on the p × 1 control vector u(t). One of the ways of accomplishing this is to introduce
the following quadratic control term in the performance index:
¥
z
J = [uT(t)Ru(t)] dt
0
(8.24)
where Q is a q ´ q positive definite (or positive semidefinite) real, symmetric constant matrix, and R is a p ´ p
positive definite, real, symmetric, constant matrix.
Substituting y = Cx in Eqn. (8.26a), we get
¥
J= 1
2 z
0
(xTCTQCx + uTRu) dt (8.26b)
Comparing Eqn. (8.26b) with Eqn. (8.25) we observe that the two indices are identical in form; Q in
Eqn. (8.25) is replaced by CTQC in Eqn. (8.26b). If we assume that the plant is completely observable, then
C cannot be zero; CTQC will be positive definite (or positive semidefinite) whenever Q is positive definite
(or positive semidefinite).
Thus, the solution to the output regulator problem directly follows from that of the state regulator problem.
1
As we shall see in Section 8.7, positive definiteness of R is a necessary condition for the existence of the optimal
solution to the control problem.
2
Note that multiplication by 1/2 does not affect the minimization problem. The constant helps us in mathematical
manipulations as we shall see later in Section 8.7.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 467
where Q is a positive definite (or positive semidefinite), real, symmetric constant matrix, and R is a positive
definite, real, symmetric, constant matrix.
An important feature (proved later in Section 8.7) of this class of problems, is that optimal control is
possible by feedback control law of the form
u(t) = – Kx(t) (8.29a)
where K is a p ´ n constant matrix, or
LM u OP LM k
1 11 k12 L k1n OP LM x OP
1
L
MMuM PP = – MM kM
2 21 k 22
M
k2n P M
M P MMP
x P
2
(8.29b)
MMNu PPQ MMNk
p p1 k p2 L pn
PM P
k PQ N x Qn
If the unknown elements of the matrix K are determined so as to minimize the performance index given
by Eqn. (8.28), then the control law given by Eqns (8.29) is optimal. The configuration of the optimal
closed-loop control system is represented by the block diagram of Fig. 8.8. As we shall see later in this
chapter, controllability of the plant (8.27) and positive definiteness of matrix Q in the performance index
(8.28), are sufficient conditions for the existence of
Disturbance w asymptotically stable (x(t) ® 0 as t ® ¥) optimal
solution to the control problem.
It may be noted that the optimal solution obtained
0 + Input u Output y
by minimizing the performance index (8.28) may not
Plant
be the best solution in all circumstances. For exam-
–
ple, all the elements of the matrix K may not be free;
State x some gains are fixed by the physical constraints of
K the system and are, therefore, relatively inflexible.
Similarly, if all the states x(t) are not accessible for
Fig. 8.8 Control configuration of a state feedback, one has to go for a state observer whose
regulator complexity is comparable to that of the system itself.
468 Digital Control and State Variable Methods
It is natural to seek a procedure that relies on the use of feedback from the accessible state variables only,
constraining the gain elements of matrix K corresponding to the inaccessible state variables, to have zero
value (Section 8.9). Thus, whether one chooses an optimal or suboptimal solution depends on many factors
in addition to the performance required out of the system.
Plant
u x y
x = Ax + Bu C
+ +
+ x x y –
B n
C
+
n-parallel
integrators
M
Observer
To design gain matrix M, we may use the duality between control and estimation problems, developed in
Section 7.5. (refer Table 7.1). As per the duality principle, the problem of determination of gain matrix
Linear Quadratic Optimal Control Through Lyapunov Synthesis 469
M, for the optimal state observer, is mathematically equivalent to designing optimal state regulator for the
‘transposed auxiliary system’ (refer Eqns (7.36))
z& (t) = AT z (t) + CTh (t) (8.32a)
The design problem is to determine n × q gain matrix M such that
h(t) = – MT z (t) (8.32b)
minimizes a quadratic performance index of the form
¥
J= 1
2 z
0
( z TQ0 z + h TR0h) dt (8.33)
where Q0 is a positive definite (or positive semidefinite), real, symmetric constant matrix, and R0 is a
positive definite, real, symmetric constant matrix.
The solution to this problem exists if the auxiliary system (8.32) is completely controllable. This condi-
tion is met, if the original system (8.27) is completely observable.
The separation principle (refer Section 7.6) allows for the separate designs of state-feedback control law
and state observer; the control law and the observer are then combined as per the configuration of Fig. 8.10.
The weighting matrices Q0 and R0, for the observer design, can be assumed to be equal to the weighting
matrices Q and R, respectively, of the control-law design. Generally, however, one would design a faster
Plant Sensor observer in comparison with the regulator, i.e., for Q0 =
u x y Q, the elements of R0 are chosen smaller than those of R.
x = Ax + Bu C
The above solution, to the state estimation problem
based on duality between the control and estimation,
can be formalized by using “Optimal Filtering Theory”.
The formal development of the result extends beyond
the scope of this text [105]. We may, however, use the
x term “optimal filter” for the state observer designed by
–K x = Ax + Bu + M (y – Cx )
the procedure given here in the text.
Control law Observer An optimal filter whose weighting motion Q0 and R0
Fig. 8.10 Combined state-feedback are determined by the “spectral properties” of the exog-
control and state estimation enous noise signals is termed a Kalman filter [105].
The parameter optimization problem, as explained earlier, refers to the problem of obtaining the optimum
values of free parameters in a predetermined control configuration. In optimal control design, the designer
is permitted to use controllers of any degree and any configuration. Optimal solutions to the problem of
control of a linear time-invariant plant, may result in a nonlinear and/or time-varying system [105]. Also, in
many control problems, the optimal solution gives an open-loop control system [105].
For an important class of control problems, which involves control of linear time-invariant plants with the
objective of minimizing the integral of a quadratic performance index, the optimal control is possible by
state-feedback control that results in a linear time-invariant closed-loop system. Many problems of industrial
control belong to this class of problems—linear quadratic optimal control problems.
To prove this important result, we consider the optimal control problem for a linear multivariable com-
pletely controllable plant
x& = Ax + Bu (8.34)
where x is the n ´ 1 state vector, u a p ´ 1 input vector; A and B are, respectively, n ´ n and n ´ p real
constant matrices, and the null state x = 0 is the desired steady-state.
The objective is to find the optimal control law that minimizes the following performance index, subject
D x0 :
to the initial conditions x(0) =
¥
J = 1
2 z
0
(xT Qx + u T Ru)dt (8.35)
where Q is n ´ n positive definite, real, symmetric, constant matrix, and R is p ´ p positive definite, real,
symmetric, constant matrix.
Since the (A, B) pair is completely controllable3, there exists a state-feedback control law
u = – Kx (8.36)
where K is p ´ n real, constant, unconstrained gain matrix, that results in an asymptotically stable closed-
loop system (refer Section 7.3)
x& (t) = (Ax – BKx) = (A – BK)x (8.37)
This implies that there is a Lyaponov function V = 12 xT Px for the closed-loop system (8.37); that is, for
some positive definite matrix P, the time derivative dV/dt evaluated on the trajectories of the closed-loop
system is negative definite. We now state and prove a condition for u = – Kx (t) to be optimal [35].
3
The controllability of the (A, B) pair is not a necessary condition for the existence of the optimal solution. If the
(A, B) pair is not completely controllable, we can transform the plant model to controllability canonical from given
in Eqn. (5.123c). It decomposes the model into two parts: the controllable part and the uncontrollable part. If the
uncontrollable part is stable, then the model is said to be stabilizable. Stabilizability of the (A, B) pair is a necessary
condition for the existence of optimal solution.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 471
Theorem 8.5 If the state-feedback controller u = – Kx (t) is such that it minimizes the function
f (u ) =
dV 1 T
dt
(
+ 2 x Qx + uT Ru , ) (8.38)
and the minimum value of f (u) = 0 for some V = 12 xT Px, then the controller is optimal.
Proof We can represent (8.38) as (denoting minimizing u by u*)
dV T
+ 12 xT Qx + 12 u* Ru* = 0
dt u =u*
Hence
dV T
= − 12 xT Qx − 12 u* Ru*
dt u =u*
Integrating both sides with respect to time from 0 to ¥, we obtain
V ( x ( ∞ )) − V ( x ( 0 )) = − 12 ∫
∞
0 (x Qx + u
T *T
Ru* dt)
Because, by assumption, the closed-loop system is asymptotically stable, we have x(¥) = 0; therefore,
V ( x ( 0 )) = 12 xT ( 0 ) Px ( 0 ) = 1 ∞
∫
2 0 (x Qx + u
T *T
Ru* dt)
Thus, if a linear stabilizing controller satisfies the hypothesis of the theorem, then the value of the per-
formance index (8.35) for such a controller is
( )
J u* = 12 xT ( 0 ) Px ( 0 )
Since u minimizes the function in (8.38) and the minimum value is zero, for any u different from u*, the
*
implying that
( )
J u* ≤ J (uˆ )
for any uˆ ≠ u . Therefore, the controller u is optimal.
* *
It follows from the above theorem that the synthesis of optimal control law involves finding an appropri-
ate Lyapunov function, or equivalently, the matrix P. The matrix P is found by minimizing
dV 1 T
f (u ) = + x Qx + 12 uT Ru (8.39)
dt 2
We first apply to (8.39) the necessary conditions for unconstrained minimization.
∂ ⎛ dV 1 T ⎞
⎜ + 2 x Qx + 12 uT Ru ⎟ =0
∂u ⎝ dt ⎠ u =u*
472 Digital Control and State Variable Methods
Differentiating the above yields
∂ ⎛ dV 1 T
⎜
∂u ⎝ dt
⎞ ∂ 1 T
+ 2 x Qx + 12 uT Ru ⎟ =
⎠ ∂u
2 (( )
x& Px + xT Px& + 12 xT Qx + 12 uT Ru )
∂ T
=
∂u
(
x Px& + 12 xT Qx + 12 uT Ru )
∂ T
=
∂u
(
x PAx + xT PBu + 12 xT Qx + 12 uT Ru )
= BT PT x + Ru = 0 = BT Px + Ru
Hence, a candidate for an optimal control law has the form
u* = −R −1BT Px = −Kx (8.40)
where K = R − 1B T P
∂2 ∂
Note that
∂u 2
f (u ) =
∂u
(BT PT x + Ru ) = RT = R, a positive definite matrix.
Thus, the second-order sufficiency condition, for u* to minimize (8.39), is satisfied.
We now turn our attention to finding an appropriate P. The optimal closed-loop system has the form
x& = ( A − BR −1BT P ) x ; x ( 0 ) @ x 0
Our optimal controller satisfies the equation
dV T
+ 12 xT Qx + 12 u* Ru* = 0
dt u=u*
that is,
T
xT PAx + xT PBu* + 12 xT Qx + 12 u* Ru* = 0
We substitute u* given by (8.40) into the above equation, and represent it as
1
2 ( )
xT AT P + PA x − xT PBR −1BT Px + 12 xT Qx + 12 xT PBR −1BT Px = 0
Factoring out x yields
x T ( A T P + PA + Q – PBR –1B T P )x = 0
1
2
The above equation should hold for any x. For this to be true, we have to have
(A
P + PA + Q − PBR −1BT P = 0
T
) (8.41)
The above equation is referred to as algebraic Riccati equation. In conclusion, the synthesis of the opti-
mal linear state-feedback controller, minimizing the performance index
J= 1 ∞
∫
2 0 (x Qx + u Ru ) dt
T T
subject to
x& = Ax + Bu; x ( 0 ) @ x0
requires solving the matrix Riccati equation given by (8.41).
Controllability of (A, B) pair and positive definiteness of Q are sufficient conditions for the existence of
asymptotically stable optimal solution to the control problem. This implies that there is a Lyapunov function
V = 12 xT Px for the closed-loop system (8.37); that is, for positive definite matrix P, the time derivative
evaluated on the trajectories of the closed-loop system,
Linear Quadratic Optimal Control Through Lyapunov Synthesis 473
dV .
= V = − 12 xT Qx − 12 uT Ru
dt
= − 12 xT (Q + K T RK )x (8.42)
is always negative definite.
We now study the effect of choosing a positive semidefinite Q in the performance index J. If Q is positive
semidefinite and in addition the following rank condition is satisfied,
LM H OP
HA
rM
MM M PP = n; Q = H H, T
(8.43)
NHAn -1 PQ
.
then V (x) < 0 for all x ¹ 0.
.
We prove this result by contradiction: the rank condition is satisfied but V (x) = 0 for some x ¹ 0. Substitut-
ing Q = HTH in Eqn. (8.42), we obtain (refer Eqns (5.6))
.
V (x) = – 1
2 (xTHTHx + xTKTRKx) = – 1
2 [|| Hx ||2 + || Kx || 2R ]
Therefore, Hx = 0 and Kx = 0 should be simultaneously satisfied. Kx = 0 reduces the closed-loop system
(8.37) to the open-loop system
x& = Ax
From the condition
Hx = 0
we obtain
H x& = HAx = 0
Continuing the process of taking derivative, we get
HA2x = 0
M
HAn – 1x = 0
LM H OP
or MM HA PP x = Vx = 0
M
MNHA n -1 PQ
Since r[V] = n, Vx = 0 only when x = 0. This proves the result.
Let us see an alternative interpretation of the rank condition (8.43). The rank condition implies that the system
x& = Ax + Bu
with the ‘auxiliary output’
z (t) = Hx(t)
is completely observable. Since the performance index
¥ ¥
J= 1
2 z
0
(xTQx + uTRu)dt = 1
2 z
0
(xTHTHx + uTRu) dt
¥
= 1
2 z
0
( z T z + uTRu) dt,
474 Digital Control and State Variable Methods
the observability of the pair (A, H) implies that all the modes of the state trajectories are reflected in the
performance index. A finite value of J, therefore, ensures that unstable modes (if any) have been stabilized4
by the control u = – Kx.
The observability condition is always satisfied when the matrix Q is positive definite.
The design steps may now be stated as follows:
(i) Solve the matrix Riccati equation (8.41) for the positive definite matrix P.
(ii) Substitute this matrix P into Eqn. (8.40); the resulting equation gives optimal control law.
This is a basic and well-known result in the theory of optimal control. Once the designer has
specified Q and R, representing his/her assessment of the relative importance of various terms in the per-
formance index, the solution of Eqn. (8.41) specifies the optimal control law (8.40). This yields the optimal
closed-loop system. If the resulting transient response is unsatisfactory, the designer may alter the weighting
matrices Q and R, and try again.
Comments
(i) The matrix R has been assumed to be positive definite. This is a necessary condition for the existence
of the optimal solution to the control problem, as seen from Eqn. (8.40).
(ii) We have assumed that the plant (8.34) is completely controllable, and the matrix Q in performance
index J, given by Eqn. (8.35), is positive definite. These are sufficient conditions for the existence of
asymptotically stable optimal solution to the control problem. The requirement on matrix Q, may be
relaxed to a positive semidefinite matrix with the pair (A,H) completely observable, where Q = HTH.
(iii) It is important to be able to find out whether the sought-after solution exists or not, before we start
working out the solution. This is possible only if necessary conditions for the existence of asymptoti-
cally stable optimal solution are established. A discussion on this subject entails not only controlla-
bility and observability, but also the concepts of stabilizability and detectability. Basic ideas about
these concepts have been given in footnotes of this chapter; a detailed discussion is beyond the scope
of this book.
(iv) Equation (8.41) is a set of n2 nonlinear algebraic equations. Since P is a symmetric matrix, we need to
solve only
n(n + 1) equations.
2
(v) The solution of Eqn. (8.41) is not unique. Of the several possible solutions, the desired answer is
obtained by enforcing the requirement that P be positive definite. The positive definite solution of
Eqn. (8.41) is unique.
(vi) In very simple cases, the Riccati equation can be solved analytically, but usually a numerical solution
is required. A number of computer programs for the purpose are available [152–154]. Appendix A
provides some MATLAB support.
4
Observability canonical form for a state model which is not completely observable, is given in Eqn. (5.124c). It
decomposes the model into two parts: the observable part and the unobservable part. If the unobservable part is
stable, then the model is said to be detectable.
In the optimization problem under consideration, the observability of the pair (A, H) is not a necessary condition
for the existence of a stable solution. If the pair (A, H) is detectable, then the modes of state trajectories, not reflected
in J, are stable and a finite value of J will ensure asymptotic stability of the closed-loop system.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 475
(vii) Note that the optimal state regulator requires that all the parameters of matrix K in the control law
(8.36), are free parameters. However, all the parameters of matrix K may not be available for adjust-
ments. The gain elements of matrix K, corresponding to inaccessible state variables, may be con-
strained to zero value (otherwise, a state observer will be required). Also, some gains may be fixed by
physical constraints of the system. This leads to the parameter optimization problem: optimization of
free parameters in the matrix K. The difference between parameter optimization and optimal control
problems is that no constraint on controllers is imposed on the latter. A solution to parameter optimi-
zation (suboptimal control) problem will be given in Section 8.9.
Example 8.5 Consider the problem of attitude control of a rigid satellite which was discussed in Example 7.1.
An attitude control system for the satellite that utilizes rate feedback is shown in Fig. 8.11; q (t) is the actual
attitude, qr(t) is the reference attitude which is a step function, and u(t) is the torque developed by the
thrusters.
+ + u 1 x2 1 y = x1 =
r
k1
s s
– –
k2
A=
LM0 1OP ; B = LM0OP ; C = [1 0]
N0 0 Q N1Q
The problem is to obtain the optimal control law
u = – k1(x1 – qr) – k2x2; x1 = q, x2 = q&
that minimizes the performance index
¥
z
J = [(qr – q) 2 + u2] dt
0
(8.45)
Q=
LM2 0OP ; R = 2
N 0 0Q
Note that Q is positive semidefinite matrix.
L 2O
T
Q=H H= M P [ 2 0]
N0Q
The pair (A,H) is completely observable. Also, the pair (A,B) is completely controllable. Therefore,
sufficient conditions for the existence of asymptotically stable optimal solution are satisfied.
The matrix Riccati equation is
ATP + PA – PBR–1BTP + Q = 0
or
LM0 0OP L p p O + L p
11 12 11 p12 OP LM0 1OP
N1 0Q MN p p PQ MN p
12 22 12 p22 Q N 0 0Q
–M
L p p OP LM0OP [ ] [0
11 12 1
1]
LM p 11 p12
+
OP LM OP LM OP
2 0
=
0 0
2
N p p Q N1Q
12 22 Np 12 p22 Q N Q N Q
0 0 0 0
Upon simplification, we get
2
- p12
+2=0
2
p p
p11 – 12 22 = 0
2
2
- p22
+ 2p12 = 0
2
Solving these three simultaneous equations for p11, p12, and p22, requiring P to be positive definite, we obtain
P=
LM2 2 2 OP
N2 2 2Q
The optimal control law is given by
u = – R–1BTP ~
x (t) = – [ 12 ] [0 1]
LM2 2 2 OP L x~ O
1
N2 2
M x PQ
2 Q N~ 2
=– ~x1 (t) – 2 ~
x 2 (t) = – (x1 – qr) – 2 x2
It can easily be verified that the closed-loop system is asymptotically stable.
Example 8.6 Consider the liquid-level system of Fig. 8.6. In Example 8.4, we designed an optimal regulator
for this process by direct parameter optimization. In the following, we use the Riccati equation for designing
the optimal regulator. The state equation of the process is
dy
=–y+u (8.48)
dt
where
y = deviation of the liquid head from the steady-state; and
u = rate of liquid inflow.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 477
The performance index
¥
z
J = (y2 + u2) dt
0
For this design problem,
A = –1, B = 1, Q = 2, R = 2
The Riccati equation is
ATP + PA – PBR–1BTP + Q = 0
P2
or –P–P– +2=0
2
Solving for P, requiring it to be positive definite, we get
P=2 b 2 -1 g
The optimal control law is
u = – R–1BTPy(t) = – b g
2 - 1 y(t)
Substituting in Eqn. (8.48), we get the following equation for the closed-loop system:
dy
=– 2y
dt
Obviously, y(t) ® 0 for any initial displacement y(0).
Assume now that a constant disturbance due to the pump enters the system as shown in Fig. 8.12. This
type-0 regulator system cannot reject the disturbance; there will be a steady-state offset in the liquid head y.
Let us introduce integral control to eliminate this offset.
Defining the integral state z by
Disturbance w
z& (t) = y(t),
we get the following augmented system:
+
u + y LM y& OP = L-1 0O LM y OP + LM1OP u
Process (8.49)
– N z& Q MN 1 0PQ N z Q N0Q
Now the design problem is to obtain the control law
( 2 – 1) u = – k1y(t) – k2z(t)
that minimizes
Fig. 8.12 Optimal control of the liquid-level ¥
Q=
LM2 0OP , R = 2
N0 0Q
The state equation (8.49) is completely controllable, satisfying one of the sufficient conditions for the exist-
ence of the optimal solution.
The matrix Q is positive semidefinite;
Q = HTH =
LM 2 OP [ 2 0]
N0Q
478 Digital Control and State Variable Methods
The pair
FG L-1 0O, 2 0
IJ is not completely observable. Therefore, the other sufficient condition for the
H MN 1 0PQ K
existence of the asymptotically stable optimal solution is not satisfied. It can easily be verified that a positive
definite solution to the matrix Riccati equation does not exist in this case; the chosen matrix Q cannot give a
closed-loop stable optimal system.
We now modify the performance index to the following:
¥
z
J = (y2 + z2 + u2) dt
0
The Q and R matrices are
Q=
LM2 0OP , R = 2
N0 2Q
Since Q is positive definite matrix, the asymptotically stable optimal solution exists.
The matrix Riccati equation is
ATP + PA – PBR–1BTP + Q = 0
or
LM-1 1OP LM p 11 OP + LM p
p12 11 p12OP LM-1 0OP
N 0 0Q N p 12 p Q Np 22 12 p Q N 1 0Q
22
Lp 11 p O L 1O
12 1 L p p OP + LM2 0OP = LM0 0OP
11 12
– M M P [ ][1 0] M
Np 12 p PQ N0Q
22
2
N p p Q N 0 2 Q N0 0 Q
12 22
From this equation, we obtain the following three simultaneous equations:
2
– 2p11 + 2p12 – 21 p11 +2=0
p p
– p12 + p22 – 11 12 = 0
2
2
- p12
+2=0
2
Solving for p11, p12 and p22, requiring P to be positive definite, we obtain
P=
2 2 LM OP
2 4 N Q
The gain matrix
+ u
u = – y(t) – z(t) = – y(t) – y(t)dt
y
z
0
Process The block diagram of Fig. 8.13 shows the configura-
– –
tion of the optimal control system employing state-
feedback and integral control. It is a type-1 regulator
system.
Since at steady-state
Fig. 8.13 Optimal control system employing
z& (t) ® 0,
state-feedback and integral control
Linear Quadratic Optimal Control Through Lyapunov Synthesis 479
therefore,
y(t) ® 0,
and there will be no steady-state offset in the liquid head y, even in the presence of constant disturbances
acting on the plant.
This section covers the key results on the design of optimal controllers for discrete-time systems. Our
discussion will be brief because of the strong analogy between the discrete-time and continuous-time cases.
Consider the discretized model of the given plant:
x(k + 1) = Fx(k) + Gu(k); x(0) = D x0
(8.50)
y(k) = Cx(k)
where x is the n ´ 1 state vector, u is the p ´ 1 input vector, y is the q ´ 1 output vector; F, G, and C are,
respectively, n ´ n, n ´ p, and q ´ n real constant matrices; and k = 0, 1, 2, K We will assume that the null
state x = 0 is the desired steady-state; x(k) is, thus, the system-error vector at t = kT , where T is the sampling
interval. The state variable model (8.50) is assumed to be completely controllable and observable.
We shall be interested in selecting the controls u(k); k = 0, 1, K, which minimize a performance index of
the form
¥
J= 1
2 å [xT(k)Qx(k) + uT(k)Ru(k)] (8.51)
k = 0
where Q is an n ´ n positive definite, real, symmetric, constant matrix (or a positive semidefinite, real,
symmetric, constant matrix with the restriction that the pair (F,H) is observable, where HTH = Q), and R is
a p ´ p positive definite, real, symmetric, constant matrix. This criterion is the discrete analog of that given
by Eqn. (8.25); a summation replaces integration.
An important feature (proved later in this section) of this class of problems is that optimal control is
possible by feedback control law of the form (refer Fig. 8.14)
u(k) = – Kx(k) (8.52)
where K is a p ´ n constant matrix. If the unknown elements of matrix K are determined so as to minimize
the performance index given by Eqn. (8.51), the control law given by Eqn. (8.52) is optimal.
The control problem stated above, as we know, is a
state regulator design problem. The equations developed
Plant
below for the state regulator design, can also be used for
u(k) servo design by an appropriate transformation of the state
x(k + 1) = Fx (k) + Gu (k)
variables (refer Section 7.9 for details). State regulator
– design equations can also be used for state-feedback con-
u(k) trol schemes with integral control. This is done by the
K augmentation of the plant state with integral state and
appropriate transformation of the state variables (refer
Fig. 8.14 Control configuration of the state Section 7.9 for details).
regulator for discrete-time systems In the following, we develop state regulator design
equations through Lyapunov synthesis.
With the linear feedback control law (8.52), the closed-loop system is described by
x(k + 1) = (F – GK)x(k) (8.53)
480 Digital Control and State Variable Methods
We will assume that a matrix K exists such that (F – GK) is a stable matrix. The controllability of the
model (8.50) is sufficient to ensure this. This implies that there exists a Lyapunov function V (x ( k )) =
1
2
xT (k) Px (k) for the closed-loop system (8.53). Therefore, the first forward difference, DV(x (k)) =
V (x (k + 1)) – V (x (k)), evaluated on the trajectories of the closed-loop system, is negative definite. We now
state and prove a condition for u ( k ) = −Kx ( k ) to be optimal [35].
Theorem 8.6 If the state feedback controller u ( k ) = −Kx ( k ) is such that it minimizes the function
f (u) = ΔV ( x ( k )) + 12 xT ( k ) Qx ( k ) + 12 u T ( k ) Ru ( k ) (8.54)
and the minimum value of f (u) = 0 for some V = 12 xT ( k ) Px ( k ) , then the controller is optimal.
Proof We can represent (8.54) as (denoting minimizing u by u*)
ΔV ( x ( k ))
*T
+ 12 xT ( k ) Qx ( k ) + 12 u (k ) Ru* (k ) = 0
u =u*
Hence
V ( x ( k + 1)) − V ( x ( k ))
*T
= − 12 xT ( k ) Qx ( k ) − 12 u (k ) Ru* ( k )
u=u*
We sum both sides from k = 0 to ¥ to get
( )
∞
V ( x ( ∞ )) − V ( x (0 )) = − 12 ∑ xT ( k ) Qx ( k ) + u*
T
(k ) Ru* (k )
k =0
Because, by assumption, the closed-loop system is stable, we have x(¥) = 0. Hence
∑ ( xT (k ) Qx (k ) + u* (k ) Ru* (k ))
∞
V ( x ( 0 )) = 12 xT ( 0 ) Px ( 0 ) = 1 T
2
k =0
Thus, if a linear stabilizing controller satisfies the hypothesis of the theorem, then the value of the per-
formance index (8.51) resulting from applying the controller is
( )
J u* = 12 xT ( 0 ) Px ( 0 )
Since u minimizes the function in (8.54) and the minimum value is zero, for any u different from u*, the
*
f (u ( k )) = ΔV ( x ( k )) + 12 xT ( k ) Qx ( k ) + 12 uT (k )Ru ( k )
= 12 xT ( k + 1) Px ( k + 1) − 12 xT ( k ) Px ( k ) + 12 xT ( k ) Qx ( k ) + 12 uT (k )Ru ( k )
(Fx (k ) + Gu (k )) P (Fx (k ) + Gu (k ))
T
= 1
2
− 12 xT ( k ) Px ( k ) + 12 xT ( k ) Qx (k ) + 12 uT (k )Ru ( k )
(8.55)
⎛ ∂ T ∂f ∂g ⎞
Necessary condition for unconstrained minimization is ⎜
⎝ ∂x
f g =
∂x
g + f⎟ :
∂x ⎠
( )
∂f (u (k )) ∂ ( Fx ( k ) + Gu ( k ))
= 1 ⎡⎣ P (Fx ( k ) + Gu ( k ))⎤⎦
∂u ( k ) 2
∂u ( k )
+ 1
(
∂ P (Fx ( k ) + Gu ( k )) ) ⎡Fx
(k ) + Gu (k )⎤⎦ + 1
(
∂ uT ( k ) Ru ( k ) )
2
∂u ( k ) ⎣ 2
∂u ( k )
= 1 T
2
G P (Fx (k ) + Gu (k )) + (Fx (k ) + Gu (k )) + Ru (k )
1 T
2
G P
=G T
P (Fx ( k ) + Gu ( k )) + Ru ( k )
= G T PFx ( k ) + (R + G T PG )u ( k ) = 0
The matrix R + GTPG is positive definite, and therefore it is invertible. Hence
( )
−1
u* ( k ) = − R + G T PG G T PFx ( k ) = −Kx ( k ) (8.56)
K = ( R + G T PG ) G T PF
−1
where
We next check if u* satisfies the second-order sufficient condition for a relative minimizer of the function
(8.55).
∂ 2 f (u ( k ))
=
⎣ (
∂ ⎡G T PFx ( k ) + R + G T PG u ( k )⎤
⎦ )
∂u 2
(k ) ∂u (k )
= R + GT PG; a positive-definite matrix
that is, u* satisfies the second-order sufficient condition for a relative minimizer of the function (8.55).
The optimal controller (8.56) can be constructed if we have found an appropriate positive definite matrix
P. Our next task is to devise a method that would allow us to compute the desired matrix P. For this, we, first,
find the equation describing the closed-loop system driven by the optimal controller (8.56):
(
x ( k + 1) = F − GS −1 GT PF x ( k ) ) (8.57)
where S = R + GTPG
Our controller satisfies the hypothesis of Theorem (8.6), that is
T
1
2
xT ( k + 1) Px ( k + 1) − 12 xT ( k ) Px ( k ) + 12 xT ( k ) Qx ( k ) + 12 u* (k )Ru* (k ) = 0
or,
1 xT
2
(k )[F − GS −1G T PF ]T P[F − GS −1G T PF ]x (k ) − 12 xT (k ) Px(k ) + 12 xT (k )Qx(k )
+ 12 xT ( k )[ FT PGS −1 RS −1GT PF]x( k ) = 0
482 Digital Control and State Variable Methods
or,
1 T
2
x (k )FT PFx( k ) − 12 xT ( k )FT PGS −1G T PFx( k ) − 12 xT (k )F T PGS −1G T PFx(k )
+ 12 xT (k )FT PGS −1GT PGS−1GT PFx(k ) − 12 xT (k ) Px(k ) + 12 xT (k )Qx(k )
+ 12 xT (k )FT PGS −1RS −1GT PFx(k ) = 0
or,
1
2
xT ( k )FT PFx ( k ) − 12 xT ( k ) Px ( k ) + 12 xT ( k )Qx ( k ) − xT ( k )FT PGS −1GT PFx ( k )
+ 12 xT ( k ) FT PGS −1 ( R + GT PG) S−1GT PFx( k ) = 0
or,
1
2
xT ( k )FT PFx ( k ) − 12 xT ( k ) Px ( k ) + 12 xT ( k )Qx ( k ) − xT ( k )FT PGS −1GT PFx ( k )
+ 12 xT ( k ) FT PGS −1GT PFx( k ) = 0
or,
2
[x (k )[FT PF − P + Q − FT PGS −1G T PF ]x(k )]
1 T
=0
The above equation should hold for any x. For this to be true we have to have
( )
−1
FT PF − P + Q − FT PG R + G T PG G T PF = 0 (8.58)
This equation is called the discrete algebraic Riccati equation.
The discrete matrix Riccati equation given in (8.58), is one of the many equivalent forms which satisfy the
optimal regulator design. The analytical solution of the discrete Riccati equation is possible only for very
simple cases. A number of computer programs for the solution of the discrete Riccati equation are available
[152–154]. Appendix A provides some MATLAB support.
Example 8.7 Consider the problem of digital control of a plant described by the transfer function
1
G(s) =
s+1
Discretization of the plant model gives
Gh0G(z) =
Y (z)
=Z
LMFG 1 - e IJ F 1 I OP = (1 – z
- sT
–1
)Z
LM 1 OP = 1 - e -T
U ( z) NH s K H s + 1K Q N s(s + 1) Q z - e -T
In classical control theory, as we have seen in Chapters 1–4, output feedback controller is the common
control structure. These controllers are designed in the context of an input-output transfer function model.
When we move to a state variable model for the system, we have time-domain information about the internal
structure of the system, available in the form of a state vector. To investigate a link between the state infor-
mation and output feedback, we set up an output feedback regulator system.
The system equations are
x& = A x + B u ; x(0) = D x0
( n ×1) ( p ×1)
y = Cx (8.60)
( q ×1)
and the output feedback control law is
u (t ) = − K 0 y (t ) (8.61)
If we now progress this analysis for the closed-loop system, we substitute for the control law in system
equations. This gives
x& = ( A − BK 0 C) x (8.62)
The design problem can be stated through the closed-loop characteristic polynomial D(s) that specifies
the poles of the closed-loop system (eigenvalues of the matrix (A – BK0C)):
Δ( s) = s n + α1s n−1 + L + α n
The problem is to choose the available controller gain matrix K0 so that the specified characteristic
polynomial D(s) equals the characteristic polynomial of the matrix (A – BK0C):
s n + α1s n −1 + L + α n = sI − ( A − BK 0 C ) (8.63)
The output feedback in a state variable framework does not necessarily have sufficient degrees of free-
dom to satisfy this design requirement. The output feedback gain K0 will have p ´ q parameters to tune n
coefficients of the closed-loop characteristic polynomial. In most real systems, the order of the system n will
be very much greater than the number of measurements q and/or control p. The important issue here is that
the output vector is only a partial view of the state vector.
With full state feedback, a closed-form solution to the pole-placement problem exists under mildly
restrictive condition on controllability of the system. In case of single-input systems, the solution is unique
(given earlier in Chapter 7). In case of multi-input systems, the solution is not unique. In fact, there is lot of
freedom available in the choice of state-feedback gain matrix; this freedom is utilized to serve other objec-
tives on system performance [105].
With partial state feedback (output feedback), a closed-form solution to the pole-placement problem may
not exist. The designer often solves the problem numerically; tuning the output feedback gain matrix by trial
and error to obtain approximate pole-placement solution and checking the acceptability of the approxima-
tion by simulation.
The output feedback law is restricted in design achievements, while the state feedback law is able to give
total control over system dynamics. In fact, as we have seen, the design flexibility of the state feedback law
is supported by deep technical results to guarantee the design properties. However, this design flexibility of
state-feedback is achieved because it has been assumed that we can access each state variable. In practice,
this means that we must have a more complicated system where we include an observer which provides
us with the state information. Since an observer incorporates model of the process, dependence on very
Linear Quadratic Optimal Control Through Lyapunov Synthesis 485
accurate representation of the process being controlled for accurate state information, is obvious. We know
that industrial process models are not usually so well known or accurate. Therefore, inclusion of an observer
is bound to deteriorate the robustness properties of the feedback system.
Therefore, inspite of excellent design flexibility in state feedback, we are, many a times, forced to look at
the alternatives, not so excellent in terms of design flexibility but not dependent on inclusion of an observer.
Constrained state feedback is an interesting alternative. Here, we set the gains of the state-feedback gain
matrix corresponding to unmeasurable states, to zero and try to exploit the rest of the gains to achieve the
desired properties of the closed-loop system. This, in fact, may also be viewed as an output feedback prob-
lem where the state x passes through an appropriately selected output matrix C to give the output variables
in the vector y.
The constrained state feedback control law is not supported by deep technical results and does not guar-
antee the design properties; nonetheless, it yields robust feedback control systems for many industrial con-
trol problems. Existence of a control law that stabilizes the feedback system is a pre-requisite of the design
algorithm. Unfortunately, general conclusions for existence of a stabilizing control law with constrained
state feedback cannot be laid down; therefore one resorts to numerical methods to establish the existence.
In the following, we outline a procedure for the design of constrained state feedback control law that
minimizes a quadratic performance index. By constrained state feedback we mean that all the parameters of
the matrix K are not available for adjustments. Some of them may have zero values (output feedback). The
procedure described below is equally applicable to situations wherein some of the parameters of K have
fixed values.
Let us consider the system (8.60). It is desired to minimize the following performance index:
¥
J= 1
2 z
0
(xTQx + uTRu) dt (8.64)
where Q is n ´ n positive definite, real, symmetric, constant matrix, and R is p ´ p positive definite, real,
symmetric, constant matrix.
We shall obtain a direct relationship between Lyapunov functions and quadratic performance measures,
and solve the constrained parameter-optimization problem using this relationship. We select the feedback
control configuration described by the control law
u = – K0C x = – Kx (8.65)
where K is p × n matrix which involves adjustable parameters. With this control law, the closed-loop system
becomes
x& = Ax – BKx = (A – BK)x (8.66)
All the parameters of the matrix K are not available for adjustments. Some of them have fixed values
(zero values). We will assume that a matrix K satisfying the imposed constraints on its parameters exists
such that (A – BK) is a stable matrix.
The optimization problem is to determine the values of free parameters of the matrix K so as to minimize
the performance index given by Eqn. (8.64).
Substituting the control vector u from Eqn. (8.65) in the performance index J of Eqn. (8.64), we have
¥
J= 1
2 z
0
(xTQx + xTKTRKx)dt
¥
= 1
2 z
0
xT(Q + KTRK)x dt (8.67)
486 Digital Control and State Variable Methods
Let us assume a Lyapunov function
¥
V(x(t)) = 1
2 z
0
xT(Q + KTRK)x dt
Note that the value of the performance index for system trajectory starting at x(0) is V(x(0)).
The time derivative of the Lyapunov function is
¥
V& (x) = 1
2
T
x ( Q + K RK ) x
T
t
T T
= 1
2 x (¥) [Q + K RK]x(¥) – 1
2 xT(t) [Q + KTRK] x(t)
Assuming that the matrix (A – BK) is stable, we have from Eqn. (8.66),
x(¥) ® 0
Therefore,
V& (x) = –
xT(Q + KTRK)x
1
2 (8.68)
&
Since V (x) is quadratic in x and the plant equation is linear, let us assume that V(x) is also given by the
quadratic form:
V(x) = 1
2 xTPx (8.69)
where P is a positive definite real, symmetric, constant matrix. Therefore,
V& (x) = 1 ( x& T Px + x T Px& )
2
Substituting for x& from Eqn. (8.66), we get
V& (x) = 1 xT[(A – BK)T P + P(A – BK)]x
2
Comparison of this result with Eqn. (8.68) gives
1
2 xT[(A – BK)TP + P(A – BK)]x = – 1
2 xT(Q + KTRK)x
Since the above equality holds for arbitrary x(t), we have
(A – BK)T P + P(A – BK) + KTRK + Q = 0 (8.70)
This equation is of the form of Lyapunov equation defined in Section 8.3. In Eqn. (8.70) we have n2
n (n + 1)
nonlinear algebraic equations. However, since n ´ n matrix P is symmetric, we need to solve only
2
equations for the elements pij of the matrix P. The solution will give pij as functions of the feedback matrix K.
As pointed out earlier, V(x(0)) is the value of the performance index for the system trajectory starting at
x(0). From Eqn. (8.69), we get,
J= 1
2 xT(0) Px(0) (8.71)
A suboptimal control law may be obtained by minimizing J with respect to the available elements kij of K,
i.e., by setting
∂[x T (0)Px(0)]
=0 (8.72)
∂kij
If for the suboptimal solution thus obtained, the matrix (A – BK) is stable, then the minimization of J as
per the procedure described above gives the correct result. From Eqn. (8.68) we observe that for a positive
definite Q, V& (x) < 0 for all x ¹ 0 (note that KTRK is non-negative definite). Also Eqn. (8.69) shows that
Linear Quadratic Optimal Control Through Lyapunov Synthesis 487
V(x) > 0 for all x ¹ 0 if P is positive definite. Therefore minimization of J with respect to kij (Eqn. (8.72))
will lead to a stable closed-loop system if the optimal kij result in a positive definite matrix P.
One would like to examine the existence of a solution to the optimization problem before actually starting
the optimization procedure. For the problem under consideration, existence of K that minimizes J is ensured
if, and only if, there exists a K satisfying the imposed constraints on the parameters, such that (A – BK) is
asymptotically stable. The question of existence of K has, as yet, no straightforward answer. We resort to
numerical trial-and-error to find a stabilizing matrix K (Such a matrix is required by numerical algorithms
for optimization of J [105]). Failure to do so does not mean that a suboptimal solution does not exist.
Also note that the solution is dependent on initial condition (Eqn. (8.72)). If a system is to operate satisfac-
torily for a range of initial disturbances, it may not be clear which is the most suitable for optimization.
The dependence on initial conditions can be avoided by averaging the performance obtained for a linearly
independent set of initial conditions. This is equivalent to assuming the initial state x (0) to be a random
variable, uniformly distributed on the surface of an n-dimensional sphere, i.e.,
E{x(0)xT (0)} = I
where E{.} denotes the expected value.
We define a new performance index
Jˆ = E {J } = E {
1 T
2
x }
(0)Px(0)
DV(x(k)) = 1
2 xT(k) [(F – GK)TP(F – GK) – P]x(k)
Comparing this result with Eqn. (8.80), we obtain
(F – GK)TP(F – GK) – P + KTRK + Q = 0 (8.82)
This equation is of the form of Lyapunov equation defined in Section 8.3.
Since V(x(0)) is the value of the performance index, we have
J= 1
2 xT(0)Px(0) (8.83)
Assuming x(0) to be a random variable uniformly distributed on the surface of n-dimensional sphere, the
problem reduces to minimization of
J$ = 1
2
trace P (8.84)
Reference [105] describes a numerical algorithm for this minimization problem.
Review Examples
Review Example 8.1 Using the Lyapunov equation, determine the stability range for the gain K of
the system shown in Fig. 8.16.
Linear Quadratic Optimal Control Through Lyapunov Synthesis 489
r + K x3 1 x2 1 x1
s+1 s+2 s
–
Fig. 8.16
Solution The state equation of the system is
x&1 0 LM
1 0 OP LM OP LM x OP LM 0 OP
1
x&2 = 0 -2
x&3 -K
1
MM
0 -1
PP MM PP MMxx PP + MMK0 PP r
2
N Q N QN Q N Q 3
For the investigation of asymptotic stability, we consider the system
x& = Ax
with
0 1 0 LM OP
A= -2
MM- K0 1
-1PQ
P
Clearly, the equilibrium state is the origin.
N 0
N x Q MN10PQ
e
2
Define
~
x1(k) = x1(k) – x1e
~
x2(k) = x2(k) – x2e
In terms of the shifted variables, the system equations become
x~1( k + 1)
LM 2 0.5 x~1( k )
OP LM OP LM OP
=
x~ ( k + 1)
N 2 0 0.8 x~ ( k )
Q N QN 2 Q
or ~x (k +1) = F ~x (k) (8.85)
Clearly ~
x = 0 is the equilibrium state of this autonomous system.
Let us choose a Lyapunov function
V( ~
x)= ~ x TP ~
x
where P is to be determined from the Lyapunov equation
FTPF – P = – I
or
LM 2 0 OP LM p
11 p12 OP LM2 0.5OP LM
p
- 11
p12 OP = LM-1 0 OP
N 0.5 0.8 Q Np 12 p22 Q N0 0.8 p12
Q N p22 Q N 0 -1Q
Linear Quadratic Optimal Control Through Lyapunov Synthesis 491
Solving for pij’s, we get
P=
LM- 1
3
5
9
OP
5 1225
MN 9 324 PQ
By applying the Sylvester’s test for positive definiteness, we find that the matrix P is not positive definite.
Therefore the origin of the system (8.85) is not asymptotically stable.
In terms of the original state variables, we can say that the equilibrium state
xe = [0 10]T of the given system is not asymptotically stable.
Review Example 8.3 Referring to the block diagram of Fig. 8.17, consider that G(s) = 100/s2 and R(s)
= 1/s. Determine the optimal values of parameters k1 and k2 such that
¥
z
J = [e2(t) + 0.25u2(t)]dt
0
is minimized.
R (s ) + E (s) + U (s) Y (s)
k1 G (s)
– –
sk 2
Fig. 8.17
Solution From Fig. 8.17, we obtain
y (t) = 100u(t); y(0) = y& (0) = 0
&&
u(t) = k1[r – y(t) – k2 y& (t)]
In terms of the state variables
~
x1 (t) = y(t) – r
~
x 2 (t) = y& (t),
the state variable model of the system becomes
~
x& =
LM OP
0 1 ~
x +
0 LM OP
u; ~
x (0) =
-1 LM OP
0 0 N Q 100 N Q 0 N Q
u = – k x~ – k k x~ = – K x ~ (8.86)
1 1 1 2 2
where
K = [k1 k1 k2]
The optimization problem is to find K such that
¥
J= z (~
x12 + 0.25u2)dt
0
is minimized.
Note that
A=
LM0 1OP ; B = LM 0 OP ; Q = L2 0O ; R = 0.5
N0 0Q N100Q MN0 0PQ
492 Digital Control and State Variable Methods
The matrix Riccati equation is
ATP + PA – PBR–1BTP + Q = 0
or
LM0 0OP LM p p OP + LM p
11 12 OP LM0 1OP 11 p12
N1 0 Q N p p Q N p
12 22 Q N0 0 Q 12 p22
–
LM p
11 p 12 OP LM 0 OP [ ] [0 100] LM p
1
p O L2 0 O L0 0 O
+ =
11 12
P= M
L2 ´ 10 10 OP -1 -2
-2 -3
N 10 10 Q
The feedback gain matrix
K = R–1BTP
= 1
[0 100]
LM2 ´ 10 -1
10 - 2 OP = [2 0.2]
0.5 -2 -3
N 10 10 Q
From Eqn. (8.86), we obtain
[k1 k1k2] = [2 0.2] or k1 = 2, k2 = 0.1
Review Example 8.4 Figure 8.18 shows the optimal control configuration of a position servo system.
Both the state variables—angular position q and angular velocity q& —are assumed to be measurable.
r + + u 20 x2 = 1 x1 =
k1
s+2 s
– –
k2
It is desired to regulate the angular position to a unit-step function qr. Find the optimum values of the
gains k1 and k2 that minimize
¥
z
J = [(x1 – qr)2 + u2 ]dt
0
Solution The state variable description of the system, obtained from Fig. 8.18, is given by
x& =
0 1
x+
0
u
LM OP LM OP
0 -2 20 N Q N Q
y = x1
In terms of the shifted state variables
~
x1 = x1 – qr
~
x 2 = x2,
Linear Quadratic Optimal Control Through Lyapunov Synthesis 493
the state variable model becomes
~
x& = A ~
x + Bu (8.87)
with
1
,B= A=
0 LM 0 OP LM OP
-2 20 N0 Q N Q
The design problem is to determine optimal control
u = – k1 ~
x1 – k2 ~
x2 (8.88)
that minimizes
¥
J = (~ z
x12 + u2)dt
0
For this J,
LM2 0OP ; R = 2
Q=
N0 0 Q
The matrix Q is positive semidefinite;
L 2O
T
Q = H H = M P [ 2 0]
N0Q
The pair (A,H) is completely observable. Also, the pair (A,B) is completely controllable. Therefore, the
sufficient conditions for the existence of asymptotically stable optimal closed-loop system are satisfied.
The matrix Riccati equation is
ATP + PA – PBR–1BTP + Q = 0
or
LM0 0 OP LM p
OP + LM p p OP LM0 1 OP
11 p12 11 12
N1 -2 Q N p p Q N0 -2Q
Q Np 12 p22 12 22
LM 0 p - 2 p O L 200 p
11 12200 p p O L2 0O L0 0O2
12 12 22
P=
0.664 0.1 LM OP
0.1 0.0232 N Q
The optimal gain matrix
K = R–1BTP = [1 0.232]
The minimum value of J for an initial condition ~ x (0) = [–1 0]T, is
p
J = 21 ~
x T(0)P ~
x (0) = 11 = 0.332
2
It can easily be verified that the optimal closed-loop system is stable.
494 Digital Control and State Variable Methods
Review Example 8.5 Figure 8.19a illustrates a typical sampled-data system. The transfer functions G(s)
and Gh0(s) of the controlled plant and the hold circuit, respectively, are known. The data-processing unit
D(z) which operates on the sampled error signal e(k) is to be designed.
Assuming the processing unit D(z) to be simply an amplifier of gain K, let us find K so that the sum square
error
¥
J= å [e 2 ( k ) + 0.75u 2 ( k )]
k = 0
is minimized.
Solution From Fig. 8.19a, we have
1 - e - sT
Gh0(s)G(s) =
s2
Therefore
Gh0G(z) = (1 – z–1) Z
LM 1 OP = 1
2
Ns Q z - 1
Figure 8.19b shows an equivalent block diagram of the sampled-data system.
r = unit step T = 1 sec
+ e (t ) 1 – e–sT 1 y ( t)
D (z) Gh0 = G= s
s
–
(a)
r + e(k ) u (k ) y (k )
1
K
z–1
–
(b)
Fig. 8.19 A sampled-data system
Problems
8.1 Consider the linear system
x& =
LM 0 1OP x
N-1 -2Q
Using Lyapunov analysis, determine the stability of the equilibrium state.
8.2 Using Lyapunov analysis, determine the stability of the equilibrium state of the system
x& = Ax
with A=
LM 0 1OP
N-1 1Q
8.3 Consider the system described by the equations
x&1 = x2
x& 2 = – x1 – x2 + 2
Investigate the stability of the equilibrium state. Use Lyapunov analysis.
8.4 A linear system is described by the state equation
x& = Ax
where
A=
LM- 4K 4K OP
N 2K - 6K Q
Using Lyapunov analysis, find restrictions on the parameter K to guarantee the stability of the system.
496 Digital Control and State Variable Methods
8.5 Consider the system of Fig. P8.5. Find the restrictions on the parameter K to guarantee system stability. Use
Lyapunov’s analysis.
K x1 1 x2 1 x3
s+1 s+1 s+1
–
Fig. P8.5
x(k + 1) =
LM 0.5 1OP x(k)
N-1 -1Q
Using Lyapunov analysis, determine the stability of the equilibrium state.
8.7 Using Lyapunov analysis, determine the stability of the equilibrium state of the system
x(k + 1) = Fx(k)
with
F=
LM 0 0. 5 OP
N-0.5 -1 Q
8.8 Consider the system shown in Fig. P8.8. Determine the optimal feedback gain matrix K, such that the following
performance index is minimized:
¥
LM2 0OP
J= 1
2 z
0
(xTQx + 2u2)dt; Q =
N0 2 Q
u 1 x2 1 x1
s s
–K
Fig. P8.8
8.9 The matrix Q in Problem 8.8 is replaced by the following positive semidefinite matrix:
Q=
LM2 0OP
N0 0 Q
Show that sufficient conditions for the existence of the asymptotically stable optimal control solution are
satisfied. Find the optimal feedback matrix K.
8.10 Test whether sufficient conditions for the existence of the asymptotically stable optimal control solution for the
plant
x& =
0 0 LM
x+
1
u
OP LM OP
0 1 N 1 Q NQ
Linear Quadratic Optimal Control Through Lyapunov Synthesis 497
with the performance index
¥
z
J = ( x12 + u2) dt
0
are satisfied. Find the optimal closed-loop system, if it exists, and determine its stability.
8.11 Consider the plant
x& =
LM
-1 0
x+
1OP LM OP
u
N
1 0 0 Q NQ
with the performance index
¥
z
J = ( x12 + u2) dt
0
Test whether an asymptotically stable optimal solution exists for this control problem.
8.12 Consider the system described by the state model:
x& =
LM0 1 OP x + LM 0OP u
N0 -2 Q N20Q
y = [1 0] x
Find the optimal control law that minimizes
¥
J= 1
2 z
0
[(y(t) – 1)2 + u2] dt
L1 0O
y=M x
N0 2PQ
such that the following performance index is minimized
¥
J= z
0
( y12 + y22 + u2)dt
A=
LM0 1OP , B = LM0OP , C = [1 0]
N0 -1Q N1Q
with the performance index
¥
J= z
0
( x12 + x22 + u2) dt
Choose a control law that minimizes J. Design a state observer for implementation of the control law; both the
poles of the state observer are required to lie at s = – 3.
8.15 Figure P8.15 shows the optimal control configuration of a position servo system. Both the state variables—
angular position q and angular velocity q& —are assumed to be measurable.
498 Digital Control and State Variable Methods
It is desired to regulate the angular position to a constant value qr = 5. Find optimum values of the gains k1 and
k2 that minimize
¥
J= z
0
[(x1 – qr)2 + 1
2
u2] dt
r + + u 1 x2 = 1 x1 =
k1 s+5 s
– –
k2
Fig. P8.15
8.16 Consider now that for the position servo system of Problem 8.15, the performance index is
¥
z
J = [(x1 – qr)2 + r u 2]dt
0
1 1 1
For r = 10
, 100
, and 1000
, find the optimal control law that minimizes the given J. Determine closed-loop poles
for various values of r and comment on your result.
8.17 In the control scheme of Fig. P8.17, the control law of the form u = – Ky + Nyr has been used; yr is the constant
command input.
w
+ y
yr + u + 1
N
s+1
–
Fig. P8.17
is minimized; ~ y and u~ are, respectively, the deviations of the output and the control signal from their
steady-state values.
(b) Choose N so that the system has zero steady-state error, i.e., y(¥) = yr.
(c) Show that the steady-state error to a constant disturbance input w, is non-zero for the above choice of N.
(d) Add to the plant equation, an integrator equation (z(t) being the state of the integrator),
z& (t) = y(t) – yr
Linear Quadratic Optimal Control Through Lyapunov Synthesis 499
and select gains K and K1 so that if u = – Ky – K1z, the performance index
¥
J = (~
z z 2 + u~ 2)dt
y2 + ~
0
is minimized.
(e) Draw a block diagram of the control scheme employing integral control and show that the steady-state error
to constant disturbance w, is zero.
8.18 Consider a plant consisting of a dc motor, the shaft of which has the angular velocity w (t), and which is driven
by the input voltage u(t). The describing equation is
w& (t) = – 0.5w (t) + 100u(t) = Aw(t) + Bu(t)
It is desired to regulate the angular velocity at the desired value w0 = r.
(a) Use the control law of the form u(t) = – Kw (t) + Nr.
¥
~ and u~ are, respectively, the deviations of the output
~ 2 + 100 u~ 2 ) dt; w
Choose K that minimizes J = ( w z
0
and the control signal, from their steady-state values.
Choose N that guarantees zero steady-state error, i.e.,
w (¥) = w 0 = r.
(b) Show that if A changes to A + dA, subject to (A + dA – BK) being stable, then the above choice of N will no
longer make w (¥) = r. Therefore, the feed forward-feedback control system is not robust under changes in
system parameters.
(c) The system can be made robust by augmenting it with an integrator:
z& = w – r
where z is the state of the integrator. To see this, first use the feedback of the form u = – Kw (t) – K1z(t) and
select K and K1 so that
¥
~
z z 2 + 100 u~ 2) dt
J = (w 2 + ~
0
is minimized. Show that the resulting system will have w (¥) = r, no matter how the matrix A changes, so
long as the closed-loop system remains asymptotically stable.
8.19 Consider the system
x(k + 1) = 0.368 x(k) + 0.632 u(k)
Using the discrete matrix Riccati equation, find the control sequence
u(k) = – Kx(k)
that minimizes the performance index
∞
J= ∑ [ x 2 (k ) + u2 (k )]
k = 0
8.20 Consider the sampled-date system shown in Fig. P8.20.
(a) Find K so that
∞
J= 1
2 ∑ [~y 2 (k ) + u~2 (k )]
k = 0
is minimized; ~y and u~ are, respectively, the deviations of the output and the control signal, from their
steady-state values.
(b) Find the steady-state value of the output.
(c) To eliminate steady-state error, introduce a feedforward controller. The control scheme now becomes u(k)
= – Ky(k) + Nr. Find the value of N so that y(¥) = r.
500 Digital Control and State Variable Methods
r = unit step T = 0.5 sec
y
+ u 1 – e– sT 1
K Gh0 = G=
s s+1
–
Fig. P8.20
J= 1
2
å [ ~x 2(k) + u~ 2(k)]
k=0
is minimized; r is a constant reference input, and ~ x and u~ are, respectively, the deviations in state and
control signal, from their steady-state values.
(b) Find N so that x(¥) = r, i.e., there is no steady-state error.
(c) Show that the property of zero steady-state error is not robust with respect to changes in F.
(d) In order to obtain robust steady-state accuracy with respect to changes in F, we may use integral control in
addition to state feedback. Describe through block diagram, the structure of such a control scheme.
Part III
NONLINEAR CONTROL SYSTEMS: CONVENTIONAL
AND INTELLIGENT
In this part of the book, we will explore tools and techniques for attacking control problems that contain
significant nonlinearities.
Nonlinear control system design has been dominated by linear control techniques, which rely on the
key assumption of a small range of operation for the linear model to be valid. This tradition has produced
many reliable and effective control systems. However, the demand for nonlinear control methodologies
has recently been increasing for several reasons.
First, modern technology, such as applied in high-performance aircraft and high-speed high-accuracy
robots, demands control systems with much more stringent design specifications, which are able to han-
dle nonlinearities of the controlled systems more accurately. When the required operation range is large,
a linear controller is likely to perform very poorly or to be unstable, because the nonlinearities in the
system cannot be properly compensated for. Nonlinear controllers, on the other hand, may directly handle
the nonlinearities in large range operation. Also, in control systems there are many nonlinearities whose
discontinuous nature does not allow linear approximation.
Second, controlled systems must be able to reject disturbances and uncertainties confronted in real-
world applications. In designing linear controllers, it is usually necessary to assume that the parameters of
the system model are reasonably well known. However, many control problems involve uncertainties in
the model parameters. This may be due to a slow time variation of the parameters (e.g., of ambient air
pressure during an aircraft flight), or to an abrupt change in parameters (e.g., in the inertial parameters of
a robot when a new object is grasped). A linear controller, based on inaccurate values of the model
parameters, may exhibit significant performance degradation or even instability. Nonlinearities can be
intentionally introduced into the controller part of a control system, so that model uncertainties can be
tolerated.
Third, advances in computer technology have made the implementation of nonlinear controllers a
relatively simple task. The challenge for control design is to fully utilize this technology to achieve the
best control system performance possible.
Thus, the subject of nonlinear control is an important area of automatic control. Learning basic tech-
niques of nonlinear control analysis and design can significantly enhance the ability of control engineers
to deal with practical control problems, effectively. It also provides a sharper understanding of the real
world, which is inherently nonlinear.
Phase Plane Analysis Phase plane analysis, discussed in Chapter 9, is a method of studying second-
order nonlinear systems. Its basic idea is to solve a second-order differential equation and graphically
display the result as a family of system motion trajectories on a two-dimensional plane, called the phase
plane, which allow us to visually observe the motion patterns of the system. While phase-plane analysis
has a number of important advantages, it has the fundamental disadvantage of being applicable only to
systems which can be well approximated by a second- order dynamics. Because of its graphical nature, it
is frequently used to provide intuitive insights about nonlinear effects.
Lyapunov Theory In using the Lyapunov theory to analyze the stability of a nonlinear system, the
idea is to construct a scalar energy-like function (a Lyapunov function) for the system, and to see whether
it decreases. The power of this method comes from its generality; it is applicable to all kinds of control
systems. Conversely, the limitation of the method lies in the fact that it is often difficult to find a Lyapunov
function for a given system.
Although Lyapunov’s method is originally a method of stability analysis, it can be used for synthesis
problems. One important application is the design of nonlinear controllers. The idea is to somehow for-
mulate a scalar positive definite function of the system states, and then choose a control law to make this
function decrease. A nonlinear control system thus designed, will be guaranteed to be stable. Such a
design approach has been used to solve many complex design problems, e.g., in adaptive control and in
sliding mode control (discussed in Chapter 10). The basic concepts of Lyapunov theory have earlier been
presented in Chapter 8. We will extend our presentation on Lyapunov theory in Chapter 9, wherein guide-
lines for construction of Lyapunov functions for nonlinear systems will be given.
Describing Functions The describing function method, discussed in Chapter 9, is an approximate
technique for studying nonlinear systems. The basic idea of the method is to approximate the nonlinear
components in nonlinear control systems by linear “equivalents”, and then use frequency domain tech-
niques to analyze the resulting systems. Unlike the phase plane method, it is not restricted to second-order
systems. Rather, the accuracy of describing function analysis improves with an increase in the order of the
system. Unlike Lyapunov method, whose applicability to a specific system hinges on the success of a
trial-and-error search for a Lyapunov function, its application is straightforward for a specific class of
nonlinear systems.
Variable structure sliding mode control In pure model-based nonlinear control (such as the basic
feedback linearization control approach), the control law is designed based on a nominal model of the
physical system. How the control system will behave in the presence of model uncertainties is not clear at
the design stage. In robust nonlinear control (e.g., variable structure sliding mode control), on the other
hand, the controller is designed based on the consideration of both the nominal model and some charac-
terization of the model uncertainties. Sliding mode control techniques, discussed in Chapter 10, have
proven very effective in a variety of practical control problems.
Adaptive Control Adaptive control is an approach to dealing with uncertain systems or time-varying
systems. Although the term “adaptive” can have broad meanings, current adaptive control designs apply
mainly to systems with known dynamic structure but unknown constant or slowly-varying parameters.
Adaptive controllers, whether developed for linear systems or for nonlinear systems, are inherently
nonlinear.
Systematic theories exist for the adaptive control of linear systems. Frequently used adaptive control
structures are discussed in Chapter 10.
Gain-scheduling Gain scheduling is an attempt to apply the well developed linear control methodol-
ogy to the control of nonlinear systems. The idea of gain-scheduling is to select a number of operating
points which cover the range of system operation. Then, at each of these points, the designer makes a
linear time-invariant approximation to the plant dynamics, and designs a linear controller for each
linearized plant. Between operating points, the parameters of the compensators are then interpolated, or
scheduled; thus resulting in a global compensator.
Intelligent Control In order to handle the complexities of nonlinearities and accomodate the demand
for high-performance control systems, intelligent control takes advantage of the computational struc-
tures—fuzzy systems and neutral networks—which are inherently nonlinear; a very important property,
particularly if the underlying physical mechanisms for the systems are highly nonlinear. Whereas classi-
cal control is rooted in the theory of differential equations, intelligent control is largely rule-based be-
cause the dependencies involved in its deployment are much too complex to permit an analytical repre-
sentation. To deal with such dependencies, the mathematics of fuzzy systems and neutral networks inte-
grates the experience and knowledge gained in the operation of a similar plant, into control algorithm.
The power of fuzzy systems lies in their ability (i) to quantify linguistic inputs, and (ii) to quickly give a
working approximation of complex, and often unknown, system input-output rules. The power of neural
networks is in their ability to learn from data. There is a natural synergy between neural networks and
fuzzy systems that makes their hybridization a powerful tool for intelligent control and other applications.
Intelligent control is one of the most serious candidates for the future control of the large class of
nonlinear, partially known, and time-varying systems.
With no agreed upon scientific definition of intelligence, and due to space limitations, we will not
venture into the discussion of what intelligence is. Rather, we will confine our brief exposition in Chap-
ters 11 and 12 to intelligent machines—neural networks, support vector machines, fuzzy inteference
systems, genetic algorithms—in the context of applications in control.
9 Nonlinear Systems Analysis
9.1 INTRODUCTION
Because nonlinear systems can have much richer and complex behaviours than linear systems, their analysis
is much more difficult. Mathematically, this is reflected in two aspects. Firstly, nonlinear equations, unlike
linear ones, cannot, in general, be solved analytically, and therefore, a complete understanding of the behav-
iour of a nonlinear system is very difficult. Secondly, powerful mathematical tools like Laplace and Fourier
transforms do not apply to nonlinear systems. As a result, there are no systematic tools for predicting
the behaviour of nonlinear systems. Instead, there is a rich inventory of powerful analysis tools, each best
applicable to particular classes of nonlinear control problems [125–129].
Perhaps the single most valuable asset to the field of engineering is the simulation tool—constructing a
model of the proposed or actual system and using a numerical solution of the model to reveal the behaviour
of the system. Simulation is the only general method of analysis applicable to finding solutions of linear and
nonlinear differential and difference equations. Of course, simulation finds specific solutions; that is, solu-
tions to the equations with specific inputs, initial conditions, and parametric conditions. It is for this reason
that simulation is not a substitute for other forms of analysis. Important properties such as stability and
conditional stability are not proven with simulations. When the complexity of a system precludes the use of
any analytical approach to establish proof of stability, simulations will be the only way to obtain necessary
information for design purposes. A partial list of the simulation programs available today is contained in
references [151–154].
This chapter also does not provide a magic solution to the analysis problem. In fact, no universal analyti-
cal technique exists that can cater to our demand on analysis of the effects of nonlinearities. Our focus in this
chapter, is only on some important categories of nonlinear systems for which significant analysis (and
design) can be done.
Describing Function Analysis For the so-called separable systems, which comprise a linear part
defined by its transfer function, and a nonlinear part defined by a time-independent relationship between its
input and output variables, the describing function method is most practically useful for analysis. It is
an approximate method but experience with real systems and computer simulation results shows adequate
506 Digital Control and State Variable Methods
accuracy in many cases. Basically, the method is an approximate extension of frequency response methods
(including Nyquist stability criterion) to nonlinear systems.
In terms of mathematical properties, nonlinearities may be categorized as continuous and discontinuous.
Because discontinuous nonlinearities cannot be locally approximated by linear functions, they are also called
“hard” nonlinearities. Hard nonlinearities (such as saturation, backlash, or coulomb friction) are commonly
found in control systems, both in small range and large range operations. Whether a system in small range
operation should be regarded as nonlinear or linear depends on the magnitude of the hard nonlinearities and
on the extent of their effects on the system performance.
The continuous or so-called “soft” nonlinearities are present in every control system, though not visible
because these are not separable. Throughout the book, we have neglected these nonlinearities in our deriva-
tions of transfer function and state variable models. For example, we have assumed linear restoring force of
a spring, a constant damping coefficient independent of the position of the mass, etc. In practice, none of
these assumptions is true for a large range operation. Also, there are situations, not covered in this book,
wherein the linearity assumption gives too small range of operation to be useful; linear design methods
cannot be applied for such systems. If the controlled systems are not too complex and the performance
requirements are not too stringent, the linearity assumptions made in this book, give satisfactory results in
practice.
Describing function analysis is applicable to separable hard nonlinearities. For this category of nonlinear
systems, as we shall see later in this chapter, the predictions of describing function analysis usually are a
good approximation to actual behaviour when the linear part of the system provides a sufficiently strong
filtering effect. Filtering characteristics of the linear part of a system improve as the order of the system goes
up. The ‘lowpass filtering’ requirement is never completely satisfied; for this reason, the describing function
method is mainly used for stability analysis and is not directly applied to the optimization of system design.
Phase Plane Analysis Another practically useful method for nonlinear system analysis is the phase-
plane method. While phase-plane analysis does not suffer from any approximations and hence can be used
for stability analysis as well as optimization of system design, its main limitation is that it is applicable to
systems which can be well approximated by second-order dynamics. Its basic idea is to solve second-order
differential equation and graphically display the result as a family of system motion trajectories on a two-
dimensional plane, called the phase-plane, which allows us to visually observe the motion patterns of the
system. The method is equally applicable to both hard and soft nonlinearities.
Lyapunov Stability Analysis The most fundamental analysis tool is the concept of a Lyapunov func-
tion and its use in nonlinear stability analysis. The power of the method comes from its generality; it is
applicable to all kinds of control systems; systems with hard or soft nonlinearities, and of second-order or
higher-order. The limitation of the method lies in the fact that it is often difficult to find a Lyapunov function
for a given system.
The aim of this chapter is to introduce the two classical, yet practically important tools—the describing
function method and the phase-plane method—for a class of nonlinear systems. The two methods are com-
plementary to a large extent, each being available for the study of the systems which are most likely to be
beyond the scope of the other. The phase plane analysis applies primarily to systems described by second-
order differential equations. Systems of order higher than the second are likely to be well filtered and
tractable by the describing function method.
The use of Lyapunov functions for stability analysis of nonlinear systems will also be given in this
chapter.
Nonlinear Systems Analysis 507
As a minimum, it is important to be aware of the main characteristics of nonlinear behaviour, only to permit
recognition if these are encountered experimentally or in system simulations.
The previous chapters have been predominantly concerned with the study of linear time-invariant control
systems. We have observed that these systems have quite simple properties, such as
· a linear system x& = Ax , with x being the vector of states and A being the system matrix, has a unique
equilibrium point (if A is nonsingular; normally true for feedback system matrices);
· the equilibrium point is stable if all eigenvalues of A have negative real parts, regardless of initial
conditions;
· the transient response is composed of the natural modes of the system, and the general solution can be
solved analytically;
· in the presence of the external input u(t), the system response has a number of interesting properties:
(i) it satisfies the principle of superposition, (ii) the asymptotic stability of the system implies bounded-
input, bounded-output stability, and (iii) a sinusoidal input leads to a sinusoidal output of the same
frequency.
The behaviour of nonlinear systems, however, is much more complex. Due to the lack of superposition
property, nonlinear systems respond to external inputs and initial conditions quite differently from linear
systems. Some common nonlinear system properties are as follows [126]:
(i) Nonlinear systems frequently have more than one equilibrium point. For a linear system, stability is
seen by noting that for any initial condition, the motion of a stable system always converges to the
equilibrium point. However, a nonlinear system may converge to an equilibrium point starting with
one set of the initial conditions, and may go to infinity starting with another set of initial conditions.
This means that the stability of nonlinear systems may depend on initial conditions. In the presence of
a bounded external input, unlike linear systems, stability of nonlinear systems may also be dependent
on the input value.
(ii) Nonlinear systems can display oscillations of fixed amplitude and fixed period without external excitation.
These oscillations are called limit cycles. Consider the well-known Van der Pol’s differential equation
My&& + B ( y 2 − 1) y& + Ky = 0; M > 0, B > 0, K > 0 (9.1)
which describes physical situations in many nonlinear systems. It can be regarded as describing a
mass-spring-damper system with a position-dependent damping coefficient B(y2–1). For large values
of y, the damping coefficient is positive and the damper removes energy from the system. This implies
y(t) that the system motion has a convergent tendency. How-
ever, for small values of y, the damping coefficient is
negative and the damper adds energy into the system.
This suggests that the system motion has a divergent ten-
dency. Therefore, because the nonlinear damping varies
with y, the system motion can neither grow unboundedly
t nor decay to zero. Instead, it displays a sustained oscil-
0
lation independent of initial conditions, as illustrated
in Fig. 9.1.
Of course, sustained oscillations can also be found in
linear systems, e.g., in the case of marginally stable
linear systems. However, the oscillation of a marginally
Fig. 9.1 Responses of the Van der Pol oscillator stable linear system has its amplitude determined by its
508 Digital Control and State Variable Methods
initial conditions, and such a system is very sensitive to changes in system parameters (a slight change
in parameters is capable of leading either to stable convergence or to instability). In nonlinear systems,
on the other hand, the amplitude of sustained oscillations is independent of the initial conditions, and
limit cycles are not easily affected by parameter changes.
(iii) A nonlinear system with a periodic input may exhibit a periodic output whose frequency is either a
subharmonic or a harmonic of the input frequency. For example, an input of frequency of 10 Hz may
result in an output of 5 Hz for the subharmonic case or 30 Hz for the harmonic case.
(iv) A nonlinear system can display jump resonance, a form of hysteresis, in its frequency response.
Consider a mass-spring-damper system
My&& + By& + K1 y + K 2 y 3 = F cos ω t ; M > 0, B > 0, K1 > 0, K2 > 0 (9.2)
Note that the restoring force of the spring is assumed
|Y( jw)| to be nonlinear. If in an experiment, the frequency w is
B
C varied and the input amplitude F is held constant, fre-
quency-response curve of the form shown in Fig. 9.2,
may be obtained. As the frequency w is increased, the
F response y follows the curve through the points A, B
and C. At point C, a small change in frequency results
in a discontinuous jump to point D. The response then
D follows the curve to point E upon further increase in
A frequency. As the frequency is decreased from point E,
E
the response follows the curve through points D and F.
w At point F, a small change in frequency results in a
discontinuous jump to point B. The response follows
the curve to point A for further decrease in frequency.
Fig. 9.2 Frequency response of a system with
Observe from this description that the response never
jump resonance
actually follows the segment CF. This portion of the
curve represents a condition of unstable equilibrium.
In this section, we take a closer look at the nonlinearities found in control systems. Consider the typical
block diagram of closed-loop system shown in Fig. 9.3. It is composed of four parts: a plant to be controlled,
sensors for measurements, actuators for control action, and a control law usually implemented on a compu-
ter. Nonlinearities may occur in any part of the system.
r(t) + y(t)
Controller Actuator Plant
–
Sensor
Output Output
Input Input
C B
H –H A
O
H
D
E
Input Input
Velocity
(d) Coulomb friction nonlinearity (e) On-Off (two position/three position) control nonlinearities
Fig. 9.4
Most actuators display saturation characteristics. For example, the output torque of a servo motor
cannot increase infinitely, and tends to saturate due to the properties of the magnetic material. Similarly,
valve-controlled hydraulic actuators are saturated by the maximum flow rate.
Deadzone A deadzone nonlinearity may occur in sensors, amplifiers and actuators. In a dc motor, we
assume that any voltage applied to the armature windings will cause the armature to rotate if the field current
is maintained constant. In reality, due to static friction at the motor shaft, rotation will occur only if the
torque provided by the motor is sufficiently large. This corresponds to a so-called deadzone for small
510 Digital Control and State Variable Methods
voltage signals. Similar deadzone phenomena occur in valve-controlled pneumatic and hydraulic actuators.
Figure 9.4b shows linear-segmented approximation of deadzone nonlinearity.
Backlash A backlash nonlinearity commonly occurs in mechanical components of control systems. In
gear trains, small gaps exist between a pair of mating gears (refer Fig. 9.4c). As a result, when the driving
gear rotates a smaller angle than the gap H, the driven gear does not move at all, which corresponds to the
deadzone (OA segment in Fig. 9.4c); after contact has been established between the two gears, the driven
gear follows the rotation of the driving gear in a linear fashion (AB segment). When the driving gear rotates
in the reverse direction, by a distance of 2H, the driven gear again does not move, corresponding to the
segment BC in Fig. 9.4c. After the contact between the two gears is re-established, the driven gear linearly
follows the rotation of the driving gear in the reverse direction (CD segment). Therefore, if the driving gear
is in periodic motion, the driven gear will move in the fashion represented by the closed path EBCD.
A critical feature of backlash, a form of hysteresis, is its multi-valued nature. Corresponding to each
input, two output values are possible. Which one of the two occurs depends on the history of the input.
Coulomb Friction In any system where there is a relative motion between contacting surfaces, there are
several types of friction: all of them nonlinear—except the viscous components. Coulomb friction is, in
essence, a drag (reaction) force which opposes motion, but is essentially constant in magnitude, regardless
of velocity (Fig. 9.4d). The common example is an electric motor, in which we find Coulomb friction drag
due to the rubbing contact between the brushes and the commutator.
On-Off Nonlinearity In this book we have primarily covered three modes of control:
(i) proportional control;
(ii) integral control; and
(iii) derivative control.
Another important mode of feedback control is the on-off control. This class of controllers have only two
fixed states rather than a continuous output. In its wider application, the states of an on-off controller may
not, however, be simply on and off but could represent any two values of a control variable. Oscillatory
behaviour is a typical response characteristic of a system under two-position control, also called bang-bang
control. The oscillatory behaviour may be avoided using a three-position control (on-off controller with a
deadzone). Figure 9.4e shows the characteristics of on-off controllers.
The on-off mode of control results in a variable structure system whose structure changes in accordance
with the current value of its state. A variable structure system can be viewed as a system composed of independ-
ent structures, together with a switching logic between each of the structures. With appropriate switching logic,
a variable structure system can exploit the desirable properties of each of the structures the system is composed
of. Even more, a variable structure system may have a property that is not a property of any of its structures. The
variable structure sliding mode control law is usually implemented on a computer. The reader will be exposed
to simple variable structure systems in this chapter; details to follow later in Chapter 10.
We may classify the nonlinearities as inherent and intentional. Inherent nonlinearities naturally come
with the system’s hardware (saturation, deadzone, backlash, Coulomb friction). Usually such nonlinearities
have undesirable effects, and control systems have to properly compensate for them. Intentional
nonlinearities, on the other hand, are artificially introduced by the designer. Nonlinear control laws, such
as bang-bang optimal control laws and adaptive control laws (refer Chapter 10), are typical examples of
intentional nonlinearities.
Nonlinear Systems Analysis 511
Of all the analytical methods developed over the years for nonlinear systems, the describing function method
is generally agreed upon as being the most practically useful. It is an approximate method, but experience
with real systems and computer simulation results, shows adequate accuracy in many cases. The method
predicts whether limit cycle oscillations will exist or not, and gives numerical estimates of oscillation fre-
quency and amplitude when limit cycles are predicted. Basically, the method is an approximate extension of
frequency-response methods (including Nyquist stability criterion) to nonlinear systems.
To discuss the basic concept underlying the describing function analysis, let us consider the block dia-
gram of a nonlinear system shown in Fig. 9.5, where the blocks G1(s) and G2(s) represent the linear elements,
while the block N represents the nonlinear element.
r=0 + x y
G1(s) N G2(s)
–
The describing function method provides a “linear approximation” to the nonlinear element based on the
assumption that the input to the nonlinear element is a sinusoid of known, constant amplitude. The funda-
mental harmonic of the element’s output is compared with the input sinusoid, to determine the steady-state
amplitude and phase relation. This relation is the describing function for the nonlinear element. The method
can, thus, be viewed as “harmonic linearization” of a nonlinear element.
The describing function method is based on the Fourier series. A review of the Fourier series will be in
order here.
T0
2
bn =
T0 z
0
y(t) sin nw0t dt; n = 1, 2, ... (9.3d)
512 Digital Control and State Variable Methods
Yn = a n2 + bn2 (9.3e)
fn = tan–1
FG a IJ
n
(9.3f )
Hb K
n
In Eqn. (9.3b), the term for n = 1 is called fundamental or first-harmonic, and always has the same frequency
as the repetition rate of the original periodic waveform; whereas n = 2, 3, ..., give second, third, and so forth
harmonic frequencies as integer multiples of the fundamental frequency.
Introducing a change of variable, y = w 0 t, we obtain the following alternative equations for the coeffi-
cients of Fourier series:
2p
1
an =
p
z
0
y(t) cosnw0t d(w0t); n = 0, 1, 2, ... (9.4a)
2p
1
bn =
p
z
0
y(t) sin nw0t d(w0t); n = 1, 2, ... (9.4b)
Certain simplifications are possible when y(t) has a symmetry of one type or another.
(i) Even symmetry: y(t) = y(– t) results in
bn = 0; n = 1, 2, ... (9.4c)
(ii) Odd symmetry: y(t) = –y(–t) results in
an = 0; n = 0, 1, 2, ... (9.4d)
(iii) Odd half-wave symmetry: y(t ± T0/2) = – y(t) results in
an = bn = 0; n = 0, 2, 4, ... (9.4e)
2p
1
B1 =
p z
0
y sinw t d(w t) (9.5d)
As we shall see shortly, the amplitude Y1 and the phase shift f1 are both functions of X, but independent
of w. We may combine the amplitude ratio and the phase shift in a complex equivalent gain N(X), such that
Y (X) B + jA1
N(X) = 1 Ðf 1( X ) = 1 (9.6)
X X
Under first-harmonic approximation, the nonlinear element is completely characterized by the function
N(X); this function is usually referred to as the describing function of the nonlinearity.
The describing function differs from a linear system transfer function, in that its numerical value will vary
with input amplitude X. Also, it does not depend on frequency w (there are, however, a few situations in which
the describing function for the nonlinearity is a function of both, the input amplitude X, and the frequency w
(refer [128–129]). When embedded in an otherwise linear system (Fig. 9.6), the describing function can be
combined with the ‘ordinary’ sinusoidal transfer function of the rest of the system, to obtain the complete open-
loop function; however, we will get a different open-loop function for every different amplitude X. We can
check all of these open-loop functions for closed-loop stability, using Nyquist stability criterion.
+
–
It is important to remind ourselves here that the simplicity in analysis of nonlinear systems using describ-
ing functions, has been achieved at the cost of certain limitations; the foremost being the assumption that in
traversing the path through the linear parts of the system from nonlinearity output back to nonlinearity input,
the higher harmonics will have been effectively lowpass filtered, relative to the first harmonic. When the
linear part of the system does indeed provide a sufficiently strong filtering effect, then the predictions of
describing function analysis, usually, are a good approximation to actual behaviour. Filtering characteristics
of the linear part of the system improve as the order of the system goes up.
The ‘lowpass filtering’ requirement is never completely satisfied; for this reason, the describing function
method is mainly used for stability analysis and is not directly applied to the optimization of system design.
Usually, the describing function analysis will correctly predict the existence and characteristics of limit
cycles. However, false indications cannot be ruled out; therefore, the results must be verified by simulation.
Simulation, in fact, is an almost indispensable tool for analysis and design of nonlinear systems; describing
function and other analytical methods, provide the background for intelligent planning of the simulations.
514 Digital Control and State Variable Methods
We will limit our discussion to separable nonlinear systems with reference input r = 0, and with symmetri-
cal nonlinearities (listed in Section 9.3) in the loop. Refer [128–129] for situations wherein dissymmetrical
nonlinearities are present, and/or the reference input is non-zero.
Before coming to the stability study by the describing function method, it is worthwhile to derive the
describing functions of some common nonlinearities. Our first example is an on–off controller with a
deadzone as in Fig. 9.7. If X is less than deadzone D, then the controller produces no output; the first har-
monic component of the Fourier series is, of course, zero, and the describing function is also zero. If X > D,
the controller produces the ‘square wave’ output y. One cycle of this periodic function of period 2p is
described as follows:
0 ; 0 £ wt < a
M ; a £ wt < (p – a)
0 ; (p – a) £ wt < (p + a) (9.7)
y=
–M ; (p + a) £ wt < (2p - a)
0 ; (2p - a) £ wt £ 2p
+ 2 –
M
–
x 0 t
–M
2 + 3 –
–
x
X
–
+
2 –
2 +
3 –
t
Fig. 9.7 Fourier-series analysis of an onoff controller with deadzone
Nonlinear Systems Analysis 515
This periodic function has odd symmetry:
y(w t) = – y(–w t)
Therefore, the fundamental component of y is given by (refer Eqn. (9.4d)
y1 = B1sinw t
2p
1
where
p 0
B1 = z
y sinw t d(w t)
Due to the symmetry of y (refer Fig. 9.7), the coefficient B1 can be calculated as follows:
p p
2 2
4 4M 4M
B1 =
p z
0
y sinw t d(w t) =
p z
a
sin w t d (w t ) =
p
cos a (9.8)
Since A1 (the Fourier series cosine coefficient) is zero, the first harmonic component of y is exactly in
phase with X sinwt, and the describing function N(X) is given by (refer Eqns (9.6)–(9.8))
0 ;X<D
N(X) = 2
4M
1 -
F DI ;X³D (9.9)
pX H XK
For a given controller, M and D are fixed and the describing function is a function of input amplitude X,
which is graphed in Fig. 9.8a, together with peak location and value, found by standard calculus
maximization procedure. Note that for a given X, N(X) is just a pure real positive number, and thus, plays the
role of a steady-state gain in a block diagram of the form shown in Fig. 9.6. However, this gain term is
unusual in that it changes when X changes.
N(X)
2M
0 2 X
(a)
X Im
X = 2
Increasing
X
1
A
X B Re
X
Increasing
1
–1 = –
-locus N 2M
N(X)
(b)
Fig. 9.8 Describing function of an onoff controller with deadzone
516 Digital Control and State Variable Methods
A describing function N(X) may be equivalently represented by a plot of
1 1
- = - Ð ( - 1/ N ( X )) (9.10)
N( X) N( X )
as a function of X on the polar plane. We will use this form of representation in the next section for stability
analysis.
Rearrangement of Eqn. (9.9) gives
1 pD ( X / D) 2
- = - (9.11)
N( X) 4 M ( X / D )2 - 1
Figure 9.8b gives the representation on the polar plane of the describing function, for an on–off controller
with deadzone. It may be noted that though the points A and B lie at the same place on the negative real axis,
they belong to different values of X/D.
We choose as another example the backlash, since its behaviour brings out certain features not encoun-
tered in our earlier example. The characteristics of backlash nonlinearity, and its response to sinusoidal
input, are shown in Fig. 9.9. The output y is again a periodic function of period 2p ; one cycle of this function
is described as follows:
x – H ; 0 £ w t < p /2
X – H ; p /2 £ w t < (p – b )
y= x + H ; (p – b ) £ w t < 3p /2 (9.12)
– X + H ; 3p /2 £ w t < (2p – b )
x – H ; (2p – b ) £ w t £ 2p
F
where X sinb = X – 2 H; or b = sin–1 1 -
2H
.I
H X K
2p
1
B1 =
p z
0
y sinw t d(w t)
Due to the symmetry of y, only the positive half wave need be considered (Fig. 9.9):
LM p
2 (p - b )
2
A1 =
p
MMz ( X sin w t - H) cos w t d(w t) + z
p
( X - H ) cos w t d (w t )
0
N 2
p O
+ z ( X sin w t + H ) cos w t d (w t ) P
(p - b ) PQ
p p
2 2 (p - b )
2X 2H 2( X - H )
=
p z 0
sinq cosq dq –
p z
0
cosq dq +
p p
z cosq dq
p p
2X 2H
+
p z
(p - b )
sinq cosq dq +
p z
(p - b )
cosq dq
3X 2( X - 2 H ) X
=- + sin b + cos 2 b
2p p 2p
3X 2X X X
=- + sin 2 b + cos 2 b = - cos 2 b (9.13a)
2p p 2p p
L p
(p - b )
2 M 2
p M z z
B1 = M a X sin w t - H f sin w t d(w t) + p
( X - H ) sin w t d (w t )
0
N 2
p O
+ z ( X sin w t + H ) sin w t d (w t ) P
(p - b )
PQ
518 Digital Control and State Variable Methods
p p
2 2 (p - b )
2X 2H 2( X - H )
=
p z0
sin 2q dq -
p z
0
sin q dq +
p z
p
sin q dq
2
p p
2X 2H
+
p z sin 2q d q +
(p - b )
p z sin q dq
(p - b )
=
LM
X p
+ b +
OP
2( X - 2 H )
cos b -
X
sin 2 b
N
p 2 Q p 2p
X Lp O 2 X sin b cos b - X sin 2 b = X LMp + b + 1 sin 2b OP
= + bP + (9.13b)
p MN 2 Q p 2p p N2 2 Q
It is clear that the fundamental component of y will have a phase shift with respect to X sinwt (a feature not
present in our earlier example). The describing function N(X) is given by (refer Eqns (9.6), (9.12), (9.13))
N(X) =
1
(B1 + jA1) =
1 p LM
1
+ b + sin 2 b - j cos2 b
OP (9.14)
X p 2 2N Q
b = sin–1 1 -
FG 2H IJ
H X K
Note that N(X) is a function of the non-dimensional ratio H/X; we can thus tabulate or plot a single graph
of N(X) that will be usable for any numerical value of H (see Table 9.1, and Fig. 9.10).
We have so far given illustrative derivations of describing functions for on–off controller with deadzone,
and backlash. By similar procedures, the describing functions of other common nonlinearities can be
derived; some of these are tabulated in Table 9.2.
Nonlinear Systems Analysis 519
Table 9.2 Describing functions of common nonlinearities
M
4M
1. N(X) =
pX
–M
–
R| 0 ; X < D
2
2. N ( X) = S| 4 M 1-
F DI ; X ³ D
T pX H XK
–M
Slope = K
R| K ;X <S
–S
N( X ) = S 2K M
L -1 S S
+ 1-
F S I OP ; X ³ S
2
3. S
|T p MNsin X X H X K PQ
R| 0 ; X <D
– L D O 2
1- F I P ; X ³ D
4. N ( X) = S 2 K Mp -1 D D
|T p MN 2 - sin -
X X H X K PQ
Slope = K
5. –H N(X) =
LM
1 p 1
+ b + sin 2 b - j cos2 b
OP
H p 2N 2 Q
b = sin -1
1-
F2H I
Slope = 1
H X K
Consider the linear system of Fig. 9.11a. Application of Nyquist stability criterion1 to this system involves
the following steps.
1
Chapter 8 of reference [155].
520 Digital Control and State Variable Methods
(i) Define the Nyquist contour in the s-plane that encloses the entire right-hand side (unstable region) of
the s-plane (Fig. 9.11b).
(ii) Sketch the Nyquist plot, which is the locus of KG(s)H(s), when s takes on values along the Nyquist
contour (Fig. 9.11c).
R (s ) + Y (s )
KG (s)
–
H (s )
(a)
j Im
j
0 –1 Re
Re j
R
–j KG ( j )H ( j )
(b) (c)
Im Im
1 Re 1 Re
K K
w
G ( j )H ( j )
G ( jw)H ( jw)
(d) (e)
Fig. 9.11 Application of the Nyquist stability criterion
values of X corresponding to the enclosed critical points, will provide unstable operations. The intersection
of G( jw) and – 1/N(X) loci, corresponds to the possibility of a periodic oscillation (limit cycle) character-
ized by the value of X on the – 1/N(X) locus, and the value of w on the G( jw) locus.
Figure 9.13a shows a G( jw) plot superimposed on a – 1/N(X) locus. The values of X, for which the
–1/N(X) locus lies in the region to the right of an observer traversing the polar plot of G( jw) in the direction
of increasing w, correspond to unstable conditions. Similarly, the values of X, for which the –1/N(X) locus
lies in the region to the left of an observer traversing the polar plot of G( jw) in the direction of increasing w,
correspond to the stable conditions. The locus of – 1/N(X) and the polar plot of G( jw) intersect at the
point A(w = w2, X = X2), which corresponds to the condition of limit cycle. The system is unstable for
X < X2 and is stable for X > X2. The stability of the limit cycle can be judged by the perturbation technique
described below.
Suppose that the system is originally operating at A under the state of a limit cycle. Assume that a slight
perturbation is given to the system, so that the input to the nonlinear element increases to X3, i.e., the oper-
ating point is shifted to B. Since B is in the range of stable operation, the amplitude of the input to the
nonlinear element progressively decreases, and hence the operating point moves back towards A. Similarly,
a perturbation which decreases the amplitude of input to the nonlinearity, shifts the operating point to C
which lies in the range of unstable operation. The input amplitude now progressively increases and the
operating point again returns to A. Therefore, the system has a stable limit cycle at A.
Figure 9.13b shows the case of an unstable limit cycle. For systems having G( jw) plots and –1/N(X) loci
as shown in Figs 9.14a and 9.14b, there are two limit cycles; one stable and the other unstable.
Describing function method usually gives sufficiently accurate information about stability and limit
cycles. This analysis is invariably followed by a simulation study.
The transfer function G(s) in Fig. 9.12, when converted to state variable formulation, takes the form
x& (t) = Ax(t) + bu(t); x(0) =D x0
y(t) = cx(t)
where
x(t) = n ´ 1 state vector for nth order G(s)
u(t) = input to G(s)
y(t) = output of G(s)
Nonlinear Systems Analysis 523
A = n ´ n matrix
b = n ´ 1 column matrix
c = 1 ´ n row matrix
Im G( j )-plot Im
G( j )-plot
Re Re
Stable
Unstable
Unstable
Stable
X
–1
–1 -locus X
-locus N(X)
N(X)
(a) (b)
Fig. 9.14 Prediction and stability of limit cycles
In Appendix A we use MATLAB Software SIMULINK to obtain response of nonlinear systems of the
form given in Fig. 9.12 with zero reference input and initial state x0.
Example 9.1 Let us investigate the stability of a with system on–off controller, shown in Fig. 9.15. Using
the describing function of an on–off nonlinearity given in Table 9.2, we have
1 pE
- = - (9.18)
N ( E) 4
r=0 1 y
+ e u K
G( s) =
(s + 1)(0.1s + 1)2
– –1
where E is the maximum amplitude of the sinusoidal signal e. Figure 9.16 shows the locus of – 1/N(E) as a
function of E, and the plot of G( jw) for K = 5. Equation (9.17) is satisfied at A since the two graphs
intersect at this point.
The point of intersection on the G( jw) plot gives a numerical value w1 for the frequency of the limit
cycle; whereas, the same point on the – 1/N(E) locus gives us the predicted amplitude E1 of the oscillation.
As an observer traverses the G( jw) plot in the direction of increasing w, the portion O-A of the –1/N(E)
locus lies to its right and the portion A-C lies to its left. Using the arguments presented previously, we can
conclude that the limit cycle is a stable one.
524 Digital Control and State Variable Methods
Since – 1/N(E) is a negative real number, it is clear that intersection occurs at – 180° phase angle. The
frequency w1 that gives ÐG( jw1) = – 180° is 10.95 rad/sec. Furthermore, at point A
1
|G( jw1)| = -
N ( E1 )
At w1 = 10.95, |G( jw1)| = 0.206 and, therefore, (refer Eqn. (9.18)).
1 p E1
- = = 0.206
N ( E1 ) 4
This gives E1 = 0.262.
The describing function analysis, thus predicts a limit cycle (sustained oscillation)
y(t) = – e(t) = – 0.262 sin10.95t
Im For K > 5, the intersection point shifts to B (Fig. 9.16)
resulting in a limit cycle of amplitude E2 > E1 and
frequency w2 = w1. It should be observed that the system
E has a limit cycle for all positive values of gain K.
5
To gain some further insight into on–off control
Re
behaviour and describing function analysis, let us
modify the system of Fig. 9.15 by letting the linear por-
–1 tion be of second-order with
N(E)
5
G(s) =
( s + 1)(0.1 s + 1)
Figure 9.17 shows the plot of G( jw) superimposed
G( j ) on the locus of – 1/N(E). The intersection of the two
Fig. 9.17 Describing function analysis of a graphs is now impossible, since the phase angle of
system with secondorder plant neither G( jw) nor – 1/N(E), can be more lagging than
and onoff controller –180°. Describing function analysis thus seems to
Nonlinear Systems Analysis 525
predict no limit cycling, whereas, the fact that the control signal u must be either + 1.0 or –1.0 dictates that
the system oscillate. One possible interpretation to this analysis would be that the second-order linear system
provides less of the lowpass filtering assumed in the describing function method, than did the third-order
system and thus the approximation has become inaccurate, to the point of predicting no limit cycle when
actually one occurs. Another interpretation would be that the curves actually do ‘intersect’ at the origin,
predicting a limit cycle of infinite frequency and infinitesimal amplitude. This latter interpretation, even
though it predicts a physically impossible result, agrees with the rigorous mathematical solution of the
differential equations: for some non-zero initial value of y, we find that y(t) oscillates about zero, with ever-
decreasing amplitude and ever-increasing frequency. We will examine this solution on the phase plane in a
later section.
Let us now modify the system of Fig. 9.15 by giving the controller a deadzone D, as shown in Fig. 9.18.
The –1/N(E) locus for this type of controller is given by Fig. 9.8b. Plots of G( jw) for different values of K,
superimposed on – 1/N(E) locus, are shown in Fig. 9.19. From this figure, we observe that for K = K1, the
G( jw) plot crosses the negative real axis at a point to the right of – p D/2, such that no intersection takes
place between the graphs of G( jw) and –1/N(E), and therefore, no limit cycle results. With such a gain, the
–1/N(E) locus lies entirely to the left of the G( jw) plot; the system is, therefore, stable, i.e., it has effectively
positive damping.
1
e u K y
(s + 1)(0.1s + 1)2
–
Fig. 9.18 A system controlled by onoff Fig. 9.19 Stability analysis of the system of Fig. 9.18
controller with deadzone
If the gain K is now increased to a value K2, such that the G( jw) plot intersects the –1/N(E) locus at the
point A (i.e., on the negative real axis at – p D/2), then there exists a limit cycle. Now, suppose that the
system is operating at the point A. Any increase in the amplitude of E takes the operating point to the left so
that it is not enclosed by the G( jw) plot, which means that the system has positive damping. This reduces E
till the operating point comes back to A. Any decrease in the amplitude of E again takes the operating point
to the left of the G( jw) plot, i.e., the system has positive damping which further reduces E, finally driving the
system to rest. Since random disturbances are always present in any system, the system under discussion
cannot remain at A. Therefore, the limit cycle represented by A is unstable.
When the gain K is further increased to K3, the graphs of G( jw) and –1/N(E) intersect at two points B and
C. By arguments similar to those advanced earlier, it can be shown that the point B represents an unstable
limit cycle and C represents a stable limit cycle. It may be noted that though the points B and C lie at the same
place on the negative real axis, they belong to different values of E/D.
526 Digital Control and State Variable Methods
It is also clear that limit cycling is predicted only for deadzone D smaller than the value given by
pD
= |G( jw1)|
2
where w1 is the frequency at which the plot G( jw) intersects the negative real axis. A deadzone in on–off
controllers appears to be a desirable feature to avoid limit cycling. However, as we shall see later in this
chapter, a large value of D would cause the steady-state performance of the system to deteriorate.
Example 9.2 Figure 9.20a shows a block diagram for a servo system consisting of an amplifier, a motor,
a gear train, and a load (gear 2 shown in the diagram includes the load element). It is assumed that the inertia
of the gears and load element is negligible compared with that of the motor, and backlash exists between
gear 1 and gear 2. The gear ratio between gear 1 and gear 2 is unity.
e x Gear 1
Amplifier Motor y
e 5 –1
– G(s) =
s(s + 1) 1
–
y
Gear 2
Slope = 1
(a) (b)
Fig. 9.20 A servo system with backlash in gears
The free motion of any second-order nonlinear system can always be described by an equation of the form
y + g ( y, y& ) y& + h( y , y& ) y = 0
&& (9.19)
The state of the system, at any moment, can be represented by a point of coordinates ( y , y& ) in a system of
rectangular coordinates. Such a coordinate plane is called a ‘phase plane’.
In terms of the state variables
x1 = y, x2 = y& , (9.20a)
Second-order system (9.19) is equivalent to the following canonical set of state equations:
dx
x&1 = 1 = x2
dt
(9.20b)
dx2
x& 2 = = − g ( x1 , x2 ) x2 − h( x1 , x2 ) x1
dt
By division, we obtain a first-order differential equation relating the variables x1 and x2:
dx2 g ( x1 , x2 ) x2 + h( x1 , x2 ) x1
=− (9.21)
dx1 x2
Thus, we have eliminated the independent variable t from the set of first-order differential equations given
by (9.20b). In Eqn. (9.21), we consider x1 and x2 as independent and dependent variables, respectively.
For a given set of initial conditions {x1(0),x2(0)}, the solution to Eqn. (9.21) may be represented by a
single curve in the phase plane, for which the coordinates are x1 and x2. The curve traced out by the state
point {x1(t), x2(t)}, as time t is varied from 0 to ¥, is called the phase trajectory, and the family of all possible
curves for different initial conditions is called the phase portrait. Normally, a finite number of trajectories,
defined in a finite region, is considered a portrait.
One may obviously raise the question that when time solutions x1(t) and x2(t), as time t is varied from 0 to
¥, may be obtained by direct integration of Eqns (9.20b) analytically or numerically, where is the necessity
of drawing phase portraits? In fact, as we shall see, the phase portraits provide a powerful qualitative aid for
investigating system behaviour and the design of system parameters, to achieve a desired response. Further-
more, the existence of limit cycles is sharply brought into focus by the phase portrait.
Figure 9.22a shows the output response, and the corresponding phase trajectory, for a linear second-order
servo system described by the differential equation
y + 2z y& + y = 0; y(0) = y0, y& (0) = 0, 0 < z < 1
&&
In terms of the state variables x1 = y and x2 = y& , the system model is given by the equations
x& 1 = x2; x& 2 = – 2z x2 – x1; x1(0) = y0, x2(0) = 0
The origin of the phase plane (x1 = 0, x2 = 0) is the equilibrium point of the system since, at this point, the
derivatives x& 1 and x& 2 are zero (the system continues to lie at the equilibrium point unless otherwise dis-
turbed). The nature of the transient can be readily inferred from the phase trajectory of Fig. 9.22; starting
from the point P, i.e., with initial deviation but no initial velocity, the system returns to rest, i.e., to the origin,
with damped oscillatory behaviour.
Consider now the well-known Van der Pol’s differential equation (refer Eqn. (9.1))
y – m(1 – y2) y& + y = 0
&&
528 Digital Control and State Variable Methods
which describes physical situations in many nonlinear systems. It terms of the state variables x1 = y and x2 =
y& , we obtain
x& 1 = x2; x& 2 = m(1 – x12)x2 – x1
y
x2 = y
y0
t2
t3
t2 t=0
0
t1 t3 t4 t t4 P x1 = y
t1
Origin of the phase plane is the equilibrium point of the system. Figure 9.23 shows phase portraits for
(i) m > 0, (ii) m < 0. In the case of m > 0, we observe that for large values of x1(0), the system response is
damped and the amplitude of x1(t) = y(t) decreases till the system state enters the limit cycle, as shown by the
outer trajectory. On the other hand, if initially x1(0) is small, the damping is negative, hence the amplitude of
x1(t) = y(t) increases till the system state enters the limit cycle, as shown by the inner trajectory. The limit
cycle is a stable one, since the paths in its neighbourhood converge toward the limit cycle. Figure 9.23 shows
an unstable limit cycle for m < 0.
The phase plane for second-order systems is indeed a special case of phase space, or state space, defined
for nth-order systems. Much work has been done to extend this approach of analysis to third-order systems.
Though a phase trajectory for a third-order system can be graphically visualized through its projections on
two planes, say (x1, x2) and (x2, x3) planes, this complexity causes the technique to lose its major power of
quick graphical visualization of the total system response. The phase trajectories are, therefore, generally
restricted to second-order systems only.
x2 = y x2 = y
Stable
limit
cycle
x1 = y x1 = y
Unstable
limit
cycle
Today, phase portraits are routinely computer-generated. However, of course (as, for example, in the case of
root locus for linear systems), it is still practically useful to learn how to roughly sketch phase portraits or
quickly verify the plausibility of computer outputs.
For some special nonlinear systems, particularly piecewise linear systems (whose phase portraits can be
constructed by piecing together the phase portraits of the related linear systems), phase portraits can be
constructed analytically. Analytical methods are useful for systems modelled by differential equations that
can be easily solved. If the system of differential equations cannot be solved analytically, we can use graphi-
cal methods. A number of graphical methods for constructing phase-plane trajectories are now available; we
will describe in this section, the method of isoclines.
Example 9.3 In this example, we consider a model of a satellite shown in Fig. 7.3. We assume that the
satellite is rigid and is in a frictionless environment. It can rotate about the reference axis as a result of torque
T applied to the satellite about its mass centre by firing the thrusters (T = Fd ). The system input is the applied
torque T and the system output is the attitude angle q. The satellite’s moment of inertia is J. The input-outout
model of the system is
d 2θ
J =T (9.22a)
dt 2
530 Digital Control and State Variable Methods
We assume that when the thrusters fire, the thrust is constant; that is, T = A, a constant greater than or less
than zero. In terms of output variable y (= q ), we obtain the equation
y =A
J && (9.22b)
In terms of the state variables x1 = y and x2 = y& , the state equations become
A
x& 1 = x& 2; x& 2 = (9.22c)
J
Elimination of t by division, yields the equation of the trajectories:
dx2 A
= (9.23)
dx1 Jx 2
or J x2 dx2 = A dx1
This equation is easily integrated; the general solution is
Jx 22 ( t )
x1(t) = +C (9.24a)
2A
where C is a constant of integration and is determined by initial conditions, i.e.,
Jx 2 (0)
C = x1(0) – 2 (9.24b)
2A
For an initial state point (x1(0), x2(0)), the trajectory is a parabola passing through the point x1 = C on the
x1-axis where C is defined by Eqn. (9.24b).
A family of parabolas in the (x1, x2) plane is shown in Fig. 9.24a for A > 0. As time t increases, each
trajectory is described in the clockwise direction, as indicated by the arrows. The direction of the phase
trajectories is dictated by the relationship x&1 = x2; x1 increases with time in the upper half of the phase plane
and the state point, therefore, moves from left to right (®); in the lower half of the phase plane, x1 decreases
with time and the state point must, therefore, move from right to left (¬).
The time interval between two points of a trajectory is given by Dt = Dx1/x2av. The trajectories may be
provided with a time scale by means of this equation. This operation is, however, often unnecessary since the
phase portrait is mainly used to display the general features of the system transients.
The phase portrait for A < 0 is shown in Fig. 9.24b. In the special case of A = 0 (no driving torque), the
integration of the trajectory equation (9.23) gives x2(t) = x2(0). The trajectories are, therefore, straight lines
parallel to x1-axis.
x2 = y
x2av x2
x1 x1 = y
x1
t
x1 = y
x1
For an initial state point (x1(0), x2(0)), the trajectory is G0, shifted horizontally by K units. The phase
portrait for A < 0 is shown in Fig. 9.25b. In the special case of A = 0, the phase portrait consists of a family
of straight lines of slope –1/t.
y + μ ( y 2 − 1) y& + y = 0
&& (9.31)
With x1 = y and and x2 = y& , the equation of the trajectories becomes
dx2 − μ ( x12 − 1) x2 − x1
=
dx1 x2
Therefore, the points on the curve
− μ ( x12 − 1) x2 − x1
=m
x2
all have the same slope m. The isocline equation becomes
x1
x2 =
( μ − μ x12 ) − m
By taking m of different values, different isoclines can be obtained. Short line segments are drawn on
the isoclines to generate a field of tangent directions. A trajectory starting at any point can be constructed
by drawing short lines from one isocline to another at average slope corresponding to the two adjoining
isoclines, as shown in Fig. 9.26.
Of course, the construction is much simpler if isoclines are straight lines.
x2
Initial point
3 = tan–1m
2
m=0
m = –1
–3 –2 1 2 3
x1
Trajectory
Isocline
m=1
Field of
tangent –2
directions
–3
m = –1 m=0
Example 9.5 The satellite in Example 9.3, is now placed in a feedback configuration in order to maintain
the attitude q at 0°. This feedback control system, called an attitude control system, is shown in Fig. 9.27.
When q is other than 0°, the appropriate thruster will fire to force q towards 0°. When q = x1 is greater than
0°, u (torque T) = –U, and the trajectories of Fig. 9.24b (corresponding to A < 0) apply. When q = x1 is less
than 0°, u (torque T ) = U, and the trajectories of Fig. 9.24a (corresponding to A > 0) apply. Note that the
switching of u occurs at x1 = 0. Thus the line x1 = 0 (the x2-axis) is called the switching line. From this
discussion we see that Fig. 9.28a illustrates a typical trajectory for the system corresponding to the initial
condition (x10, x20). The system response is thus a periodic motion. Figure 9.28b shows many closed curves for
different initial conditions.
Satellite
U
u(t) 1 1 =y
s x2 s x1
– –U
x2 x2
Each curve
(x01 , x02 ) parabolic
x1 x1
Switching
line
(a) (b)
Fig. 9.28 Typical trajectories for the system of Fig. 9.27
By controlling the switching line in the phase plane, we can control the performance of the attitude
control system. This simple control strategy leads to a robust nonlinear control structure: the variable
structure sliding mode control. The details will follow later in this chapter.
In the following, we obtain the phase portrait of the closed-loop system of Fig. 9.27 using the method of
isoclines. The purpose here is to illustrate the method of isoclines.
The state equations are
x&1 = x2
x&2 = −U sgn x1
Nonlinear Systems Analysis 535
⎡ 1; x1 > 0
where sgn x1 = ⎢
⎣ −1; x1 < 0
dx2 −U sgn x1
Then m= =
dx1 x2
Suppose that U is normalized to a value of unity for convenience. Then
1
x2 = − sgn x1
m
For x1 > 0, sgn x1 = 1, and the isocline equation is
1
x2 = − ; x1 > 0
m
For x1 < 0, sgn x1 = –1, and the isocline equation is
1
x2 =
; x1 < 0
m
Given in Fig. 9.29, is the phase plane showing the isoclines and a typical phase trajectory. Note the
parabolic shape, as was determined analytically earlier in this example.
x2
m=1 m=– 1
2 2
2
(x10 , x20 )
m=1 m=–1
1
m= m=
0
x1
m=–1 –1 m=1
1 1
m =– –2 m=
2 2
Trajectory
Isocline
Fig. 9.29 The isoclines and a typical trajectory for the system of Fig. 9.27
In the phase plane analysis of nonlinear systems, two points should be kept in mind:
· Phase plane analysis of nonlinear systems is related to that of linear systems because the local
behaviour of a nonlinear system can be approximated by a linear system behaviour.
· Yet, nonlinear systems can display much more complicated patterns on the phase plane, such as multiple
equilibrium points, and limit cycles.
536 Digital Control and State Variable Methods
Consider a time-invariant second-order system described by Eqns of the form (refer Eqns (9.27))
x&1 = x2 ; x&2 = f ( x1 , x2 ) (9.32)
Elimination of independent variable t gives the equation of the trajectories of phase plane (refer Eqn. (9.28)):
dx 2 f ( x1 , x 2 ) (9.33)
=
dx1 x2
In this equation, x1and x2 are independent and dependent variables, respectively. Integration of the
equation, analytically, graphically or numerically, for various initial conditions, yields a family of phase
trajectories which displays the general features of the system transients.
x1 = y
x1 = y x1 = y
x1 = y
x1 = y x1 = y
x2 = 2 x1 x2 = 1x1 x2 = 2 x1
x2 = 1x1
(d) Stable node (e) Unstable node (f) Saddle point
Fig. 9.30 Phase portraits for system (9.35)
538 Digital Control and State Variable Methods
where the constants C1 and C2 are determined by the initial conditions.
Using Eqn. (9.36), we can construct a phase portrait on the (x1, x2)-plane with x1 = y and x2 = y& . A typical
phase trajectory is shown in Fig. 9.30a which is a logarithmic spiral into the singular point. This type of
singular point is called a stable focus.
Unstable System with Complex Roots
l1 = a + jb , l2 = a – jb ; a > 0, b > 0
The response y(t) = C1ea t sin(b t + C2) (9.37)
The transient is an exponentially increasing sinusoid; the phase trajectory on the (x1 = y, x2 = y& )-plane is
a logarithmic spiral expanding out of the singular point (Fig. 9.30b). This type of singular point is called an
unstable focus.
Marginally Stable System with Complex Roots
l1 = jb , l2 = – jb; b > 0
The response y(t) = C1 sin(b t + C2) (9.38)
The phase trajectories are closed curves (elliptical), concentric with the singular point (Fig. 9.30c). This
type of singular point is called a centre, or a vortex.
Stable System with Real Roots Assume that l1 and l2 are two real, distinct roots in the left half of the
s-plane; l1 is the root with the smaller modulus. The response
y(t) = C1 e l 1t + C2 e l 2t (9.39a)
It is an overdamped system. The phase portrait in the vicinity of the singular point on the (x1 = y, x2 = y& )-
plane is shown in Fig. 9.30d. Such a singular point is called a stable node.
The phase portrait has two straightline trajectories, defined by the equations
x2(t) = l1 x1(t); x2(t) = l2 x1(t) (9.39b)
It can easily be verified that these trajectories satisfy the differential equation of the given system.
The transient term e l 2t decays faster than the term e l 1t . Therefore, as t increases indefinitely, x1 ®
C1 e l 1t ® 0, and x2 ® l1C1 e l 1t ® 0, so that all the trajectories are tangential at the origin to the straightline
trajectory x2(t) = l1x1(t). The other straightline trajectory, x2(t) = l2 x1(t), is described only if the initial
conditions are such that x2(0) = l2 x1(0).
For stable systems with repeated real roots, the two straightline trajectories coalesce into a single trajec-
tory, again with the slope determined by the root value.
Unstable System with Positive Real Roots Assume that l1 and l2 are two real distinct roots in the
right half of the s-plane; l1 is the smaller root. The phase portrait in the vicinity of the singular point on the
(x1 = y, x2 = y& )-plane is shown in Fig. 9.30e. Such a singular point is called an unstable node.
All trajectories emerge from the singular point and go to infinity. The trajectories are tangential at the origin
to the straightline trajectory, x2(t) = l1x1(t).
Unstable System with One Negative Real Root and One Positive Real Root The phase portrait in
the vicinity of the singular point on the (x1 = y, x2 = y& )-plane is shown in Fig. 9.30f. Such a singular point is
called a saddle.
There are two straightline trajectories with slopes defined by the root values. The straightline due to the
negative root, provides a trajectory that enters the singular point, while the straightline trajectory due to the
positive root, leaves the singular point. All other trajectories approach the singular point adjacent to the
incoming straightline, then curve away and leave the vicinity of the singular point, eventually approaching
the second straightline asymptotically.
Nonlinear Systems Analysis 539
Example 9.6 Consider the nonlinear system shown in Fig. 9.31. The nonlinear element is an on–off
controller with deadzone whose characteristics are shown in the figure.
1
r = const + e –1 u 1 y
1 s(s + 1)
– –1
Comparison of Figs 9.32 and 9.33 reveals that deadzone in on–off controller characteristic helps to
reduce system oscillations, thereby reducing settling time. However, the on–off controller with deadzone
drives the system to a point within the deadzone width. A large deadzone would of course cause the steady-
state performance of the system to deteriorate.
x2
1 x2
1
–1 1 2 3
P x1
1 2 3
–1
P x2
Deadzone –1
Fig. 9.32 A typical trajectory for the system Fig. 9.33 Phase trajectory for the system in
in Fig. 9.31 Fig. 9.31 when the deadzone is absent
Example 9.7 Let us investigate the performance of a second-order position control system with Coulomb
friction. Figure 9.34 is a model for a motor position servo with Coulomb friction on the motor shaft. The
dynamics of the system is described by the following differential equation:
K e – Tc sgn( y& ) = J &&
y + B y&
where Tc is the Coulomb frictional torque.
For constant input r, y& = – e& and &&
y = – e&& . Therefore
J &&
e + B e& + Tc sgn( e& ) + Ke = 0
J T K
or e&& + e& + c sgn( e&) + e =0 (9.42)
B B B
Letting J/B = t, we get
Tc K
t e&& + e& + sgn( e&) + e =0 (9.43)
B B
In terms of state variables
x1 = e; x2 = e&
we get the following description of the system:
K T
x& 1 = x2; t x& 2 = - x1 - x 2 - c sgn( x2 ) (9.44)
B B
Nonlinear Systems Analysis 541
r = const + e + 1 y 1 y
K
Js + B s
– –
Tc
Fig. 9.34 A motor position servo with Coulomb friction on the motor shaft
The singular points are given by the solution of the equations (refer Eqns (9.34b))
K T
0 = x2; 0 = - x1 - x 2 - c sgn( x2 )
B B
The solution gives
T
x1 = – c sgn(x2)
K
Thus, there are two singular points. Their location can be interpreted physically—they are at a value of
e = x1, such that Ke = Tc , i.e., the drive torque is exactly equal to the Coulomb-friction torque. We note that
both the singular points are on the x1-axis (x2 º 0), and that the singular point given by x1 = Tc /K is related to
the lower-half phase plane (x2 negative), and the singular point given by x1 = – Tc /K is related to the upper-
half phase plane (x2 positive).
Let us now investigate the stability of the singular points. For e& > 0, Eqn. (9.43) may be expressed as
d2 FG e + T IJ + d FG e + T IJ + K FG e + T IJ = 0
c c c
t (9.45)
dt 2 H K K dt H K K B H K K
This is a linear second-order system with the singular point at (– Tc /K, 0) on the (e, e& )-plane. The character-
istic equation of this system is given by
1 K
l2 + l + =0
t tB
Let us assume the following parameter values for the system under consideration:
(K/B) = 5, t = 4 (9.46)
With these parameters, the roots of the characteristic equation are complex-conjugate with negative real
parts; the singular point is, therefore, a stable focus (refer Fig. 9.30a).
Let us now investigate the system behaviour when large inputs are applied. Phase trajectories may be
obtained by solving the following second-order differential equations for given initial state points (refer
Eqns (9.35b)–(9.36)).
Region I (defined by x2 > 0) :
T
z + z& + 5 z = 0; z = x1 + c ; x 2 = x&1
4 &&
K
Region II (defined by x2 < 0) :
T
z + z& + 5 z = 0; z = x1 – c ; x 2 = x&1
4 &&
K
542 Digital Control and State Variable Methods
Figure 9.35 shows a few phase trajectories. It is observed that for small as well as large inputs, the
resulting trajectories terminate on a line along the x1-axis from – Tc /K to +Tc /K, i.e., the line joining the
singular points. Therefore, the system with Coulomb friction is stable; however, there is a possibility of large
steady-state error.
x2
Tc /K
x1
– Tc /K
The purpose of this section is to informally introduce the reader to variable structure sliding mode control
systems. Formal introduction to sliding mode control will appear later in Section 10.5.
A variable structure system is a dynamical system, whose structure changes in accordance with the cur-
rent value of its state. A variable structure system can be viewed as a system composed of independent
structures, together with a switching logic between each of the structures. With appropriate switching logic,
a variable structure system can exploit the desirable properties of each of the structures the system is com-
posed of. Even more, a variable structure system may have a property that is not a property of any of its
structures. We illustrate the above ideas with two numerical examples.
Nonlinear Systems Analysis 543
1
r = const e Switching (e, e) u y
+ 1
function
s2
– –1
A
x2
u = –1 u = +1
>0
=0
<0
<0 O x1
O x1
=0
x1
>0
B
x22(0)
x22(0) = x1(0) +
= x1(0) – 2
2
(b) u = + 1 (c)
(a) u = – 1
Fig. 9.37 Phase trjectories for the system of Fig. 9.36
544 Digital Control and State Variable Methods
Suppose the structure of the system is changed at any time the system’s trajectory crosses the vertical axis
of the state plane, that is,
⎧⎪ +1 if x1 > 0
u=⎨ (9.50)
⎪⎩ −1 if x1 < 0
A phase portrait of the system (9.48) with the switching logic specified by (9.50) is shown in Fig. 9.37c; the
system always enters into a limit cycle (In fact, we are familiar with the switching function given by (9.50); it is
on–off switching.
A x2 To achieve asymptotic stability, we redesign
P1 the switching logic. We note that one trajectory of
P3 each family in Figs 9.37a and 9.37b goes through
the origin. Segments A-O and B-O of these two
trajectories terminating at the origin form the
curve shown by the thick line in Fig. 9.38.
The following switching logic seems to give an
O x1 optimal control performance.
(i) If the initial state point lies at P1 on the seg-
ment A-O (Fig. 9.38), the state point (x1(t),
x2(t)) is driven to the origin along a segment
P4 of a parabola corresponding to u = + 1.
B (ii) If the initial point lies at P2 on the segment
P2
B-O (Fig. 9.38), the state point (x1(t), x2(t))
Fig. 9.38 Optimal switching curve is driven to the origin along a segment of a
parabola corresponding to u = – 1.
(iii) If the initial state point lies above or below the curve A-O-B, then only one switching is required to drive
the state point to the origin. Consider the initial state point at P3, which is above the curve A-O-B
(Fig. 9.38). The state point (x1(t), x2(t)) follows a parabola corresponding to u = + 1 till it reaches the
segment B-O. This is followed by switching of the control to –1, and driving of the state point to the
origin along B-O with u = – 1.
(iv) Consider the initial point at P4, which is below the curve A-O-B (Fig. 9.38). The state point (x1 (t),
x2 (t)) follows a parabola corresponding to u = – 1 till it reaches the segment A-O. This is followed by
switching of the control to + 1, and driving of the state point to the origin along A-O with u = + 1.
The double integrator model with the switching strategy described above is in fact an on–off closed-loop
control system shown in Fig. 9.36, in which the controller is actuated by a signal which is a function σ ( e, e& ) of
the error and its first derivative. The differential equation describing the dynamics of the system is given by
y = u or &&
&& e = −u (9.51a)
where e = r – y; r is constant, x1 = e and x2 = e& are state variables and
⎧ +1; σ ( x1 , x2 ) > 0
u=⎨ (9.51b)
⎩ −1; σ ( x1 , x2 ) < 0
It is also clear from Fig. 9.38 that, for all initial conditions, the state point is driven to the origin along the
shortest-time path with no oscillations (the output reaches the final value in minimum time with no ripples,
and stays there; this type of response is commonly called a deadbeat response). Such bang-bang control
systems provide optimal control (minimum-time control) [105].
The equation of optimal switching curve A-0-B can be obtained from Eqns (9.49) by setting (refer
Fig. 9.37)
Nonlinear Systems Analysis 545
The optimal switching may be realized by a computer. It accepts the state point (x1, x2) and computes the
switching function given by Eqn. (9.52b). It then manipulates the on–off controller to produce the optimal
control components according to Eqn. (9.53).
Example 9.9 In this example, we discuss a suboptimal method of switching the on–off controller in
Fig. 9.36. The advantage of the method described below, is that implementation of the switching function is
simple. The cost paid is in terms of increase in settling time compared to the optimal solution.
Consider the following suboptimal switching function:
σ ( e, e&) = e + K D e&
The system equations now become
e = −u;
&& u = sgn(e + K D e&)
In the state variable form ( x1 = e, x2 = e&) ,
x&1 = x2 ; x&2 = −sgn(x1 + K D x2 )
The phase plane is divided into two regions by the switching line
x1 + K D x2 = 0 (9.54)
The trajectory equation for the region defined by x1 + KD x2 > 0, is (refer Eqn. (9.49a))
x1 (t ) = 12 x22 (t ) + x1 (0) − 12 x22 (0 )
and the trajectory equation for the region defined by x1 + KD x2 > 0, is (refer Eqn. (9.49b))
x1 (t ) = − 12 x22 (t ) + x1 (0) + 12 x22 (0)
In each half of the phase plane separated by the switching line (9.54), the system trajectories would
be parabolas. Assume that the system under consideration starts with initial conditions corresponding to
point A in Fig. 9.39. The on–off controller switches when the representative point reaches B. By geometry of
the situation, we see that the trajectory resulting from the reversal of the drive at point B, will bring the
546 Digital Control and State Variable Methods
1 representative point on a parabola passing
Slope = – K
D x2 much closer to the origin. This will continue
until the trajectory intersects the switching
line at a point closer to the origin than the
points A1 and A2 which are points of intersec-
A1
tion of the switching line with parabola pass-
C ing through the origin. In Fig. 9.39, point C
corresponds to this situation. Here, an instant
A x1 after the on–off controller is switched, the
system trajectory will recross the switching
line and the on–off controller must switch
A2
back. The on–off controller will, thus, chatter
while the system stays on the switching line.
B In a second-order system, the chattering
Region II Region I
frequency will be infinite and amplitude will
x1+ KD x2 < 0 x1 + KD x2 > 0 be zero; the representative point, thus, slides
u = –1 u= +1 along the switching line. It can easily be
Fig. 9.39 Suboptimal switching curve verified that with KD = 0 (on–off controller
switching on the vertical axis), the system always enters into a limit cycle. The switching process given by
the switching line (9.54) has, thus, converted the oscillating system into an asymptotically stable one; though
the goal has been achieved in a suboptimal way.
Example 9.10 Consider the nonlinear system described by the state equations:
x& 1 = x2
x& 2 = – x1 – x21 – x2
The equilibrium states of this system are given by the solutions of the following set of equations (refer
Eqn. (9.56)):
x&1e = x2e = 0
x&2e = – x1e – (x1e)2 – x2e = 0
e
From the first equation, x2 is equal to zero. From the second equation,
(x1e)2 + x1e = x1e(x1e + 1) = 0
which has the solutions x1e = 0 and x1e = – 1. Thus, there are two equilibrium states, given by
xe1 =
LM OP
0
, xe2 =
LM OP
-1
0NQ N Q
0
In the stability analysis of a system, we are usually concerned with the following two notions of stability:
(i) when a relaxed system (x(t0) = 0) is excited by a bounded input, the output must be bounded; and
(ii) in an unforced system (u = 0) with arbitrary initial conditions, the system state must tend towards the
equilibrium point in state space.
We have seen earlier in Chapter 5 that the two notions of stability defined above are essentially equivalent
for linear time-invariant systems.
Unfortunately in nonlinear systems, there is no definite correspondence between the two notions. Most of
the important results obtained thus far concern the stability of nonlinear autonomous2 systems:
x& (t) = f(x(t)); x(t0) =D x0 (9.57)
in the sense of second notion above.
It may be noted that even for this class of systems, the concept of stability is not clear cut. The linear
autonomous systems have only one equilibrium state (the origin of the state space), and their behaviour
about the equilibrium state completely determines the qualitative behaviour in the entire state space. In
nonlinear systems, on the other hand, system behaviour for small deviations about the equilibrium point may
be different from that for large deviations. Therefore, local stability does not imply stability in the overall
state space, and the two concepts should be considered separately.
Secondly, the set of nonlinear equations (refer Eqns (9.56)–(9.57)),
f(xe) = 0 (9.58)
may result in a number of solutions (equilibrium points). Due to the possible existence of multiple equilib-
rium states, the system trajectories may move away from one equilibrium state to the other as time
progresses. Thus, it appears that in the case of nonlinear systems, it is simpler to speak of system stability
relative to the equilibrium state rather than using the general term ‘stability of a system’.
We shall confine our attention to nonlinear autonomous systems described by state equation of the form
D x0
x& (t) = f(x(t)); f(0) = 0; x(0) = (9.59)
Note that the origin of the state space has been taken as the equilibrium state of the system. There is no
loss in generality in this assumption, since any non-zero equilibrium state can be shifted to the origin by
appropriate transformation. Further, we have taken t0 = 0 in Eqn. (9.59), which is a convenient choice for
time-invariant systems.
2
An unforced (i.e., u = 0) and time-invariant system is called an autonomous system.
548 Digital Control and State Variable Methods
For nonlinear autonomous systems, local stability may be investigated through linearization in the neigh-
bourhood of the equilibrium point. The validity of determining the stability of the unperturbed solution near
the equilibrium points from the linearized equations was developed independently by Poincaré and Lyapunov
in 1892. Lyapunov designated this as the first method. This stability determination is applicable only in a small
region near the equilibrium point and results in stability in-the-small.
The region of validity of local stability is generally not known. In some cases, the region may be too small
to be of any use practically; while in others the region may be much larger than the one assumed by the
designer—giving rise to systems that are too conservatively designed. We, therefore, need information about
the domain of stability. We present, in this chapter, the ‘second method of Lyapunov’ (also called the ‘direct
method of Lyapunov’) which is used to determine stability in-the-large.
The concept of stability formulated by Russian mathematician A.M. Lyapunov is concerned with the
following question:
If a system with zero input is perturbed from the equilibrium point xe at t = 0, will the state x(t) return to
xe, remain ‘close’ to xe, or diverge from xe?
Lyapunov stability analysis is thus concerned with the boundedness of the free (unforced) response of a
system. The free response of a system is said to be stable in the sense of Lyapunov at the equilibrium point
xe if, for every initial state x(t0) which is sufficiently close to xe, x(t) remains near xe for all t. It is asymptoti-
cally stable at xe if x(t), in fact, approaches xe as t ® ¥.
In the following, we give mathematically precise definitions of different types of stability with respect to
the system described by Eqn. (9.59).
Stability in the Sense of Lyapunov The system described by Eqn. (9.59) is stable in the sense of
Lyapunov at the origin if, for every real number e > 0, there exists a real number d(e) > 0 such that ||x(0)|| <
d results in ||x(t) || < e for all t ³ 0.
This definition uses the concept of the vector norm. The Euclidean norm for a vector with n components
x1, x2, . . ., xn is (refer Eqn. (5.6a))
|| x|| = (x12 + x22 + L + xn2)1/2
||x|| £ R defines a hyper-spherical region S(R) of radius R, surrounding the equilibrium point xe = 0. In terms
of the Euclidean norm, the above definition of stability implies that for any S(e) that we may designate, the
designer must produce S(d) so that the system state, initially in S(d), will never leave S(e). This is illustrated
in Fig. 9.40a.
S(e ) S(d )
S(d )
x(t) S(e )
0 0
x(0) x(0)
(a) (b)
Fig. 9.40 Stability definitions
Nonlinear Systems Analysis 549
Note that this definition of stability permits the existence of continuous oscillation about the equilibrium
point. The state-space trajectory for such an oscillation is a closed path. The amplitude and frequency of the
oscillation may influence whether it represents acceptable performance.
y (t) + w2 y(t) = 0
&&
where w is the frequency of oscillations.
Define the state variables as
x1(t) = y(t), x2(t) = y& (t)
This gives the state equations
x&1(t) = x2(t)
x&2(t) = – w2 x1(t)
x2
From these equations, we obtain the following equation
for state trajectory:
dx2 x
= - w2 1 or x22 + w2 x12 = c2; c = constant
dx1 x2
x1 Several state trajectories for various values of c, cor-
responding to various initial conditions of x1 and x2, are
shown in Fig. 9.41. For a specified value of e, we can
find a closed state trajectory whose maximum distance
from the origin is e. We then select a value of d which is
Fig. 9.41 less than the minimum distance from that curve to the
origin. The d (e) so chosen, will satisfy the conditions
that guarantee stability in the sense of Lyapunov.
The Lyapunov stability analysis is based upon the concept of energy, and the relation of stored energy with
system stability. We first give an example to motivate the discussion.
550 Digital Control and State Variable Methods
x1
Consider the spring-mass-damper system of Fig. 9.42. The govern-
ing equation of the system is
K x&&1 + B x&1 + Kx1 = 0
A corresponding state variable model is
M=1
x&1 = x2 (9.60)
B x&2 = – Kx1 – Bx2
At any instant, the total energy V in the system consists of the kinetic
energy of the moving mass, and the potential energy stored in the spring.
Fig. 9.42 A spring-mass-damper V(x1, x2) = 1 x22 + 1 Kx12 (9.61)
2 2
system
Thus V(x) > 0 when x ¹ 0
V(0) = 0
This means that the total energy is positive unless the system is at rest at the equilibrium point xe = 0, where
the energy is zero.
The rate of change of energy is given by
. d ¶ V dx1 ¶ V dx 2
V (x1, x2) = V( x1 , x2 ) = + = - Bx 22 (9.62)
dt ¶ x1 dt ¶ x 2 dt
Case I: Positive damping (B > 0)
Let (x10, x20) be an arbitrary initial state of the system of Fig. 9.42. The solution of the differential equations
(9.60) corresponding to this initial state, gives the state trajectory x(t) for t > 0. Since the linear system (9.60)
is stable under the condition of positive damping, x(t) ® 0 as t ® ¥.
Let us study the relation of stored energy with system stability. The initial energy in the system is
V(x01, x20) = 1
2
(x20)2 + 1
2
K(x10)2
As per Eqn. (9.62), the rate of change of energy is negative and, therefore, system energy V(x1, x2) continu-
ally decreases along the trajectory x(t), t > 0. There is only one exception; when the representative point x(t)
of the trajectory reaches x2 = 0 points in the state plane, the rate of change of energy becomes zero. However,
as seen from Eqns (9.60), x& 2 = – Kx1 at the points where x2 = 0. The representative point x(t), therefore,
cannot stay at the points in the state plane where x2 = 0 (except at the origin). It immediately moves to the
points at which the rate of change of energy is negative and the system energy, therefore, continually
decreases from its initial value V(x01, x02) along the trajectory x(t), t > 0, till it reaches a value V = 0 at the
equlibrium point xe = 0.
A visual analogy may be obtained by considering the surface
V(x1, x2) = 1
2
x22 + 1
2
Kx21 (9.63)
This is paraboloid (a solid generated by rotation of parabola about its axis of symmetry) surface as shown
in Fig. 9.43. The value V(x1, x2) = ki (a constant) is represented by the intersection of the surface V(x1, x2) and
the plane z = ki. The projection of this intersection on the (x1, x2)-plane is a closed curve, an oval, around the
origin. There is a family of such closed curves in the (x1, x2)-plane for different values of ki. The closed curve
corresponding to V(x1, x2) = k1, lies entirely inside the closed curve corresponding to V(x1, x2) = k2 if k1 < k2.
The value V(x1, x2) = 0 is the point at the origin. It is the innermost curve of the family of closed curves,
representing different levels on the paraboloid for V(x1, x2) = ki.
If one plots a state-plane trajectory starting from the point (x01, x02), the representative point x(t) crosses the
ovals for successively smaller values of V(x1, x2), and moves towards the point corresponding to V(x1, x2) =
0, which is the equilibrium point. Figure 9.43 shows a typical trajectory.
Nonlinear Systems Analysis 551
V = k3 z = V(x)
V = k3
k1 < k2 < k3
V = k2
t1 < t2 < t3
V = k1
V = k2
t3 x1
V = k1
t2 (x10, x20)
x1 t1
x2
x2
(a) (b)
Fig. 9.43 Constant-V curves
Note also that V(x) given by Eqn. (9.63) is radially unbounded 3, i.e., V(x) ® ¥ as ||x|| ® ¥. The ovals on
the (x1, x2)-plane extend over the entire state plane and, therefore, for any initial state x0 in the entire state
plane, the system energy continually decreases from the value V(x0) to zero.
Case II: Zero damping (B = 0)
Under the condition of zero damping, Eqns (9.60) become
x& = Ax
with A=
LM 0 1OP
N- K 0Q
The eigenvalues of A lie on the imaginary axis in the complex plane; the system response is, therefore,
oscillatory in nature.
.
From Eqn. (9.62) we observe that when B = 0, the rate of change of energy V (x1, x2) vanishes identically
along any trajectory; the system energy V(x1, x2) = V(x10, x20) for all t ³ 0. The representative point x(t) cannot
cross the V-contours in Fig. 9.43; it simply moves along one of these contours.
In the example given above, it was easy to associate the energy function V with the given system. How-
ever, in general, there is no obvious way of associating an energy function with a given set of equations
describing a system. In fact, there is nothing sacred or unique about the total energy of the system which
allows us to determine system stability in the way described above. Other scalar functions of the system state
can also answer the question of stability. This idea was introduced and formalized by the mathematician
A.M. Lyapunov. The scalar function is now known as the Lyapunov function and the method of investigating
stability using Lyapunov’s function is known as the Lyapunov’s direct method.
In Section 5.2, we introduced the concept of sign definiteness of scalar functions. Let us examine here the
scalar function V(x1, x2, . . ., xn) =
D V(x) for which V(0) = 0 and the function is continuous in a certain region
surrounding the origin in state space. Due to the manner in which these V-functions are used later, we define
the sign definiteness with respect to a region around the origin represented as ||x || £ K (a positive constant)
where ||x|| is the norm of x.
3
Use of the norm definition given by Eqn. (5.6b) immediately proves this result.
552 Digital Control and State Variable Methods
Positive Definiteness of Scalar Functions A scalar function V(x) is said to be positive definite in the
region ||x|| £ K (which includes the origin of the state space), if V(x) > 0 at all points of the region except at
the origin, where it is zero.
Negative Definiteness of Scalar Functions A scalar function V(x) is said to be negative definite if
[ – V(x)] is positive definite.
Positive Semidefiniteness of Scalar Functions A scalar function V(x) is said to be positive semidefinite
in the region ||x || < K, if its value is positive at all points of the region except at finite number of points,
including origin, where it is zero.
Negative Semidefiniteness of Scalar Functions A scalar function V(x) is said to be negative semidefinite
if [ – V(x)] is positive semidefinite.
Indefiniteness of Scalar Functions A scalar function V(x) is said to be indefinite in the region || x || < K,
if it assumes both positive and negative values, within this region.
Examples For all x in the state plane,
(i) V(x) = x21 + x22 is positive definite,
(ii) V(x) = (x1 + x2)2 is positive semidefinite,
(iii) V(x) = – x21 – (x1 + x2)2 is negative definite,
(iv) V(x) = x1x2 + x22 is indefinite.
An important class of scalar functions is a quadratic form:
V(x) = xTPx
where P is a real, symmetric constant matrix. In this form, the definiteness of V is usually attributed to P. We
speak of the positive (negative) definite and the positive (negative) semidefinite P depending upon the
definiteness of V(x) = xTPx.
Tests for checking definiteness of a matrix were described in Section 5.2. We consider an example here:
LM
10 1 -2 OP
P= 4 -1
MM-21 PP
N
-1 1 Q
As per Sylvester’s test, the necessary and sufficient condition for P to be positive definite is that all the
successive principal minors of P be positive.
Applying Sylvester’s test to the given P, we obtain
10 > 0
10 1
>0
1 4
10 1 -2
1 4 -1 > 0
-2 -1 1
Since all the successive principal minors of the matrix P are positive, V(x) = xTPx is a positive definite fun
ction.
In the following, we state, without proof, the basic Lyapunov stability results. For proof refer [105].
Theorem 9.1 For the autonomous system (9.59), sufficient conditions of stability are as follows:
Nonlinear Systems Analysis 553
Suppose that there exists a scalar function V(x) which, for some real number e > 0, satisfies the following
properties for all x in the region ||x || £ e :
(i) V(x) > 0; x ¹ 0
(i.e., V(x) is positive definite function)
(ii) V(0) = 0
(iii) V(x) has continuous partial derivatives with respect to all components of x.
Then the equilibrium state xe = 0 of the system (9.59) is
. .
(iva) asymptotically stable if V (x) < 0, x ¹ 0, i.e., V (x) is a negative definite function;
.
(ivb) asymptotically stable in-the-large if V (x) < 0, x ¹ 0, and in addition V(x) ® ¥ as ||x|| ® ¥.
Although Theorem 9.1 is a basic theorem of Lyapunov stability analysis, it is somewhat restrictive
. .
because V (x) must be negative definite. This requirement can be relaxed to V (x) £ 0 (a negative semidefinite
.
V (x)) under proper conditions. This relaxed requirement is sufficient if. it can be shown that no trajectory can
stay forever at the points or on the line other than the origin, at which V (x) = 0. This is the case for the system
of Fig. 9.42 as described at the beginning of this section.
.
If, however, there exists a positive definite function V(x) such that V (x) is identically zero along a trajec-
tory, the system will remain in that trajectory and will not approach the origin. The equilibrium state at the
origin, in this case, is said to be stable in the sense of Lyapunov.
Theorem 9.2 For the autonomous system (9.59), sufficient conditions of stability are as follows.
Suppose that there exists a scalar function V(x) which, for some real number e > 0, satisfies the following
properties for all x in the region ||x || £ e :
(i ) V ( x) > 0; x ¹ 0 UV (i.e, V (x) is positive definite function)
(ii ) V (0) = 0 W
(iii) V(x) has continuous partial derivatives with respect to all components of x.
Then the equilibrium state xe = 0 of the system (9.59) is
554 Digital Control and State Variable Methods
. . .
(iva) asymptotically stable if V (x) < 0, x ¹ 0, i.e., V (x) is a negative definite function; or if V (x) £ 0 (i.e.,
.
V (x) is negative semidefinite)
. and no trajectory can stay forever at the points or on the line other than
the origin, at which V (x) = 0;
(ivb) asymptotically stable in-the-large if conditions (iva) are satisfied, and in addition V(x) ® ¥ as ||x|| ® ¥;
.
(ivc) stable in the sense of Lyapunov if V (x) is identically zero along a trajectory.
Example 9.13 Consider the linear feedback system shown in Fig. 9.44 with r(t) = 0. We know that the
closed-loop system will exhibit sustained oscillations.
The differential equation for the error signal is
r=0 + e K y e&& + a 2e = Ky = – Ke
G(s) =
s2 + a2 Taking e and e& as state variables x1 and x2 respec-
–
tively, we obtain the following state equations:
x& 1 = x2 (9.67)
Fig. 9.44 Linear feedback system
x& 2 = – (K + a 2)x1
Let us choose the following scalar positive definite function as a possible Lyapunov function:
V(x) = x21 + x22 (9.68)
.
Then V (x) becomes
.
V (x) = 2x1 x& 1 + 2x2 x& 2 = 2[1 – (K + a 2)]x1x2
.
V (x) is indefinite. This implies that V(x), given by Eqn. (9.68), is not a Lyapunov function and stability can-
not be determined by its use (the system is known to be stable in the sense of Lyapunov as per the stability
definition given in Section 9.11).
We now test
V(x) = p1x21 + p2 x22; p1 > 0, p2 > 0
for Lyapunov properties. Conditions (i)–(iii) of Theorem 9.2 are obviously satisfied.
.
V (x) = 2p1x1x2 – 2p2(K + a 2)x1x2
2
.
If we set p1 = p2(K + a ), V (x) = 0 and, as per Theorem 9.2, the equilibrium state of the system (9.67) is
stable in the sense of Lyapunov.
K
G(s) =
s(s + a )
If the reference variable r(t) = 0, then the differential equation for the actuating error will be
e&& + a e& + Ke = 0
Taking e and e& as state variables x1 and x2 respectively, we obtain the following state equations:
x& 1 = x2
(9.69)
x& 2 = – K x1 – a x2
A candidate for a Lyapunov function is
V(x) = p1x21 + p2 x22; p1 > 0, p2 > 0,
which is a positive definite function.
Nonlinear Systems Analysis 555
Its derivative is
.
V (x) = 2(p1 x1 x& 1 + p2 x2 x& 2) = 2(p1 – p2 K)x1x2 – 2 p2a x22
If we take p1 = K p2 with K > 0, a > 0, we obtain
.
V (x) = – 2a p2 x22
which is negative semidefinite.
. .
The condition V (x) = 0 exists along the x1-axis where x2 = 0. A way of showing that V (x), being negative
semidefinite, is sufficient for asymptotic stability is to show that x1-axis is not a trajectory of the system
differential equation (9.69). The first equation yields x& 1 = 0 or x1 = c. The x1-axis can be a trajectory only if
x2 = 0 and x& 2 = 0. Since on x1-axis, x& 2 = – Kc ¹ 0, x1-axis is not a trajectory, and the equilibrium state at the
origin of the system (9.69) is asymptotically stable.
Further, since V(x) ® ¥ as || x || ® ¥, the equilibrium state is asymptotically stable in-the-large.
This result, obtained by Lyapunov’s direct method, is readily recognized as being correct either from the
Routh stability criterion or from the root locus.
Instability It may be noted that instability in a nonlinear system can be established by direct recourse to
the instability theorem of the direct method. The basic instability theorem is presented below.
Theorem 9.3 For the autonomous system (9.59), sufficient conditions for instability are as follows:
Suppose that there exists a scalar function W(x) which, for some real number e > 0, satisfies the following
properties for all x in the region || x || £ e :
556 Digital Control and State Variable Methods
The determination of stability through Lyapunov’s direct method centres around the choice of a positive
definite function V(x), called the Lyapunov function. Unfortunately, there is no universal method for select-
ing the Lyapunov function which is unique for a given nonlinear system. Some Lyapunov functions may
provide better answers than others. Several techniques have been devised for the systematic construction of
Lyapunov functions; each is applicable to a particular class of systems.
In addition, if a Lyapunov function cannot be found, it in no way implies that the system is unstable
(stability theorems presented in the earlier section, merely provide sufficient conditions for stability). It only
means that our attempt in trying to establish the stability of an equilibrium state of the system has failed.
Also, if a certain Lyapunov function provides stability for a specified parameter region, this does not neces-
sarily mean that leaving that region will result in system instability. Another choice of Lyapunov function
may lead to a larger stability region.
Further, for a given V-function, there is no general method which will allow us to ascertain whether it is
positive definite. However, if V(x) is in quadratic form in xi’s, we can use simple tests given in Section 5.2 to
ascertain definiteness of the function.
Inspite of all these limitations, Lyapunov’s direct method is the most powerful technique available today
for the stability analysis of nonlinear systems. Many mathematical methods for constructing Lyaunov func-
tions are available in the literature. Two of these methods—“Krasovskiis Method”, and the “Variable Gradi-
ent Method”—are simple and systematic ways of constructing Lyapunov functions. Howerver, the math-
ematical approach of these methods, though effective for simple systems, is often of little use for complex
dynamic equations.
Therefore, faced with specific systems, one has to use experience, intuition, and physical insights to
search for an approptiate Lyapunov function. An elegant and powerful Lyapunov analysis may be possible
for complex systems if engineering insight and physical properties are properly exploited [126].
Stable
0 1 2 x1
Stable
Stable quadrant
1 – 2x1x2 = 0
Possibly unstable
Fig. 9.45 Stability regions for the nonlinear system of Example 9.16
Example 9.17 As an illustration of the Krasovskii method, consider the nonlinear system shown in
Fig. 9.46, where the nonlinear element is described as
u = g(e) = e3
r=0 + e u K y
g(.)
s(s + 1)
–
⎛ ∂ 2V ∂ 2V ⎞
is always symmetric ⎜ = ⎟.
⎜ ∂xi ∂xj ∂xj ∂xi ⎟
⎝ ⎠
Under the constraints (9.79), we start by choosing g(x) such that (g(x))T f (x) is negative definite. The func-
tion V(x) is then computed from the integral
x x n
V (x) = ∫ gT ( y ) d y = ∫ ∑ gi ( y1 , y2 ,..., yn ) dyi (9.80a)
0 0 i =1
The integration is taken over any path joining the origin to x (The line integral of a gradient vector is
independent of the path [125]). Usually, this is done along the axes; that is
x1 x2
V ( x) = ∫ g1 ( y1 , 0, 0,..., 0 ) dy1 + ∫ g2 ( x1 , y2 , 0,..., 0 ) dy2
0 0 (9.80b)
xn
+L + ∫ g n ( x1 , x2 ,..., xn−1 , yn ) dyn
0
By leaving some parameters of g(x) undetermined, one would try to choose them to ensure that V(x) is
positive definite.
Nonlinear Systems Analysis 561
Example 9.18 Let us use the variable gradient method to find a Lyapunov function for the nonlinear
system
x&1 = – x1
(9.81)
x&2 = – x2 + x1 x22
We assume the following form for the gradient of the undetermined Lyapunov function.
⎡ g (x) ⎤ ⎡ a x + a x ⎤
g(x) = ⎢ 1 ⎥ = ⎢ 11 1 12 2 ⎥ ; aij may be functions of x (9.82)
⎣ g 2 (x)⎦ ⎣ a21 x1 + a22 x2 ⎦
The function has to satisfy the constraints (9.79):
∂g1 ∂g2 ∂a ∂a
= , i.e., a12 + x2 12 = a21 + x1 21
∂x2 ∂x1 ∂x2 ∂x1
If the coefficients are chosen to be
a11 = a22 = 1; a12 = a21 = 0
then
g1(x) = x1 and g2(x) = x2
and
.
V (x) = (g(x))T f(x)
= − x12 − x22 (1 − x1 x2 ) (9.83)
.
Thus, if (1–x1x2) > 0, then V is negative definite. The function V(x) can be computed as
x1 x2 2 2
x1 + x2
V (x ) = ∫ y1dy1 + ∫ y2 dy2 = (9.84)
0 0
2
This is a positive definite function and, therefore, the asymptotic stability of the origin in the region
1 > x1x2 is guaranteed.
Note that (9.84) is not the only Lyapunov function obtainable by the variable gradient method. A different
choice of aij’s may lead to another Lyapunov function for the system.
Review Examples
Review Example 9.1 Figure 9.48 shows the input-output waveforms of a saturating element or a limiter.
For small input signals (X < S), the output is proportional to the input. However, if the input amplitude is
sufficiently large to cause saturation (X > S), the output is a clipped sine wave. One cycle of the output,
which is a periodic function of period 2p, is described as follows:
K x; 0 £ w t < a
KS; a £ w t < (p – a)
y= K x; (p – a) £ w t < (p + a)
– KS; (p + a) £ w t < (2p – a)
K x; (2p – a) £ w t £ 2p
where a = sin–1(S/X)
562 Digital Control and State Variable Methods
y y
Slope = K
+ 2
KS
–S
0
S x t
– KS
– 2 +
x
X
–
+
2 –
2 +
3 –
t
Fig. 9.48 Fourier-series analysis of a saturating element
Due to symmetry of y (refer Fig. 9.48), the coefficient B1 can be calculated as follows:
p
2
LMa
OP p
2
4 4K
B1 =
p z0
y sin q dq =
p
MMz X sin q dq
0
+ z S sin q dq P
2
PPQ a
MN
4K L X O
= M (a - sin a cos a ) + S cos a P
p N2 Q
B1 2K ML S S F S I 2S 1 - FG S IJ OP
2 2
= sin -1
- 1- G J +
X p M
N X X H XK X H X K PQ
Therefore
Nonlinear Systems Analysis 563
R| 2 K L S S FG S IJ 2 OP
N(X) = S p M
Msin -1
X
+
X
1-
H XK PQ; X ³ S (9.85)
||T K N ; X < S
The describing functions given by Eqn. (9.85) and nonlinearity 4 in Table 9.2, have a common term of
the form
2 LM 1 1 1 FG IJ 2 OP
Nc(z) = sin - 1 + 1- (9.86)
p MN z z z H K PQ
In terms of Nc(z), the describing function (9.85) may be expressed as
N(X) = KNc
X FG IJ (9.87)
S H K
The function Nc(z) is listed in Table 9.3.
Review Example 9.2 Consider the nonlinear system of Fig. 9.49a, with a saturating amplifier having
gain K in its linear region. Determine the largest value of gain K for the system to stay stable. What would be
the frequency, amplitude and nature of the limit cycle for a gain K = 3?
r=0 + e 1 y
S=1 s(1 + 2s)(1 + s)
–
(a)
564 Digital Control and State Variable Methods
Im
E increasing
(w1, E1)
A –1 Re
–1
N(X)
KG( jw )
(b)
Fig. 9.49 Nonlinear system with saturating amplifier
Solution It is convenient to regard the amplifier to have unit gain and the gain K to be attached to the
linear part. From Eqn. (9.87), we obtain, for S = 1 and K = 1, N(E) = Nc (E); the function Nc(E) is listed in
Table 9.3.
The locus of – 1/N(E) thus starts from (– 1 + j0) and travels along the negative real axis for increasing E,
as shown in Fig. 9.49b. Now, for the equation
KG ( jw) = –1/N(X)
to be satisfied, G( jw) must have an angle of – 180°:
ÐG( jw) = – 90° – tan– 1 2w – tan– 1w = –180°
This gives
2w + w
= tan 90° = ¥ or w = 1/ 2 rad/sec.
1 - 2w 2
The largest value of K for stability is obtained when KG( jw) passes through (–1 + j0), i.e.,
K
| KG( jw )|w =1/ =1 or
2
FG 1 IJ d 3 iFG 3 IJ = 1 or K = 3/2
H 2K H 2K
For K = 3, KG( jw) plot intersects – 1/N(X) locus, resulting in a limit cycle at (w1, E1) where w1 = 1/ 2 ,
while E1 is obtained from the relation
| –1/N(E1)| = |3G( jw1)| = 2 or |N(E1)| = 0.5
From Table 9.3, we obtain
E1 @ 2.5
Applying the stability test for the limit cycle reveals that point A in Fig. 9.49b corresponds to a stable limit
cycle.
Nonlinear Systems Analysis 565
Review Example 9.3 Consider the servomechanism of Fig. 9.50, having a deadzone nonlinearity in
the feedback loop. With x1 = y and x2 = y& , we get
x&1 = x2
⎧ − x2 ; −1 < x1 < 1
⎪
x&2 = ⎨ − x2 − 2( x1 − 1); x1 > 1
⎪ − x − 2( x + 1); x < −1
⎩ 2 1 1
Slope = 2
Plant
e –1 u 1 y
1 s(s + 1)
–
m= 1 m=
–1 x1
m = –3 m = –2 m=1
m=0
Fig. 9.51 Isoclines and typical trajectories for the system of Fig. 9.50
566 Digital Control and State Variable Methods
Region II (defined by x1 > 1) The isocline equation is
− x − 2 ( x1 − 1)
m= 2
x2
or
−2 ( x1 − 1)
x2 =
m +1
The isoclines are straightlines intersecting the x1-axis at x1 = 1, with slope equal to –2/(m + 1). Some of these
isoclines are shown in Fig. 9.51.
Region III (defined by x1 < –1) The isocline equation is
−2 ( x1 + 1)
x2 =
m +1
These isoclines are straightlines intersecting the x1-axis at x1 = –1, with slope equal to –2/(m + 1). Some of
these isoclines are shown in Fig. 9.51.
Some typical phase trajectories are also shown in Fig. 9.51. Note that for the given system, we have an
equilibrium zone, –1 £ x1 £ 1, with x2 = 0. The system comes to rest at any point within this zone.
Problems
9.1 For a sinusoidal input x = X sin w t, find the output waveforms for each of the nonlinearities listed in Table 9.2.
By Fourier-series analysis of the output waveforms, derive the describing function for each entry of the table.
9.2 Consider the system shown in Fig. P9.2. Using the describing-function analysis, show that a stable limit cycle
exists for all values of K > 0. Find the amplitude and frequency of the limit cycle when K = 4, and plot y(t) versus t.
M
e K y
– s(1 + s)2
Fig. P9.2
9.3 Consider the system shown in Fig. P9.3. Use the describing function technique to investigate the possibility of
limit cycles in this system. If a stable limit cycle is predicted, determine its amplitude and frequency.
1 y
e 5
0.1 s(0.1s + 1)2
–
Fig. P9.3
9.4 Using the describing-function analysis, prove that no limit cycle exists in the system shown in Fig. P9.4. Find
the range of values of the deadzone of the on–off controller for which limit cycling will be predicted.
1
e 5 y
0.2 (s + 1)(0.1s + 1)2
–
Fig. P9.4
568 Digital Control and State Variable Methods
9.5 Consider the system shown in Fig. P9.5. Using the describing-function technique, show that a stable limit cycle
cannot exist in this system for any K > 0.
e K y
–
1 s(1 + s)2
Slope = 1
Fig. P9.5
9.6 Consider the system shown in Fig. P9.6. Using the describing-function analysis, investigate the possibility of a
limit cycle in the system. If a limit cycle is predicted, determine its amplitude and frequency, and investigate its
stability.
1
e 10 y
1 s(s + 1)(0.5s + 1)
–
Fig. P9.6
9.7 An instrument servo system used for positioning a load, may be adequately represented by the block diagram
in Fig. P9.7a. The backlash characteristic is shown in Fig. P9.7b. Show that the system is stable for K = 1. If the
value of K is now raised to 2, show that limit cycles exist. Investigate the stability of these limit cycles. Deter-
mine the amplitude and frequency of the stable limit cycle.
Given:
H/X 0 0.1 0.2 0.5 0.7 0.8 0.9 0.95 1.0
Slope = 1 y
e K x y x
N(X)
– s(s + 1)(0.5s + 1) H=1
(a) (b)
Fig. P9.7
9.8 Determine the kind of singularity for each of the following differential equations. Also locate the singular points
on the phase plane.
(a) y&& + 3 y& + 2 y = 0 (b) y&& + 5 y& + 6 y = 6 (c) y&& - 8 y& + 17 y = 34
Nonlinear Systems Analysis 569
9.9 Consider the position control system shown in Fig. P9.9. The feedback action is provided by synchros, which
generate the actuating signal e = sin(qR – q). Prove that this nonlinear system has multiple singular points. Linear-
ize the system around the singular points (0, 0) and (p, 0), and identify the kind of singularity at each point.
R =0 + e K
f (.)
s(s + a)
–
Synchros
Fig. P9.9
0.1
r = const + 0.1 7 y
e
s(s + 1)
–
Fig. P9.11
Slope
=1 y
r = const + e 7
s(s + 1)
– 0.1
Fig. P9.12
570 Digital Control and State Variable Methods
0.1
r = const + e 7 y
s(s + 1)
–
– 0.1
Fig. P9.13
0.1
r = const + e 7 y
0.1 s(s + 1)
–
Fig. P9.14
r = const + e + 1 y 1 y
– – s s
0.1 sgn y
Fig. P9.15
Nonlinear Systems Analysis 571
9.16 The position control system shown in Fig. P9.16 has Coulomb friction Tc sgn(q& ) at the output shaft. Prove that
the phase trajectories on (e, e& /wn)-plane are semicircles, with the centre on horizontal axis at + Tc /K for e& < 0
and –Tc /K for e& > 0.
Tc
q R = const + e v
KA T = K1v J
–
Motor
Fig. P9.16
Examine the phase trajectory corresponding to qR = unit step, q& (0) = q (0) = 0; and find the value of the steady-
state error. What is the largest possible steady-state error which the system in Fig. P9.16 can possess?
Given:
wn = K / J = 1.2 rad/sec; Tc /K = 0.3 rad
where K = KAK1.
9.17 Consider the nonlinear system with deadzone shown in Fig. P9.17. Using the method of isoclines, sketch some
typical phase trajectories with and without deadzone, and comment upon the effect of deadzone on transient and
steady-state behaviour of the system.
9.18 Consider the system shown in Fig. P9.18 in which the nonlinear element is a power amplifier with gain equal to
1.0, which saturates for error magnitudes greater than 0.4. Given the initial condition: e(0) = 1.6, e& (0) = 0, plot
phase trajectories with and without saturation, and comment upon the effect of saturation on the transient
behaviour of the system. Use the method of isoclines for construction of phase trajectories.
0.4
e u 1 y e u 1 y
1 s(s + 1) 0.4 s(s + 1)
– –
Slope = 2
1 y
r = const + e u 1
– s2
(a)
572 Digital Control and State Variable Methods
1
r = const + e + u 1 y
– – s2
sKD
(b)
Fig. P9.19
9.20 A position control system comprises of a dc servomotor, potentiometer error detector, an on–off controller, and
a tachogenerator coupled to the motor shaft.
The following equations describe the system:
Reaction torque = q&& + 0.5q&
Drive torque = 2 sgn(e + 0.5 e& ); e = qR – q
(a) Make a sketch of the system showing how the hardware is connected.
(b) Construct a phase trajectory on (e, e& )-plane with e(0) = 2 and e& (0) = 0, and comment upon the transient and
steady-state behaviour of the system.
(c) What is the switching line of the variable structure system?
9.21 (a) Describe the system of Fig. P9.21a on the (e, e& )-plane, and show that with the on–off controller switching
on the vertical axis of the phase plane, the system oscillates with increasing frequency and decreasing
amplitude. Obtain a phase trajectory with (e(0) = 1.4, e& (0) = 0) as the initial state point.
(b) Introduce now a deadzone of ± 0.2 in the on–off controller characteristic. Obtain a phase trajectory for the
modified system with (e (0) = 1.4, e& (0) = 0) as the initial state point and comment upon the effect of
deadzone.
d i
(c) The on–off controller with deadzone is now controlled by the signal e + 13 e& , combining proportional and
derivative control (Fig. P9.21b). Draw the switching line on the phase plane and construct a phase trajec-
tory with (e(0) = 1.4, e& (0) = 0) as the initial state point. What is the effect of the derivative-control action?
1
e u 1 y
s(s + 1)
–
(a)
1 y
e 1 u 1
1+ s
3 0.2 s(s + 1)
–
(b)
Fig. P9.21
Nonlinear Systems Analysis 573
9.22 Consider the second-order system
x& 1 = x2 ; x& 2 = – u
It is desired to transfer the system to the origin in minimum time from an arbitrary initial state. Use the bang-
bang control strategy with |u| = 1. Derive an expression for the optimum switching curve. Construct a phase
portrait showing a few typical minimum-time trajectories.
1
9.23 A plant with model G(s) = is placed in a feedback configuration as shown in Fig. P9.23. It is desired to
s ( s + 1)
transfer the system from any initial state to the origin in minimum time. Derive an expression for optimum switch-
ing curve and construct a phase portrait on the (e, e& )-plane showing a few typical minimum-time trajectories.
1
e u 1 y
– s(s + 1)
Fig. P9.23
9.24 Consider the nonlinear system described by the equations
x&1 = x2
x& 2 = – (1 – |x1|)x2 – x1
Find the region in the state plane for which the equilibrium state of the system is asymptotically stable.
9.25 Check the stability of the equilibrium state of the system described by
x&1 = x2
x& 2 = – x1 – x21 x2
9.26 Consider a nonlinear system described by the equations
x&1 = – 3x1 + x2
x& 2 = x1 – x2 – x32
Using the Krasovskii method for constructing the Lyapunov function with P as identity matrix, investigate the
stability of the equilibrium state.
Find a region of asymptotic stability using Krasovskii method.
9.27 Check the stability of the system described by
x&1 = – x1+ 2x21x2
x& 2 = – x2
by use of the variable gradient method.
Nonlinear Control
10 Structures
10.1 INTRODUCTION
In the previous chapter, we covered tools and techniques for the analysis of control systems containing
nonlinearities. In the present chapter, we will discuss the deliberate introduction of nonlinearities into the
controller for performance improvement over that of a simpler linear controller. Although there are numer-
ous techniques, several of the most common are illustrated with examples, to give the reader the feel of the
general approach to designing nonlinear controllers.
If the system is only mildly nonlinear, the simplest approach might be to ignore the nonlinearity in
designing the controller (i.e., to omit the nonlinearity in the design model), but to include its effect in evalu-
ating the system performance. The inherent robustness of the feedback control law designed for the approxi-
mating nonlinear system is relied upon to carry it over to the nonlinear system.
When a system is significantly nonlinear, it is traditionally dealt with by linearization (refer Eqns (5.11))
about a selected operating point using Taylor series. We design a linear controller based on first-order
approximation. If the controller works effectively, the perturbations in actual state about the equilibrium
state will be small; if the perturbations are small, the neglected higher-order terms will be small and can be
regarded as a disturbance. Since the controller is designed to counteract the effects of disturbances, the
presence of higher-order terms should cause no problems. This reasoning cannot be justified rigorously, but,
nevertheless, it usually works. Needless to say, it may not always work; so it is necessary to test the design
that emerges, for stability and performance—analytically, by Lyapunov’s stability analysis for example,
and/or by simulation.
In many systems, the nonlinearity inherent in the plant, is so dominant that the linearization approach
described above can hardly meet the stringent requirements on systems performance. This reality, inevita-
bly, promotes the endeavour to develop control approaches that will more or less incorporate the nonlinear
dynamics into the design process. One such approach is feedback linearization. Unlike the first-order
approximation approach, wherein the higher-order terms of the plant are ignored, this approach utilizes the
feedback to render the given system, a linear input-output dynamics. On the basis of the linear system thus
obtained, linear control techniques can be applied to address design issues.
The roughness of the linearization approach based on first-order approximation, can be viewed from two
perspectives. First, it neglects all higher-order terms. Second, the linear terms depend on the equilibrium
Nonlinear Control Structures 575
point. These two uncertainties may explain why this linearization approach is incapable of dealing with the
situation where the system operates over wide dynamic regions. Although the feedback linearization may
overcome the first drawback, its applicability is limited, mainly because it rarely leads to a design that
guarantees the system performance over the whole dynamic regime. This is because feedback linearization
is often performed locally—around a specific equilibrium point. The resulting controller is of local nature.
Another remedy to linearization based on first-order approximation, is to design several control laws corre-
sponding to several operating points that cover the whole dynamics of the system. Then these linear control-
lers are pieced together to obtain a nonlinear control law. This approach is often called gain scheduling.
Though this approach does not account for the higher-order terms, it does accommodate the variation of the
first-order terms with respect to the equilibrium points.
Adaptive control theory provides an effective tool for the design of uncertain systems. Unlike fixed-
parameter controllers (e.g., H¥ theory based robust controller), adaptive controllers adapt (adjust) their
behaviour on-line to the changing properties of the controlled processes.
If a fixed-parameter automatic control system is used, the plant-parameter variations directly affect the
capability of the design to meet the performance specifications under all operating conditions. If an adaptive
controller is used, the plant-parameter variations are accounted for at the price of increased complexity of
the controller. Adaptive control is certainly more complex than fixed-parameter control, and carries with it
more complex failure mechanisms. In addition, adaptive control is both time-varying and nonlinear,
increasing the difficulty of stability and performance analysis. It is this tradeoff, of complexity versus per-
formance, that must be examined carefully in choosing the control structure.
The main distinctive feature of variable structure systems (VSS), setting them apart as an independent
class of control systems, is that changes can occur in the structure of the system during the transient process.
The structure of a VSS is changed intentionally in accordance with some law of structural change; the times
at which these changes occur (and the type of structure formed) are determined not by a fixed program, but
in accordance with the current value of the states of the system.
The basic idea of feedback linearization in Section 10.2 is the algebraic transformation of the dynamics of
a nonlinear system to that of a linear system, on which linear control designs can in turn be applied. Sections
10.3–10.5 then study how to reduce, or practically eliminate, the effects of model uncertainties on the
stability and performance of feedback controllers using so-called adaptive and variable structure systems.
Section 10.6 introduces an emerging nonlinear control structure—the reinforcement learning control.
The chapter concentrates on nonlinear systems represented in continuous-time form. Even though most
control systems are implemented digitally, nonlinear physical systems are continuous in nature and are hard
to discretize meaningfully, while digital control systems may be treated as continuous-time systems in analy-
sis and design if high sampling rates are used. Thus, we perform nonlinear system analysis and controller
design in continuous-time form. However, of course, the control law is generally implemented digitally.
The objective set for this chapter is to make the reader aware of the nonlinear control structures com-
monly used for dealing with practical control problems in industry. The chapter is not intended to train the
reader on designing nonlinear control systems. For a comprehensive treatment of the subject, refer Slotine
and Li[126].
In this section, we describe basic concepts of feedback linearization intuitively with the help of an example.
Mathematical tools from differential geometry, which are useful to generalize these concepts to a broad class
of nonlinear systems, are not presented here for want of space; Slotine and Li [126], and Zak [35] are good
references for this subject.
576 Digital Control and State Variable Methods
v22 = X& 22 + Y&22 = l12θ&12 + l22 (θ&1 + θ&2 )2 + 2l1l 2 (θ&12 + θ&1θ&2 ) cos θ 2
Therefore, kinetic energy for link 2 is
K 2 = 12 m2 v22
= 12 m2 l12θ&12 + 12 m2 l22 (θ&1 + θ&2 )2 + m2 l1l2 (θ&12 + θ&1θ&2 ) cosθ 2
Nonlinear Control Structures 577
The potential energy for link 2 is
P2 = m2 gY2 = m2 g (l1 sin θ1 + l2 sin (θ1 + θ 2 ))
The Legrangian for the entire arm is
L = K − P = K1 + K 2 − P1 − P2
= 12 ( m1 + m2 )l12θ&12 + 12 m2 l22 (θ&1 + θ&2 ) 2 + m2 l1 l2 (θ&12 + θ&1θ&2 ) cosθ 2
d ∂L
= ( m1 + m2 )l12θ&&1 + m2 l22 (θ&&1 + θ&&2 ) + m2 l1 l2 (2θ&&1 + θ&&2 ) cos θ 2 − m2 l1 l2 (2θ&1 θ&2 + θ&22 ) sin θ 2
dt ∂θ&1
∂L
= −( m1 + m2 ) gl1 cos θ1 − m2 gl2 cos(θ1 + θ 2 )
∂θ1
∂L
= m2 l22 (θ&1 + θ&2 ) + m2 l1 l2θ&1 cosθ 2
∂θ&
2
d ∂L
= m2 l22 (θ&&1 + θ&&2 ) + m2 l1 l2θ&&1 cosθ 2 − m2 l1 l2θ&1 θ&2 sin θ 2
dt ∂θ&2
∂L
= − m2 l1 l2 (θ&12 + θ&1 θ&2 ) sin θ 2 − m2 gl2 cos (θ1 + θ 2 )
∂θ 2
According to Lagrange’s equation (10.1), the arm dynamics are given by the two coupled nonlinear
differential equations
τ1 = [(m1 + m2 )l12 + m2 l22 + 2m2 l1 l2 cos θ 2 ]θ&&1 + [m2 l22 + m2 l1 l2 cos θ 2 ]θ&&2 − m2 l1 l2 (2θ&1 θ&2 + θ&22 ) sin θ 2
+ (m1 + m2 ) gl1 cosθ1 + m2 gl2 cos(θ1 + θ 2 )
τ 2 = [m2 l22 + m2 l1 l2 cos θ 2 ]θ&&1 + m2 l22θ&&2 + m2 l1 l2θ&12 sin θ 2 + m2 gl2 cos(θ1 + θ 2 )
Writing the arm dynamics in vector form, yields
⎡ (m1 + m2 )l12 + m2 l22 + 2m2 l1 l2 cos θ 2 m2 l22 + m2 l1 l2 cosθ 2 ⎤ ⎡θ&&1 ⎤ ⎡ − m2 l1 l2 (2θ&1 θ&2 + θ&22 )sin θ 2 ⎤
⎢ ⎥ ⎢ && ⎥ + ⎢ ⎥
⎣⎢ m2 l22 + m2 l1 l2 cos θ 2 m2 l22 ⎦⎥ ⎣θ 2 ⎦ ⎣⎢ m2 l1 l2θ&12 sin θ 2 ⎦⎥
⎡(m + m2 ) gl1 cosθ1 + m2 gl2 cos(θ1 + θ 2 ) ⎤ ⎡τ 1 ⎤ (10.3)
+⎢ 1 ⎥=⎢ ⎥
⎢⎣ m2 gl2 cos(θ1 + θ 2 ) ⎥⎦ ⎣τ 2 ⎦
One may write the dynamics of the two links arm completely as
M (è)&&
è + V(è, è& ) + G(è) = ô (10.4)
578 Digital Control and State Variable Methods
where the symmetric inertia matrix
⎡α + β + 2η cos θ 2 β + η cosθ 2 ⎤
M (è ) = ⎢ ⎥,
⎢⎣ β + η cosθ 2 β ⎥⎦
and nonlinear terms
N(è, è& ) = V (è, è& ) + G(è)
⎡ −η (2θ&1 θ&2 + θ&22 ) sin θ 2 ⎤ ⎡α e cos θ1 + η e1 cos(θ1 + θ 2 ) ⎤
are given by V (è, è& ) = ⎢ ⎥ ; G ( è) = ⎢ 1 ⎥
⎣⎢ ηθ&12 sin θ 2 ⎦⎥ ⎣ ηe1 cos(θ1 + θ 2 ) ⎦
= &&
è d + M −1 (è)[ V(è, è& ) + G(è)] − M −1 (è) ô
= &&
è d + M −1 (x1 )[ V(x1 , x2 ) + G(x1 )] − M −1 (x1 ) ô
= &&
è − f (x) − g(x)ô
d (10.15b)
The control law
&& ]
ô = g −1 (x)[−f (x) − u + è (10.16)
d
linearizes the system (10.15) to yield
⎡ x%& 1 ⎤ ⎡0 I ⎤ ⎡ x% 1 ⎤ ⎡0⎤
⎢& ⎥ = ⎢ ⎥ ⎢ ⎥ + ⎢ ⎥u (10.17)
⎣ x% 2 ⎦ ⎣0 0⎦ ⎣ x% 2 ⎦ ⎣ I ⎦
The following design procedure may be used.
Use linear quadratic regulator design to select a feedback control u(t), that stabilizes the tracking error
system (10.17). The performance measure
∞
J = ∫ (x% T Qx% + uT Ru )dt (10.18)
0
f (x)
[x~1 ~x2]T d
+ – 2-Link
+ u +
[–K1 –K2] g–1(x) Robot
–
– Arm
Controller
xd = [ d d]
T x=[ ]T
Fig. 10.2
1.5
Desired
Actual
1
0.5
q1
–0.5
–1
0 1 2 3 4 5 6 7 8
t
(a)
1
Desired
Actual
0.5
0
q2
–0.5
–1
–1.5
0 1 2 3 4 5 6 7 8
t
(b)
Fig. 10.3 Desired and actual trajectories
Nonlinear Control Structures 581
Unlike the linearization approach which ignores all higher-order terms of the plant, the feedback
linearization approach utilizes the feedback, to render the given system a linear input-output dynamics.
Then, on the basis of the linear system thus obtained, linear control techniques can be applied to address
design issues. Finally, the resulting nonlinear control law is implemented to achieve the desired dynamical
behaviour.
The main drawback of this technique is that it relies on exact cancellation of nonlinear terms to get linear
input-output behaviour (This is equivalent to cancellation of the nonlinearity with its inverse). Consequently,
if there are errors or uncertainty in the model of the nonlinear terms, the cancellation is no longer exact.
Therefore, the applicability of such model-based approaches to feedback control of actual systems is quite
limited, because they rely on the exact mathematical models of system nonlinearities.
If the functions f (x) and g–1 (x) are not exactly known in the control scheme of Fig. 10.2, we may explore
the option of constructing their estimates by two neural networks. We shall study this option of intelligent
control in Chapter 11.
When we use a model of the plant as the basis of a control system design, we are tacitly assuming that this
model is a reasonable representation of the plant. Although the design model almost always differs from the
true plant in some details, we are confident that these details are not important enough to invalidate the
design.
There are many applications, however, for which a design model cannot be developed with a reasonable
degree of confidence. Moreover, most dynamic processes change with time. Parameters may vary because
of normal wear, aging, breakdown, and changes in the environment in which the process operates. The
feedback mechanism provides some degree of immunity to discrepancies between the physical plant and the
model that is used for the design of the control system. But sometimes, this is not enough. A control system
designed on the basis of a nominal design model may not behave as well as expected, because the design
model does not adequately represent the process in its operating environment.
How can we deal with processes that are prone to large changes, or for which adequate design models are
not available? One approach is brute force, i.e., high loop-gain: as the loop-gain becomes infinite, the output
of the process tracks the input with vanishing error. Brute force rarely works, however, for well-known
reasons—dynamic instability, control saturation, and susceptibility to noise and other extraneous inputs.
In robust control design methods, model uncertainties are captured in a family of perturbed plant models,
where each member of the family may represent the nominal plant, but which member does so, remains
unknown. A robust controller satisfies the design requirements in connection with all the members of the
family. Robust control design techniques are sophisticated and make it possible, for the control system
design, to tolerate substantial variations in the model. But the price of achieving immunity to model uncer-
tainties may be a sacrifice in performance. Moreover, robust control design techniques are not applicable to
processes for which no (uncertainty) design model is available.
The adaptive control theory provides another approach to the design of uncertain systems. Unlike the
fixed-parameter controller, adaptive controllers adjust their behaviour on-line, in real-time, to the changing
properties of the controlled processes. For example, in some control tasks, such as those in robot manipula-
tions, the systems to be controlled have parameter uncertainty at the beginning of the control operation.
Unless this uncertainty is gradually reduced on-line by an adaptation or estimation mechanism, it may cause
inaccuracy or instability for the control systems. In many other tasks, such as those in power systems, the
system dynamics may have well-known dynamics at the beginning, but experience unpredictable parameter
variations as the control operation goes on. Without continuous “redesign” of the controller, the initially
582 Digital Control and State Variable Methods
appropriate controller design may not be able to control the changing plant well. Generally, the basic objec-
tive of adaptive control is to maintain consistent performance of a system in the presence of uncertainty
or unknown variation in plant parameters. Since such parameter uncertainty, or variation occurs in many
practical problems, adaptive control is useful in many industrial contexts. These include:
Robot Manipulation Robots have to manipulate loads of various sizes, weights, and mass distributions.
It is very restrictive to assume that the inertial parameters of the loads are well known before a robot picks
them up and moves them away. If controllers with constant gains are used, and the load parameters are not
accurately known, robot motion can be either inaccurate or unstable. Adaptive control, on the other hand,
allows robots to move loads of unknown parameters with high speed and high accuracy.
Ship Steering On long courses, ships are usually put under automatic steering. However, the dynamic
characteristics of a ship strongly depend on many uncertain parameters, such as water depth, ship loading,
and wind and wave conditions. Adaptive control can be used to achieve good control performance under
varying operating conditions.
Aircraft Control The dynamic behaviour of an aircraft depends on its altitude, speed, and configuration.
The ratio of variations of some parameters can lie between 10 to 50 in a given flight. Adaptive control can be
used to achieve consistent aircraft performance over a large flight envelope.
Process Control Models for metallurgical and chemical processes are usually complex and also hard to
obtain. The parameters characterizing the processes vary from batch to batch. Furthermore, the working condi-
tions are usually time-varying (e.g., reactor characteristics vary during the reactor’s life, the raw materials
entering the process are never exactly the same, atmospheric and climatic conditions also tend to change). In
fact, process control is one of the most important, application areas of adaptive control.
Adaptive control has also been applied to other areas, such as power systems.
The concept of controlling a process that is not well understood, or one in which the parameters are
subject to wide variations, has a history that predates the beginning of modern control theory. The early
theory was empirical, and was developed before digital computer techniques could be used for extensive
performance simulations. Prototype testing was one of the few techniques available for testing adaptive
control. At least one early experiment had disastrous consequences. As the more mathematically rigorous
areas of control theory were developed starting in the 1960s, interest in adaptive control faded for a time,
only to be reawakened in the late 1970s with the discovery of mathematically rigorous proofs of the conver-
gence of some popular adaptive control algorithms. This interest continues unabated [130–136].
Many, apparently different, approaches to adaptive control have been proposed in the literature. Two
schemes in particular have attracted much interest: “Self-Tuning Regulator” (STR), and “Model Reference
Adaptive Control” (MRAC). These two approaches actually turn out to be special cases of a more general
design philosophy.
In the following, we describe model reference adaptive control (MRAC); the discussion on self-tuning
regulator will appear in the next section.
Generally, a model-reference adaptive control system can be schematically represented by Fig. 10.4. It is
composed of four parts: a plant/process containing unknown parameters, a reference model for compactly
specifying the desired output of the control system, a feedback control law containing adjustable param-
eters, and an adaptation mechanism for updating the adjustable parameters.
The plant is assumed to have a known structure, although the parameters are unknown. For linear plants,
this means that the number of poles and the number of zeros are assumed to be known, but that the locations
of these poles and zeros are not.
Nonlinear Control Structures 583
ym
Model
Command
signal y
Controller Process
Control
signal
A reference model is used to specify the ideal response of the adaptive control system to the external
command. Intuitively, it provides the ideal plant response, which the adaptation mechanism should seek in
adjusting the parameters. The choice of the reference model is part of the adaptive control system design.
This choice should reflect the performance specifications in the control tasks, such as rise time, setting time,
overshoot or frequency domain characteristics.
The controller is usually parameterized by a number of adjustable parameters (implying that one may
obtain a family of controllers by assigning various values to the adjustable parameters). The controller
should have perfect tracking capacity in order to allow the possibility of tracking convergence. That is, when
the plant parameters are exactly known, the corresponding controller parameters should make the plant
output identical to that of the reference model. When the plant parameters are not known, the adaptation
mechanism will adjust the controller parameters, so that perfect tracking is asymptotically achieved. If the
control law is linear in terms of the adjustable parameters, it is said to be linearly parameterized. Existing
adaptive control designs normally require linear parameterization of the controller—in order to obtain adap-
tation mechanisms with guaranteed stability and tracking convergence.
The adaptation mechanism is used to adjust the parameters in the control law. In MRAC systems, the
adaptation law searches for parameters such that the response of the plant under adaptive control, becomes the
same as that of the reference model, i.e., the objective of the adaptation is to make the tracking error converge
to zero. Clearly, the main difference from conventional control, lies in the existence of this mechanism. The
main issue in adaptation design is to synthesize an adaptation mechanism which will guarantee that the control
system remains stable and the tracking error converges to zero—even if the parameters are varied. Many
formalisms in nonlinear control can be used to this end, such as Lyapunov theory, hyperstability theory, and
passivity theory[126]. In this section, we shall use Lyapunov theory.
Thus, the desired performance in an MRAC (Fig. 10.4) is given in terms of a reference model, which,
in turn, gives the desired response to the command signal. The inner control loop is an ordinary feedback
loop composed of the plant and the controller; the parameters of the controller are adjusted by the outer loop
in such a way that the error between the plant and model outputs becomes small. The key problem is to
determine the adjustment mechanism so that a stable system, which brings the error to zero, is obtained.
From the block diagram of Fig 10.4, one may jump to the false conclusion that MRAC has an answer to
all control problems with uncertain plants. Before using such a scheme, important theoretical problems such
as stability and convergence have to be considered. Since adaptive control schemes are both time-varying
and nonlinear, stability and performance analysis becomes very difficult. Many advances have been made in
proving stability under certain (sometimes limited) conditions. However, not much ground has been gained
in proving performance bounds.
584 Digital Control and State Variable Methods
u yp
Controller Plant
r Adjustment
mechanism
Fig. 10.5 A model reference adaptive system
586 Digital Control and State Variable Methods
Introduce the error variable
e(t) = yp (t) – ym (t) (10.25a)
The rate of change of the error is given by
de(t )
= [ − a p y p (t ) + b p u (t )] − [ − am ym (t ) + bm r (t )]
dt
= −am e(t ) + [am − a p − b p a(t )] y p (t ) + [b pb(t ) − bm ]r (t ) (10.25b)
Notice that the error goes to zero if the parameters a(t) and b(t) are equal to the ones given by (10.24). We
will now attempt to construct a parameter adjustment mechanism that will drive the parameters a(t) and b(t)
to appropriate values, such that the resulting control law (10.23) forces the plant output yp(t) to follow the
model output ym(t). For this purpose, we introduce the Lyapunov function,
⎡ 2⎤
( )
V(e,a,b) = 1 ⎢ e2 (t ) + 1 bp a(t) + a p − am + 1 bp b(t) − bm ⎥ ( )
2
2
⎣⎢ bp γ bp γ ⎦⎥
where g > 0.
This function is zero when e(t) is zero and the controller parameters a(t) and b(t) are equal to the optimal
values given by (10.24). The derivatives of V is
dV de(t ) 1 da(t ) 1 db(t )
= e (t ) + [b p a(t ) + a p − am ] + [bp b(t ) − bm ]
dt dt γ dt γ dt
1 ⎡ da(t ) ⎤ 1 ⎡ db(t ) ⎤
= −am e 2 (t ) + [b p a(t ) + a p − am ] ⎢ − γ y p (t )e (t )⎥ + [bp b(t ) − bm ] ⎢ + γ r ( t )e (t ) ⎥
γ ⎣ dt ⎦ γ ⎣ dt ⎦
If the parameters are updated as
db(t )
= −γ r (t )e(t )
dt
(10.26)
da (t )
= γ y p (t )e (t ),
dt
we get
dV
= − a m e 2 (t )
dt
Thus, the adaptive control system is stable in the sense of Lyapunov, i.e., the signals e, a and b are bounded.
To ensure that tracking error goes to zero, we compute second time derivative of Lyapunov function:
d 2V de(t )
= −2 am e(t )
dt 2 dt
From (10.25b), it follows that
d 2V
= −2am e(t )[− am e(t ) + (am − a p − bp a(t )) y p (t ) + (b p b(t ) − bm )r (t )]
dt 2
= f (e, a, b, yp, r)
..
Since all the parameters are bounded, and yp(t) = e(t) + ym(t) is bounded, V is also bounded, which, in
.
turn, implies that V is uniformly continuous. Therefore, the asymptotic convergence of the tracking error e(t)
is guaranteed by Barbalat’s lemma.
Figure 10.6 shows the simulation (refer Problem A.19 in Appendix A) of MRAC system with ap = 1,
bp = 0.5, am = 2 and bm = 2. The input signal is a square wave with amplitude 1. The adaptation gain g = 2.
The closed-loop system is close to the desired behavior, after only a few transients. The convergence rate
depends critically, on the choice of the parameter g.
Nonlinear Control Structures 587
1.5
Reference model output
Plant output
1
0.5
–0.5
–1
–1.5
0 10 20 30 40 50 60 70 80 90 100
t
Fig 10.6 Simulation of the MRAC system of Fig. 10.5
Plots in Fig. 10.6 were generated by simulating the following sets of equations.
(i) y&m (t ) = −2 ym (t ) + 2r (t ); ym (0) = 0
This gives ym(t).
(ii) y& p (t ) = − y p (t ) + 0.5u(t ); y p (0) = 0
u (t ) = b(t )r (t ) − a (t ) y p (t )
db(t )
= −2r (t )e (t ); b (0) = 0.5
dt
da (t )
= 2 y p (t )e(t ); a (0) = 1
dt
e(t ) = y p (t ) − ym (t )
From this set of equations, we obtain u(t) and yp(t).
The category of such models gives us the parameteric description of the plant. The other category of
models such as frequency-response curves (Bode plots, polar plots, etc.), time-response curves, etc., gives
non-parametric description of the plant.
Plant models can be obtained from the first principles of physics. In many cases, however, it is not
possible to make a complete model only from physical knowledge. In these circumstances, the designer may
turn to the other source of information about plant dynamics—the data taken from experiments directly
conducted to excite the plant, and to measure the response. The process of constructing models from experi-
mental data is called system identification. In this section, we restrict our attention to identification of
discrete parametric models, which includes the following steps:
(i) Experimental planning
(ii) Selection of model structure
(iii) Parameter estimation
Experimental Planning The choice of experimental conditions for parameter estimation is of consider-
able importance. It is clear that the best experimental conditions are those that account for the final applica-
tion of the model. This may occur naturally in some cases; e.g., in adaptive control (discussed later in this
section), the model is adjusted under normal operating conditions. Many ‘classic’ methods depend strongly
on having specific input, e.g., sinusoid or impulse. There could be advantages in contriving such an artificial
experiment if it subjects the system to a rich and informative set of conditions, in the shortest possible time.
A requirement on the input signal is that it should sufficiently excite all the modes of the process.
One broad distinction in identification methods is between on-line and off-line experimentation. The
on-line methods give estimates recursively, as the measurements are obtained, and are the only alternative if
the identification is going to be used in an adaptive controller.
Selection of Model Structure The model structures are derived from prior knowledge of the plant. In
some cases the only a priori knowledge is that the plant can be described as a linear system in a particular
range. It is, then, natural to use general representations of linear systems.
Consider a SISO dynamic system with input {u(t)} and output {y(t)}. The sampled values of these signals
can be related through the linear difference equation
y ( k + n) + α1 y ( k + n − 1) + L + α n y ( k ) = β1u ( k + m) + β 2 u ( k + m − 1) + L + β m+1u ( k ); n ≥ m (10.27)
ai and bj are constant (unknown) parameters.
The number of parameters to be identified, depends on the order of the selected model, i.e., n in Eqn.
(10.27). The calculations can be arranged so that it is possible to make a recursion in the number of parameters
in the model. The methods of model-order selection are usually developed for the off-line solution.
The unknown process is not completely a black box. Some information about its dynamic behaviour is
known from basic principles and/or plant experience. Therefore, some estimate of the model’s order, and
some initial values for the unknown parameters, will be available. The more we know about the process, the
more effective the postulated model will be. Consequently, we should use all available information for its
development. The order of the postulated model is a very important factor. Remember, that complex models
of high order will not necessarily produce better controller designs and may burden the computational effort,
without tangible results.
Nonlinear Control Structures 589
Equation (10.27) may be expressed as
y (k ) + α1 y (k − 1) + L + α n y (k − n) = β1u (k + m − n) + β 2 u (k + m − 1 − n) + L + β m +1u (k − n)
or
y (k ) + α1 y (k − 1) + L + α n y (k − n) = β1u (k − d ) + β 2 u (k − 1 − d ) + L + β n −d +1u (k − n) (10.28)
d = n – m ³ 0 is the relative degree or control delay.
We shall use operator notation for conveniently writing linear difference equations. Let z–1 be the back-
ward shift (or delay) operator:
z −1 y (k ) = y (k − 1) (10.29)
Then Eqn.(10.28) can be written as
A( z −1 ) y (k ) = B ( z −1 )u (k )
where A(z–1) and B(z–1) are polynomials in the delay operator:
A( z −1 ) = 1 + α1 z –1 + L + α n z – n
B ( z −1 ) = z − d ( β1 + β2 z −1 + L + βn −d +1 z −( n− d ) )
We shall present the parameter-estimation algorithms for the case of d = 1 without any loss of generality;
the results for any value of d easily follow.
For d = 1, we get the input-output model structure
A( z −1 ) y (k ) = B ( z −1 )u (k ) (10.30)
where
A( z −1 ) = 1 + α1 z –1 + L + α n z –1
B ( z −1 ) = β1 z −1 + β 2 z −2 + L + β n z − n
In the presence of the disturbance, model (10.30) takes the form
A( z −1 ) y (k ) = B ( z −1 )u (k ) + ε (k ) (10.31)
where e (k) is some disturbance of unspecified character.
The model (10.31) describes the dynamic relationship between the input and output signals, expressed in
terms of the parameter vector
θ = [α1 ... α n β1... β n ]T (10.32)
Introducing the vector of lagged input-output data,
φ( k ) = [ − y ( k − 1) − L − y ( k − n) u ( k − 1) L u ( k − n )]; (10.33)
Eqn. (10.31) can be rewritten as
y (k ) = φ(k )θ + ε (k ) (10.34)
A model structure should be selected (i) that has a minimal set of parameters and is yet equivalent to
the assumed plant description; (ii) whose parameters are uniquely determined by the observed data; and
(iii) which will make subsequent control design simple.
Parameter Estimation The dynamic relationship between the input and output of a scalar system is
given by the model (10.34). Ignoring random effects e (k) on data collection, we have
y ( k ) = φ ( k )θ (10.35)
where f (k) is given by Eqn. (10.33) and q is given by Eqn. (10.32).
Using the observations
{u (0), u (1),..., u ( N ), y (0), y (1),..., y ( N )}
we wish to compute the values of ai and bj in parameter vector q, which will fit the observed data.
590 Digital Control and State Variable Methods
Thus, solving the parameter-estimation problem requires techniques for selecting a parameter estimate,
which best represents the given data. For this, we require some idea of the goodness of the fit of a proposed
value of q to the true q°. Because, by the very nature of the problem, q° is unknown, it is unrealistic to define
a direct parameter error between q and q°. We must define the error in a way that can be computed from
{u(k)} and {y(k)}.
Let e(k,q) be the equation error comprising the extent to which the equations of motion (10.35) fail to be
true for a specific value of q when used with the specific actual data:
e ( k , θ ) = y ( k ) − φ ( k )è (10.36)
A simple criterion representing the goodness of fit, of a proposed value of q, is given by
N
J (θ ) = ∑ e 2 ( k , θ ) (10.37)
k =1
The method called the Least Squares Method, based on minimizing the sum of the squares of the error,
is a very simple and effective method of parameter estimation.
Since y(k) depends on past data upto n earlier periods, the first error we can form is e(n,q ); the subsequent
errors being e(n + 1, q), ..., e(N, q):
e( n, è) = y ( n ) − φ( n )è
e(n + 1, è) = y (n + 1) − φ(n + 1)è
M
e ( N , è ) = y ( N ) − φ ( N )è
In vector-matrix notation,
e( N , è ) = y ( N ) − Ö ( N )è (10.38)
T
where e( N , è) = [e(n, è) e(n + 1, è) L e( N , è )]
Ö( N ) = [φT (n) φT (n + 1) L φT( N )]T
y( N ) = [ y (n) y (n + 1)L y ( N )]T
Note that e is (N – n + 1) ´ 1 vector, y is (N – n + 1) ´ 1 vector, F is (N – n + 1) ´ 2n matrix and q is
2n ´ 1 vector.
The principle of least squares says that the parameters should be selected in such a way that the perform-
ance measure
N
J (è ) = ∑ e2 (k , è ) = eT ( N , è)e( N , è ) (10.39)
k =n
is minimized
The performance measure J(q) can be written as
J (è ) = [y ( N ) − Ö ( N )è]T [y ( N ) − Ö ( N )è ]
= yT ( N ) y( N ) − èT ÖT ( N ) y ( N ) − y T ( N )Ö( N )è + èT ÖT ( N )Ö( N )è
= yT ( N )y ( N ) − èT ÖT ( N )y ( N ) − yT ( N )Ö( N )è + èT ÖT ( N )Ö ( N )è
+ yT ( N )Ö( N )(ÖT ( N )Ö( N )) −1 ÖT ( N ) y ( N ) −yT ( N )Ö( N )(ÖT ( N )Ö( N ))−1 ÖT ( N )y ( N )
(Note that we have simply added and subtracted the same terms under the assumption that [F T (N) F (N)] is
invertible).
Hence
J (è ) = y T ( N )[1 − (Ö ( N )(ÖT ( N )Ö ( N ))−1ÖT ( N )]y ( N )
+(è − (ÖT ( N )Ö( N )) −1 ÖT ( N )y ( N ))T ÖT ( N )Ö( N ) × (è − (ÖT ( N )Ö( N ))−1 ÖT ( N )y ( N )
Nonlinear Control Structures 591
The first term in this equation is independent of q, so we cannot reduce J via this term. Hence, to get the
smallest value of J, we choose q so that the second term is zero. Denoting the value of q that achieves the
minimization of J by è̂ , we notice that
èˆ = [ÖT ( N )Ö( N )]−1 ÖT ( N )y ( N ) (10.40a)
= P( N ) Ö ( N ) y ( N )
T
(10.40b)
−1
where P( N ) = [Ö ( N )Ö( N ) ]
T
The least squares calculation for è̂ given by (10.40) is a ‘batch’ calculation since one has a batch of data
from which the matrix F, and vector y, are composed according to (10.38). In many cases, the observations
are obtained sequentially. If the least squares problem has been solved for N observations, it seems to be a
waste of computational resources to start from scratch when a new observation is obtained. Hence, it is
desirable to arrange the computations in such a way that the results obtained for N observations can be used
in order to get the estimates for (N + 1) observations. The algorithm for calculating the least-squares estimate
recursively is discussed below.
Let èˆ ( N ) denote the least-squares estimate based on N measurements. Then from (10.40)
èˆ ( N ) = [ÖT ( N )Ö ( N )]−1ÖT ( N ) y ( N )
It is assumed that the matrix [ ÖT ( N )Ö( N )] is nonsingular for all N. When an additional measurement is
obtained, a row is added to the matrix F and an element is added to the vector y. Hence,
⎡Ö ( N ) ⎤ ⎡ y( N ) ⎤
Ö ( N + 1) = ⎢ ⎥ ; y ( N + 1) = ⎢ ⎥
⎣ φ( N + 1) ⎦ ⎣ y ( N + 1) ⎦
1
Matrix inversion lemma is proved below.
−1
[A + BCD]⎨⎧ A −1 − A –1B ⎣⎡C−1 + DA −1B ⎦⎤ ⎫
DA −1 ⎬
⎩ ⎭
−1 −1
= I + BCDA −1 − B ⎡ C−1 + DA −1B ⎤ DA −1 − BCDA −1B ⎡C −1 + DA −1B ⎤ DA −1
⎣ ⎦ ⎣ ⎦
−1
= I + BCDA −1 − BC ⎡C −1 − DA −1B ⎤ ⎡C−1 − DA −1B ⎤ DA −1
⎣ ⎦⎣ ⎦
= I + BCDA −1 − BCDA −1
=I
592 Digital Control and State Variable Methods
Let A, C and C–1 + DA–1 B be nonsingular square matrices; then
[ A + BCD]−1 = A−1 − A −1B[C−1 + DA−1B]−1 DA −1 (10.43)
To apply (10.43) to (10.42), we make the associations
A = P −1 ( N )
B = φΤ ( N + 1)
C =1
D = φ( N + 1)
Now, the following result can easily be established.
P( N + 1) = P( N ) − P( N )φT( N + 1)[1 + φ( N + 1)P( N ) × φT ( N + 1)]−1 φ( N + 1)P( N )
Substituting the expression for P (N + 1) into (10.41), we obtain
èˆ ( N + 1) = {P( N ) − P( N )φT ( N + 1)[1 + φ( N + 1)P( N )φT ( N + 1)]−1 ×
φ( N + 1)P ( N )}[ÖT ( N ) y( N ) + φT ( N + 1) y ( N + 1)]
= P ( N )ÖT ( N )y ( N ) + P( N )φT ( N + 1) y ( N + 1) − P( N )φT ( N + 1) ×
[1 + φ( N + 1) P( N )φT( N + 1)]−1 φ( N + 1) P( N )ÖT ( N )y ( N ) − P( N ) ×
φT ( N + 1)[1 + φ( N + 1)P ( N )φT ( N + 1)]−1 φ( N + 1)P ( N ) × φT ( N + 1) y ( N + 1)
−1
= èˆ ( N ) + P( N )φ ( N + 1)[1 + φ( N + 1)P( N )φ ( N + 1)] ×
T T
This gives
èˆ ( N + 1) = èˆ ( N ) + K ( N )[ y ( N + 1) − φ( N + 1)èˆ ( N )] (10.44a)
T T −1
K ( N ) = P ( N )φ ( N + 1)[1 + φ( N + 1)P ( N )φ ( N + 1)] (10.44b)
P( N + 1) = [1 − K ( N ) φ( N + 1)]P( N ) (10.44c)
Equations (10.44) give the recursive least squares algorithm. Notice that for a single-output system, no
matrix inversion is required.
The Eqns (10.44) have a strong intuitive appeal. The estimate q$ (N + 1) is obtained by adding a correction to
the previous estimate q$ (N). The correction is proportional to y ( N + 1) − φ( N + 1)èˆ ( N ) where the term
φ( N + 1)èˆ ( N ) is the expected output at the time N + 1, based on the previous data f(N + 1) and the previous
estimate q$ (N). Thus, the next estimate of q is given by the old estimate corrected by a term, linear in error,
between the observed output y(N + 1) and the predicted output f(N + 1) q$ (N). The components of the vector
K(N) are weighting factors that show how the correction and the previous estimate should be combined.
Replacing N by recursive parameter k in Eqns (10.44), we rewrite the recursive least squares (RLS)
algorithm as
èˆ (k + 1) = èˆ (k ) + K (k )[ y (k + 1) − φ(k + 1)èˆ (k )] (10.45a)
K (k ) = P(k )φT(k + 1)[1 + φ(k + 1) P(k )φT(k + 1)]−1 (10.45b)
P(k + 1) = [1 − K (k )φ(k + 1)]P(k ) (10.45c)
Nonlinear Control Structures 593
Any recursive algorithm requires some initial value to be started up. In (10.44), we require q$ (N) and P(N)
(equivalently, in (10.45) we require q$ (k) and P(k)). We may collect a batch of N > 2n data values, and solve
the batch formula once for P(N) and q$ (N).
However, it is more common to start the recursion at k = 0 with P(0) = a I and q$ (0) = 0, where a is some
large constant. You may pick P(0) = a I, but choose q$ (0) to be the best guess that you have, at what the
parameter values are.
We have presented the least squares method ignoring random effects on data collection, i.e., e(k) in
Eqn. (10.34) has been neglected. If e(k) is white noise, the least squares estimate given by (10.45) converges to
the desired value. However, if e(k) is coloured noise, the least squares estimation usually gives a biased (wrong
mean value) estimate. This can be overcome by using various extensions of the least squares estimation.
We have seen that parameter estimation can be done either on-line or off-line. Off-line estimation may be
preferable if the parameters are constant, and there is sufficient time for estimation before control. However,
for parameters which vary(even though slowly) during operation, on-line parameter estimation is necessary
to keep track of the parameter values. Since problems in the adaptive control context usually involve slowly
time-varying parameters, on-line estimation methods are, thus, more relevant.
The main purpose of the on-line estimators is to provide parameter estimates for self-tuning control.
Controller Estimation
parameters
Command
signal
Output
Controller Process
Control
signal
A self-tuning regulator, therefore, consists of a recursive parameter estimator (plant identifier) coupled
with a control-design procedure, such that the currently estimated parameter values are used to provide
feedback-controller coefficients. At each sampling, an updated parameter estimate is generated and a con-
troller is designed, assuming that the current parameter estimate is actually the true value. The approach of
using the estimates as if they were the true parameters for the purpose of design, is called certainty equiva-
lence adaptive control.
From the block diagram of Fig. 10.7, one may jump to the false conclusion that such regulators can be
switched on and used blindly without any a priori considerations; the only requirement being a recursive
parameter estimation scheme and a design procedure. We have, no doubt, an array of parameter-estimation
schemes and an array of controller-design methods for plants with known parameters. However, all the
possible combinations may not have a self-tuning property, which requires that the performance of the regu-
lator coincides with the performance that would be obtained, if the system parameters were known exactly.
Before using a combination, important theoretical problems, such as stability and convergence, have to be
tackled. There are cases wherein self-tuning regulators have been used profitably, though some of their
properties have not been fully understood theoretically; on the other hand, bad choices have been disastrous
in some other cases.
So far, only a small number of available combinations have been explored from the stability, conver-
gence, and performance points of view. It is a striking fact, uncovered by Astrom and Wittenmark [132], that
in some circumstances a combination of simple least-squares estimation and minimum-variance control has
a self-tuning property. The same is true for some classes of pole-shifting regulators. Computer-based
controllers incorporating these concepts are now commercially available.
a f
where y$ k + j | k is an optimal system output prediction sequence performed with data known upto time k,
Du(k + j – 1) is a future control increment obtained from minimization of the cost function J, N1 and N2 are
the minimum and maximum prediction horizons, Nu is the control horizon and r is a weighting factor penal-
izing changes in controls. The horizons (N1, N2, Nu) and the weighting factor (r) are design parameters. The
reference trajectory r(k + j ) can be a known constant, or known future variations.
A prime characteristic that distinguishes predictive control from other controllers, is the idea of receding
horizon; at each sample, the control signal is determined to achieve a desired behavior in the following N2
time steps. At each sample instant k,
(i) the future set-point sequence r (k + j ) is calculated;
(ii) the prediction model is used to generate a set of predicted outputs y$ (k + j | k);
(iii) the cost function J (Eqn.(10.46)) of future errors and controls is minimized; and
(iv) the first element u(k) of the sequence is asserted and the appropriate data vectors shifted so that the
calculation can be repeated at the next sample instant.
Note that the effective control law is stationary (optimization problem can be solved beforehand and the
solution transformed into a fixed (non-adaptive) controller). However, in the self-tuned case, new estimates
of the plant parameters require the optimization problem be solved at each sample, on-line.
If the dead-time of the process is exactly known, there is no point in setting N1 to be less than dead-time
since there would then be superfluous calculations in that the corresponding outputs cannot be affected by
the first action u(k). If dead-time is not known or is variable, then N1 can be set to 1 with no loss of stability.
A large value of N2 (of the order of 10) is generally recommended, corresponding more closely to the rise
time of the plant. Nu is an important design parameter, which is smaller than prediction horizon, N2. The
principle is that only the first Nu future control inputs are determined; from that point on the control input is
assumed constant. For simple plants, a value of Nu of 1 gives generally acceptable control. A larger value of
Nu is desirable for complex systems. In the derivation that follows, N1 is set to 1 and N2 to N: the “output
horizon”.
The Predictor When considering regulation about a particular operating point, even a nonlinear plant
generally admits a locally-linearized model (refer Eqns (10.30)–(10.32)):
A( z -1 ) y( k ) = B( z -1 )u( k - 1) + e ( k ) (10.47a)
–1
where A and B are polynomials in the backward shift operator z :
A( z -1 ) = 1 + a 1 z -1 + L + a n z - n (10.47b)
-1 -1 -n
B( z ) = b 1 + b 2 z + L + b n z (10.47c)
e (k) = some disturbance of unspecified character.
The leading elements b 1, b 2, ..., of the polynomial B are set to zero to account for the dead-time of the
plant; and the trailing elements bn, bn–1,…, are set to zero if the degree of polynomial B is less than n.
Principal disturbances encountered in industrial applications are accommodated by modelling e (k) as a
white noise sequence independent of past control inputs. To obtain a controller with integral action, it is
further assumed that the term e (k) is modelled as integrated white noise:
x (k )
e (k ) = (10.48)
1 - z -1
when x( k ) is an uncorrelated random sequence. Combining with (10.47a), we obtain
A( z -1 ) y(k ) = B( z -1 )u(k - 1) + x ( k )/ D (10.49)
–1
where D is the differencing operator (1 – z ).
596 Digital Control and State Variable Methods
Considering the time instant k + j, model (10.47) equivalently reads
A( z −1 )Δ y( k + j ) = B( z −1 )Δu(k + j − 1) + ξ(k + j ) (10.49a)
To systematically derive a j-step ahead predictor of output, the model is reorganized by introduction of
the following identity (Diophantine equation).
1 = DA( z -1 )E j ( z -1 ) + z - j Fj ( z -1 ) (10.50a)
where E j and Fj are polynomials uniquely defined, given the polynomial A and the prediction interval j;
deg ( E j ) = j - 1 and deg ( Fj ) = deg ( A) = n :
( ) j( ) j ( ) j j – 1)
E j = e0 + e1 z –1 + L + e j –1 z –( (10.50b)
Fj = f 0( J ) + f1( j ) z –1
+L + f n( j ) z – n (10.50c)
Multiplying Ej to both sides of (10.49) and using the identity (10.50a) gives
(1 - z - j Fj ) y( k + j ) = E j BDu( k + j - 1) + E j x ( k + j )
or y(k + j ) = E j BD u(k + j - 1) + Fj y(k ) + E j x (k + j ) (10.51)
Given that the sequence of future control inputs (i.e., u(k + i ) for i > 1) is known, and measured output
data upto time k is available, the optimal predictor for y(k + j ) is the expectation conditioned on the informa-
tion gathered upto time k (since Ej is of degree j – 1, the noise components are all in the future):
y$(k + j | k ) = G j Du(k + j – 1) + Fj y( k ) (10.52a)
where G j = Ej B is a polynomial of order n + j–1
= g0( j ) + g1( j ) z –1 + L + gn( j+) j –1 z – (n + j –1) (10.52b)
By multiplying B/AD to both sides of identity (10.50a), we obtain
B B
Gj = – z – j Fj
AD AD
B B
= – z – j f0( j ) + f1( j ) z –1 + L + fn( j ) z – n (10.52c)
AD AD
B B( z –1 )
The polynomial = represents the z-transform of the response y(k) of the process to
AD A( z –1 )(1 – z –1 )
unit step input.
Step response = g0 + g1z–1 + L + gj–1z–( j–1) + gj z– j + L (10.52d)
It is obvious that the first j terms in Gj are same as the j coefficients of the step response of the process.
This gives us one way of computing Gj for the prediction equation (10.52a). Both Gj and Fj may be com-
puted by recursion of the Diophantine equation (10.50a), as is explained below.
~
With A defined as DA, we have from (10.50a)
~
1 = E j A + z – j Fj (10.53a)
~
Since A is monic, the solution to
~
1 = E1 A + z –1 F1
is obviously
~
E1 = 1; F1 = z[1 – A]
Nonlinear Control Structures 597
Assume now that the solution to (10.53a) for some j exists, and consider the equation for j + 1:
~
1 = E j +1 A + z –( j +1) Fj +1 (10.53b)
Subtracting the two gives
~
0 = A[ E j + 1 – E j ] + z – j [ z –1 Fj +1 – Fj ] (10.54a)
Since deg (Ej + 1 – Ej ) = deg (Ej + 1 ) = j, it turns out to be good idea to define
E j +1 – E j = E j + e (j j +1) z –1 (10.54b)
where e (j j +1) –j
specifies the coefficient to z in the polynomial Ej + 1. Using this, (10.54a) can be rewritten as
~ ~
0 = AE j + z – j [ z –1 Fj + 1 – Fj + Ae (j j + 1) ] (10.54c)
~
By again exploiting that A is monic, it is evident that E j = 0, leading to
E j + 1 = E j + e (j j + 1) z – j
Consequently,
~
z –1 Fj + 1 – Fj + Ae (j j +1) = 0
or
~
Fj +1 = z[ Fj – Ae (j j + 1) ]
Comparing the coefficients, we obtain
e (j j +1) = f 0( j )
~
fi( j +1) = fi(+j1) – a ( j)
i +1 f0 , i = 0, 1, K , n
The following equations provide a summary of the recursions of Diophantine equation:
E j +1 = E j + f0( j ) z – j (10.55a)
fi ( j +1)
= fi(+j1) ~ f ( j ) ; i = 0, 1, K , n
–a (10.55b)
i +1 0
with
j)
f n(+1 =0
~
E1 = 1, and F1 = z (1 – A) (10.55c)
The only unknown quantities in the prediction equation (10.52a) are now the future control inputs. In
order to derive the control law, it is necessary to separate these from the part of the expression containing
known (= past) data.
y$ ( k + 1) = ( G1 – g0 ) Δu( k ) + F1 y( k ) + g0 Δu( k ) (10.56a)
y$ ( k + j ) = z j – 1 [G j – G j ]Du( k ) + Fj y( k ) + G Du( k + j – 1); 1 < j £ N (10.56b)
where G j = g0 + g1 z –1 + L + g j – 1 z –( j – 1) (10.56c)
Deriving the Control Law First the predictions derived above are expressed in the following vector
notation.
y$ = G u ~+j (10.57)
where
y$ = [ y$ ( k + 1) y$ ( k + 2 ) L y$ ( k + N )]T
~ = [Δu(k )
u Δu( k + 1) L Δu(k + N – 1)]T u
j = [j ( k + 1) j ( k + 2 ) L j ( k + N )]
598 Digital Control and State Variable Methods
with j (k + j ) = z j–1 [G j – G j ]Du(k ) + Fj y(k )
G is a matrix of dimension N ´ Nu:
LM g 0 0 L 0 OP
L 0
MM gM 1 g0
M L M
PP
G = M PP (10.58)
MM · · L g0
MMg M M M PP
NN –1 gN – 2 L gN – Nu PQ
With the reference trajectory expressed in the form of a vector
r = [r(k + 1) r(k + 2) L r(k + N)]T,
the expression of the cost function of (10.46) can be written as
J = (G ~
u + j – r )T (G ~ ~Tu
u + j – r ) + ru ~ (10.59)
The sequence of future controls is determined by setting the derivative of the cost function to zero:
¶J
~ = 2G T (G ~
u + j – r ) + 2 r~
u
¶u
T ~ T ~ = 0
= 2 G G u + 2 G ( j – r ) + 2 ru
or
~
u = [G T G + rI]–1 G T (r – j ) (10.60)
The matrix involved in the inversion is of the much reduced dimension Nu ´ Nu. In particular, if Nu = 1 (as
is usefully chosen for a ‘simple’ plant), this reduces to a scalar computation.
20
15
10
–5
–10
–15
0 50 100 150 200 250
Sampling instants
Fig. 10.8 Simulation results
⎡0⎤
With the initial estimate èˆ (0) = ⎢ ⎥ , P(0) = a I with large value of a , we use Equations (10.45) to
⎣0⎦
generate the new parameter estimate, and implement the generalized predictive control law. The plot of
Fig. 10.8 was generated using this procedure. The input signal is a square wave with amplitude 10. The
closed-loop system is close to the desired behaviour after a few transients.
As discussed earlier, modelling inaccuracies can have strong adverse effects on nonlinear control systems.
Therefore, any practical design must address them explicitly. A major approach to dealing with model
uncertainly is adaptive control, which we have discussed earlier in this chapter. Another major approach is
the variable structure sliding mode control, which is the subject of this section.
For the class of problems to which it applies, sliding mode controller
design provides a systematic approach to the problem of maintaining
stability and consistent performance in the face of modelling impreci-
sions. Sliding mode control has been successfully applied to robot
manipulators, underwater vehicles, automotive engines, high-perform-
ance electric motors, and power systems.
We have, informally, already introduced the reader to variable struc-
ture sliding mode control systems in Section 9.10 (revisiting this section
will be helpful). In the following, a formal introduction is presented. For a
detailed account of the subject, refer Slotine and Li [126], and Zak [35].
Consider a simple pendulum of mass M, suspended by a string of
Mg
length l having negligible mass. Let q be the angular displacement as
(Gravity-restoring
force Mgl sin )
shown in Fig. 10.9. t represents the torque applied at the point of
suspension, which will be considered to be the control input to the
Fig. 10.9 Schematic of a system. Ignoring the effects of friction, the system can be represented
pendulum mathematically as
Jθ&&(t ) + Mgl sin θ (t ) = τ (t )
where g is the acceleration due to gravity, and J = Ml2 is the moment of inertia.
By appropriate scaling, the essential dynamics of the system are captured by
y (t ) = −α sin y (t ) + u (t )
&& (10.62)
where a is a positive scalar
Ignoring the nonlinear sine term, we get the following linear approximation of the pendulum equation:
y ( t ) = u (t )
&& (10.63a)
Choosing x1 = y and x2 = y& as state variables, we have
x&1 (t ) = x2 (t );
(10.63b)
x&2 (t ) = u ( t )
The linear control methodologies (pole placement, optimal control) attempt to minimize, in some sense,
the transfer functions relating the disturbances to the outputs of interest. Here we explore discontinuous con-
trol (variable structure control, refer Section 9.10) methodology for disturbance rejection. The system with two
control structures, corresponding to u = + 1 and u = – 1, is considered. The variable structure law governing the
dynamics is given by
⎧ −1 if σ ( x1 , x2 ) > 0
u (t ) = ⎨ (10.64a)
⎩ +1 if σ ( x1 , x2 ) < 0
where the switching function is defined by
σ ( x1 , x2 ) = λ x1 + x2 (10.64b)
Nonlinear Control Structures 601
l is a positive design scalar. The reason for the use of the term “switching function” is clear, since the
function in Eqns (10.64) is used to decide which control structure is in use at any point (x1, x2) in the phase
plane. The expression in Eqn. (10.64a) is usually written more concisely as
u (t ) = − sgn(σ (t )) (10.64c)
where sgn (×) is the sign function. This function exhibits the property that
σ sgn(σ ) = σ
Figure 10.10a shows typical trajectories (parabolas) for u = ± k, and a typical switching line. Close to the
origin, on either side of the switching line, the trajectories point towards the line; an instant after the control
structure changes, the system trajectory will recross the switching line and the control structure must switch
back. Intuitively, high-frequency switching between the two control structures will take place as the system
trajectories repeatedly cross the line. This high frequency motion is described as chattering. If infinite-
frequency switching were possible, the motion would be trapped or constrained to remain on the line. The
motion when confined to the switching line satisfies the differential equation obtained from rearranging
s (x1, x2) = 0, namely
x2 = – l x1 (10.65a)
or y (t ) = − λ y (t )
& (10.65b)
This represents a first-order decay and the trajectories will ‘slide’ along the switching line to the origin.
Such a dynamical behaviour is described as sliding mode and the switching line is termed the sliding
surface. During sliding motion, the system behaves as a reduced-order system which is apparently independ-
ent of the control. The choice of the sliding surface, represented in our example by the parameter l, governs
the performance response whilst the control law itself, is designed to guarantee that trajectories are driven to
the ‘region’ of the sliding surface where the sliding motion takes place. To achieve this objective, the control
action is required to satisfy certain conditions, called reachability conditions.
x2
u=k
u = –k
x1
<0
x
x
=0
x >0
>0 =0
<0
Fig. 10.10a An illustration of the reachability conditions
To develop the reachability conditions and the region of sliding motion, we consider the system (10.63b)
with u given by (10.64), i.e., u = ± 1 corresponding to the two control structures. Figure 10.10b shows typical
602 Digital Control and State Variable Methods
trajectories of the control system with these control structures, and a typical switching line. Assume that the
system under consideration starts with initial conditions corresponding to point A in Fig.10.10b. The control
switches when the representative point reaches B. By geometry of the situation, we see that the trajectory,
resulting from the reversal of the control at point B, will bring the representative point on a parabola much
closer to the origin. This will continue until the trajectory intersects the switching line at a point closer to the
origin than the points A1 and A2 which are points of intersection of the switching line s (x1, x2), with parabo-
las passing through the origin: x1 = – 12 x 2 | x 2 | . The coordinates of the points A1 and A2 are obtained as
F -2 2
,
Iand
F2 -2
,
I
, respectively. The region where the sliding motion takes place, is a part of the
H l2 l K H
l2 l K
switching line between the points A1 and A2 as is seen below.
σ ( t ) σ& ( t ) = σ ( λx&1 + x&2 )
= σ ( λx 2 + u)
= σ (λx2 − sgn(σ ))
= λ σ x2 − σ
Since
ls x 2 £ l s x 2
we have
s (t )s& (t ) £ l s x 2 - s
£ s (l x 2 - 1)
x2
A1
A x1
A2
u = –1
u=1
B
(x1, x2) = 0
where k1 > 0 and k2 > 0 are the gains to be determined so that the condition σT σ& < 0 is satisfied. To determine
these gains, we substitute t, given by (10.78), into the expression σ σ& .
T
⎡ k1 sgn(σ 1 ) ⎤
σT σ& = − [σ 1 σ 2 ] ⎢ ⎥
⎣ k 2 sgn(σ 2 ) ⎦
= −σ 1k1 sgn(σ 1 ) − σ 2 k2 sgn(σ 2 ) = − k1 σ 1 − k2 σ 2 < 0
1.5
Desired
Actual
1
0.5
–0
1
–0.5
–1
–1.5
0 1 2 3 4 5 6 7 8
t
(a)
1.5
Desired
Actual
1
0.5
–0
2
–0.5
–1
–1.5
0 1 2 3 4 5 6 7 8
t
(b)
Fig. 10.11 Desired and actual trajectories
Nonlinear Control Structures 607
Thus, the sliding surface σ(x% ) = 0 is asymptotically attractive. The larger the values of gains, the faster
the trajectory converges to the sliding surface. Note that tolerance of sliding mode control to model
imprecision and disturbances, is high; satisfying asymptotic stability requirement, despite the presence of
uncertainties, ensures asymptotic tracking.
Simulation of this controller for the two-link robot arm (m1 = 1, m2 = 1, l1 = 1, l2 = 1, g = 9.8; èd1 (t ) =
sin(π t ) , èd 2 (t ) = cos(π t )) was done using MATLAB (refer Problem A.21 in Appendix A). Figures 10.11
show the tracking performance.
Complex dynamic systems have become integral and critical components of modern society. The unprec-
edented rate at which computers, networks, and other technologies are being developed, ensures that our
dependence on such systems will continue to increase. Examples of such systems include computer and
communication networks, transportation networks, banking and finance systems, electric power grid, and
systems for national defense. While advances in science and technology have enabled us to design and build
complex systems, comprehensive understanding how to control and optimize them is clearly lacking. The
mere existence of complex systems does not necessarily mean that they are operating under the most desir-
able conditions with enough robustness to withstand the limits of disturbances that inevitably arise. This was
made clear, for example, by the major power outage across dozens of cities in the Eastern United States and
Canada in August of 2003.
Many problem-solving architectures have been developed over the past thirty years—Feedback
Linearization, Model-Reference Adaptive Control, Self-Tuning Control, Sliding Mode Control, etc. These
architectures fall well short of the requirements of modern complex systems. While extensions and modifi-
cations to these architectures continue to be popular, other approaches are being considered as well. This
section presents a recently developed new control architecture that is based on reinforcement learning. Sev-
eral recent developments in reinforcement learning have substantially increased its viability as a general
approach to intelligent control.
Reinforcement-learning approach is based on the common sense idea that if an action is followed by a
satisfactory state of affairs, then the tendency to produce that action is strengthened, i.e., reinforced. Other-
wise, the tendency of the system to produce that action is weakened. In the following, we describe the
framework for reinforcement learning (RL) solutions to optimal control problems. To do so, we consider
building a reinforcement learning controller for stabilization of an inverted pendulum (Fig. 5.16). The con-
troller, or agent, has a set of sensors to observe the state of its environment (the dynamic system: inverted
pendulum mounted on a cart). For example, a controller may have sensors to measure angular position q and
velocity q& of the pendulum, and horizontal position z and velocity z& of the cart; and actions such as “push
left”, “push right”, by applying force of u newtons to the cart. Its task is to learn control strategy, or policy,
for choosing actions that achieve its goals.
It is generally assumed that the sets of possible states S and available actions A are both finite; it greatly
simplifies the theory. As we shall see later in this section, the reinforcement-learning theory backed by the
use of neural networks, makes learning tractable on the realistic control problems with continuous state
spaces (infinitely large set S).
Assume that our stabilization problem demands that the pendulum must be kept within ± 12º from vertical
and the cart must be kept within ± 2.4 m from the centre of the track. We define the following finite sets of
possible states S and actions A.
608 Digital Control and State Variable Methods
State® 1 2 3 4 5 6
Pend. angle (deg) <–6 – 6 to – 1 – 1 to 0 0 to 1 1 to 6 >6
Pend. velocity < 50 – 50 to 50 > 50
Cart position (m) < – 0.8 – 0.8 to 0.8 > 0.8
Cart velocity < – 0.5 – 0.5 to 0.5 > 0.5
Actions® 1 2 3 4 5 6 7
Apply force of – 10 –6 –2 0 2 6 10
u newtons
Therefore, there are 6 ´ 3 ´ 3 ´ 3 = 162 states: s1, s2,…, s162. The action set size is seven: a1, a2, ..., a7.
Reinforcement learning is concerned with how such agents can learn successful control polices by experi-
menting in their environment. We assume that the goals of the agent can be defined by a cost function (perform-
ance measure) that assigns a numerical value—an immediate cost—to each distinct action the agent may take
from each distinct state. For example, the goal of stabilizing the inverted pendulum can be captured by assign-
ing a negative number (e.g., –1) to the state-action transitions that immediately result in failure state (12º <
pendulum angle < –12º), and a cost of zero to every other state-action transition. This cost function may be built
into the controller, or known only to an external critic who provides the cost value for each action performed by
the controller. The task of the controller is to perform sequence of actions, observe their consequences, and
learn a control policy. The control policy we desire is one that from any initial state, chooses actions that
minimize the cumulative cost—the cost accumulated over time by the agent.
This general setting for reinforcement learning is summarized in Fig. 10.12. Each time the agent performs
an action at in some state st, it receives a real-valued cost (reinforcement signal) rt that indicates the imme-
diate value of this state-action transition. This produces a sequence of states si, actions ai, and immediate
costs ri. The agent’s task is to learn a control policy p : S®A, that minimizes the cumulative cost.
10.6.1 Q-Learning
We now define one quite general formulation of the problem of learning sequential control strategies. This
formulation is based on Markov decision processes, and follows the problem illustrated in Fig. 10.12.
In a Markov Decision Process (MDP), the agent can perceive a set S of distinct states of its environment
and has a set A of actions that it can perform. At each discrete time step t, the agent senses the current state
st, chooses a current action at, and performs it. The environment responds by giving the agent a cost rt =
r(st, at) and by producing the succeeding state st + 1 = f (st, at). Hence the functions f and r are part of the
environment and are not necessarily known to the agent. In an MDP, the functions f (st, at) and r (st, at)
depend only on the current state and action, and not on earlier states and actions. State-space description of
the discrete-time dynamic system (environment) in Fig. 10.12 obeys this condition. In general, f and r may
be non-deterministic (stochastic) function, but we consider only the determinate case.
The task of the agent is to learn a policy p : S ®A, for selecting its next action at based on the current
observed state st; that is p (st ) = at. How shall we specify precisely which policy p we would like the agent to
learn? One obvious approach is to require the policy that produces the lowest possible cumulative cost for
the controller over time (greedy policy). To state this requirement more precisely, we define the cumulative
cost V p (st) achieved by following a policy p from an arbitrary initial state st as follows:
¥
V p (st ) = rt + g rt +1 + g 2 rt + 2 + L = å g i rt + i (10.79)
i=0
Nonlinear Control Structures 609
where the sequence of costs rt + i is generated by beginning at state st and by repeatedly using the policy p to
select actions (i.e., at = p (st ), at + 1 = p (st + 1), ...). Here 0 £ g < 1 is a constant (called the discount factor)
that determines the relative value of delayed versus immediate costs. In particular, costs received i time steps
into the future are discounted exponentially by a factor of g i. Note that if we set g = 0, only the immediate
cost is considered. If we set g closer to 1, future costs are given greater emphasis relative to the immediate
cost. The meaning of g < 1 is that future costs matter to us less than the same costs paid at this present time.
Reinforcement
rt
State st
Agent (Controller) at = p (st)
We speak of quantity Vp(s) defined by Eqn.(10.79) as the value of the state s; it is the discounted cumu-
lative cost incurred by the policy p from initial state s.
We are now in a position to state precisely the agent’s learning task. We require that the agent learn a
policy p that minimizes Vp(s) for all states s. We will call such a policy an optimal policy and denote it by p*.
Recall that f (s, a) denotes the state s¢ resulting from applying action a to state s. Thus, the agent can
acquire the optimal policy by learning V* for each state on-line, provided it has perfect knowledge of the
successor function f. This prior knowledge is not always available (“curse of modelling”).
610 Digital Control and State Variable Methods
One of the important breakthroughs in reinforcement learning is the method known as Q-learning. In this
method, the real system underlying the decision problem, and not the system model, plays the role of the
successor function. To appreciate the idea, let us rewrite Eqn.(10.81) as
Q(s, a) = r(s, a) + g V*( f (s, a)) (10.82a)
p * (s ) = arg min Q (s, a) (10.82b)
a
The key is to learn the action-value function Q directly from the observed transitions. This can be accom-
plished through iterative approximation. To see how, notice the close relationship between Q and V*:
V*(s) = min Q(s, a′ ) (10.83)
a′
which allows rewriting Eqn.(10.82a) as
Q(s, a) = r(s, a) + γ min Q( f (s, a), a′ ) (10.84)
a′
This recursive definition of Q provides the basis for the algorithm that iteratively approximates Q. To
describe the algorithm, we will use the symbol Q$ to refer to learner’s estimate of the actual Q function.
Assume that the learner represents the estimate Q$ by a large table with a separate entry for each state-action
pair. The table entry for the pair (s, a) stores the value for Q$ (s, a)—the learner’s current estimate of the
actual but unknown value Q(s, a). The table can be initially filled with random values. The agent repeatedly
observes its current state, chooses some action a, executes this action; then observes the resulting cost r =
r(s, a) and the new state s¢ = f (s, a). It then updates the table entry for Q$ (s, a), following each such transition,
according to the rule:
Q$ (s, a) ← r + γ min Q$ ( s′, a′ ) (10.85)
a′
Note that rule uses the agent’s current Q$ values for the new state s¢ to refine its estimate of Q$ (s, a). This
rule is motivated by Eqn.(10.84), although the rule (10.85) concerns the agent’s approximation Q$ , whereas
Eqn.(10.84) applies to the actual Q function. While Eqn.(10.84) requires the knowledge of successor func-
tion f (s, a), the agent does not need to know this function to apply the rule (10.85). Instead, it executes the
action in its environment and then observes the resulting new state s¢ and cost r.
Will the algorithm (10.85) converge toward a Q$ equal to the true Q function? The answer is yes, under
certain conditions. We assume the agent selects actions in such a fashion that it visits every possible state-
action pair infinitely often. By this we mean that if action a is a legal action from state s, then over time the
agent must execute action a from state s repeatedly with nonzero frequency as the length of its action
sequence approaches infinity. The key idea underlying the proof of convergence is that the table entry
Q$ (s, a) with the largest error must have its error reduced by a factor of g whenever it is updated [149]. The
reason is that its new value depends only in part on error-prone Q$ estimates, with the remainder depending
on error-free observed immediate cost r.
Notice that algorithm (10.85) does not specify how actions are chosen by the agent. One obvious strategy
would be for the agent in state s to select the action a that minimizes Q$ (s, a), thereby exploiting the current
approximation Q$ by following a greedy policy. However, with this strategy, the agent runs the risk that it will
overcommit to actions that are found during early stages to have high Q$ values, while failing to explore other
actions that can have even higher values. In fact, the convergence condition requires that each state-action
transition occur infinitely often. This will clearly not occur if the agent always follows the greedy policy.
The Q-learning agent must therefore follow the policy of exploration and exploitation: exploration
ensures that all admissible state-action pairs are visited enough to satisfy the Q-learning convergence condi-
tion, and exploitation seeks to minimize the cost by following a greedy policy. An agent therefore must make
a trade off between its immediate good and its long-term well being. The “wacky” approach acts randomly,
Nonlinear Control Structures 611
in the hope that it will eventually explore the entire environment, and the ‘greedy’ approach acts to minimize
the cost using current estimates. We need an approach somewhat between wackiness and greediness.
Many exploration schemes have been used in RL literature. The simplest one is to behave greedily most
of the time, but every once a while, say with small probability e, instead select an action at random, uni-
formly, independently of the action-value estimates. We call methods using this near-greedy action selection
rule e-greedy methods. An advantage of these methods is that in the limit as the number of iterations tends to
¥, every action will be sampled an infinite number of times, and thus ensuring convergence. This of course
implies that the probability of selecting the optimal action converges to (1– e), i.e., to near certainty.
What we need is a strategy that expands on Q-learning by providing a compromise between two conflict-
ing objectives:
· Exploration, which ensures that all admissible state-action pairs are explored often enough to satisfy
the Q-learning convergence condition.
· Exploitation, which seeks to minimize the cost by following a greedy policy.
The lookup table representation of Q$ -values is directly used to extract optimal action in each state (refer
Fig. 10.13). But very few decision or control problems in the real world fit exactly into this strategy for
solution; the number of possible states in the real world is often much too large to accommodate the compu-
tational and storage requirements.
State s¢ s¢
Action selector Look-up table
Plant agent (controller) ^ ( s , a)
Reinforcement r Q
Action a¢
^ s¢ ) a¢ Î A
Q(
Early attempts in reinforcement learning were mostly based on a very simple approximation to the envi-
ronment. The true environment, however complex, was approximated as a finite-state system manageable by
a lookup-table representation of Q$ functions. Typical MDPs have a very large number of discrete states and
actions. Computational obstacles arise from the large number of possible state/action vectors, and the size of
the lookup table grows exponentially with the number of possible states; the situation pointing to the “curse
of dimensionality”.
The core of reinforcement learning is to use implicit representations of functions learned by agents
(instead of explicit representation in tabular form)—a form that allows one to calculate the output for any
input but that is usually much more compact than tabular form. We can exploit the universal approximation
property of neural networks and fuzzy inference systems to achieve this objective. In fact, any supervised
learning system with universal approximation property can be used [148].
Note that if l = 0, we have our original training estimate Q$ (1) , which considers only one-step discrepan-
cies in the Q$ estimates. As l is increased, the algorithm places increasing emphasis on discrepancies based
on more distant lookaheads. At the extreme value l = 1, only the observed rt + i values are considered, with
no contribution from the current Q$ estimate.
This is only a theoretical view of the TD algorithms; it is not directly implementable because it is acausal
which requires using at each step knowledge of what will happen many steps later. In a practical (causal)
view of TD algorithms, called TD(l) algorithms, Q$ -values are backed up based on information gained over
sequences of state transitions. One way to implement this kind of extension is to use the ‘eligibility trace’
idea to back up the Q$ -values of all the state-action pairs experienced in the past, with the magnitudes of the
backups decreasing to zero with increasing time in the past.
The eligibility trace provides a measure of how recently each state-action pair was selected by the
agent. Actions that are chosen often in frequently-encountered states will maintain an eligibility trace that
does not decay as fast as one that is seldom chosen/encountered. We can update the eligibility trace value
online as follows:
When a state-action pair is first visited, it initiates an additional memory variable, a state-action specific
eligibility trace et (s, a). On each step, the eligibility traces (nonnegative scalars) for all state-action pairs
decay by g l , and the eligibility trace of one pair visited on the step is incremented by 1:
et (s, a) =
RSγλe
t – 1 ( s, a ) + 1 if s = st and a = at
(10.91)
Tγλe
t – 1 ( s, a ) otherwise
where g is the discount rate and l (0 £ l £ 1) is the parameter we refer to as the trace-decay parameter. This
type of eligibility trace is called an accumulating trace because it accumulates each time the state-action pair
is visited; then fades away gradually when the pair is not visited, as illustrated in Fig. 10.15.
Accumulating eligibility trace
Fig. 10.15
At each step, we look at the current TD error and assign it backward to each prior state-action pair
according to its eligibility trace at that time.
Q$ t + 1 ( s, a ) = Q$ t ( s, a ) + h t d t et ( s, a ) "s, a (10.92a)
where
d t = (rt + g [min Q$ t (s¢, a)] – Q$ t (s, a)) (10.92b)
a
s¢ is the successor state and ht is the learning-rate parameter at time step t for the state-action pair (s, a).
At any time, the traces record which state-action pairs have recently been visited, where “recently” is
defined in terms of l. When l = 0, then by (10.91), all traces are zero at t except for the trace corresponding
to st; backing up reduces to the one described earlier in Eqn.(10.86) for Q-learning. The learning methods
Nonlinear Control Structures 615
with l = 0 are accordingly called TD(0)/Q(0). TD(0)/Q(0) is the case in which only one state preceding the
current state is changed by the TD error.
In general TD(l)/Q(l) methods, the parameter l characterizes how far into the past the methods look in
determining the backup. For values of l = 0, only one preceding state is changed. For larger values of l, but
still l < 1, more of the preceding states are changed but each more temporally distant state is changed less
because the eligibility trace is smaller. We say that the earlier states are given less credit for the TD error. If
l = 1, then the credit given to earlier states falls only by g per step.
It is computationally more expensive to execute general TD(l )/Q(l ), though it often converges faster for
large l.
The objective set for this section was to introduce the reader to the emerging nonlinear control structure.
For details refer [147–150].
Problems
10.1 The system
x&1 = x1x2 + x3
x&2 = −2 x2 + x1u
x&3 = sin x1 + 2 x1x2 + u
y = x1
can be transformed to Brunovsky form by differentiating y(t) repeatedly, and substituting state derivatives from
the given system equations, until the control input u(t) appears:
y& = x&1 = x1x2 + x3
y = x1x&2 + x&1 x2 + x&3
&&
= ⎡sin x1 + x2 x3 + x1x22 ⎤ + ⎡1 + x12 ⎤ u
⎣ ⎦ ⎣ ⎦
≡ f ( x) + g ( x)u; x = [ x1 x2 x3 ]T
Defining variables as z1 ≡ y, z2 ≡ y& , we obtain
z&1 = z2
z&2 = f (x ) + g (x )u
This may be converted to a linear system by redefinition of the input as
v(t ) ≡ f ( x) + g (x )u (t )
so that
1
u (t ) ≡ (− f ( x) + v(t ))
g (x )
for then one obtains
z&1 = z2 ; z&2 = v
which is equivalent to
y=v
&&
With a PD tracking control
v = &&
yd + K D e& + K Pe
where tracking error is defined as
e(t ) ≡ yd (t ) − y(t ); yd (t ) is the desired trajectory;
616 Digital Control and State Variable Methods
the closed-loop system becomes
e + K D e& + K P e = 0
&&
The complete controller implied by this feedback linearization technique, is given by
1
u (t ) = (− f ( x) + &&yd + K De& + K P e)
g (x )
(a) Draw the structure of the feedback linearization controller showing PD outer loop and nonlinear inner loop.
(b) Select gains KP and KD so that the closed-loop system has a natural frequency of wn = 10 rad/sec, and a
damping ratio of z = 0.707.
(c) Suppose that it is desired for the plant output y(t) to follow the trajectory yd = sin (2pt). Simulate the system
and plot actual output y(t), desired output yd (t), and the tracking error e(t); given x(0) = [1 1 1]T.
10.2 One useful method for specifying system performance is by means of a model that will produce the desired
output for a given input. The model need not be actual hardware. It can only be a mathematical model simulated
on a computer. In a model-reference control system, the outputs of the model and that of the plant are compared
and the difference is used to generate the control signals.
Consider a nonlinear, time-varying plant described by
⎡ x&1 ⎤ ⎡ 0 1 ⎤ ⎡ x1 ⎤ ⎡ 0⎤
x& = ⎢ ⎥ = ⎢ ⎥ ⎢ ⎥ + ⎢ ⎥ u = f ( x, u , t )
⎢⎣ x&2 ⎥⎦ ⎣⎢ −b − a (t ) x2 ⎦⎥ ⎢⎣ x2 ⎥⎦ ⎣1 ⎦
where a(t) is time-varying and b is a positive constant.
Assume the reference model equation to be
⎡ x&m1 ⎤ ⎡ 0 1 ⎤ ⎡ xm1 ⎤ ⎡ 0 ⎤
x& m = ⎢ ⎥=⎢ 2 ⎥⎢ ⎥ + ⎢ ⎥v
⎢⎣ x&m2 ⎥⎦ ⎢⎣ −ωn −2ζωn ⎥⎦ ⎢⎣ xm2 ⎥⎦ ⎢⎣ωn2 ⎥⎦
= A mx m + b mv
The error vector
e = xm − x
Define a function
V (e) = eT Pe
where P is positive-definite, real, symmetric matrix.
.
Then V (e) is defined as
.
V (e) = eT ( ATm P + PAm )e + 2M
where
M = eT P [ Am x – f ( x, u, t ) + bm v]
The assumed V(e) function is a Lyapunov function if
T
(i) A m P + PA m = − Q is a negative-definite matrix; and
(ii) the control u can be chosen to make the scalar quatity M nonpositive.
Choosing the matrix Q to be
⎡q 0 ⎤
Q = ⎢ 11 ⎥ = positive definite,
⎣ 0 q22 ⎦
we obtain
.
(
V (e) = − q11e12 + q22e22 + 2M )
Nonlinear Control Structures 617
where
⎡p p12 ⎤ ⎧⎪ ⎡ 0 1 ⎤ ⎡ x1 ⎤ ⎡ 0 1 ⎤ ⎡ x1 ⎤ ⎡ 0 ⎤ ⎡ 0 ⎤ ⎫⎪
M = [e1 e2 ] ⎢ 11 ⎥ ⎨⎢ 2 ⎥⎢ ⎥−⎢ ⎥⎢ ⎥− +⎢ ⎥⎬
⎣ p12 p22 ⎦ ⎪ ⎢⎣ −ω n −2ζω n ⎥⎦ ⎢ x ⎥ ⎣ −b −2ζωn ⎦ ⎢ x ⎥ ⎣⎢u ⎦⎥ ⎢⎣ω n2 v⎥⎦ ⎪
⎩ ⎣ 2⎦ ⎣ 2⎦ ⎭
= (e1 p12 + e2 p22 ) ⎡−(ω n − b) x1 − 2ζω n x2 + a(t ) x2 + ω n v − u ⎤
2 2 2
⎣ ⎦
If we choose u so that
u(t ) = −(ω n2 − b) x1 − 2ζω n x2 + ω n2 v + am x22 sign ( e1 p12 + e2 p22 ); am = max | a(t ) |
then
M = (e1 p12 + e2 p22 )[ a(t ) − amsign(e1 p12 + e2 p22 )] x22
= nonpositive
(a) Draw a block diagram representing the structure of the model-reference adaptive control system.
(b) For the parameters: a(t)= 0.2 sin t, b = 8, z = 0.7, wn = 4; simulate the closed-loop system and plot
x (t ) , xm (t ) , and e (t ).
10.3 Consider the adaptive control design problem for a plant, approximately represented by a first-order differential
equation
y& = – a p y + b p u
where y(t) is the plant output, u(t) is its input, and ap and bp are constant plant parameters (unknown to the
adaptive controller). The desired performance of the control system is specified by a first-order reference model
y&m = −am ym + bm r
where am and bm are known constant parameters, and r(t) is a bounded external reference signal. Using Lyapunov
synthesis approach, formulate a control law, and an adaptation law, such that the resulting model-following
error y(t) – ym(t), asymptotically converges to zero.
Simulate the MRAC system with ap = 1, bp =2, am = 3 and bm = 3, adaptation gain g = 1.5; initial values of both
parameters of the controller are chosen to be 0, indicating no a priori knowledge, and the initial conditions of
the plant and the model are both zero. Use two different reference signals in the simulation: r (t) = 2, and r (t) =
2 sin (3t).
10.4 The following data were collected from a cell concentration sensor, measuring absorbance in a biochemical
stream. The input u is the flow rate deviation (in dimensionless units) and the sensor output y is given in volts.
The flow rate (input) is piecewise constant between sampling instants. The process is not at steady state initially;
so y can change even though u = 0. Fit a first-order model
y ( k ) = a1 y (k − 1) + b1u( k − 1)
to the data using the least-squares approach. Plot the model response and the actual data.
Time(sec) u y
0 0 3.000
1 3 2.456
2 2 5.274
3 1 6.493
4 0 6.404
5 0 5.243
6 0 4.293
7 0 3.514
8 0 2.877
9 0 2.356
10 0 1.929
618 Digital Control and State Variable Methods
10.5 Step test data have been obtained for the off-gas CO2 concentration response—obtained by changing the feed
rate to a bioreactor. At k = 0, a unit step change in input u occurs, but the output change at the first sample
(k = 1) is not observed until the next sampling instant. The data is given in the table below.
Estimate the model parameters in the second-order difference equation
y ( k ) = a1 y ( k − 1) + a2 y (k − 2) + b1u ( k − 1) + b2u (k − 2)
from the input-output data using the least-squares approach. Plot the model response and the actual data.
k 0 1 2 3 4 5 6 7 8 9 10
y(k) 0 0.058 0.217 0.360 0.488 0.6 0.692 0.772 0.833 0.888 0.925
We consider the function V = 12 σ 2 . Note that V is positive-definite with respect to the sliding surface (s = 0).
The time derivative of V, evaluated on the trajectories of the closed-loop system, is
.
V = σσ&
= −σ k sgn(σ ) = − k | σ | < 0
Thus, the sliding surface is asymptotically attractive, and the system, restricted to the sliding surface, can be
made asymptotically stable by an appropriate choice of the parameter l of the sliding surface.
Simulate the system, and plot tracking error and control law with
λ = 2, k = 0.1, a(t ) =| sin t | +1
Neural Networks
11
11.1 INTRODUCTION
The goal of mathematical modelling is to provide a set of equations that purports to describe interrelations
between the system quantities, as well as the relations between these quantities and external inputs. We can
use different types of equations and their combinations like algebraic, differential (ordinary/partial), differ-
ence, integral, or functional equations. A mathematical model can be viewed as “a mathematical representa-
tion of the significant relevant aspects of a physical system (significance and relevance being in relation to
an application where the model is to be used)”.
When, devising algebraic, differential, difference equations (or any other model from first principles) is
not feasible, one seeks other avenues to obtain analytical models. Such models are devised by solving two
cardinal problems in modern science and engineering:
· Learning from experimental data (examples, samples, measurements, patterns, or observations) by
neural network.
· Embedding existing structured human knowledge (experience, expertise, heuristics) into workable
mathematics by fuzzy logic models.
Whenever there is an analytical model using a reasonable number of equations that can solve the given
problem in a reasonable time, at a reasonable cost, and with reasonable accuracy, there is no need to resort
to learning from experimental data or embedding structured human knowledge into fuzzy logic models.
Today, however, the two approaches are vital tools when at least one of these criteria is not fulfilled. There
are many such instances in contemporary science and engineering.
Neural networks and fuzzy logic models are two of the most important constituents of soft computing.
Soft computing is not a closed and clearly defined discipline at present. It includes an emerging and, more or
less, established family of problem-solving methods that attempt to mimic the intelligence found in nature.
In addition to neural networks and fuzzy logic models, there are, for example, support vector machines,
rough sets, genetic or evolutionary algorithms—and other methods in soft computing toolkit.
We have said that soft computing should mimic the intelligence found in nature. What is the character of
nature’s intelligence? Is it precise, quantitative, rigorous and computational? Just looking at human beings, the
most intelligent species, the answer is negative. We are very bad at calculations or at any kind of computing. A
negligible percentage of human beings can multiply two three-digit numbers in their heads. The basic function
Neural Networks 621
of human intelligence is to ensure survival in nature, not to perform precise calculations. The human brain can
process millions of visual, acoustic, olfactory (concerned with smelling), tactile (the sense of touch), and motor
data, and it shows astonishing abilities to learn from experience, generalize from learned rules, recognize
patterns and make decisions. We want to transfer some of the human mental faculties of learning, generalizing,
memorizing, and predicting into our models, algorithms, smart machines, and intelligent artificial systems in
order to enable them to survive in highly technological environment, that is, to solve given tasks based on
previous experience with reasonable accuracy, at reasonable cost and in a reasonable amount of time.
The basic premises of soft computing are:
· The real world is pervasively imprecise and uncertain.
· Precision and certainty carry a cost.
The guiding principle of soft computing, which follows from these premises is:
· Exploit tolerance for imprecision, uncertainty and partial truth to achieve tractability, robustness and
low solution costs.
This guiding principle of soft computing differs strongly from that of classical hard computing which
requires precision, certainty, and rigour. Many contemporary problems do not lend themselves to precise
solutions within the framework of classical hard computing, for instance, recognition problems (handwrit-
ing, speech, objects, and images), computer graphics, mobile robot coordination, and data compression. To
be able to deal with such problems, there is often no choice but to accept solutions that are suboptimal and
inexact. In addition, even when precise solutions can be obtained, their cost is generally much higher than
that of solutions that are imprecise and yet yield results within the range of acceptability.
x1
x2 maps to
y
..
.
xn
Input Inference
x y
w1 w7
Rule 1: IF the distance is small AND
x1 w2 w8 w13 speed is medium, THEN force on brake
w9 y should be large.
w3
w4 w10 w14
Rule 2: IF the distance is medium AND
x2 w5 w11 speed is large, THEN force on brake
w6 w12
should be medium.
(a) (b)
x y
(c)
Fig. 11.1 Neural networks and fuzzy logic modelling as examples of black box white box,
and grey box modelling approaches
Why is it that way? It is a consequence of the fact that the world we live in is not a binary world. There are
many states between old and young, good and bad, ill and healthy, sad and happy, cold and hot, no and yes,
short and tall, black and white, and so on. Changes between these different extremes are gradual and have a
great deal of ambiguity. Language serves as a way of expressing imprecise knowledge, and the tolerance for
imprecision about the vague environment we live in. Most human knowledge is fuzzy and expressed in terms
that are usually without quantitative meaning. Fuzzy logic is a tool for transforming such linguistically
expressed knowledge into workable algorithm called a fuzzy logic model. In its newest incarnation, fuzzy logic
is called “computing with words”.
The point of departure in fuzzy logic is the existence of a human solution to the problem. If there is no
human solution, there will be no knowledge to model and, consequently, no sense in applying fuzzy logic.
However, the existence of human solution is not sufficient. One must be able to articulate to structure the
human solution in the language of fuzzy rules. These are typically IF-THEN rules. Almost all structured
human knowledge can be expressed in the form of IF-THEN rules. The fuzzy logic modelling is thus a
“white box” design situation in which the solution to the problem is known, that is, structured human knowl-
edge (experience, expertise, heuristics) about the process exists (Fig. 11.1b).
independent sources (Werbos; Parker; Rumelhart, Hinton and Williams). Essentially, a refinement of the
Widrow-Hoff learning rule, the backpropagation learning rule provided a systematic means for training
multilayer networks, thereby overcoming the limitations presented by Minsky. Minsky’s appraisal has
proven excessively pessimistic; networks now routinely solve many of the problems that he posed in his
book.
Research in the 1980s triggered the present boom in the scientific community. New and better models are
being proposed, and the limitations of some of the ‘old’ models are being chipped away. A number of today’s
technological problems are in areas where neural-network technology has demonstrated potential: speech
processing, image processing and pattern recognition, time-series prediction, real-time control and others.
As the research on neural networks evolved, more and more types of networks are being introduced,
while still less emphasis is placed on the connection to the biological neural network. In fact, the neural
networks that are most popular today have very little resemblance to the brain, and one might argue that it
would be more fair to regard them simply as a discipline under statistics.
The application of artificial neural networks in closed-loop control, has recently been rigorously studied.
One property of these networks, central to most control applications, is that of function approximation. Such
networks can generate input/output maps which can approximate any continuous function with the required
degree of accuracy. This emerging technology has given us control design techniques that do not depend on
parametrized mathematical models. Neural networks are used to estimate the unknown nonlinear functions;
the controller formulation uses these estimated results.
When neural networks are used for control of systems, it is important that results and claims are based on
firm analytical foundations. This is especially important when these control systems are to be used in areas
where the cost of failure is very high, for example when human life is threatened, as in aircrafts, nuclear
plants, etc. It is also true that without a good theoretical framework, it is unlikely that the research in the
discipline will progress very far, as intuitive invention and tricks cannot be counted on to provide good
solutions to controlling complex systems under a high degree of uncertainty. Strong theoretical results guar-
anteeing control system properties such as stability are still to come, although promising results have been
reported recently of progress in special cases. The potential of neural networks in control systems clearly
needs to be further explored and both, theory and applications, need to be further developed.
The rest of the chapter gives a gentle introduction to the application of neural networks in control sys-
tems. A single chapter can in no way do justice to the multitude of interesting neural network results, that
have appeared in the literature. Not only would space be required, but in the time required to detail current
results, new results would certainly arise. Instead of trying to cover a large spectrum of such a vast field, we
will focus on what is generally regarded as the core of the subject. This chapter is meant to be a stepping-
stone that could lead interested readers on to other books for additional information on the current status,
and future trends of the subject.
Synapse
Nucleus
Dendrites
Synaptic
terminals
Neurons are connected to each other via their axons and dendrites. Signals are sent through the axon of one
neuron to the dendrites of other neurons. Hence dendrites may be represented as the inputs to the neuron, and
the axon as its output. Note that each neuron has many inputs through its multiple dendrites, whereas it has only
one output through its single axon. The axon of each neuron forms connections with the dendrites of many other
neurons, with each branch of the axon meeting exactly one dendrite of another cell at what is called a synapse.
Actually, the axon terminals do not quite touch the dendrites of the other neurons, but are separated by a very
small distance of between 50 and 200 angstroms. This separation is called the synaptic gap.
A conventional computer is typically a single processor acting on explicitly programmed instructions.
Programmers break tasks into tiny components, to be performed in sequence rapidly. On the other hand, the
brain is composed of ten billion or so neurons. Each nerve cell can interact directly with up to 200,000 other
neurons (though 1000 to 10,000 is typical). In place of explicit rules that are used by a conventional compu-
ter, it is the pattern of connections between the neurons, in the human brain, that seems to embody the
‘knowledge’ required for carrying out various information-processing tasks. In human brain, there is no
equivalent of a CPU that is in overall control of the actions of all the neurons.
The brain is organized into different regions, each responsible for different functions. The largest parts of
the brain are the cerebral hemispheres, which occupy most of the interior of the skull. They are layered
structures; the most complex being the outer layer, known as the cerebral cortex, where the nerve cells are
extremely densely packed to allow greater interconnectivity. Interaction with the environment is through the
visual, auditory and motion control (muscles and glands) parts of the cortex.
626 Digital Control and State Variable Methods
In essence, neurons are tiny electrophysiological information-processing units which communicate with
each other through electrical signals. The synaptic activity produces a voltage pulse on the dendrite which is
then conducted into the soma. Each dendrite may have many synapses acting on it, allowing massive
interconnectivity to be achieved. In the soma, the dendrite potentials are added. Note that neurons are able to
perform more complex functions than simple addition on the inputs they receive, but considering a simple
summation is a reasonable approximation.
When the soma potential rises above a critical threshold, the axon will fire an electrical signal. This
sudden burst of electrical energy along the axon is called axon potential and has the form of an electrical
impulse or spike that lasts about 1 msec. The magnitude of the axon potential is constant and is not related to
the electrical stimulus (soma potential). However, neurons typically respond to a stimulus by firing not just
one but a barrage of successive axon potentials. What varies is the frequency of axonal activity. Neurons can
fire between 0 to 1500 times per second. Thus, information is encoded in the nerve signals as the instantane-
ous frequency of axon potentials and the mean frequency of the signal.
A synapse couples the axon with the dendrite of another cell. The synapse releases chemicals called
neurotransmitters, when its potential is raised sufficiently by the axon potential. It may take the arrival of
more than one spike before the synapse is triggered. The neurotransmitters that are released by the synapse
diffuse across the gap and chemically activate gates on the dendrites, which, when open, allow charged ions
to flow. It is this flow of ions that alters the dendritic potential and provides voltage pulse on the dendrite,
which is then conducted into the neighbouring neuron body. At the synaptic junction, the number of gates
that open on the dendrite depends upon the number of neurotransmitters released. It also appears that some
synapses excite the dendrites they affect, whilst others serve to inhibit it. This corresponds to altering the
local potential of the dendrite in a positive or negative direction.
Synaptic junctions alter the effectiveness with which the signal is transmitted; some synapses are good
junctions and pass a large signal across, whilst others are very poor, and allow very little through.
Essentially, each neuron receives signals from a large number of other neurons. These are the inputs to the
neuron which are ‘weighted’. That is, some signals are stronger than others. Some signals excite (are posi-
tive), and others inhibit (are negative). The effects of all weighted inputs are summed. If the sum is equal to
or greater than the threshold for the neuron, the neuron fires (gives output). This is an “all-or-nothing”
situation. Because the neuron either fires or doesn’t fire, the rate of firing, not the amplitude, conveys the
magnitude of information.
The ease of transmission of signals is altered by activity in the nervous system. The neural pathway
between two neurons is susceptible to fatigue, oxygen deficiency, and agents like anaesthetics. These events
create a resistance to the passage of impulses. Other events may increase the rate of firing. This ability to
adjust signals is a mechanism for learning.
After carrying a pulse, an axon fibre is in a state of complete non-excitability for a certain time called the
refractory period. For this time interval, the nerve does not conduct any signals, regardless of the intensity of
excitation. Thus, we may divide the time scale into consecutive intervals, each equal to the length of the
refractory period. This will enable a discrete-time description of the neurons’ performance in terms of their
states at discrete-time instances.
w1
Inputs Total input
x2
w2 S wixi
Output
wn
xn
Fig. 11.3 Many inputs, one output model of a neuron Fig. 11.4 A neuron with weighted inputs
Excitatory and inhibitory inputs are represented simply by positive or negative connection weights,
respectively. Positive inputs promote the firing of the neuron, while negative inputs tend to keep the neuron
from firing.
Mathematically, we could look at the inputs and the weights on the inputs as vectors.
The input vector
LM
x1 OP
x2MM PP
x= (11.1a)
M
xn
MN PQ
and the connection weight vector
w = [w1 w2 ... wn] (11.1b)
The total input signal is the product of these vectors. The result is a scalar
n
∑ wi xi = wx (11.1c)
i =1
Activation Functions Although most neuron models sum their input signals in basically the same manner,
as described above, they are not all identical in terms of how they produce an output response from this input.
Artificial neurons use an activation function, often called a transfer function, to compute their activation as a
function of total input stimulus. Several different functions may be used as activation functions, and, in fact, the
most distinguishing feature between existing neuron models is precisely which transfer function they employ.
628 Digital Control and State Variable Methods
We will, shortly, take a closer look at the activation functions. We first build a neuron model, assuming
that the transfer function has a threshold behaviour, which is, in fact, the type of response exhibited
by biological neurons: when the total stimulus exceeds a certain threshold value q, a constant output is
produced, while no output is generated for input levels below the threshold. Figure 11.5a shows this neuron
model. In this diagram, the neuron has been represented in such a way that the correspondence of each
element with its biological counterpart may be easily seen.
1 1
0 a a
–1
x0 = 1
x1
w1 w0 = b
x2 w2 x1 w1
a y
s( ) w2 a y
x2 s( )
wn
wn
xn b
1 (a) xn (b)
Fig. 11.7 Mathematical model of a neuron (perceptron)
The bias term may be absorbed in the input vector itself as shown in Fig. 11.7b.
y$ = s (a)
F w x I ; w = b, x = 1
n
=s GH ∑ JK
i = 0
i i 0 0 (11.3a)
F n I
= s G ∑ w x + w J = s (wx + w ) (11.3b)
i i 0 0
H i = 1 K
In the literature, this model of an artificial neuron is also referred to as a perceptron (the name was given
by Rosenblatt in 1958).
The expressions for the neuron output y$ are referred to as the cell recall mechanism. They describe how
the output is reconstructed from the input signals and the values of the cell parameters.
The artificial neural systems under investigation and experimentation today, employ a variety of activa-
tion functions that have more diversified features than the one presented in Fig. 11.6. Below, we introduce
the main activation functions that will be used later in this chapter.
The MP neuron model shown in Fig. 11.5 used the hard-limiting activation function. When artificial
neurons are cascaded together in layers (discussed in the next section), it is more common to use a soft-
limiting activation function. Figure 11.8a shows a possible bipolar soft-limiting semilinear activation
function. This function is, more or less, the ON-OFF type, as before, but has a sloping region in the middle.
With this smooth thresholding function, the value of the output will be practically 1 if the weighted sum
exceeds the threshold by a huge margin and, conversely, it will be practically –1 if the weighted sum is much
less than the threshold value. However, if the threshold and the weighted sum are almost the same, the output
from the neuron will have a value somewhere between the two extremes. This means that the output from the
neuron can be related to its inputs in a more useful and informative way. Figure 11.8b shows a unipolar soft-
limiting function.
Neural Networks 631
s (a) s (a)
1 1
a 0 a
–1
(a) (b)
Fig. 11.8 Self-limiting activation functions
For many training algorithms (discussed in later sections), the derivative of the activation function is
needed; therefore, the activation function selected must be differentiable. The logistic or sigmoid function,
which satisfies this requirement, is the most commonly used soft-limiting activation function. The sigmoid
function (Fig. 11.9a):
1
s (a) = (11.4)
1 + e - la
is continuous and varies monotonically from 0 to 1 as a varies from – ¥ to ¥. The gain of the sigmoid, l,
determines the steepness of the transition region. Note that as the gain approaches infinity, the sigmoid
approaches a hard-limiting nonlinearity. One of the advantages of the sigmoid is that it is differentiable. This
property had a significant impact historically, because it made it possible to derive a gradient search learning
algorithm for networks with multiple layers (discussed in later sections).
(a)
(a) =1 1
=1
1
a
= 0.2
–1
0 a
(a) Sigmoid functions (b) Hyperbolic tangent function
Fig. 11.9
The sigmoid function is unipolar. A bipolar function with similar characteristics is a hyperbolic tangent
(Fig. 11.9b):
1 − e − λa
s (a) = = tanh 12 λa c h (11.5)
1 + e − λa
The biological basis of these activation functions can easily be established. It is known that neurons
located in different parts of the nervous system have different characteristics. The neurons of the ocular
motor system have a sigmoid characteristic, while those located in the visual area have a Gaussian character-
istic. As we said earlier, anthropomorphism can lead to misunderstanding when the metaphor is carried too
far. It is now a well-known result in neural network theory that a 2-layer neural network is capable of solving
632 Digital Control and State Variable Methods
any classification problem. It has also been shown that a 2-layer network is capable of solving any nonlinear
function approximation problem [138, 141]. This result does not require the use of sigmoid nonlinearity. The
proof assumes only that nonlinearity is a continuous, smooth, monotonically increasing function that is bounded
above and below. Thus, numerous alternatives to sigmoid could be used, without a biological justification. In
addition, the above result does not require that the nonlinearity be present in the second (output) layer. It is
quite common to use linear output nodes since this tends to make learning easier. In other words
s (a) = l a; l > 0 (11.6)
is used as an activation function in the output layer. Note that this function does not “squash” (compress) the
range of output.
Our focus in this chapter will be on two-layer perceptron networks with the first (hidden) layer having
log-sigmoid
s (a) = 1 (11.7a)
1 + e-a
-a
or tan-sigmoid s (a) = 1 - e (11.7b)
1 + e -a
activation function, and the second (output) layer having linear activation function
s (a) = a (11.8)
The log-sigmoid function has historically been a very popular choice, but since it is related to the tan-
sigmoid by the simple transformation
s log-sigmoid = (s tan-sigmoid + 1)/2 (11.9)
it makes no difference which of these is used.
We have so far described two classical neuron models:
· perceptron—a neuron with sigmoidal activation function (sigmoidal function is a softer version of the
original perceptron’s hard limiting or threshold activation function); and
· linear neuron—a neuron with linear activation function.
Another neuron model which has gained considerable attention is the “Radial Basis Function” (RBF)
model, which uses radially symmetric activation function f (×). We add RBF neuron in our toolkit for build-
ing neural networks.
A radial basis function is typically parameterized by two parameters: the centre which defines its posi-
tion, and a spread parameter that determines its shape. The spread parameter is equal to the standard devia-
tion s in case of a one-dimensional Gaussian function (do not confuse the standard deviation parameter s
with the sigmoidal activation function s (×)). In the case of a multivariate input vector x, the parameters that
define the shape of the hyper-Gaussian function are elements of a covariance matrix S. With the selection of
the same spread parameter s for all components of the input vector, the covariance matrix S = diag(s 2).
The input vector
x = [x1 x2 ... xn]
and the output f (×) of an RBF (Gaussian) neuron are related
x1 by the following equation.
⎛ x−c 2 ⎞
φ ( x, c, σ) = exp ⎜ − ⎟ (11.10)
x2 f (x,c,s) ⎜ 2 σ 2 ⎟
⎝ ⎠
where c is the centre and s is the spread parameter of the
Gaussian function.
xn Unlike sigmoidal neuron, there are no connection weights
Fig. 11.10 Gaussian function in RBF between the input terminals and the RBF unit (refer Fig. 11.10);
neuron model the centre c and the spread parameter s represent the weights.
Neural Networks 633
In the biological brain, a huge number of neurons are interconnected to form the network and perform
advanced intelligent activities. The artificial neural network is built by neuron models. Many different types
of artificial neural networks have been proposed, just as there are many theories on how biological neural
processing works. We may classify the organization of the neural networks largely into two types: a
feedforward net and a recurrent net. The feedforward net has a hierarchical structure that consists of several
layers, without interconnection between neurons in each layer, and signals flow from input to output layer in
one direction. In the recurrent net, multiple neurons in a layer are interconnected to organize the network. In
the following, we give typical characteristics of the feedforward net and the recurrent net, respectively.
y1
x1
S s (× )
y2
x2
S s (× )
y3
x3 S s (× )
yq
xn
S s (× )
x1 1
S wji xi + wj0
wj1 wj0 i
x2 wj2 yj
wjn
S s (× )
xn
Note that the row indices on the elements of matrix W indicate the destination neuron for the weight, and
the column indices indicate which source is the input for that weight. Thus, the indices in wji say that the
signal from the ith input is connected to the jth neuron.
The activation vector is
w 1x + w10
LM OP
w x+w
Wx + w = M PP
2 20
0
MM M PPQ
MNw x + wq q0
The outputs are
y$1 = s (w1x + w10)
y$ 2 = s (w2x + w20)
M
y$ q = s (wqx + wq0)
Introducing the nonlinear matrix operator G, the mapping of the
input space x to output space y$ , implemented by the network, can be
x G (Wx + w0) y^
expressed as (Fig. 11.12)
y$ = G(Wx + w0) (11.13a)
Fig. 11.12 InputOutput map of where LMσ (⋅) 0 L 0 OP
a one-layer network 0 σ (⋅) L 0
G(×) = M D P (11.13b)
MM M M L M P
P
N0 0 L σ (⋅) Q
Note that the nonlinear activation functions s (×) on the diagonal of the matrix operator G, operate
componentwise on the activation vector of each neuron.
The input and output vectors x and y$ are often called input and output patterns, respectively. The
mapping of the input pattern to an output pattern as given by (11.13), is of the feedforward and instantaneous
type since it involves no time delay between input x and the output y$ .
Neural networks normally have atleast two layers of neurons, with the first layer neurons having
nonlinear and differentiable activation functions. Such networks, as we will see shortly, can approximate any
continuous function. In real life, we are faced with nonlinear problems, and multilayer neural network
structures have the capability of providing solutions to these problems.
636 Digital Control and State Variable Methods
If the relationship between the input and output signals is linear, or can be treated as such, a single layer
neural network having linear neurons is the best solution. “Adaptive Linear Element” (Adaline) is the name
given to a neuron with linear activation function and a learning rule for adapting the weights. Single-layer
adaline networks have a capacity for a wide range of applications, whenever the problem at hand can be
treated as linear.
Multilayer Perceptrons A two-layer NN, depicted in Fig. 11.13, has n inputs and two layers of neurons,
with the first layer having m neurons that feed into the second layer having q neurons. The first layer is
known as the hidden layer, with m the number of hidden-layer neurons; the second layer is known as the
output layer, with q the number of output-layer neurons. It is common for different layers to have different
numbers of neurons. Note that the outputs of the hidden layer are inputs to the following layer (output layer);
and the network is fully connected. Neural networks with multiple layers are called multilayer perceptrons
(MLP); their computing power is significantly enhanced over the one-layer NN.
1 1
z1 y1
x1 ()
1 1
z2 y2
x2 ()
1 1
zm yq
xn ()
All continuous functions (exhibiting certain smoothness) can be approximated to any desired accuracy
with a network of one hidden layer of sigmoidal hidden units, and a layer of linear output units [141]. Does
it mean that there is no need to use more than one hidden layer and/or mix different types of activation
functions? This is not quite true. It may be that the accuracy can be improved using a more sophisticated
network architecture. In particular, when the complexity of the mapping to be learned is high, it is likely that
the performance can be improved. However, since implementation and training of the network become more
complicated, it is customary to apply only a single hidden layer of similar activation functions, and an output
layer of linear units. Our focus is on two-layer feedforward neural networks with hyperbolic tangent hidden
units and linear output units. This is probably the most commonly used network architecture, as it works
quite well in many practical applications.
Defining the hidden-layer outputs zl allows one to write
F wx
n I
zl = s GH ∑
i =1
li i + wl 0 ; l = 1, 2, L, m
JK (11.14)
= s (wlx + wl0)
Neural Networks 637
where
wl =D [wl1 wl2 ... wln]
In vector-matrix notation, the hidden layer in Fig. 11.13 has m ´ 1 output vector
LM OP
z1
z2
z= MM PP
, (11.15a)
M
zm
MN PQ
m × n weight matrix
LM
w11 w12 L w1n OP
w21 w22 L w2 n
W= MM PP (11.15b)
M M M
MN
wm1 wm2 L wmn
PQ
and m × 1 bias vector
w10 LM OP
w
= M
MM M PPP
20
w0 (11.15c)
Nw Q
m0
The output
z = G(Wx + w0) (11.16a)
LMσ (⋅) 0 L 0 OP
0 σ (⋅) L 0
G(×) = M
MM M M M M PPP
D
where (11.16b)
N 0 0 L σ (⋅)Q
Defining the second-layer weight matrix as
LMv v L v OP
11 12 1m
v v L v P
V= M
21 22 2m
(11.17a)
MM M M M M PP
MNv v L v PQ
q1 q2 qm
and bias vector as
LMv OP 10
v
v = M P,
20
(11.17b)
0
MM M PP
MNv PQ
q0
one may write the NN output as
j
F m
I
y$ = G å v z + v J ; j = 1, 2, ..., q
jl l j0 (11.18)
H l =1 K
= vj z + vj0
where vj =D [vj1 vj 2 ... vjm]
638 Digital Control and State Variable Methods
The output vector
x V(G (Wx + w 0 ) + v 0 ) y LM y$ OP1
y$
y$ = M P
2
(11.19a)
Fig. 11.14 Inputoutput map of
a two-layer network
MM M PP
MN y$ PQ
q
is given by the expression
y$ = Vz + v0
= V(G(Wx + w0) + v0) (11.19b)
Figure 11.14 shows the input–output map.
RBF Networks Radian Basis Function (RBF) networks have gained considerable attention as an alterna-
tive to multilayer perceptrons, with the hidden layers of neurons having sigmoidal activation functions. Both
the multilayer perceptrons and the RBF networks are the basic constituents of the feedforward neural
network. They are structurally equivalent.
The architecture of RBF networks is presented in Fig. 11.15. The network consists of n inputs x1, x2, ... xn;
and a hidden layer of m nonlinear processing units (refer Eqn. (11.10)):
⎛ x−c 2 ⎞
φ i ( x, ci ,s i) = exp ⎜ − i
⎟ ; i = 1, 2, ..., m (11.20a)
⎜ 2 s 2 ⎟
⎝ i ⎠
The output of the network is computed as a weighted sum of the outputs of the RBF units:
m
yˆ j = ∑ w jiφi ( x, c i , σ i ) ; j = 1, 2, ..., q (11.20b)
i =1
where wji is the connection weight between the RBF unit i and the j th component of the output vector.
It follows from equations (11.20) that the parameters (ci, si, wji ) govern the mapping properties of
RBF neural network. It has been shown [141] that RBF network can fit any arbitrary function with just one
hidden layer.
w11 y1
x1 f1(.) w12 S
w1m
w21
w22 y2
x2 f1(.)
w2m S
. . .
. . .
. . wq1 .
wq2 yq
xn fm(.) wqm
S
We are accustomed to solving computational problems by breaking them down into steps and solving each
small step. Neural networks don’t work by developing an algorithm for each individual processing element.
The knowledge is in the state of the whole network, not any one piece of it. Consequently, we have to think
in overall terms of inputs, transformations, and outputs of the network.
Neural networks deal only with numeric input data. Therefore, we must convert or encode information
from the external environment to numeric data form. Additionally, it is often necessary to scale data. Inhibi-
tory inputs are just as important as excitatory inputs. The input scheme should adequately allow for both the
types (allow positive and negative weights). A provision is also usually made for constant-source input to
serve as an offset or bias term for the transfer or activation function.
The numeric output data of a neural network will, likewise, require decoding and scaling to make it
compatible with the external environment.
Important characteristics of the network depend on:
(i) the transfer or activation functions of the processing elements;
(ii) the structure of the network (number of neurons, layers and interconnections); and
(iii) the learning mechanism of the network.
We have seen, in Section 11.2, that several different functions may be used as activation functions, and in
fact, one of the distinguishing features between existing neural network models is precisely which transfer
function they employ. Another important distinguishing feature is the network structure. Two major classes
of networks, feedforward and recurrent networks, were introduced in the last section. In this section, we
present basic learning features of neural networks.
Generalization Generalization is the ability of the network to respond to input that it has not seen before.
The input may be partial or incomplete. Generalization takes the ability of the neural network to learn and
self-adjust a step further. The system can ‘hypothesize’ a response.
As we have seen in the preceding paragraphs that learning in neural networks refers to the process of acquir-
ing a desired behaviour by changing the connection weights. The main rules to produce these weight changes
may be classified into three important categories, each of which borrow concepts from behavioural theories
of learning in biological systems.
q (Wx C w 0 )
Policy
(Actor NN)
q (Wa x C w a0 )
Internal (heuristic)
reinforcement
Value Function
state (Critic NN) action
q (Wc x C wc0)
Cost (External (primary)
reinforcement)
Environment
q (Wx C w 0 )
Fig. 11.17
With supervised learning, it is necessary to ‘train’ the neural network before it becomes operational.
Training consists of, as we have discussed earlier, presenting to the network sets of input patterns and
desired responses. During the training phase, connection weights are adapted to learn the desired input-
output behaviour. During the operation phase, the network works with fixed weights to produce outputs in
response to new patterns.
Least Squares Algorithm As an illustration of error-correction learning, consider the simple case of a
single neuron with linear activation function. Figure 11.18 is a schematic diagram of such a network. An
input signal x = [x1, x2, ..., xn]T, comprising features and augmented by a constant input component (bias), is
applied to the neuron; weighted and summed to give an output signal ŷ :
n
yˆ = ∑ wi xi + w0
i =1
= wx + w0 (11.21a)
where w = [w1 w2 ... wn ]
Defining (n + 1) ´ 1 vector
x = [1 x1 x2 ... xn ]
T
and 1 ´ (n + 1) vector
w = [ w0 w1 w2 ... wn ],
we can express Eqn. (11.21a) as
ŷ = w x (11.21b)
1
w0
x1 w1
y – + y
w2
x2 e
.
. wn
.
xn
Fig. 11.18 Learning scheme for a linear neuron
(Dashed arrows indicate that weights adaptation depends on the output error)
644 Digital Control and State Variable Methods
The learning task is to find the weights of the neuron (estimate the parameters of the proposed linear
model (11.21)) using a finite number of measurements, observations, or patterns. The learning environment,
thus, comprises a training set of measured data (patterns):
{x( p), y( p); p = 1, 2, ..., P}
consisting of an input vector x and output or system response y, and the corresponding learning rule for the
adaptation of the weights (In what follows, learning algorithm is given for the case of one neuron only, and
the desired output is a scalar variable. The extension of the algorithm for y, a vector, is straightforward). The
choice of a performance criterion, or the measure of goodness of the estimation, depends primarily on the
data, and on the desired simplicity of the learning algorithm. In the neural network field, the most widely
used performance criterion (cost function) is the sum of error squares:
P P
( ) ( )
2 2
E = 12 ∑ e( p ) = 12 ∑ y ( p ) − yˆ ( p ) (11.22)
p =1 p =1
(The constant ½ is used for computational convenience only. It gets cancelled out by the differentiation
required in the error minimization process).
It is obvious that network equation (11.21) is exactly a linear model with (n + 1) linear parameters. So we
can employ the least-squares methods, discussed in Chapter 10, to minimize the error in the sense of least
squares.
A matrix of input vectors x( p); p = 1, 2, ..., P (called the data matrix X) and vector y of the desired outputs
( p)
y ; p = 1, 2, ..., P, are introduced as follows:
⎛ 1 1 K 1 ⎞
⎜ (1) ⎟
⎜ x1 x1(2) L x1( P )
⎟
X = ⎜⎜ x2(1) x2(2) L
⎟ = ⎡ x (1) x (2) ...x ( P) ⎤
x2( P )
⎟ ⎣⎢ ⎦⎥
⎜ M M M ⎟
⎜ ⎟
⎜ x (1) xn(2) L xn( P ) ⎟⎠
⎝ n
(11.23a)
T
y = ⎡ y (1) y (2) ... y ( P ) ⎤
⎢⎣ ⎥⎦
The weights w are required to satisfy the following equations (refer Eqn.(11.21b)):
y (1) = w x (1)
y (2) = w x (2)
M
y( P) = w x ( P)
Therefore
[ y(1) y(2) .... y( P)] = w [ x (1) x(2) ... x ( P )]
yT = w X
or y = XT wT
P ×1 P × ( n + 1) ( n + 1) ×1
In the least squares sense, the best or optimal w that minimizes E results from the equation (refer
Eqns (10.38–10.40))
wT = ( XXT )−1 Xy = [ w0 w1 w2 ...wn ]T (11.23b)
Neural Networks 645
From a computational point of view, the calculation of optimal weights requires the pseudoinverse of the
P ´ (n + 1) matrix X.
An alternative solution to this type of problem is the “Recursive Least Squares” (RLS) algorithm (refer
Eqns (10.45)). For the learning problem in hand, the steps given in Table 11.1 implement the algorithm.
Given is a set of P measured data points that are used for training:
{x( p), y( p); p = 1, 2, . . . , P}
consisting of the input pattern vector x and the desired response y;
x = [1 x0 x1 x2 K xn ]
T
Step 3 Calculate the error for the applied data pair: e( k + 1) = y (k + 1) − xT ( k + 1)w T (k ) .
Step 4 Calculate the vector K (k ).
K (k ) = P (k ) x (k + 1)[1 + x T(k + 1)P (k ) x (k + 1)]−1
Step 5 Calculate the updated weight vector.
wT (k + 1) = wT (k ) + K (k )e(k + 1)
Step 6 Find the matrix P (k + 1)
P (k + 1) = P (k ) − K (k ) xT (k + 1)P (k )
Step 7 Stop the adaptation of the weights if the error is smaller than the predefined value. Otherwise set
k ® k + 1 and go back to step 2.
where m is the total number of output neurons in the array. The best match of the input vector x with
the synaptic weight vector wi is determined from the Euclidean distance between the input and the weight
vector. The output unit with the smallest Euclidean distance, i.e.,
min || x – w i ||
∀i
in the winning neuron q.
The next step in the Kohonen’s algorithm is to update the synaptic weight vector associated with the
winning neuron and the neurons within a defined neighborhood Nq of the winning neuron. The learning rule
is given by
⎧⎪ wi (k ) + η (x(k ) – wi (k )) if i ∈ Nq
wi (k + 1) = ⎨ (11.24)
⎪⎩ wi (k ) if i ∉ Nq
where h is the learning rate parameter, and k is the iteration index.
The winner’s neighbourhood may include neurons within one, two or even three positions on either side.
Generally, training a SOM begins with the winner’s neighbourhood of a fairly large size. Then, as training
proceeds, the neighbourhood size gradually decreases.
Initialization of the network weights can be carried out by either randomly initializing them, or selecting
a set of weights that reflect some a priori knowledge about the input data, that is, information regarding the
possible distribution of the output clusters. Stopping conditions can be, for example, based on total number
of specified iterations or based on monitoring the weight changes.
Given is a set of P patterns {x( p); p = 1, 2, ... , P} to be divided into m clusters. On each iteration, a pattern
( p)
x is presented to the network. Repeated presentations (that is, large number of iterations) of the input
patterns to the network are normally required before the map begins to “unfold”.
648 Digital Control and State Variable Methods
neuron m
Nq
w1n wm1
wm2 wmn
w12
w11
x1 x2 . . . xn
Fig.11.19 Conventional feature-mapping architecture of SOM
A competitive learning network performs an on-line clustering process on the input patterns. A cluster
centre’s position is specified by the weight vector connected to the corresponding output unit. The update
formula in Eqn.(11.24) implements a sequential scheme for finding the cluster centres of a data set. When an
input x( p) is presented to the network, the weight vector closest to x( p) rotates towards it. Consequently,
weight vectors move toward those areas where most inputs appear, and, eventually, the weight vectors
become the cluster centres for the data set. When the process is complete, the input data are divided into
disjoint clusters such that similarities between individuals in the cluster are larger than dissimilarities in
different clusters. Here the dissimilarity measure of the Euclidean distance is used as a metric of similarity.
Obviously, other metrics can be used, and different selections lead to different clustering results.
Training the RBF Network As an illustration, consider the problem of designing and training an RBF
network shown in Fig. 11.15. It follows from Eqns (11.20) that there are two sets of parameters governing
the mapping properties of the RBF network: the weights wji in the output layer, and the parameters (ci, si) of
the radial basis functions.
Several schemes have been proposed to learn the parameters ci and si of the RBF units. One scheme is to
learn only the centres ci and therefrom determine the spread parameters si. The basic idea is to ensure
suitable overlapping of the basis functions. A rule of thumb is to take si equal to, or a multiple of, the average
distance to the several nearest neighbors of ci. The centres ci are learned by means of data clustering based
on competitive learning.
Once the centres and the spread parameters are chosen, the weights wji in the output layer of the network
in Fig. 11.15, can be determined as follows.
Output neuron j in Fig. 11.15 is driven by a signal vector f(×) produced by the layer of RBF neurons, which
are themselves driven by input vector (stimulus) x applied to the input terminals. For fixed RBF centres and
spread parameters, the output yˆ j of the network can be computed as (refer to Eqn. (11.20b))
m
yˆ j = ∑ w jiφi ( x ) ; j = 1, 2, …, q
i =1
Supervised learning may be visualized as learning an environment, with the help of a teacher having
(1) (1) (2) (2) ( p) ( p)
knowledge of the environment in the form of input-output examples ( x , y j ), ( x , y j ),K , ( x , y j ), K
Neural Networks 649
For fixed RBF centres and spread parameters, the knowledge may be translated (refer Eqns (11.20)) to the
(1) (2) ( p)
form (φ , y j ), (φ , y j ),..., (φ , y j ),... . Suppose now the neuron j in output layer is exposed to the
(1) (2) ( p)
( p)
vector f . By such virtue of the built-in knowledge, the teacher is able to provide the neural network with
a desired response y (j p ) from f ( p). The network parameters are adjusted under the combined influence of the
training vector f ( p), and the error signal ej = y j − yˆ j ; which is the difference between the desired
( p) ( p) (p
response and the actual response of the network. The least squares estimation given by Eqns (11.23) or
recursive least squares algorithm described in Table 11.1, may be used for learning the weights wji.
Gradient descent is a basic technique that plays an important role in learning algorithm for neural networks.
Application of this technique to a single-layer network will be discussed as a prelude to backpropagation
learning algorithm for multilayer feedforward neural networks.
Consider the one-layer NN shown in Fig. 11.11 and described by the recall equation (refer Eqns (11.11))
F wx
n I ; j = 1, 2, ..., q
y$j = s GH ∑
i =1
ji i + wj 0 JK (11.25a)
In this equation, xi are the components of a prescribed constant input vector x, that stays the same during
the training of the NN. A general class of weight update algorithms is given by the recursive update equation
¶E ( k )
wji(k + 1) = wji(k) – h (11.27)
¶wji ( k )
where E(k) is a cost function that is selected depending on the application. In this algorithm, the weights wji
are updated at each iteration number k in such a manner that the prescribed cost function decreases. This is
¶E ( k )
accomplished by going “downhill” against the gradient . The positive step-size parameter h is taken
¶wji ( k )
as less than 1 and is called the learning rate. To see that the gradient descent algorithm decreases the cost
function, note that
Dwji(k) º wji(k + 1) – wji(k) (11.28a)
and, to first order
DE(k) º E(k + 1) – E(k)
» å ¶E( k ) Dwji(k)
j , i ¶wji ( k )
F ¶E(k) I
» –h å G
2
H ¶w (k) JK
j, i ji
(11.28b)
650 Digital Control and State Variable Methods
Let a prescribed vector x be input to the NN and desired target output, associated with x, be y. Then at
iteration index k, jth component of the output error is
ej(k) = yj – y$ j (k) (11.29)
where yj is the desired output and y$ j (k) is the actual output with input x. We define the cost function as least-
squares NN output error:
q q
2
E(k) = 1
2 å e2j (k) = 12 å d yj - y$j ( k ) i (11.30)
j =1 j = 1
Note that the components xi of the input x and the desired NN output components yj are not functions of
the iteration index k.
To derive the gradient descent algorithm with the least-squares output-error cost, the gradients with
respect to the weights and biases are computed using the product rule and the chain rule as
¶E ( k ) ¶y$j (k ) F w (k) x
n I
¶wji ( k )
= –ej(k)
¶wji( k )
= – ej (k)s ¢ GH å
i =1
ji i JK
+ wj 0 (k ) xi (11.31a)
¶E ( k ) F w (k ) x
n I
¶wj 0 ( k )
= – ej(k)s ¢ GH å
i =1
ji i + w (k ) J
j0
K
(11.31b)
where Eqns (11.30) and (11.26) were used. The notation s¢ (×) denotes the derivative of the activation
function evaluated at the argument. The argument is the activation value aj :
n
aj =
å wji( k ) xi + wj 0 ( k )
i = 1
s¢(aj) = ds
daj
For a linear activation function, s (aj) = aj and s¢(aj) = 1. The gradient descent algorithm becomes
wji (k + 1) = wji (k) + hej (k) xi (11.32a)
wj0 (k + 1) = wj0 (k) + hej (k) (11.32b)
For a sigmoidal activation function
1
s (aj) = -a
1+ e j
1 -a
s ¢(aj) = –
-aj 2
-e j e j
1+e e j
1 F e I = s (a )[1– s (a )]
-aj
=
1+ e
- aj GH 1 + e JK - aj j j (11.33)
ej = yj – y$ j
where y$ j is evaluated using the equations
m
y$ j = å vjlzl; z0 º 1
l = 0
F w x I; x
n
zl = s GH å JK
i = 0
li i 0 º 1
MN å
= =
¶wli ¶al ¶wli j =1 ¶y$ j ¶zl ¶al PQ ¶w
li
¶E
= – ej
¶y$ j
¶y$ j
= vjl
¶zl
zl = s¢ (a ) = z (1 – z )
l l l
¶al
¶al = x
i
¶w i
Therefore
¶E LM b
= –xi zl 1 - zl g å v e PPO
q
jl j
¶ w li MN j =1 Q
and the update rule becomes
q
wli = wli + h xi zl(1 – zl) å vjl ej
j =1
The backpropagation algorithm consists of repeating the following iterative procedure until the NN
output error has become sufficiently small. Incremental or batch processing may be used.
Forward Recursion to Compute NN Output Present input vector x to the NN, and compute the NN
output using
F w x I ; l = 1, 2, ..., m
n
zl = s GH å JK
i = 0
li i (11.39a)
F m I
y$ = G å v z J ; j = 1, 2, ... , q (11.39b)
j jl l
H l = 0 K
with x0 = 1 and z0 = 1, where y is the desired output vector.
Neural Networks 653
Backward Recursion for Backpropagated Errors
ej = yj – y$ j ; j = 1, 2, ..., q (11.39c)
q
dl = zl(1 – zl) å vjl ej; l = 1, 2, ..., m (11.39d)
j =1
Computation of the NN Weights and Bias Updates
njl = njl + hzl ej; j = 1, 2, ..., q; l = 0, 1, ..., m (11.39e)
wli = wli + hxi dl; l = 1, 2,..., m; i = 0, 1, ..., n (11.39f)
The main goal of the present chapter is to describe approaches to neural-network-based control that are
found to be practically applicable to a reasonably wide class of unknown nonlinear systems. Systems
identification is an integral part of such a control system design and, consequently, it calls for considerable
attention as well. The system identification is necessary to establish a model based on which the controller
can be designed, and it is useful for tuning and simulation before applying the controller to the real system.
In this section, attention is drawn to identification of neural network models for nonlinear dynamic systems
from a series of measurements on the systems.
We give here a generic working procedure for system identification with neural networks. One should be
aware, of course, that such a procedure must always be squeezed a little here and there to conform to the
application under consideration.
The multilayer feedforward network is straightforward to em-
Experiment ploy for the discrete-time modeling of dynamic systems for which
there is a nonlinear relationship between the system’s input and
output. Let k count the multiple sampling periods so that y(k)
specifies the present output while y(k – 1) signifies the output
Select
model structure observed at the previous sampling instant etc. It is assumed that
the output of the dynamic system at discrete-time instances can be
described as a function of number of past inputs and outputs:
y(k) = f (y(k – 1), ..., y(k – n), u(k – 1), ..., u(k – m)) (11.42)
Train model
A multilayer network can be used for approximating f (×) if the
inputs to the network are chosen as the n past outputs and m past
inputs of the dynamic system.
Validate model When attempting to identify a model of a dynamic system, it is
Not accepted a common practice to follow the procedure depicted in Fig. 11.21.
y$ ( k | q ) =
M
F N
I
ånls GH å wlif i (k ) + wl0 JK + n0 (11.43a)
l= 1 i =1
where y$ is the predicted value of the output y at sampling instant t = kT (T = sampling interval), q = {nl wli}
is the vector containing the adjustable parameters in the neural network (weights), f is the regression vector
which contains past outputs and past inputs (regressors’s dependency on the weights is ignored):
f (k) = [y(k – 1) L y(k – n) u(k – 1) L u(k – m)]T (11.43b)
= [f1(k) f2(k) L fN (k)]T
f1(k) = y(k – 1) z1
y (k – 2)
n0
y (k – n ) z2 y (k )
u (k – 1)
u (k – 2)
zM
f N (k ) = u (k – m )
Often, it is of little importance that the network architecture has selected vector q too small or too large.
However, a wrong choice of lag space, i.e., the number of delayed signals used as regressors, may have a
disastrous impact on some control applications. Too small obviously implies that essential dynamics will not
be modeled, but too large can also be a problem. From the theory of linear systems, it is known that too large
a lag space may manifest itself as common factors in the identified transfer function. An equivalent behav-
iour must be expected in the nonlinear case. Although it is not always a problem, common factors (corre-
sponding to hidden modes) may lead to difficulties in some of the controller designs.
It is necessary to determine both, a sufficiently large lag space and an adequate number of hidden units.
While it is difficult to apply physical insight towards the determination of number of hidden units, it can
often guide the proper lag space. If the lag space is properly determined, the model structure selection
problem is substantially reduced. If one has no idea regarding the lag space, it is sometimes possible to
determine it empirically.
11.7.3 Training
Assume now, that a data set has been acquired and that some model structure has been selected. According
to the identification procedure in Fig. 11.21, the next step is to apply the data set to pick “the best” model
among the candidates contained in the model structure. This is the training stage. The training can be
658 Digital Control and State Variable Methods
computationally intensive, but it is generally one of the easiest stages in the identification. It is not very
difficult to implement a training algorithm in a computer, but one might as well resort to one of the many
available software packages, e.g., MATLAB.
The training procedure can be rephrased in more formal terms. Given a set of data
ZP = {[u(k), y(k)], k = 1, ..., P} (11.44a)
and a set of candidate models
y$ (k |q) = g[f(k),q] (11.44b)
the purpose of the training is to determine a mapping from the data set to the set of candidate models
ZP ® q$ (11.44c)
so that a model is obtained which provides predictions that are in some sense close to the true outputs of the
system. The most commonly used measure of closeness for this type of problems is specified in terms of a
mean square error criterion
1 P
J(q, ZP) = å [y(k) – y$ (k | q)]2
2 P k =1
(11.45)
The most appealing feature of mean square error criterion is the simplicity with which a weight update
rule can be derived. The principle of the gradient (descent) iterative search method, is that at each iteration,
the weights are modified along the opposite direction of the gradient. That is, the search direction is selected
¶J
as – .
¶q
¶J
q(i + 1) = q (i) – h(i) ( i ) (11.46)
¶q
When applying the gradient method to the training of multilayer feedforward networks, it is useful to order
the computations in a fashion that utilizes the particular structure of the network. The method, called
the backpropagation algorithm, was discussed in Section 11.5. Batch method of the backpropagation
algorithm refers to the fact that each iteration on the parameter vector requires an evaluation of the entire
data set, ZP.
It is sometimes useful to identify a system online, simultaneously, with the acquirement of measurements.
Adaptive control is an example of such an application. In this case, a model must be identified and a control
system designed online, because the dynamics of the system to be controlled vary with time. Obviously
batch methods are unsuitable in such applications as the amount of computation, required in each iteration,
might exceed the time available within one sampling interval. Moreover, old data will be obsolete when the
system to be identified is time-dependent.
In a recursive algorithm, one input-output pair from the training set, [f(k), y(k)], is evaluated at a time
and used for updating the weights. In the neural network community, this is frequently referred to as incre-
mental or online backpropagation (refer to Section 11.5).
Improving Generalization The NN modelling error may be separated into two contributions:
(i) The bias error The portions of the error that are due to insufficient model structure (number of
hidden units, lag space), and an insufficient sample time.
(ii) The variance error The portion of the error that is due to the fact that the function implemented by
the network on a specific data set deviates from the average function.
The bias error is, in practice, inevitable; there will always be a certain error even with large data sets.
However, typically, one will find that the bias error decreases as more weights are added, since the network
Neural Networks 659
will be able to describe the system more accurately. The reason for not just selecting a gigantic network
architecture, is that one must expect the variance error to work in the opposite direction: as more weights are
estimated on the same data set, the variance on the estimated weights will increase. This quandary is often
referred to as the bias/variance dilemma [138]. If a network has more hidden units, the variance error
dominates. To describe this situation, it is common to use the expression overfitting. Overfitting means that
the network not only models the features of the system, but, to an undesired extent, also the noise in the
training set. The bias error on the training set is driven to a very small value with large number of hidden
units, but when new data are presented to the network, the error is large. The network has memorized the
training examples, but it has not learnt to generalize to new situations. Likewise, the expression underfitting
is used when the bias error dominates.
One method for improving network generalization, is to use a network which is just large enough to
provide an adequate fit. However, it is difficult to know beforehand, how large a network should be selected
for a specific application. There are two other methods for improving generalization: regularization and
early stopping.
Regularization This means, to augment the mean square error criterion with a regularization (or complex-
ity) term. The most commonly used augmentation is the so-called simple weight decay term:
1 P 1
J= å
2 P k =1
[y(k) – y$ (k | q)]2 +
2P
a q Tq (11.47)
where a denotes the weight decay.
Early Stopping An effect similar to regularization can be accomplished by stopping the training session,
before the minimum of the criterion has been reached. Error reduces in the beginning; after some iterations
it reaches a minimum, and then starts growing. Loosely speaking, the network initially captures the essential
features of the system, but after a while it adapts mostly to the noise.
11.7.4 Validation
In the validation stage, the trained model is evaluated to clarify if it represents the underlying system
adequately. Ideally, the validation should be performed in accordance with the intended use of the model. As
it turns out, this is often rather difficult. For instance, if the intention is to use the model for designing a
control system, the validation ought to imply that a controller was designed and its performance tested in
practice. For most applications, this level of ambition is somewhat high, and it is common to apply a series
of simple “standard” tests instead of concentrating on investigating particular properties of the model.
Although this is less than ideal, it is good as a preliminary validation to quickly exclude really poor models.
Most of the tests require a set of data that was not used during training. Such a data set is commonly
known as test or validation set. It is desirable that the test set satisfies the same demands as the training set,
regarding representation of the entire operating range.
A very important part of the validation is to simply inspect the plot, comparing observed outputs to
predictions. Unless the signal-to-noise ratio is very poor, it can show the extent of overfitting as well as
possible systematic errors.
If the sampling frequency is high, compared to the dynamics of the system, a visual inspection of the
predictions will not reveal possible problems. Some scalar quantities (correlation functions) to measure the
accuracy of the predictions, have been suggested. Reliable estimates of the average generalization
error are also useful for validation purposes, but their primary application is for model structure selection.
The estimates are good for rapidly comparing different model structures to decide which one is likely to be
the best.
660 Digital Control and State Variable Methods
Neural-network-based control constitutes a very large research field, and it is difficult to give a clear over-
view of the entire field. Here, in this section, an attempt has been made to outline a feasible path through the
“jungle” of neural network solutions. A completely automatic procedure for control system design is not
realistic; the emphasis is on the guidelines for working solutions.
It is believed that one of the most important lessons to be learnt from the numerous automatic control
applications developed over the past half century, is that simple solutions actually solve most problems quite
well. Regardless of the fact that all systems, to some extent, exhibit a nonlinear behaviour, it turns out that
they can often be controlled satisfactorily with simple linear controllers. When neural networks are intro-
duced as a tool for improving the performance of control systems for a general class of unknown nonlinear
systems, it should be done in the same spirit. A consequence of this philosophy is that our focus is on simple
control structures that yield good performance in practice.
We will call this procedure, the general training procedure for an inverse model.
Neural Networks 661
z–1
z–2
NN u (k)
Inverse System
Model y (k + 1)
r (k )
z–1
(a)
Desired output
yd = r NN Inverse u^ Output y
Plant
Model
(b)
Fig. 11.23 Inverse model of the system as a controller
This is basically an off-line procedure. After this training phase, the structure for an on-line operation
looks like the one shown in Fig. 11.23b, that is, the neural network representing the inverse of the plant
precedes the plant. The trained neural network should be able to take the desired output value yd = r as its
input, and produce appropriate û as an input to the plant.
The practical relevance of using an inverse model of the system as a controller is limited, due to a number
of serious inconveniences. The control scheme will typically result in a poor robustness with a high sensitiv-
ity to noise and high-frequency disturbances (corresponding to unity forward-path transfer function in the
linear case). In addition, one will often encounter a very active control signal, which may adversely affect the
system/actuators. If the system is linear, this occurs when its zeros are situated close to the unit circle. In the
nonlinear case, there is no unique set of zeros, but, of course, a similar phenomenon exists.
If the inverse model is unstable (corresponding to zeros of the system outside the unit circle in the linear
case), one must anticipate that the closed-loop system becomes unstable. Unfortunately, this situation occurs
quite frequently in practice. Discretization of linear continuous-time models under quite common circum-
stances, can result in zeros outside the unit circle—regardless that the continuous-time model has no zeros,
or all zeros are in the left half of the plane. In fact, for a model with a pole excess of at least two, one or more
zeros in the discretized model will converge to the unit circle, or even outside, as the sampling frequency is
increased. It must be expected that a similar behaviour can also be found in discrete models of nonlinear
systems.
Another problem with the design arises when the system to be controlled is not one-to-one, since then a
unique inverse model does not exist. If this non-uniqueness is not reflected in the training set, one can, in
662 Digital Control and State Variable Methods
principle, yield a particular inverse which might be adequate for controlling the system. Most often, how-
ever, one will end up with a useless, incorrect inverse model.
Despite these drawbacks, in a number of domains (stable systems, and one-to-one mapping plants), this
general training architecture is a viable alternative.
NN Inverse
Model
uff
+ y
+ PID + u
r System
Controller ufb
–
1 P
2
J= å [r(k) – y(k)] (11.55a)
2P k =1
which clearly is goal directed. Unfortunately, the minimization of this criterion is not easily carried out off-
line, considering that the system output, y(k), depends on the output of the inverse model, u(k – 1).
Inspired by the recursive training algorithms, the network might alternatively be trained to minimize
Jk = Jk – 1 + [r(k) – y(k)]2 (11.56)
This is an on-line approach and, therefore, the scheme constitutes an adaptive controller.
Assuming that Jk – 1 has already been minimized, the weights at time k are adjusted according to
2
q$ (k) = q$ (k – 1) – h de ( k ) (11.57a)
dq
where e(k) = r(k) – y(k) (11.57b)
2
and de (k ) = – dy( k ) e(k) (11.57c)
dq dq
By application of the chain rule, the gradient dy(k ) can be calculated:
dq
dy(k ) = ¶y(k ) du(k - 1) (11.58a)
dq ¶u( k - 1) dq
¶y(k )
Jacobians of the system, , are required. These are generally unknown since the system is unknown.
¶u( k - 1)
To overcome this problem, a forward model of the system is identified to provide estimates of the Jacobians:
¶y(k ) ¶y$(k )
» (11.58b)
¶u( k - 1) ¶u( k - 1)
The forward model is obtained by the system identification procedure described in the earlier section.
Fortunately, inaccuracies in the forward model need not have a harmful impact on the training. The
Jacobian is a scalar factor and, in the simplified algorithm (11.57), will only change the step-size of the
algorithm. Thus, as long as the Jacobians have the correct sign, the algorithm will converge if the step-size
parameter is sufficiently small. We will call this procedure the specialized training procedure for the
inverse model.
The deadbeat character, appearing when inverse models are used directly as controllers, will often result
in an unnecessarily fast response to reference changes. An active control signal may even harm the system or
the actuators. Consequently, it might be desirable to train the network to achieve some prescribed low-pass
behaviour of the closed-loop system. Say, have the closed-loop system following the model:
Bm ( z -1 )
ym(k) = r(k) (11.59)
Am ( z -1 )
The polynomials Am and Bm are selected arbitrarily, by the designer.
The control design is, in this case, related to “Model Reference Adaptive System” (MRAS); a popular
type of adaptive controller (discussed earlier in Section 10.3).
Since this specialized training is an on-line approach, the combination of having many weights to adjust
and having only the slow convergence of a gradient method, will often be disastrous. Before the weights are
properly adjusted, the system may have been driven outside the operating range with possibly serious conse-
quences. Often general training can be used to provide a decent initialization of the network so that the
specialized training is only used for “fine tuning” of the controller.
664 Digital Control and State Variable Methods
The simplified specialized training is quite easily implemented with the backpropagation algorithm (refer
Fig. 11.25). This algorithm is applied on the inverse model NN2:
u(k – 1) = f [ y(k + 1), y(k), ..., y(k – n + 1), u(k – 2),..., u(k – m)]
by assuming the following “virtual” error eu(k) on the output of the controller:
de 2 ( k ) dy ( k ) ¶y$ ( k ) du( k – 1) du( k – 1) ∂u( k –1)
= – e( k ) = – e( k ) = – eu ( k ) ; – eu (k )
dq dq ¶u( k – 1) dq dq ∂θ
∂y$( k )
where eu(k) = e(k) (11.60)
∂u ( k − 1)
∂yˆ( k ) NN1(u ( k – 1) + ε ) – NN1(u ( k – 1))
;
∂u ( k – 1) ε
A better estimate of the derivative is obtained as follows:
For a multilayer feedforward network (NN 1) with one hidden layer of sigmoid units and a linear output
(Fig. 11.22),
M F N I +n
y$ (k) = åvls G å wlif i (k ) + wl0 J 0 (11.61a)
l =1 H i =1 K
f(k) = [y(k – 1), ..., y(k – n), u(k – 1), ..., u(k – m)] (11.61b)
Reference ym
Model
+
e
–
Model
NN 1
Forward y^
eu Model
r
NN 2
Inverse System
u y
Model
The derivative of the output with respect to the regressor fi(k), is given by
M
¶y$(k )
= å vl wlis ¢( a ) (11.62a)
¶f i (k ) l = 1
Neural Networks 665
M
= ∑ vl wliσ (a ) [1 – s (a)]
l =1
N
where a= å wlif i (k ) + wl0 (11.62b)
i =1
Support vector machine (SVM) theory provides the most principled approach to the design of neural networks.
Statistical learning theory provides a sound mathematical basis for the formulation of support vector machines.
SVM theory applies to pattern classification and nonlinear regression, using any one of the following network
architectures: RBF networks, MLPs with a single hidden layer, and Polynomial machines. For each of these
feedforward networks, we may use the support vector learning algorithm to implement the learning process
using a given set of training data; automatically determining the required number of hidden units.
Our interest in control problems is more on nonlinear regression. To explain how a support vector
machine works for regression problems, it is perhaps easiest to start with the case of linearly separable
patterns that could arise in the context of binary pattern classification. In this context, the main idea of a
support vector machine is to construct a hyperplane as the decision surface in such a way that the margin of
separation between Class 1 and Class 2 examples is maximized. We will then take up the more difficult case
of linearly nonseparable patterns; moving closer to real-life situations.
With the material on how to find the optimal hypersurface for linearly nonseparable patterns at hand, we
will formally describe the construction of a support vector machine for real-life (nonlinear) pattern recogni-
tion task. As we shall see shortly, basically the idea of a support vector machine hinges on two mathematical
operations:
(i) Nonlinear mapping of input patterns into high-dimensional feature space.
(ii) Construction of optimal hyperplane for linearly separating the features discovered in step (i).
The final stage of our presentation will be to extend these results for application to nonlinear regression
problems.
ple in a real-valued space X ⊆ ℜn ; yi is its class label (output value), and yi ∈ {+1, −1}. + 1 denotes Class 1
and – 1 denotes Class 2.
To build a classifier, SVM finds a linear function of the form
f (x) = wT x + b (11.64)
so that the input vector xi is assigned to Class 1 if f (xi) ³ 0, and to Class 2 if f (xi) < 0 i.e.,
⎧⎪ +1 if wT xi + b ≥ 0
yi = ⎨ (11.65)
⎪⎩ −1 if wT xi + b < 0
666 Digital Control and State Variable Methods
x2 Separating line x2
(decision boundary)
x2
Class 2 Class 2
Class 2
Separating
line
Class 1 Class 1
Class 1 x1 x1
x1 (a) Large margin separation (b) Small margin separation
Fig. 11.26 Possible decision boundaries Fig. 11.27
From linear algebra, we know that in wTx + b = 0, w defines a direction perpendicular to the hyperplane.
w is called the normal vector (or simply normal) of the hyperplane. Without changing the normal vector w,
varying b moves the hyperplane parallel to itself. Note also that wTx + b = 0 has an inherent degree of
freedom. We can rescale the hyperplane to kwTx + kb = 0 for k ∈ ℜ+ (positive real number), without chang-
ing the hyperplane.
Since SVM maximizes the margin between Class 1 and Class 2 data points, let us find the margin. The linear
function f (x) = wTx + b gives an algebraic measure of the distance from x to the hyperplane wTx + b = 0. We
can express x as
w
x = xN + r (11.67)
|| w ||
where xN is the normal projection of x onto the hyperplane and r is the desired algebraic distance (Fig. 11.28).
Since by definition, f (x N ) = wT x N + b = 0, it follows that
Neural Networks 667
⎛ w ⎞
f (x) = wT x + b = wT ⎜ x N + r +b
⎝ || w || ⎟⎠
wT w (|| w ||) 2
=r =r = r || w ||
|| w || || w ||
f (x)
or r= (11.68)
|| w ||
( )
Now consider a Class 1 data point x(1) , +1 that is closest to the hyperplane wTx + b = 0 (Fig. 11.28). The
(1)
distance d of this data point from the hyperplane is
f ( x (1) ) w T x (1) + b
d (1) = = (11.69a)
|| w || || w ||
Similarly
f ( x (2) ) w T x (2) + b
d (2) =
= (11.69b)
|| w || || w ||
(2)
where (x , –1) is a Class 2 data point closest to the hyperplane wTx + b = 0.
x2
M
x Class 2
r
xN
x(2)
( 2)
) d
(1
w d (2):wTx +b=–1
x(1)
w Tx + b = 0
(1):wTx +b=+1
Class 1
x1
Fig. 11.28 Geometric interpretation of algebraic distances of points
to a hyperplane for two-dimensional case
We define two parallel hyperplanes H(1) and H(2) that pass through x(1) and x(2), respectively. H(1) and
(2)
H are also parallel to the hyperplane wT x + b = 0. We can rescale w and b to obtain (this rescaling, as we
shall see later, simplifies the quest for significant patterns, called support vectors)
H(1) : wT x(1) + b = +1
(11.70)
H(2) : wT x(2) + b = −1
such that
wT x i + b ≥ 1 if yi = +1
(11.71a)
w xi + b ≤ −1
T
if yi = −1
668 Digital Control and State Variable Methods
or equivalently
(
yi wT xi + b ≥ 1 ) (11.71b)
which indicates that no training data fall between hyperplanes H(1) and H(2). The distance between the two
hyperplanes is the margin M. In the light of rescaling given by (11.70),
1 −1
d (1) = ; d (2) = (11.72)
|| w || || w ||
where the ‘–’ sign indicates that x(2) lies on the side of the hyperplane wTx + b = 0 opposite to that where x(1)
lies. From Fig. 11.28, it follows that
2
M = (11.73)
|| w ||
Equation (11.73) states that maximizing the margin of separation between classes is equivalent to mini-
mizing the Euclidean norm of the weight vector w.
Since SVM looks for the separating hyperplane that minimizes the Euclidean norm of the weight vector,
this gives us an optimization problem. A full description of the solution method requires a significant amount
of optimization theory, which is beyond the scope of this book. We will only use relevant results from
optimization theory, without giving formal definitions, theorems or proofs (see [29] for details).
Our interest here is in the following nonlinear optimization problem with inequality constraints:
minimize f ( x)
subject to gi ( x) ≥ 0; i = 1,K , m (11.74)
An optimal solution to the problem (11.74) must satisfy the following necessary conditions, called
Karush-Kuhn-Tucker (KKT) conditions:
∂L ( x, λ )
(i) = 0; j = 1,K , n
∂x j
(ii) gi ( x) ≥ 0; i = 1,K , m (11.76)
(iii) λi ≥ 0; i = 1,K , m
(iv) λi gi (x) = 0; i = 1,K , m
m
In view of condition (iii), the vector of Lagrange multipliers belongs to the set {λ ∈ ℜ , λ ≥ 0}. Also
note that condition (ii) is the original set of constraints.
Our interest, as we will see shortly, is in convex functions f and linear functions gi. For this class of
0 0
optimization problems, when there exist vectors x0 and l0 such that the point (x , λ ) satisfies the KKT
conditions (11.76), then x0 gives the global minimum of the function f (x), with the constraint given in
(11.74).
Neural Networks 669
Let
L* (x) = max L(x ,λ ), and L* (λ ) = min L(x ,λ )
n
m
λ ∈ℜ x∈ℜ
The two problems, min-max and max-min, are said to be dual to each other. We refer to the min-max
*
problem as the primal problem. The objective to be minimized, L (x) is referred to as the primal function.
The max-min problem is referred to as the dual problem, and L* (λ) as the dual function. The optimal primal
and dual function values are equal when f is a convex function and gi are linear functions. The concept of
duality is widely used in the optimization literature. The aim is to provide an alternative formulation of the
problem which is more convenient to solve computationally and/or has some theoretical significance. In the
context of SVM, the dual problem is not only easy to solve computationally, but also crucial for using kernel
functions to deal with nonlinear decision boundaries. This will be clear later in this section.
The nonlinear optimization problem defined in (11.74) can be represented as min-max problem, as is
seen below:
For the Lagrangian (11.75), we have
⎡ m
⎤
L* (x) = max ⎢ f (x) − ∑ λi gi ( x )⎥
λ∈ℜ m ⎣ i =1 ⎦
Since gi(x) ³ 0 for all i, li = 0 (i = 1,…, m) would maximize the Lagrangian. Thus
L* (x) = f (x)
Therefore, our original constrained problem (11.74) becomes the min-max primal problem:
minimize L* (x)
n
x∈ℜ
subject to gi ( x) ≥ 0; i = 1,K , m
The concept of duality gives the following formulation for max-min dual problem:
maximize L* (λ )
m
ë∈ℜ ,λ ≥ 0
More explicitly, this nonlinear optimization problem with dual variables l, can be written in the form:
⎡ m ⎤
maximize minn ⎢ f (x) − ∑ λi gi (x) ⎥ (11.77)
x∈ℜ ⎢
λ ≥0
⎣ i =1 ⎦⎥
Let us now state the learning problem in SVM.
Given a set of linearly separable training examples,
D = {( x1 , y1 ), ( x 2 , y2 ),K , ( x P , yP )},
670 Digital Control and State Variable Methods
learning is to solve the following constrained minimization problem:
minimize f (w) = 12 wT w
(11.78)
subject to yi (wT xi + b) ≥ 1; i = 1, K, P
This formulation is called the hard-margin SVM. Solving this problem will produce the solutions for w
and b, which in turn, give us the maximal margin hyperplane wT x + b = 0 with the margin 2 / || w || .
The objective function is quadratic and convex in parameters w, and the constraints are linear in param-
eters w and b. The dual formulation of this constrained optimization problem is obtained as follows.
First we construct the Lagrangian:
P
L ( w , b, λ ) = 12 w T w − ∑ λi ⎡⎣ yi (wT xi + b) − 1⎤⎦ (11.79)
i =1
The KKT conditions are:
∂L P
∂b
= 0; which gives ∑ λi yi = 0
i =1
T
(ii) yi (w xi + b) − 1 ≥ 0; i = 1,K , P (11.80)
(iii) λi ≥ 0; i = 1,K , P
Accordingly, minimization of function L in Eqn. (11.81) with respect to primal variables w and b, gives
us the following dual objective function:
P P P
L* (λ) = ∑ λi − 12 ∑∑ λi λ j yi y j xTi x j (11.82)
i =1 i =1 j =1
· λi ≥ 0; i = 1,K , P
This formulation is dual formulation of the hard-margin SVM.
Having solved the dual problem numerically (using MATLAB’s quadprog function, for example), the
resulting optimum li values are then used to compute w and b. w is computed using condition (i) of KKT
conditions (11.80):
P
w = ∑ λi yi xi (11.84a)
i =1
and b is computed using condition (iv) of KKT conditions (11.80). For support vectors {xs, ys}, this condi-
tion becomes li > 0, and
ys ( wT xs + b) = 1
Instead of depending on one support vector to compute b, in practice all support vectors are used to
compute b, and then their average is taken on the final value for b. This is because the values of li are
computed numerically and can have numerical errors.
N SV
1 ⎡1 ⎤
b=
N SV
∑⎢y T
− w x s ⎥; N SV = total number of support vectors (11.84b)
s =1 ⎣ s ⎦
Class 2 region. However, inspite of the couple of mistakes, the decision boundary seems to be good. But the
hard margin classifier presented previously cannot be used, because all the constraints.
yi (wT xi + b) ≥ 1; i = 1,K , P
cannot be satisfied.
x2 wTx + b = 0
Class 2
w
zj |
| xl
||w
b ||
xj ||w
zl |
|
||w
Class 1
x1
Fig. 11.29 Soft decision boundary: xj and xl are error data points
So the constraints have to be modified to permit mistakes. To allow errors in data, we can relax the
margin constraints by introducing slack variables, ζ i (≥ 0), as follows:
w T xi + b ≥ 1 − ζ i for yi = +1
w xi + b ≤ −1 + ζ i
T
for yi = −1
Thus, we have the new constraints
yi ( w T xi + b) ≥ 1 − ζ i ; i = 1,K , P
(11.85)
ζi ≥ 0
The geometric interpretation is shown in Fig. 11.29.
We also need to penalize the errors in the objective function. A natural way is to assign an extra cost for
errors, to change the objective function to
⎛ P ⎞
wT w + C ⎜ ∑ ζ i ⎟ ; C ≥ 0
1
2
⎝ i =1 ⎠
where C is a user specified penalty parameter. This parameter is a trade-off parameter between margin and
mistakes.
The new optimization problem becomes:
P
minimize 1
2
wT w + C ∑ζ i
i =1
subject to yi (w xi + b) ≥ 1 − ζ i ; i = 1,K, P
T
(11.86)
ζ i ≥ 0; i = 1,K , P
This formulation is called the soft-margin SVM.
Proceeding in the manner similar to that described earlier for separable case, we may formulate the dual
problem for nonseparable patterns as follows.
Neural Networks 673
The Lagrangian
P P P
L( w , b, ζ, λ , μ) = 12 w T w + C ∑ ζ i − ∑ λi ⎡⎣ yi ( w T x i + b ) − 1 + ζ i ⎤⎦ − ∑ μ iζ i (11.87)
i =1 i =1 i =1
∂L P
= −∑ λi yi = 0
∂b i =1
∂L
= C − λi − μi = 0; i = 1,K, P
∂ζ i
(ii) yi (w xi + b) − 1 + ζ i ≥ 0; i = 1,K , P
T
ζ i ≥ 0; i = 1,K, P (11.88)
(iii) λi ≥ 0; i = 1,K,P
μi ≥ 0; i = 1,K , P
(iv) λi ( yi (w xi + b) − 1 + ζ i ) = 0; i = 1,K, P
T
μiζ i = 0; i = 1,K, P
We substitute the relations in condition (i) of KKT conditions (11.88) into the Lagrangian (11.87) to
obtain dual objective function. From the relation C – li – mi = 0, we can deduce that li = C because mi ³ 0.
Thus the dual formulation of the soft-margin SVM is:
P P P
maximize L* (λ ) = ∑ λi − 12 ∑∑ λi λ j yi y j xTi x j
i =1 i =1 j =1
P
subject to ∑ λi yi = 0 (11.89)
i =1
0 ≤ λi ≤ C; i = 1,K, P
Interestingly, zi and mi are not in the dual objective function; the objective function is identical to that for
the separable case. The only difference is the constraint l i £ C (inferred from C – li – mi = 0 and mi ³ 0).
The dual problem (11.89) can also be solved numerically, and the resulting li values are then used to
compute w and b. The weight vector w is computed using Eqn. (11.84a).
The bias parameter b is computed using condition (iv) of KKT conditions (11.88):
λi ( yi (wT xi + b) − 1 + ζ i ) = 0 (11.90a)
μiζ i = 0 (11.90b)
Since we do not have values for zi, we have to get around it. li can have values in the interval 0 £ li £ C.
We will separate it into three cases.
Case 1: li = 0
We know that C – li – mi = 0. With li = 0, we get mi = C. Since mizi = 0 (Eqn. (11.90b)), this implies that zi
= 0; which means that the corresponding ith pattern is correctly classified without any error (as it would have
674 Digital Control and State Variable Methods
been with hard-margin SVM). Such patterns may lie on margin hyperplanes or outside the margin. However,
they don’t contribute to the optimum value of w, as is seen from Eqn. (11.84a).
Case 2: 0 < li < C
We know that C – li – mi = 0. Therefore mi = C – li, which means mi > 0. Since mizi = 0 (Eqn. (11.90b)), this
implies that zi = 0. Again the corresponding ith pattern is correctly classified. Also from Eqn. (11.90a), we
see that for zi = 0 and 0 < λi < C , yi (wT xi + b) = 1; so the corresponding patterns are support vectors.
Case 3 : li = C
It can easily be seen that zi ¹ 0 in this case. But zi ³ 0 is a constraint of the problem. So zi > 0; which means
that the corresponding pattern is mis-classified or lies inside the margin.
We can use support vectors, as in Eqn. (11.84b), to compute the value of b.
The following points need attention of the reader.
· One of the most important properties of SVM is that the solution is sparse in li. Most training data
points are outside the margin area and their li’s in the solution are 0. The data points on the margin
having li = 0, also do not contribute to solution. Only those data points that are on the margin hyper-
planes with 0 < li < C (support vectors) and inside the margin (errors; li = C) contribute to solution.
Without this sparsity property, SVM would not be practical for large data sets.
· The final decision boundary is
wT x + b = 0
Substituting for w and b from Eqns (11.84), we obtain
T N SV
⎛ P ⎞ P P
1 ⎡1 P
⎤
⎜ ∑ λi yi x i ⎟ x + b = ∑∑ λi yi xTi x j + N ∑ ⎢ − ∑ λs y s x s x s ⎥ = 0
T
(11.91)
⎝ i =1 ⎠ i =1 j =1 SV s =1 ⎣ y s s =1 ⎦
We notice that w and b do not need to be explicitly computed. As we will shortly see, this is crucial for
using kernel functions to handle nonlinear decision boundaries.
· Finally, we still have the problem of determining the parameter C. The value of C is usually chosen by
trying a range of values on the training set to build multiple classifiers and then testing them on valida-
tion set before selecting the one that gives the best classification result on the validation set.
x® (x)
Thus, if we have to compute φ (x i ) φ ( x j ) in the feature space using the input vectors xi and xj directly,
T
then we would not need to know the feature vector f (x) or even the mapping f itself. In SVM, this is done
through the use of kernel functions, denoted by K:
K ( x i , x j ) = φT( x i ) φ( x j ) (11.96)
676 Digital Control and State Variable Methods
Commonly used kernels include :
Polynomial of degree d: K (x i , x j ) = (xTi x j + 1) d
⎛ 1 ⎞ (11.97)
Gaussian RBF: K ( xi , x j ) = exp ⎜ − 2 || xi − x j ||2 ⎟
⎝ 2σ ⎠
We replace φ ( x i ) φ( x j ) in (11.94) and (11.95) with kernel. We would never need to explicitly know what
T
f is.
However, how do we know that a kernel function is indeed a dot product in some feature space? This
question is answered by a theorem, called the Mercer’s theorem, which we will not discuss here. The kernels
in (11.97) satisfy this theorem. See [138,141] for details.
As with procedures applied to SVM classifiers, the constrained optimization problem (11.100) is solved
by forming the Lagrangian:
L(w, b, ζ , ζ* , λ, λ* , μ, μ* )
P P
( )
= 12 wT w + C ∑ ζ i + ζ i* − ∑ λi (ε + ζ i − yi + wT xi + b)
i =1 i =1
P P
( )
− ∑ λi* ε + ζ i* + yi − wT xi − b − ∑ μiζ i + μi*ζ i*
i =1 i =1
( ) (11.102)
where w, b, z l and zi* are the primal variables, and li, li*, mi, mi* ³ 0 are the dual variables.
The KKT conditions are:
(i) ∂L = w − ∑ λi − λi* xi = 0
P
∂w i =1
( )
∂L P *
(
= ∑ λi − λi = 0
∂b i =1
)
∂L
= C − λi − μi = 0; i = 1,K , P
∂ζ i
∂L
= C − λi* − μi* = 0; i = 1,K , P
∂ζ i
*
678 Digital Control and State Variable Methods
(ii) ε + ζ i − yi + w xi + b ≥ 0; i = 1,K, P
T
(11.103)
ε + ζ i* + yi − w xi − b ≥ 0; i = 1,K, P
T
ζ i , ζ i* ≥ 0; i = 1,..., P
(iii) λi , λi* , μi , μi* ≥ 0; i = 1,K , P
( )
(iv) λi ε + ζ i − yi + wT xi + b = 0; i = 1,K , P
λ (ε + ζ
*
i
*
i + yi − wT x − b ) = 0; i = 1,..., P
i
μiζ i = 0; i = 1,K , P
μi*ζ i* = 0; i = 1,K , P
Substituting the relations in condition (i) of KKT conditions (11.103) yields the dual objective function.
The procedure is parallel to what has been followed earlier. The resulting dual optimization problem is:
P P P P
maximize L* (λ, λ* ) = −ε ∑ (λi + λi* ) + ∑ (λi − λi* )yi − 12 ∑∑ (λi − λi* )(λ j − λ *j )xTi x j
i =1 i =1 i =1 j =1
P
subject to ∑ (λi − λi* ) = 0 (11.104)
i =1
λi , λi* ∈ [0, C ]
From condition (i) of KKT conditions (11.103), we have
P
(
w = ∑ λi − λi* xi
i =1
) (11.105)
Thus the weight vector w is completely described as a linear combination of the training patterns xi. One
of the most important properties of SVM is that the solution is sparse in li, li*. For | yˆi − yi | < ε , the second
factor in the following KKT conditions:
λi (ε + ζ i − yi + wT xi + b) = λi (ε + ζ i − yi + yˆ i ) = 0
(11.106)
λi* (ε + ζ i* + yi − wT xi − b) = λi* (ε + ζ i* + yi − yˆ i ) = 0
is nonzero; hence λi , λi* has to be zero. This equivalently means that all the data points inside the e-insensitive
tube (a large number of training examples belong to this category) have corresponding λi , λi* equal to zero.
Further, from (11.106) it follows that only for | y$i – yi | ³ e , the dual variables λi , λi* may be nonzero. Since
there can never be a set of dual variables λi , λi* which are both simultaneously nonzero, as this would require
slacks in both directions (‘above’ the tube and ‘below’ the tube), we have λi × λi* = 0.
From KKT conditions (11.103), it follows that
(C − λ )ζ = 0 i i
(11.107)
(C =0 − λi* )ζ i*
Thus the only samples (xi, yi) with corresponding λi , λi* = C lie outside the e-insensitive tube around f.
For λi , λi* ∈ (0, C ), we have z i, z i*= 0 and moreover the second factor in (11.106) has to vanish. Hence b can
be computed as follows:
b = yi − wT xi − ε for λi ∈ ( 0, C )
(11.108)
b = yi − w xi + ε
T
for λi* ∈ (0, C )
Neural Networks 679
All data points with λi , λi* ∈ (0, C ) are used to compute b, and then their average is taken as the final value
for b.
The examples that come with nonvanishing dual variables li, li* are called Support Vectors.
The next step is to make SVM algorithm nonlinear. This would be achieved by simply preprocessing the
training patterns xi by a map f into some feature space, and then applying the standard SVM algorithm.
All pattern-recognition/function approximation (classification/regression) problems when solved using
SVM algorithms presented in this section, are basically quadratic optimization problems. Attempting
MATLAB functions for SVM algorithms discussed in this section, will be a rich learning experience for the
reader.
Review Examples
Review Example 11.1 A high performance drive system consists of a motor and a controller integrated
to perform a precise mechanical maneuver. This requires the shaft speed, and/or position of the motor to clearly
follow a specified trajectory, regardless of unknown load variations and other parameter uncertainties.
A backpropagation neural network can be trained to emulate the unknown nonlinear plant dynamics by
presenting a suitable set of input/output patterns generated by the plant. Once system dynamics have been
identified using a neural network, many conventional control techniques can be applied to achieve the
desired objective of trajectory tracking.
In this example, we study a neural-network-based identification and control strategy for trajectory control
of a dc motor.
DC Motor Model Although it is not mandatory to obtain a motor model if a neural network (NN) is used in
the motor-control system, it may be worth doing so, from the analytical perspective, in order to establish the
foundation of the NN structure. We will use input/output patterns generated by simulation of this model for
training of NN (In a real life situation, experimentally generated input/output patterns will be used for training).
The dc motor dynamics are given by the following equations (refer Fig. 11.32):
dia
va(t) = Ra ia(t) + La + eb(t) (11.109)
dt
eb(t) = Kbw (t) (11.110)
TM (t) = KT ia(t) (11.111)
dw(t )
=J + Bw (t) + TL(t) + TF (11.112)
dt
where
va(t) = applied armature voltage (volts);
eb(t) = back emf (volts);
ia(t) = armature current (amps);
Ra = armature winding resistance (ohms);
La = armature winding inductance (henrys);
w(t) = angular velocity of the motor rotor (rad/sec);
TM (t) = torque developed by the motor (Newton-m);
KT = torque constant (Newton-m/amp);
Kb = back emf constant (volts/(rad/sec));
J = moment of inertia of the motor rotor with attached mechanical load (kg-m2);
B = viscous-friction coefficient of the motor rotor with attached mechanical load ((Newton-m)/
(rad/sec));
TL(t) = disturbance load torque (Newton-m); and
TF = frictional torque (Newton-m).
The load torque TL(t) can be expressed as
TL(t) = y (w) (11.113)
where the function y (×) depends on the nature of the load.
For most propeller driven or fan type loads, the function y (×) takes the following form:
TL(t) = mw2(t)[sgnw(t)] (11.114)
where m is a constant.
DC motor drive system can be expressed as single-input, single-output system by combining Eqns
(11.109)–(11.110):
d 2w(t ) dw( t )
LaJ + (Ra J + LaB) + (RaB + KbKT)w (t)
dt 2 dt
dT ( t )
+ La L + Ra[TL(t) + TF] + KT va(t) = 0 (11.115)
dt
The discrete-time model is derived by replacing all continuous differentials with finite differences.
function f (×). The values w (k + 1), w (k) and w (k – 1), which are the independent variables of f (×), are
selected as the inputs to the NN. The corresponding target f (w (k + 1), w (k), w (k – 1)) is given by Eqn.
(11.124). This quantity is also equal to the armature voltage va(k), as seen from Eqn. (11.123). Randomly
generated input patterns of [w (k + 1), w (k), w (k – 1)] and the corresponding target va(k), are used for off-
line training. The training data is generated within the constrained operating space. In conforming with the
mechanical and electrical hardware limitations of the motor, and with a hypothetical operating scenario in
mind, the following constrained operating space is defined:
– 30 < w (k) < 30 rad/sec
|w (k – 1) – w (k)| < 1.0 rad/sec (11.125)
|va(k)| < 100 volts
The estimated motor armature voltage given by the NN identifier is
v$ a (k – 1) = N(w (k), w (k – 1), w (k – 2)) (11.126)
Trajectory Control of DC Motor Using Trained NN The objective of the control system is to drive the
motor so that its speed w (k) follows a reference (prespecified) trajectory w r(k). A controller topology is
presented in Fig. 11.33. The NN trained to emulate inverse dynamics of the dc motor, is used to estimate the
motor armature voltage v$ a (k), which enables accurate trajectory control of the shaft speed w (k). Refer
Appendix B for realization of the controller.
(k + 1)
va (k) (k + 1)
DC
Motor
z–1 NN
Inverse
Model Plant
z–2
Controller
Review Example 11.2 In this example, we study a neural-network–based identification and control
strategy for temperature control of a water bath.
The plant consists of a laboratory 7-litre water bath as depicted in Fig. 11.34. A personal computer reads
the temperature of the water bath through a link consisting of a diode-based temperature sensor module
(SM) and an 8-bit A/D converter. The plant input, produced by the computer, is limited between 0 and 5
volts, and controls the duty cycle for a 1.3 kW heater via a pulse-width-modulation (PWM) scheme.
The temperature of water in a stirred tank is described by the equation
dy(t ) Y0 - y(t )
C = + h(t) (11.127)
dt R
where y(t) is the temperature of water in the tank (ºC), h(t) is the heat flowing into the tank through the base
heater (watts), Y0 is the temperature of the surroundings (assumed constant, for simplicity), C denotes the tank
thermal capacity (Joules/ºC), and R is the thermal resistance between tank borders and surroundings. Assuming
R and C as essentially constant, we can obtain discrete-time description of the thermal system as follows:
Neural Networks 683
D y(t) – Y
x(t) = 0
1 1 (11.128)
x& ( t ) = – x(t) + h(t) = –a x(t) + b h(t)
RC C
We modify this model to include a saturating nonlinearity, so that the water temperature cannot exceed some
limitation. The nonlinear plant model then becomes (obtained from real plant by experimentation)
g
y(k + 1) = F y(k) + u(k) + (1 – F)Y0 (11.130)
1 + exp [0.5 y( k ) – 40]
a = 1.00151 × 10–4
b = 8.67973 × 10–3 (11.131)
Y0 = 25ºC
T = 30 sec
u = input to the PWM, limited between 0 and 5 volts.
With these parameters, the simulated system is equivalent to a SISO temperature control system of a water
bath, that exhibits linear behaviour upto about 70ºC and then becomes nonlinear and saturates at about 80ºC.
The task is to learn how to control the plant described in Eqn. (11.130), in order to follow a specified
reference yr(k), minimizing some norm of error e(k) = yr(k) – y(k) through time. It is assumed that the model
in Eqn. (11.130) is unknown; the only available qualitative a priori knowledge about the plant is a rough
estimate of the order of the plant.
A neural network is trained to emulate the inverse dynamics of the plant. Assume that at instant k + 1, the
current output y(k + 1), the P – 1 previous values of y, and P previous values of u are all stored in memory.
Then the P pairs (xT(k – i), u(k – i)); i = 0, 1, ..., P – 1, xT(k) = [y(k + 1), y(k)], can be used as patterns for
training the NN at time k + 1. A train of pulses is applied to the plant and the corresponding input/output
pairs are recorded. The NN is then trained with reasonably large sets of data, chosen from the experimentally
684 Digital Control and State Variable Methods
obtained data bank, in order to span a considerable region of the control space (We will use input/output
patterns generated by simulation of the plant model for training the NN).
A controller topology is presented in Fig. 11.35. It is assumed that the complete reference trajectory yr(k)
is known in advance. The feedforward component of the control input is then composed by substituting all
system outputs by corresponding reference values. Refer Appendix B for realization of the controller.
NN uff (k)
Inverse
model
z–1
Dynamic
feed forward
+
yr (k + 1) + + u (k ) y(k + 1)
Water
PID
ufb (k) bath
–
Controller Plant
Problems
11.1 It is believed that the output y of a plant is linearly related to the input u; that is,
y$ = w1u + w2
(a) What are the values of w1 and w2 if the following measurements are obtained:
u = 2, y = 5, u = –2, y = 1.
(b) One more measurement is taken: u = 5, y = 7. Find a least-squares estimate of w1 and w2 using all the three
measurements.
(c) Find the unique minimal sum of error squares in this linear fit to the three points.
11.2 Consider the network in Fig. P11.2. An input signal x comprising features and augmented by a constant input
component (bias) is applied to the network with linear activation function. The network gives the output ŷ .
(a) Organize the weights as row vectors:
w j = ⎡⎣ w j1 w j 2 K w jn w j0 ⎤⎦ ; j =1, 2, …., q
w11 y^1
w12
x1 w1n
w10
x2
y^2
.
.
.
.
.
xn .
y^q
1
Fig. P11.2
11.3 Consider the RBF network shown in Fig. 11.15. There are two sets of parameters governing the mapping
properties of this network: the weights w ji ; i = 1,2,..., m; j = 1, 2,..., q , in the output layer and the centre ci of the
radial basis functions. The simplest form of RBF network training is with fixed centres. In particular, they are
commonly chosen, in a random manner, as a subset of the input data set. A sufficient number of centres
randomly selected from the input data set, would distribute according to the probability density function of the
training data, thus providing an adequate sampling of the input space. Because the centres are fixed, the map-
ping performed by the hidden layer is fixed as well. Derive gradient descent training algorithm to determine the
appropriate settings of the weights in the network output layer so that the performance of the network mapping
is optimized.
11.4 It is desired to design a one-layer NN with one input x and one output y$ that associates input x(1) = – 3 with the
target output y(1) = 0.4, and input x(2) = 2 with the target output y(2) = 0.8. Determine the parameters w and w0 of
the network
y$ = s (wx + w0)
with unipolar sigmoidal (log-sigmoid) activation function, that minimize the error
E = 12 LMe y
N
(1)
- y$ (1)
2
j + ey (2)
- y$( 2 ) j OQP
2
11.5 Streamline the notation in Chapter 11 for a 3-layer NN. For instance, define Wh1 as weights of hidden layer 1
with m nodes; Wh2 as weights of hidden layer 2 with p nodes; and V as weights of output layer with q nodes.
Input variables : xi; i = 1, ..., n
Outputs of hidden layer 1 : zl; l = 1, ..., m
Outputs of hidden layer 2 : tr; r = 1, ..., p
Outputs of output layer : y$ j; j = 1, ..., q
Desired outputs : yj
Learning constant : h
Derive the backpropagation algorithm for the 3-layer network, assuming the output layer has linear activation
and the two hidden layers have unipolar sigmoidal activations.
11.6 Consider a four-input single-node perceptron with a bipolar sigmoidal function (tan-sigmoid)
2
s (a) = -1
1 + e-a
where ‘a’ is the activation value for the node.
686 Digital Control and State Variable Methods
(a) Derive the weight update rule for {wi} for all i. The learning rate h = 0.1. Input variables: xi; i = 1, 2, 3, 4.
Desired output is y.
(b) Use the rule in part (a) to update the perceptron weights incrementally for one epoch. The set of input and
desired output patterns is as follows:
x(1) = [1 –2 0 –1]T, y(1) = –1
x(2) = [0 1.5 –0.5 –1]T, y(2) = –1
x(3) = [–1 1 0.5 –1]T, y(3) = 1
The initial weight vector is chosen as
w 0 = [1 –1 0 0.5]
The perceptron does not possess bias term.
(c) Use the training data and initial weights given in part (b) and update the perceptron weights for one epoch
in batch mode.
11.7 We are given the two-layer backpropagation network shown in Fig. P11.7.
(a) Derive the weight update rules for {nl} and {wli} for all i and l. Assume that activation function for all the
nodes is a unipolar sigmoid function
1
s (a) =
1 + e-a
where ‘a’ represents the activation value for the node. The learning constant h = 0.1. The desired output is y.
1
w10
1
w11 z1
x1
w12
y
1
w21 w20
x2
w22 z2
Fig. P11.7
(b) Use the equations derived in part (a) to update the weights in the network for one step with input vector x
= [1 0]T, desired output y = 1, and the initial weights:
w10 = 1, w11 = 3, w12 = 4, w20 = –6, w21 = 6, w22 = 5
n0 = –3.92, n1 = 2, and n2 = 4
(c) As a check, compute the error with the same input for initial weights and updated weights and verify that
the error has decreased.
11.8 We are given the two-layer backpropagation network in Fig. P11.8.
Derive the weight update rules for {nl} and {wl} for all l. Assume that activation function for all the nodes is a
bipolar sigmoid function
2
s (a) = -1
1 + e-a
where ‘a’ is the activation value for the node. The learning constant is h = 0.4. The desired output is y.
Neural Networks 687
1
w10
w1 z1
n1
1
1 n0
w20
w2 z2 n2 y
x
1
wm0 nm
wm zm
Fig. P11.8
Fuzzy Logic Models
12
12.1 INTRODUCTION
In a man–machine system, there arises the problem of processing information with the “vagueness” that is
characteristic of man. We consider here a real-life situation in process control.
The basic structure of a feedback control
yr + e u y system is shown in Fig. 12.1. G represents the
D G system to be controlled (plant or process). The
– purpose of the controller D is to guarantee a
Controller Plant desired response of the output y. The process of
keeping the output y close to the set-point (refer-
Fig. 12.1 Basic structure of a feedback control system ence input) yr, despite the presence of distur-
bances, fluctuations of the system parameters,
and noisy measurements, is called regulation. The law governing corrective action of the controller is called
the control algorithm. The output of the controller is the control action u.
The general form of the control law (implemented using a digital computer) is
u(k) = f(e(k), e(k – 1), ..., e(k – m), u(k – 1), ..., u(k – m)) (12.1)
providing a control action that describes the relationship between the input and the output of the controller.
In Eqn. (12.1), e = yr – y represents the error between the desired set-point yr and the output of the controlled
system; parameter m defines the order of the controller; and f (×) is, in general, a nonlinear function. k is an
index representing sampling instant; T is the sampling interval used for digital implementation (Fig. 12.2).
To distinguish control law (12.1) from the control schemes based on fuzzy logic/neural networks, we shall
call this, conventional control law.
e(t) e (k ) u (k)
yr(t) + y ( t)
Zero-order
Controller Plant
– T Hold
1
A PD controller in position form is
u(k) = Kce(k) + KDv(k)
We see that PD controller in position form is structurally related to PI controller in incremental form.
690 Digital Control and State Variable Methods
The control objectives, listed earlier, would require variable gains when the process output is in different
regions around the set-point. Figure 12.3 illustrates the type of control action desired; Du should be “near
zero” in the set-point region, very large in the constraint region, and normal in between.
yc
yr
u
Set-point Normal Constraint
region region region
Smooth u u umax
Time
Fig. 12.3 Type of control action desired in different regions around the set-point
A simple PI controller is inherently incapable of achieving all of the above control objectives, and has to be
implemented with additional (nonlinear) control laws for set-point and constraint regions, making the control
scheme a complex adaptive control scheme which would allow the desired gain modification when required.
On the other hand, an experienced process op-
yr Rule-base
u(k) y (t ) erator can easily meet all the three control objec-
of the Plant tives. An expert operator employs, consciously or
Expert Operator
subconsciously, a set of IF-THEN rules to control
a process (Fig. 12.4). He estimates the error e(k)
and time rate of change of error v(k) at a specific
Fig. 12.4 A manmachine control system time instant, and based on this information he
changes the control by Du(k).
A typical production rule of the rule-base in Fig. 12.4 is of the form:
IF (process state) THEN (control action) (12.4)
instead of an analytical expression defining the control variable as a function of process state. The “process
state” part of the rule is called the rule premise (or antecedent), and contains a description of the process
state at the kth sampling instant. This description is done in terms of particular values of error e(k), velocity
(time rate of change of error) v(k), and the constraint. The “control action”, part of the rule is called the
conclusion (or consequent), and contains a description of the control variable which should be produced
given the particular process state in the rule antecedent. This description is in terms of the value of the
change-in-control, Du(k).
Negative values of e(k) mean that the current process output y(k) has a value above the set-point yr, since
e(k) = yr – y(k) < 0. The magnitude of a negative value describes the magnitude of the difference yr – y. On
Fuzzy Logic Models 691
the other hand, positive values of e(k) express the knowledge that the current value of the process output y(k)
is below the set-point yr. The magnitute of such a positive value is the magnitude of the difference yr – y.
Negative values of v(k) mean that the current process output y(k) has increased compared with its
previous value y(k – 1), since v(k) = – (y(k) – y(k – 1))/T < 0. The magnitude of such a negative value describes
the magnitude of this increase. Positive values of v(k) express the knowledge that y(k) has decreased its
value when compared to y(k – 1). The magnitude of such a value is the magnitude of the decrease.
Positive values of Du(k) mean that the value of the control u(k – 1), has to be increased to obtain the value
of the control for the current sampling time k. A value with a negative sign means a decrease in the value of
u(k – 1). The magnitude of such a value is the magnitude of increase/decrease in the value u(k – 1).
The possible combinations of positive/negative values of e(k) and v(k) are as follows:
· positive e, negative v
· negative e, positive v
· negative e, negative v
· positive e, positive v
The combination (positive e(k), negative v(k)) implies that y < yr, since e(k) = yr – y(k) > 0; and y& > 0,
since v(k) = – (y(k) – y(k – 1))/T < 0. This means that the current process output y(k) is below the set-point
and the controller is driving the system upward, as shown by point D in Fig. 12.5. Thus, the current process
output is approaching the set-point from below. The combination (negative e(k), positive v(k)) implies that
y > yr, and y& < 0. This means that the current process output is above the set-point and the controller is
driving the system downward, as shown by point B in Fig. 12.5. Thus the current process output is approach-
ing the set-point from above. The combination (negative e(k), negative v(k)) implies that y > yr and y& > 0.
This means that the current process output y(k) is above the set-point and the controller is driving the system
upward, as shown by point C in Fig. 12.5. Thus the process output is moving further away from the set-point
and approaching overshoot. The combination (positive e(k), positive v(k)) implies that y < yr and y& < 0. This
means that the current process output is below the set-point and the controller is driving the system down-
ward, as shown by point A in Fig. 12.5. Thus the process output is moving further away from the set-point
and approaching undershoot.
y (k )
1.5
B
C
yr
A
D
0.5
0 5 10 15 20 25 30 35 40 k
Fig. 12.5 Process output deviations from the set-point
692 Digital Control and State Variable Methods
In a man-machine control system of the type shown in Fig. 12.4, experience-based knowledge of the
process operator and/or control engineer is instrumental in changing the control by Du(k), for a given
estimate of error e(k) and time rate of change of error v(k).
(i) If both e(k) and v(k) (positive or negative) are small (or zero), it means that the current value of the
process output variable y(k) has deviated from the set-point but is still close to it. The amount of
change Du(k) in the previous control u(k – 1) should also be small (or zero) in magnitude, which is
intended to correct small deviations from the set-point.
(ii) Consider the situation when e(k) has large negative value (which implies that y(k) is significantly
above the set-point). If v(k) is positive at the same time, this means that y is moving towards the set-
point. The amount of change Du to be introduced is intended to either speed up or slow down the
approach to the set-point. For example, if y(k) is much above the set-point (e(k) has a large negative
value) and it is moving towards the set-point with a small step (v(k) has small positive value), then the
magnitude of this step has to be significantly increased (Du(k) ® large negative value).
(iii) e(k) has either a small value (positive, negative, zero) or a large positive value, which implies that y(k)
is either close to the set-point or significantly below it. If v(k) is positive at the same time, this means
that y is moving away from the set-point. Then, a positive change Du(k) in the previous control u(k – 1)
is required to reverse this trend and make y start moving towards it, instead of moving away from the
set-point.
(iv) Consider a situation when e(k) has large positive value (which implies that y(k) is significantly below
the set-point) and v(k) is negative (which implies that y is moving towards the set-point). The amount
of change Du to be introduced is intended to either speed up, or slow down, the approach to the set-
point. For example, if y(k) is much below the set-point (e(k) has large positive value), and it is moving
towards the set-point with somewhat large step (v(k) has large negative value), then the magnitude of
this step need not be changed (Du(k) ® 0), or only slightly enlarged (Du(k) ® small positive value).
(v) e(k) has either a small value (positive, negative, zero) or a large negative value, and this implies that y(k)
is either close to the set-point or significantly above it. If v(k) is negative at the same time, y is moving
away from the set-point. Thus, a negative change Du(k) in the previous control u(k – 1) is required to
reverse this trend and make y start moving towards it instead of moving away from the set-point.
The variables e, v and Du are described as consisting of a finite number of verbally expressed values
which these variables can take. Values are expressed as tuples of the form {value sign, value magnitude}.
The ‘value sign’ component of such a tuple takes on either one of the two values: positive or negative. The
‘value magnitude’ component can take on any number of magnitudes, e.g., {zero, small, medium, big}, or
{zero, small, big}, or {zero, very small, small, medium, big, very big}, etc.
The tuples of values may therefore look like: Negative Big (NB), Negative Medium (NM), Negative
Small (NS), Zero (ZO), Positive Small (PS), Positive Medium (PM), Positive Big (PB) or an enhanced set/
subset of these values.
We consider here a simple rule-based controller which employs only three values of the variables e, v,
and Du: Negative (N), Near Zero (NZ), Positive (P), for e and v; and Negative (N), Zero (Z), Positive (P) for
Du. A typical production rule of the rule-base in Fig. 12.4 is
IF e(k) is Positive and v(k) is Positive THEN Du(k) is Positive (12.5)
Let us see now what such a rule actually means. A positive e(k) implies that y(k) is below the set-point. If
v(k) is positive at the same time, it means that y(k) is moving away from the set-point. Thus, a positive
change Du(k) in the previous control u(k – 1) is required to reverse this trend.
Consider another rule:
IF e(k) is Positive and v(k) is Negative THEN Du(k) is Zero (12.6)
Fuzzy Logic Models 693
This rule says that if y(k) is below the set-point, and is moving
towards the set-point, then, no change in control is required.
We will present the rule-base in table format, shown in Fig. 12.6.
The cell defined by the intersection of the third row and third column
Fig. 12.6 The rule-base for represents the rule given in (12.5), and the cell defined by the inter-
system of Fig. 12.4 section of the third row and first column represents the rule given
in (12.6).
The rule-base shown in Fig. 12.6 is designed to remove any significant errors in process output by
appropriate adjustment of the controller output. Note that the rule
IF e(k) is Near Zero and v(k) is Near Zero THEN Du(k) is Zero (12.7)
ensures smooth action near the set-point, i.e., minor fluctuations in the process output are not passed further
to the controller.
The rule-base of Fig. 12.6 is thus effective for control action in the set-point region and the normal region
in Fig. 12.3. However, we require additional rules for the constraint region. The following three rules pre-
scribe a control action when the error is in the constraint region, approaching it or leaving it.
(i) IF e(k) is in constraint region THEN value of Du(k) is drastic change.
This rule specifies the magnitude of additional DU(k) to be added to the one already determined by the
rules of Fig. 12.6 when e(k) is in the constraint region.
(ii) IF e(k) enters constraint region, THEN start summing up the values of Du(k) determined by constraint
rule 1.
(iii) IF e(k) leaves constraint region, THEN subtract the total value of Du(k) determined by constraint rule 2.
The man-machine control system of Fig. 12.4 has the capability of representing and manipulating data
that is not precise, but rather fuzzy. The error variable is ‘near zero’, change in control is ‘drastic’, etc.,—are
the type of linguistic information which the expert controller is required to handle. But what is a ‘drastic
change’ in control? The property ‘drastic’ is inherently vague, meaning that the set of signals it is applied to,
has no sharp boundaries between ‘drastic’ and ‘not drastic’. The fuzziness of a property lies in the lack of
well-defined boundaries of the set of objects to which the property applies.
Problems featuring uncertainty and ambiguity have been successfully addressed subconsciously by hu-
mans. Humans can adapt to unfamiliar situations and they are able to gather information in an efficient
manner, and discard irrelevant details. The information gathered need not be complete and precise and could
be general, qualitative and vague because humans can reason, infer and deduce new information and knowl-
edge. They can learn, perceive and improve their skills through experience.
How can humans reason about complex systems, when the complete description of such a system often
requires more detailed data than a human could ever hope to recognize simultaneously, and assimilate with
understanding? The answer is that humans have the capacity to reason approximately. In reasoning about a
complex system, humans reason approximately about its behaviour, thereby maintaining only a generic
understanding about the problem.
The seminal work by Dr. Lotfi Zadeh (1965) on system analysis based on the theory of fuzzy sets, has
provided a mathematical strength to capture the uncertainties associated with human cognitive processes,
such as thinking and reasoning. The conventional approaches to knowledge representation, lack the means
for representing the meaning of fuzzy concepts. As a consequence, the approaches based on classical logic
and probability theory, do not provide an appropriate conceptual framework for dealing with the representa-
tion of commonsense knowledge, since such knowledge is by its nature, both, lexically imprecise and
694 Digital Control and State Variable Methods
non-categorical. The development of fuzzy logic was motivated, in large measure, by the need for a concep-
tual framework which can address the issue of uncertainty and lexical imprecision. Fuzzy logic provides an
inference morphology, that enables approximate human reasoning capabilities to be applied to knowledge-
based systems.
Since the publication of Zadeh’s seminal work “Fuzzy Sets” in 1965, the subject has been the focus of
many independent research investigations by mathematicians, scientists and engineers from around the
world. Fuzzy logic has rapidly become one of the most successful of technologies today, for developing
sophisticated control systems. With its aid, complex requirements may be implemented in amazingly simple,
easily maintained and inexpensive controllers. Of course, fuzzy logic is not the best approach for every
control problem. As designers look at its power and expressiveness, they must decide where to apply it.
The criteria, in order of relevance, as to when and where to apply fuzzy logic are as follows:
· Human (structured) knowledge is available.
· A mathematical model is unknown or impossible.
· The process is substantially nonlinear.
· There is lack of precise sensor information.
· It is applied at the higher levels of hierarchical control systems.
· It is applied in generic decision-making problems
Possible difficulties in applying fuzzy logic, arise from the following:
· Knowledge is subjective.
· For high-dimensional inputs, the increase in the required number of rules is exponential.
· Knowledge must be structured, but experts bounce between a few extreme poles: they have trouble
structuring the knowledge; they are too aware of their “expertise”; they tend to hide knowledge; and
there may be some other subjective factors working against the whole process of human knowledge
transfer.
Note that the basic premise of fuzzy logic is that a human solution is good. When applied, for example, in
control systems, this premise means that a human being is a good controller. Today, after several thousands
successful applications, there is more or less convergence on trustworthiness of this premise.
The word ‘fuzzy’ may sound to mean intrinsically imprecise, but there is nothing ‘fuzzy’ about fuzzy
logic. It is firmly based on multivalued logic theory and does not violate any well-proven laws of logic. Also
fuzzy logic systems can produce answers to any required degree of accuracy. This means that these models
can be very precise if needed (There is a trade-off between precision and cost). However, they are aimed at
handling imprecise and approximate concepts that cannot be processed by any other known modelling tool.
In this sense, fuzzy logic models are invaluable supplements to classical hard computing techniques. For
example in a hierarchical control system, classical control at the lowest level, supplemented by fuzzy logic
control at higher levels provides good hybrid solution in many situations.
Our focus in this chapter is on the essential ideas and tools necessary for the construction of the fuzzy
knowledge-based models, that have been successful in the development of intelligent controllers. Fuzzy
control and modelling use only a small portion of the fuzzy mathematics that is available; this portion is also
mathematically quite simple and conceptually, easy to understand. This chapter begins with an introduction
to some essential concepts, terminology, notations and arithmetic of fuzzy sets and fuzzy logic. We include
only a minimum, though adequate, amount of fuzzy mathematics necessary for understanding fuzzy control
and modelling. To facilitate easy reading, this background material is presented in a rather informal manner,
with simple and clear notation as well as explanation. Whenever possible, excessively rigorous mathematics
is avoided. This material is intended to serve as an introductory foundation for the reader to understand not
only the fuzzy controllers presented later in this chapter but also others in the literature. We point to refer-
ences [137, 138, 142–145] as further sources on fuzzy set theory.
Fuzzy Logic Models 695
Up to this point we have only quantified, in an abstract way, the knowledge that the human expert has about
how to control the plant. Next, we will show how to use fuzzy logic to fully quantify the meaning of linguistic
descriptions so that we may automate in the fuzzy controller, the control rules specified by the expert.
mA =
RS0 ; x = x , x , x , x , x , x
5 6 7 8 9 10
T1 ; x = x , x , x , x
1 2 3 4
That is to say, the value mA(x) = 1 when the element x satisfies the attributes of set A; 0 when it does not.
mA is called the characteristic function of A.
Next, supposing that, within X, only x1 and x2 are below age 20; we may call them “minors”. Then
B = {x1, x2}
consists of minor team members. In this case
mB (x) =
RS1 ; x = x , x
1 2
T 0 ; otherwise
B is obviously a subset of A; we write B Ì A.
We have considered the “set of females A”, and the “set of minors B” in X. Is it also possible to consider
a “set of young females C”? If, for convenience, we consider the attribute “young” to be same as “minor”,
then C = B; but, in this case, we have created a sharp boundary, under which x2 who is 19 is still young
(mC (x2) = 1), but x3 who just turned 20 today is no longer young (mC (x3) = 0). In just one day, the value
changed from yes (1) to no (0), and x3 is now an old maid.
696 Digital Control and State Variable Methods
However, is it not possible that a young woman becomes an old maid over a period of 10 to 15 years, so
that we ought to be patient with her? Prof. Zadeh admitted values such as 0.8 and 0.9 that are intermediate
between 0 and 1, thus creating the concept of a “fuzzy set”. Whereas a crisp set is defined by the charac-
teristic function that can assume only the two values {0, 1}, a fuzzy set is defined by a “membership
function” that can assume an infinite number of values; any real number in the closed interval [0, 1].
With this definition, the concept of “young women” in X can be expressed flexibly in terms of member-
ship function (Fuzzy sets are denoted in this book by a set symbol with a tilde understrike).
μ C : X ® [0, 1]
~
such that
R|1; x = x1 , x 2
μ =S
C
| 0.9; x = x3
~
|| 0.2; x = x4
T 0; otherwise
The significance of such terms as “patient” and “ flexibly” in the above description may be explained as
follows. For example, we have taken μ C (x3) = 0.9, but suppose that x3 objects that “you are being unfair; I
~
really ought to be a 1 but if you insist we can compromise on 0.95”. There is a good amount of subjectivity
in the choice of membership values. A great deal of research is being done on the question of assignment of
membership values. However, even with this restriction, it has become possible to deal with many problems
that could not be handled with only crisp sets.
Since [0, 1] incorporates {0, 1}, the concept of fuzzy set can be considered as an extended concept, which
incorporates the concept of crisp set. For example, the crisp set B of ‘minors’ can be regarded as a fuzzy set
B with the membership function:
m B (x) =
RS
1; x = x1 , x 2
~
T
0; otherwise
Example 12.1 One of the most commonly used examples of a fuzzy set is the set of tall people. In this case,
the universe of discourse is potential heights (the real line), say, from 3 feet to 9 feet. If the set of tall people is
given the well-defined boundary of a crisp set, we might say all people taller than, 6 feet are officially consid-
ered tall. The characteristic function of the set A = {tall men} then, is
mA(x) =
RS
1 for 6 ≤ x
0 for 3 ≤ x < 6
T
Such a condition is expressed by a Venn diagram shown in Fig. 12.7a, and a characteristic function shown in
Fig. 12.8a.
Fig. 12.7
Fuzzy Logic Models 697
Fig. 12.8
For our example of universe X of heights of people, the crisp set A of all people with x ³ 6 has a sharp
boundary: individual, ‘a’ corresponding to x = 6 is a member of the crisp set A, and individual ‘b’ corre-
sponding to x = 5.9 is unambiguously not a member of set A. Is it not an absurd statement for the situation
under consideration? A 0.1" reduction in the height of a person has changed mA from 1 to 0, and the person
is no more tall.
It may make sense to consider the crisp set of all real numbers greater than 6 because the numbers belong
to an abstract plane, but when we want to talk about real people, it is unreasonable to call one person short
and another one tall, when they differ in height by the width of a hair. But if this kind of distinction is
unworkable, than what is the right way to define the set of all people? Much as with our example of “set of
young females”, the word ‘tall’ would correspond to a curve that defines the degree to which any person is
tall. Figure 12.8b shows a possible membership function of this fuzzy set ~ A; the curve defines the transition
from not tall to tall. Two people with membership values 0.9 and 0.3 are tall to some degree, but one
significantly less than the other.
Note that there is inherent subjectivity in fuzzy set description. Figure 12.9 shows a smoothly varying
curve (S-shaped) for transition from not tall to tall. Compared to Fig. 12.8b, the membership values are
lower for heights close to 3¢ and are higher for heights close to 6¢. This looks more reasonable; however, the
price paid is in terms of a more complex function, which is more difficult to handle.
A
0 x
3 6 9
Fig. 12.9 A smoothly varying membership function for fuzzy set A
~
698 Digital Control and State Variable Methods
Figure 12.7b shows the representation of a fuzzy set by a Venn diagram. In the central (unshaded) region
of the fuzzy set, μ ~A (x) = 1. Outside the boundary region of fuzzy set, μ ~A (x) = 0. On the boundary region,
μ A (x) assumes an intermediate value in the interval (0, 1). Presumably, the membership value of an x in
~
fuzzy set, ~A , approaches a value of 1 as it moves closer to the central (unshaded) region; it approaches a
value of 0 as it moves closer to leaving the boundary region of A .
Thus far we have discussed the representation of knowledge in logic. We have seen that the concept of
fuzzy sets makes it possible to describe vague information (knowledge). But description alone will not lead
to the development of any useful products. Indeed, a good deal of time passed after fuzzy sets were first
proposed, until they were applied at the industrial level. However, eventually it became possible to apply
them in the form of “fuzzy inference”, and fuzzy logic theory has now become legitimized as one component
of applied high technology.
In fuzzy logic theory, nothing is done at random or haphazardly. Information containing a certain amount
of vagueness is expressed as faithfully as possible, without the distortion produced by forcing it into a
“crisp” mould, and it is then processed by applying an appropriate rule of inference.
‘Approximate reasoning’ is the best known form of fuzzy logic processing and covers a variety of infer-
ence rules.
Fuzziness is often confused with probability. The fundamental difference between them is that fuzziness
deals with deterministic plausibility, while probability concerns the likelihood of non-deterministic
(stochastic) events. Fuzziness is one aspect of uncertainty. It is the ambiguity (vagueness) found in the
definition of a concept, or the meaning of a term. However, the uncertainty of probability generally relates to
the occurrence of phenomena, not the vagueness of phenomena. For example “There is a 50–50 chance that
he will be there” has the uncertainty of randomness. “He is a young man”, has the uncertainty in definition of
“young man”. Thus, fuzziness describes the ambiguity of an event, whereas randomness describes the uncer-
tainty in the occurrence of an event.
We can now give a formal definition to fuzzy sets.
~A = {( x, μ A ( x)) | x ∈ X , μ A ( x) ∈ [0,1]}
~ ~
(12.8b)
A membership value of zero implies that the corresponding element is definitely not an element of the
fuzzy set ~
A . A membership function of unity means that the corresponding element is definitely an element
of fuzzy set ~A . A grade of membership greater than zero, and less than unity, corresponds to a noncrisp (or
fuzzy) membership of the fuzzy set A . Classical sets can be considered as special case of fuzzy sets with all
membership grades equal to unity.
A fuzzy set A is formally given by its membership function μ ~A (x). We will identify any fuzzy set with its
membership function, and use these two terms interchangeably.
Fuzzy Logic Models 699
Membership functions characterize the fuzziness in a fuzzy set. However, the shape of the membership
functions, used to describe the fuzziness, has very few restrictions indeed. It might be claimed that the rules
used to describe fuzziness are also fuzzy. Just as there are an infinite number of ways to characterize
fuzziness, there are an infinite number of ways to graphically depict the membership functions that describe
fuzziness. Although the selection of membership functions is subjective, it cannot be arbitrary; it should be
plausible.
To avoid unjustified complications, μ ~A (x) is usually constructed without a high degree of precision. It is
advantageous to deal with membership functions involving a small number of parameters. Indeed, one of
the key issues in the theory and practice of fuzzy sets is how to define the proper membership functions.
Primary approaches include (1) asking the control expert to define them; (2) using data from the system to be
controlled, to generate them; and (3) making them in a trial-and-error manner. In more than 25 years of
practice, it has been found that the third approach, though adhoc, works effectively and efficiently in many
real-world applications.
Numerous applications in control have shown that only four types of membership functions are needed
in most circumstances: trapezoidal, triangular (a special case of trapezoidal), Gaussian, and bell-shaped.
Figure 12.10 shows an example of each type. Among the four, the first two are more widely used. All these
fuzzy sets are continuous, normal and convex.
A fuzzy set is said to be continuous if its membership function is continuous.
A fuzzy set is said to be normal if its height is one (The largest membership value of a fuzzy set is called
the height of the fuzzy set).
The convexity property of fuzzy sets is viewed as a generalization of the classical concept of crisp sets.
Consider the universe X to be a set of real numbers ℜ. A subset A of ℜ is said to be convex if, and only if, for
all x1, x2 Î A and for every real number l satisfying 0 £ l £ 1, we have
lx1 + (1 – l)x2 Î A (12.9)
(x) (x)
1 1
0 x 0 x
(a) (b)
(x) (x)
1 1
0 x 0 x
(c) (d)
Fig. 12.10 Examples of fuzzy sets; (a) trapezoidal, (b) triangular (c) Gaussian, and (d) bell-shaped
It can easily be established that any set defined by a single interval of real numbers is convex; any set
defined by more than one interval, that does not contain some points between the intervals, is not convex.
700 Digital Control and State Variable Methods
An alpha-cut of a fuzzy set A is a crisp set Aa that contains all the elements of the universal set X that have
~
a membership grade in A greater than or equal to a (refer Fig. 12.11). The convexity property of fuzzy sets
~
is viewed as a generalization of the classical concept of convexity of crisp sets. In order to make the gener-
alized convexity consistent with the classical definition of convexity, it is required that a-cuts of a convex
fuzzy set be convex for all a Î (0, 1] in the classical sense (0-cut is excluded here since it is always equal to
ℜ in this sense and thus includes – ¥ to + ¥). Figure 12.11a shows a fuzzy set that is convex. Two of the
a-cuts shown in this figure are clearly convex in the classical sense, and it is easy to see that any other a-cuts
for a > 0 are convex as well. Figure 12.11b illustrates a fuzzy set that is not convex. The lack of convexity
of this fuzzy set can be demonstrated by identifying some of its a-cuts (a > 0) that are not convex.
(x) (x)
~A
~A
1 1
x
A 2
x
A 1 A
(a) (b)
Fig. 12.11 (a) Convex fuzzy set (b) Nonconvex fuzzy set
A is the crisp set of all x Î X such that μ ~A (x) > 0. That is
The support of a fuzzy set ~
supp( A ) = {x ∈ X | μ A ( x) > 0} (12.10)
~ ~
The element x Î X at which μ ~A (x) = 0.5, is called the crosspoint.
A whose support is a single point in X with μ ~A (x) = 1, is referred to as a fuzzy singleton.
A fuzzy set ~
Example 12.2 Consider the fuzzy set described by membership function depicted in Fig. 12.12, where
the universe of discourse is
X = [32ºF, 104ºF]
x
32°F 64° 70° 74° 78° 104°
Fig. 12.12 A fuzzy set: linguistic warm
Fuzzy Logic Models 701
This fuzzy set ~
A is linguistic ‘warm’, with membership function
R| 0 ; x < 64º
( x - 64º ) / 6 ; 64º £ x < 70 º
μA (x) = S
| 1 ; 70 º < x £ 74º
~
|| (78º - x)/ 4 ; 74 < x £ 78º
|T 0 ; x > 78º
The support of A is the crisp set
~
kx | 64º < x < 78ºp
Example 12.3 Consider a natural language form expression:
“Speed sensor output is very large”
The formal, symbolic translation of this natural language expression, in terms of linguistic variables,
proceeds as follows:
(i) An abbreviation ‘Speed’ may be chosen to denote the physical variable “Speed sensor output”.
(ii) An abbreviation ‘XFast’ (i.e., extra fast) may be chosen to denote the particular value “very large” of speed.
(iii) The above natural language expression is rewritten as “Speed is XFast”.
Such an expression is an atomic fuzzy proposition. The ‘meaning’ of the atomic proposition is
then defined by a fuzzy set XFast , or a membership function m XFast (x), defined on the physical domain
~ ~
X = [0 mph, 100 mph] of the physical variable ‘Speed’.
Many atomic propositions may be associated with a linguistic variable, e.g.,
“Speed is Fast”
“Speed is Moderate”
“Speed is Slow”
“Speed is XSlow”
Thus, the set of linguistic values that the linguistic variable ‘Speed’ may take is
{XFast, Fast, Moderate, Slow, XSlow}
These linguistic values are called terms of the linguistic variable. Each term is defined by an appropriate
membership function.
It is usual in approximate reasoning to have the following frame associated with the notion of a linguistic
variable:
Example 12.4 Consider speed, interpreted as a linguistic variable with X = [0mph, 100mph]; i.e., x =
‘speed’. Its term set could be
{Slow, Moderate, Fast}
702 Digital Control and State Variable Methods
Slow = the fuzzy set for “a speed below about 40 miles per hour (mph)”, with membership function μSlow
~ ~
Moderate = the fuzzy set for “a speed close to 55 mph”, with membership function μModerate .
~ ~
Fast = the fuzzy set for “a speed above about 70 mph”, with membership function μ Fast .
~ ~
The frame of speed is
Speed
~
, LSpeed
~
, X , μLSpeed
~
where
L Speed = {Slow ,
~ Moderate
~
, Fast
~
}
~
X = [0, 100] mph
mSlow , mModerate , mFast are given in Fig. 12.13.
~ ~ ~
The frame of speed helps us to decide the degree
to which an atomic proposition associated with
Slow Moderate Fast ‘speed’ is satisfied, given a specific physical value
1
of speed. For example, for crisp input
Speed = 50 mph,
mSlow (50) = 1/3
0.5 ~
mModerate (50) = 2/3
~
m Fast (50) = 0
~
0 Therefore, the proposition “Speed is Slow” is satis-
40 55 70 x fied to a degree of 1/3, the proposition “Speed is
Fig. 12.13 Terms of linguistic variable speed Moderate” is satisfied to a degree of 2/3, and the
proposition “Speed is Fast” is not satisfied.
An extension of ordinary fuzzy sets is to allow the membership values to be a fuzzy set—instead of a
crisply defined degree. A fuzzy set whose membership function is itself a fuzzy set, is called a type-2 fuzzy
set [143]. A type-1 fuzzy set is an ordinary fuzzy set. We will limit our discussion to type-1 fuzzy sets. The
reference to a fuzzy set in this chapter, implies a type-1 fuzzy set.
Example 12.5 Consider an example of fuzzy sets: the set of people with normal weight. In this case, the
universe of discourse appears to be all potential weights (the real line). However, the knowledge representa-
tion in terms of this universe, is not useful. The normal weight of a person is a function of his/her height.
Weight. kg
Body Mass Index (BMI) =
(Height, m) 2
Normal BMI for males is 20–25, and for females is 19–24. Values between 25 to 27 in men and 24 to 27 in
women indicate overweight; and those over 27 indicate obesity. Of course, values below 20 for man and
below 19 for women indicate underweight.
The universe of discourse for this fuzzy set is more appropriately the Cartesian product of two universal
sets: X, the set of all potential heights, and Y, the set of all potential weights. The Cartesian product space
X ´ Y is a universal set which is a set of ordered pairs (x, y), for each x Î X and each y Î Y.
A subset of the Cartesian product X ´ Y, satisfying the knowledge attribute “normal weight” is a set of
(height, weight) pairs. This is called a relation R~ . The membership value for each element of R ~ depends on
704 Digital Control and State Variable Methods
BMI. For men, a BMI of 27 and more could be given a membership value of 0, and a BMI of less than 18 could
also be given a membership value of 0; and membership value between 0 and 1 for BMI between 18 and 27.
Example 12.6 Because fuzzy relations, in general, are fuzzy sets, we can define the Cartesian product to
be a relation between two or more fuzzy sets. Let ~ A be a fuzzy set on universe X, and ~ B be a fuzzy set on
universe Y; then the Cartesian product between fuzzy sets ~A and ~ R , which is
B will result in a fuzzy relation ~
contained within the full Cartesian product space, or
A× B
~ Ì X ´Y
~ ~ =R (12.19a)
where the fuzzy relation ~ R has membership function
μR ( x, y) = μ A × B (x, y) = min [ μ A ( x), μ B ( y)] " x Î X, " y Î Y (12.19b)
~ ~ ~ ~ ~
Note that the min combination applies here because each element (x, y), in the Cartesian product, is
formed by taking both elements x, y together, not just the one or the other.
As an example of the Cartesian product of fuzzy sets, we consider premise quantification. Atomic fuzzy
propositions do not, usually, make a knowledge base in real-life situations. Many propositions connected by
logical connectives may be needed. A set of such compound propositions, connected by IF-THEN rules,
makes a knowledge base.
Consider two propositions defined by
p =D x is A
D y is B
~
q =
~
where A and B are the fuzzy sets:
~ ~
⎧
( )
~A = ⎨ x, μ~A ( x) x ∈ X ⎬
⎩
⎫
⎭
⎧
( )
~ = ⎨⎩ y, μ~B ( y) y ∈Y ⎬⎭
B
⎫
The meaning of the linguistic terms “x is ~ A ”, and “y is B ~” is quantified via the membership functions μ~A ( x)
and mB ( y ), respectively. Now, we seek to quantify the linguistic premise “x is A and y is ~ B ” of the rule:
~ ~
A B (x, y)
IF x is A and y is ~ B THEN z is C (12.20a)
~ ~
The main item to focus on is, how to quantify the
B logical and operation that combines the meaning of
two linguistic terms. As said earlier, there are actually
several ways (t-norms) to define this quantification.
In the following, we use min operation:
y μ premise ( x , y ) = min [ μ A ( x), μ B ( y)] "x Î X , "y Î Y
A ~ ~
(12.20b)
Does this quantification make sense? Notice
A B
that this way of quantifying the and operation in the
premise, indicates that you can be no more certain
about the conjunction of two statements, than you are
about the individual terms that make them up.
The conjunction operator (logical connective
and), implemented as Cartesian product, is described
in Fig. 12.14.
x
Fig. 12.14 The conjunction operator implemented μ premise ( x , y ) = μ ~A × ~B (x, y) = min [ μ ~A ( x), μ B~ ( y )]
as Cartesian product "x Î X , "y Î Y (12.20c)
Fuzzy Logic Models 705
Example 12.7 We consider here quantification of “implication” operator via fuzzy logic. Consider the
implication statement
IF pressure is high THEN volume is small
The membership function of the fuzzy set ~
A = “big pressure”,
R|
1 ; x ³ 5
μ A ( x) = 1 - (5 - x )/4 ; 1 £ x £ 5
S|
~
T
0 ; otherwise
is shown in Fig. 12.15a. The membership function of the fuzzy set B = “small volume”,
~
R| 1 ; y £1
μ ( y ) = S1 - ( y - 1) /4 ; 1 £ y £ 5
B
~
|T 0 ; otherwise
is shown in Fig. 12.15b.
A B
1 1
0 0
1 5 x 1 5 y
(a) “x is big pressure” (b) “y is small volume”
Fig. 12.15
If p is a proposition of the form “x is A ” where A is a fuzzy set on the universe X, e.g., “big pressure”, and
~ ~
q is a proposition of the form “y is ~
B ” where ~ B is a fuzzy set on the universe Y, e.g., “small volume”, then one
encounters the following problem:
How does one define the membership function of the fuzzy implication ~ A®~ B?
There are different important classes of fuzzy implication operators based on t-norm and t-conorm. In
many practical applications, one uses Mamdani’s implication operator to model causal relationship
between fuzzy variables:
μ A→ B ( x, y) = min [ μ A ( x), μ B ( y)] "x Î X , "y Î Y (12.21)
~ ~ ~ ~
The fuzzy implication A ® B is a fuzzy relation in the Cartesian product space X ´Y.
~ ~
Note that Mamdani’s implication operator gives a relation which is symmetric with respect to ~ A and ~B.
This is not intuitively satisfying, because “implication” is not a commutative operation. In practice, how-
ever, the method provides good, robust results. The justification for the use of the min operator to represent
the implication, is that we can be no more certain about our consequent than our premise.
706 Digital Control and State Variable Methods
Problems featuring uncertainty and ambiguity have been successfully addressed subconsciously by humans.
Humans can adapt to unfamiliar situations and they are able to gather information in an efficient manner and
discard irrelevant details. The information gathered need not be complete and precise, and could be general,
qualitative and vague, because humans can reason, infer and deduce new information and knowledge. They
can learn, perceive and improve their skills through experience.
How can humans reason about complex systems, when the complete description of such a system often
requires more detailed data than a human could ever hope to recognize simultaneously, and assimilate with
understanding? The answer is that humans have the capacity to reason approximately. In reasoning about a
complex system, humans reason approximately about its behaviour, thereby maintaining only a generic
understanding about the problem.
The fuzzy set theory has provided a mathematical strength to capture the uncertainties associated with
human congnitive processes, such as thinking and reasoning. Fuzzy logic provides an inference morphology
that enables approximate human reasoning capabilities to be applied to knowledge-based systems.
Fuzzy conditional, or fuzzy IF-THEN production rules are symbolically expressed as
N
l q
IF (premise i ) THEN (consequent i ) i = 1
Here N is the number of rules.
Two major types of fuzzy rules exist: Mamdani fuzzy rules, and Sugeno fuzzy rules.
Note that, in general, intersection is given by a t-norm, and projection by a t-conorm, resulting in many
definitions of composition operator. In our applications, we will mostly use min operator for t-norm and
max operator for t-conorm. Therefore, we have the following compositional rule of inference:
μ B′ (y) = max{min(μ A′ ( x), min(μ A ( x), μB ( y )))} (12.29)
~ x ~ ~ ~
This inference rule, based on max-min composition, uses Mamdani’s rule for implication operator.
A ¢ is fuzzy singleton, i.e.,
In control applications, as we shall see later, the fuzzy set ~
A (x)
B ( y)
B ( y)
A (x0)
y
x0 x
Fig. 12.17 Inference procedure for singleton fuzzy system
When the rule (12.20a) has a compound proposition in premise part, connected by logical connectives, then
m A in (12.31) is replaced by μ premise . For rules with AND’ed premise, one might use min or product t-norm
~
for calculating μ premise (we have used min in Eqn. (12.20b)); and for rules with OR’ed premise, we may use
max t-conorm for the calculation of μ premise. Of course, other t-norms and t-conorms are also premissible.
Singleton fuzzy system is most widely used because of its simplicity and lower computational require-
ments. However, this kind of fuzzy system may not always be adequate, especially in cases where noise is
present in the data. Nonsingleton fuzzy system becomes necessary to account for uncertainty in the data.
Figure 12.18 shows the basic configuration of a fuzzy logic controller (FLC), which comprises four princi-
pal components: a rule base, a decision-making logic, an input fuzzification interface, and an output defuzzi-
fication interface. The rule base holds a set of IF-THEN rules, that quantify the knowledge that human
experts have amassed about solving particular problems. It acts as a resource to the decision-making logic,
which makes successive decisions about which rules are most relevant to the current situation, and applies
the actions indicated by these rules. The input fuzzifier takes the crisp numeric inputs and, as its name
implies, converts them into the fuzzy form needed by the decision-making logic. At the output, the
defuzzification interface combines the conclusions reached by the decision-making logic and converts them
into crisp numeric values as control actions.
We will illustrate the FLC methodology, step by step, on a water-heating system.
Consider a simple water-heating system shown in Fig. 12.19. The water heater has a knob (HeatKnob) to
control the steam for circulation through the radiator. The higher the setting of the HeatKnob, the hotter the
water gets, with the value of ‘0’ indicating the steam supply is turned off, and the value of ‘10’ indicating the
maximum possible steam supply. There is a sensor (TempSense) in the outlet pipe to tell us the temperature
of the outflowing water, which varies from 0ºC to 125ºC. Another sensor (LevelSense) tells us the level of
the water in the tank, which varies from 0 (= empty) to 10 (= full). We assume that there is an automatic flow
control that determines how much cold water flows into the tank from the main water supply; whenever the
level of the tank gets below 4, the flow control turns ON, and turns OFF when the level of the water gets
above 9.5.
710 Digital Control and State Variable Methods
Control commands
F D
U Decision- E
making Control Process
Z F
Logic actions state/output
Z U
I Z
F Z
I I Process
C F
A I
T C
I A
O T
N Rule I
Base O
N
Steam 10
boiler
LevelSense
Radiator
0
0°C 125°C
TempSense
Steam
exhaust
Water outlet
Step One: Define Inputs and Outputs for the FLC Three fuzzy variables characterize the behaviour
of the water-heating system.
Input Variables: TempSense and LevelSense
Output Variable: HeatKnob
For x = outlet water temperature (linguistic variable TempSense), the universe of discourse is
X = [0ºC,125ºC]
For y = level of water in the tank (linguistic variable LevelSense), the universe of discourse is
Y = [0,10]
For z = HeatKnob setting (linguistic variable HeatKnob), the universe of discourse is
Z = [0,10]
Step Two: Define Frames for Fuzzy Variables The frame of TempSense is
where LTempSense
~ is the set of linguistic values that TempSense can take. We may use the following fuzzy
subsets to describe the linguistic values:
XSmall (XS); Small (S); Medium (M); Large (L); XLarge (XL)
i.e.,
LTempSense = {XSmall, Small, Medium, Large, XLarge}
~
712 Digital Control and State Variable Methods
The frame of LevelSense is
Table 12.2 Fuzzy variable ranges for LevelSense Table 12.3 Fuzzy variable ranges for HeatKnob
Crisp Input Range Fuzzy Variable Crisp Input Range Fuzzy Variable
0–2 XSmall 0–2 VeryLittle
1.5–4 Small 1.5–4 ALittle
3–7 Medium 3–7 AGoodAmount
6–8.5 Large 6–8.5 ALot
7.5–10 XLarge 7.5–10 AWholeLot
The following guidelines were kept in mind while determining range of fuzzy variables as related to the
crisp inputs.
(i) Symmetrically distribute the fuzzified values across the universe of discourse.
(ii) Use an odd number of fuzzy sets for each variable so that some set is assured to be in the middle. The
use of 5 to 7 sets is fairly typical.
(iii) Overlap adjacent sets (by 15% to 25%, typically).
Fuzzy Logic Models 713
Step Four: Create a Rule Base Now that we have the inputs and the outputs in terms of fuzzy variables,
we need only specify what actions to take, under what conditions; i.e., we need to construct a set of rules that
describe the operation of the FLC. These rules usually take the form of IF-THEN rules, and can be obtained
from a human expert (heuristics).
714 Digital Control and State Variable Methods
The rule-base matrix for our example is given in Table 12.4. Our heuristic guidelines, in determining this
matrix, are the following:
(i) When the temperature is low, the HeatKnob should be set higher than when the temperature is high.
(ii) When the volume of water is low, the HeatKnob does not need to be as high as when the volume of
water is high.
TempSense ® XS S M L XL
LevelSense
B
XS AGoodAmount ALittle VeryLittle
S ALot AGoodAmount VeryLittle VeryLittle
M AWholeLot ALot AGoodAmount VeryLittle
L AWholeLot ALot ALot ALittle
XL AWholeLot ALot ALot AGoodAmount
In FLCs we do not need to specify all the cells in the matrix. No entry signifies that no action is taken. For
example, in the column for TempSense = XLarge, no action is required since the temperature is already at or
above the target temperature.
Let us examine a couple of typical entries in the table: For LevelSense = Small, and TempSense = XSmall,
the output is HeatKnob = ALot. Now for the same temperature, as the water level rises, the setting on
HeatKnob should also rise—to compensate for the added volume of water. We can see that for LevelSense =
Large and TempSense = XSmall, the output HeatKnob = AWholeLot.
We can translate the table entries into IF-THEN rules. We give here a couple of rules.
· IF TempSense is Small and LevelSense is Small THEN set HeatKnob to ALot.
· IF TempSense is XSmall and LevelSense is Large THEN set HeatKnob to AWholeLot.
Step Five: Choose Scaling Gains for the Variables Using standard ideas from control engineering,
we have introduced gains Gi1 and Gi2 with the input variables, as shown in Fig. 12.20, and at the same time
we also put a gain Go between FLC and the plant. Change in the scaling gains, at the input and output of
FLC, can have a significant impact on the performance of the resulting control system, and hence they are
often convenient parameters for tuning.
First, let us consider the effect of input scaling gain Gi1. Note that we can actually achieve the same effect
as scaling via Gi1, by simply changing the labelling of the temperature axis for the membership function of
the input variable TempSense. The case when Gi1 = 1 corresponds to our original choice of the membership
functions in Fig. 12.21. The choice of Gi1 = 0.5 as the scaling gain for the FLC with these membership
functions, is equivalent to having the membership functions shown in Fig. 12.24 with Gi1 = 1. Thus, the
choice of a scaling gain Gi1 results in scaling the horizontal axis of the membership functions by 1/Gi1
(multiplication of each number on the horizontal axis of Fig. 12.21 by 1/0.5 produces Fig. 12.24; member-
ship functions are uniformly “spread out” by a factor of 1/0.5). Similar statements can be made about Gi2
(Fig. 12.25).
Fuzzy Logic Models 715
Figure 12.23 shows our choice of output membership functions with Go = 1. There is a proportional effect
between the scaling gain Go and the output membership functions as shown in Fig. 12.26 for Go = 2.
If, for the process under consideration, the effective universes of discourse for all inputs and output are
common, say, [0, 1], then we may say that the FLC is normalized. Clearly, scaling gains can be used to
normalize the given FLC. Denormalization of the output of such a FLC will yield the required control action.
Fig. 12.26 The effect of scaling gain Go on the spacing of the output membership functions
716 Digital Control and State Variable Methods
It is important to realize that the scaling gains are not the only parameters that can be tuned to improve the
performance of the fuzzy control system. Membership function shapes, positioning, and number and type of
rules are often the other parameters to tune.
We set Gi1 = Gi2 = Go = 1 for our design problem.
Step Six: Fuzzify Inputs to the FLC Fuzzy sets are used to quantify information in the rule base, and
the inference mechanism operates on fuzzy sets and produces fuzzy sets. Inputs to the FLC are the measured
output variables of the controlled process, which are crisp variables. And input to the controlled process
(control action) is required to be crisp. Therefore, we must specify how the fuzzy system will convert the
numeric (crisp) inputs to the FLC into fuzzy sets (a process called “fuzzification”). Also we must specify
how the fuzzy system will convert the fuzzy sets produced by inference mechanism into numeric (crisp)
FLC output (a process called “defuzzification”), which is the input to the controlled process.
Fuzzification can be defined as a mapping from an observed input space to fuzzy sets in a specified
universe of discourse. A natural and simple fuzzification approach is to convert a crisp measurement into a
fuzzy singleton within the specified universe of discourse. This approach is based on the assumption that the
observed data is crisp, and not corrupted by random noise.
To understand fuzzification, we consider an example. Assume that at a particular point in time,
LevelSense = 6.5 and TempSense = 65ºC. These are the crisp inputs directly from the sensors. Figures 12.21
and 12.22 show the membership functions for the input variables and indicate with vertical lines the meas-
ured values of LevelSense and TempSense. These vertical lines are, in fact, graphical representation of the
two fuzzy singletons obtained by the fuzzification process.
Step Seven: Determine which Rules Fire We see that with singleton fuzzification, combining the
fuzzy sets that were created by the fuzzification process to represent the inputs with the premise membership
functions for the rules, is particularly simple. It simply reduces to computing the membership values of the
input fuzzy sets for the given inputs.
From Fig. 12.21 we find that for input TempSense = 65ºC, μM (65) = 0.45, μ L (65) = 0.28, and all other
~ ~
membership functions are off (i.e., their values are zero). Therefore, the proposition “TempSense is
Medium” is satisfied to a degree of 0.45, the proposition “TempSense is Large” is satisfied to a degree of
0.28; all other atomic propositions associated with TempSense are not satisfied.
From Fig. 12.22 we find that for input LevelSense = 6.5, μM (6.5) = 0.25, μ L (6.5) = 0.38; all other
~ ~
membership functions are off.
We next form membership values of premises of all the rules. From the induced decision table (Table 12.5),
we observe that the rules that have the premise terms:
The reader should note that for different crisp measurements TempSense and LevelSense, there will be
different values of μ premise and, hence, different μ inference functions will be obtained.
Step Nine: Aggregate the Fuzzy Outputs Recommended by Each Rule In the previous step, we
noticed that the input to the inference process is the set of rules that fire; its output is the set of fuzzy sets that
represent the inference reached by all the rules that fire. We now combine all the recommendations of all the
rules to determine the control action. This is done by aggregating the inferred fuzzy sets. Aggregated fuzzy
set, obtained by drawing all the inferred fuzzy sets on one axis, is shown in Fig. 12.28. This fuzzy set
represents the desired control action.
agg (z)
z* = 4.66
1
z
1 2 3 4 5 6 7 8 9 10
Step Ten: Defuzzify the Aggregated Fuzzy Set to form Crisp Output from the FLC Defuzzification
is a mapping from a space of fuzzy control actions defined by fuzzy sets on an output universe of discourse, into
nonfuzzy (crisp) control actions. This process is necessary because crisp control action is required to actuate
the control.
There are many approaches to defuzzification. We will consider here the “Centre of Area” (COA)
method, which is known to yield superior results.
Fuzzy Logic Models 719
We may discretize the universe Z into q equal (or almost equal) subintervals by the points z1, z2, ..., zq – 1.
The crisp value z*, according to this method is
q −1
∑ zk μagg ( zk )
z* = k =1 (12.33)
q −1
∑ μagg ( zk )
k =1
From Fig. 12.28, we obtain
S zk magg = 1 × 0.25 + 1.5 × 0.25 + 2 × 0.28 + 3 × 0.28 + 4 × 0.25
+ 5 × 0.25 + 6 × 0.25 + 7 × 0.38 + 8 × 0.38 = 11.475
S magg = 0.25 + 0.25 + 0.28 + 0.28 + 0.25 + 0.25 + 0.25 + 0.38 + 0.38 = 2.57
Therefore
11475
.
z* = = 4.46
2.57
The physical interpretation of z* is that, if the area is cut of a thin piece of metal or wood, the centre of the
area will be the centre of gravity.
In fact, there is hardly any need of discretization of the universe for situations like the one shown in
Fig. 12.28; we can split up geometry into pieces and place a straight edge (centroid) through the figure to
have it perfectly balanced with equal area of the figure on either side. Analytical expression for z* is
The Mamdani architecture is widely used for capturing expert knowledge. It allows us to describe the exper-
tise in more intuitive, more human-like manner. On the other hand, the Sugeno architecture is by far the most
popular candidate for data-based fuzzy modelling.
Basically, a fuzzy model is a “Fuzzy Inference System (FIS)” composed of four principal components: a
fuzzification interface, a knowledge base, a decision-making logic, and a defuzzification interface. Figure 12.29
shows the basic configuration of FIS for data-based modelling.
Knowledge Base
Decision-making
Fuzzy logic Fuzzy
Fig. 12.29 Basic configuration of a fuzzy inference system
720 Digital Control and State Variable Methods
We consider here, a single-output FIS in the n-dimensional input space. Let us assume that the following
P input-output pairs are given as training data for constructing FIS model:
{x( p) , y( p ) p = 1, 2, K, P} (12.35)
T
where x = ⎡⎣ x1 x2 L xn ⎤⎦ is the input vector of pth input-output pair and y( p) is the corresponding
( p) ( p) ( p) ( p)
output.
The fuzzification interface performs a mapping that converts crisp values of input variables into fuzzy
singletons. A singleton is a fuzzy set with a membership function that is unity at a single particular point on
the universe of discourse (the numerical-data value), and zero everywhere else. Basically, a fuzzy singleton
is a precise value and hence no fuzziness is introduced by fuzzification in this case. This strategy, however,
has been widely used in fuzzy modelling applications because it is easily implemented.
There are two factors that determine a database (i) a fuzzy partition of an input space, and (ii) member-
ship functions of antecedent fuzzy sets. Assume that the domain interval of the ith input variable xi, is equally
divided into Ki fuzzy sets labeled A i1, A i2, ..., AiKi , for i = 1, 2, ..., n. Then the n-dimensional input space is
~ ~ ~
divided into K1 × K 2 × L × K n fuzzy partition spaces:
( A1 j1 , A2 j2 , K , Anjn ); j1 = 1, 2, ..., K1; ...; jn = 1, ..., Kn (12.36)
~ ~ ~
Though any type of membership functions (e.g., triangle-shaped, trapezoid-shaped, bell shaped, etc.) can
be used for fuzzy sets, we employ the symmetric triangle-shaped fuzzy sets, Ai ji, with the following member-
~
ship functions:
2 xi − c(i , ji )
m A i j ( xi ) @ μ i j ( xi ) = 1 − ; ji = 1, 2,K, Ki (12.37)
~ i
w( i, ji )
i ji(xi)
c(i , ji ) is the centre of the membership function, where the member-
1
ship grade is equal to 1, and w( i , ji ) denotes the width of the mem-
bership function (Fig.12.30).
By means of the input-output data, the range ⎡⎣ ximin , ximax ⎤⎦ of the
ith input variable is determined, where
c(i, ji) xi
w(i, ji) ximin = min xi( p ) , ximax = max xi( p ) (12.38a)
p ={1,KP} p ={1,KP}
Fig. 12.30 Parameters of a member- The centre position of each membership function with respect to
ship function the ith variable is determined by
c(i , ji ) = ximin + ( ji − 1) ⎡ ( ximax − ximin ) /( K i − 1) ⎤ ; c(i ,1) = ximin ; c(i ,K i ) = ximax (12.38b)
⎣ ⎦
To achieve sufficient overlap from one linguistic label to another, we take
w(i , ji ) = 2(c(i , ji +1) − c(i , ji ) ) (12.38c)
Figure 12.31 shows an example where the domain interval of x1 is divided into K1 = 5 fuzzy sets.
The rule base consists of a set of fuzzy IF-THEN rules in the form “IF a set of conditions are satisfied
THEN a set of consequences can be inferred”. Different types of consequent parts have been used in fuzzy
rules; the two commonly used fuzzy models are based on Mamdani’s approach and Sugeno’s approach. We
restrict our discussion to Sugeno architecture: the domain interval of y is represented by R linear functions,
giving rise to R fuzzy rules. All the rules corresponding to the possible combinations of the inputs are
implemented. The total number of rules R for an n-input system is : K1 ´ K2 ´ L ´ Kn.
Fuzzy Logic Models 721
ij1(x1)
1 ~A11 ~A12 ~A13 ~A14 ~A15
0
ximin ximax
Fig. 12.31 Fuzzy partition of an input space and membership functions of fuzzy sets
Given an input vector, x( p ) = ⎡ x1( p ) , x2( p ) ,K , xnp ⎤ , the degree of compatibility of x( p) to the rth fuzzy
⎣ ⎦
IF-THEN rule is the firing strength m (r) of the rule, and is given by (note that we have used product t-norm
operator on the premise part of the rule)
r p p p p
μ ( ) ( x ( ) ) = μ1 j1 ( x1( ) ) × μ 2 j2 ( x2( ) ) × L × μ njn ( xn( ) )
p (12.40)
= ∏ μ i ji ( xi( ) )
( i , ji )∈I r
where Ir is the set of all ~Ai ji associated with the premise part of rule r.
The main idea of the Sugeno architecture is that in each input fuzzy region A1 j1 × A2 j2 × L × Anjn of the
~ ~ ~
input domain, a local linear system is formed. The membership function μ ( r ) (x( p) ) of each region is a map
indicating the degree of the output of the associated linear system to the region. A simple defuzzification
procedure is to take the output of the system as the “fuzzy” combination of the outputs of local systems in all
regions:
R
∑ (a0(r ) + a1(r ) x1 + L + an(r ) xn ) μ (r )
y$ = r =1 (12.41a)
R
∑ μ (r )
r =1
722 Digital Control and State Variable Methods
R
= ∑ (a0(r ) + a1(r ) x1 + L + an(r ) xn ) μ (r ) (12.41b)
r =1
μ (r )
where μ (r) = R
(12.41c)
∑μ (r)
r =1
is the normalized firing strength of rule r; a ratio of firing strength of rule r, to the sum of the firing strengths
of all the rules.
Note that the output of the fuzzy model can be determined only if the parameters in rule consequents are
known. However, it is often difficult, or even impossible, to specify a rule consequent in a polynomial form.
Fortunately, it is not necessary to have any prior knowledge of rule consequent parameters for the Sugeno
fuzzy modelling approach to deal with a problem. These parameters can be determined using least- squares
estimation method as follows.
Given the values of the membership parameters and a training set of P input-output patterns {x( p ) , y ( p ) ;
p = 1, 2,K, P}, we can form P linear equations in terms of the consequent parameters.
y ( p ) = μ (1) ( x( p ) ) ⎡⎣ a0(1) + a1(1) x1( p ) + L + an(1) xn( p ) ⎤⎦ + μ (2) ( x ( p ) ) ⎡⎣ a0(2) + a1(2) x1( p ) + L + an(2) xn( p ) ⎤⎦ + L
Fuzzy logic and neural networks are natural complementary tools in building intelligent systems. While
neural networks are computational structures that perform well when dealing with raw data, fuzzy logic
deals with reasoning, using linguistic information acquired from domain experts. However, fuzzy systems
lack the ability to learn and cannot adjust themselves to a new environment. On the other hand, although
neural networks can learn, they are opaque to the user. The merger of a neural network with a fuzzy system
into one integrated system, therefore, offers a promising approach to building intelligent systems. Integrated
systems can combine the parallel computation and learning abilities of neural networks, with the human-like
knowledge representation and explanation abilities of fuzzy systems. As a result, neural networks become
more transparent, while fuzzy systems become capable of learning.
The structure of a neuro-fuzzy system is similar to a multilayer neural network. In general, a neuro- fuzzy
system has input terminals, output layer, and hidden layers that represent membership functions and fuzzy rules.
Roger Jang [142] proposed an integrated system that is functionally equivalent to a Sugeno fuzzy infer-
ence model. He called it an Adaptive Neuro-Fuzzy Inference System or ANFIS. Similar network structures
have also been proposed for Mamdani fuzzy inference model [137]. However, the Sugeno model is by for
the most popular candidate for data-based fuzzy modelling. Our brief presentation of the subject is, there-
fore, focused on ANFIS based on Sugeno fuzzy model.
12.6.1 ANFIS Architecture
Figure 12.32 shows the ANFIS architecture. For simplicity, we assume that the ANFIS has two inputs, x1 and
x2, and one output y. Each input is represented by two fuzzy sets, and the output by a first-order polynomial.
The ANFIS implements four rules:
Rule 1: IF x1 is ~A11 and x2 is ~A21 THEN y(1) = a(1) (1)
0 + a1 x1 + a 2 x2
(1)
(2) (2)
A22 THEN y = a 0 + a1 x1 + a2( 2) x2
( 2 )
Rule 2: IF x1 is ~A12 and x2 is ~
(12.46)
Rule 3: IF x1 is ~A12 and x2 is ~A21 THEN y(3) = a(3) ( 3)
0 + a1 x1 + a 2 x2
( 3)
(4) (4) ( 4 ) ( 4 )
Rule 4: IF x1 is ~A11 and x2 is ~A22 THEN y = a 0 + a1 x1 + a2 x2
where ~A11 and ~A12 are fuzzy sets on the universe of discourse, of input variable x1, A21 and A2 are fuzzy sets
~ ~
on the universe of discourse of input variable x2; a0(r ) , a1( r ) and a2(r ) is a set of parameters specified for rule r.
Let us now discuss the purpose of each layer in ANFIS of Fig. 12.32.
x1 x2
Layer 1 Layer 2 Layer 3 Layer 4 Layer 5
~A11 N 1
x1
y^
~A12 N 2
~A21 N 3
x2
~A22 N 4
where Ir is the set of all ~Ai ji associated with the premise part of rule r.
Layer 3 Every node in this layer is a fixed node labelled N. The rth node calculates the ratio of the rth
rule’s firing strength, to the sum of all rules’ firing strengths:
μ(r)
μ (r) = R
= Normalized firing strength of rule r (12.49)
∑μ (r)
r =1
Layer 4 Every node is this layer is an adaptive node, is connected to the respective normalization node in
the previous layer, and also receives inputs x1 and x2. It calculates the weighted consequent value of a given
rule as
yˆ ( r ) = μ ( r ) ⎡⎣ a0 + a1 x1 + a2 x2 ⎤⎦
(r ) (r ) (r )
(12.50)
where μ (r ) is the normalized firing strength from layer 3, and a0( r ) , a1( r ) and a2( r ) are the parameters of this
node. Parameters in this layer are referred to as consequent parameters.
Each node in layer 4 is a local linear model of the Sugeno fuzzy system; integration of outputs of all local
linear models yields global output.
Layer 5 The single node in this layer is a fixed mode labelled ∑ , which computes the overall output as the
summation of all incoming signals:
R
yˆ = ∑ ( a0( r ) + a1( r ) x1 + a2( r ) ) μ ( r ) ; R = 4 (12.51)
r =1
Fuzzy Logic Models 725
12.6.2 How does an ANFIS learn?
An ANFIS uses a hybrid learning algorithm that combines the least squares estimator and the gradient
descent method. First, initial activation functions are assigned to each membership neuron. The function
centres of the neurons connected to input xi, are set so that the domain of xi is divided equally, and the widths
are set to allow sufficient overlapping of the respective functions.
In an ANFIS training algorithm, each epoch is composed of a forward pass and a backward pass. In the
forward pass, a training set of input patterns (input vector x) is presented to the ANFIS, neurons outputs are
calculated on the layer-by-layer basis, and the rules consequent parameters are identified by the least squares
estimator. In the Sugeno fuzzy inference, an output y$ is a linear function. Thus, given the values of the
membership parameters and a training set of P input-output patterns, we can form P linear equations in terms
of the consequent parameters (refer Eqns (12.45)). Least- squares solution of these equations yields the
consequent parameters.
As soon as the rule consequent parameters are established, we can compute actual network output, y$ , and
determine the error
e = y − yˆ (12.52)
In the backward pass, the backpropagation algorithm in applied. The error signals are propagated back,
and the premise parameters are updated according to the chain rule.
The goal is to minimize the error function
E = 12 ( y − yˆ )2 (12.53)
The error at layer 5:
∂E
= ( y$ – y ) (12.54)
∂y$
Back propagating to layer 3 via layer 4 (refer Eqn. (12.51)),
∂E ∂E ∂yˆ ∂E ⎡ ( r )
= = (a + a1( r ) x1 + a2( r ) x2 )⎤
∂μ (r )
∂yˆ ∂μ ( r ) ∂yˆ ⎣ 0 ⎦ (12.55)
∂μi ji
= 2μi ji ( xi − c(i , ji ) ) 2 / w(3i , ji ) (12.57c)
∂w(i , ji )
Denoting the iteration index by k (refer Eqn. (11.39)),
∂E ( k )
c(i , j ) ( k + 1) = c(i , j ) ( k ) − η
i i
∂c(i , j ) ( k ) (12.58a)
i
∂E ( k )
w(i , j ) ( k + 1) = w(i , j ) ( k ) − η
i i
∂w(i , j ) ( k ) (12.58b)
i
A genetic algorithm (GA) uses the principles of evolution, natural selection and genetics from natural
biological systems in a computer algorithm to simulate evolution. Essentially, the genetic algorithm is an
optimization technique that performs a parallel, stochastic, but directed search to evolve the fittest popula-
tion. In this section, we will introduce the genetic algorithm and explain how it can be used for the design and
tuning of fuzzy systems.
12.7.1 Introduction
In the 1950s and 1960s, several computer scientists independently studied evolutionary systems, with the
idea that evolution could be used as an optimization tool for engineering problems. The idea, in all these
systems, was to evolve a population of candidate solutions to a given problem, using operators inspired by
natural genetic variation and natural selection.
Why use evolution as an inspiration for solving computational problems? To evolutionary computation
researchers, the mechanisms of evolution are well suited for some of the most pressing computational prob-
lems in many fields. Many computational problems require searching through a huge number of possibilities
for solutions. An example is the problem of searching for proteins, in which an algorithm is sought that will
search, among the vast number of possible amino acid sequences, for a protein with specified properties.
Such search problems can often benefit from an effective use of parallelism, in which many different
possibilities are explored simultaneously, in an efficient way. For example, in searching for proteins with
specified properties, rather than evaluate one amino acid sequence at a time, it would be much faster to
evaluate many, simultaneously. What is needed is, both computational parallelism and an intelligent strat-
egy, for choosing the next set of sequences to evaluate.
Fuzzy Logic Models 727
Biological evolution is an appealing source of inspiration for addressing such problems. Evolution is, in
effect, a method of searching among an enormous number of possibilities for “solutions”. In biology, the
enormous set of possibilities is the set of possible genetic sequences, and the desired “solutions” are highly
fit organisms—organisms well able to survive and reproduce in their environments. Of course, the fitness of
a biological organism depends on many factors—for example, how well it can weather the physical charac-
teristics of the environment, and how well it can compete with, or cooperate with, the other organisms
around it. The fitness criteria continually changes as creatures evolve; so evolution is searching a constantly
changing set of possibilities. Searching for solutions in the face of changing conditions is precisely what is
required for adaptive computer programs. Furthermore, evolution is a massively parallel search method:
rather than work on one species at a time, evolution tests and changes millions of species in parallel. Finally,
the “rules” of evolution are remarkably simple: species evolve by means of random variation (via mutation,
recombination and other parameters), followed by natural selection in which the fittest tend to survive and
reproduce, thus propagating their genetic material to future generations. Yet, these simple rules are thought
to be responsible, in large part, for the extraordinary variety and complexity we see in the biosphere.
Knowledge of biological terminology, though not necessary, may help better appreciation of genetic
algorithms. All living organisms consist of cells, and each cell contains the same set of one or more chromo-
somes—strings of DNA (deoxyribonucleic acid). A chromosome can be conceptually divided into genes—
functional blocks of DNA, each of which encodes a particular protein. Very roughly, one can think of a gene
as encoding a trait, such as eye colour. The different possible “settings” for a trait (e.g., blue, brown, hazel)
are called alleles. Each gene is located at a particular locus (position) on the chromosome.
Many organisms have multiple chromosomes in each cell. The complete collection of genetic material (all
chromosomes taken together) is called the organism’s genome. The term genotype refers to the particular set of
genes contained in a genome. The genotype gives rise, under foetus and later development, to the organism’s
phenotype—its physical and mental characteristics, such as eye colour, height, brain size and intelligence.
Organisms whose chromosomes are arrayed in pairs are called diploid; organisms whose chromosomes
are unpaired are called haploid. In nature, most sexually reproducing species are diploid, including human
beings. In diploid sexual reproduction, recombination (or crossover) occurs: in each parent, genes are ex-
changed between each pair of chromosomes to form a gemete (a single chromosome), and then gemetes from
the two parents pair up to create a full set of diploid chromosomes. In haploid sexual reproduction, genes are
exchanged between the two parents’ single-strand chromosomes. Offspring are subject to mutation, in which
single nucleotides (elementary bits of DNA) are changed from parent to offspring; mutation may cause the
chromosomes of children to be different from those of their biological parents. The fitness of an organism is
typically defined as the probability that the organism will live to reproduce (viability) or, as a function of the
number of offspring the organism has (fertility).
The basic idea of a genetic algorithm is very simple. The term chromosome typically refers to a candidate
solution to a problem, typically stored as strings of binary digits (1s and 0s) in the computer’s memory. The
‘genes’ are short blocks of adjacent bits that encode a particular element of the candidate solution (e.g., in
the context of multi-parameter function optimization, the bits encoding a particular parameter might be
considered to be a gene). An ‘allele’ in a bit string, is either 0 or 1. Crossover typically consists of exchang-
ing genetic material between two single-chromosome haploid parents. Mutation consists of flipping the bit
at a randomly-chosen locus.
Most applications of genetic algorithms employ haploid individuals, particularly, single-chromosome
individuals. The genotype of an individual, in a genetic algorithm using bit strings, is simply the configura-
tion of bits in that individual’s chromosome. Genetic algorithms with more complex representation,
including diploid and multiple chromosomes, and higher cardinality alphabets, have also been developed.
However, the binary case is both the simplest and the most general.
728 Digital Control and State Variable Methods
b 20
q2 = qmin2 + (qmax2 – qmin2) = – 2 + 6 (5 – (– 2)) = 0.22
2L - 1 2 -1
Fitness Function A fitness function takes a chromosome (binary string) as an input, and returns a number
that is a measure of the chromosome’s performance on the problem to be solved. Fitness function plays the
same role in GAs as the environment plays in natural evolution. The interaction of an individual with its
environment, provides a measure of fitness to reproduce. Similarly, the interaction of a chromosome with a
fitness function, provides a measure of fitness that the GA uses when carrying out reproduction. Genetic
algorithm is a maximization routine; the fitness function must be a non-negative figure of merit.
It is often necessary to map the underlying natural objective function to a fitness function form through
one or more mappings. If the optimization problem is to minimize cost function J (q ), where q denotes the
parameter set, then the following cost-to-fitness transformation may be used:
1
J(q ) = (12.61)
J (q) + ε
where e is a small positive number. Maximization of J can be achieved by minimization of J ; so the desired
effect is achieved.
Another way to define the fitness function is to let
J(q(k)) = – J (q(k)) + max J (q ( k ))
q( k )
m
(12.62) r
The minus sign in front of the J (q(k)) term turns the minimization problem into a maximization problem
m r
and max J (q ( k )) term is needed to shift the function up, so that J (q(k)) is always positive; k is the
q( k )
iteration index.
A fitness function can be any nonlinear, non-differentiable, discontinuous, positive function because the
algorithm only needs a fitness value assigned to each string.
For the problem in hand (fit a line through a given data set), let us choose a fitness function. Using
decoded values of q1 and q2 of a chromosome, and the four data values of x given in the data table, calculate
y$i = q1x + q2; i = 1, 2, 3, 4
$
These computed values of yi are compared with the correct values yi, given in the data table, and square
of errors in estimating the y’s is calculated for each string. The summation of the square of errors is sub-
tracted from a large number (400 in this problem) to convert the problem into a maximization problem:
∑ b y$i g 2
J(q) = 400 – – yi ; q = [q1 q2] (12.63)
i
The fitness value of the string (12.60) is calculated as follows:
q1 = –1.22, q2 = 0.22
For x = 1.0, y$1 = q1x + q2 = –1.00
For x = 2.0, y$2 = – 2.22
For x = 4.0, y$3 = – 4.66
For x = 6.0, y$4 = – 7.10
4
∑ b y$i g 2
J(q) = 400 – − yi = 131.586
i =1
Initialization of Population The basic element processed by a GA is the string formed by concatenating
substrings, each of which is a binary coding of a parameter of the search space. If there are N decision
variables in an optimization problem, and each decision variable is encoded as an n-digit binary number,
Fuzzy Logic Models 731
then a chromosome is a string of n ´ N binary digits. We start with a randomly selected initial population of
such chromosomes; each chromosome in the population represents a point in the search space, and hence, a
possible solution to the problem. Each string is then decoded to obtain its fitness value, which determines the
probability of the chromosome being acted on by genetic operators. The population then evolves, and a new
generation is created through the application of genetic operators (The total number of strings included in a
population, is kept unchanged throughout generations, for computational economy and efficiency). The new
generation is expected to perform better than the previous generation (better fitness values). The new set of
strings is again decoded and evaluated, and another generation is created using the basic genetic operators.
This process is continued until convergence is achieved within a population.
Let q j(k) be a single parameter in chromosome j of generation k. Chromosome j is composed of N of
these parameters:
q j(k) = [q 1j (k), q 2j (k), K, q Nj (k)] (12.64)
The population of chromosomes, in generation k:
n
P(k) = q j( k ) | j = 1, 2, K, S s (12.65)
where S represents the number of chromosomes in the population. We want to pick S to be big enough, so
that the population elements can cover the search space. However, we do not want S to be too big, since this
increases the number of computations we have to perform.
For the problem in hand, Table 12.7 gives an initial population of 4 strings, the corresponding decoded
values of q 1 and q 2, and the fitness value for each string.
Evolution occurs as we go from generation k to the next generation k + 1. Genetic operations of selection,
crossover and mutation are used to produce a new generation.
Selection Basically, according to Darwin, the most qualified (fittest) creatures survive to mate. Fitness is
determined by a creature’s ability to survive predators, pestilence, and other obstacles to adulthood and
subsequent reproduction. In our unabashedly artificial setting, we quantify “most qualified” via a chromo-
some’s fitness J(q j(k)). The fitness function is the final arbiter of the string-creature’s life or death. Selecting
strings according to their fitness values means that the strings with a higher value have a higher probability
of contributing one or more offspring in the next generation.
Selection is a process in which good-fit strings in the population are selected to form a mating pool, which
we denote by
M(k) = {m j(k) | j = 1, 2, ..., S} (12.66)
732 Digital Control and State Variable Methods
The mating pool is the set of chromosomes that are selected for mating. A chromosome is selected for
mating pool according to the probability proportional to its fitness value. The probability for selecting the ith
string is
pi =
e
J q i( k ) j (12.67)
S
∑ J eq ( k ) j
j
j =1
For the initial population of four strings in Table 12.7, the probability for selecting each string is calcu-
lated as follows:
131586
. 131586
.
p1 = = = 0.108
131586
. + 323.784 + 392.41 + 365 1212.8
323.784 392.41 365.00
p2 = = 0.267; p3 = = 0.324; p4 = = 0.301
1212.8 1212.8 1212.8
To clarify the meaning of the formula and, hence, the selection strategy, Goldberg [146] uses the analogy
of spinning a unit-circumference roulette wheel; the wheel is cut like a pie into S regions where the ith region
is associated with the ith element of P(k). Each pie-shaped region has a portion of the circumference that is
given by pi in Eqn. (12.67).
The roulette wheel for the problem in hand is shown in Fig. 12.33.
37.5 String 1 has solution probability of 0.108. As a result, string 1 is
given 10.8% slice of the roulette wheel. Similarly, string 2 is given
26.7%
26.7% slice, string 3 is given 32.4% slice and string 4 is given 30.1%
10.8 2 of the roulette wheel.
30.1% You spin the wheel, and if the pointer points at region i when the
10.8%
1 4 wheel stops, then you place q i into the mating pool M(k). You spin
0 the wheel S times, so that S strings end up in the mating pool.
100 32.4% Clearly, the strings which are more fit will end up with more copies
3 in the mating pool; hence, chromosomes with larger-than-average
fitness, will embody a greater portion of the next generation. At the
67.6 same time, due to the probabilistic nature of the selection process,
Fig. 12.33 Roulette Wheel it is possible that some relatively unfit strings may end up in the
mating pool.
For the problem in hand, the four spins might choose strings 3, 3, 4 and 2 as parents (String 1 also may be
selected in the process of roulette wheel spin; it is just the luck of the draw. If the roulette wheel were spun
many times, the average results would be closer to the expected values).
Reproduction Phase; Crossover We think of crossover as mating in biological terms, which, at the
fundamental biological level, involves the process of combining chromosomes. The crossover operation
operates on the mating pool M(k). First, specify the “crossover probability” pc (usually chosen to be near
one, since, when mating occurs in biological systems, genetic material is swapped between the parents).
The procedure for crossover consists of the following steps:
(i) Randomly pair off the strings in the mating pool M(k) (i.e., form pairs to mate by the flip of a coin). If
there are an odd number of strings in M(k), then, for instance, simply take the last string and pair it off
with another string which has already been paired off.
Fuzzy Logic Models 733
j i
(ii) Consider chromosome pair (q , q ) that was formed in step 1. Generate a random number r Î [0, 1].
(a) If r < pc, then crossover q j and q i. To crossover these chromosomes, select at random a “cross
site” and exchange all bits to the right of the cross site of one string, with those of the other. This
process is pictured in Fig. 12.34. In this example, the cross site is position four on the string, and
hence we swap the last eight bits between the two strings. Clearly, the cross site is a random
number between one and the number of bits in the string, minus one.
(b) If r > pc, then the crossover will not take place; hence, we do not modify the strings.
(iii) Repeat step 2 for each pair of strings that is in M(k).
Before crossover After crossover
0101 01 101010
? 0101 10 001100
0100 10 001100 0100 01 101010
A
Cross site
A
Cross sitè
For the problem in hand, Table 12.8 shows the power of crossover. The first column shows the four
strings selected for mating pool. We randomly pair off the strings. Suppose that random choice of mates has
selected the first string in the mating pool, to be mated with the fourth. With a cross site 4, the two strings
cross and yield two new strings as shown in Table 12.8. The remaining two strings in the mating pool are
crossed at site 9; the resulting strings are given in the table.
In nature, an offspring inherits genes from both the parents. The crossover process creates children strings
from the parent strings. The children strings thus produced, may or may not, have combination of good
substrings from parents strings, but we don’t worry about this too much, because if good strings are not
created by crossover, they will not survive too long because of the selection operator. If good strings are
created by crossover, there will be more copies of it in the next mating pool generated by the selection
operator.
Besides the fact that crossover helps to model the mating part of the evolution process, why should the
genetic algorithm perform crossover? Basically, the crossover operation perturbs the parameters near good
positions to try to find better solutions to the optimization problem. It tends to help perform a localized
734 Digital Control and State Variable Methods
search around the more fit strings (since, on average, the strings in the generation k mating pool are more fit
than the ones in the generation k population).
Reproduction Phase; Mutation Selection ac-
cording to fitness, combined with crossover, gives
Before mutation After mutation genetic algorithms the bulk of their processing
100100 001010 100100 101010 power. Mutation plays a secondary role in the
A A operation of GAs. Mutation is needed because,
Mutation site Mutation site occasionally, chromosomes may lose some poten-
tially useful genetic material. In artificial genetic
Fig. 12.35 Mutation operation example systems, mutation is realized by inverting a ran-
domly chosen bit in a string. This is illustrated in
Fig. 12.35.
Besides the fact that this helps to model mutation in a biological system, why should the genetic algorithm
perform mutation? Basically, it provides random excursions into new parts of the search space. It is possible
that we will get lucky and mutate to a good solution. It is the mechanism that tries to make sure that we do not
get stuck at a local maxima, and that we seek to explore other areas of the search space to help find a global
maximum for J(q). Usually, the mutation probability pm is chosen to be quite small (e.g., less than 0.01)
since this will help guarantee that all the strings in the mating pool are not mutated so that any search
progress that was made is lost (i.e., we keep it relatively low to avoid degradation to exhaustive search via a
random walk in the search space).
After mutation, we get a modified mating pool M(k). To form the next generation for the population, we let
P(k + 1) = M(k) (12.68)
where this M(k) is the one that was formed by selection and modified by crossover and mutation. Then the
above steps repeat, successive generations are produced, and we thereby model evolution (of course, it is a
very crude model).
Terminal Conditions While the biological evolutionary process continues, perhaps indefinitely, we
would like to terminate our artificial one and find the following:
· The population string—say, q *(k)—that best maximizes the fitness function. Notice that, to determine
this, we also need to know the generation number k where the most fit string existed (it is not necessar-
ily in the last generation). A computer code, implementing the genetic algorithm, keeps track of the
highest J value, and the generation number and string that achieved this value of J.
· The value of the fitness function J(q *(k)).
There is then the question of how to terminate the genetic algorithm. There are many ways to terminate a
genetic algorithm, many of them similar to termination conditions used for conventional optimization algo-
rithms. To introduce a few of these, let e > 0 be a small number and n1 > 0 and n2 > 0 be integers. Consider
the following options for terminating the GA:
· Stop the algorithm after generating the generation P(n1)—that is, after n1 generations.
· Stop the algorithm after at least n2 generations have occurred and, at least n1 steps have occurred when
the maximum (or average) value of J for all population members has increased by no more than e.
· Stop the algorithm once J takes on a value above some fixed value.
Fuzzy Logic Models 735
The above possibilities are easy to implement on a computer but, sometimes, you may want to watch the
parameters evolve and decide yourself when to stop the algorithm.
Working Parameters A set of parameters is predefined to guide the genetic algorithm, such as:
· the length of each decision variable encoded as a binary string,
· the number of chromosomes to be generated and operated in each generation, i.e., population size,
· the crossover probability pc,
· the mutation probability pm ,
· and the stopping criterion.
SJ 1754
Av. J 439
Max. J 729
Fuzzy Logic Models 737
The last operator, mutation, is performed on a bit-by-bit basis. We assume that the probability of muta-
tion in this test is 0.001. With 20 transferred bit positions, we should expect 20 ´ 0.001 = 0.02 bits to
undergo mutation during a given generation. Simulation of this process indicates that no bits undergo muta-
tion for this probability value. As a result, no bit positions are changed from 0 to 1, or vice versa, during this
generation.
Following selection, crossover and mutation, the new population is ready to be tested. To do this, we
simply decode the new strings created by the simple GA, and calculate the fitness function values from the q
values thus decoded. The results are shown in Table 12.10. While drawing concrete conclusions from a
single trial of a stochastic process is, at best, a risky business, we start to see how GAs combine high-
performance notions to achieve better performance. Both the maximal and average performance have
improved in the new population. The population average fitness has improved from 293 to 439 in one
generation. The maximum fitness has increased from 576 to 729 during that same period.
Review Examples
Review Example 12.1 We consider here the simplest fuzzy PI control scheme for a servo motor with
the control model (refer Fig. 12.36a)
Y ( s) 1
= G(s) = (12.70)
U ( s) s (s + 3.6)
The objective of the fuzzy controller is to control angular position y(t) of the servo motor to achieve a
given set-point yr, within desired accuracy.
The discretized model for the plant (refer Chapter 3) is
yr + Fuzzy y(t)
PI ZOH Plant
– T = 0.25 sec Controller
(a)
v(k) v* (k)
– 1
GV u* (k) u(k)
T F Inference
+
U Engine
Z
z–1 e* (k) Z GU
I
e(k) F Rule
Y Base
GE
(b)
Fig. 12.36 A structure for fuzzy controller
The scaling factors GE (gain for error variable), and GV (gain for velocity variable) describe input
normalization:
e*(k) = GE × e(k); GE = L / Le
v*(k) = GV × v(k); GV = L /Lv
where e*, v* Î {– L, L}
The output Du* of the fuzzy controller is denormalized to Du, by the relation
Du(k) = GU¢ ´ Du*(k); GU¢ = HDu /H
where Du* Î {– H, H}
Without loss of generality, we take L = H = 1 (refer Fig. 12.37).
The fuzzy PI controller uses the following four fuzzy rules:
IF e*(k) is P and v*(k) is P THEN Du*(k) is P
~ ~ ~
IF e*(k) is P and v*(k) is N THEN Du*(k) is Z
~ ~
IF e*(k) is N and v*(k) is P THEN Du*(k) is Z
~ ~
IF e*(k) is N and v*(k) is N THEN Du*(k) is N ~
The initial value of the system output and the initial velocity are set to zero, as is the initial output of the
fuzzy PI controller.
Fuzzy Logic Models 739
1
N P
Z
N 1 P
0.5
–1 0 1 e*, v* –1 0 1 u*
Fig. 12.37 Membership functions for input and output variables of the fuzzy controller
The scaling factors GE, GV and GU¢ of the fuzzy controller may be tuned by trial and error. Refer Appen-
dix B for realization of the controller.
Review Example 12.2 Although applied in many complex industrial processes, fuzzy logic-based expert
systems experience a deficiency in knowledge acquisition, and rely, to a great extent, on empirical and heuris-
tic knowledge which, in many cases, cannot be elicited objectively. Fuzziness describes event ambiguity. It
measures the degree to which an event occurs, not whether it occurs. Fuzzy controller design involves the
determination of the linguistic state space, definition of membership grades of each linguistic term, and the
derivation of the control rules. The information on the above aspects can be gathered by interviewing process
operators, process knowledge experts, and other sources of domain knowledge and theory.
The choice of a FLC depends more on the intuition of the designer, and its effectiveness depends on the
following parameters:
(i) Selection of rule set.
(ii) Number, shape and size of the membership functions of the input and output variables.
(iii) Value of the normalizing factors for the input variables to the FLC.
(iv) Value of the denormalizing factors for the output variables of the FLC.
Genetic Algorithm (GA) has a capability to guide in poorly understood, irregular spaces. In the
following, we illustrate the use of GA in designing a FLC for the thermal system described in Review
Example 11.2. We design FLC by tuning only the normalizing and denormalizing factors.
The proposed fuzzy controller has two input variables (Refer Figs 12.36):
e(k) – error between set-point and actual temperature of the tank,
v(k) – rate of change of error,
and one output variable:
Du(k) – incremental heat input to the tank.
The universe of discourse for all the three variables may be taken as [–1, 1]. Proposed membership
functions are shown in Fig. 12.38.
740 Digital Control and State Variable Methods
The selected rules are
Rate of
change of error® N NZ P
Error
B
N N N Z
NZ N Z P
P Z P P
The initial value of the system output is Y0. The initial velocity, and the initial output of the Fuzzy PI
controller are set to zero.
The scaling factors GE, GV and GU¢ of the fuzzy controller may be tuned using genetic algorithm. Refer
Appendix B for realization of the controller.
1
N NZ P
e*, v*
–1 –0.1 0.1 1
1
N Z P
u*
–1 0 1
Fig. 12.38 Membership functions for the input and output variables of the fuzzy controller
Problems
12.1 (a) In the following, we suggest a membership function for fuzzy description of the set “real numbers close to 2”:
A μ
~ = {x, ~A ( x)}
Fuzzy Logic Models 741
where
R| 0 2
; x <1
m (x) = S− x + 4x − 3 ; 1 ≤ x ≤ 3
~A
|T 0 ; x > 3
Sketch the membership function (arc of a parabola) and determine its supporting interval, and a-cut interval for
a = 0.5.
(b) Sketch the piecewise-quadratic membership function
R|
2( x - 1)2 ; 1 £ x < 3 /2
2
m B(x) =
|S
1 - 2( x - 2) ; 3 / 2 £ x < 5 /2
~ 2( x - 3)2
|| ; 5/2 £ x £ 3
T 0 ; otherwise
and show that it also represents “real number close to 2”. Determine its support, and a-cut for a = 0.5.
12.2 (a) The well known Gaussian distribution in probability is defined by
2
1 - F
1 x- m I
f (x) = e 2 s
H K ;–¥<x<¥
s 2p
where m is the mean and s is the standard deviation of the distribution. Construct a normal, convex membership
function from this distribution (select parameters m and s) that represents “real numbers close to 2”. Find its
support, and a-cut for a = 0.5. Show that the membership function
1
m A (x) =
1 + ( x - 2 )2
~
also represents “real numbers close to 2”. Find its support, and a-cut for a = 0.5.
12.3 Consider the piecewise-quadratic function
R| 0 ; x < a
x-a 2
2|| FH IK
b-a
;a £ x < a+b
2
f(x) = S| F I
x-b 2 ; a+b £ x < b
1- 2
|| H K
b-a 2
; b£ x <c
T1
Construct a normal, convex membership function from f (x) (select parameters a, b and c) that represents the set
“tall men” on the universe {3, 9}. Determine the crosspoints and support of the membership function.
12.4 (a) Write an analytical expression for the membership function m A(x) with supporting interval [–1, 9] and a-
~
cut interval for a = 1 given as [4, 5].
(b) Define what we mean by a normal membership function and a convex membership function. Is the function
described in (a) above (i) normal, (ii) convex?
12.5 (a) Let the fuzzy set A be the linguistic ‘warm’ with membership function
~
R| 0
x - a1
; x < a1
||
b1 - a1 ; a1 £ x £ b1
m A (x) = S|1 ; b1 £ x £ b2
~ x - a2
; b2 £ x £ a2
||
b2 - a2
; x ³ a2
T
0
a1 = 64ºF, b1 = 70ºF, b2 = 74ºF, a2 = 78ºF
A a normal fuzzy set?
(i) Is ~
(ii) Is A a convex fuzzy set?
A a singleton fuzzy set?
(iii) Is ~
742 Digital Control and State Variable Methods
If answer to one or more to these is ‘no’, then give an example of such a set.
(b) For fuzzy set A described in part (a), assume that b1 = b2 = 72ºF.
~
Sketch the resulting membership function and determine its support, crosspoints and a-cuts for a = 0.2 and 0.4.
12.6 Consider two fuzzy sets A and B; membership functions m A(x) and m B(x) are shown in Fig. P12.6. The fuzzy
~ ~ ~ ~
variable x is temperature.
Sketch the graph of m A(x), m A Ç B (x) and m A È B (x).
~ ~ ~ ~ ~
Which t-norm and t-conorm have you used?
A (x) B (x)
1 1
0 0
15 °C x 10 °C 20 °C x
Fig. P12.6
12.7 Consider the fuzzy relation R on the universe X ´ Y, given by the membership function
~
1
m R (x, y) = ,
~ [1 + 100( x − 3y ) 4 ]
vaguely representing the crisp relation x = 3y. All elements satisfying x = 3y have unity grade of membership;
elements satisfying, for example, x = 3.1y have membership grades less than 1. The farther away the elements
are from the straight line, the lower are the membership grades.
Give a graphical representation of the fuzzy relation R .
~
12.8 Assume the membership function of the fuzzy set ~ A, big pressure, is
R| 51 - x
; x ³ 5
~
m A (x) = S| 1 - 4
;1£ x £ 5
T 0 ; otherwise
Assume the membership function of the fuzzy set B , small volume, is
~
R| 1y - 1 ; y£ 1
m (y) = S 1 -
B
;1£ y£ 5
~ |T 0 4 ; otherwise
Find the truth values of the following propositions:
(i) 4 is big pressure,
(ii) 3 is small volume,
(iii) 4 is big pressure and 3 is small volume,
(iv) 4 is big pressure ® 3 is small volume.
Explain the conjunction and implication operations you have used for this purpose.
12.9 Consider the following statements:
Input : A′ is very small
~
Rule : IF A′ is small THEN B′
~ is large
~
Inference : B′ is very large
~
Fuzzy Logic Models 743
If R A′
~ is a fuzzy relation from X to Y representing the implication rule, and ~ is a fuzzy subset of X, then the
fuzzy subset B¢ of Y, which is induced by A′ , is given by
~ ~
B¢ = ~ A′ o R
~ ~
where o operation (composition) is carried out by taking cylindrical extension of A¢ , taking the intersection with
~
R , and projecting the result onto Y.
~
Define cylindrical extension, intersection and projection operations that lead to max-min compositional rule of
inference.
12.10 Input : x is A′ and y is B¢
~ ~
Rule 1 : IF x is A1 and y is B1 THEN z is C1
~ ~ ~
Rule 2 : IF x is A2 and y is B2 THEN z is C2
~ ~ ~
Inference : ~¢
z is C
Taking arbitrary membership functions for A1, B1, C1, A2 , B2 and C2 , outline the procedure of determining C ¢
~ ~ ~ ~ ~ ~ ~
corresponding to the crisp inputs x = x0 and y = y0. Use t-norm ‘min’ for conjunction operation, Mamdani’s
implication operation and max-min compositional rule of inference.
12.11 Fig. P12.11 shows the fuzzy output of a certain control problem. Defuzzify by using the centre of area method,
to obtain the value of crisp control action.
Fig. P12.11
12.12 Consider the fuzzy system concerning the terminal voltage and speed of an electric motor, described by the
membership functions
x 100 150 200 250 300
m A(x) 1 0.8 0.5 0.2 0.1
~
y 1600 1800 2000 2200 2400
m B (y) 1 0.9 0.7 0.3 0
~
Assume that the input fuzzy set A¢ is a singleton at x0 = 125. Determine the inference fuzzy set B¢ of the fuzzy
~ ~
system. Defuzzify this set to obtain crisp value for speed.
Use piecewise continuous approximations of graphs of mA(x) and m B (y) to describe your solution.
~ ~
12.13 Consider the two-input, one output fuzzy system:
Input : x is A¢ and y is B¢
~ ~
Rule 1 : IF x is A1 and y is B1 THEN z is C1
~ ~ ~
Rule 2 : IF x is A2 and y is B2 THEN z is C2
~ ~ ~
Inference : z is C ¢
~
The fuzzy sets Ai , Bi and Ci ; i = 1, 2, have the membership functions
~ ~ ~
R| x - 2 ; 2£ x £ 5
R| x - 3 ; 3£ x £6
m (x) = S 8 -3 x
A1 m (x) = S 9 -3 x
A2
~ ~
|T 3 ; 5£ x £8 |T 3 ; 6£ x £ 9
R| y - 5 ; 5£ y£8
R| y - 4 ; 4 £ y£ 7
m (y) = S 11 3- y
B1 m (y) = S 10 3- y
B2
~ ~
|T 3 ; 8 £ y £ 11 |T 3 ; 7 £ y £ 10
R| z - 1 ; 1£ z £ 4
R| z - 3 ;3£ z £ 6
m (z) = S 7 3- z
C1 m (z) = S 9 -3 z
C2
~ |T 3 ; 4£ z £ 7 ~ |T 3 ;6£ z £ 9
Assume fuzzy sets ~ A¢ and B¢ are singletons at x0 = 4 and y0 = 8. Determine the inference fuzzy set C¢ of the
~ ~
fuzzy system. Defuzzify C ¢.
~
12.14 The control objective is to design an automatic braking system for motor cars. We need two analog signals:
vehicle speed (V), and a measure of distance (D) from the vehicle in the front. A fuzzy logic control system will
process these, giving a single output, braking force (B), which controls the brakes.
Term set for each of the variables (V, D, and B) is of the form:
{PS (positive small), PM (positive medium), PL (positive large)}
Membership functions for each term-set are given in Fig. P12.14.
Suppose that for the control problem, two rules have to be fired:
Rule 1: IF D = PS and V = PM THEN B = PL
Rule 2: IF D = PM and V = PL THEN B = PM
For the sensor readings of V = 55 km/hr, and D = 27 m from the car in front, find graphically
(i) the firing strengths of the two rules,
(ii) the aggregated output, and
(iii) defuzzified control action.
12.15 The control objective is to automate the wash time when using a washing machine. Experts select for inputs dirt
and grease of the clothes to be washed, and for output parameter the wash time, as follows:
Dirt =D {SD (small dirt), MD (medium dirt), LD (large dirt)}
Grease =D {NG (no grease), MG (medium grease), LG (large grease)}
Washtime =D {VS (very short), S (short), M (medium), L (long), VL (very long)}
Fuzzy Logic Models 745
Fig. P12.14
The degrees of the dirt and grease are measured on a scale from 0 to 100; washtime is measured in minutes from
0 to 60.
50 - x 10 - z
m SD (x) = ; 0 £ x £ 50 mVS (z) = ; 0 £ z £ 10
~ 50 ~ 10
R| x R| z
50 ; 0 £ x £ 50 10 ; 0 £ z £ 10
m MD (x) =
~
S|
100 - x ; 50 £ x £ 100 ~
S|
m S (z) =
25 - z ; 10 £ z £ 25
T50 T 15
R| z - 10 ; 10 £ z £ 25
x - 50
m LD (x) = ; 50 £ x £ 100 m (z) = S 4015- z
M
~ 50 ~
|T 15 ; 25 £ z £ 40
R| z - 25 ; 25 £ z £ 40
50 - y
m NG (y) = ; 0 £ y £ 50 m (z) = S 15- z
L
~ 50 ~
|T6020 ; 40 £ z £ 60
R| y ; 0 £ y £ 50 z - 40
m MG (y) =
~ S| 10050- y ; 50 £ y £ 100
mVL (z) =
~ 20
; 40 £ z £ 60
T 50
y - 50
m LG (y) = ; 50 £ y £ 100
~ 50
746 Digital Control and State Variable Methods
The selected rules are:
Grease ® NG MG LG
Dirt
B Find a crisp control output for
the following sensor readings:
SD VS M L Dirt = 60; Grease = 70
MD S M L
LD M L VL
12.16 A fuzzy controller is acting according to the following rule base (N = negative, M = medium, P = positive):
R1 : If x1 is N AND x2 is N, THEN u is N
R2 : If x1 is N OR x2 is P, THEN u is M
R3 : If x1 is P OR x2 is N, THEN u is M
R4 : If x1 is P AND x2 is P, THEN u is P
The membership functions of the input and output and variables are given in Fig. P12.16. Actual inputs are
x1 = 2.5 and x2 = 4. Which rules are active and what will be the controller action u? Find u by applying standard
fuzzy operations: min for AND, and max for OR.
N P P N M P
1 1 N 1
x1 x2 u
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
Fig. P12.16
12.17 Consider the following fuzzy model of a system with inputs x and y and outpur z:
Rule 1 : If x is A3 OR y is B1, THEN z is C1
Rule 2 : If x is A2 AND y is B2, THEN z is C2
Rule 3 : If x is A1, THEN z is C3
The membership functions of the input and output variables are given in Fig. P12.17. Actual inputs are
x1 and y1. Find the output z by applying standard fuzzy operation: min for AND, and max for OR.
m m m
A1 A2 A3 B1 B2 C1 C2 C3
1 1 1
0.7
0.5
0.2 0.1
x y z
x1 y1 0 20 35 55 70 100
25 30 60 65
Fig. P12.17
12.18 A fuzzy controller is acting according to the following rule base (N = negative, P = positive):
R1 : If x1 is N AND x2 is N, THEN u is k1
R2 : If x1 is N OR x2 is P, THEN u is k2
R3 : If x1 is P OR x2 is N, THEN u is k2
R4 : If x1 is P AND x2 is P, THEN u is k3
Fuzzy Logic Models 747
The membership functions of the input variables are given in Fig. P12.16 and the membership functions of the
output variable (which is a controller action) u are singletons placed at k1 = 1, k2 = 2, k3 = 3. Actual inputs are
x1 = 2.5 and x2 = 4. Find u by applying standared fuzzy operations: min for AND, and max for OR.
12.19 Consider a two-dimensional sinc equation defined by
sin( x1 )sin( x2 )
y = sinc ( x1 , x2 ) =
x1x2
Training data are sampled uniformly from the input range [–10, 10] ´ [–10, 10]. With two symmetric triangular
membership functions assigned to each input variable, construct a Sugeno fuzzy model architecture for the sinc
function. Give defining equations for determination of the premise and consequent parameters of the model.
12.20 To identify the nonlinear system
2
(
y = 1 + ( x1) 0.5 + ( x2 ) −1 + ( x3 ) −1.5 )
we assign two membership functions to each input variable. Training and testing data are sampled uniformly
from the input ranges [1,6] × [1,6] × [1,6],and [1.5,5.5] × [1.5,5.5] × [1.5,5.5] , respectively. Extract Sugeno fuzzy
rules from the numerical input-output training data that could be employed in an ANFIS model.
12.21 Assume that a fuzzy inference system has two inputs x1 and x2, and one output y. The rule base contains two
Sugeno fuzzy rules as follows:
Rule 1: IF x1 is A11 and x2 is A21 THEN y(1) = a(1) (1) (1)
0 + a 1 x1 + a 2 x2
~ ~
Rule 2: IF x1 is A12 and x2 is A22 THEN y(2) = a(2) (2) (2)
0 + a 1 x1 + a 2 x2
~
~Aij are Gaussian functions.
For given input values x1 and x2, the inferred output is calculated by
APPLICATIONS
1. Siouris, G.M.; Missile Guidance and Control Systems; New York: Springer-Verlag, 2004.
2. Lawrence, A.; Modern Inertial Technology: Navigation, Guidance, and Control; 2nd Edition, New York:
Springer-Verlag, 1998.
3. Leonhard, W.; Control of Electric Drives; 3rd Edition, New York: Springer-Verlag, 2001.
4. Bose, B.K.; Modern Power Electronics and AC Drives; Englewood Cliffs, NJ : Prentice-Hall, 2001.
5. Sen, P.C.; Thyristor DC Drives; 2nd Edition, New York: Wiley-Interscience, 1991.
6. Seborg, D.E., T.F. Edgar, and D.A. Mellichamp; Process Dynamics and Control; 2nd Edition, New York:
John Wiley, 2004.
7. Bequette, B.W.; Process Control: Modeling, Design and Simulation; Upper Saddle Drive, NJ: Pearson
Education, 2003.
8. Marlin, T.E.; Process Control: Designing Processes and Control Systems for Dynamic Performance; 2nd
Edition, New York: McGraw-Hill, 2000.
9. Smith, C.A., and A.B. Corripio; Principles and Practice of Automatic Process Control; 2nd Edition, New
York: John Wiley, 1997.
10. Shinskey, F.G.; Process Control Systems; 4th Edition, New York: McGraw-Hill, 1996.
11. Astrom, K.J., and T. Hagglund; PID Controllers: Theory, Design, and Tuning; 2nd Edition, Seattle, WA:
International Society for Measurement and Control, 1995.
12. Corripio, A.B.; Tuning of Industrial Control Systems; Research Tringle Park, North Carolina: Instrument
Society of America, 1990.
13. Stephanopoulos, G.; Chemical Process Control—An Introduction to Theory and Practice; Englewood
Cliffs, NJ: Prentice-Hall, 1984.
14. Steven, B., and F. Lewis; Aircraft Control and Simulation; New York: Wiley Interscience, 2003.
15. Nelson, R.C.; Flight Stability and Automatic Control; 2nd Edition, New York: McGraw-Hill, 1997.
16. Etkin, B., and L.D. Reid; Dynamics of Flight: Stability and Control; 3rd Edition, New York: John Wiley,
1996.
17. Craig, J.J.; Introduction to Robotics: Mechanics and Control; 3rd Edition, Englewood Cliffs, NJ: Prentice-
Hall, 2003.
References 749
18. Koivo, A.J.; Fundamental for Control of Robotics Manipulators; New York: John Wiley, 1989.
19. Asada, H., and K. Youcef-Toumi; Direct Drive Robots: Theory and Practice; Cambridge, Massachusetts:
The MIT Press, 1987.
20. Valentino, J.V., and J. Goldenberg; Introduction to Computer Numerical Control (CNC) 3rd Edition,
Englewood Cliffs, NJ: Prentice-Hall, 2002.
21. Groover, M.K; Automation, Production Systems, and Computer-Integrated Manufacturing; 2nd Edition,
Englewood Cliffs, NJ: Prentice-Hall, 2000.
22. Olsson, G., and G. Piani; Computer Systems for Automation and Control; London: Prentice-Hall Interna-
tional, 1992.
23. Hughes, T.A.; Programmable Controllers; 4th Edition, North Caroline: The Instrumentation, Systems, and
Automation Society, 2004.
24. Petruzella, F.D.; Programmable Logic Controllers; 3rd Edition, New York: McGraw-Hill, 2004.
25. Bolton, W.; Programmable Logic Controllers; 3rd Edition, Buslingfon, MA: Newnes Publication, 2003.
26. Beards, C.F.; Vibration Analysis and Control System Dynamics; 2nd Edition, Englewood Cliffs, NJ:
Prentice-Hall, 1995.
MATHEMATICAL BACKGROUND
27. Noble, B, and J.W. Daniel; Applied Linear Algebra; 3rd Edition, Englewood Cliffs, NJ: Prentice-Hall
1988.
28. Lancaster, P., and M. Tismenetsky; The Theory of Matrices; 2nd Edition, Orlando, Florida: Academic
Press, 1985.
29. Lathi, B.P.; Linear Systems and Signals; 2nd Edition, New York; Oxford University Press, 2005.
30. Oppenheim, A.V., R.W. Shafer, and J.R. Buck; Discrete-Time Signal Processing; 2nd Edition, Englewood
Cliffs, NJ: Prentice-Hall, 1999.
31. Oppenheim, A.V., A.S. Willsky and S. Hamid Nawab; Signals and Systems; 2nd Edition, Upper Saddle
River, NJ : Prentice-Hall, 1997.
32. Brown, J.W., and R.V. Churchill; Complex Variables and Applications; 7th Edition, New York: McGraw-
Hill, 2003.
33. Lefschetz, S.; Differential Equations: Geometric Theory; 2nd Edition, New York : Dover Publications, 1977.
34. Palm, W.J., III; System Dynamics; New York: McGraw-Hill, 2004.
35. Zak, S.H.; Systems and Control; New York: Oxford University Press, 2003.
36. Ogata, K.; System Dynamics; 4th Edition, Englewood Cliffs, NJ: Prentice-Hall, 2003.
37. Clark, R.N.; Control System Dynamics; New York: Cambridge University Press, 1996.
38. Belanger, P.R.; Control Engineering: A Modern Approach; Orlando, Florida: Saunders College
Publishing, 1995.
39. Moschytz, G.S.; Linear Integrated Networks: Fundamentals; New York: Van Nostrand Reinhold, 1974.
40. Schwarz, R.J., and B. Friedland; Linear Systems; New York: McGraw-Hill, 1965.
41. Mason, S.J., “Feedback Theory: Further Properties of Signal Flow Graphs”, Proc., IRE, Vol.44, No. 7,
pp. 920-926, July 1956.
42. Mason, S.J., “Feedback Theory: Some Properties of Signal Flow Graphs”, Proc. IRE, Vol. 41, No. 9,
pp.1144–1156, Sept.1953.
750 Digital Control and State Variable Methods
58. Franklin, G.F., J.D. Powell, and A. Emami-Naeini; Feedback Control of Dynamical Systems; 5th Edition,
Upper Saddle River, NJ: Pearson Education, 2005.
59. Dorf, R.C., and R.H. Bishop; Modern Control Systems, 10th Edition, Upper Saddle River, NJ: Pearson
Education, 2004.
60. Nise, N.S.; Control Systems Engineering; 4th Edition, Danvers, MA: John Wiley, 2003.
61. Kuo, B.C., and F. Golnaraghi; Automatic Control Systems; 8th Edition, Danvers, MA: John Wiley, 2003.
62. D’Azzo, J.J., C.H. Houpis, and S.N.Sheldon; Linear Control System Analysis and Design with MATLAB;
5th Edition, New York: Marcel Dakker, 2003.
63. Wilkie, J.,M. Johnson, and R. Ketabi; Control Engineering: An Introductory Course; New York: Palgrave,
2003.
64. Dorsey, J.; Continuous and Discrete Control Systems; New York: McGraw-Hill, 2002.
65. Stefani, R.T., B. Shahian, C.J. Savant, and G.H. Hostetter; Design of Feedback Control Systems;
4th Edition, New York: Oxford University Press, 2002.
66. Ogata, K.; Modern Control Engineering; 4th Edition, Englewood Cliffs, NJ: Prentice-Hall, 2001.
67. Goodwin, G.C., S.F. Graebe, and M.E. Salgado; Control System Design; Upper Saddle River, NJ: Pearson
Education, 2001.
68. Phillips, C.L., and R.D. Harbor; Feedback Control Systems; 4th Edition, Englewood Cliffs, NJ: Prentice-
Hall, 1999.
References 751
nd
69. Shinners, S.M.; Modern Control System Theory and Design; 2 Edition, New York: John Wiley, 1998.
70. Raven, F.H.; Automatic Control Engineering; 5th Edition, New York: McGraw-Hill, 1995.
71. Wolovich, W.A.; Automatic Control Systems: Basic Analysis and Design; Orlando, Florida: Saunders
College Publishing, 1994.
72. Doebelin, E.O.; Control System Principles and Design; New York; John Wiley, 1986.
73. Truxal, J.G.; Automatic Feedback Control System Synthesis; New York: McGraw-Hill, 1995.
ROBUST CONTROL
74. Dullerud, G.E., and F. Paganini; A Course in Robust Control Theory; New York: Springer-Verlag, 2000.
75. Zhou, K., and J.C. Doyle; Essentials of Robust Control; Englewood Cliffs, NJ: Prentice-Hall, 1997.
76. Saberi, A., B.M. Chen, and P. Sannuti; Loop Transfer Recovery–Analysis and Design; London: Springer-
Verlag, 1993.
77. Doyle, J.C., B.A. Francis, and A.R. Tannenbaum; Feedback Control Theory; New York: MacMilian;
Publishing Company, 1992.
78. Francis, B.A.; A course in the Control Theory, Lecture Notes in Control and Information Seciences;
No. 88, Berlin: Springer-Verlag, 1987.
79. Rosenwasser, E., and R. Yusupov; Sensitivity of Automatic Control Systems; Boca Ratno, FL: CRC
Press, 2004.
DIGITAL CONTROL
80. Franklin, G.F., J.G. Powell, and M.L. Workman; Digital Control of Dynamic Systems; 3rd Edition, San
Diejo, CA: Addision-Wesley, 1997.
81. Astrom, K.J., and B. Wittenmark; Computer-Controlled Systems; 3rd Edition, Englewood Cliffs, NJ:
Prentice-Hall, 1996.
82. Santina, M.S., and A.R. Stubberud; Sample-Rate Selection; Boca Raton, FL: CRC Press, 1996.
83. Santina, M.S., and A.R. Stubberud; Quantization Effects; Boca Raton, FL: CRC Press, 1996.
84. Ogata, K.; Discrete-Time Control Systems; 2nd Edition, Upper Saddle River, NJ: Pearson Education, 1995.
85. Santina, M.S., A.R. Stubberud, and G.H. Hostetter; Digital Control System Design; 2nd Edition, Stamford,
CT: International Thomson Publishing, 1994.
86. Phillips, C.L., and H.T. Nagla, Jr.; Digital Control System Analysis and Design; 3rd Edition, Upper Saddle
River, NJ: Pearson Education, 1994.
87. Kuo, B.C.; Digital Control Systems; 2nd Edition, Orlando, Florida: Saunders College Publishing, 1992.
88. Houpis, C.H., and G.B. Lemont; Digital Control Systems: Theory, Hardware, and Software; 2nd Edition,
New York: McGraw-Hill, 1992.
89. Hristu-Varsakelis, D., and W.S. Levine(eds); Handbook of Networked and Embedded Control Systems;
Boston: Birkhauser Publishers, 2005.
90. Ibrahim, D.; Microcontroller Based Temperature Monitoring and Control; Woburn, MA: Newnes, 2002.
91. Chidambaram, M.; Computer Control of Processes; New Delhi: Narosa Publishers, 2002.
92. Ozkul, T.; Data Acquisition and Process Control using Personal Computers; New York: Marcel Dekkar,
1996.
93. Rigby, W.H., and T. Dalby; Computer Interfacing: A Practical Approach to Data Acquisition and
Control; Englewood Cliffs, NJ: Prentice-Hall, 1995.
94. Tooly, M.; PC-Based Instrumentation and Control; 2nd Edition, Oxford: Newnes: Publications, 1995.
752 Digital Control and State Variable Methods
95. Gupta, S., and J.P. Gupta; PC Interfacing for Data Acquisition and Process Control; 2nd Edition, Research
Triangle Park, North Carolina : Instrument Society of America, 1994.
96. Gopal, M.; Digital Control Engineering; New Delhi: New Age International, 1988.
97. Rao, M.V.C, and A.K. Subramanium; “Elimination of singular cases in Jury’s test” IEEE Trans.Automatic
Control, Vol.AC-21, pp.1q14-115, 1976.
98. Jury, E.I., and J. Blanchard; “A Stability Test for Linear Discrete-time Systems in Table Form”, Proc. IRE.,
Vol.49, pp.1947-1948, 1961.
99. Tewari, A.; Modern Control Design with MATLAB and Simulink; Singapore: John Wiley, 2003.
100. Chen, C-T.; Linear System Theory and Design; 3rd Edition, New York: Oxford University Press, 1998.
101. DeRusso, P.M., R.J. Roy, C.M. Close, and A.A. Desrochers; State Variables for Engineers; 2nd Edition,
New York: John Wiley, 1998.
102. Szidarovszky, F., and A.T. Bahill; Linear System Theory; 2nd Edition, Boca Raton, FL: CRC Press, 1998.
103. Antsaklis, P.J., and A.N. Michel; Linear Systems; New York: McGraw-Hill, 1997.
104. Rugh, W.I.; Linear System Theory; 2nd Edition, Upper Saddle River, NJ: Prentice-Hall, 1995.
105. Gopal, M.; Modern Control System Theory; 2nd Edition, New Delhi: New Age International, 1993.
106. Brogan, W.L.; Modern Control Theory; 3rd Edition, Englewood Cliffs, NJ: Prentice-Hall, 1991.
107. Friedland, B.; Control System Design: An Introduction to State-Space Methods; New York: McGraw-
Hill, 1986.
108. Zadeh, L.A., and C.A. Desoer; Linear System Theory: A State Space Approach; New York: McGraw-
Hill, 1963.
109. Bertsekas, D.P.; Dynamic Programming and Optical Control; 3rd Edition, Belnont: Athena Sientific, 2005.
110. Naidu, D.S.; Optimal Control Systems; Boca Raton, FL: CRC Press, 2003.
111. Camacho, E.F., and C. Bordons; Model Predictive Control; 2nd Edition, London: Springer-Verlag, 2003.
112. Bryson, A.E.; Applied Linear Optimal Control: Examples and Algorithms; Cambridge, UK : Cambridge
University Press, 2002.
113. Locatelli, A.; Optimal Control: An Introduction; Basel, Switzerland: Birkhauser Verlag, 2001.
114. Chen, T., and B. Francis; Optimal Sampled-Data Control Systems; 2nd Edition, London: Springer, 1996.
115. Lewis, F.L., and V.L. Syrmos; Optimal Control; 2nd Edition, New York: John Wiley, 1995.
116. Zhou, K., J.C. Doyle, and K. Glover; Robust and Optimal Control; Upper Saddle River, NJ: Prentice-
Hall, 1996.
117. Anderson, B.D.O., and J.B. Moore; Optimal Control: Linear Quadratic Methods; Englewood Cliffs, NJ:
Prentice-Hall, 1990.
118. Grimble, M.J., and M.A., Johnson; Optimal Control and Stochastic Estimation: Theory and Applications;
Vol.I, Chichester: John Wiley, 1988.
119. Albertos, P., and A. Sala; Multivariable Control Systems: An Engineering Approach; Springer, 2004.
120. Clarke, D.W., C. Mothadi, and P.S. Tuffs “Generalized predictive control–Part I. The basic algorithm”,
Automatica, vol. 23, No. 2, pp. 137–148; 1987.
121. Clarke, D.W., C. Mothadi, and P.S. Tuffs “Generalized predictive control–Part II. Extensions and interpre-
tations”, Automaticam vol. 23, No. 2, pp. 149–160; 1987.
References 753
122. Fortman, T.E., and K.L. Hitz, An Introduction to Linear Control Systems, New York: Marcel Dekker, 1977.
123. Kautsky, J., N.K. Nichols, and P. Dooren; “Robust pole assignment by linear state feedback”, Int.,
J.Control, Vol.41, No.5, pp.1129-1155, 1985.
124. Doyle, J.C., and G. Stein; “Robustness with Observers”, IEEE Trans. Automatic Control, Vol.AC-24,
No.4, pp.607-611, 1979.
125. Khalil, H.K.; Nonlinear Systems; 3rd Edition, Upper Saddle River, NJ: Prentice-Hall, 2001.
126. Slotine, J-J.E., and W.Li.; Applied Nonlinear Control; Englewood Cliffs, NJ: Prentice-Hall, 1991.
127. Itkis,U.; Control Systems of Variable Structure; New York: John Wiley, 1976.
128. Atherton, D.P.; Nonlinear Control Engineering; London: Van Nostrand Reinhold, 1975.
129. Minorsky N.; Theory of Nonlinear Control Systems; New York: McGraw-Hill, 1969.
130. Narendra, K.S., and A.M. Annaswamy; Stable Adaptive Systems; New York: Dover Publications, 2005.
131. Ljung, L.; System Identification: Theory for the User; 2nd Edition, Englewood Cliffs, NJ: Prentice-Hall,
1998.
132. Astrom, K.J., and B. Wittenmark; Adaptive Control; 2nd Edition, Reading, MA: Prentice-Hall, 1994.
133. Landau, I.D.; System Identification and Control Design; Englewood Cliffs, NJ: Prentice-Hall, 1990.
134. Sastry, S., and M. Bodson; Adaptive Control: Stability, Convergence and Robustness; Englewood Cliffs,
NJ: Prentice-Hall, 1989.
135. Grimble, M.J., and M.A. Johnson; Optimal Control and Stochastic Examination: Theory and Applica-
tions; Vol.II, Chichester: John Wiley, 1988.
136. Harris, C.J., and S.A. Billings (eds); Self-Tuning and Adaptive Control: Theory and Applications;
2nd Edition, London: Peter Peregrinus, 1985.
INTELLIGENT CONTROL
137. Negnevitsky, M.; Artificial Intelligence: A Guide to Intelligent Systems; 2nd Edition, Essex, UK: Pearson
Education, 2005.
138. Kccman, V.; Learning and Soft Computing; Cambridge, MA: The MIT Press, 2001.
139. Norgaard, M.O., Ravn, N.K. Poulsen, and L.K. Hansen; Neural Networks for Modelling and Control of
Dynamic Systems; London: Springer-Verlag, 2000.
140. Lewis, F.L., S. Jagannathan, and A. Yesildirek; Neural Network Control of Robot Manipulators and
Nonlinear Systems; London, Taylor & Francis, 1999.
141. Haykin, S.; Neural Networks: A Comprehensive Foundation, 2nd Edition, Prentice-Hall, 1998.
142. Jang, J-S.R., C-T. Sun, and E. Mizutani; Neuro-Fuzzy and Soft Computing: A Computational Approach to
Learning and Machine Intelligence; Upper Saddle River, NJ: Pearson Education, 1997.
143. Lin C.T., and C.S. George Lee; Neural Fuzzy Systems; Upper Saddle River, NJ: Prentice-Hall, 1996.
144. Ying, Hao; Fuzzy Control and Modelling: Analytical Foundations and Applications; New York: IEEE
Press, 2000.
145. Passino, K.M., and S. Yurkovich; Fuzzy Control; California: Addison-Wesley, 1990.
754 Digital Control and State Variable Methods
146. Goldberg, D.E.; Genetic Algorithms in Search Optimization, and Machine Learning; Reading, Massachu-
setts, Addison-Wesley, 1989.
147. Werbos, P., A. Handbook of Learning and Approximate Dynamic Programming, New York: Wiley-IEEE
Press, August 2004.
148. Sutton. R.S., and A.G. Barto, Reinforcement Learning: An Introduction Cambridge, Mass.: MIT Press,
1998.
149. Mitchell, T.M., Machine Learning, Singapore: McGraw-Hill, 1997.
150. Bertsekas, D.P., and J.N. Tsitsiklis, Neruo-Dynamic Programming, Belmont, Mass: Athena Scientific,
1996.
TECHNICAL COMPUTING
COMPANION BOOK
155. Gopal, M.; Control Systems: Principles and Design; 3rd Edition, New Delhi: Tata McGraw-Hill, 2008.
Answers to Problems
Caution
For some problems (especially the design problems) of the book, many alternative solutions are possible. The
answers given in the present section, correspond to only one possible solution for such problems.
2.1 (a) x1, x2: Outputs of unit delayers, starting at the right and proceeding to the left.
F=
LM 0 1 OP
;g=
0 LM OP
N−0.368 1.368 Q 1 NQ
c = [0.264 0.368]
(b) 0.368
1 z –1 z –1 0.264
R (z ) Y (z)
1.368
– 0.368
Y (z) 0.368z + 0.264
= 2
R( z ) z − 1.368z + 0.368
2.2 (a) y(k + 2) + 5y(k + 1) + 3y(k) = r(k + 1) + 2r(k)
(b) x1, x2: Outputs of unit delayers, starting at the right and proceeding to the left.
F=
LM 0 1OP ; g = LM 1OP ; c = [1 0]
N−3 −5Q N−3Q
Y (z) z+2
(c) = 2
R( z ) z + 5z + 3
756 Digital Control and State Variable Methods
1 Y (z) − z + 2
2.3 (a) y(k + 1) + y(k) = – r (k + 1) + 2r(k); =
2 R( z ) 1
z+
2
−1 ;k = 0
R| 1 k −1
2 5 1F I k
(b) y(k) = S| FH IK
5 (c) y(k) = – − ;k³0
− ;k ≥1 3 3 2H K
T
2 2
Aβ
2.4 (a) y(k) = Ab (a)k – 1; k ³ 1 (b) y(k) = [1 – (a)k]; k ³ 0
1−α
Aβ LM Aβ (α − e )OP k j Wk
(c) y(k) = [a k + (1 – a)k – 1]; k ³ 0 (d) y(k) = Re jW
(1 − α )2 Nα − e Q
k
1F 1 I kπ kπ O
2.5 (a) y(k) = (–1)k – (–2)k; k ³ 0 (b) y(k) = 1 + G J LMsin − cos ;k³0
2 H 2K N 4 4 QP
2.6 y(0) = 0, y(1) = 0.3679, y(2) = 0.8463, y(k) = 1; k = 3, 4, 5, ...
2.7 y(k) = 3(2)k – 2; k ³ 0
2.8 (a) y(k) = – 40d (k) + 20d (k – 1) – 10(0.5) k + 50(– 0.3)k; k ³ 0
2.19
1 − e −T
2.20 G(z) = ; y(k) = 1 – e– kT; k ³ 0
z − e −T
Answers to Problems 757
Y ( z ) 10 z + 0.76
LM OP
2.21 =
R( z ) 16 ( z − 1)( z − 0.46)
N Q
RSF1 + T + T I e(k ) – F1 + 2T I e(k − 1) + T e(k − 2) UV
2.25 u(k) – u(k – 1) = Kc D D D
|TGH T T JK H TK
I T W
L T F 1 I + T (1 − z )OP E(z)
U(z) = K M1 + D −1
N T H1 − z K T
c
I
−1
Q
z − 0.9391 I
2.26 (ii) D(z) = 0.4074 F
H z − 0.9752 K
L T F z + 1I + T F z − 1I OP E(z)
2.27 (a) U(z) = K M1 + D
N 2T H z − 1K T H z K Q
c
I
R| T e(i − 1) + e(i) T k U|
(b) u(k) = K Se( k ) + ∑
c + [e(k ) − e(k − 1)]V D
T| T 2 I i =1 T
W|
1 T
2.28 (a) y(k) = y(k – 1) + r(k) (b) y(k) = (1 – aT )y(k – 1) + Tr(k – 1)
1 + aT 1 + aT
Y (z) Gh 0 G1 ( z ) Gh 0 G2 ( z )
3.1 =
R( z ) 1 + Gh 0G1( z ) Gh 0G2 H ( z )
Y (z) Gh 0G ( z )
3.2 =
R( z ) 1 + Gh 0G ( z ) H ( z )
Gh 0 G2 ( z )G1 R( z )
3.3 Y(z) =
1 + Gh 0 G2 HG1 ( z )
D( z )Gh 0 Gp ( z )
3.4 Y(z) = GpH2R(z) + [H1R(z) – GpH2R(z)]
1 + D( z )Gh 0G p ( z )
3.8
ω ( z) F K +K
= 159.97 G F IJ P
ωr ( z ) H z + 159 .97 K − 0.1353 K P
758 Digital Control and State Variable Methods
Y (z) LM z( z + 0.92) OP
3.9 = 0.0095 3
R( z ) z − 2.81z 2 + 2.65z − 0.819
N Q
Y (z) 0.45z + 0.181 Y (z) 0.45z + 0.181
3.10 (i) = (ii) =
R( z ) z 2 + 0.081z + 0.181 R( z ) z 2 − 0.368z 2 + 0.45z + 0.181
3.13 0 < K < 4.293
3.14 (i) The system is stable for 0 < K < 4.723. (ii) The system is stable for 0 < K < 3.315.
3.15
2.0
y(k)
1.5 T = 0.01 sec
1.0
0.5 y (t )
In the low-frequency range, Ð Gh0G(jn) is about –180º; therefore, a lag compensator cannot fulfil the
requirement of 50º phase margin.
4.11 (a) K = 50; F M = 20º; wb = 9.27 rad/sec.
z − 0.923
(c) With lag compensator D1(z) = 0.342 , F M = 54º, wb = 4.23 rad/sec
z − 0.973
z − 0.793
With lag-lead compensator D1(z)D2(z); D2(z) = 2.49 ; F M = 60º, wb = 7.61 rad/sec
z − 0.484
z − 0.6 F I
4.12 (a) K = 61.25 (b) Unstable (c) D(z) = 0.122K
z − 0.951 H K
4.13 (b) 0 < K < 2.1; K = 0.38
4.14 (a) K = 2.3925 (b) (i) K = 1.4557; (ii) K = 0.9653
4.15 (a) K = 0.88; 1.33 rad/sec (b) K = 0.072; t = 2.3 sec (c) K = 0.18; wn = 0.644 rad/sec
4.16 0 < A < 3.33
760 Digital Control and State Variable Methods
4.17 (a) t = 0.4854 (b) K = 5.1223
F z − 0.8187 I z − 0.94
4.18 (a) D1(z) = 13.934 (b) Kv = 3 (c) D2(z) =
H z − 0.1595 K z − 0.98
z − 0.84 I
4.19 D(z) = 1.91 F
H z − 0.98K
4.20 (a) z1, 2 = 0.78 ± j0.18 (b) Pole of D(z) at z = 0; (K/2) = 0.18
(c) Ka = 0.072 (d) z3 = 0.2; the third pole causes the response to slow down.
LM0 1 0 0 OP LM 0 OP
0 − 0.025 3 0 0
A= M
MM0 −12 −190 1000 PP MM 0 PP P ; b = M P ; c = [0.5 0 0 0]
N0 0 0 − 4.2Q N0.2Q
LM0 1 0 OP LM0 OP
A = 0 −1
5.2
MM0 0 − 520 PP ; b = MM02.5PP ; c = [1 0 0]
N Q N Q
5.3 x1 = qM, x2 = θ& M , x3 = ia
LM 0 1 0 OP
LM 0 OP
A= M 0
MM− k − 0.5
− (k2 + 0.5)
19 ; b =
−21
MM k0 PP ; c = LMN 201 0 0 OPQ
PP
1 1
N 40 2 2 PQ
MN 2 PQ
⎡ −B K T ⎤
⎢ J J ⎥ L0O
5.4 A= ⎢ ⎥ ; b = M k K P ; c = [1 0]
1 c
⎢ − (k K K + K ) − ( R + k K ) ⎥
1 t c b a 2 c MN L PQ
⎢ ⎥ a
⎣ L a L a ⎦
5.5 (a) A = M
L−11 6OP ; b = LM1OP ; c = [2 –1]
N−15 8Q N2Q
Answers to Problems 761
(b) 1 s– 1 X2 1 s– 1
U X1 = Y
–3
–2
s– 1 X1
1 2
–11 –15
U Y
6
2 –1
s –1 X2
8
Y (s ) 1
(c) =
U ( s ) s 2 + 3s + 2
5.6 (a) A =
LM0 1OP ; b = LM0OP L 1 1OP ; b = LM0OP (c) |lI – A | = |lI – A | = l
(b) A = M 2
N0 0 Q N1 Q N−1 −1Q N1Q
1 M
Ls(s + 3) s + 3 1 OP
5.7 G(s) = −1 s(s + 3) s P
ΔM
MN −s −1 s PQ 2
1M P
L1O
3 2
H(s) = M s P ; D = s + 3s + 1
Δ
MNs PQ
2
5.9 x , x , x : outputs of integrators, starting at the right and proceeding to the left.
1 2 3
LM 0 1 0 OP LM0OP
A=
MM − 02 − 12 − 12PP ; b = MM01PP ; c = [2 – 2 1]
N Q NQ
5.10 x1, x2, x3, x4: outputs of integrators
Top row: x1, x2 = y1; Bottom row: x3, x4 = y2
0LM 0 0 −4 OP
3 0 LM
0 OP LM OP
1 −3 0 0 1 2 y1 (0) 0 1 0 0 LM OP
A= MM
0 −1 0
;B= PP ; x(0) = MM ;C= PP MM PP
MN 0 0 3
PQ 0
MN 0 0 0 1
PQ MN PQ N Q
0 0 1 −4 0 0 y2 (0)
s+3 1
5.11 (a) G(s) = (b) G(s) =
(s + 1)( s + 2 ) ( s + 1)( s + 2)
762 Digital Control and State Variable Methods
1 −3s + 5
LM 4( s − 3) OP
5.12 G(s) = ; D = s3 – 4s2 + 6s – 5
Δ − s 2 + 2 s 2( s 2 − 3s + 1)
N Q
LM − 5 0.5 −3.5O L 0O
0PP ; b = MM 0PP ; c = [0
14
5.13 (a) A=
MM 40 −5 1 0] (b) G(s) =
( s + 1)( s + 2 )(s + 7)
N 1 0PQ MN −1PQ
5.14 (a) x1 = output of lag 1/(s + 2); x2 = output of lag 1/(s + 1)
A=
LM−2 1OP ; b = LM0OP ; c = [– 1 1]; d = 1
N −1 −1Q N1Q
(b) x1 = output of lag 1/(s + 2); x2 = output of lag 1/s; x3 = output of lag 1/(s + 1).
−2 1
LM 1 0 OP LM OP
A = −1 0 0 ; b = 1 ; c = [0 1 1]
MM
−1 0 −1
PP MM PP
N 1 Q NQ
5.15 x1 = output of lag 1/(s + 1); x2 = output of lag 5/(s + 5); x3 = output of lag 0.4/(s + 0.5); x4 = output of lag
4/(s + 2).
LM−1 − K − K 0
1 1 0 O
P LM K 0 OP 1
0 −5 − 5K − 5K 0 5K L1 1 0 0 O
A= M
MM − 0.4K − 0.4K − 0.5 0 PPP ; B = MMM0.4K 0 PPP ; C = MN0 0 1 1PQ
2 2 2
1 1 1
N 0 0 − 4 K −2 − 4 K Q
2 2 N 0 4K Q 2
L −1 0 O L1O
LM0 0 −2OP LM5OP
(i) A = M (ii) A = 1 0 −5 ; b = M0P ; c = [0
5.16
N 0 −2PQ ; b = MN1PQ ; c = [2 –1] MM0 1 −4PP M0P
N Q NQ
0 1]
L 0 1 0OP LM0OP
(iii) A = M 0
MM−6 −110 −61PP ; b = MM01PP ; c = [2 6 2]; d = 1
N Q NQ
LM0 0 0OP LM1OP
5.17 (i) A = 1 0 −2 ; b = 1 ; c = [0 0 1]
MM0 1 −3PP MM0PP
N Q NQ
L 0 1 0OP LM0OP
(ii) A = M 0
MM−6 −110 −61PP ; b = MM01PP ; c = [1 0 0]
N Q NQ
LM−1 0 0OP LM1OP
(iii) L = 0 −2
MM 0 0 −30PP ; b = MM11PP ; c = [– 1 2 1]; d = 1
N Q NQ
L0 1 0OP LM0OP
(a) A = M0
5.18
MM0 −1000 −521PP ; b = MM01PP ; c = [5000 1000 0]
N Q NQ
Answers to Problems 763
LM
0 0 0 OP LM OP
50
(b) L = 0 −2 0 ; b = −31.25 ; c = [1 1 1]
MM 0 −50
PP MM PP
−18.75
0N Q N Q
L −1 1 0O L0O
5.19 (a) L=M 0 −1 0PP ; b = MM1PP ; c = [1 1 1] (b) y(t) = 2.5 – 2e – te – 0.5e –t –t – 2t
MM 0 0 −2PQ MN1PQ
N
5.20 1 2
L1O L1O
(i) l = 1, l = 2; v = M P ; v = M P 1 2
L1O L2O
(ii) l = –1, l = –2; v = M P ; v = M P 1 2 1 2
N0Q N1Q N1Q N1Q
LM 1OP LM 1OP LM 1OP
(iii) l = –1, l = –2, l = – 3; v = −1 ; v = M−2 P ; v = −3
1 2 MM−1PP M P MM 3PP
3 1 2
1
3
N Q N Q N Q 2
L 1O L 1 O L 1O
5.21 (b) l = –2, l = – 3, l = – 4; v = M−2 P ; v = M−3 P ; v = M−4 P
1 2 MM 4PP MM 9PP MM 16PP
3 1 2 3
N Q N Q N Q
LM 1 1 1O LM − j 0OP 1
2
1
2
5.22 (a) P = −1 + j1 −1 − j1 −1
MM − j 2 j 2 1PP P (b) Q = M j 0P 1
2
1
2
N Q M
N 0 0 1PQ
L 2e − e −e + e OP −t 2t −t 2t
5.23 1 2
L1O L1O
l = –1, l = 2; v = M P ; v = M P ; e = M
1 2
At
−t −t
2t 2t
NQ N Q
1 2 N2e − 2e −e + 2e Q
−t
L e − e − e + e OP −3 t −t L e − e −3t −t −3t −t −3t OP
At
3
2
1
2
3
2
3
2 e − e At
3
2
1
2
1
2
1
2
5.24 (a) e = M −t −3 t (b) e = M
−t −3t −t 3 −3t 1 −t −3 t
MN e − e − e + e PQ
1
2
1
2
1
2 MN− e + e − e + e
3
2
3
2 2 2
3
2 PQ
L 3e − 2e−2 t −3 t OP −2 t −3 t
L(1 + 2t ) e OP −2 t −2 t
At e −e 2t e At
5.25 (a) e = M −2 t −3 t
(b) e = M
−2 t −3 t − 2t −2 t
N−6e + 6e −2e + 3e Q N −2 t e (1 − 2t ) e Q
5.26 (a)
1
x02 x01
s –1 s –1
1 s –1 1 s –1
u x2 x1
–2 –2
1
764 Digital Control and State Variable Methods
X1( s ) 1/ 2 1/ 2 X1( s ) 1/ 2 −1/ 2
(b) = G11(s) = + ; = G12(s) = +
0
x1 s + 1 s + 3 x2 0
s+1 s +3
X2 (s) 1/ 2 −1/ 2 X2 (s) 1/ 2 1/ 2
= G21(s) = + ; = G22(s) = +
x10
s+1 s +3 x20
s +1 s +3
X1( s ) 1 X (s) 1
= H1(s) = ; 2 = H2(s) =
U (s ) s + 1 U (s ) s +1
1 e − ( x10 + x20 ) + e −3 ( x10 − x20 )
LM OP −t
LM1 − e OP
t t
(c) (i) x(t) = (ii) x(t) =
2 e − t ( x10 + x20 ) + e −3t (− x10 + x20 )
N Q −t
N1 − e Q
1 2
5.27 x1(t) = – e–2t + e–3t; x2(t) = 2(e–2t – e–3t ); x3(t) = –2(2e–2t – 3e–3t ); y(t) = x1(t)
3 3
1 3
5.28 (a) Asymptotically stable (b) y(t) = + 2e–t – e–2t
2 2
5 1
5.29 y1(t) = 3 – e– t – e –2t + e–3t; y2(t) = 1 + e–2t – 2e–3t
2 2
−6 0.5
LM 7 OP LM OP 28 1 1 LM OP
5.30 (a) A = ;b= ; c = [0 1] (b) y(t) = (1 − e −4 t ) − (1 − e −7t )
4 –5N 0 Q NQ 3 4 7 N Q
LM OP LM
x1 (1) 2.7183 − k OP
5.31 = for any k ¹ 0
N Q N
x2 (1) 2k Q
lt l t l t
k LM OP
5.32 (a) Modes: e 1 , e 2 , e 3 , l1 = –1, l2 = –2, l3 = –3 (b) x(0) = −3k ; k ¹ 0
MM PP
3k N Q
5.33 (b) x(0) =
k LM OP
;k ¹ 0
−k N Q
−t
− e −2 t
LM 2e e − t − e −2 t OP
5.34 eAt = −2 t
− 2e−t
N2e 2 e −2 t − e − t Q
A=
LM
0 1 OP
−2 −3
N Q
5.37 Controllable but not observable.
5.38 (i) Controllable but not observable (ii) Controllable but not observable
(iii) Both controllable and observable (iv) Both controllable and observable
(v) Both controllable and observable
5.39 (i) Observable but not controllable (ii) Controllable but not observable
(iii) Neither controllable nor observable
1
5.40 (i) G(s) = ; state model is not controllable
s+2
s+4
(ii) G(s) = ; state model is not observable
( s + 2)( s + 3)
1
5.41 (a) l1 = 1, l2 = – 2, l3 = –1; unstable (b) G(s) = ; stable
( s + 1)( s + 2)
Answers to Problems 765
5.42 (a) A =
LM0 1OP ; b = LM0OP ; c = [10 0]
N0 −1Q N1Q
LM0 1 0OP LM0OP LM0 0 0 OP LM
20 OP
(b) A = 0
MM0 −20 −31PP ; b = MM01PP ; c = [20 10 0] (c) A= 1
MM0 0 −2 ; b = 10 ; c = [0
PP MM PP 0 1]
N Q NQ N 1 −3 Q 0N Q
1M
L z 2
z 1 OP
3
6.1 G(z) = M− (4 z + 1) z ( z + 3) z + 3 P z; D = z + 3z2 + 4z + 1
ΔM
N −z −1 z( z + 3) + 4 PQ
1 M
L −3z − 7z OP 2
2
H(z) =
Δ M
M−7z − 9z + 3PP
N 3z + 7 Q
2z + 2
6.3 G(z) =
z2 − z + 1
2
LM 2 z + 2 − 4 z − 14
4+
−30 OP
6.4 G(z) = M Δ Δ Δ ; D = z2 – z + 12
PP
MN z +Δ
1
2 −3z − 4
Δ
−2 +
−3z − 9
Δ Q
6.5 x1, x2, x3: Outputs of unit delayers, starting at the top of the column of unit delayers and proceeding to the
bottom.
LM1
2
1
4 2 1OP LM OP
F = M0 − 12−1 ; g = −1 ; c = [5
PP 6 –7]; d = 8
MN0 3 13
MM PP
2 Q N Q
6.6 x1, x2, x3: Outputs of unit delayers. x1 and x2 in first row, starting at the left and proceeding to the right.
LM 0 1 0OP LM1 0OP L0 2 0O L2 0O
F=
MM−123 −70 −62PP ; G = MM00 01PP ; C = MN0 0 1PQ ; D = MN0 1PQ
N Q N Q
6.7 (i) F = M
L0 1OP ; g = L0O ; c = [–1 –2]; d = 3
N − Q MN1PQ
2
3
1
3
LM0 0 OP L 0.5O 3
4
(ii) F = M1 0 1P ; g = M − 3P ; c = [0 0 1]; d = –2
MN0 1 −1PQ MMN 4PPQ
LM−1 0 0OP LM1OP
6.8 (i) F = 0 −2 0 ; g = 1 ; c = [–1 2 1]; d = 1
MM 0 0 −3PP MM1PP
N Q NQ
1
3
LM 1 0OP L0O
(ii) F = M0 1
1P ; g = M0P ; C = [5 –2 3]; d = 0
MN0 0 PQ MMN1PPQ
3
1
3
766 Digital Control and State Variable Methods
0 0 −3
LM 0 OP LM OP
6.9 (i) F = 1 0 −7 ; g = 0 ; c = [0 0 1]; d = 0 (ii) F =
LM−1 0OP ; g = LM1OP ; c = [–2 7]; d = 0
0 1 −5
MM PP MM PP N 0 −2Q N1Q
N 0 Q NQ
L 0 1 0OP LM0OP
(iii) F = M 0
MM−3 −70 −51PP ; g = MM01PP ; c = [2 1 0]; d = 0
N Q NQ
6.10 k
F =M
L 1.5 − 0.5 (3) 0.5[(3) −1] OP
k k
k k
N−1.5[(3) − 1] − 0.5 + 1.5 (3) Q
17 22 25
6.11 y(k) = − (–0.2)k + (–0.8)k + ;k³0
6 9 18
k k k k
6.12 y1(k) = 5
F 1I + 10 − F 1I + 2; k ³ 0; y2(k) = 3
F 1I +2 −
F 1I + 1; k ³ 0
H 2K H 2K H 2K H 2K
6.13 (a) l1 = –1, l2 = –1, l3 = –2; Modes: (–1)k, k(–1)k – 1, (–2)k
LMk(−1) k −1 OP
k
(b) x(k) = M ( −1) PP
MN (−2) k
Q
0.2838z + 0.1485
6.14 (a) G(z) = Z [Gh0(s)Ga(s)] =
z 2 − 11353
. z + 0.1353
F=
LM0 1
;g=
0 OP LM OP
; c = [0.1485 0.2838]
−0.1353 11353
N . 1 Q NQ
(b) From controllable companion form continuous-time model:
F= M
L1 0.4323O
;g= M
L0.2838OP ; c = [1 0]
N0 0.1353 PQ N0.4323Q
6.15
L0.696
F= M
0.246 O
P ;g= M
L −0.021 OP ; c = [2 – 4]; d = 6
N 0.123 0.572 Q N 0.747Q
6.16 x(k + 1) = Fx(k) + g u(k) + g w(k); F = M
1
L1 0.1 OP ; g = LM0.005OP ; g = LM 0 OP
2 1 2
N0 0.99Q N0.1 Q N0.01Q
6.17 F= M
L0.741 0 OP ; G = LM259.182 0 OP ; C = LM1 0OP
N0.222 0.741Q N 36.936 259.182Q N0 1Q
L z + 0.7181 OP Y (z) 0.3679z + 0.2642
6.18 (a) 0.3679 M (b) = 2
N ( z − 1)( z − 0.3679 ) Q R ( z ) z − z + 0.6321
F= M
L 0 1OP ; g = LM0OP ; c = [0.2642 0.3679]
N−0.6321 1Q N1Q
0.4512z + 0.1809 L0 1 OP ; g = LM0OP ; c = [0.1809 0.4512]
6.19 (a) G(z) = Z [G (s)G (s)] =
h0 a ;F= M
2
z − 0.3679z N0 0.3679Q N1Q
(b) y& (t) = –y(t) + u(t – 0.4); x (k) = y(k); x (k) = u(k – 1); F = M
1 2
L0.3679 0.1809OP ; g = LM0.4512OP ; c = [1 0]
N 0 0 Q N 1 Q
Answers to Problems 767
N 0 Q
6.23 (a) x1 = output of lag 1/s; x2 = output of lag 1/(s + 1); x3 = output of lag 1/(s + 2).
LM 7 − 1 T − e + 1 e −T
1−e −2 T1
(1 + e − 2e −T −2 T −T
) OP
4 2 4 2
M 1
x(k + 1) = M − + e − e −T 1 −2 T
e e −e −T −T −2 T
PP x(k)
MM 2 2 PP
1 1 −2 T −2 T
MN − 2 + 2 e 0 e
PQ
LM− 3 + 1 T + e − 1 e OP
−T −2 T
4 2 4
+M
M 1
−e + e
1
−T
PP r(k) −2 T
MM 2 1 1 2 PP
−2 T
− e
MN 2 2 PQ
6.24 x(k + 1) = M
L 0.4 0.233 OP x(k) + LM0.2 OP r(k); y(k) = [1 0]x(k)
N−0.698 −0.0972Q N0.233Q
LM 0.6 0.233 0.2 OP 0 LM OP
6.25 x(k + 1) = −0.465 −0.0972 0.233 x(k) + 0 r(k)
MM –1 PP MM PP
N 0 –2 Q 1 NQ
6.26 u(k) = 50e(k) – 41e(k – 1)
x1 = y; x2= y& ; x3(k) = e(k – 1)
L x$ O La2 11 a1e OP = LM 00 1 0
b1
0
−2
OP L O LM OP LM OP
x$ e = M P; M 0 1 ; = 0 ;m=
PP MN PQ MM PP
N x$ Q Na3 e1 Aee Q MMN−6 −11 −6
be
1
17
Q N Q N Q
7.3 (a) k = [3 7 –1]; x& = (A – bk)x (b) mT = [74 25 3]
LM x& OP LM −6
3 0 1 OP LM x OP LM0OP La
3
11 a1e OP LM xx OP + LM b OP u
3
1
(c)
MM x&& PP = MM−−116
1 0 0 PP MM x PP + MM10PP u = MNa
1
e1 A ee Q MMN x PPQ Nb Q
1
e
Nx Q N
2 1 0 Q Nx Q N Q
2 2
x$ e =
LM x$ OP ; m = LM16OP
1
N x$ Q N 4Q
2
x$ e = x$ 2 ;
LMa
11 a1e OP = LM 0 2
1 OP ; LMb OP = LM 0 OP ; m = 10w
1
0
Na e1 Aee Q N −ω 0 0 Q Nb Q N1Q
e
7.8 (a) k = [29.6 3.6]
7.9 (a) A =
LM0 1OP ; b = LM0OP ; c = [1 0] (b) k = [1 2]
N0 0 Q N1 Q
(c) x&$ = (A – mc) x$ + bu + my; mT = [5 25]
(d) With reference to Fig. 7.9:
U ( s) 40.4( s + 0.619)
= D(s) = 2
−Y ( s ) s + 6.414 s + 33.07
(e) With reference to Fig. 7.7:
x$e = x$ 2 ;
LMa a OP = LM0 1OP
11 1e
Na A Q N 0 0 Q
e1 ee
LMb OP = LM0OP ; m = 5
1
Nb Q N1 Q
e
U ( s) 8.07( s + 0.62)
(f) = D(s) =
−Y ( s ) s + 6.41
7.10 (a) k1 = 4; k2 = 3; k3 = 1; N = k1 (b) mT = [5 7 8]
7.11 k = [–1.4 2.4]; ki = 1.6
7.12 k1 = 4; k2 = 1.2; k3 = 0.1
7.13 k1 = 1.2; k2 = 0.1; k3 = 4
7.14 mT = [5 6 5]
7.15 KA = 3.6; k2 = 0.11; k3 = 0.33
7.16 KA = 40; k2 = 0.325; k3 = 3
7.17 k1 = a2 /b; k2 = (a1 – a)/b; N = k1
7.18 k1 = – 0.38; k2 = 0.6; k3 = 6
7.19 (a) k1 = 3; k2 = 1.5
(b) For a unit-step disturbance, the steady-state error in the output is 1/7.
(c) k1 = 2; k2 = 1.5; k3 = 3.5, Steady-state value of the output = 0
7.20 (a) k = [3 1.5] (b) N = 7
(c) For a unit-step disturbance, the steady-state error in the output is 1/7.
(d) k1 = 2; k2 = 1.5; k3 = 3.5
10
7.21 (a) K = 0.095; N = 0.1 (b) For A + d A = – 0.6, w (¥) = r
10.1
(c) K1 = 0.105; K2 = 0.5
7.22 k1 = – 4; k2 = – 3/2; k3 = 0
PP MM x (k ) PP + MM01PP u(k) = MN f
11 1
7.26
MM x (k + 1) PP = MM−01.2
1 0 0
−0.5 11
1
e1 Fee Q MMN x (k )PPQ MNg PQ
1
e
N x (k + 1)Q N
3 . Q N x (k )Q MN PQ
3 3
7.28 (a) F =
LM 0 1O L0 O
; g = M P ; c = [1 0]
N−0.16 −1PQ N1 Q
(b) k1 = 0.36; k2 = –2.2
(c) x$ 2 (k + 1) = (–1 – m) x$ 2 (k) + u(k) – 0.16 y(k) + m y(k + 1); m = –1
(d)
z–2
–
7.30 (a) F=
LM1 0.1 OP ; g = LM0.005OP
N0 1 Q N0.1 Q
(b) k1 = 13; k2 = 3.95
(c) x$ (k + 1) = (F – mc) x$ (k) + gu(k) + my(k); mT = [2 10]
U (z) 65.5( z − 0.802 )
(d) = D(z) = 2
−Y (z) z + 0.46z + 0.26
Answers to Problems 771
7.31 (a) F =
LM1 0.0952 OP
;g=
LM
0.00484 OP
; c = [1 0]
N0 0.905 Q 0.0952N Q
(b) k1 = 105.1; k2 = 14.625
(c) x$ (k + 1) = (F – mc) x$ (k) + gu(k) + my(k); mT = [1.9 8.6]
(d) x$ 2 (k + 1) = (0.905 – 0.0952m) x$ 2 (k) + (0.0952 – 0.00484m)u(k) – my(k) + my(k + 1); m = 9.51
7.32 (a) y(k + 1) = 0.368y(k) + 0.632u(k) + 0.632w(k) (b) K = 0.3687; N = 1.37
(c) Steady-state error for a unit-step disturbance is 0.73. (d) K1 = 0.553; K2 = 2.013
8.1 Asymptotically stable in-the-large.
8.2 Unstable.
8.3 Equilibrium state xe = [2 0]T is asymptotically stable.
8.4 K > 0
8.5 0 < K < 8
8.6 Asymptotically stable.
8.7 Asymptotically stable.
8.8 K = [1 3]
8.9 K = [1 2]
8.10 Sufficient conditions not satisfied.
u = – [–1 4]x; optimal closed-loop system is asymptotically stable.
8.11 Asymptotically stable optimal solution does not exist.
8.12 u = – x1 – 0.23x2 + r; r = desired output yd = 1
8.13 u = – x1 – 6 x2
8.14 u = – x1 – x2; x$& = (A – MC) x$ + Bu + My; MT = [5 4]
8.15 k1 = 2 ; k2 = 0.275; J0 = 93.2375
8.16 r = 0.1; K = [3.1623 0.5968]; Poles: – 0.6377, – 4.9592
r = 0.01; K = [10 1.7082]; Poles: – 2.2361, – 4.4721
r = 0.001; K = [31.6228 4.3939]; Poles: – 4.6970 ± j3.0921
+ + + +
– –
772 Digital Control and State Variable Methods
10
8.18 (a) K = 0.095; N = 0.1 (b) For A + dA = – 0.6, w(¥) = r (c) K = 0.105; K1 = 0.1
10.1
8.19 u(k) = – 0.178x(k)
8.20 (a) K = 0.277 (b) y(¥) = 0.217r (c) N = 1.277
0.9
8.21 (a) K = 0.2 (b) N = 0.45 (c) For F + dF = 0.3, x(¥) = r
11
.
8M − 8M
9.2 ; 1 rad/sec; y(t) = sin t
π π
9.3 0.3; 10 rad/sec
9.4 D < 0.131
9.6 4.25; 2 rad/sec, stable limit cycle
9.7 3.75; 1 rad/sec
9.8 (a) Stable node; (0, 0) point in (y, y& )-plane (b) Stable node; (1,0) point in (y, y& )-plane
(c) Unstable focus; (2,0) point in (y, y& )-plane
9.9 Singularity at (0, 0) is either a stable node or a stable focus, depending upon the magnitudes of a and K.
Singular point (p,0) is a saddle point.
9.10 (i) Singularity (1,0) in (y, y& )-plane is a centre
(ii) Singularity (1,0) in (y, y& )-plane is a stable focus.
x1 + x&1 + 7x1 = 0
9.11 (a) For – 0.1 < x1 < 0.1, && (b) Isocline equations:
–7x1
x1 + x&1 + 0.7 = 0
For x1 > 0.1, && x2 = ; – 0.1 < x1 < 0.1
m+1
– 0.7
x1 + x&1 – 0.7 = 0
For x1 > 0.1, && x2 = ; x > 0.1
m+1 1
0.7
x2 = ; x < – 0.1
m+1 1
(c) A singular point at the origin
x1 + x&1 = 0
9.12 (a) For – 0.1 < x1 < 0.1, && (b) Isocline equations:
x1 + x&1 + 7 (x1 + 0.1) = 0
For x1 < – 0.1, && m = – 1; – 0.1 < x1 < 0.1
–7x1 – 0.7
For x1 > 0.1, &&
x1 + x&1 + 7 (x1 – 0.1) = 0 x2 = ; x1 < – 0.1
m +1
–7x1 + 0.7
x2 = ; x1 > 0.1
m+1
(c) Singular point at (x1 = ± 0.1, x2 = 0)
x1 + x&1 + 0.7 sgn x1 = 0
9.13 (a) && (b) Isocline equations:
–0.7
x2 = ; x1 > 0
m+1
0.7
x2 = ;x <0
m+1 1
(c) No singular points
Answers to Problems 773
x1 + x&1 = 0
9.14 (a) For – 0.1 < x1 < 0.1, && (b) Isocline equations:
For x1 > 0.1, &&
x1 + x&1 + 0.7 = 0 m=–1 ; – 0.1 < x1 < 0.1
– 0.7
For x1 < – 0.1, &&
x1 + x&1 – 0.7 = 0 x2 = ; x1 > 0.1
m +1
0.7
x2 = ; x < – 0.1
m+1 1
(c) No singular points
9.15 (a) &&
x1 + 0.1 sgn x&1 + x1 = 0 (b) Isocline equation:
– x – 0.1 sgn x2
x2 = 1
m
(c) Singular point a t (x1 = m 0.1, x2 = 0)
9.16 Steady-state error to unit-step input = – 0.2 rad; Maximum steady-state error = ± 0.3 rad.
9.17 Deadzone helps to reduce system oscillations, and introduces steady-state error.
9.18 Saturation has a slowing down effect on the transient.
9.20 The system has good damping and no oscillations but exhibits chattering behaviour. Steady-state error is
zero.
9.21 (b) (i) Deadzone provides damping; oscillations get reduced.
(ii) Deadzone introduces steady-state error; maximum error = ± 0.2.
(c) By derivative-control action, (i) settling time is reduced, but (ii) chattering effect appears.
12.8 (i) m A (4) = 0.75; (ii) mB (3) = 0.5; (iii) m ~A´ ~B (x, y) = 0.5; (iv) m A®B (x, y) = 0.5;
~ ~ ~ ~
12.11 z* = 6.76
12.12 1857.28
⎧ ⎛2 ⎞ ⎛1 ⎞⎫
12.13 mC ¢ (z) = max ⎨ min ⎜ , μC1 ( z ) ⎟ , min ⎜ , μC2 ( z ) ⎟ ⎬
~ ⎩ ⎝ 3 ~ ⎠ ⎝ 3 ~ ⎠⎭
z*COA = 4.7