Effacer les filtres
Effacer les filtres

Matlab Overall Transfer Function script based on Simulink Block Diagram.

12 vues (au cours des 30 derniers jours)
steven higham
steven higham le 21 Nov 2020
Commenté : steven higham le 22 Nov 2020
Hello, I am a real newbie to Matlab and still finding my feet with the basic operations. I am reallt struggling to get a Matlab script to produce an overall transfer function that will produce a step response that is identical to the block diagram in simulink that the script has been derived from. I have been over and over it, had my maths checked for the calutations regarding the negative feedback loops, but still no success. I am really hoping that someone on this cummunity may be able to come to my rescue and show me where I am going wrong. I have been at this for over a week now!!
I have attached some screen shots so you can see where I am coming from. The screen shot of the Matlab script shows to responses, the one with the black background is from Simulink, and the white background is Matlab. The Matlab response should be identical to the Simulink response. I have taken a screen shot of the block diagram and also my math working out to produce the transfer functions.
Thanks for taking the time to look at this problem.
  1 commentaire
steven higham
steven higham le 22 Nov 2020
Thanks Paul,
I see the errors I have made and much appreciate your assistance with this problem.
Top Man!!!

Connectez-vous pour commenter.

Réponse acceptée

Paul
Paul le 22 Nov 2020
It would be much easier to see what you did if you posted your code instead of an image of your code.
Looking at your derivations, it looks like you didn't compute the transfer functions correctly. For example, FHG8 should be:
FHG8 = G6*G7 / (1 + G6*G7*G8) compare this denominator to yours.
Here is one approach to get the proper result:
G1 = tf(1,[.01 1]);
G2 = tf([0.17 1],[0.085 0]);
G3 = G1;
G4 = tf([0.15 1],[0.051 0]);
G5 = tf(70,[0.0067 1]);
G6 = tf(0.21,[0.15 1]);
G7 = tf(130,[1 0]);
G8 = tf(0.212);
G9 = tf(0.1,[0.01 1]);
G10 = tf(0.0044,[0.01 1]);
H1 = feedback(G6*G7,G8);
H2 = feedback(G4*G5*H1,G9*inv(G7));
H3 = feedback(G2*G3*H2,G10);
H4 = G1*H3;
step(H4,0:.01:10)
If you want to do transfer function algebra, which isn't recommended, to compare to your derivation:
F1 = minreal(G6*G7/(1 + G6*G7*G8));
F2 = minreal(G4*G5*F1/(1 + G4*G5*F1*G9*inv(G7)));
F3 = minreal(G2*G3*F2/(1 + G2*G3*F2*G10));
F4 = G1*F3;
step(F4,0:.01:10)

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by