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 Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by