Frequency response from a transfer function?

조회 수: 57 (최근 30일)
Ali Almakhmari
Ali Almakhmari 2023년 9월 18일
이동: Sam Chak 2024년 9월 26일
I have the following transfer function:
And I want to plot its frequency response but I am not sure how to do it. I hope someone can help
  댓글 수: 1
Saurabh
Saurabh 2024년 9월 26일
이동: Sam Chak 2024년 9월 26일
clc;
clear all;
num=[100];
den=[1,15,100];
impulse(num,den);
grid;

댓글을 달려면 로그인하십시오.

답변 (2개)

Star Strider
Star Strider 2023년 9월 18일
I assume you intend a bode or bodeplot plot —
s = tf('s');
G = exp(-s)/(2*s+1)
G = 1 exp(-1*s) * ------- 2 s + 1 Continuous-time transfer function.
figure
bodeplot(G)
grid
See the documentation I linked to, as well as the tf function, for details.
.

Dyuman Joshi
Dyuman Joshi 2023년 9월 18일
Use freqs. Note - Requires the Signal Processing Toolbox.
Refer to the documentation page linked above for more info.
help freqs
FREQS Laplace-transform (s-domain) frequency response. H = FREQS(B,A,W) returns the complex frequency response vector H of the filter B/A: nb-1 nb-2 B(s) b(1)s + b(2)s + ... + b(nb) H(s) = ---- = ------------------------------------- na-1 na-2 A(s) a(1)s + a(2)s + ... + a(na) given the numerator and denominator coefficients in vectors B and A. The frequency response is evaluated at the points specified in vector W (in rad/s). The magnitude and phase can be graphed by calling FREQS(B,A,W) with no output arguments. [H,W] = FREQS(B,A) automatically picks a set of 200 frequencies W on which the frequency response is computed. FREQS(B,A,N) picks N frequencies. % Example 1: % Find and graph the frequency response of the transfer function % given by % H(s) = ( 0.2*s^2 + 0.3*s + 1 )/( s^2 + 0.4s + 1 ) a = [1 0.4 1]; % Numerator coefficients b = [0.2 0.3 1]; % Denominator coefficients w = logspace(-1,1); % Frequency vector freqs(b,a,w) % Example 2: % Design a fifth-order analog lowpass Bessel filter with an % approximate constant group delay up to 10,000 rad/s and plot % the frequency response of the filter using freqs. [b,a] = besself(5,10000); % Bessel analog filter design freqs(b,a) % Plot frequency response See also LOGSPACE, POLYVAL, INVFREQS, and FREQZ. Documentation for freqs doc freqs
  댓글 수: 1
Ali Almakhmari
Ali Almakhmari 2023년 9월 18일
I think this is exactly what I am looking for. But I am not sure if I can use this command with e^-s in my numerator of the transfer function.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by