0% found this document useful (0 votes)
12 views

AC INF - Review and Design Procedure

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)
12 views

AC INF - Review and Design Procedure

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

Review Material: CSE Course

Stability for Linearized Systems


To study stability of a linearized system we must remember that it can be derived from its (linearized) matrix
A:

• The linearized system is Asymptotically Stable if and only if ∀i : ℜ(λi (A)) < 0
• The linearized system is Unstable if and only if ∃i : ℜ(λi (A)) > 0
• No conclusion can be drawn if and only if ∀i : ℜ(λi (A)) ≤ 0

Zeta Transform
If we want to compute the solution of a discrete time dynamical system we need to apply the zeta
transform of the state space representation. We obtain H(z) = C(zI − A)−1 B + D. To perform the partial
fraction expansion and thus the anti-transform we need to proceed as follow:

1. Compute F̃ (z) = Fz
2. Compute the PFE of F̃ (z)
3. Compute F (z) = F̃ (z) · z
4. Antitransform F (z)
Using matlab this procedure can be simplified by using the statement residuez

Rz R z jθ
Recall that in the presence of complex conjugate poles F (z) = z−λ + z−λ ∗ , λ = σ + jω = νe the antitransform
is f (k) = 2M ν k cos(θk + ϕ), M = |R|, ϕ = ̸ R

% define system matrices


A=[3 0;-3.5 -0.5];
B=[1;2];
C=[1 -1];
%define initial condition
x0=[1;-2];
%define z-transform variable
z=tf(’z’,1);
%define z-transform of u(k)
U=2*z/(z-1); % u(k)=2epsilon(k)

X_i = minreal(zpk((z*inv(z*eye(2)-A)*x0)),1e-3);

[num_X_i_1,den_X_i_1] = tfdata(X_i(1),’v’); %1st state


[r1,p1,k1]=residuez(num_X_i_1,den_X_i_1);

[num_X_i_2,den_X_i_2] = tfdata(X_i(2),’v’); %2nd state


[r2,p2,k2]=residuez(num_X_i_2,den_X_i_2);

%compute zero-state state response


X_f = minreal(zpk((inv(z*eye(2)-A)*B)*U),1e-3);

% compute residues of PFE


[num_X_f_1,den_X_f_1] = tfdata(X_f(1),’v’); %1st state
[r1,p1,k1]=residuez(num_X_f_1,den_X_f_1);

[num_X_f_2,den_X_f_2] = tfdata(X_f(2),’v’); %2nd state


[r2,p2,k2]=residuez(num_X_f_2,den_X_f_2);

1
Transfer Function for Discrete Time Dynamical Systems
T = 1;
z = tf(’z’,T);
H = 1/(z^2-1.7*z+0.72);
zpk(H); % Zero-Pole-Gain form

[zH,pH,kH]=zpkdata(H,’v’); % To compute zeroes, poles and gain for a given tf

Natural modes for Discrete Time Dynamical Systems


The natural modes of the system x(k + 1) = Ax(k) + Bu(k) are:


′ k−µi +1
• For the i-th distinct eigenvalue λi with minimal polynomial multiplicity µi are mij (k) = k


µi −1 λi =
′ ′
k(k−1)...(k−(µi −2)) k−µi +1

(µi −1)!
λi
• For a couple of complex conjugate poles of the form λ = σ + jω = νejθ having minimal polynomial
′  k−µ′ +1 ′
multiplicity µi are mij (k) = µ′k−1 νi i cos(θ(k − µi − 1) + ϕ)
i

Modal Analysis
Denote with λi (A) the i-th eigenvalue of matrix A then:


• The natural mode associated with eigenvalue λi is bounded if |λi (A)| = 1, µ (λi (A)) = 1
• The natural mode associated with eigenvalue λi is convergent if |λi (A)| < 1

• The natural mode associated with eigenvalue λi is divergent if |λi (A)| > 1 OR |λi (A)| = 1, µ (λi (A)) > 1

Digital to Analog Conversion


To retrieve the original signal, after it has been sampled, we need to use an ideal low pass filter. In reality it’s
not possible to create such a thing, but the closest is the Zero-Order-Hold (ZOH) filter, which has a transfer
−T s
function GZOH (s) = 1−es

Digital Control Design by Emulation


The main steps of the emulation design method are described in detail in the following sections.

Emulation 1: Choose suitable Sampling Time T


To choose a viable sampling time we need to take various aspects into account:

• Sampling Theorem: the sampling frequency must at least equal twice the value of the highest significant
frequency in the signal. the highest significant frequency of all the signals in the loop is the system
bandwidth ωB . So we have ωS > 2ωB → ωS > 3ωC (for a well-dampened system ωB > 1.5ωC
• ZOH Filter: the D/A converter introduces a phase lag of ̸ GZOH (jω) = − ωT 2 . In order to limit the
phase lag at the cross-over frequency to small values (e.g. – 10° to – 5°) we obtain 18ωC < ωS < 36ωC
• Suitable sampling of the transient: a suitable number of samples must considered for describing the
behavior of the transient phase typically 10 to 50 samples can be employed for a suitable description of
the transient behavior for a well damped system (e.g. z = 0.6) we have: 11.42ωC < ωS < 57.2ωC
• Final Pratical Rule of Thumb: provided that the chosen values satisfies HW and cost limitations
choose T within the interval 20ωC < ωS < 50ωC

2
Emulation 2: Analog Controller Design
If it is known in advance that the controller has to be realized through a digital computer, the design of
C0 (s) is performed taking into account the dynamics introduced by the A/D and the ZOH D/A trans-
fer function. Thus, the analog controller design should be performed considering as plant transfer function
′ −T s
G (s) = GA/D (s)GZOH (s)G(s) = T1 1−es G(s). Remark : in MatLab environment, use the 1st order Padé
approximation

Emulation 3: Discretization of Analog Controller


The simplest and most effective way to discretize a continuous time controller C0 (s) is to consider its state
space representation and suppose to integrate it through a numeric method, using the bilinear transformation
z−1
s = T1 αz+1−α . We obtain C(z) = C0 (s)|s= 1 z−1
T αz+1−α

• Backward Euler for α = 1


• Forward Euler for α = 0
• Tustin for α = 0.5
The Tustin approximation provides the best frequency response matching of the analog controller.

We have another option, the matched pole-zero method (MPZ), which consists in applying the transformation
z = esT . This method is, however, worse in performance with respect to the Tustin approximation.
If we use the matlab statement c2d(C 0, T, METHOD) we can get the discretized version of the controller
transfer function. The METHOD parameter is defaulted to ’zoh’, so we need to specify ’tustin’

C = c2d(C_0, T, ’tustin’);

Emulation 5: Anti-Aliasing Filter Design


We can employ a Butterworth Filter of the form F (s) = 1
Bn (s) → s′ = s
ωf , with order:

• Order 1: Bn (s) = (s′ + 1)


• Order 2: Bn (s) = (s′2 + 1.414s′ + 1)
• Order 3: Bn (s) = (s′2 + s′ + 1)(s′ + 1)
• Order 4: Bn (s) = (s′2 + 0.765s′ + 1)(s′2 + 1.848s′ + 1)
ωs
It is required that the cut-off frequency ωf satisfies ωB < ωf < 2 . The filter can be designed by imposing a
2 1 1
γ
given attenuation γ so that |F (jω)| ≤ γ, ∀ω ≥ ωh (usually ωh = ω2s . We have ωf
= ωh ( 1−γ 2)
2n ≈ ω γ n for
h
γ ≪ 1. The order of the filter is chosen n order to limit the phase lag introduced at ωc using the normalized
filter phase diagram.

[B,A] = BUTTER(N,Wf ) designs an Nth order lowpass digital Butterworth filter and returns the filter coef-
ficients in length N+1 vectors B (numerator) and A (denominator). The coefficients are listed in descending
powers of z. The cutoff frequency Wf must be 0.0 < Wf < 1.0, with 1.0 corresponding to half the sample rate.

% Design analog Butterworth filter


% In this case, Wf is in [rad/s] and it can be greater than 1.0
[B,A] = BUTTER(N,Wf,’s’)

3
Control of LTI systems through Static State Feedback
In the presence of an input such as u(t) = −Kx(t) + N r(t) the dynamical properties of the (controlled) system
depend on the eigenvalues of matrix A − BK (K is referred to as the state gain).A suitable choice of K allows
us to modify the system eigenvalues and improve the dynamic properties of the system (e.g. stabilize it). The
reference gain matrix N can be chosen to modify the dc-gain of the controlled system.

Is it always possible to find a matrix K able to arbitrarily assign the eigenvalues of A − BK? Yes if and only
if ρ(Mr ) = ρ([B AB . . . An−1 B]) = n, where Mr is the reachability matrix. Typically, K is computed by
placing the eigenvalues (poles) of the controlled system to obtain, besides asymptotic stability, good damping
and rapidity properties of the transient. N can be chosen to make unitary the dc-gain of the controlled system
guaranteeing zero steady state tracking error in the presence of a constant reference signal r(t) = r̄ϵ(t).

To obtain the eigenvalues to be assigned by the state feedback controller, the computed values of ζ and p ωn are
converted to the corresponding couple of complex conjugate values λ1,2 = σ0 ± jω0 = −ζωn ± jωn 1 − ζ 2 .
What do we do if the system dimension is greater than 2? The additional eigenvalues are chosen with a
faster time constant τadd ≪ ζω1n . This means that all the eigenvalues λ3 , λ4 , . . . , λn will all be coincident
(λ3 = λ4 = · · · = λn ) and of the form λi = −a · ζωn where a is a constant value chosen between 5 and 10

Mr = ctrb(A,B);
rho_Mr = rank(Mr);
lambda_des = [-1 -2];
K = place(A,B,lambda_des); % place is used for different eigenvalues

lambda_des = [-1 -1];


K = acker(A,B,lambda_des); % acker is used for coincident eigenvalues

sys_cont_c = ss(A-B*K,B,C,0);
N = 1/dcgain(sys_cont_c);

State Observers
For an LTI continuous time system, A state feedback control law of the form u(t) = −Kx(t) + N r(t) can be
evaluated only when the system state can be measured. A state observer is a “device” that provides an estimate
x̂ of the system state x exploiting the knowledge of the system input u and the measurement of the output
y. For a continuous time dynamic system, the state estimation error is defined as e(t) = x̂(t) − x(t). An
observer such that limt→∞ |e(t)| = 0 is referred to as an asymptotic state observer.

We can create a system such that ė(t) = (A − LC)e(t). A suitable choice of L allows us to modify the
observer eigenvalues and improve its dynamic properties. L is referred to as the observer gain. However, is
it always possible to find a matrix L able to arbitrarily assign the eigenvalues of A − LC? Yes if and only if
ρ(Mo ) = ρ([C AC . . . An−1 C]T ) = n, where Mo is the observability matrix. The L matrix eigenvalues are
usually chosen as coincident, with negative real part and null imaginary part

Mo = obsv(A, C);
rho_Mo = rank(Mo);

lambda_obsv_des = [-1 -2];


L = place(A’,C’,lambda_obsv_des)’;

lambda_obsv_des = [-1 -1];


L = acker(A’,C’,lambda_obsv_des)’;

4
Design Procedure for State-Feedback Controller using Estimated States
Thanks to the separation principle explained in the slides, we can separate the design of the state-controller
and state-observer

1. Check for reachability and observability of the system


2. Compute the state feedback gain K to assign the eigenvalues of A-BK to the desired locations
3. Compute the dc-gain correction matrix N
4. Compute the observer gain L to assign the eigenvalues of A-LC to the desired locations. Typically
the observer eigenvalues are chosen such that the corresponding time constants are faster than
those imposed by the control law τA−LC ≪ τA−BK . This means that they will be of the form
λobs,i = −aζωn , where a is a constant value chosen between 5 and 10 times the largest real part of the
state feedback controller eigenvalues

assert(rank(ctrb(A,B)) == rank(A));
assert(rank(obsv(A,C)) == rank(A));

s_hat = 0.08;
t_s = 4;
alpha = 1;

zeta = abs(log(s_hat))/(sqrt(pi^2+log(s_hat)^2));
omega_n = log((alpha/100)^(-1))/(zeta*t_s);

lambda_1 = -zeta*omega_n + 1i*omega_n*sqrt(1-zeta^2);


lambda_2 = -zeta*omega_n - 1i*omega_n*sqrt(1-zeta^2);
lambda_des = [lambda_1 lambda_2];

K = place(A,B,lambda_des);

sys_ctrb = ss(A-B*K, B, C, D);


N = 1/dcgain(sys_ctrb);

lambda_obs = -zeta * omega_n * 5; % 5 Times faster than the state controller


lambda_obs_des = [lambda_obs lambda_obs];

L = acker(A’, C’, lambda_obs_des)’;

% Simulation
sys_x = ss(A,B,eye(length(A)),D);
sys_obs = ss(A-L*C, [B L], eye(length(A)), D);

Review of Stability

Linearized LTI System


LTI System Discrete Time LTI System
(check ∀ equilibrium solution)
Internally Bounded ∀i : ℜ{λi (A)} ≤ 0, ∀i : |λi | ≤ 1,
′ ′
(check λi (A)) ∀i | ℜ{λi (A)} = 0, µi = 1 ∀i | |λi | = 1, µi = 1
Asymptotically Stable
∀i : ℜ{λi (A)} < 0 ∀i : ℜ{λi (A)} < 0 ∀i : |λi (A)| < 1
(check λi (A))
BIBO Stable ∀i : ℜ{pi } < 0, ∀i : |pi | < 1,
(check H(s)) with pi being the i-th pole of H(s) with pi being the i-th pole of H(s)

You might also like