Can't stabilize system with PID
Afficher commentaires plus anciens
Hi. I'm trying to stabilize a model for this articol: https://ethz.ch/content/dam/ethz/special-interest/mavt/dynamic-systems-n-control/idsc-dam/Research_DAndrea/Cubli/Cubli_IROS2012.pdf , with a PID controller, and it's not working. I don't even know that this is the corect order of the cascade PID. I even try to take each individual part of the cascade PID and simulate it and use the tuner for that. And still it doesn't working. Does anyone know what to do?
This is the cascade PID:

This is the attempt to try to take individual part of the cascade and simulate:

This is the Control System tuner:

2 commentaires
First, you should show us how you obtained the transfer function in the image. Using parameters given in the paper (code provided by @Aquatris), you can compare and notice that there are discrepancies. Most likely, you have supplied your own values to the parameters.
%% Parameters
l = 0.085;
lb = 0.075;
mb = 0.419;
mw = 0.204;
Ib = 3.34e-3;
Iw = 0.57e-3;
Cb = 1.02e-3;
Cw = 0.05e-3;
Km = 25.1e-3;
g = 9.81;
%% State-space model
A = [0 1 0
(mb*lb + mw*l)*g/(Ib + mw*l^2), -Cb/(Ib + mw*l^2), Cw/(Ib + mw*l^2)
-(mb*lb + mw*l)*g/(Ib + mw*l^2), Cb/(Ib + mw*l^2), -Cw*(Ib + Iw + mw*l^2)/(Iw*(Ib + mw*l^2))];
B = [0
- Km/(Ib + mw*l^2)
Km*(Ib + Iw + mw*l^2)/(Iw*(Ib + mw*l^2))];
C = eye(3);
sys = ss(A, B, C, 0);
%% Transfer functions
G = tf(sys)
%% For SISO systems only (may not work on Cubli)
Gp = G(1);
Gc = pidtune(Gp, 'pidf')
Gcl = feedback(Gc*Gp, 1);
step(Gcl), grid on
Andrei Rotaru
le 27 Juin 2024
Réponse acceptée
Plus de réponses (1)
Here is the alternative control solution for finding the gains using LQR approach.
%% Parameters
l = 0.085;
lb = 0.075;
mb = 0.419;
mw = 0.204;
Ib = 3.34e-3;
Iw = 0.57e-3;
Cb = 1.02e-3;
Cw = 0.05e-3;
Km = 25.1e-3;
g = 9.81;
%% State-space model
A = [0 1 0
(mb*lb + mw*l)*g/(Ib + mw*l^2), -Cb/(Ib + mw*l^2), Cw/(Ib + mw*l^2)
-(mb*lb + mw*l)*g/(Ib + mw*l^2), Cb/(Ib + mw*l^2), -Cw*(Ib + Iw + mw*l^2)/(Iw*(Ib + mw*l^2))];
B = [0
- Km/(Ib + mw*l^2)
Km*(Ib + Iw + mw*l^2)/(Iw*(Ib + mw*l^2))];
C = eye(3);
sys = ss(A, B, C, 0);
%% LQR gain design
K = lqr(A, B, eye(size(A)), 1)
%% Closed-loop system
closedLoop = feedback(sys*K, eye(size(A)))
%% Simulation
t = 0:0.01:2;
u = zeros(length(t), 3);
x0 = [pi/4, 0, 0]';
lsim(closedLoop, u, t, x0), grid on
1 commentaire
Andrei Rotaru
le 30 Juin 2024
Catégories
En savoir plus sur Tuning Goals dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

