I am having trouble to define in matlab the transfer function of the following block diagram.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jake
el 12 de Feb. de 2024
Respondida: Sam Chak
el 17 de Feb. de 2024
The systems Information for Modelling:
G1(s) = Front left motor.
G2(s) = Front right motor.
G3(s) = Rear left motor.
G4(s) = Rear right motor.
For a quadcopter all motors are identical which means, G1(s) = G2(s) = G3(s) = G4(s)
PID(s) = PID controller transfer function
do = Output disturbance
F(s) = Sensor feedback transfer function, defined as:
F(s)= 1100/(s+1100)
G1= 774 / (s^2 + 37.2 * s + 8649)
Kp =1
D= 0.5
0 comentarios
Respuesta aceptada
Sam Chak
el 17 de Feb. de 2024
Hi @Jake
In order to obtain the transfer function of the plant, you can likely perform the algebraic manipulations in the manner as suggested. However, I must mention that I excluded the consideration of the output disturbance and sensor in the controller design.
syms s u K y
%% Transfer function of the motor
G = 774/(s^2 + 37.2*s + 8649)
u1 = K*y + 1*u - 1*u; % don't understand why add and cancel out
u2 = -u;
u3 = u;
u4 = -u;
eqn = y - (1.1*G*u1 - 1.1*G*u2 + 1.1*G*u3 - 1.1*G*u4) == 0;
ySol = isolate(eqn, y)
ySol = subs(ySol, K, 23064/2365) % K = 23064/2365 (free parameter to be designed)
%% Transfer function of the Plant
Gp = tf(12771, [5 186 8649/5])
%% Transfer function of the PIDF controller
Gc = pidtune(Gp, 'PIDF')
%% Transfer function of the Closed-loop system
Gcl = feedback(Gc*Gp, 1);
%% Step-response of the Closed-loop system
step(Gcl, 0.6), grid on
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!