Linear filter design
Types
using dsp::filter::FreqIntervalSpec = typedef tsdf::SpecFreqIntervalle
Specificaton of a frequency response on an interval.
using dsp::filter::BiquadSpec = typedef tsdf::BiquadSpec
typedef tsdf::Fréquence dsp::filter::Frequency
Normalized frequency.
Structures
struct CICConfig
Main parameters for a CIC filter.
Functions
Vecf design_fir_hilbert(int n, cstring window="hn")
Hilbert filter FIR approximation.
FRat<float> design_biquad(const BiquadSpec &spec)
Biquad filter design.
FRat<float> design_biquad(cstring type, float f, float Q, float gain_dB=0)
Biquad filter design.
FRat<cfloat> design_iira(int n, cstring type, cstring prototype, float fc, float δ_bp=0.1f, float δ_bc=60)
IIR design from a classical analog prototype.
Vecf design_fir_freq(int n, const Vecf &d)
Frequency sampling design.
Vecf design_fir_freq_freqs(int n)
Computes the \(m\) frequencie values used for the sampling frequency technique design.
Vecf design_fir_eq(int n, const Vecf &d, const Vecf &w)
Equiripple FIR design (IRLS method).
Vecf design_fir_eq(int n, const vector<FreqIntervalSpec> &spec)
Equiripple FIR design (IRLS method).
Vecf design_fir_half_band(int n, float fc)
Half-band FIR design.
Vecf design_fir_wnd(int n, cstring type, float fc, cstring fen="hn", float fc2=0)
Windowed cardinal sine FIR design.
Vecf design_rif_wnd_kaiser(cstring type, float fc, float atten_db, float df, float fc2=0)
Windowed cardinal sine FIR design (Kaiser window).
Vecf design_fir_wnd_chebychev(int n, cstring type, float fc, float atten_db, float fc2=0)
Windowed cardinal sine FIR design (Chebychev window).
Vecf design_fir_rc(int n, float β, float fc)
Raised cosine filter design.
Vecf design_fir_srrc(int n, float β, float fc)
Square-root raised cosine filter design.
Vecf design_fir_srrc1(int n, float β, float osf, char nrm='s')
Square-root raised cosine filter design (1).
Vecf design_fir_gaussian(int n, float σ)
Coefficients for FIR approximation of a Gaussian filter (non windowed).
Vecf design_fir_gaussian_telecom(int n, float BT, int osf)
Coefficients for FIR approximation of a Gaussian filter, for a GFSK modulation.
float design_fir_gaussian_telecom_BT2sigma(float BT)
Computes the standard deviation (relative to the sample period) as a function of the Bandwidt - Time product (BT).
Vecf design_fir_prod(const Vecf &h1, const Vecf &h2)
Computes the FIR filter equivalent to the serie concatenation of two other FIR filters.
static Vecf design_fir_pb2ph_is(const Vecf &h)
Spectral inversion.
static Vecf design_fir_pb2ph_rs(const Vecf &h)
Spectral reflexion.
static Vecf design_fir_pb2pb(const Vecf &h)
static Vecf design_fir_pb2pm(const Vecf &h)
FRat<float> design_cic(const CICConfig &config)
CIC filter theorical transfert function.
CICComp design_cic_comp(const CICConfig &config, float Fin, int R2, float fc, int ncoefs)
Design of a compensation FIR filter for a CIC filter.
FRat<float> design_dc_blocker(float fc)
Transfert function for a DC blocker.
static FRat<float> design_notch(float f0, float fc)
static FRat<float> design_ma(int K)
Transfert function of a moving average filter with order \(K\).
static FRat<float> design_ema(Frequency fc)
Transfert function of an exponential filter.
static FRat<float> design_ema(float γ)
Transfert function of an exponential filter (from the forget factor)
float ema_coef(Frequency fc)
Generate first order IIR filter forget factor (unique coefficient) from cut-off frequency.
float ema_tc2coef(float tc)
Same as previous function, but take as input the time constant (in samples).
float ema_coef2tc(float γ)
Frequency ema_fcut(float γ)
Compute cut-off frequency, from forget factor of first order IIR filter.
Tableau<T> polyphase_form(const Vector<T> &x, unsigned int M)
Creation of the polyphase representation of a signal.
Vector<T> polyphase_iform(const Tableau<T> &X)
Compute the standard form from the polyphase representation.
FRat<cfloat> bilinear_transform(const FRat<cfloat> &ha, float fe)
Bilinear transform: conversion from Laplace transform to z transform.
float fd2fa(float fd)
Bilinear transform frequency warping (digital to analog).
float fa2fd(float fa)
Bilinear transform frequency warping (analog to digital).