I am new to signal processing. I am having a problem applying a filter to a test signal. I am working with MatLab.
My test signal is a chirp up to Nyquist frequency and my filter is in zeros and poles form. I am using zp2tf and filter functions but I have amplitudes that increase with frequency up to 3000dB approximately.
The problem is that this amplitudes surely are bad, then I ask for help to understand how can I correct this problem and why it appears.
Next, I paste my code for your review
close all clear all clc fl = 0.05; % chirp low frequency fh = 3.3125; % chirp high frequency fs = 2*fh; % signal sampling frequency dt = 1/fs; % delta of time T = 20; % signal durartion t = [0:dt:T]'; % time vector x = 10^(-8)*chirp(t,fl,T,fh); % test signal z = '; % zeros vector (only one) p = [-3.56047E-01+2.83702E+00*1i,... % poles vector -3.56047E-01-2.83702E+00*1i,... -6.28319E-02+0.00000E+00*1i,... -8.06237E+00+3.33954E+00*1i,... -8.06237E+00-3.33954E+00*1i,... -8.06237E+00+3.33954E+00*1i,... -8.06237E+00-3.33954E+00*1i,... -3.33954E+00+8.06237E+00*1i,... -3.33954E+00-8.06237E+00*1i,... -3.33954E+00+8.06237E+00*1i,... -3.33954E+00-8.06237E+00*1i]'; k = 2.88869E+07*3.57916E+09; % gain constant [b,a] = zp2tf(z,p,k); y = filter(b,a,x); hfig = figure; plot(t,db(y));
Thank you for all your help and valuable time!