Regarding Pole Placement Techniques
Ältere Kommentare anzeigen
I am trying to solve a question and ultimately verify the performance of a DC-DC converter system through pole placement techniques.
clc; clear
A = [0 -83.33; 500 -10];
B = [166.67; 0];
C = [0 1];
D = 0;
%Create state-space and convert to transfer function
sys = ss(A, B, C, D);
tf_sys = tf(sys);
%Define 20% overshoot and 0.5s settling time
OS = 0.2;
ST = 0.5;
%Natural Frequency and damping ratio
omega_n = 4 / (ST * (1 - OS^2)^0.5);
zeta = -log(OS) / (omega_n * ST);
%Desired Poles
sigma = -zeta * omega_n;
omega_d = omega_n * sqrt(1 - zeta^2);
desiredPoles = [sigma + 1i*omega_d, sigma - 1i*omega_d];
%Find K
K = place (A, B, desiredPoles);
%create closed loop
sys_cl = ss(A - B*K, B, C, D);
%Finding K_Original
[V, D] = eig(A);
T = V;
K_original = K / T;
A_cl = A - B * K_original;
sys_cl2 = ss(A_cl, B, C, D);
The error below shows for sys_cl2, but not for sys_cl. Can someone point out wheres the wrong step?
Error using ss
The "B" and "D" matrices must have the same number of columns.
Error in ProjectControlSystem (line 78)
sys_cl2 = ss(A_cl, B, C, D)
Akzeptierte Antwort
Weitere Antworten (1)
Just a heads up, it looks like you forgot to convert the original state-space system to phase-variable form. Also, I noticed a small hiccup with the computed omega_n and zeta – they seem a bit off. Double-check the formulas; I'm unable to recall the formulas right now. Your pole placement procedure is on point, though. The last piece of the puzzle is scaling the Input matrix in the Closed-loop system to achieve zero steady-state error. Keep up the good work!
%% Original State-space System
A = [0 -83.33;
500 -10];
B = [166.67;
0];
C = [0 1];
D = 0;
Sys = ss(A, B, C, D);
%% Convert to State-space in phase-variable form
Apv = [0 1;
A(2,1)*A(1,2) A(2,2)];
Bpv = [0;
A(2,1)*B(1)];
Cpv = [1 0];
Dpv = D;
Spv = ss(Apv, Bpv, Cpv, Dpv)
% tf_sys = tf(sys); % unused
%% Define 20% overshoot and 0.5s settling time
OS = 0.2;
ST = 0.5;
%% Natural Frequency and damping ratio
omega_n = 4/(ST*(1 - OS^2)^0.5)
zeta = -log(OS)/(omega_n*ST)
omega_n = 16.6548075069292;
zeta = 0.455949810769126;
%% Desired Poles
sigma = -zeta*omega_n;
omega_d = omega_n*sqrt(1 - zeta^2);
desiredPoles = [sigma + 1i*omega_d, sigma - 1i*omega_d]
%% Find K via Pole Placement
K = place(Apv, Bpv, desiredPoles)
%% Closed-loop system
sys_cl = ss(Apv - Bpv*K, Bpv, Cpv, Dpv);
N = dcgain(sys_cl) % steady-state value
Sys_cl = ss(Apv - Bpv*K, Bpv/N, Cpv, Dpv);
%% Check if the design requirements are met
stepinfo(Sys_cl)
%% Plot step responses
step(Sys), hold on
step(Sys_cl), grid on
legend('Original System', 'Compensated System')
2 Kommentare
MUHAMMAD ANAS SULHI
am 20 Jan. 2024
Bearbeitet: MUHAMMAD ANAS SULHI
am 20 Jan. 2024
I've triple-checked. Your friend's code with the 'canonical' approach:
% [Apv, Bpv, Cpv, Dpv] = canon(A, B, C, D, 'companion');
is referred to as the Companion Canonical Form. I hope you have read the documentation. Mine corresponds to the Controllable Canonical Form, but it also goes by the less recognized term, the phase-variable canonical form.

To the best of my knowledge, there isn't a direct MATLAB command to transform the linear model into the phase-variable canonical realization. You'd need an additional line to achieve that. However, I don't recommend taking this route because both you and your friend seem to heavily rely on certain commands without fully grasping their implications and the underlying control theory.
My suggestion is to heed @Paul's advice for your Part 2 adventure, as you are going to need the Phase-variable coordinate Transformation Matrix,
.
% Define the state-space matrices
A = [0 -83.33; 500 -10];
B = [166.67; 0];
C = [0 1];
D = 0;
% Convert to phase-variable form
[Acc, Bcc, Ccc, Dcc] = canon(A, B, C, D, 'companion');
spv = ss(Acc', Ccc', Bcc', Dcc')
Kategorien
Mehr zu Control System Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
