DSP Blockset
  Go to block:
    Search    Help Desk 
Window Function    See Also

Compute a specified window, and apply it to an input signal.

Library

Signal Operations, in General DSP; DSP Sources

Description

The Window Function block has three modes of operation, which are selected by the Operation parameter. In each mode of operation, the block computes samples of the window specified by the Window type parameter. The length of the sampled window, Nw, is determined by the size of the input, or specified by the Window length parameter if there is no input.

Operation
Description
Apply window to input
Multiplies the sampled window, w, element-wise with the input vector, u:

    y = w .* u
    
The output is the result of this multiplication.
Generate window
Outputs the sampled window, w. There is no input.
Generate and apply window
Outputs the product of the window and the input, w.*u, in output 1, and outputs the sampled window, w, in output 2.

The Sampling parameter determines whether the window samples are computed in a periodic or a symmetric manner. For example, if Sampling is set to Symmetric, a Hamming window of Window length Nw is computed as

If Sampling is set to Periodic, the same window is computed as

The periodic window option only applies to the generalized-cosine windows (Blackman, Hamming, and Hanning).

The available window types are shown below. The Beta and Stopband ripple parameters specify the characteristics of the Chebyshev and Kaiser windows, and are only available when the respective window designs are selected.

Window Type
Description
Bartlett
Applies a Bartlett window to the real input vector:

    w = bartlett(Nw)
    
Blackman
Applies a Blackman window to the real input vector:

    w = blackman(Nw)
    
Boxcar
Applies a Boxcar window to the real input vector:

    w = boxcar(Nw)
    
Chebyshev
Applies a Chebyshev window to the real input vector:

    w = chebwin(Nw,R)
    
Hamming
Applies a Hamming window to the real input vector:

    w = hamming(Nw)
    
Hanning
Applies a Hanning window to the real input vector:

    w = hanning(Nw)
    
Kaiser
Applies a Kaiser window to the real input vector:

    w = kaiser(Nw,beta)
    
Triang
Applies a triangular window to the real input vector:

    w = triang(Nw)
    

Frame-Based Operation

In the cases when the window is being applied to an input (Generate and apply window or Apply window to input selected from the Operation menu), the block assumes that the input is an M-by-N frame matrix. Each of the N frames in the matrix contains M sequential time samples from an independent signal. The Number of channels parameter specifies the number of independent channels (columns, N) in the matrix. The block computes a window to match the input frame size (Nw=M), and applies the window to each channel independently. The output is the same size as the input. Frame-based operation provides substantial increases in throughput rates, at the expense of greater model latency.

Dialog Box

The parameters displayed in the dialog box vary for different operation/window type combinations. Not all of the parameters listed below are active in the dialog box at any one time.

Operation
The block's operation: generate a window, apply a window to an input, or both.
Window type 
The type of window to apply.
Window length
The length of the window to apply, Nw.
Stopband ripple 
The level (dB) of stopband ripple, Rs, for the Chebyshev window.
Beta 
The Kaiser window parameter. Increasing Beta widens the mainlobe and decreases the amplitude of the window sidelobes in the window's frequency magnitude response.
Sampling 
The window sampling, symmetric or periodic.
Number of channels
For frame-based operation, the number of channels (columns) in the input matrix, N.

See Also

FFT
bartlett (Signal Processing Toolbox)
blackman (Signal Processing Toolbox)
boxcar (Signal Processing Toolbox)
chebwin (Signal Processing Toolbox)
hamming (Signal Processing Toolbox)
hanning (Signal Processing Toolbox)
kaiser (Signal Processing Toolbox)
triang (Signal Processing Toolbox)


[ Previous | Help Desk | Next ]