Hi there! I am trying to make a butterworth bandpass filter in matlab and am having some trouble with it. The specifications for my filter are a center frequency of 10kHz with limits of +/- 30 Hz. In addition to this, I'd like to have 100dB of attenuation at 1kHz away from the center frequency, so if anyone could shed some light on how I could do this that would be awesome!
Right now I am trying to test my filter by simulating a 10kHz sinusoidal signal in LTSpice, exporting the time-voltage data to matlab and then resampling the signal so that it is periodic. I have then made and applied a butterworth bandpass filter with passband 9970Hz – 10030 Hz in the hope that I can completely allow the 10kHz signal to pass through. Right now this is not the case and I am getting some cutoff which progressively increases with time. Running the provided matlab script with the provided text file will illustrate this. I have attached the matlab code as well as the exported time-voltage text file.
Any help would be greatly appreciated!
Best Answer