Let's consider we want to model a continuous time filter that has one zero at 30GH and two poles at 35GHz.
I also have a sampled waveform with sampling frequency of $f_s$, so the time interval between the samples is $T_s = 1/f_s$. Now I want to filter the waveform with filter that I just described. How can I do that?
Below is what I have tried, but the filtered output does not seem right. I appreciate if you let me know which step(s) are not done properly. I have written it in Matlab code so that you can try it for yourself.
% Define the baud rate fb = 32e9; % Calculate unit interval (UI) ui = 1/fb; % Define number of samples per UI smpls_per_ui = 32; % Calculate sampling interval and frequency si = ui / smpls_per_ui; fs = 1/si; % Define an impulse response as the input waveform to the filter ir = zeros(121*smpls_per_ui, 1); ir(smpls_per_ui/2) = 2 / si; % Define continuous system poles and zeros: poles_c = [35e9; 35e9]; zeros_c = [30e9]; k_c = 1; %gain % Convert poles and zeros to discrete system poles_d = exp(poles_c*si); zeros_d = exp(zeros_c*si); k_d = 1-exp(-k_c*si) ; % Get the filter numerator and denominator from poles and zeros [b,a] = zp2tf(zeros_d, poles_d, k_d); % Apply the filte ir_filtered = filter(b,a,ir); % Plot figure(1); clf; plot(ir, 'b'); hold on; plot(ir_filtered, 'r')