Lecture 4
Lecture 4
Contents
• M3.1: Analysis of feedback
• M3.2: Control design using root-locus
• M3.3: Control design using frequency response
• M3.4: Control design using state-space
• M3.5: Digital control
• M3.6: Introduction to non-linear systems and adaptive control 2
Module M3.1
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
3
Module M3.1
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
4
M3.1.1 Equations of control
o Common assumptions
• Plants (actuator + process) and controllers can be represented as dynamic
systems which are LTI
• Single inputs and single outputs
o Basic equations of control
Open-loop Closed-loop
Output Y(s)
𝑌!" 𝑠 = 𝑇!" 𝑠 𝑅(𝑠)
𝐺 𝑠 𝐷!" 𝑠
𝑇!" 𝑠 =
Transfer function T(s) 1 + 𝐺 𝑠 𝐷!" (𝑠)
Transfer function T(s)
5
M3.1.1 Equations of control
o Common assumptions
• Once the terms of sensor noise disturbance (V) and disturbances at the input
(W) are introduced, the transfer functions related to them are:
o Basic equations of control Closed-loop
Control signal U(s)
Open-loop
Disturbance W(s) Output Y(s)
Sensor noise
(disturbance) V(s)
Reference R(s)
Error
signal
E(s) Transfer function T(s) Closed-loop Transfer function 6
M3.1.1 Equations of control
o Requirements for good control (M1)
• Tracking: the system output must track the reference signal as closely as
possible
8
M3.1.1 Equations of control
o Analysis of requirements for open and closed-loop: Tracking
Tracking 9
Tracking
M3.1.1 Equations of control
o Analysis of requirements for open and closed-loop: Regulation
§ Open-loop: 𝐷!" has no influence on the system response to disturbances. Thus, we can’t regulate open-
loop systems.
§ Closed-loop: there is a tradeoff between w and v in the search for a good controller:
#
§ 1) if we want to minimize the influence of the W disturbance on the error, the term (% & #'(") should be
zero (Thus 𝐷(" should be as large as possible according to this rule)
§ 2) However, as 𝐷(" becomes large 𝑇(" tends to unity and sensor noise (V) will not be reduced at all!
§ The resolution of the conflict between regulating v and w is: Since typically plant disturbances occur at low
frequencies, we can design 𝐷(" so that it’s large at low frequencies (to remove plant disturbances w), and
small at high frequencies , where usually high-frequency sensor noise V is found (“good” sensors show no
bias and low noise at low frequencies)
Stable if all Stable if all roots of
poles of G are 1 + GDcl = 0 are in
in LHP LHP
Disturbance is
Tracking not controlled Tracking Regulation 10
(no regulation)
M3.1.1 Equations of control
o Analysis of requirements for open and closed-loop: Sensitivity
• We call sensitivity the percent change in the gain of T with respect to a percent
change in the gain of G (no external disturbances and zero freq.)
§ Open-loop
Percent change:
Sensitivity of T with Difference in gain
respect to G for with respect to
open-loop nominal gain G
§ Closed-loop
Sensitivity of T with
respect to G for
closed-loop Complementary sensitivity
function (closed-loop TF)
Sensitivity function
Fundamental Relationship
between S and 𝑇
Ex: If gain is such that 1 + 𝐺𝐷,- = 100, a 10% change in G will result in a
11
0.1% change in the steady-state gain of the system
Module M3.1
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
12
Module M3.1
Reminder: Open-loop and Closed-loop control
systems
Open-Loop:
Closed-Loop:
Where:
13
M3.1.2 Steady-state error
o Control of steady-state error to polynomial inputs
• Reference signal inputs R(s) to be tracked are usually constant for long periods or
may be approximated as if they were a low-degree polynomial
• We assume stable unity feedback (gain in the feedback path is 1), no disturbances
(W = V = 0) and polynomial inputs of order k: If:
.# k = 0 -> Step input
• r(t) = /!
1(𝑡) , where k is the degree of the polynomial input k = 1 -> “Velocity” input
k = 2 -> “Acceleration” input
1
• ℒ{ r(t) }= 𝑅 𝑠 = 2 !"#
• Apply the Final Value Theorem to the equation of error to obtain its steady-state value
of error
Equation for error Steady-state of error
FVT
14
M3.1.2 Steady-state error
If 𝐺𝐷!" has no integrator à n = 0
• If n > k, the steady-state error is 0; if n = k, the error is a constant value (in table); if n < k
the error tends to infinite
15
M3.1.2 Steady-state error
o Control of steady-state error to polynomial inputs
Example:
We apply a ramp input (k = 1) to a type 1 system. Then, as shown in the previous table the error between
1
the ramp response and the input will be constant, and given by 3 , according to the following image:
$
16
M3.1.2 Steady-state error
o System Type for Regulation and Disturbance Rejection:
• A system can be classified similarly as before, but for polynomial disturbance inputs W(s)
• Assume stable unity feedback (gain in the feedback path is 1), no reference input (R = 0)
.#
and polynomial disturbance inputs 𝑤(𝑡) = 1(𝑡), where k is the degree of the
/!
1
polynomial input. By appling Laplace transform to w(t) we obtain: ℒ{ 𝑤 𝑡 = 𝑊 𝑠 =
2 !"#
• We can apply the Final Value Theorem to obtain the expression for steady-state error to
disturbances
• If n > k, the steady-state error is 0;
𝟏
• if n = k, the error is a constant value ( 𝑲 ) and the system is of type k
𝒏,𝒘
• if n < k the error tends to ∞
17
Module M3.1
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
18
M3.1.3 The PID controller
o The three-term controller: proportional-integral-derivative (PID)
• It is one of the most popular controllers, first efforts when invented were based
on experience (trial and error)
• It has three elements
§ A proportional (P) term to close the feedback loop.
§ An integral (I) term to assure zero error to constant reference and
disturbance inputs.
§ A derivative (D) term to improve stability and good dynamic response.
• Each element of the controller has an associated parameter (KP, KI, KD,
respectively) that needs to be tuned (Ziegler and Nichols method)
19
M3.1.3 The PID controller
o Proportional control (P)
• The feedback control signal u(t) is linearly proportional to the system error
• The transfer function of the controller (D) depends on KP, the “proportional gain”
• A Type 0 system with proportional control will have non-zero steady-state error in
response to a constant reference (it is still a Type 0)
20
M3.1.3 The PID controller
o Integral control (I)
• The feedback control signal u(t) is linearly proportional to the integral of the system error
• The transfer function of the controller (𝐷&' ) depends on KI, the “integral gain”
• Its goal is to minimize the steady-state error of tracking and regulation. It assures Type 1
(at least), although setting 𝐾( too high can lead to instability.
• The control signal integrates all past values of the error (its action is based on the
“history” of the system error
• Integral feedback results in zero steady-state output error in
tracking and disturbance rejection (Robustness)
21
M3.1.3 The PID controller
o Derivative control (D)
• The feedback control signal u(t) is linearly proportional to the derivative of the system
error
• The transfer function of the controller (D) depends on KD, the “derivative gain”
• Its goal is to closed-loop system stability as well as speeding up the transient response
and reducing the overshoot.
• It has an “anticipatory” behavior based on the trend of the error signal (useless if the
error is constant).
• It is almost never used alone (usually P or PI control).
o Proportional plus integral control (PI)
• It is a combination of proportional and integral control. This combination allows for a
faster response than a purely integral control, while keeping low steady-state error
22
M3.1.3 The PID controller
o PID control
• If the system to be controlled is second-order or higher, a third term
(derivative) is needed if we want to have arbitrary dynamics.
• With three free parameters (KP, KI, KD): By its selection of each parameter, the
roots of 1 + GDcl can be uniquely and arbitrarily determined.
• It is a combination of proportional, integral and derivative control.
Control of DC motor
(second-order plant) 23
M3.1.3 The PID controller
o Tuning of the PID controller: Two methods
• Historically, the tuning of PID controllers was often a “hit or miss” affair of playing with
the values of 𝑲𝑰 , 𝑲𝒑 , 𝑲𝒅 , and measuring posterior response.
• We introduce two methods to tune said values based on experimental measurements of
the response of the plant to a step input. Both of these methods benefit from the following
observation: Given a step input, a large number of physical processes exhibit an s-
shape process reaction curve that can be approximated by the step response of a plant
with transfer function:
§ The constants of the transfer function can be determined from the unit step
response of the process or plant that we want to control
24
M3.1.3 The PID controller
o Tuning of the PID controller: Ziegler-Nichols
• Method based on the unit step response of the plant
§ This method assures a closed-loop step response with a decay ratio of
approximately 0.25. This gives a good tradeoff between fast response and
system stability
§ The transfer function of the controller is given by
25
M3.1.3 The PID controller
o Tuning of the PID controller: Ultimate Sensitivity Method:
§ This method usually suggests gains that are lower than the suggested ones by the
first method.
§ To use this method, we increase manually the proportional gain 𝐾9 until the system
becomes neutrally stable. The corresponding gain is the “ultimate gain Ku” and
the period of oscillation is the “ultimate period” Pu.
§ Finally, tune the parameters of the controller according to the table below.
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
27
M3.1.4 Introduction to digital
control
o Digital controllers
• Nowadays many controller devices are digital (Complexity of design, price of a
microcontroller trends)
• They give the designer more flexibility to make modifications to the applied control laws
after the Hardware is fixed; since the formula of the controller signal is in the software.
• It is relatively easy to add binary logic and nonlinear operations as part of the function of a
digital controller as compared to an analog controller.
• Signals have to be digitalized (i.e. sampled and quantized) à new components are
introduced (e.g., ADC, clock and DAC) à new crucial specifications (e.g., sample
resolution and sample rate)
Contents
• M3.1.1: Equations of control
• M3.1.2: Steady-state error
• M3.1.3: The PID controller
• M3.1.4: Introduction to digital control
• M3.1.5: Main steps in control design
29
M3.1.5 Main steps in control
design
o Step 1: Specifications
• Understand the process and translate dynamic performance requirements into time,
frequency, or pole-zero specifications
o Step 2: Sensors
• In sensor selection, consider which variables are important to control and which variables
can physically be measured. Factors that influence sensor selection
30
M3.1.5 Main steps in control
design
o Step 3: Actuators
• Select actuators. In order to control a dynamic system, obviously you must be able to
influence the response. The device that does this is the actuator. Before choosing a
specific actuator, consider which variables can be influenced. Having selected a particular
variable to control, you may need to consider other factors
31
M3.1.5 Main steps in control
design
o Step 4: linearization
• Construct a linear model. Here you take the best choice for process, actuator, and sensor;
identify the equilibrium point of interest; and construct a small-signal dynamic model valid
over the range of frequencies included in the specifications of Step 1. You should also
validate the model with experimental data where possible
o Step 5: simple control design
• Try a simple control design, for example, a proportional-integral-derivative (PID) design
o Step 6: evaluation/modification
• Based on the simple control design, evaluate the source of the undesirable characteristics
of the system performance. Reevaluate the specifications, the physical configuration of
the process, and the actuator and sensor selections in light of the preliminary design, and
return to Step 1 if improvement seems necessary or feasible
32
M3.1.5 Main steps in control
design
o Step 7: optimal design
• Try an optimal design. If the trial-and-error controllers do not give entirely satisfactory
performance, consider a design based on optimal control.
o Step 8: computational model
• Build a computer model and simulate the performance of the design. After reaching the
best compromise among process modification, actuator & sensor selection and controller
design choice; run a computer model of the system. This model should include important
non-linearities, such as actuator saturation, realistic noise sources, and parameter
variations you expect to find during operation of the system in non-ideal settings.
o Step 9: prototype
• As the final test before production, it is common to build and test a prototype. At this point,
you verify the quality of the model, discover unsuspected dynamics such as vibration or
EMIs, and consider ways to improve the design. Implement the controller using
embedded software/hardware. Tune the controller if necessary
33
Module M3.1
o Summary
• The most important measure of the performance of a control system is the system error to
all inputs (reference and disturbance).
• Sensor noise introduces a conflict between efforts to reduce the error caused by plant
disturbances and efforts to reduce the errors caused by the sensor noise.
• Classifying a system as Type n indicates the ability of the system to achieve zero steady-
state error to polynomials of degree k less than but not equal to n.
34
Module M3.1
o Summary
• Increasing the proportional feedback gain reduces steady-state errors, although too high of
a gain may destabilize the system. Integral control provides robust steady-state error
reductions, but at the same time may make the system less stable. Derivative control
increases damping of the output signal and improves stability.
• The three free control parameters 𝐾: , 𝐾9 , 𝐾; are combined and tuned to form the classical
three-term PID controller, which when tuned correctly minimize the error according to its
present value (𝐾9 ) , past history(𝐾: ) and future values (𝐾; )
35