Frequency response from a transfer function?

110 Ansichten (letzte 30 Tage)
Ali Almakhmari
Ali Almakhmari am 18 Sep. 2023
Verschoben: Sam Chak am 26 Sep. 2024
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 Kommentar
Saurabh
Saurabh am 26 Sep. 2024
Verschoben: Sam Chak am 26 Sep. 2024
clc;
clear all;
num=[100];
den=[1,15,100];
impulse(num,den);
grid;

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Star Strider
Star Strider am 18 Sep. 2023
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 am 18 Sep. 2023
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 Kommentar
Ali Almakhmari
Ali Almakhmari am 18 Sep. 2023
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by