You are here: Symbol Reference > SignalUtils Namespace > Functions > SignalUtils.Blackman Function
DSP Master VCL
ContentsIndex
PreviousUpNext
SignalUtils.Blackman Function

Blackman window.

Pascal
function Blackman(const Src: TVec; alfa: double; WindowMode: TSignalWindowMode): TVec; overload;

Applies Blackman window with alfa parameter to Src. Window functions are applied to the signal prior to conversion to frequency domain with the FFT algorithm, to reduce the spectral leakage. Their side-effect is a lower frequency resolution. The window is defined as [1] p. 6-7:

        alpha + 1            2*Pi*n       alpha        4*Pi*n
w[n] = ---------- - 0.5*cos --------  -  ------ * cos(-------)
           2                 n - 1          2          n - 1

alpha = -0.16 (standard window)
alpha = - 0.25 (asymptotic optimal window for large n)

 

w[n] = 0.42 - 0.5*cos(2*Pi*n/(M-1)) + 0.08*cos(4*Pi*n/(M-1)) 

0 <= n <= M - 1 

References:  

[1] Intel IPP SPL v5.3 manual

Compute the frequency response of a lowpass filter with a cutoff at 40 Hz, if the sampling frequency is 200Hz and the filter is designed with the blackman window.

uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee;

procedure TForm1.Button1Click(Sender: TObject);
var h,Response,FreqFr: Vector;
begin
    h.Size(100);
    FirImpulse(h,[40],0,ftLowpass,wtRectangular,1,200);
    Blackman(H,0.1,wmSymmetric);
    FrequencyResponse(h,nil,Response,8);
    FreqFr.Size(Response.Length);
    FreqFr.Ramp(0,200*0.5/Response.Length);
    DrawIt(FreqFr, Response);
end;

 

  #include "MtxExpr.hpp"
  #include "MtxVecEdit.hpp"
  #include "MtxVecTee.hpp"
  #include "SignalUtils.hpp"

  void __fastcall TForm41::BitBtn1Click(TObject *Sender)
  {
      sVector h,Response,FreqFr;

      h.Length = 100;
      FirImpulse(h,OPENARRAY(double,(40)),0,ftLowpass,wtRectangular,1,200);
      Blackman(h,0.1,wmSymmetric);  //window the sinc impulse response
      FrequencyResponse(h,NULL,Response,8);

      FreqFr = Ramp(Response.Length, mvDouble, 0,200*0.5/Response.Length);
      DrawIt(FreqFr, Response,"",false);
  }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!