Low pass filter VS high pass filter

8 ビュー (過去 30 日間)
Omar Abulayla
Omar Abulayla 2021 年 1 月 21 日
回答済み: Star Strider 2021 年 1 月 21 日
I have this filter and I want to analyze it. How can I know from the plot that its a highpass filter or a lowpass filter?

採用された回答

Star Strider
Star Strider 2021 年 1 月 21 日
Calculate the Fourier transform of the filter from the signals.
t = ...; % Time Vector
s = ...; % Original Signal Vector
s_filtered = ...; % Filtered Signal Vector
Ts = mean(diff(t)); % Sampling Interval (Assumes Constant Intervals)
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(t); % Signal Length
FTs = fft(s)/L % Fourier Transform of Original Signal
FTs_filt = fft(s_filtered)/L; % Fourier Transform of Filtered Signal
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector (One-Sided Fourier Transform)
Iv = 1:numel(Fv); % Index Vector (One-Sided Fourier Transform)
H = FTs_filt ./ FTs; % Complex Transfer Function
figure
subplot(2,1,1)
plot(Fv, abs(H(Iv)))
ylabel('Amplitude')
grid
subplot(2,1,2)
plot(Fv, angle(H(Iv)))
xlabel('Frequency')
ylabel('Phase')
grid
sgtitle('Bode Plot of Filter')
That should reveal the filter characteristics, as well as reasonably accurate aspects of its design (e.g. passband and stopband frequencies).

その他の回答 (2 件)

Jan
Jan 2021 年 1 月 21 日
編集済み: Jan 2021 年 1 月 21 日
On first view you see, thet the high frequencies are removed: the changes between neighboring values are reduced. This means that the filter let low frequencies pass through, so it is a low-pass filter.

Mathieu NOE
Mathieu NOE 2021 年 1 月 21 日
hello
you can do a bode plot of the transfer function between the output (signal filtered) vs the input (raw signal)
use tfestimate for transfer function estimation from time data and you will be able to fit a filter TF to that

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by