- You have correctly defined the individual motors (G1, G2, G3, G4) as identical with the given transfer function.
- You have defined a proportional-only controller using pid(1). If your system requires a full PID controller, you should specify the gains for PID accordingly. For a proportional-only controller, your approach is correct.
- For Bode and Nyquist plots, you typically examine the open-loop transfer function which does not include the feedback loop's effect. The open-loop transfer function is essentially the product of all transfer functions from the input to the output before the feedback is applied.
- If you need the step response of the system in a closed-loop configuration including the sensor feedback, you should use the "feedback" function to properly include the sensor feedback loop as below:
How to write this block diagram into Matlab in feed forward control form.
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, Im struggling to implement this block diagram into Matlab.
Ive got to reduce in into Feed forward control form and wondering if this is correct. I also have to use the Open-loop TF for bode and nyquist plots.
% Define the system's transfer functions as given in your brief
s = tf('s');
G1 = 774 / (s^2 + 37.2*s + 8649);
G2 = G1; % Since all motors are identical
G3 = G1;
G4 = G1;
% Define other transfer functions needed
PID = pid(1); % Proportional-only controller with Kp = 1
Fs = 1100 / (s + 1100); % Sensor feedback transfer function
Pitch = PID*(1*G1*1.2 + (1*G2*1.2) + (-1*G3*-1.2) + (-1*G4*-1.2)) / (1 + (PID*(1*G1*1.2 + (1*G2*1.2) + (-1*G3*-1.2) + (-1*G4*-1.2)) * Fs))
% Step response of the Pitch system
figure;
step(Pitch);
title('Step Response of Pitch');
grid on
% Bode plot for open-loop transfer function
figure;
bode(Pitch);
title('Open-loop Bode Plot');
% Nyquist plot for open-loop transfer function
figure;
nyquist(Pitch);
title('Open-loop Nyquist Plot');
% Thanks for the help
0 comentarios
Respuestas (3)
Gayatri
el 23 de Abr. de 2024
Hi Jake,
% Closed-loop system with sensor feedback
ClosedLoop = feedback(OpenLoop * Fs, 1);
Please refer the below documentation for feedback function: https://www.mathworks.com/help/control/ref/inputoutputmodel.feedback.html
I hope it helps!
0 comentarios
Sam Chak
el 23 de Abr. de 2024
Hi @Jake
Around two months ago, you had a similar problem, but we didn't receive any feedback from you regarding whether the proposed mathematical solution was satisfactory or not. It would be helpful if you could review it so that we can consider the question resolved.
Regarding the current problem, the 'Pitch' transfer function obtained from your direct formula (without K) differs from my approach. By setting the free parameter and assuming no output disturbance (), I was able to determine the process plant transfer function for the four combined rotors.
%% Process Plant
Gp = tf(23220, [5 186 0])
In Simulink, when using with your original preset Proportional Controller (), the output exhibits an oscillatory response with a 45% overshoot (as shown by the yellow curve). However, by employing an appropriate PD Controller, the overshoot can be eliminated while maintaining the same fast settling time (as depicted by the blue curve).
%% PD controller
Kp = 0.098040019870345;
Kd = 6.329004257886284e-4;
Tf = 0.020426189039706;
Gc = pid(Kp, 0, Kd, Tf)
%% Sensor
Fs = tf(1100, [1 1100])
%% Step response
step(feedback(Gc*Gp, Fs), 0.5), grid on
%% Bode diagram
bode(Gc*Gp*Fs), grid on
%% Nyquist diagram
nyquist(Gc*Gp*Fs), grid on, ylim([-1.5 1.5])
3 comentarios
Sam Chak
el 23 de Abr. de 2024
Hi Jake,
Initially, the value for wasn't provided, so I made the assumption that it is a free parameter. It can take on a value of zero or any real number. However, the specific value to be assigned to is known only by the original system designer. I will explore the feedback() method as you suggested.
By the way, if you find the solution in the previous problem helpful (click the link), please consider clicking 'Accept' ✔ on the answer to close the issue. Your feedback and support are greatly appreciated.
Sam Chak
el 23 de Abr. de 2024
Hi @Jake
I have successfully utilized the 'feedback()' function to obtain the same modeling result for as presented in my previous answer. This validation is crucial in confirming the accuracy of my proposed solution. In this case, remains unchanged at , but you have the privilege to define it as zero or any real number. I recommend discussing this matter with your research supervisor or team members.
It is also essential for your team to design the PID controller, to meet the desired performance requirements. I included it merely as a demonstration to eliminate the overshoot. The open-loop transfer function should be represented as 'Gc*Gp*Fs'.
If you find this solution helpful, please consider clicking 'Accept' ✔ on the answer and voting 👍 for it. Your support is greatly appreciated! By the way, you should also vote for other helpful answers as tokens of appreciation.
%% Define the motor's transfer functions
s = tf('s');
G1 = 774/(s^2 + 37.2*s + 8649);
G2 = G1; % Since all motors are identical
G3 = G1;
G4 = G1;
%% Design parameter
K = 4805/516; % defined by the user, can be zero or any real number
%% The lumped 4-rotor system modeling formula using feedback()
Gp = 2*feedback(G1*1.2, -K) + feedback(G2*1.2, -K) + feedback(G3*1.2, -K) + feedback(G4*1.2, -K);
Gp = minreal(Gp, 1e-3)
% Define other transfer functions needed
% Gc = pid(1); % Proportional-only controller with Kp = 1
%% PD controller
Kp = 0.098040019870345;
Kd = 6.329004257886284e-4;
Tf = 0.020426189039706;
Gc = pid(Kp, 0, Kd, Tf)
%% Sensor
Fs = 1100/(s + 1100); % Sensor feedback transfer function
%% Closed-loop transfer function
Gcl = feedback(Gc*Gp, Fs);
% Gcl = Gc*Gp/(1 + (Gc*Gp*Fs)); % your closed-loop formula also works
Gcl = minreal(Gcl, 1e-3)
%% Step response of the Pitch system
figure;
step(Gcl, 0.5), grid on
%% Bode plot for open-loop transfer function
figure;
bode(Gc*Gp*Fs), grid on
%% Nyquist plot for open-loop transfer function
figure;
nyquist(Gc*Gp*Fs), grid on, ylim([-1.5 1.5])
0 comentarios
Ver también
Categorías
Más información sobre Classical Control Design 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!