Simulink Transfer Function (Laplace transform)
조회 수: 17 (최근 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
답변 (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!