0
$\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.

1 Answers 1

3

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/

  • 0
    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?2012-12-01
  • 0
    The values of $n$ range from 0 to 255, yes.2012-12-01
  • 0
    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 = 2552012-12-01
  • 0
    You are forgettin the $n$ in the numerator2012-12-01
  • 0
    but n is just ranging from 0 to 256 (block size) etc, right?2012-12-01
  • 0
    yes. but then when n=0 w(0)= 0.54 - 0.46 * cos(2*pi *0/ 255) = 0.54-0.46=0.082012-12-01
  • 0
    thank you :) got it now, just have to code it!! My result (from the hamming window) should look like the one you gave, right? I can plot these results in matlab2012-12-01
  • 0
    let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/6582/discussion-between-phorce-and-leonbloy)2012-12-02
  • 0
    Do I have to compute an FFT on this? Because in this example (http://en.wikipedia.org/wiki/File%3aWindow_function_%28hamming%29.png) which you gave, looks nothing like the results I get.. This does an FFT on it..2012-12-02