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
0 个评论
采纳的回答
Sam Chak
2024-2-17
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!