window_chebychev

Chebychev window creation.

Namespace: dsp::filter

Prototype

Vecf window_chebychev(int n, float atten_db, bool symetrical=true)

Parameters

nNumber of points.
atten_dbDesired attenuation (in dB) on the stop-band.
symetricalIf true, realization of window symetrical around its center point (which should be done for the FIR filter design), otherwise realization of a periodical window (which is better for spectral analysis applications).

Returns

Column vector with the window coefficients (dimension of vector is n)

Description

The Chebychev window has the property to give rise to constant ondulations in the frequency domain (si example below). The design is also very straigthforward for FIR filter design, because one has just to select the window order (number of coefficients), and the desired attenuation, and it is the main lobe width that play the role of adjustment variable.

Example: creation of a window with 60 dB of attenuation


  // Spécifications :
  // - 60 dB d'atténuation,
  // - 31 coefficients
  soit x = fenêtre_chebychev(31, 60);
  soit [fr, xm] = frmag(x);

  Figure f1, f2;
  f1.plot(x, "b-o");
  f2.plot(fr, mag2db(xm / xm.valeur_max()));

Time domain

Spectrum

See also

design_fir_win()