How to filter a signal?

16 ビュー (過去 30 日間)
Bandw W
Bandw W 2019 年 8 月 12 日
コメント済み: Bandw W 2019 年 8 月 29 日
I need to filter a time domain simple signal through a analog low pass filter which i have designed. I need the output signal in time domain.
%LPF
order=3;
ripple = 1; %pass band ripple
f_c= 22e6;
[num1, den1] = cheby1(order, ripple, 2*pi*1.10*f_c, 'low', 's');
%Create input signal
Fs=200e6;
Ts=1/Fs;
NFFT=2^12;
Runtime=(NFFT-1)*Ts;
t=0:Ts:Runtime
a_in=1;
phase_in=0;
y_in=a_in*sin(2*pi*fin*t+phase_in); % 4096 points
I need the output signal y_out in time domain of 4096 points. What do I need to do?
  1 件のコメント
Star Strider
Star Strider 2019 年 8 月 12 日
I need to filter a time domain simple signal through a analog low pass filter which i have designed.
Implement your filter in hardware, then run your digital signal through a DAC to create a continuous version of it, and use your filter on the analog signal.

サインインしてコメントする。

回答 (1 件)

Robert U
Robert U 2019 年 8 月 13 日
Hi Bandw W,
if you would like to simulate the output you can use lsim():
%% filter signal
% create system
myFilter = tf(num1,den1);
% apply filter to time domain signal
[y_out, time] = lsim(myFilter,y_in,t);
% plot for check
plot(time,[y_in; y_out'])
Kind regards,
Robert
  7 件のコメント
Robert U
Robert U 2019 年 8 月 27 日
Hi Bandw W,
You could sample your 175 MHz signal at much higher frequency in order to represent the analogue signal (let's say at 1.75 GHz, if this is reasonable bandwith of your analogue domain signal path) - though it would be still digital. This signal you could filter with the "analog filter" representation for your simulation. The output would be still sampled at 1.75 GHz. That signal you could sample than with 200 MHz and do the rest of your processing.
If you want to work with real analogue signals I'd to refer to Star Strider's comment above.
Kind regards,
Robert
Bandw W
Bandw W 2019 年 8 月 29 日
Thankyou :)

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by