How to filter a signal?

17 views (last 30 days)
Bandw W
Bandw W on 12 Aug 2019
Commented: Bandw W on 29 Aug 2019
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 Comment
Star Strider
Star Strider on 12 Aug 2019
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.

Sign in to comment.

Answers (1)

Robert U
Robert U on 13 Aug 2019
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 Comments
Robert U
Robert U on 27 Aug 2019
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 on 29 Aug 2019
Thankyou :)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!