1
$\begingroup$

I'm trying to understand the Hamming window concept (Signal Processing) and the equation looks like the following:

enter image description here

Where:

N = number of Samples in each frame

Y[n] = Output Signal

X(n) = Input Signal

W(n) = Hamming window

First Question: I have "framed" (split the signal into blocks), so therefore, in X(n) do I pass in the values for each block, and, not the block itself?

Second question regarding the Hamming Window:

The equation is given:

enter image description here

From this I get:

w(n) = new vector

e.g. w(0) = 0.54 - 0.46 cos()

This is where I get lost. Shameful I know. Right, I know this is really stupid of me to ask but could someone help me out understanding the rest of this equation? I.e. in english steps?

Hope someone can help.

$\endgroup$

1 Answer 1

4
$\begingroup$

First Question: I have "framed" (split the signal into blocks), so therefore, in X(n) do I pass in the values for each block, and, not the block itself?

You have divided your entire signal in blocks of length $N$ (perhaps overlaping), and what follows is to be done for each block. So, in what follows $X(n)$ represents your input signal with $n=0$ being the start of your particular block.

Second question regarding the Hamming Window:

(please dont post images for formulas here, learn to type equations in latex) It seems you confused $N$ (fixed, window size) with $n$. The formula is

$$ w(n) = 0.54 - 0.46 \cos\left(\frac{2 \pi \, n}{N-1} \right)$$

If you graph this (image on the left here), you see that it's a smooth window peaked in the center of your block (N/2). To get $y(n)$, you just multiply, value by value:

$$y(n) = x(n) \, w(n)$$

BTW, this kind of question is better suited to https://dsp.stackexchange.com/

$\endgroup$
9
  • $\begingroup$ Hey - Take N = (Number of samples in each frame) = 256 .. So therefore will the values for w(n) range from 0 - 255 because N - 1? $\endgroup$
    – Phorce
    Dec 1, 2012 at 22:40
  • $\begingroup$ The values of $n$ range from 0 to 255, yes. $\endgroup$
    – leonbloy
    Dec 1, 2012 at 22:41
  • $\begingroup$ So this equation.. w(0) = 0.54 - 0.46 * cos(2*pi / 255) = 0.28203645802 .. Is this correct? If so, the value shouldn't ever change, should it? Because every block N = 256 N-1 = 255 $\endgroup$
    – Phorce
    Dec 1, 2012 at 22:44
  • $\begingroup$ You are forgettin the $n$ in the numerator $\endgroup$
    – leonbloy
    Dec 1, 2012 at 23:00
  • $\begingroup$ but <mi>n</mi> is just ranging from 0 to 256 (block size) etc, right? $\endgroup$
    – Phorce
    Dec 1, 2012 at 23:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .