Satellite Attitude Control With Frequency Domain
Satellite Attitude Control With Frequency Domain
Lecture 12
ae2204 Aerospace Systems and Control Theory
With answers and notes by Anthony Cummins (4436253)
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 1/32
6/22/2020 Practicon Exercise System TU Delft
To keep things a bit limited, however, we only look at control around a single orientation axis, and we limit the
multi in multi-body modelling to two.
This results in a system consisting of two rigid bodies, connected by a (torsion) link that can be modelled as a
spring with little damping. The following picture gives the system:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 2/32
6/22/2020 Practicon Exercise System TU Delft
We assume that we can exert a torque on the satellite with a flywheel, so the control input to the system is a
torque on the satellite body (with the small intertia). In general, the payload (the antenna, in case of the
HALCA satellite), has to be oriented. Below an example of such a flywheel:
For the modelling, we will start by translating the satellite problem into a block diagram first. The satellite is
modelled by two rigid bodies, each with their own moment of inertia, and connected with a torsional spring
and a torsional damper. A flywheel, which we assume to be a perfect and infinitely fast torque generator, is
attached to the satellite body.
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 3/32
6/22/2020 Practicon Exercise System TU Delft
Consider the following block diagrams, and select the one correct ones.
Your answer
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 4/32
6/22/2020 Practicon Exercise System TU Delft
Explanation / script
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 5/32
6/22/2020 Practicon Exercise System TU Delft
Feedback
Very good, a perfect score. Keep up the good work.
The correct block diagram is:
The first block 1/(Jb s2 ) represents the inertia of the satellite body. Two moments are acting on this inertia:
the moment exerted by the torque wheel (T ) is the first. The second is the moment from the link with the
other (payload) body part.
k(θb − θp )
˙ ˙
b(θb − θp )
This can be converted to the laplace domain, and taking the total moment in the link:
k(θb − θp ) + bs(θb − θp )
This calculation takes place in the second block. The signal entering this block is the difference between the
rotation of the two bodies: θb − θp . Barring any influence from outside actors, this is also the total moment
exerted on the payload.
The payload transfer function 1/(Jp s2 ) , is a mirror of the body transfer function, describing the payload
attitude as a consequence of the moment acting on the payload inertia.
The next step is to create a model or Matlab for the satellite. We will be analysing the model behaviour in the
frequency domain, look at time-domain responses, try different feedback approaches and look at both
payload and body speed and attitude. A model with multiple inputs and multiple outputs is needed, so like in
the exercise on the autopilot altitude hold mode, a state-space model is called for.
Let's build up the model by assembling the sub-systems, and then connecting all feedback loops, using the
Matlab connect call or the Scilab feedback operator. Consider the full block diagram below:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 6/32
6/22/2020 Practicon Exercise System TU Delft
Here, the moment contributions from the spring and the damper have been split out again. First, enter the
unconnected blocks into Matlab, like this:
Jb = 400;
Jp = 1000;
k = 10;
b = 5;
s = tf('s');
hb1 = 1/(Jb*s);
hb2 = 1/s;
hp1 = 1/(Jp*s);
hp2 = 1/s;
sat0 = append(ss(hb1), ss(hb2), k, b, ss(hp1), ss(hp2));
Now, I leave it up to you to properly connect these pieces, trim off all unnecessary inputs, and obtain a system
with:
Since you could skip this part of E-lecture 8, it might be that you do not know how to proceed here. To help
you, the following "hint" presents the solution.
Your answer
Enter the A, B, C and D matrices of your system model
A = [ -0.0125 -0.6250 0.0100 0.6250; 0.0400 0 0 0; 0.0063 0.3125 -0.0050
-0.3125; 0 0 0.0320 0 ]
B = [0.0625; 0; 0; 0 ]
D = [0; 0; 0; 0 ]
B = [ 0.05;
0.0;
0.0;
0.0 ]
D = [ 0;
0;
0;
0]
Explanation / script
Jb = 400;
Jp = 1000;
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 8/32
6/22/2020 Practicon Exercise System TU Delft
Python variant
Jb = 400;
Jp = 1000;
k = 10;
b = 5;
s = tf([1, 0], [1]);
hb1 = 1/(Jb*s);
hb2 = 1/s;
hp1 = 1/(Jp*s);
hp2 = 1/s;
sat0 = append(ss(hb1), ss(hb2), k, b, ss(hp1), ss(hp2));
Feedback
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 9/32
6/22/2020 Practicon Exercise System TU Delft
It is all a question of bookkeeping. Keep in mind in which order the systems are entered in the combined
system, and carefully connect everything. Let's start with the Matlab version, the base system was entered
as:
Python variant
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 10/32
6/22/2020 Practicon Exercise System TU Delft
Jb = 400;
Jp = 1000;
k = 10;
b = 5;
s = tf([1, 0], [1]);
hb1 = 1/(Jb*s);
hb2 = 1/s;
hp1 = 1/(Jp*s);
hp2 = 1/s;
sat0 = append(ss(hb1), ss(hb2), k, b, ss(hp1), ss(hp2));
With these models, we will start to analyse the satellite's behaviour and design and tune controllers.
Your notes:
Q matrix elements represent the subscripts on inputs and outputs.
Before we start off with controlling the satellite, let us first inspect the thing without controller. There are
several things we can do to understand what we are dealing with. The first step would be to create transfer
functions for the system's body attitude (the one we are measuring and using for feedback) and payload
attitude (the one we wat to actually control), and inspect those.
Another thing to try would be to apply a familiar input signal, let's take a step input here, and see what the
output is. Apply a unit step input to the system, and plot the two velocities θ˙ b and θ˙ p , taking a 100 second
time span (the satellite is not that fast!). Check the statements that are true from the following list.
Note that (but check this) the Python version of the step command gives you only one output signal
Your answer
Mark the statements that are true
After 100 seconds, the payload will have a higher rotational speed than the satellite body
After 100 seconds, the payload will have rotated more than the body
The satellite transfer functions for the payload attitude response to the torque input is a type 2 system
The satellite transfer functions for the payload attitude response to the torque input is a type 0 system
The satellite transfer functions for the payload attitude response to the torque input is a type 1 system
Fill in the following results
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 11/32
6/22/2020 Practicon Exercise System TU Delft
What is the damping coefficient of the pair of complex poles in the transfer
function that describes the rotation of the satellite body in response to 0.0468
torque input
What is the absolute value of the largest difference in rotation between the
0.1331
payload and the body
Feedback
Very good, it is perfect now. Keep up the good work.
Well, I hope you have seen in creating the step response plots, and in analysing the transfer function, that the
satellite has a pair of pretty badly damped poles. An ``abrupt'' input, such as the step input we tested the
satellite with, introduces an oscillation in the satellite that takes hundreds of seconds to quiet down again. We
will proceed to create an attitude controller for the satellite, and see that this oscillation severely limits the
options for this attitude controller (and after that, we explore a fix).
For those of you who did not succeed in getting the answers to the questions right, here is the Matlab script
for inspecting the open-loop system:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 12/32
6/22/2020 Practicon Exercise System TU Delft
# calculate damping
damp(sat1)
Now that the basic system is in Matlab, and we have seen its properties, let's work a bit more on getting an
attitude control for this device.
You have seen that the basic system is a type 2 system. On the one hand this is nice; you know that if you
create the proper controller and give the system a ramp (constant rotation speed) to track, it will do so with
zero steady-state error. However, the problem this creates become clear when you plot the transfer function
(take torque input to payload position) in a Bode plot. A reasonable range for this (it is a slow system after all)
would be from 0.001 to 1[rad s−1 ].
Assuming we can measure the attitude of the payload, we will use this measurement to controll the torque
wheel that is on the sattelite body. As you can see from the Bode plot, there is no region where the open-loop
system has a positive phase margin.
Assuming that the attitude rate of the payload can also be measured (e.g. with a rate gyro), a PD controller
can be applied:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 13/32
6/22/2020 Practicon Exercise System TU Delft
GP D (s) = Kp (1 + Kd /Kp s)
The ratio Kd /Kp is taken to be 50, to tune the compensating network. Create a Bode plot for the
combination of this network (initially take Kp = 1 ) and the open-loop satellite dynamics, and verify that there
is indeed a region with positive phase margin.
Your answer
How high is the resonance peak (in dB), near 0.03 Hz / 0.19 rad/s, for
combination of transfer functions of the compensator and the payload 6.3
attitude response
What value do you need to give Kp to have a gain margin of 6 dB for the
-12.3
open loop system with compensator?
For the value of Kp in the sub-question above, what will be the phase
80
margin (in degrees) of the open-loop system?
What will be the cross-over frequency in radians corresponding to that
36
gain?
Feedback
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 14/32
6/22/2020 Practicon Exercise System TU Delft
As you can see, there are not many possibilities with the badly damped oscillation in the satellite link ``in the
way''. To have only a small gain margin in the open-loop system (and you need that, otherwise the satellite
with the controller will form an unstable closed-loop system), the gain Kp must be tuned way down, to Kp =
0.24. This means that the cross-over frequency will also be low, and the gain margin is also pretty small.
You can put the ``corner frequency'' of the compensator even lower, but that cranks up the gain near the
oscillation even further. Another option would be to add a lag to the compensator, and only provide phase
margin in a small region. However, in the following we will explore the use of a notch filter, as a means to get
rid of this pesky oscillation!
To get to the proper combined transfer function for the compensator and the open-loop payload attitude
response to torque input, and then plot it, the following Matlab commands can be used:
Python version:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 15/32
6/22/2020 Practicon Exercise System TU Delft
# with controller
s = tf([1, 0], [1])
HpHc = Hp * (1+50*s)
# do a Bode plot
bode([HpHc], omega=sp.logspace(-3, 0, 500))
plt.show()
problems are also evident if you plot the closed-loop transfer function in a Bode plot, or when looking at the
step response of the controller. The following figure shows the step response of the closed-loop system:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 16/32
6/22/2020 Practicon Exercise System TU Delft
Two problems are evident. The system has a slow oscillation, with a faster oscillation on top. The slow
oscillation is related to the moderate phase margin of the closed-loop system, the faster oscillation is related
to the moderate gain margin.
Instead of a flat frequency response over a wide region, and then a drop in response, the Bode plot of the
closed-loop system clearly shows the effect of the small gain margin near the oscillation peak.
Notch filters
It may be clear that the oscillation is a problem for the control of the satellite. One solution is to send up more
material; making the link between the two satellite parts stiffer and better damped. However, that may be a
costly solution, and some more work on the controller might be just as effective.
Remember how a frequency response for a transfer function is calculated; one can fill in s = jω for the
parameters of the transfer function, and the magnitude of the complex numbers obtained for the different ω is
the gain of the sine response, while the angle of the complex number is the phase difference of the sine
response (see the slides for lecture~8).
To understand the relationship between the poles and zeros of a transfer function, and the frequency
response a bit better, write the transfer function in the following form:
N (s) (s − z1 ) … (s − zn )
H (s) = K = K
D(s) (s − p1 ) … (s − pn )
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 17/32
6/22/2020 Practicon Exercise System TU Delft
As an example, I have the following transfer function for you, with poles at p1,2 = −0.5 ± 1i and zeros at
z1,2 = −0.5 ± 2i :
What happens as we calculate the frequency response? Just fill in s = iω. But what does that mean?s = iω
is a point on the positive imaginary axis, and s − p1 can be seen as a vector, starting in p1 and ending on
that point s = iω. As we traverse the frequency ω , the length of the vector s − p1 will change. I depicted
this in comic-book style:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 18/32
6/22/2020 Practicon Exercise System TU Delft
The solution to the problem with the flexible satellite link is based on this knowledge. You create a transfer
function with a pair of zeros in the complex plane, near the frequencies you want to suppress, so near
s = ωno i and s = −ωno i. This type of filter is called a notch filter, since it ``carves'' a notch into the
frequency response.
A transfer function with only zeros, and without poles, will not be realizable, meaning that it cannot be
implemented with physical components. To make a notch filter practical, it will need at least as many poles as
zeros. The pole locations need to be chosen so that the poles' contribution to the frequency response does
not interfere with the controller.
2
1 + 2ζ1 s/ωno + (s/ωno )
Hno (s) =
2
1 + 2ζ2 s/ωno + (s/ωno )
The choices for the damping coefficients ζ1 and ζ2 influence the behaviour of the notch filter. To get a feel for
these filters, first implement it for a frequency ωno = 10(2π) [rad s−1 ], so, for 10[Hz]. Take ζ1 = 0.0 and
ζ2 = 0.7 , and implement the filter in Matlab.
One other application of notch filters is to smoothe the signals that are generated by D/A (digital to analog)
converters. For example the SIMONA research simulator uses notch filters on its commanded position input.
The commanded position for the simulator is driven by the simulation model, and changes 100 times per
second. After it changed, it is constant for 10 ms, creating a type of staircase signal. If that signal is applied to
the simulator directly, the simulator motion will not be smooth, but slightly rough, with an added vibration that
is also audible as a hum. One can see the staircase as a ramp with an added saw-tooth signal, which can be
de-composed as an infinite series of sines, starting with 100 Hz sine, and then smaller 200 Hz, 300 Hz, etc.,
components. The notch filter in the SIMONA research simulator filters out the 100 Hz component, and is
combined with a low-pass filter to get the higher-frequency (200 Hz and beyond) components out.
Now let's play with the 10 Hz notch filter. Create a staircase signal with 0.1 s intervals; in Matlab:
% staircase input
t = 0:0.001:0.5;
u = t - mod(t, 0.1);
import numpy as np
t = np.arange(0, 0.5, 0.001)
u = t - np.mod(t, 0.1);
Play around with the 10 Hz notch filter, create a Bode and a Polar/Nyquist plot and calculate and plot the
response to the staircase signal. Answer the following questions:
Your answer
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 19/32
6/22/2020 Practicon Exercise System TU Delft
Feedback
Very good, a perfect score. Keep up the good work.
As you could see, the notch filter suppresses signals in a narrow frequency band. The response to the
staircase signal looks peculiar, and more ``spiky'' than the original staircase signal, however, the base
frequency of the staircase signal (10 Hz, in the example, has been removed.
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 20/32
6/22/2020 Practicon Exercise System TU Delft
% staircase input
t = 0:0.001:0.5;
u = t - mod(t, 0.1);
% Notch filter
s=tf('s');
w = 10*2*pi;
z1 = 0;
z2 = 0.7;
Hno = (1+2*z1/w*s+s^2/w^2)/(1+2*z2/w*s+s^2/w^2);
% make time response and a plot
y = lsim(Hno, u, t);
figure(1); clf(); plot(t,y)
% plot a Bode diagram
figure(2); clf(); bode(Hno);
% plot a Nyquist diagram
figure(3); clf(); nyquist(Hno);
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 21/32
6/22/2020 Practicon Exercise System TU Delft
# imports
from control.matlab import tf, \
bode, lsim, nyquist
import matplotlib.pyplot as plt
import scipy as sp
# staircase input
t = sp.arange(0, 0.5, 0.001)
u = t - sp.mod(t, 0.1);
# 10 Hz notch filter
s = tf([1, 0], [1])
wno = 10*2*sp.pi
z1 = 0
z2 = 0.7
Hno = (1+2*z1/wno*s+s**2/wno**2)/(1+2*z2/wno*s+s**2/wno**2)
# time response
y, t, x = lsim(Hno, u, t)
f1 = plt.figure()
plt.plot(t, y)
# bode plot
f2 = plt.figure()
mag, phase, omega = bode(Hno, sp.logspace(1, 2, 500))
# get these frequencies. Note that the answer gets more precise with a
# sufficiently large logspace vector over a not too wide range
print(omega[mag < tendb][0], omega[mag < tendb][-1])
2
1 + 2ζ1 s/ωno + (s/ωno )
Hno (s) =
2
1 + 2ζ2 s/ωno + (s/ωno )
The oscillatory peak in the satellite's transfer function is at 0.187 rad/s. To show that the notch filter also works
if it is slightly out of tune (after all, we cannot perfectly predict the flexibility), take a frequency
ωno = 0.19 [rad/s] for the notch filter. We also take the damping coefficient to match more or less the
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 22/32
6/22/2020 Practicon Exercise System TU Delft
coefficient of the oscillation in the satellite, so ζ1 = 0.05 , and take ζ2 = 0.7 . Enter the transfer function for
the notch filter.
GP D (s) = Kp (1 + Kd /Kp s)
Create the open-loop transfer function for the combination of the controller, the notch filter and the satellite
model:
Create a Bode plot, using Kp = 1 , analyse, and answer the following questions:
Your answer
What is the cross-over frequency (in rad/s) 0.04
Feedback
Very good, a perfect score. Keep up the good work.
I hope you agree that the Bode plot for the open loop looks a lot nicer than the one without the notch filter.
The difference is even more clear if you plot the frequency response in a polar plot. The following graph
shows the frequency response for the open-loop system without the notch filter:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 23/32
6/22/2020 Practicon Exercise System TU Delft
If you add the notch filter, the ``wart'' created by the badly damped oscillation nicely disappears, leaving only
a small wiggle, because the notch filter and the oscillation are not exactly matched:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 24/32
6/22/2020 Practicon Exercise System TU Delft
The Matlab script to create the open-loop transfer function and a bode plot is given here:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 25/32
6/22/2020 Practicon Exercise System TU Delft
# start with the basic satellite model sat1, and get the
# payload attitude response
Hp = tf(sp.matrix([0, 0, 0, 1])*sat1)
# bode plot
bode(Hol, sp.logspace(-2, 0, 500))
plt.show()
# always check the margins, and compare with the Bode plot. Sometimes the margins are
# not correctly found (the above may yield a phase margin of at frequency 0, while the
# phase does not cross -180, but simply starts at -180 for frequency -> 0. In that case
# zoom in and read off from the plot
Tuning
Now it is time to tune the controller. Select a gain for Kp to achieve the highest cross-over frequency that
yields a phase margin of at least 47 degrees and a gain margin of at least 10 dB.
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 26/32
6/22/2020 Practicon Exercise System TU Delft
With time constant τP D = Kd /Kp =50 [rad/s] , the notch damping coefficients ζ1 = 0.05 and ζ2 = 0.7 ,
notch natural frequency ωno = 0.19 [rad/s] .
Your answer
Which criterion whas decisive for tuning the controller
The controller was tuned to comply with the phase margin requirement, after tuning, the gain margin
is larger than required.
The controller was tuned to comply with the gain margin requirement, after tuning the phase margin is
larger than required.
The requirements for both margins were equally critical, after tuning, the phase and gain margins both
exactly comply with the requirements.
Feedback
I like that. Keep up the good work.
It appeared that the phase margin was decisive in tuning the system. When tuned with a gain Kp =1.63, the
phase margin becomes 47 degrees, and the gain margin is still 10.5~[dB]. Note that without the notch filter we
had a very small gain margin for the open-loop system.
You can basically use the scripts from the previous question. Inspect the Bode plot (phase part) to see where
the phase crosses 47-180 = -133 degrees, and check the gain (in the gain plot) at that same frequency. The
gain there is approximately 0.61, or -4.29 dB. Increasing the gain by 1/0.61 (4.29 dB) puts the gain cross-over
here. I advise you to always check that; re-enter the controller with the new gain, and use the margin
command to check the margins.
We will proceed with checking the closed-loop properties of the system with this tuning.
Final check
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 27/32
6/22/2020 Practicon Exercise System TU Delft
Now it is time to check the performance of the system. The gain and phase margins used in tuning the open
loop indicate that the system will have limited overshoot this time. The system is also a type 2 system (two
poles in the origin), and we expect this system to be able to follow a ramp-shaped input signal. So, let us
create the closed-loop system, and check the closed loop Bode plot, the response to a step input and the
response to a ramp input. Take a time span of 250~[s] for the time response plots, and answer the following
questions:
Your answer
How large (in %) is the overshoot in response to a step input? 30.1
What is the value of the response to a unit ramp input at t = 250 [s] 0.9987
How large, in dB, is the resonance peak of the closed-loop frequency
0
response?
What is the bandwidth, in Hz, (with a -3 dB criterion) of the closed-loop
0.02
frequency response?
What is the damping coefficient ζ of the dominant pair of poles of the
1
closed-loop system?
What is the value of the response to a unit ramp input at t = 250 [s] 250.00385
How large, in dB, is the resonance peak of the closed-loop frequency
2.6151723
response?
What is the bandwidth, in Hz, (with a -3 dB criterion) of the closed-loop
0.02
frequency response?
What is the damping coefficient ζ of the dominant pair of poles of the
0.97244716
closed-loop system?
Explanation / script
Feedback
Here is the Matlab code to solve this question:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 28/32
6/22/2020 Practicon Exercise System TU Delft
% I assume that here you still have the basic satellite model
% Let us call it sat1, and the notch filter Hno
% The transfer function to get the payload attitude
Hp = minreal(tf([0 0 0 1]*sat1))
%% Enter the notch filter (again)
s = tf('s')
w_no = 0.19;
z1_no = 0.05;
z2_no = 0.7;
Hno = (1+2*z1_no*s/w_no+s^2/w_no^2)/(1+2*z2_no*s/w_no+s^2/w_no^2);
% the open loop system was:
tau_PD = 50;
Hopen = 1.63*(1+tau_PD*s)*Hno*Hp
% for the closed-loop system, create a unit feedback loop
Hclosed = feedback(Hopen, 1)
% calculate a step response, it is a slow system, so
t = 0:0.1:250;
y = step(Hclosed, t);
% check with a plot
plot(t, y)
% ends at one, so the overshoot is
(max(y) - 1)*100
% a unit ramp input. Can create the ramp as 1/s* step
yr = step(Hclosed/s, t);
yr(t == 250)
% bode plot and resonance peak, inspect with data cursor
bode(Hclosed)
% figure out bandwidth
bandwidth(Hclosed)
% note that it has to be supplied in Hz
0.125/2/pi
% damping coefficient, pick the right components
damp(Hclosed)
As expected, the steady-state position error (error to a step) and the steady-state velocity error for this system
both go to 0. The overshoot to a θr step is a little high, however. It is higher than could be expected for a
second order system with a damping coefficient of ζ =0.97. This is a consequence of the choice for a PD
controller; the time constant of the PD controller introduces a zero at -0.02. This zero provides the additional
``kick'' (see the sheets of Lecture 7) in response to the step input.
The control structure that we chose for the satellite controller is given below:
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 29/32
6/22/2020 Practicon Exercise System TU Delft
You may verify that this structure results in the same poles for the closed-loop system, but does not have the
zero at -0.02. In Matlab:
Try to check the step response of this system, and you will see that the large overshoot is gone. This control
structure does have a disadvantage. You will discover it when you determine the velocity error for your
satellite attitude control.
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 30/32
6/22/2020 Practicon Exercise System TU Delft
# start with the basic satellite model sat1, and get the
# payload attitude response
Hp = tf(sp.matrix([0, 0, 0, 1])*sat1)
Hclosed = Hol.feedback(1)
# step input
t = sp.arange(0, 250.1, 0.1)
y, t = step(Hclosed, t)
f0 = plt.figure()
plt.plot(t, y)
# the overshoot
print("overshoot", y.max()/y[-1]*100 - 100)
# ramp input
y, t, x = lsim(Hclosed, t, t)
f1 = plt.figure()
plt.plot(t, y)
# value at 250
print("at 250", y[t == 250.0][0])
# resonance peak in db
print("resonance", 20*sp.log10(mag.max()))
# bandwidth
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 31/32
6/22/2020 Practicon Exercise System TU Delft
# damping
damp(Hclosed)
plt.show()
https://practicon.lr.tudelft.nl/practicon/index.html?extauth=1 32/32