Analysis of linear filters

These functions can help to analyze the different responses of a LTI filter. Below are some responses that are possible to plot:


Types

using dsp::filter::FilterAnalysis = typedef tsdf::AnalyseFiltre
Result of a linear filter analysis.

Functions

void verifie_frequence_normalisee(float f, cstring msg="")
Check validity of a normalized frequency.

static tuple<Vecf, Vecf> frmag(const Design &d, unsigned int npts=1024)
Magnitude of a FIR or IIR filter.

static Veccf repfreq(const Design &d, const Vecf &fr)
Frequency response of a FIR or IIR filter.

static Vecf repimp(const Design &d, int npts=-1)
Impulse response.

static tuple<Vecf, Vecf> frphase(const Design &d, int npts=1024)
Phase of FIR and IIR filters.

static tuple<Vecf, Vecf> frgroup(const Design &d, int npts=1024)
Computes the group delay.

static Figures plot_filter(const Design &d, bool complete=false, float fs=1)
Analysis of a linear filter (plot the different responses).

static void plot_plz(Figure &fig, const Design &d, bool cmap=false)
Poles / zeros diagram.

tuple<Vecf, Vecf> firamp(const Vecf &h, int L=1024, bool symetrical=true)
Amplitude response of a symetrical or antisymetrical FIR filter (linear phase).

float fir_delay(int N)
Computes the delay of a linear phase FIR filter.

static FilterAnalysis filter_analysis(const Design &d, bool with_plots)
Analyse d'un filtre linéaire invariant dans le temps (d'après la fonction de transfert).

static int fir_type(const Vecf &h)
Compute the type (I, II, III ou IV) of a FIR filter with linear phase. If the coefficients are not symetrical nor anti-symetrical, returns -1.