Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
133 views33 pages

Lecture 8 - More State-Space and System Properties: G(S) G(S) 6205 S (+ 13s + 1281) S (S) Y (S) /R(S) H

The document discusses the step response of a closed-loop system and how to determine its dominant poles. It provides the transfer function of an example closed-loop system and has the student: 1) Determine the closed-loop transfer function and its poles. 2) Express the transfer function as the product of two transfer functions, one for the real pole and one for the complex pole pair. 3) Calculate the step responses of the full and separated transfer functions and compare their differences. 4) Conclude that the response is dominated by the real pole, which is the dominant pole.

Uploaded by

Pythonraptor
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)
133 views33 pages

Lecture 8 - More State-Space and System Properties: G(S) G(S) 6205 S (+ 13s + 1281) S (S) Y (S) /R(S) H

The document discusses the step response of a closed-loop system and how to determine its dominant poles. It provides the transfer function of an example closed-loop system and has the student: 1) Determine the closed-loop transfer function and its poles. 2) Express the transfer function as the product of two transfer functions, one for the real pole and one for the complex pole pair. 3) Calculate the step responses of the full and separated transfer functions and compare their differences. 4) Conclude that the response is dominated by the real pole, which is the dominant pole.

Uploaded by

Pythonraptor
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/ 33

6/30/2020 Practicon Exercise System TU Delft

Lecture 8
ae2204 Aerospace Systems and Control Theory

With answers and notes by Anthony Cummins (4436253)

Lecture 8 -- More state-space and system


properties
Introduction
Hello, and welcome back to my e-lecture. In Lecture 7, we discussed basic system properties and their effect
on the step response of a system. It proved to be possible to get a ``feel'' for the speed of the system, looking
at the time constant or natural frequency of a first-order (real) pole or a complex set of second-order poles.
In this lecture you will experiment a little with systems to confirm what you learned in Lecture 7. After that you
will return to state-space systems (Lecture 5 and E-Lecture 6), for some more advanced practice.

Let's first look at the effect of dominant poles.

Consider the following closed-loop system:

The transfer function G(s) is given by

6205
G(s) =
2
s (s + 13s + 1281)

Determine the closed-loop transfer function Heq (s) = Y (s)/R(s) , and determine the poles of that transfer
function.

Re-write the closed-loop transfer function into the following form:

2
1/τ ω
Heq (s) =
1/τ + s ω2 + 2ζ ωs + s2

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 1/33
6/30/2020 Practicon Exercise System TU Delft

Enter also the following two transfer functions,

1/τ
H1 (s) =
1/τ + s

2
ω
H2 (s) =
2 2
ω + 2ζ ωs + s

Verify that H1 (s)H2 (s) = Heq (s) .

Calculate the step responses of the three transfer functions H1 (s) , H2 (s) , and Heq (s) , with a time step of
0.01 s and an end time of tend =1.5 [s] and calculate the following:

The integral of the absolute value of the difference between H1 (s) and Heq (s) , i.e.

tend

D1 = ∫ |y(t) − y1 (t)| dt
0

The integral of the absolute value of the difference between H2 (s) and Heq (s) , i.e.

D2 =
t end
∫0 |y(t) − y2(t) |dt
Note: use trapz to do the numerical integration in Matlab, and in Python, you can use
scipy.integrate.trapz

Another note: It does not hurt to plot the step responses, to see what you are doing ...

Your answer
Enter the value 0.0231

Enter the value 0.2166


What part of the closed-loop transfer function dominates the response
(what is/are the dominant pole(s)), if this is the real pole, then enter 1, if 1
this is the complex pole pair, then enter 2.

The model answer


Enter the value 0.023105062

Enter the value 0.2166469


What part of the closed-loop transfer function dominates the response
(what is/are the dominant pole(s)), if this is the real pole, then enter 1, if 1
this is the complex pole pair, then enter 2.
Explanation / script
%electure8

Feedback
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 2/33
6/30/2020 Practicon Exercise System TU Delft

Very good, a perfect score.


The procedure to calculate the responses is quite straightforward:

s = tf('s')
% enter the open-loop transfer function
G = 6205 / (s * (s^2 + 13*s + 1281))
% create closed loop tf
Heq = feedback(G, 1)
% calculate the poles of the closed-loop transfer function:
p = pole(Heq)

Python version:

from control.matlab import *


import scipy as sp
import matplotlib.pyplot as plt

s = tf([1, 0], [1])


# enter the open-loop tf
G = 6205/(s*(s**2 + 13*s + 1281))

# create closed-loop tf
Heq = G.feedback(1)
p = pole(Heq)

Now, the first pole is the real pole, and according to the assignment now the transfer function has the shape
of:
with the information on the pole, can be entered in Matlab, and with that also can be split off:

H1 = 5/(s+5)
% split off H2, use minreal to remove a cancelling pole and zero
H2 = minreal(Heq / H1)

Now you can calculate the response of these two systems, and the closed-loop system, to a step input:

tend = 1.5
dt = 0.01
t = 0:dt:tend
% step responses
y = step(Heq, t)
y1 = step(H1, t)
y2 = step(H2, t)

Python version

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 3/33
6/30/2020 Practicon Exercise System TU Delft

H1 = 5/(s+5)
H2 = (Heq/H1).minreal()

# calculate the response


tend = 1.5
t = sp.arange(0, tend+0.01, 0.01)
y, t2 = step(Heq, t)
y1, t2 = step(H1, t)
y2, t2 = step(H2, t)

Then calculate the difference between the system response and , respectively response:

% requested values;
D1 = trapz(t, abs(y1 - y))
D2 = trapz(t, abs(y2 - y))
% also plot the stuff:
plot(t', [y y1 y2])

Python version

# calculate the difference, scipy integration


print("D1", sp.integrate.trapz(sp.absolute(y-y1), t))
print("D2", sp.integrate.trapz(sp.absolute(y-y2), t))
plt.plot(t, y, t, y1, t, y2)
plt.show()

From the plot you can also clearly see that the response of the combined system is much more like the
response of the first order pole, than like the response of the pair of complex conjugate poles. This matches
the theory, since the first order pole is the dominant pole.

You can also understand this when you perform partial fraction expansion, and then look in a good Laplace
table to see how the different components are to be translated back into the time domain.

The relevant items from the table are listed here:

Exponential decay (or rise):

Laplace:

Step function:

, in Laplace:

Damped sine:

, in Laplace:

Damped cosine:

, in Laplace:

The pair of complex eigenvalues can be converted to a sum of the damped sine and cosine in the Laplace
domain. The two real poles, for the decay and the step function, are simple to convert.

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 4/33
6/30/2020 Practicon Exercise System TU Delft

% partial fraction expansion


Ystep = Heq * (1/s)
[r, p, k] = residue(Ystep.num{1}, Ystep.den{1})
% the response from the complex poles (assuming your Matlab still/also
% gives the complex pair of poles first):
Ys1 = minreal(r(1)/(s-p(1)) + r(2)/(s-p(2)))
% the response from the real pole
Ys2 = minreal(r(3)/(s-p(3)))
% the step response component
Ys3 = minreal(r(4)/(s-p(4))
% for the complex pair, damped frequency and the decay term (a) can be
% calculated from
a = 0.5 * Ys1.den{1}(2)/Ys1.den{1}(1)
w = sqrt(Ys1.den{1}(3)/Ys1.den{1}(1) - a^2)
% for completeness, natural frequency, damping coefficient and damped
% frequency again.
wn = sqrt(Ys1.den{1}(3)/Ys1.den{1}(1))
zeta = 0.5*Ys1.den{1}(2)/Ys1.den{1}(1)/wn
wd = wn*sqrt(1-zeta^2)

Apologies for the students working with Python. Currently there is no equivalent for the residue function; but
don't worry, you will not need this on the exam.

The step response -- in the Laplace domain -- can thus be written as:

This means that, in the time domain, the step response results in the following:

Also from the terms in the partial fraction expansion (-1.0122 versus -0.1404 and 0.01223, all three multiplied
with functions starting at most at 1 and then diminishing) you can see that the term associated with the pole at
-5 contributes more to the response than the terms associated to the pair of complex poles (at ). The
important message is that the poles close to the origin contribute strongest to the system's response and
therefore matter most when later you are trying to create a controller. There are exceptions, however. One is
that unstable poles in the closed-loop systems produce an unbounded response and are therefore not
acceptable -- dominant or not. The other exception is that a normally dominant pole can be offset or
neutralized by a zero near its location.

Simple operations with state-space systems


Modifying state-space systems - Matlab
Some common operations are possible with systems in state-space form. One can combine systems in
series, in parallel and calculate the state-space system for closed feedback loops. In fact, all manipulations
that can commonly be done with block diagrams can be easily performed in Matlab with either state-space
systems or transfer functions.

Systems in series
If you have two state-space systems, you can connect them in series if the number of outputs of the first
system matches the number of inputs of the second system.

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 5/33
6/30/2020 Practicon Exercise System TU Delft

s1 = rss(3, 1, 2)
s2 = rss(2, 3, 1)
stotal = s2 * s1

The function rss is a nice one, it gives you a random state-space system, for practice. The first parameter is
the number of state, second parameter number of outputs, and the third parameter is the number inputs. Note
the order of multiplication.

Quick quiz question, what will be the number of inputs, number of outputs and number of states of the
combined system? Check this by trying it in Matlab or Python!

Systems in parallel
If you have two state-space systems in parallel, you can connect them by adding them up:

Or in Matlab:

s1 = rss(3, 1, 2)
s2 = rss(2, 1, 2)
stotal = s1 + s2

The number of inputs and the number of outputs must be equal. Inspect the A matrix of the combined system.
You can see a typical block diagonal structure. The 4th and 5th states are apparently not connected to the
first three states.

Feedback loops
Help on the feedback function can be found by entering help feedback. In the examples it shows a number
of ways in which a feedback connection can be made.

One of the most common feedback operations is selecting one of the outputs and feeding these back with a
gain. Say we have a system with one input and four outputs, like the one given below. That system
represents the motions of a submarine. Its three states are , and (just like with an aircraft). The state-space
system has four outputs, the three aforementioned states and the "flight/float" path angle .

a = [ 0 1 0 ; ...
-0.0071 -0.111 0.12; ...
0 0.07 -0.3]
b = [ 0 ; -0.095; 0.072]
c = [ 1 0 0; ... % theta
0 1 0; ... % q
0 0 1; ... % alpha
1 0 -1] % gamma = theta - alpha
d = zeros(4, 1);
sys2 = ss(a, b, c, d)

The pitch rate from the submarine above, is fed back with a gain to improve the response characteristics. We
can create a "feedback matrix" that describes how the different outputs from must be fed back:

k = [ 0 -0.67 0 0]

Remeber that the output vector is:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 6/33
6/30/2020 Practicon Exercise System TU Delft

When multiplied by the output, k gives back . There is already a minus sign in the response of the system to
the elevator input; positive elevator input gives a negative pitch rate. That is why we are using -0.67 here, in
most systems the feedback coefficient would be positive. Now the feedback is done with:

sclosed = feedback(sys2, k)

Inspecting the system


When analysing a transfer function, one commonly looks at its poles, i.e. the roots of the denominator. In
Lecture 5, it is explained that the eigenvalues of the A matrix of a state space system are equal to the poles of
its equivalent representation as a transfer function. Therefore, in order to analyse stability (for this all poles
must have negative real values), we can look at the eigenvalues of the A matrix.

Inspect the open-loop and the closed-loop submarine. You may observe that only the A matrix changed.
Check how the two systems are related:

eig(sys2.A)
eig(sclosed.A)

The main change is in the location of the complex eigenvalues. In lecture 7 we will discuss what "good" and
what "bad" locations for eigenvalues are.

Modifying state-space systems - Python


Some common operations are possible with systems in state-space form. One can combine systems in
series, in parallel and calculate the state-space system for closed feedback loops. In fact, all manipulations
that can commonly be done with block diagrams can be easily performed in Matlab with either state-space
systems or transfer functions.
Systems in series

If you have two state-space systems, you can connect them in series if the number of outputs of the first
system matches the number of inputs of the second system.

from control.matlab import rss, ss


# create two random systems
s1 = rss(3, 1, 2)
s2 = rss(2, 3, 1)

# and put them in series


stotal = s2 * s1
print stotal
The function rss is a nice one, it gives you a random state-space system, for practice. The first parameter is
the number of state, second parameter number of outputs, and the third parameter is the number inputs. Note
the order of multiplication.

Quick quiz question, what will be the number of inputs, number of outputs and number of states of the
combined system? Check this by trying it in Matlab or Python!
Systems in parallel

If you have two state-space systems in parallel, you can connect them by adding them:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 7/33
6/30/2020 Practicon Exercise System TU Delft

s1 = rss(3, 1, 2)
s2 = rss(2, 1, 2)
stotal = s1 + s2
print stotal
The number of inputs and the number of outputs must be equal. Inspect the A matrix of the combined system.
You can see a typical block diagonal structure. The 4th and 5th states are apparently not connected to the
first three states.
Feedback loops

Help on the feedback function can be found by entering help feedback. In the examples it shows a number
of ways in which a feedback connection can be made.

One of the most common feedback operations is selecting one of the outputs and feeding these back with a
gain. Say we have a system with one input and four outputs, like the one given below. That system
represents the motions of a submarine. Its three states are , and (just like with an aircraft). The state-space
system has four outputs, the three aforementioned states and the "flight/float" path angle .

from control.matlab import ss


import numpy as np
a = np.matrix('''0 1 0 ;
-0.0071 -0.111 0.12;
0 0.07 -0.3''')
b = np.matrix(''' 0 ; -0.095; 0.072''')
c = np.matrix(''' 1.0 0 0;
0 1 0;
0 0 1;
1 0 -1''')
d = np.zeros((4, 1))
sys2 = ss(a, b, c, d)
The pitch rate from the submarine above, is fed back with a gain to improve the response characteristics. We
can create a "feedback matrix" that describes how the different outputs from must be fed back:

k = np.matrix( '0 -0.67 0 0')

Remeber that the output vector is:


When multiplied by the output, k gives back . There is already a minus sign in the response of the system to
the elevator input; positive elevator input gives a negative pitch rate. That is why we are using -0.67 here, in
most systems the feedback coefficient would be positive. Now the feedback is done with:

sysclosed = sys2.feedback(k)
Inspecting the system

When analysing a transfer function, one commonly looks at its poles, i.e. the roots of the denominator. In
Lecture 5, it is explained that the eigenvalues of the A matrix of a state space system are equal to the poles of
its equivalent representation as a transfer function. Therefore, in order to analyse stability (for this all poles
must have negative real values), we can look at the eigenvalues of the A matrix.

Inspect the open-loop and the closed-loop submarine. You may observe that only the A matrix changed.
Check how the two systems are related:

import scipy.linalg as la
print la.eig(sysclosed.A)[0]
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 8/33
6/30/2020 Practicon Exercise System TU Delft

print la.eig(sys2.A)[0]
The main change is in the location of the complex eigenvalues. In lecture 7 we discussed what "good" and
what "bad" locations for eigenvalues are.

A state equation for the lateral motions of an aircraft is given by

This is a typical form for the state equations of an aircraft, describing the asymmetric motions. As you know,
is the side slip angle, is the roll angle, is the roll rate and is the yaw (rotation around the top axis) rate.

The aircraft has a fair amount of oscillation in the Dutch roll. Take a time span of 20 seconds, and calculate
the response of the yaw rate to a unit step input in rudder, and determine the value of the (negative) yaw rate
in the first (negative) peak.

As a suggestion, I would suggest that you choose an appropriate C matrix (giving you the proper output for
this problem).

Your answer
What is the peak value of the first oscillation peak (note that this peak is
-1.97
negative)

The model answer


What is the peak value of the first oscillation peak (note that this peak is
-1.9699889
negative)
Explanation / script
A = [ -0.2 0.06 0 -1;...
0 0 1 0;...

Feedback
Nice, a perfect score.
The procedure is simple. Enter the matrices into Matlab, create a state-space system and calculate the
response to a step:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 9/33
6/30/2020 Practicon Exercise System TU Delft

% first enter the basic aircraft


A= [ -0.2 0.06 0 -1;
0 0 1 0 ;
-17 0 -3.8 1
9.4 0 -0.4 -0.6];
B = [ -0.01 0.06
0 0
-32 5.4
2.6 -7 ];
% only need rudder input!
B = B(:,2)
% only need yaw rate r, so create custom output matrices
C = [ 0 0 0 1]
D = 0
% the system
sys0 = ss(A, B, C, D)
% calculate a step response
[y, t] = step(sys0, 20)
% plot the response
plot(t, y)
% it looks like the minimum is in the first second
min(y(t<1))

Python version:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 10/33
6/30/2020 Practicon Exercise System TU Delft

from control.matlab import *


import numpy as np
import matplotlib.pyplot as plt

# first enter the basic aircraft


A = np.mat('''-0.2 0.06 0 -1;
0 0 1 0;
-17 0 -3.8 1;
9.4 0 -0.4 -0.6''')
B = np.mat('''-0.01 0.06;
0 0;
-32 5.4;
2.6 -7''')
# only need rudder input!
# note that specifying the column index as [1], keeps the B
# as a column vector
B = B[:,[1]]
# only need yaw rate r, so create custom output matrices
C = np.mat(''' 0 0 0 1''')
D = np.mat([[0]])
# the system
sys0 = ss(A, B, C, D)
# calculate a step response
T = np.arange(0, 20, 0.01)
y, t = step(sys0, T)
# plot the response
plt.plot(t, y)
plt.show()
# it looks like the minimum is in the first second
print("minimum", np.min(y[t<1]))

You can see that the aircraft displays quite a bit of oscillation in response to a sharp rudder input. This is very
common in fast jet aircraft with a high wingloading. This problem is normally removed with the application of a
yaw damper. Most aircraft are flown with the yaw damper always engaged.

To reduce the Dutch roll oscillation, a yaw damper is applied. This yaw damper measures yaw rate with a
gyroscope, and adds a certain input to the rudder input, as depicted in the diagram below:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 11/33
6/30/2020 Practicon Exercise System TU Delft

Use the aircraft's state equation for the asymmetric motions, with as output vector , and create the closed-
loop state-space system. Assume that the measurement of yaw rate is perfect, and that the dynamics of the
actuator that is needed to move the rudder can also be neglected. Thus . Inspect and compare both the open-
loop and the closed-loop state-space system, and enter the closed-loop state-space system matrices. Note
that the closed-loop state-space system has the same outputs as listed before.

Due to the sign conventions in aircraft, the response from rudder to yaw rate already has a "minus"; positive
rudder input will result in negative yaw rate. The feedback gain is thus in general negative, in this case

Your answer
Enter the A, B, C and D matrices of this state-space system
A = [ -0.2000 0.0600 0 -0.9610; 0 0 1.0000 0; -17.0000 0 -3.8000 4.5100; 9.4000
0 -0.4000 -5.1500 ]

B = [-0.0100 0.0600; 0 0; -32.0000 5.4000; 2.6000 -7.0000 ]

C=[1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 12/33
6/30/2020 Practicon Exercise System TU Delft

D = [0 0; 0 0; 0 0; 0 0]

The model answer


Enter the A, B, C and D matrices of this state-space system
A = [ -0.2, 0.06, 0.0, -0.961;
0.0, 0.0, 1.0, 0.0;
-17.0, 0.0, -3.8, 4.51;
9.4, 0.0, -0.4, -5.15 ]

B = [ -0.01, 0.06;
0.0, 0.0;
-32.0, 5.4;
2.6, -7.0 ]

C = [ 1, 0, 0, 0;
0, 1, 0, 0;
0, 0, 1, 0;
0, 0, 0, 1 ]

D = [ 0, 0;
0, 0;
0, 0;
0, 0 ]

Explanation / script
A = [ -0.2 0.06 0 -1;...
0 0 1 0;...

Feedback
Nice, a perfect score.
The procedure is nothing fancy. The only thing you need to carefully consider is getting the proper feedback
matrix.

Note that the feedback gain is

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 13/33
6/30/2020 Practicon Exercise System TU Delft

A block diagram for the system is given above. The input and output to the system in this case are not single
signals, but vectors. The input to the feedback matrix in this case is thus the output vector of the system. It
should produce a control vector that is compatible with the input vector of the system, thus containing 2
elements.

Enter that matrix in Matlab or Python, and use the feedback command to produce the closed-loop system.

% I hope by now you learned to keep your models in files, so you still
% have sys0, representing the state-space system of the asymmetric
% motions of the aircraft. You need a model that has the following
% outputs, beta, phi, p and r, so the C and D matrices must be modified
% if you need the A and B matrices, go look for them!
C = eye(4,4)
D = zeros(4,2)
sys = ss(A, B, C, D)
% now make a proper feedback matrix; feed back the 4th output (r) to the
% 2nd input (rudder, delta_r)
% think of this matrix as being multiplied by a 4-element vector (the
% output vector), and then producing a 2-element vector (the input vector)
Kr = -0.65
K = [ 0 0 0 0; 0 0 0 Kr];
sysc = feedback(sys, K)

The same in Python

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 14/33
6/30/2020 Practicon Exercise System TU Delft

from control.matlab import *


import numpy as np
import matplotlib.pyplot as plt

# I hope by now you learned to keep your models in files, so you still
# have sys0, representing the state-space system of the asymmetric
# motions of the aircraft. You need a model that has the following
# outputs, beta, phi, p and r, so the C and D matrices must be modified
# if you need the A and B matrices, go look for them!
C = np.eye(4)
D = np.zeros((4,2))
sys = ss(A, B, C, D)

# now make a proper feedback matrix; feed back the 4th output (r) to the
# 2nd input (rudder, delta_r)
# think of this matrix as being multiplied by a 4-element vector (the
# output vector), and then producing a 2-element vector (the input vector)
Kr = -0.65
K = np.mat([[0, 0, 0, 0],[0, 0, 0, Kr]])
sysc = sys.feedback(K)

print(sysc)

In the previous example one can easily see that the aircraft with the yaw damper has better dutch roll
damping, by inspecting the eigenvalues of the A matrix.

Now, the damping may have been improved, but the airplane should still be flyable like a conventional
airplane; the yaw damper will also be active when the pilot flies the airplane manually. To check whether the
airplane's behaviour has changed in other aspects, we test the response to a block-shaped aileron input -- an
input signal that is representative of the input needed to enter a turn; a pilot will not exactly create a block
input signal for a entering turn, but something that looks a lot like it.

This response is calculated for three cases. Once for the aircraft without yaw damper, once of the aircraft with
the yaw damper, and once for the aircraft with a modified yaw damper.

The modified yaw damper uses a "wash-out" filter. This is commonly also called a "high-pass" filter, since it
passes (sine) signals with a high frequency, and blocks those with a low frequency. Discussion of these filters
returns in Lectures 11 to 14, but to get an idea, you might try to calculate the response to a step input signal
with such a filter.

For this step you need the aircraft model with the yaw rate as (single) output, and the aileron and rudder as
inputs, so modify the C and D matrices accordingly.

The wash-out filter is given as:

Thus, a state-space system with a state-vector with only one element. To save you some time, and maybe
make you realise how flexible Matlab actually is, here is the code to make the new feedback "matrix" (or
actually a feedback system), with the wash-out filter:

K = [0; Kr * ss(-0.5, 0.5, -1, 1)]

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 15/33
6/30/2020 Practicon Exercise System TU Delft

Again, . This assumes your system has two input signals, and , and you trimmed it to one output signal, only
the yaw rate $r$. The controller provides a corrective input to (zero, obviously) and to (Kd * ss(-0.5,
0.5, -1, 1) times the yaw rate).

In Python, the trick of entering a state-space matrix as element in a matrix does not work, and you need to
enter the complete feedback system, which accepts one input (yaw rate), and provides two outputs, of which
the first is always 0. The feedback system with wash-out is:

import numpy as np
from control.matlab import ss

# feedback system for washout yaw damper


A_fb = np.mat([[-0.5]])
B_fb = np.mat([[0.5]])
C_fb = np.mat([[0], [-Kr]])
D_fb = np.mat([[0], [Kr]])
K_wash = ss(A_fb, B_fb, C_fb, D_fb)

So the job at hand is:

Create a time vector from 0.1 to 20 seconds, take 0.1 s steps


Create an input signal as a vector with two columns, one with 1's in the first second (verify that you
have 10 "1" values), and with the remaining values 0, and the second column with only zeros. The
number of rows has to match the time vector. The first column thus gives you the aileron input, the
second column gives the rudder input, which in this case is not used by the pilot.
Prepare the three systems, all three with aileron and rudder input and yaw rate output. The original
aircraft, the aircraft with the yaw damper feedback from the previous question, and the aircraft with the
yaw damper feedback and the wash-out filter.
Calculate the yaw response for the three systems to the input you prepared. Plot this response, and
answer the following questions.

Your answer
What is the damping coefficient of the dutch-roll mode (the oscillatory pair
7.98e-02
of poles) for the basic aircraft?
What is the damping coefficient of the dutch-roll mode (the oscillatory pair
7.72e-01
of poles) for the aircraft with the simple yaw damper?
For the aircraft without the yaw damper, what is the yaw rate at ? -0.3248
For the aircraft with the simple yaw damper, i.e., when the yaw damper
-0.1120
consists of only a gain, what is the yaw rate at ?
For the aircraft with the more complex yaw damper, i.e., when the yaw
damper consists of a gain and uses a wash-out filter, what is the yaw rate -0.3060
at ?

The model answer


What is the damping coefficient of the dutch-roll mode (the oscillatory pair
0.079831389
of poles) for the basic aircraft?

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 16/33
6/30/2020 Practicon Exercise System TU Delft

What is the damping coefficient of the dutch-roll mode (the oscillatory pair
0.77249975
of poles) for the aircraft with the simple yaw damper?
For the aircraft without the yaw damper, what is the yaw rate at ? -0.30844554
For the aircraft with the simple yaw damper, i.e., when the yaw damper
-0.10628481
consists of only a gain, what is the yaw rate at ?
For the aircraft with the more complex yaw damper, i.e., when the yaw
damper consists of a gain and uses a wash-out filter, what is the yaw rate -0.29069598
at ?
Explanation / script
A = [ -0.2 0.06 0 -1;...
0 0 1 0;...

Feedback
Nice, a perfect score.
Now, this assignment already looked like some mature Matlab or Python control engineering! For the
technicalities, look at the example implementation:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 17/33
6/30/2020 Practicon Exercise System TU Delft

% first enter the basic aircraft


A= [ -0.2 0.06 0 -1;
0 0 1 0 ;
-17 0 -3.8 1
9.4 0 -0.4 -0.6];
B = [ -0.01 0.06
0 0
-32 5.4
2.6 -7 ];
% only need to feed back / look at yaw rate r,
% so create custom output matrices
C = [ 0 0 0 1]
D = [ 0 0]
% the basic system
sys0 = ss(A, B, C, D)
% two variants with yaw dampers
% in this feedback step, the gain is in the feedback matrix
Kr = -0.65
Hr1 = [ 0; Kr]
sys1 = feedback(sys0, Hr1)
% in the second system, the gain is with a simple system, a "wash-out" filter
Hr2 = [0; Kr * ss(-0.5, 0.5, -1, 1)]
sys2 = feedback(sys0, Hr2)
% for the first two values, you need to answer with the damping
% coefficient of the complex poles
damp(sys0)
damp(sys1)
damp(sys2) % for completeness
% now, the time vector, as requested
t = 0.1:0.1:20;
% the input vector. Note that (you will find out when you use lsim) you
% need two columns, one for each input
u = [t' <= 1, zeros(size(t'))];
% responses
y0 = lsim(sys0, u, t);
y1 = lsim(sys1, u, t);
y2 = lsim(sys2, u, t);
% plotting, all three signals in different colors
plot(t, [y0, y1, y2])
% last (20s) value
y0(end)
y1(end)
y2(end)

The python version:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 18/33
6/30/2020 Practicon Exercise System TU Delft

from control.matlab import *


import numpy as np
import matplotlib.pyplot as plt

# enter the basic aircraft again


A = np.mat('''-0.2 0.06 0 -1;
0 0 1 0;
-17 0 -3.8 1;
9.4 0 -0.4 -0.6''')
B = np.mat('''-0.01 0.06;
0 0;
-32 5.4;
2.6 -7''')
C = np.mat('0 0 0 1') # trimmed to give only yaw rate
D = np.zeros((1,2)) # this one too
sys = ss(A, B, C, D)

# now make versions with yaw damper; plain one and the one with the washout
# filter
Kr = -0.65
# feedback matrix for plain yaw damper
K_plain = np.mat([[0],[Kr]])
sys_plain = sys.feedback(K_plain)

# feedback system for washout yaw damper, one input, two outputs,
# da is always 0, and dr
A_fb = np.mat([[-0.5]])
B_fb = np.mat([[0.5]])
C_fb = np.mat([[0], [-Kr]])
D_fb = np.mat([[0], [Kr]])
K_wash = ss(A_fb, B_fb, C_fb, D_fb)
sys_wash = sys.feedback(K_wash)

# calculations and plots for all three systems


t = np.arange(0.1, 20.1, 0.1)
u = np.zeros((t.size, 2))
u[:10,0] = 1.0
for i, (name, system) in enumerate([ ('no damper', sys),
('plain damper', sys_plain),
('washout damper', sys_wash) ]):
print(name)
damp(system, True)
y, t, _x = lsim(system, u, t)
print("value at 20s", y[-1])
plt.subplot(3,1,i+1)
plt.plot(t, y)
plt.title(name)

plt.show()

You see that the response of the aircraft without yaw damper oscillates quite a lot. The Dutch Roll is really
kicking in here! The damping coefficient corresponding to this motion is quite low, approximately 0.08, so that
is what you can expect.
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 19/33
6/30/2020 Practicon Exercise System TU Delft

Here is an example plot with :

For the aircraft with either one of the yaw dampers you get quite good damping for the dutch roll, in the order
of 0.7. Initially, the two responses for the aircraft with the two yaw damper variants (green and red lines in my
plot) look quite similar. However, then the yaw rate of the aircraft with our original yaw damper (with only a
gain ) starts to reduce again. This is not desired, since it means that after the pilot has started the turn, the
aircraft will straighten itself out of the turn again. Conventional aircraft will stay in the turn.

How does the washout filter fix that? Without the washout filter, the yaw damper senses a constant turn rate
(intended by the pilot!) during the turn. The damper control rate makes the rudder constantly deflect against
that, effectively counteracting the turn of the aircraft and reducing the turn rate. A wash-out filter removes
(``washes out'') the constant values it sees in the input. Try a step response with just the washout filter:

t = 0:0.1:10;
wash = ss(-0.5, 0.5, -1, 1)
y = step(wash, t);
plot(t, y)

Or in Python

wash = ss(-0.5, 0.5, -1, 1)


t = np.arange(0, 10, 0.1)
y, t = step(wash, t)
plt.plot(t, y)
plt.show()

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 20/33
6/30/2020 Practicon Exercise System TU Delft

You see the output jumping to 1 at the start of the response, but then the output reduces and goes to 0. This
means that after a short while in the turn the washout filter removes the constant turn rate sensed, and the
yaw damper will set the rudder to 0 again; the aircraft stays in the turn.

As you can see the washout filter did not affect the ability of the yaw damper to improve the damping of the
dutch roll. The dutch roll oscillations are fast enough to pass almost completely through the washout filter.
Tuning of such filters is generally done in the "frequency domain", where a system is characterised by which
frequencies of sine signals it passes respectively blocks. This is treated in lectures 11 to 14.

Constructing system models


Notice (May 27, 2011, May 22, 2013, May 27, 2014)
To speed things up, you may skip over this chapter on model constructing from small pieces. The exam will
not contain any questions requiring this technique. Note that you still need to know how to make a state-
space system from a (not too complex) block diagram with some transfer functions, as shown in Lecture 5.

Introduction
A fundamental skill in systems and control theory is the creation of the system model. In many real-life
projects, design of the control systems and evaluation of the system dynamics starts while the system is in
the design phase. You have bits and pieces of the system, that have to be combined into a system model.
You might have an initial design of the controller in transfer function form, a model for the system dynamics in
state-space form, and specifications for the control actuators (that move e.g., the elevator, aileron and rudder
of the aircraft) and sensors (to measure attitude, altitude, etc.) that you can convert into a transfer function or
a state-space model.

It is possible to write out a state-space model for the total system by hand, and then enter it into a CACSD
package, but it is also possible, and often much quicker, to enter the bits and pieces in the CACSD package
as individual system models, and then combine them. In this part of the e-lecture, you practice just that.

Step 1, building the pieces


As an example, consider the following figure, which depicts a control system for a satellite:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 21/33
6/30/2020 Practicon Exercise System TU Delft

It contains a controller with a gain and a double integrator that models the kinematics of the satellite (division
of the total torque by the inertia of the satellite gives rotational acceleration; integrate that once and you get
rotational velocity; integrate again and you get the angular position). The satellite attitude is measured with a
sensor, and the sensor dynamics are given as a transfer function:
The rotational velocity is measured by the same sensor. To represent that a differentiating block is added in
the block diagram (with an s; representing differentiation). This rotational velocity is added to the position
measured by the sensor, and then used in the feedback path.

Suppose that we need a system model with the following:

Input is commanded attitude,


Outputs are the output of the controller, satellite attitude and satellite rotational velocity.

In this first step, a series of ``small'' systems is created for all the little pieces of the system. Note that the
process of constructing a system model will require consistent bookkeeping, so that later we don't end up
connecting the wrong pieces of the model.

First part is the satellite attitude response to torque. This is modelled as a double integrator, for convenience
the moment of inertia is assumed to be 1. We need as outputs the satellite attitude and its velocity. Start by
entering the satellite as a transfer function:

s = tf('s')
h1 = 1/s^2

To get the velocity as an output, a transfer function matrix is needed, 1 input, and two outputs.

hs = [h1; ... % attitude out


h1*s] % differentiated attitude = velocity out

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 22/33
6/30/2020 Practicon Exercise System TU Delft

Convert this to a state-space system:

ssat = ss(hs)

The python version of this all

from control.matlab import tf, ss, append, connect


import scipy as sp

# for 2-output, 1-input transfer functions, either enter the coefficient


# matrices directly, as done here
hs = tf([[[1.]],
[[1, 0]]],
[[[1, 0, 0]],
[[1., 0, 0]]])
ssat = ss(hs)

Verify that it has two states, two outputs and one input. We requested that the first output would be the
attitude, and the second would be the velocity. From the C matrix we see that apparently the first state
variable is the attitude, and the second is the velocity. However, you cannot always count on that, ssis free to
choose its own preferred state variables!

The next system to convert is the transfer function for the sensor. Here we have the same requirement, we
need measured output and the velocity.

Let's see what Matlab makes of this:

% enter the transfer function


h2 = 40/(s^2 + 12*s + 40)
hm = [ h2; ... % attitude (measured)
h2*s ] % rotational velocity (measured)
% convert to state-space
ssen = ss(hm)

And now Python's turn

s = tf([1, 0], [1])

# or copy num and den from a transfer function created;


# need tf and derivative here
h2 = 40/(s**2 + 12*s + 40)
hm = tf([[h2.num[0][0]],
[(h2*s).num[0][0]]],
[[h2.den[0][0]],
[(h2*s).den[0][0]]])
ssen = ss(hm)

The last system we need is the controller. The controller has no dynamics, simply a gain, and the following
code is valid for both Matlab and Python:

Ks = 0.5

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 23/33
6/30/2020 Practicon Exercise System TU Delft

Since the controller has no dynamics, it is not necessary to enter a full system, in the next section you will see
that the simple variable Kscan simply be used as a system with one input and one output.

Step 2, making one big model


The two state-space systems can now be combined in one, with the command append, valid in both Matlab
and Python:

sys = append(ssat, ssen, Ks)

Examine this system, and compare it to the three systems made earlier. What happened is that we now have
a system with:

Three inputs, instead of three systems with one input each.


Four states, instead of two systems with two states each, and one system with 0 states (the gain ).
Five outputs, instead of two systems with two outputs each and a system with one output.
Apparently no connection between the original sub-systems. A is a ``block diagonal'' matrix, in which
you can easily recognise the A matrices of the ssat and ssen systems.

The command appendsimply glued the systems together. The first input, the first two states and the first two
outputs correspond to the first system, the next input and two outputs correspond to the other system, and the
last input and output correspond to the gain .

The model that we end up with can be seen in the following picture.

Step 3, forming links and trimming


In Matlab, connecting the model and selecting the wanted inputs and outputs can be done in one step with
the command connect.

Let's look again at the list of inputs and outputs for the combined model:

The satellite attitude is output 1


The satellite rate is output 2
The attitude measured by the measurement sensor is output 3
The rate of the above is output 4
The controller gain is output 5
The satellite input is input 1
The measurement sensor is input 2

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 24/33
6/30/2020 Practicon Exercise System TU Delft

The controller input is input 3

The command connectneeds the unconnected system, a connection matrix and vectors which indicate the
final inputs and outputs.

The connection matrix lists, for each input in the system, what outputs are connected to it. Each row of the
connection matrix specifies that for one of the inputs. For example, to connect the output of the controller (#
5) to the input of the satellite, we need a row with:

Q = [1 5]

The ``1'' here indicates the first input, and ``5'' indicates the 5th output.

The input of the controller (#3) needs to be connected to the output of the sensor and to the sensor rate (#3
and #4). Note however, that this is feedback, and there is a ``-'' in the summation; to tell that to Matlab, we
have to add a - to the connection:

Q = [ 1 5 0; ... % connecting the input of the satellite


3 -3 -4] % connecting the sensor to the controller (feedback)

To keep matrix Qsquare, we needed to add a 0 to the first row. Extending the matrix further, by connecting the
satellite output (#1) to the sensor input (#2):

Q = [ 1 5 0; ... % connecting the input of the satellite


3 -3 -4; ... % connecting the sensor to the controller (feedback)
2 1 0] % input of sensor gets satellite attitude
% connection matrix is now complete

The next step is selecting the inputs and outputs. From the assignment, we need one input, , which enters at
the controller (input #3), and three outputs; the controller output, attitude and rotational velocity, so outputs #5,
#1 and #2. Enter this in Matlab:

inputs = [ 3 ]
outputs = [5 1 2]

Now use the connectcommand:

sysc = connect(sys, Q, inputs, outputs)

The python version of the procedure above:

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 25/33
6/30/2020 Practicon Exercise System TU Delft

# connect the inputs and outputs


# outputs 1 and 2: system theta and thetadot
# outputs 3 and 4: sensor theta and thetadot
# output 4: controller
# 1st input: system input, connected to the controller output (5)
# 2nd input: sensor input, connected to satellite theta (1)
# 3rd input: controller in, feedback from sensed position and speed (-3, -4)
Q = sp.mat('''1 5 0;
2 1 0;
3 -3 -4''')

# remaining input: controller (3)


inputv = [3]
# remaining outputs: controller, theta, thetadot
outputv = [5, 1, 2]
sysc = connect(sys, Q, inputv, outputv)
print sysc

The Matlab help pages can explain you more about the connect command. Inspect the connected system.
You will see that the A matrix now contains additional non-zero elements, off the ``block diagonal''. The B
matrix is trimmed to represent the single external input, and the C matrix is trimmed to the three desired
outputs. The D matrix contains a non-zero element, indicating ``direct feedthrough'', in the output representing
the control signal to the satellite.

Note that this procedure requires careful bookkeeping. Mix up inputs and outputs, and you end up with a
system that is not at all what you intended to. One way to at least partially check your work is to create a
transfer function for the closed-loop system, and verify that at least the eigenvalues of the A matrix are equal
to the poles of your transfer function:

hc = feedback(Ks * h1, h2 * (1 + s))


pole(hc)
eig(sysc.A)

Or, with Python

hc = (Ks / s**2).feedback(h2 * (1 + s))


print hc.pole()
print sp.linalg.eig(sysc.A)[0]

If you can't remember why this should be true, check Nise's book, Chapter 4.10

Python version
Note that you will need a new control module for this to work in Python

The following block diagram shows a controller for the roll angle of an aircraft. Please give a description for
this system in state-space format. The output vector should contain output of the autopilot, the actuator
output (is equal to the aileron deflection) and the aircraft roll angle, in that order.

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 26/33
6/30/2020 Practicon Exercise System TU Delft

The coefficients for the system are:

4
1.2
0.4

Your answer
Enter the A, B, C and D matrices of this state-space system
A = [ -5.0000 -2.2500 0 -1.3333; 4.0000 0 0 0; 0 2.2500 -0.8333 0; 0
0 1.0000 0 ]

B = [ 0.800; 0; 0; 0 ]

C = [0 0 0 -0.6667; 0 1.1250 0 0; 0 0 0 1.6667 ]

D = [ 0.4; 0; 0 ]

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 27/33
6/30/2020 Practicon Exercise System TU Delft

The model answer


Enter the A, B, C and D matrices of this state-space system
A = [ 0.0, 4.0, 0.0, 0.0;
-2.25, -5.0, -2.1908902, 0.0;
0.0, 0.0, 0.0, 1.0;
1.3693064, 0.0, 0.0, -0.83333333 ]

B = [ 0.0;
1.2;
0.0;
0.0 ]

C = [ 0.0, 0.0, -0.73029674, 0.0;


0.75, 0.0, 0.0, 0.0;
0.0, 0.0, 1.8257419, 0.0 ]

D = [ 0.4;
0.0;
0.0 ]

Explanation / script
%electure 8 connections

Feedback
Very good, a perfect score.

Matlab variant
First create the pieces:

s = tf('s')
// autopilot
Kap = 0.4
% actuator
Hact = ss(9/(s^2 + 5*s + 9))
% aircraft
Ka = 4
tau_a = 1.2
Hac = ss(Ka/(1+tau_a*s)/s)

Then join everything. Output list will be, after this step: output of autopilot, actuator output (), aircraft roll angle
().
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 28/33
6/30/2020 Practicon Exercise System TU Delft

sys = append(Kap, Hact, Hac)


Q = [1 -3; ... % feedback phi
2 1; ... % connect autopilot out
3 2] % connect a/c to actuator
inputs = [1]
outputs = 1:3
% connect
sys = connect(sys, Q, inputs, outputs)

Python variant
First create the pieces:

import numpy as np
from control.matlab import *

# Laplace variable
s = tf([1, 0], [1])

# autopilot gain
Kap = 0.4
# actuator
Hact = ss(9/(s**2 + 5*s + 9))
# aircraft
Ka = 4
tau_a = 1.2
Hac = ss(Ka/(1+tau_a*s)/s)

# python-control append will not work when it starts with Kap, need to have
# a state-space system first
sys = append(Hact, Hac, Kap)

Then join everything. Output list will be, after this step: output of autopilot, actuator output (), aircraft roll angle
().

# indexing,
# input 1: actuator, connect to autopilot (3)
# input 2: aircraft, connect to actuator (1)
# input 3: autopilot gain, negative feedback from aircraft (-2)
Q = np.mat('''1 3;
2 1;
3 -2''')

inputs = [3]
outputs = [3, 1, 2]

# connect
sysc = connect(sys, Q, inputs, outputs)
print(sysc)

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 29/33
6/30/2020 Practicon Exercise System TU Delft

A model for the altitude response of the Moller SkyCar Moller International (http://www.moller.com/)is shown
in the following block diagram, in combination with a model for the control system. Convert the following
diagram into a state-space model, with the reference altitude () as input and the altitude () and the output of
the controller (), in that order, as output signals.

Create the state space model using a gain = 0.8.

Your answer
Enter the A, B, C and D matrices of this state-space system
A = [-10.0000 0 0 0 0 -16.0000; 1.0000 0 0 0 0 0; -9.5000
0.2500 -1.0000 -2.0000 0 -16.000; 0 0 2.0000 0 0 0; 0 0 0 1.0000
0 0; 0 0 0 0 1.0000 0
]

B = [16; 0; 16; 0; 0; 0 ]

C=[ 0 0 0 0 0 1; -19.0000 0.5000 0 0 0 -32 ]

D = [0; 32 ]

The model answer


Enter the A, B, C and D matrices of this state-space system
A = [ 0.0, 1.0, 0.0, 0.0, 0.0, 0.0;
0.0, 0.0, 0.5, 0.0, 0.0, 0.0;
0.0, 0.0, 0.0, 2.0, 0.0, 0.0;
-32.0, 0.0, -2.0, -1.0, -17.216569, 3.5527137e-15;

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 30/33
6/30/2020 Practicon Exercise System TU Delft

B = [ 0.0;
0.0;
0.0;
32.0;

C = [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0;


-32.0, 0.0, 0.0, 0.0, -17.216569, 3.5527137e-15 ]

D = [ 0;
32 ]

Explanation / script
s = tf('s');
K = 0.8;

Feedback
Very good, a perfect score.
First create the pieces:

s = tf('s')
% fill in your controller gain
K = 0.8
% controller transfer function, g
G = K*(4*s^2 + 2*s + 1)/(s*(1 + 0.1*s))
% system transfer function, the Skycar
H = 1/s^2/(s^2 + s + 4)

Then put the pieces together and connect.

% convert to state-space and combine in one big system


% doing H first, then G so that altitude is first output and
% controller output second.
sys = append(ss(H), ss(G))
Q = [1 2; ... % controller output (2) -> skycar input (1)
2 -1] % skycar output (1) -> controller input (2), feedback
inputs = [ 2 ]
outputs = [ 1 2]
% connect and clean up
sys = connect(sys, Q, inputs, outputs)

The procedure in Python is not that much different

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 31/33
6/30/2020 Practicon Exercise System TU Delft

from control.matlab import tf, ss, append, connect

# Laplace variable, (1*s+0)/(1)


s = tf([1, 0], [1])

K = 0.8
# controller transfer function, g
G = K*(4*s**2 + 2*s + 1)/(s*(1 + 0.1*s))
# system transfer function, the Skycar
H = 1/s**2/(s**2 + s + 4)

# convert to state-space and combine in one big system


# doing H first, then G so that altitude is first output and
# controller output second.
sys = append(ss(H), ss(G))
Q = [[1, 2], # controller output (2) -> skycar input (1)
[2, -1]] # skycar output (1) -> controller input (2), feedback
inputs = [ 2 ]
outputs = [ 1, 2]
# connect and clean up
sys = connect(sys, Q, inputs, outputs)
print(sys)

I will be re-using the skycar later in the lecture, because it has some quite interesting (and strange)
properties.

Lecture 8 -- Properties and more State-Space


systems
Conclusion
Just like in Lecture 7, you have looked a bit at time responses, and tried to identify the transfer function
properties related to these.

Most systems have either one dominant pole or a complex pair of dominant poles. These are the poles
closest to the origin in the complex s-plane. As you calculated the step-response for such a system, you see
that the response looks most like the response of the dominant pole alone.

With the example of the yaw damper, you saw that the bad damping coefficient of the dutch roll causes
oscillatory responses. Improving the damping coefficient with yaw rate feedback helps significantly.

This example also showed of the use of state-space systems in control theory. Depending on the needed
outputs, the C and D matrices can be adjusted, and with the feedbackcommand the controller can be made,
resulting in a new state-space system for the closed-loop system.

For converting larger and more complex diagrams, you can use the append and connect calls. With these,
you can let Matlab combine your sub-systems for you.

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 32/33
6/30/2020 Practicon Exercise System TU Delft

All in all, you should now be prepared for control theory with the most basic method, ``trial and error''. You
know how to read and correlate system response properties (damping, zeros, poles, dominant poles), you
can handle system models in differential equation, transfer function and state-space form, you know the basic
controller types (P, PI, PD, PID), you can create closed-loop systems from block diagrams (with feedback or
connect) and you can calculate responses.

In the following lectures we will focus on better tuning methods than the trial and error approach, starting with
root-locus in Lecture 9.

Practicon web-based exercise system, version: 6.0 (Feb 2015)

https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 33/33

You might also like