0% found this document useful (0 votes)
13 views7 pages

AC - Review

Uploaded by

atakanmembership
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)
13 views7 pages

AC - Review

Uploaded by

atakanmembership
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/ 7

Automatic Control: Course Review

Define Laplace Variable


s = tf(’s’);

Define System Given Matrices


A=[-3 2;-2 -3];
B=[1;0];
C=[0 1];
D = 0;

sys = ss(A,B,C,D);

Find Laplace Transform of x(t)


U = 1/s;
tol = 1e3;
x0 = [1;1];
X = zpk(minreal((s*eye(length(A))-A)\(x0 + B * U),tol));

Find Laplace Transform of y(t)


Y = zpk(minreal(C*X + D*U, tol));

Compute PFE (Partial Fraction Expansion)


R
To compute y(t) we must remember that if the PFE has complex conjugate poles Y (s) = s−σ0 −ω0 j +

R
s−σ0 +ω0 j(note the residue R is the one associated with the complex root having positive imaginary
part) then the antitransform is given by y(t) = 2|R|eσ0 t cos(ω0 t + arg(R))ϵ(t) (keep in mind that
the sign of σ0 and ω0 is the opposite of the one you find in the PFE Y (s) = s−σ0R−ω0 j )

[num_X1, den_X1] = tfdata(X(1), ’v’);


[num_X2, den_X2] = tfdata(X(2), ’v’);

[r1, p1] = residue(num_X1, den_X1);


[r2, p2] = residue(num_X2, den_X2);

[num_Y, den_Y] = tfdata(Y, ’v’);


[r_Y, p_Y] = residue(num_Y, den_Y);

Define Transfer Function


s=tf(’s’);
H=(s+5)/(s^2+3*s+2);

Find system poles and zeros


zeros_H = zero(H);
poles_H = pole(H);

1
System in ZPK form
A system is in Zero Pole Gain Form if H(s) = K∞ (s−z1 )(s−z2 )...(s−zm )
(s−p1 )(s−p1 )...(s−pn )

s=tf(’s’);
H=4*(2*s+6)/(s^2+3*s+2);
zpk(H)

ans =

8 (s+3)
-----------
(s+2) (s+1)

Continuous-time zero/pole/gain model.

System in DC Gain Form


s s s
(1− )(1− )...(1− )
A system is in DC Gain Form if H(s) = K sr (1− zs1 )(1− zs2 )...(1− zms )
p1 p2 pn−r

% No MATLAB Statement :(

From State-Space Representation to Transfer Function


In the presence of zero initial conditions (x(0) = 0) we can compute H(s) with H(s) = C(sI −
A)−1 B + D. The solution is unique

H = C*inv(s*eye(length(A))-A)*B+D;

% Another way of doing it

sys = ss(A,B,C,D);
H = tf(sys);

From Transfer Function to State-Space Representation


The solution is not unique. If the Transfer Function is not Strictly Proper (m = n proper, m <
n strictly proper) we need to divide Numerator by Denominator. If H(s) is strictly proper no
preliminary manipulations are needed. We would then need to choose from Controller Canonical
Form or Observer Canonical Form, meaning that we have two ways to populate the A,B,C,D
matrices with the H(s) coefficients. With matlab it all reduces to using two statements

H=(s^2+3*s+1)/(s^3+s^2+s+1);
sys=ss(H);

Internal Stability of a System: System Natural Modes


The system natural modes can be derived from the eigenvalues of the A matrix. In the case of
eigenvalues with algebraic multiplicity µi > 1 we need to study the minimal polynomial

2
• Considering the i-th distinct eigenvalue λi (i = 1, . . . , r) with minimal polynomial multiplicity

′ µ −1
t i
µi the functions mi,1 (t) = eλi t , mi,2 (t) = teλi t , . . . , mi,µ′ (t) = ′
(µi −1)!
eλi t are the natural
i
modes associated with the eigenvalue λi
• For each couple of complex conjugate eigenvalues λ = σ0 ± jω0 with minimal polynomial

multiplicity µi the natural modes are: m1 (t) = eσ0 t cos(ω0 t + ϕ), m2 (t) = teσ0 t cos(ω0 t +

µ −1
t i
ϕ), . . . , mµ′ (t) = ′
(µi −1)!
eσ0 t cos(ω0 t + ϕ)
i

Internal Stability of a System: Resume


An LTI system is:

• Internally Stable if and only if ℜ(λi (A)) ≤ 0 and µ (λi (A)) = 1 for all the eigenvalues such
that ℜ(λi (A)) = 0

• Asymptotically Stable if and only if ℜ(λi (A)) < 0

A=[0 0 0;0 0 1;0 0 -5];


eig(A);
% Since we have an eigenvalue with polinomial multiplicity of 2, we need to
% study $(sI-A)^{-1}$ to find the minimal multiplicity
A1=minreal(zpk(inv(s*eye(3)-A)));

Bibo Stability of a System


An LTI system is BIBO stable if and only if all the poles of the transfer function H(s) have
strictly negative real part. We call system poles of an LTI system the roots of the denominator
DH (s) of the transfer function H(s) obtained after the simplification of all the common factors
between the numerator and denominator (zero-pole cancellation). A system without any zero-
pole cancellation in the computation of the transfer function is called minimal or in minimal form

Steady-State Response: Step Input


For a step input signal u(t) = ūϵ(t) → U (s) = ūs the steady state response is yss (t) = ȳϵ(t) → ȳ =
lim s → 0sY (s) = ū · H(0) where H(0) is the generalized DC gain

s=tf(’s’);
H=1/((s+2)*(s+10));
K = dcgain(H);

% It can also be used for transfer functions with poles in zero (we have to
% remember to multiply the transfer function by $s^r$
H=1/(s*(s+2)^2);
K = dcgain(s*H);

Steady-State Response: Sinusoidal Input


For a sinusoidal input signal u(t) = ū sin(ω0 t) the steady state response is yss (t) = ȳ(ω0 ) sin(ω0 t +
ϕ(ω0 )) with ȳ(ω0 ) = ū|H(jω0 )|, ϕ(ω0 ) = ̸ (H(jω0 )). We can use the command bode to get the values
of ȳ(ω0 ), ϕ(ω0 )

3
s=tf(’s’);
H=1/((s+2)*(s+10));
w0=0.5;
[m,f]=bode(H,w0); % m is in linear scale, f is in DEGREES
f_rad = f/180*pi; % [Radiants]

Time Delay
An LTI system whose dynamic behavior is described by a transfer function H(s) in the presence of a
time delay can be represented as Hdelay (s) = H(s)e−θs . Since the time delay introduces a non-real
rational component in the transfer function, we cannot compute the anti-transform as is. We must
approximate the exponential function using the Padè Approximation:

1− θ2 s
• First Order: e−θs ≈ 1+ θ2 s
2 2
1− θ2 s+ θ 12s
• Second Order: e−θs ≈ 2 2
1+ θ2 s+ θ 12s

s=tf(’s’);
H=1/(s^2+s+1);
H.inputdelay=2;
pade_order = 1;
SYSX = zpk(pade(H,pade_order));

Bode Diagram
s=tf(’s’);
H=1/(s^2+3*s+2);
figure, bode(H);
title("Bode Plot");
grid on;

Polar Diagram
s=tf(’s’);
H=1/(s^2+3*s+2);

4
[re,im]=nyquist(H);
figure, plot(squeeze(re), squeeze(im));
title("Polar Diagram");
xlabel("Im[H(j\omega)]");
ylabel("Re[H(j\omega)]");
grid on;

Nyquist Diagram
Keep in mind that Matalb does not plot the images of the semicircles ρ → 0

s=tf(’s’);
H=1/(s^2+3*s+2);
figure,nyquist(H);
grid on;

5
Nichols Diagram
s=tf(’s’);
H=1/(s^2+3*s+2);
figure,nichols(H);
grid on;

Well-Posedness of a Feedback Control System


A feedback control system is said to be well-posed if:

• G(s) is minimal and strictly proper


• C(s) is minimal and proper

Stability of a Feedback Control System


1. Check for unstable zero-pole cancellations when L(s) = C(s) · G(s) is formed. If there are any,
the system is unstable
L(s)
2. Study the poles of T (s) = 1+L(s) : if all of them have strictly negative real part the system
is stable

C=(s-1)/(s+1);
G=1/((s-1)*(s+2));
L=G*C; % Loop Transfer Function before semplification
L=minreal(L); % Loop Transfer Function after zero-pole cancellations

Nyquist Stability Criterion


The previous stability criteria do not give informations about how L(s) affects stability or how
robust the system is in the presence of perturbations. We then introduce the Nyquist Stability
Critetion. Consider the Nyquist diagram of L(s) and the complementary sensitivity function T (s).
Denote with:

6
• N the number of encirclements of the Nyquist diagram of L(s) around the critical point (−1, j0)
(N > 0 → clockwise, N < 0 → counter-clockwise). N should be well-defined meaning that
if the Nyquist diagram crosses the critical point (−1, j0) the system is unstable
• Z the number of poles of T (s) with strictly positive real part
• P the number of poles of L(s) with strictly positive real part
Then we have N = Z − P . Since we know that a feedback control system is stable if and only if
all the poles of T (s) have strictly negative real-part → Z = 0 → N = −P . So the steps to
determine if a feedback control system is stable are:

1. Determine the number P of the poles of L(s) with strictly positive real part
2. Draw the Nyquist diagram of L(s) and compute the number N of encirclements of the plot
around the critical point (−1, j0)
3. Compute the number Z of poles of T (s) with strictly positive real part as Z = N + P
4. Then the system is stable if and only if Z = 0 → N = −P

Constant Magnitude Loci


Using the function T Grid and S Grid we can plot on the Nichols plane the constant magnitude loci
that can help us to determine how to modify the Controller Transfer Function in order to satisfy
stability margin requirements

s=tf(’s’);
L=1/(s*(s+2)*(s+4));
figure, nichols(L), hold on;
T_grid(0.4);
S_grid(2.6);
ngrid;

You might also like