Simulink Transfer Function (Laplace transform)
18 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Aquatris
2018 年 6 月 29 日
What exactly do you want to do in simulink? Generate the same Bode diagram?
回答 (1 件)
Aquatris
2018 年 6 月 29 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time and Frequency Domain Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!