# Implementing digital filter by padding with zeros

I am making a 9th order digital bandpass filter with lower and upper corners of 200 kHz and 40 MHz respectively. I am using this filter to filter a 1D time domain signal which is 64k samples long sampled at a frequency of 150MHz.

I have done some digital filtering before in university, so I know what to expect, but it's been a while.

I have used this site: http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html to generate the filter coefficients and the gain, and I can see how the code works, my question is this:

I start with the value of X[0], then to calculate the value of Y[0] I need values for Y[-1] ... Y[-18] and x[-1] ... X[-18].

I know these do not exist, so I think (from what I remember from university) that I pad with zeros, however, doing a bit or reading I heard it mentioned that padding with zeros changes the sampling frequency.

So how do I go about calculating this new sampling frequency (if indeed required..)?

• You just use zero initial conditions, i.e. your delay line has all zeros in it. And your input signal is also zero before it actually starts. This is exactly what you describe as 'zero padding'. Sep 23, 2014 at 16:37
• Padding a signal with zeros on one end doesn't change its sampling frequency at all. Sep 24, 2014 at 0:06