DSPRelated.com
Forums

FIR filter design

Started by Tom Killwhang September 5, 2020
I am trying a simple example using frequency sampling. Therefore I have N=16 weights.
W=[w0 w1.....w15]
and I make then as follows

W=[1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 ]
as magnitude and the phase is -k*pi*(n-1)/N where k is from 0 to N/2
giving a frequency sampling complex vector of

H=[h0 h1 h2 ....h15]

Now according to textbooks I have to have conjugate symmetry but exactly how does this  work with the dc bit? The only way I could get it to work so I had real weight coefficients of the filter was to let the frequency coefficients be
h0=1 and then h15=conj(h1), h14=conj(h2), h13=conj(h3), h12=conj(h4).  

Then my time-domain coefficients were real and it worked. I read that h15 should be the dc bit ie h15=h0 but this doesn't work.
On Saturday, September 5, 2020 at 5:38:03 PM UTC-7, gyans...@gmail.com wrote:
> I am trying a simple example using frequency sampling. Therefore I have N=16 weights. > W=[w0 w1.....w15] > and I make then as follows > > W=[1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 ] > as magnitude and the phase is -k*pi*(n-1)/N where k is from 0 to N/2 > giving a frequency sampling complex vector of > > H=[h0 h1 h2 ....h15] > > Now according to textbooks I have to have conjugate symmetry but exactly how does this work with the dc bit? The only way I could get it to work so I had real weight coefficients of the filter was to let the frequency coefficients be > h0=1 and then h15=conj(h1), h14=conj(h2), h13=conj(h3), h12=conj(h4). > > Then my time-domain coefficients were real and it worked. I read that h15 should be the dc bit ie h15=h0 but this doesn't work.
On Saturday, September 5, 2020 at 5:38:03 PM UTC-7, gyans...@gmail.com wrote:
> I am trying a simple example using frequency sampling. Therefore I have N=16 weights. > W=[w0 w1.....w15] > and I make then as follows > > W=[1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 ] > as magnitude and the phase is -k*pi*(n-1)/N where k is from 0 to N/2 > giving a frequency sampling complex vector of > > H=[h0 h1 h2 ....h15] > > Now according to textbooks I have to have conjugate symmetry but exactly how does this work with the dc bit? The only way I could get it to work so I had real weight coefficients of the filter was to let the frequency coefficients be > h0=1 and then h15=conj(h1), h14=conj(h2), h13=conj(h3), h12=conj(h4). > > Then my time-domain coefficients were real and it worked. I read that h15 should be the dc bit ie h15=h0 but this doesn't work.
Take a look at the IEEE Proceedings paper by harris at: http://web.mit.edu/xiphmont/Public/windows.pdf On the second page follow the definition of concepts like "DFT-even" for how to align sampled data with DFTs for desired symmetries. Dale B. Dalrymple