0% found this document useful (0 votes)
60 views54 pages

Lecture 13 Ece4330t

The document discusses motor control using feedback control and Laplace transforms. It provides an example of controlling a DC motor's shaft angle to track a desired input signal using negative feedback. The motor is modeled as a second order system. Applying negative feedback with gain K to the error between the input and output allows the output to track the input as K increases from 0 to 16. The root locus plot shows how the closed-loop poles vary with K, determining stability. Simulations show the step response improves from underdamped to critically damped to overdamped as K increases from above 16 to 16 to below 16.

Uploaded by

Hamza Ateeq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views54 pages

Lecture 13 Ece4330t

The document discusses motor control using feedback control and Laplace transforms. It provides an example of controlling a DC motor's shaft angle to track a desired input signal using negative feedback. The motor is modeled as a second order system. Applying negative feedback with gain K to the error between the input and output allows the output to track the input as K increases from 0 to 16. The root locus plot shows how the closed-loop poles vary with K, determining stability. Simulations show the step response improves from underdamped to critically damped to overdamped as K increases from above 16 to 16 to below 16.

Uploaded by

Hamza Ateeq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

ECE4330

Lecture 13
Laplace Transform
Application to Feedback Control and System Realization
Prof. Mohamad Hassoun

Motor Control
Consider the problem of controlling a dc motor in such a way that its
shaft’s angle at time 𝑡 is determined by the value of the input signal 𝑓(𝑡).
For example, if we set 𝑓(𝑡) = 8, then we expect the output angle 𝑦(𝑡) =
𝜃(𝑡) to quickly change and stabilize at 8o. Ideally, we would like the
motor angle to be equal to the input signal [i.e., 𝑦(𝑡) = 𝑓(𝑡)] for all time.
In practice, we would expect 𝑦(𝑡) to quickly and smoothly track 𝑓(𝑡).

Of course, if we simply apply a constant voltage to the dc motor, the


motor will keep spinning, implying that the system does not stabilize.
Control theory explores the addition of negative feedback as a means of
controlling the output of a given system, as is shown next.
The first step is to derive a differential equation that describes the (open
loop) system. The following is a circuit model for a dc motor.

KVL: −𝑓(𝑡) + 𝑅𝑖(𝑡) + 𝑣𝑒𝑚𝑓 (𝑡) = 0 (1)


𝑑𝜃 (𝑡 )
Faraday’s Law: 𝑣𝑒𝑚𝑓 (𝑡) = 𝑐1 𝑑𝑡

𝑑 2 𝜃 (𝑡 )
Ampere’s Law: 𝑖(𝑡) = 𝑐2 𝐽 𝑑𝑡 2

where 𝑐1 , 𝑐2 and 𝐽 > 0 (𝐽 is the load’s moment of inertia)


Substituting in equation (1), we arrive at the dynamical system
𝜃̈ (𝑡) + 𝑎𝜃̇ (𝑡) = 𝑏𝑓 (𝑡) (2)
𝑐1 1
where 𝑎 ≜ 𝑐 > 0, 𝑏 ≜ 𝑐 > 0.
2 𝑅𝐽 2 𝑅𝐽

The transfer function of this system is (we will rename 𝜃 as 𝑦)


𝜃 (𝑠) 𝑌(𝑠)
𝐻 (𝑠) = =
𝐹 (𝑠) 𝐹 (𝑠)
To find 𝐻(𝑠), we set 𝑦(0− ) = 0 and 𝑦̇ (0− ) = 0 and Laplace transform
equation (2) to obtain
𝑠 2 𝑌(𝑠) + 𝑎𝑠𝑌(𝑠) = 𝑏𝐹(𝑠)
(𝑠 2 + 𝑎𝑠)𝑌 (𝑠) = 𝑏𝐹(𝑠)
𝑌 (𝑠) 𝑏
𝐻(𝑠) = =
𝐹 (𝑠) 𝑠(𝑠 + 𝑎)
In the remainder of this analysis, we will assume 𝑎 = 8, 𝑏 = 1 which leads
to:
1
𝐻(𝑠) =
𝑠(𝑠 + 8)
The poles of the motor are at 𝑠1 = −8, 𝑠2 = 0, (i.e., natural modes are
𝐴1 𝑒 −8𝑡 and 𝐴2 𝑒 0𝑡 = 𝐴2 ) thus rendering the motor critically stable.
The response 𝑦(𝑡) is determined as 𝑦(𝑡) = 𝐿−1 {𝐻(𝑠)𝐹 (𝑠)}. So, for a
constant causal input, 𝑓(𝑡) = 𝜃0 𝑢(𝑡), the response is

1 1 1
1 𝜃0
( ) −1
𝑦 𝑡 =𝐿 { } = 𝜃0 𝐿−1 {− 64 + 82 + 64 }
𝑠(𝑠 + 8) 𝑠 𝑠 𝑠 𝑠+8
1 𝑡 1 −8𝑡
= 𝜃0 {− + + 𝑒 } 𝑢(𝑡)
64 8 64
𝑡
which diverges for large 𝑡, lim 𝑦(𝑡) = ∞. (Can you explain the 8 term?)
𝑡→∞

We want 𝑦(𝑡) to track 𝑓(𝑡); i.e. lim 𝑦(𝑡) = 𝜃0 . So, we employ negative
𝑡→∞
feedback with amplification (𝐾 > 0) as shown below.
Convergence occurs when 𝑓(𝑡) − 𝑦(𝑡) = 0. So, this strategy changes the
signal that drives the motor to the error signal 𝑓(𝑡) − 𝑦(𝑡). Thus, when
𝑦(𝑡) tracks 𝑓(𝑡), the input driving the motor is 0 Volt and the motor
should stop spinning (what is the difference between zero input voltage
and open input terminals on the motor?). However, if 𝑦(𝑡) < 𝑓 (𝑡), then
the error signal is positive and is going to spin the motor in the direction
that increases 𝑦(𝑡). On the other hand, if 𝑦(𝑡) > 𝑓 (𝑡) the error signal is
negative and it will attempt to spin the motor in the opposite direction [the
direction that decreases 𝑦(𝑡)]. So, in both cases, the magnitude of the error
signal driving the motor is reduced. The gain 𝐾 amplifies the error signal.
As this goes on, one should keep in mind the loaded motor’s inertia that
“resists” the motor’s acceleration/deceleration.
The stability of the above (closed loop) system is determined by the poles
of its transfer function. The following is a derivation of the transfer
function for the closed loop system (refer to the previous figure),
𝑌(𝑠) 𝐾𝐻 (𝑠)[𝐹 (𝑠) − 𝑌(𝑠)]
𝐺 (𝑠) = =
𝐹 (𝑠) 𝐹 (𝑠)
𝑌(𝑠)
𝐺 (𝑠) = 𝐾𝐻 (𝑠) − 𝐾𝐻 (𝑠)
𝐹 (𝑠)
𝑌 (𝑠 )
Noting that 𝐺 (𝑠) = 𝐹(𝑠), the above equation becomes

𝐺 (𝑠) = 𝐾𝐻 (𝑠) − 𝐺(𝑠)𝐾𝐻 (𝑠), or


[1 + 𝐾𝐻 (𝑠)]𝐺 (𝑠) = 𝐾𝐻 (𝑠)

Thus, leading to the closed-loop transfer function,


𝐾𝐻 (𝑠)
𝐺 (𝑠) =
1 + 𝐾𝐻 (𝑠)
1
Substituting 𝐻 (𝑠) = 𝑠(𝑠+8) in the above expression, gives
𝐾
𝐺 (𝑠) =
𝑠 2 + 8𝑠 + 𝐾

which has its poles at 𝑠1,2 = −4 ± √16 − 𝐾.


The gain 𝐾 plays a critical role in determining the stability and the
tracking speed of the closed-loop system, as is illustrated next.

Case (𝑖): 16 − 𝐾 < 0 (i.e., 𝐾 > 16) → 𝑠1,2 = −4 ± 𝑗√𝐾 − 16


This leads to an underdamped step-response (the step response is a
commonly accepted test signal for closed loop systems):

𝑦(𝑡) = [1 + 𝐴1 𝑒 −4𝑡 cos(√𝐾 − 16 𝑡) + 𝐴2 𝑒 −4𝑡 sin(√𝐾 − 16 𝑡)]𝑢(𝑡)

𝑦(𝑡) = [1 + 𝐴𝑒 −4𝑡 cos(√𝐾 − 16 𝑡 + 𝜃)]𝑢(𝑡)

Case (𝑖𝑖): 16 − 𝐾 = 0 (𝑖. 𝑒. , 𝐾 = 16) → 𝑠1,2 = −4


which leads to the critically-damped step-response:
𝑦(𝑡) = [1 + 𝐴1 𝑒 −4𝑡 + 𝐴2 𝑡𝑒 −4𝑡 ]𝑢(𝑡)

Case (𝑖𝑖𝑖): 16 − 𝐾 > 0 (i. e. , 0 < 𝐾 < 16) → 𝑠1,2 are real and are located
in the LHP. This leads to the overdamped, step-response:

𝑦(𝑡) = [1 + 𝐴1 𝑒 (−4+√16−𝐾)𝑡 + 𝐴2 𝑒 (−4−√16−𝐾)𝑡 ] 𝑢(𝑡)

Case (𝑖𝑣): 𝐾 < 0 → 𝑠1 < −4 and 𝑠2 > 0 leading to an unstable response.


The following are examples of pole locations for various gain values.
The Root Locus
The root locus is a plot (similar to the above plots) that displays the
trajectory (locus) of the poles of the feedback system as a function of the
gain parameter, 𝐾. The root locus for the motor control problem is shown
below (generated using Mathcad).

Alternatively, Matlab’s Control Toolbox can be used to generate the root


locus plot. The command for that is rlocus(num,den), where num is the
coefficient vector of the numerator polynomial, 𝑁(𝑠), of the open-loop
𝑁 (𝑠 )
transfer function, 𝐻 (𝑠) = 𝐷(𝑠), and den is the polynomial coefficient
vector of the denominator polynomial 𝐷(𝑠). The generated root locus is
that for the poles of the closed loop system, given by
𝐾𝐻 (𝑠)
𝐺 (𝑠) =
1 + 𝐾𝐻 (𝑠)
Therefore, if we are interested in the root locus for the preceding closed
loop motor control system, whose open-loop transfer function is
1 1
𝐻 (𝑠) = =
𝑠(𝑠 + 8) 𝑠 2 + 8𝑠 + 0
we would just execute the instruction rlocus([1],[1 8 0]). Matlab then
generates the following plot.

Your turn: Generate the root locus plot for the feedback system with gain
𝐾, where the open-loop transfer function.
𝑠 2 + 2𝑠 + 4
𝐻 (𝑠) =
𝑠(𝑠 + 4)(𝑠 + 6)(𝑠 2 + 1.4𝑠 + 1)

Estimate the range of 𝐾 for which the system is stable.


Simulations
Assume that the input to the above system is the unit-step function, 𝑢(𝑡).
Use Mathcad to solve for the (zero-state) response of the closed-loop
system for the gain values: 80, 16 and 1.

Solution:
Your turn: Solve for the above result analytically; i.e., show that:

80
𝑦𝑧𝑠 (𝑡) = 𝐿−1 { 2 }
𝑠(𝑠 + 8𝑠 + 80)
Your turn: Show that the following two expressions are equivalent,

𝑒 𝑥 +𝑒 −𝑥 𝑒 𝑥 −𝑒 −𝑥
Hint: cosh(𝑥 ) = , sinh(𝑥 ) =
2 2
The following is the closed-loop system response to a piece-wise linear
input signal for two different gain values (𝐾 = 7 and 80).

Your turn: Employ Mathcad simulations to reproduce the above plots.


Matlab Simulations
Impulse response, step response, and ramp response
Your turn: Consider the following feedback system.

Show that the overall system transfer function (with feedback) 𝐻𝐹𝐵 (𝑠) is given by
𝑌(𝑠) 𝐻 (𝑠)
𝐻𝐹𝐵 (𝑠) = =
𝐹 (𝑠) 1 − 𝐻 (𝑠)𝐺(𝑠)
Your turn: Employ the above result to determine the overall transfer function
𝑌(𝑠)
𝐻 (𝑠) = for the following systems.
𝐹(𝑠)
System Interconnection
Consider two LTI systems whose unit-impulse responses are ℎ1 (𝑡) and
ℎ2 (𝑡) [or, equivalently, transfer functions 𝐻1 (𝑠) and 𝐻2 (𝑠)]. If we cascade
the two systems (does not matter which one comes first) then the overall
unit-impulse response would be the convolution ℎ(𝑡) = ℎ1 (𝑡)*ℎ2 (𝑡); and
the overall transfer function would be the product 𝐻 (𝑠) = 𝐻1 (𝑠)𝐻2 (𝑠) (as
long as the impedance of the second system is very high, so it would not
load the first system). This is illustrated in the following figure.

Similarly, for two systems connected in parallel, the overall unit-impulse


response is given by the sum, ℎ(𝑡) = ℎ1 (𝑡) + ℎ2 (𝑡), and the overall
transfer function is 𝐻 (𝑠) = 𝐻1 (𝑠) + 𝐻2 (𝑠).
Your turn: Show that the above four system equivalencies are valid.
Here is an equivalence proof for the first system:
Let 𝑔(𝑡) = 𝑓 (𝑡) ∗ ℎ1 (𝑡), then the output of the cascade of the two
systems is
𝑦(𝑡) = 𝑔(𝑡) ∗ ℎ2 (𝑡) = [𝑓(𝑡) ∗ ℎ1 (𝑡)] ∗ ℎ2 (𝑡) = 𝑓 (𝑡) ∗ [ℎ1 (𝑡) ∗ ℎ2 (𝑡)]

Therefore, the overall system can be thought of one having the unit-
impulse response ℎ(𝑡) = ℎ1 (𝑡) ∗ ℎ2 (𝑡).
Physical System Realization of dc Motor with Controller

The following figure shows a picture of a dc motor control trainer


(typically used in undergraduate level control laboratories. This particular
system is made by Feedback Instruments, UK). The circuit board shown
implements a PID controller (refer to the appendix for details).

Motorcontrol_movie.
MOV
Watch the movie of the controller in action:
Realization of Transfer Functions Using Electric Circuits

Differentiator Circuit
Let us say we are interested in realizing the transfer function 𝐻 (𝑠) = 𝑠, or
𝑉𝑜 (𝑠) = 𝑠𝑉𝑖𝑛 (𝑠)
Taking the inverse Laplace transform of this equation leads to
𝑑𝑣𝑖𝑛 (𝑡)
𝑣0 (𝑡) =
𝑑𝑡
The following is an operational amplifier (op-amp) circuit that
differentiates its input:

0 − 𝑉0 0 − 𝑉𝑖𝑛
KCL at 1: 0 + + 1 =0
𝑅
𝑠𝑐

𝑉0 (𝑠) = −𝐶𝑅𝑠𝑉𝑖𝑛 (𝑠)


If we set 𝐶𝑅 = 1, we obtain,
𝑉0 (𝑠) = −𝑠𝑉𝑖𝑛 (𝑠)
or,
𝑉0 (𝑠)
𝐻(𝑠) = = −𝑠
𝑉𝑖𝑛 (𝑠)
Inverting Amplifier Circuit
The following op-amp circuit amplifies its input voltage by the negative
𝑅𝑓
gain − ,
𝑅

If we set 𝑅𝑓 = 𝑅, we obtain an inverting circuit whose transfer function is


𝑉0 (𝑠)
𝐻 (𝑠) = = −1
𝑉𝑖𝑛 (𝑠)

Now, the transfer function 𝐻 (𝑠) = 𝑠 can be realized by a first stage


differentiator followed by a second stage inverting amplifier. The resistor
values used in the invertor circuit must have large resistance (on the order
of 10K or higher), so that the second stage does not load the first stage.
Alternatively, a buffer circuit can be used between two circuit stages to
prevent loading effects. The following op-amp buffer circuit has the
required high-input resistance. Its transfer function is 𝐻 (𝑠) = 1.

Integrator Circuit
An op-amp circuit who’s output is given by,

−1 𝑡
𝑣𝑜 (𝑡) = ∫ 𝑣𝑖𝑛 (𝜏)𝑑𝜏 − 𝑣𝑜 (0− )
𝑅𝐶 0−
is shown below.

Your Turn: Derive the equation from the Laplace circuit, where 𝑣𝑜 (0− )
is the initial voltage across the capacitor.
The transfer function for this circuit is (set 𝑣𝑐 (0− ) = 0 and use the
integration property of the Laplace transform),
1
𝑉𝑜 (𝑠) − 𝑅𝐶
𝐻 (𝑠) = =
𝑉𝑖𝑛 (𝑠) 𝑠
and if 𝑅𝐶 = 1, the above expression becomes,
1
𝐻 (𝑠) = −
𝑠

The Summing Integrator is the basis for an analog computer:

It has the following input/output relationship,


𝑡
1 1 1
𝑣𝑜 (𝑡) = − ∫ [ ( )
𝑣𝑖𝑛1 𝜏 + ( )
𝑣𝑖𝑛2 𝜏 + 𝑣𝑖𝑛3 (𝜏)] 𝑑𝜏 − 𝑣𝑜 (0− )
0− 𝑅1 𝐶 𝑅2 𝐶 𝑅3 𝐶
Differential Amplifier Circuit
The following circuit amplifies the difference of its inputs, and would be
useful in realizing the amplified difference portion of a negative feedback
system.

Passive Realization of the Transfer Function of a dc Motor


Passive circuits can be used to synthesize transfer functions. The
following 𝑅𝐿 circuit

has the transfer function (easily obtained by treating the circuit as a


voltage divider)
𝑅
𝑅
𝐻1 (𝑠) = = 𝐿𝑅
𝐿𝑠 + 𝑅 𝑠 +
𝐿

If we set 𝑅 = 8Ω and 𝐿 = 1H, we obtain


8
𝐻1 (𝑠) =
𝑠+8
Now, we may cascade an op-amp-based integrator (whose transfer
1
function is 𝐻2 (𝑠) = − 8𝑠) to the right of the above passive circuit as
shown below,

to obtain the overall circuit transfer function


−1
𝐻 (𝑠) = 𝐻1 (𝑠)𝐻2 (𝑠) =
𝑠(𝑠 + 8)
This last result corresponds to the transfer function of the dc motor used in
the control system (introduced at the beginning of this lecture). The only
difference is the extra gain, −1. An inverting amplifier with gain −1 may
be used in cascade in the above system to change the overall transfer
function gain to +1.

Refer to the last part of this lecture for a synthesis method of a passive
1
circuit having a transfer function of the form 𝐻 (𝑠) = 𝐷(𝑠).
Realization of the dc Motor’s Closed Loop System
Employing the component circuits introduced above, we may formulate a
block diagram for the complete feedback control system as shown below.

The following is a circuit simulation of the above system (𝐾 = 16).


Simulation with gain 𝐾 = 7,
Simulation with 𝐾 = 80,
The following figure depicts the closed-loop system’s response to a unit-
step input, for different gain values. (Underdamped; critically damped;
overdamped)

Example. A parallel 𝑅𝐿𝐶 circuit with overdamped response. The circuit


employs a relay to automatically trigger the charge/discharge cycle (thus
the oscillatory behavior). https://www.youtube.com/watch?v=WuG4nOyF99s
The circuit parameters are: Lamp (1.5Ω), 𝐶 = 2200𝜇𝐹 and Coil (𝐿 = 180mH and 𝑅 = 300Ω).
Your turn: Verify analytically that the discharge cycle is overdamped.
Matlab/Simulink Solution
(Matlab’s student comes with Simulink. Here is a tutorial on how to use Simulink:
http://www.mathworks.com/help/simulink/)
It should be noted that the gain constant 𝐾 has physical constraints that
impose an upper limit on its value. For example, if the voltage gain 𝐾 is
realized using an operational amplifier circuit then the output of the
amplifier will saturate at ± 𝑉𝑆𝑎𝑡 (𝑉𝑆𝑎𝑡 is close to the operational amplifier
supply voltage). So, a proper simulation must include a nonlinear voltage
limiter (saturation block) placed just after the gain block. Once
nonlinearities are used in a control system model, we lose the usefulness
of Laplace transform analysis, and the response of the system must be
determined employing numerical methods, or simulators such as Simulink.

It should also be noted here that the typical operational amplifier can’t
drive the motor directly, because a dc motor requires relatively high
currents (especially, when it is stalled). So, in practice, a power amplifier
(of unity voltage gain) must be used between the gain amplifier and the
motor.

The following simulation compares the theoretical closed-loop response


(red trace; 𝐾 = 80) of the closed-loop dc motor system to that with a
clamped amplifier output voltage (blue trace; 𝐾 = 80, 𝑉𝑆𝑎𝑡 = ±12).
Example. Commercial aircraft pitch angle. In Lecture 11 we had
determined that the following dynamical system is unstable,
Θ(𝑠) 1.151𝑠 + 0.1774
𝐻 (𝑠) = =
𝐹 (𝑠) 𝑠(𝑠 2 + 0.739𝑠 + 0.921)
where, 𝜃 (𝑡) = 𝐿−1 {Θ(𝑠)} is the pitch angle and 𝑓 (𝑡) = 𝐿−1 {𝐹 (𝑠)} is the
elevator deflection angle. The objective is to control the aircraft pitch
angle and make it track 𝑓(𝑡).
Let us apply simple negative feedback where the input to the system is
made equal to the difference signal, 𝑓 (𝑡) − 𝜃 (𝑡). The resulting closed-
loop system (with unity gain) has the transfer function
𝐻 (𝑠) 1.151𝑠 + 0.1774
𝐺 (𝑠) = = 3
1 + 𝐻 (𝑠) 𝑠 + 0.739𝑠2 + 2.072𝑠 + 0.1774

The poles of the closed loop system are the solution to the polynomial
equation
𝑠 3 + 0.739𝑠 2 + 2.072𝑠 + 0.1774 = 0

This system is stable since all poles are in the LHP.


The zero-state response for the input 𝑓 (𝑡) = 3𝑢(𝑡) can be solved for,
using Mathcad, to obtain
which can be expressed as
𝜃𝑧𝑠 (𝑡) = [3 − 1.319𝑒 −0.088𝑡 + 1.748𝑒 −0.841𝑡 cos(1.382𝑡 + 2.863)]𝑢(𝑡)

The closed loop, pitch angle zero-state response is shown in the following
plot. After as brief oscillatory period, the steady-state angle, 𝜃𝑠𝑠 (𝑡),
asymptotically approaches the 3𝑜 elevator deflection angle.

Your turn: Repeat the above aircraft pitch angle analysis employing a
gain 𝐾, which results in the closed-loop transfer function
𝐾𝐻 (𝑠)
𝐺 (𝑠) =
1 + 𝐾𝐻 (𝑠)

Employ Simulink and perform simulations with 𝐾 = 0.5, 1 and 1.5

In practice, the gain block, 𝐾, is not appropriate for controlling the system
at hand and it must be replaced with a controller having a rational transfer
function, 𝐻𝑃𝐼𝐷 (𝑠). A relatively simple type of controller that is common in
the industry is known as PID controller. Refer to the appendix for an
introduction and an example.
Active Analog (op-amp) Circuit Realization of Transfer Functions
Next, we design an active circuit realization of the linear system,
𝑌 (𝑠) 1
𝐻 (𝑠) = =
𝐹 (𝑠) 𝑠 + 8
The above transfer function can be expressed as
𝑠𝑌(𝑠) + 8𝑌(𝑠) = 𝐹 (𝑠)
Taking the inverse Laplace transform (recall that the initial conditions are
assumed to be zero here) we get,
𝑦̇ (𝑡) + 8𝑦(𝑡) = 𝑓 (𝑡)
or
𝑦̇ (𝑡) = 𝑓(𝑡) − 8𝑦(𝑡)
Integrating the above equation leads to,
𝑡
𝑦(𝑡) = ∫ (𝑓 (𝜏) − 8𝑦(𝜏))𝑑𝜏
0

which can be realized as follows [this feedback formulation technique is


due to Lord Kelvin (1875)],

We could have also arrived at the above block diagram by working in the
frequency domain:
𝑠𝑌 (𝑠) + 8𝑌(𝑠) = 𝐹 (𝑠) → 𝑠𝑌(𝑠) = 𝐹 (𝑠) − 8𝑌(𝑠)
1
or, 𝑌(𝑠) = 𝑠 [𝐹 (𝑠) − 8𝑌(𝑠)]
Had we started with the formulation
1
𝑦(𝑡) = [𝑓(𝑡) − 𝑦̇ (𝑡)]
8
the realization would have been given as shown below (note differentiator)

However, the integrator-based implementation of the transfer function is


much more preferable over the differentiator-based one, because of the
problems arising from differentiating noisy signals.
2𝑠+5
Your turn: Give an op-amp realization for the system 𝐻 (𝑠) = 𝑠2 +4𝑠+10
by (directly) realizing the corresponding differential equation,

𝑦̈ (𝑡) + 4𝑦̇ (𝑡) + 10𝑦(𝑡) = 2𝑓̇(𝑡) + 5𝑓(𝑡)


Hint: First, solve for 𝑦(𝑡),

𝑦(𝑡) = ∫ [−4𝑦(𝜏) + 2𝑓(𝑡) + ∫(−10𝑦(𝑡) + 5𝑓(𝑡))𝑑𝜏] 𝑑𝜏


Canonical System Realization
Another way of realizing a transfer function 𝐻 (𝑠) = 𝑁(𝑠)/𝐷(𝑠) is to treat
it as a cascade of two systems
𝑌(𝑠) 1
𝐻(𝑠) = = 𝐻1 (𝑠)𝐻2 (𝑠) = 𝑁(𝑠)
𝐹 (𝑠) 𝐷(𝑠)
𝑋 (𝑠 ) 1 𝑌 (𝑠 )
We will write 𝐻1 (𝑠) = = and 𝐻2 (𝑠) = = 𝑁(𝑠).
𝐹 (𝑠 ) 𝐷 (𝑠 ) 𝑋 (𝑠 )

2𝑠+5
Next, we illustrate this realization approach for 𝐻(𝑠) = 𝑠2 +4𝑠+10.
𝑋 (𝑠 ) 1 𝑌 (𝑠 )
Here, 𝐻1 (𝑠) = 𝐹(𝑠) = 𝑠2 +4𝑠+10 and 𝐻2 (𝑠) = 𝑋(𝑠) = 2𝑠 + 5

and we may express the input/output relation for each subsystem as,
respectively,
(𝑠 2 + 4𝑠 + 10)𝑋(𝑠) = 𝐹(𝑠) and 𝑌(𝑠) = (2𝑠 + 5)𝑋(𝑠)
The following block diagram represents the first subsystem in terms of
1
integrator blocks, 𝑠

𝑠 2 𝑋(𝑠) = 𝐹 (𝑠) − 4𝑠𝑋(𝑠) − 10𝑋(𝑠)


The second subsystem generates 𝑌(𝑠) from 𝑋(𝑠), according to the
equation
𝑌 (𝑠) = 2𝑠𝑋(𝑠) + 5𝑋(𝑠)

Therefore, the overall system’s block diagram is given by

This diagram may now be converted into a diagram involving integrators,


inverting amplifiers and inverting summers (keep in mind that an op-amp
integrator also inverts its input)
The complete op-amp circuit (canonical) realization is shown below
employing practical component values.

Your turn: Design a canonical op-amp realization for the system


𝑠 2 + 5𝑠 + 2
𝐻 (𝑠) = 2
𝑠 + 4𝑠 + 13

Parallel System Realization


The canonical system realization tends to be sensitive to small parameter
changes in the system. The reason behind this undesirable sensitivity is
that all coefficients interact with each other, and a change in any
component (say resistor value) will be magnified through its repeated
influence from feedback and feedforward connections.
Alternatively, a less sensitive realization is based on a parallel
architecture. For example, we may implement the transfer function
4𝑠+28
𝐻 (𝑠) = 𝑠2 +6𝑠+5 (after performing partial fraction expansion)
4𝑠 + 28 6 2
𝐻 (𝑠) = = −
𝑠 2 + 6𝑠 + 5 𝑠 + 1 𝑠 + 5
in parallel form, as

Your turn: Generate a block diagram realization (employing integrator,


gain and summing blocks) for the above system.

Your turn: Use Simulink to generate (on a virtual scope) the zero-state
4𝑠+28
response of the system 𝐻(𝑠) = 𝑠2 +6𝑠+5 to the input 𝑓(𝑡) = 𝑢(𝑡) − 𝑢(𝑡 − 2).
Verify your result by solving for the response (analytically) employing the
Laplace transform and then plot it.
Simulink Answer:
The direct (differential equation based), canonical and parallel realizations
by no means lead to the use of the smallest number of op-amps. There are
circuits (such as the Sallen-Key, see below) that are capable of realizing a
second-order transfer function using only one op-amp.

1
𝑅1 𝑅2 𝐶1 𝐶2
𝐻 (𝑠) = 1 1 1
𝑠2 + ( + )𝑠 +
𝑅1 𝐶1 𝑅2 𝐶1 𝑅1 𝑅2 𝐶1 𝐶2

Refer to Lecture 19 for the design of such circuits.


1
Passive Circuit Synthesis of the Transfer Function 𝐻(𝑠) = 𝐷(𝑠)
1
Consider the transfer function 𝐻(𝑠) = 𝐷(𝑠) with 𝐷(𝑠) a Hurwitz
polynomial. Any polynomial 𝐷(𝑠) can be expressed as the sum 𝑝(𝑠) +
𝑞(𝑠) where 𝑝(𝑠) consists of all even powers of 𝑠 and 𝑞(𝑠) consists of all
the odd powers of 𝑠. For example, if 𝐷(𝑠) = 𝑠 3 + 2𝑠 2 + 2𝑠 + 1, then
𝑝(𝑠) = 2𝑠 2 + 1 and 𝑞 (𝑠) = 𝑠 3 + 2𝑠. If the roots of 𝑝(𝑠) and 𝑞(𝑠) are
pure imaginary and they alternate then 𝐷(𝑠) is a Hurwitz polynomial.
For example, the 𝐷(𝑠) = 𝑠 3 + 2𝑠 2 + 2𝑠 + 1 is a Hurwitz polynomial
because: (1) The roots of 𝑝(𝑠) = 2𝑠 2 + 1 are (pure imaginary): ±𝑗√1/2.
(2) the roots of 𝑞(𝑠) = 𝑠 3 + 2𝑠 are (pure imaginary) 0, ±𝑗√2. (3) the roots
of 𝑝(𝑠) and 𝑞 (𝑠) alternate:

1 1
−√2 < −√2 < 0 < √2 < √2.

Your turn: Show that 𝐷 (𝑠) = 𝑠 4 + 2𝑠 3 + 10𝑠 2 + 8𝑠 + 9 is a Hurwitz


polynomial, but 𝐷 (𝑠) = 𝑠 3 + 𝑠 2 + 9𝑠 + 25 is not.

It can be shown that when 𝐷(𝑠) = 𝑝(𝑠) + 𝑞(𝑠) is Hurwitz, then the
1
transfer function 𝐻 (𝑠) = 𝐷(𝑠) can be realized with a passive 𝐿𝐶 ladder
network terminated by a 1Ω resistor. In this case, the output impedance
𝑍(𝑠) (the impedance of the circuit looking into the unterminated circuit
𝑝 (𝑠 )
output) can be shown to be 𝑍(𝑠) = . The synthesis method is
𝑞 (𝑠 )
illustrated with the following example.
1
Consider the transfer function 𝐻(𝑠) = 𝑠3 +2𝑠2 +2𝑠+1. We showed above that
𝑝 (𝑠 ) 𝑠 3 +2𝑠
𝐷(𝑠) is Hurwitz. Now, we form the ratio 𝑍𝑎 (𝑠) = = 2𝑠2 +1 and
𝑞 (𝑠 )
express it as a continued fraction in the form,
1
𝑍𝑎 (𝑠) = 𝑘𝑜 𝑠 + 1
𝑙0 + 1
𝑘1 + 1
𝑙1 +
𝑘2
..
𝑒𝑡𝑐

Applying continued fraction to our impedance (divide, flip remainder and


divide, flip remainder and divide, etc.), we obtain:
3
𝑝(𝑠) 𝑠 3 + 2𝑠 1 𝑠 1 1
2
( )
𝑍𝑎 𝑠 = = = 𝑠+ 2 = 𝑠+ 2𝑠 2 +1
𝑞(𝑠) 2𝑠 2 + 1 2 2𝑠 + 1 2
3
𝑠
2
1 1
= 𝑠+4 1
2 𝑠+3 3 𝑠
2

Now we can view this impedance (looking into the output terminals) as a
1 4
series inductor 𝐿1 = in series with the parallel combination of a 𝐶 =
2 3
3
capacitor and an 𝐿2 = 2 inductor. As shown in the figure below.
Since the last component (on the left) in the circuit is an inductor, the rule
is to break the connection and insert a voltage source. Finally, the circuit
is completed by applying a 1Ω load resistor to the output terminal. The
circuits output is then the voltage across the resistor. The complete circuit
is shown below.

We can verify our circuit by applying mesh analysis to the 𝑠-domain


circuit (setting all initial energy to zero) to obtain,

3𝑠 3 3
( + ) 𝐼1 (𝑠) − 𝐼2 (𝑠) = 𝐸 (𝑠)
2 4𝑠 4𝑠
3 𝑠 3
− 𝐼1 𝑠 + (1 + + ) 𝐼2 (𝑠) = 0
( )
4𝑠 2 4𝑠

𝑉𝑅 (𝑠) 𝑅𝐼2 (𝑠)


Solving for 𝐻(𝑠) = = results in the desired transfer function,
𝐸 (𝑠 ) 𝐸 (𝑠 )

1
𝐻 (𝑠) =
𝑠 3 + 2𝑠 2 + 2𝑠 + 1
Alternatively, we could have started with the reciprocal impedance 𝑍𝑎 (𝑠),
𝑝(𝑠) 2𝑠 2 + 1 1 1
𝑍𝑎 (𝑠) = = = = 1
𝑞(𝑠) 𝑠 3 + 2𝑠 𝑠 + 4 1 1 1 +4
1
1
2 𝑠+3 𝑠 𝑠+3
3 𝑠 2 3 𝑠
2 2

Now we can view this impedance (looking into the output terminals) as a
1 3
shunt capacitor 𝐶1 = 2 in parallel with the series combination of a 𝐶1 = 2
4
capacitor and an 𝐿 = 3 inductor. As shown in the figure below.

Since the last component (on the left) in the above circuit is a capacitor,
the rule is to apply the input as a current source in parallel with that
capacitor. Finally, the circuit is completed by applying a 1Ω load resistor
to the output terminal. The output signal is the voltage across the resistor.
The complete circuit is shown below.
We can verify our resulting circuit by applying nodal analysis to the 𝑠-
domain circuit (setting all initial energy to zero) to obtain,
3𝑠 3 3
( + ) 𝑉1 (𝑠) − 𝑉2 (𝑠) = 𝐼𝑔 (𝑠)
2 4𝑠 4𝑠
3 𝑠 3
− 𝑉1 (𝑠) + (1 + + ) 𝑉2 (𝑠) = 0
4𝑠 2 4𝑠

𝑉2 (𝑠)
Solving for 𝐻(𝑠) = results in the desired transfer function,
𝐼𝑔 (𝑠)

1
𝐻 (𝑠) =
𝑠 3 + 2𝑠 2 + 2𝑠 + 1

Note: If any of the coefficients in the continued fraction expansion turns


out to be negative, then we will not be able to realize the function using
passive components. Fortunately, a Hurwitz 𝐷(𝑠) guarantees that all
coefficients are positive.

One advantage of passive circuit realization of linear systems (filters) is


that they work well for high-frequency applications (> 1MHz). However,
drawbacks include their inability to generate energy, so the power gain of
a passive filter cannot exceed 1. Active filters (with op-amps) can be
designed to provide significant gain. They also do not require inductors.
One problem with using inductors is their relatively large three-
dimensional footprint. Whereas capacitors and resistors and op-amps can
be easily fabricated in planar form on machine-assembled printed circuit
boards, inductors are generally more expensive to fabricate and more
difficult to integrate into the rest of the circuit. On the other hand, op-amps
generally do not perform reliably at frequencies above 1MHz (the
assumption of infinite gain no longer holds), so their use is limited to
lower frequencies. Fortunately, inductor sizes become less of a problem
above 1MHz since there impedance 𝑍𝐿 = 𝑗𝜔𝐿 would allow a smaller
value for 𝐿, leading to a physically smaller inductor. So, passive 𝐿𝐶 filters
are the predominant type used at higher frequencies. We will learn more
about filters and filter design in Lecture 19.

Your turn: Show that the transfer function


1
𝐻(𝑠) = 4
𝑠 + 2𝑠 3 + 10𝑠 2 + 8𝑠 + 9
has the two equivalent realizations:
Appendix: PID Controller
A proportional–integral–derivative controller (PID controller) is a control block
with transfer function 𝐻𝑃𝐼𝐷 (𝑠), commonly used in industrial closed-loop control
systems. A PID controller continuously calculates an error value as the difference
between a desired signal 𝑓(𝑡) and a measured process variable [usually system
output 𝑦(𝑡)] and applies a correction based on proportional, integral and derivative
terms (denoted P, I, and D, respectively). The transfer function of a PID control
block is
1
𝐻𝑃𝐼𝐷 (𝑠) = 𝑃 + 𝐼 + 𝐷𝑠
𝑠
where 𝑃, 𝐼 and 𝐷 (all non-negative) denote the coefficients for the proportional,
integral and derivative terms, respectively. In this model:

 P accounts for present values of the error. For example, if the error is large
and positive, the control output will also be large and positive.
 I accounts for past values of the error. For example, if the output is not
sufficiently strong, the integral of the error will accumulate over time, and the
controller will respond by applying a stronger action.
 D accounts for possible future trends (prediction) of the error, based on its
current rate of change.

In practice (and in the built-in Simulink “PID Controller” block), the derivative
term is problematic (becomes very large) when the signal is noisy and/or has sharp
variations. For this reason, the differentiator component is disabled for high
frequencies by passing its output through a low-pass filter having transfer function
𝑁 1
= 1 , with high cutoff frequency (𝑁 >> 1). This allows us to express the
𝑠+𝑁 𝑠+1
𝑁
PID controller as
1 𝑠
𝐻𝑃𝐼𝐷 (𝑠) = 𝑃 + 𝐼 + 𝐷 1
𝑠 𝑠+1
𝑁

A basic block diagram for the feedback controlled system utilizing a PID controller
is shown below
or equivalently,

The effects of varying the PID controller parameters are nicely captured in the
following animation: https://en.wikipedia.org/wiki/File:PID_Compensation_Animated.gif
The effects of independently increasing the PID controller parameters on the
controlled system behavior are summarized in the following table.

PID optimization software is available for computing/tuning the PID parameters.


But, in many situations, an experienced control engineer/technician can manually
tune these parameters. The idea is to set these parameters so that the system is
stable, has minimal rise time, minimal overshoot, fast settling time and very small
steady-state error. The following heuristic method (known as Ziegler-Nichols
method) can be used.
Initially, the 𝐼 and 𝐷 gains are first set to zero. The proportional gain, 𝑃, is
increased (say, starting from zero) until it reaches the value, 𝐾𝑢 , at which the output
of the closed loop system has stable and consistent oscillations. We will refer to the
oscillation period as, 𝑇𝑢 . Then, the PID parameters are set according to the
following (classic PID) formulas (typically, 𝑁 is set to a large value, say 100):
1.2 3𝑇𝑢
𝑃 = 0.6𝐾𝑢 , 𝐼 = 𝐾𝑢 , 𝐷 = 𝐾𝑢
𝑇𝑢 40

There are other variations of the Zeigler-Nichols heuristic PID settings that are
designed to meet certain desirable performance criteria. Such settings are
summarized in the following table and apply to the PID controller:

1 𝑠 1 𝑇𝑑 𝑠
𝐻𝑃𝐼𝐷 (𝑠) = 𝑃 + 𝐼 + 𝐷 1 = 𝐾𝑝 (1 + +1 )
𝑠 𝑠+1 𝑇𝑖 𝑠 𝑠+1
𝑁 𝑁
1 1 1
(𝑁 + 𝑇𝑑 ) 𝑠 2 + (𝑁𝑇 + 1) 𝑠 + 𝑇𝑖
𝑖
= 𝐾𝑝 1
𝑠2 + 𝑠
𝑁

The following is a PID controller simulation for the zero-state response of the
commercial aircraft system discussed earlier in this lecture [with 𝑓 (𝑡) = 3𝑢(𝑡)].
The PID parameters were determined using the classical Ziegler-Nichols method,
with the aid of Simulink.
Your turn: Employ the (classic) Ziegler-Nichols method and Simulink to
determine the PID coefficients and generate the above plot. Derive the overall
𝑌(𝑠)
closed-loop transfer function 𝐺 (𝑠) = and determine its poles and zeros for the
𝐹(𝑠)
two PID controllers: (𝑃1 , 𝐼1 , 𝐷1 ) = (0.6,0.24,0.375) and (𝑃2 , 𝐼2 , 𝐷2 ) =
(0.5,0.12,0). Assume 𝑁 = 100. Employ Mathcad to solve for 𝑦𝑧𝑠 (𝑡) [the pitch
angle], when subjected to the step input, 𝑓(𝑡) = 𝑢(𝑡), for both PID controllers. Plot
the two responses on the same graph. Your plot should look like this plot:

Your turn: Generate a root locus plot for the following closed loop system. Sweep
𝐾 from 0 to 200 with 0.5 increments. From the plot, estimate the range of gain
values that lead to a stable system.

𝑠+1
𝐻 (𝑠) =
𝑠(𝑠 − 1)(𝑠 2 + 4𝑠 + 16)
Recall that the root locus is a plot of the trajectory of the poles of the system,
𝐾𝐻 (𝑠)
𝐺 (𝑠) =
1 + 𝐾𝐻 (𝑠)
Ans. 23.4 < 𝐾 < 35.7
Your turn: Show that the transfer function of the following operational amplifier
based circuit is equivalent to that of the PID controller:
1
𝐻𝑃𝐼𝐷 (𝑠) = 𝑃 + 𝐼 + 𝐷𝑠
𝑠

Express 𝑃, 𝐼 and 𝐷 in terms of the circuit element values.


𝑅 (𝑅1 𝐶1 +𝑅2 𝐶2 ) 𝑅 1 𝑅
Ans. 𝑃 = ( 4 ) 𝐼 = ( 4) 𝐷 = ( 4 ) 𝑅2 𝐶1
𝑅3 𝑅1 𝐶2 𝑅3 𝑅1 𝐶2 𝑅3

Your turn: Show that the transfer function of the following circuit is equivalent to
that of a PID controller:
1 𝑠
𝐻𝑃𝐼𝐷 (𝑠) = 𝑃 + 𝐼 + 𝐷 1
𝑠 𝑠+1
𝑁

Express 𝑃, 𝐼, 𝐷 and 𝑁 in terms of the circuit element values.


𝑅 𝑅2 (𝑅1 +𝑅) 𝑅 1 𝑅 𝐶1 𝑅−𝐶2 𝑅2 1
Ans. 𝑃 = (𝑅4) 𝑅1 𝑅
, 𝐼 = ( 4)
𝑅3 𝑅1 𝐶2
, 𝐷 = ( 4)
𝑅3 𝐶2 𝑅
,𝑁 =
𝑅𝐶1
3
Propeller PID-Controlled Inverted Pendulum

Demonstration:
https://youtu.be/X2ELSFnOlUM
Mini Project
Consider the dc motor with transfer function
1
𝐻(𝑠) =
𝑠(𝑠 + 8)
We have studied the simple negative feedback with error amplification of 𝐾earlier in this
lecture. It was determined that the fastest non-oscillatory unit-step response corresponded to a
gin 𝐾 = 16 (critically damped response). We may view this controller as a PID controller with
gain only (That is a proportional controller or P controller). Employ Simulink to answer the
following:

a. Design a classic Ziegler-Nichols-based PID controller. Simulate the system (employing


Simulink’s PID Controller block) and generate a plot of the unit-step response (assume
𝑁 = 100). Set the 𝑥-axis range to [0 5] and the 𝑦-axis range to [0 1.2]. The same plot
should also include the step-response of the P-controlled system with gain 𝑃 = 16, for
comparison purposes.
b. Employ the tuning feature of Simulink to automatically tune your PID controller from
Part 𝑎 in order to achieve an improved PID controller. [You can access the tuning feature
from within the PID controller block menu. After Simulink finishes tuning the PID
controller, you may update the PID parameters by clicking on the “RESULTS” button,
located at the upper right hand side corner of the PID controller menu, and then selecting
“Update Block”]. Simulate the resulting PID controller and display its unit-step response
on the same plot generated in Part 𝑎. Your plot should look similar to the following plot.

c. Modify the tuned PID controller obtained in Part 𝑏 by setting the sliders inside the PID
controller menu as shown below, and then display the resulting step-response on the same
plot as before (allowing you to compare the step-responses of your four controllers).

d. Design the Operational Amplifier PID circuit (the bottom circuit, two slides back) so that
it implements the PID controller form Part 𝑎. Assume 𝑅1 = 100KΩ and 𝑁 = 200.
e. Employ Mathcad to determine the transfer function, its poles and the unit-impulse
response for the closed loop system obtained in Part 𝑐.
Mini Project

The Segway people mover can be roughly modeled as a frictionless inverted pendulum on a cart
with the following linear dynamics (assuming small angles):

g 1
y(t )  y (t )   x(t )
L L
Where y(t) = (t) is the angle (in radian) from the vertical, x(t) is the displacement of the cart (in
meters), L is the length (in meters) of the pendulum and g is gravitational acceleration.

a. Derive the transfer function H(s) for the system and show that it is not stable.
K1 s  K 2
b. Let K1 and K2 be two positive constants. And let K1 + K2/s = be the transfer
s
function of a controller that is used to stabilize the system (see Figure below). Derive the
transfer function of the closed look system (i.e., the new Y(s)/X(s)).

c. For what values of K1 and K2 is the system stable?


d. Solve for the value of K2 (as a function of L, K1 and g) that leads to a critically damped
response.
e. Solve (analytically) and plot (on the same graph) the response y(t) of the system for the
input x(t) = 0.1u(t) and K2 equal (i) 2, (ii) 2 g and (iii) 10. Assume L = 1, K1 = 2, and g =
9.8. Also, assume that the system has zero initial conditions.
f. Verify your work using Mathcad and Simulink.
Mini Project

Use what you have learned so far in ECE 4330 to design, verify (by
simulation using two or more of the following tools: Matlab, Mathcad,
Simulink and Multisim) and build a linear electric circuit that displays and
sustains a perfect circle on an oscilloscope. The circuit must not employ
external signal generators, but it can employ a dc power supply (say 9Volt
batteries). Bring your circuit to your instructor’s office for evaluation (an
oscilloscope will be made available). Also, provide a well-written report.

Practical considerations when building an OpAmp-based integrator:


A good low-cost OpAmp suitable for building an integrator circuit:

You might also like