Simulink Transfer Function (Laplace transform)
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi guys, I'm new to Simulink, and i need help with a homework. I was asked to explain a circuit with Laplace transform, and have a simulink example. This is what the end result should look like:
w=1:10:10000; s=j.*w; Gs=5.33.*10.^7./(s.^2+2.66.*10.^4.*s+6.66.*10.^7);...
semilogx(w,abs(Gs)); xlabel('Radian Frequency w'); ylabel('|Vout/Vin|');...
title('Magnitude Vout/Vin vs. Radian Frequency'); grid
I would like to be able to have a simulink project where i can insert a transfer function (Gs) shown in the code. I have managed to put a signal generator, a scope, and a transfer function 1/s+1, but i get an error saying:
Caused by:
Error evaluating parameter 'Denominator' in 'untitled/Transfer Fcn'
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise matrix powers, use '.^'.
i would very much appreciate if you could help me.
Kind regards
2 Kommentare
Aquatris
am 29 Jun. 2018
What exactly do you want to do in simulink? Generate the same Bode diagram?
Antworten (1)
Aquatris
am 29 Jun. 2018
You need to definethe transfer function as;
s = tf('s');
Gs = (5.33*10^7) / (s^2 + 2.66*10^4*s + 6.66*10^7);
or alternatively
Gs = tf([5.33*1e7],[1 2.66e4 6.66e7]);
In your Simulink transfer function block, put the numerator as [5.33*1e7] and denominator as [1 2.66e4 6.66e7]. Then, you can apply any signal to the block and it will give you the output.
In simulink, there is the Linear Analysis, where you can analyze the bode, step response etc. To do that, once you create your simulink model, go to Analysis->Control Design->Linear Analysis. This will open up a new window. Select your simulink transfer function block and in the new window select "Linearize the Currently Selected Block" for the "Analysis IO" at the top. Then, click in the "Bode Plot" in the top bar.
Hope this helps.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Time and Frequency Domain Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!