フィルターデザイナーで設計したHPFの正弦波特性

조회 수: 26 (최근 30일)
Kenji
Kenji 2023년 4월 30일
답변: Kenji 2023년 5월 2일
フィルタデザイナで以下のようなHPFを設計しました。
このフィルタに振幅1, 周波数75Hzの正弦波を入れてみると、以下のような応答が得られました(青は振幅±1, 赤がフィルタ出力)。上のゲイン特性では75Hzでは少なくとも-30dBの減衰を実現できるはずですが、実際は振幅が1→0.03程度なので-14dBといったところです。この差が生まれるのはなぜでしょうか?ちなみに50Hz正弦波入力では出力振幅は0.001程度(-30dB)、上のゲイン特性では-50dB以下。
function Hd = chevyshev_65_100
%CHEVYSHEV_65_100 離散時間フィルター オブジェクトを返します。
% MATLAB Code
% Generated by MATLAB(R) 9.14 and Signal Processing Toolbox 9.2.
% Generated on: 30-Apr-2023 10:38:10
% Chebyshev Type I Highpass filter designed using FDESIGN.HIGHPASS.
% All frequency values are in Hz.
Fs = 20000; % Sampling Frequency
Fstop = 65; % Stopband Frequency
Fpass = 100; % Passband Frequency
Astop = 40; % Stopband Attenuation (dB)
Apass = 1; % Passband Ripple (dB)
match = 'passband'; % Band to match exactly
% Construct an FDESIGN object and call its CHEBY1 method.
h = fdesign.highpass(Fstop, Fpass, Astop, Apass, Fs);
Hd = design(h, 'cheby1', 'MatchExactly', match);
% make dummy sin wave
t=0:0.00005:1;
freq2=75;
signal2=sin(2*pi*freq2*t);
ux=signal2;
% apply filter to dummy data
yf5=filter(Hd,ux);
% check result in time domain
plot(t,ux,t,yf5)
ylim([-0.1,0.1])
ylabel('amplitude')
xlabel('t [s]')
legend('Raw Data','Filtered Data(butter,12dim)')
% [EOF]
  댓글 수: 1
Hiroshi Iwamura
Hiroshi Iwamura 2023년 5월 1일
dB の定義はパワー比の対数の10倍です。
振幅の場合は2乗する必要があります。
Fs = 20000; % Sampling Frequency
Fstop = 65; % Stopband Frequency
Fpass = 100; % Passband Frequency
Astop = 40; % Stopband Attenuation (dB)
Apass = 1; % Passband Ripple (dB)
match = 'passband'; % Band to match exactly
h = fdesign.highpass(Fstop, Fpass, Astop, Apass, Fs);
Hd = design(h, 'cheby1', 'MatchExactly', match);
t=0:0.00005:1;
freq2=75;
signal2=sin(2*pi*freq2*t);
ux=signal2;
yf5=filter(Hd,ux);
plot(t,ux,t,yf5)
ylim([-0.1,0.1])
ylabel('amplitude')
xlabel('t [s]')
legend('Raw Data','Filtered Data(butter,12dim)')
figure
plot(t,mag2db(ux),t,mag2db(yf5)) % mag2db(x) = 20*log10(x)
ylim([-50 0])

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

답변 (1개)

Kenji
Kenji 2023년 5월 2일
すっきりしました。ご回答ありがとうございました。

카테고리

Help CenterFile Exchange에서 フィルターの設計에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!