I am having trouble to define in matlab the transfer function of the following block diagram.

1 次查看(过去 30 天)
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

采纳的回答

Sam Chak
Sam Chak 2024-2-17
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)
G = 
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 = 
ySol = subs(ySol, K, 23064/2365) % K = 23064/2365 (free parameter to be designed)
ySol = 
%% Transfer function of the Plant
Gp = tf(12771, [5 186 8649/5])
Gp = 12771 -------------------- 5 s^2 + 186 s + 1730 Continuous-time transfer function.
%% Transfer function of the PIDF controller
Gc = pidtune(Gp, 'PIDF')
Gc = 1 s Kp + Ki * --- + Kd * -------- s Tf*s+1 with Kp = 0.275, Ki = 3.58, Kd = 0.00475, Tf = 0.000441 Continuous-time PIDF controller in parallel form.
%% 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 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Control System Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by