Simulink Transfer Function (Laplace transform)

18 ビュー (過去 30 日間)
Fatos SYLAJ
Fatos SYLAJ 2018 年 6 月 28 日
回答済み: Aquatris 2018 年 6 月 29 日
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
Aquatris 2018 年 6 月 29 日
What exactly do you want to do in simulink? Generate the same Bode diagram?
Fatos SYLAJ
Fatos SYLAJ 2018 年 6 月 29 日
Hi Aquatris, Thank you for your reply. Yes basically that. If possible being able to change values and see the reaction, different diagram plotted. for example, change the input signal from sinus to something else and see the results.

サインインしてコメントする。

回答 (1 件)

Aquatris
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.

カテゴリ

Help Center および File ExchangeTime and Frequency Domain Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by