Bandwidth returns inf with discrete time transfer function

조회 수: 9 (최근 30일)
Shivanshu Sahoo
Shivanshu Sahoo 2021년 9월 30일
댓글: Star Strider 2021년 9월 30일
I am trying to find the 3dB frequency of discrete time transfer function using bandwidth but it returns inf. Here is the code:
alpha1=0.9;
ts = 0.1;
z = tf('z',ts);
H = ((1-alpha1)/2)*(1-z)/(1-alpha1*z);
fb = bandwidth(H,-3);
Am I doing anything conceptually wrong?
  댓글 수: 4
Mathieu NOE
Mathieu NOE 2021년 9월 30일
see the results of low pass vs high filters
bandwith works ok only for the low pass case
% high pass digital filter
alpha1=0.9;
ts = 0.1;
z = tf('z',ts);
H = ((1-alpha1)/2)*(1-z)/(1-alpha1*z);
figure(1),bode(H)
fb = bandwidth(H,-3);
% low pass analog filter
sys = tf(1,[1 1]);
fb = bandwidth(sys)
figure(2),bode(sys)
% high pass analog filter
sys = tf([1 0],[1 1]);
fb = bandwidth(sys)
figure(3),bode(sys)
Shivanshu Sahoo
Shivanshu Sahoo 2021년 9월 30일
Yes @Mathieu NOE you are correct. Bandwidth works only for low pass.

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

채택된 답변

Star Strider
Star Strider 2021년 9월 30일
The -3 dB frequency is straightforward to calculate —
alpha1=0.9;
ts = 0.1;
z = tf('z',ts);
H = ((1-alpha1)/2)*(1-z)/(1-alpha1*z);
fb = bandwidth(H,-3)
fb = Inf
[mag,phase,wout] = bode(H);
mag = squeeze(mag);
wdB3 = interp1(mag2db(mag/max(mag)), wout, -3)
wdB3 = 1.0591
magdB3 = interp1(wout, mag2db(mag), wdB3)
magdB3 = -28.5751
phase = squeeze(phase);
figure
semilogx(wout, mag2db(mag))
hold on
plot(wdB3, magdB3, '+r', 'MarkerSize',10)
hold off
grid
xlim([min(wout) max(wout)])
.
  댓글 수: 4
Shivanshu Sahoo
Shivanshu Sahoo 2021년 9월 30일
Ok thank you so much
Star Strider
Star Strider 2021년 9월 30일
As always, my pleasure!
.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by