I have a a low pass filter described by the following transfer function:
h[n] = (w_c/Pi) * sinc( n * w_c / Pi ), where is w_c is the cutoff frequency
I have to convert this low-pass filter to a band-pass filter.
You h[n]
transforms into a rect
in frequency domain. To make it band pass you need to move its central frequency higher.
To do this, multiply h[n]
by exp(j*w_offset*n)
, where w_offset
is the amount to shift. If w_offset
is positive, then you shift towards higher frequencies.
Multiplication in time domain is convolution in frequency domain. Since exp(j*w_offset*n)
turns into impulse function centred on w_offset
, the multiplication shifts the H(w)
by w_offset
.
See Discrete Time Fourier Transform for more details.
Note: such a filter will not be symmetric about 0, which means it will have complex values. To make it symmetric, you need to add h[n]
multiplied by exp(-j*w_offset*n)
:
h_bandpass[n] = h[n](exp(j*w_offset*n)+exp(-j*w_offset*n))
Since cos(w*n) = (exp(j*w*n)+exp(-j*w*n))/2
we get:
h_bandpass[n] = h[n]cos(w_offset*n)
This filter then has purely real values.