# state feedback control and observer

100 visualizzazioni (ultimi 30 giorni)
영탁 한 il 3 Apr 2023
Risposto: Sam Chak il 5 Apr 2023
Can you explain how to design a state feedback control and an observer for a DC motor with the following specifications? If you could provide instructions for both MATLAB and Simulink, I would greatly appreciate it.
Rs = 0.47;
Ld = 1.23e-3;
B = 0.0002;
Kb = 0.42;
Kt = 0.73;
J = 6.5e-4;
% Second-order State Matrix
A1 = [-B/J Kt/J;
-Kb/Lq -Rs/Lq];
B1 = [0;
1/Lq];
C1 = [1 0];
D1 = 0;
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposte (2)

Oguz Kaan Hancioglu il 3 Apr 2023
Spostato: Sabin il 4 Apr 2023
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

Sam Chak il 5 Apr 2023
Since no requirement is provided, we follow the design criteria given in the example:
• Settling time less than 2 seconds
• Overshoot less than 5%
• Steady-stage error less than 1%
Like many collaborative robot arms and autonoumous vehicles, it is necessary to design the desired reference trajectory so that the control systems can follow. In this exercise, a reference model (transfer function) is designed to satisfy the design criteria.
From the reference model, one can obtain the desired closed-loop pole and the pole placement technique (solving algebraic equations) can be applied. The rest of the controller and observer design are procedural steps. So, the key is the reference model design!
% Parameters
Rs = 0.47;
Lq = 1.23e-3;
B = 0.0002;
Kb = 0.42;
Kt = 0.73;
J = 6.5e-4;
% State-space Matrices of the Uncompensated Plant
A = [-B/J Kt/J;
-Kb/Lq -Rs/Lq];
B = [0;
1/Lq];
C = [1 0];
D = 0;
% Reference trajectory design
wr = 3; % reference omega, ω
zr = 0.7; % reference zeta, ζ
nr = wr^2;
dr = [1 2*zr*wr wr^2]; % x" + 2·ζ·ω·x' + ω²·x
Gr = tf(nr, dr) % reference model
Gr = 9 --------------- s^2 + 4.2 s + 9 Continuous-time transfer function.
stepinfo(Gr)
ans = struct with fields:
RiseTime: 0.7089 TransientTime: 1.9930 SettlingTime: 1.9930 SettlingMin: 0.9001 SettlingMax: 1.0460 Overshoot: 4.5986 Undershoot: 0 Peak: 1.0460 PeakTime: 1.4693
% Controller design
cp = pole(Gr) % controller poles
cp =
-2.1000 + 2.1424i -2.1000 - 2.1424i
K = place(A, B, cp) % controller gains
K = 1×2
-0.4200 -0.4652
% Closed-loop control system without observer
sys = ss(A-B*K, B, C, D);
Nbar = 1/dcgain(sys); % Normalizer (to rescale the reference input)
cls = ss(A-B*K, B*Nbar, C, D)
cls = A = x1 x2 x1 -0.3077 1123 x2 -0.006947 -3.892 B = u1 x1 0 x2 0.008014 C = x1 x2 y1 1 0 D = u1 y1 0 Continuous-time state-space model.
stepinfo(cls)
ans = struct with fields:
RiseTime: 0.7089 TransientTime: 1.9930 SettlingTime: 1.9930 SettlingMin: 0.9001 SettlingMax: 1.0460 Overshoot: 4.5986 Undershoot: 0 Peak: 1.0460 PeakTime: 1.4693
% Observer design
or = 10*real(cp(1)); % make the observer response 10 times faster
op = [or+1 or-1] % observer poles (make op ≪ cp but no repeated poles)
op = 1×2
-20.0000 -22.0000
L = place(A', C', op)' % observer gains
L = 2×1
-340.4215 -225.3519
% Combine state-feedback controller and observer
Aco = [A-B*K B*K;
zeros(size(A)) A-L*C];
Bco = [B*Nbar;
zeros(size(B))];
Cco = [C zeros(size(C))];
Dco = 0;
% Closed-loop observer-based control system
clco = ss(Aco, Bco, Cco, Dco)
clco = A = x1 x2 x3 x4 x1 -0.3077 1123 0 0 x2 -0.006947 -3.892 -341.5 -378.2 x3 0 0 340.1 1123 x4 0 0 -116.1 -382.1 B = u1 x1 0 x2 0.008014 x3 0 x4 0 C = x1 x2 x3 x4 y1 1 0 0 0 D = u1 y1 0 Continuous-time state-space model.
step(clco, 6), grid on stepinfo(clco)
ans = struct with fields:
RiseTime: 0.7089 TransientTime: 1.9930 SettlingTime: 1.9930 SettlingMin: 0.9001 SettlingMax: 1.0460 Overshoot: 4.5986 Undershoot: 0 Peak: 1.0460 PeakTime: 1.4693
sse = fix(1 - dcgain(clco)) % steady-state error
sse = 0
As shown, all three design criteria are satisfied.
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su State-Space Control Design in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!