Salta al contenuto
Note per Studenti Frequency-Selective Filters Report

Frequency-Selective Filters

In questa pagina 4

Filtering

For a convolutional LTI system the input-output relation is a convolution, y(t)=h∗u(t)y(t)=h*u(t). Taking Fourier transforms,

Y(jω)=H(jω)⋅U(jω).Y(j\omega)=H(j\omega)\cdot U(j\omega).

By choosing H(jω)H(j\omega) we can modify the frequency components of the input as we desire: this is the key idea defining filters.

Ideal low-pass filter

HILP(jω)=rect ⁣(ω2ωc),H_{ILP}(j\omega)=\mathrm{rect}\!\left(\frac{\omega}{2\omega_c}\right),

equal to 11 on the passband [−ωc,ωc][-\omega_c,\omega_c] and 00 elsewhere (stopped band).

Ideal high-pass filter

HIHP(jω)=1−rect ⁣(ω2ωc)=1−HILP(jω).H_{IHP}(j\omega)=1-\mathrm{rect}\!\left(\frac{\omega}{2\omega_c}\right)=1-H_{ILP}(j\omega).

Sketch: the constant 11 minus the rectangle gives 00 for ∣ω∣<ωc|\omega|<\omega_c and 11 for ∣ω∣>ωc|\omega|>\omega_c.

The low-pass filter is studied also to understand high-pass filters, because of this relation: all other filters can be derived from a low-pass one, which simplifies the discussion.

First-order implementation of low-pass and high-pass filters

Low-pass. HLP(jω)=11+jωωc,ωc=1RC.H_{LP}(j\omega)=\frac1{1+j\frac{\omega}{\omega_c}},\qquad\omega_c=\frac1{RC}. It is realized by an RC circuit: input voltage u(t)u(t) in series with the resistor RR, the capacitor CC connected across the output, y(t)y(t) taken on the capacitor.

The modulus ∣HLP(jω)∣|H_{LP}(j\omega)| is 11 at ω=0\omega=0, equals 12\frac1{\sqrt2} at ω=ωc\omega=\omega_c and decays for large ω\omega; compared with the ideal rectangle, the transition is smooth. The notes mark the inflection point of the modulus at ω=ωc2\omega=\frac{\omega_c}{\sqrt2}.

High-pass. HHP(jω)=1−HLP(jω)=1−11+jωωc=jωωc1+jωωc,ωc=1RC.H_{HP}(j\omega)=1-H_{LP}(j\omega)=1-\frac1{1+j\frac\omega{\omega_c}}=\frac{j\frac\omega{\omega_c}}{1+j\frac\omega{\omega_c}},\qquad\omega_c=\frac1{RC}. It is realized by an RC circuit with the capacitor in series with the source and the output y(t)y(t) taken on the resistor. ∣HHP∣|H_{HP}| is 00 at ω=0\omega=0, tends to 11 at high frequency, and again has its inflection point at ω=ωc2\omega=\frac{\omega_c}{\sqrt2}.

Theoretical design of (low-pass) filters

Low-pass filters are frequency-selective filters. The following three criteria should be adopted:

  1. The signal components over the passband [−ωc,ωc][-\omega_c,\omega_c] must be preserved (non-distortion conditions).
  2. We want a precise cut-off at −ωc-\omega_c and ωc\omega_c.
  3. Strong attenuation over the stopped band.

Distortion

Distortion is "changing the shape". The shape-invariant transformations are:

  • anticipation / delay are not distortion;
  • amplification / attenuation are not distortion.

So a filter without distortion has the form

y(t)=H0 u(t−t0),H0≥0, t0∈R,y(t)=H_0\,u(t-t_0),\qquad H_0\ge0,\ t_0\in\mathbb{R},

with H0>1H_0>1 an amplification and t0>0t_0>0 a delay (sketch: the output is the same bump, higher by H0H_0 and shifted to the right by t0t_0).

Imposing y(t)=H0u(t−t0)y(t)=H_0u(t-t_0) means imposing h(t)=H0 δ(t−t0)h(t)=H_0\,\delta(t-t_0), and therefore

H(jω)=F[h(t)]=H0 e−jωt0.\boxed{H(j\omega)=\mathcal{F}[h(t)]=H_0\,e^{-j\omega t_0}.}

Heaviside conditions (non-distortion over the passband)

  • HC1: ∣H(jω)∣=H0|H(j\omega)|=H_0 for all ω∈[−ωc,ωc]\omega\in[-\omega_c,\omega_c].
  • HC2: ∠H(jω)=−ωt0\angle H(j\omega)=-\omega t_0 for all ω∈[−ωc,ωc]\omega\in[-\omega_c,\omega_c], i.e. a linearly decreasing (or increasing, if t0<0t_0<0) phase.

Why HC1. Preserving the relative amplitude among different ω\omega is important. Example (with ωc≫4π\omega_c\gg4\pi): u(t)=cos⁡(2πt)+cos⁡(4πt)u(t)=\cos(2\pi t)+\cos(4\pi t) through a filter in which HC1 is not well satisfied gives y(t)=0.5cos⁡(2πt)+2cos⁡(4πt)y(t)=0.5\cos(2\pi t)+2\cos(4\pi t); the waveform of yy is visibly different from that of uu.

Example where HC2 is not satisfied. Let y(t)=R[u(t)]=u(−t)∈Ry(t)=R[u(t)]=u(-t)\in\mathbb{R} (time reversal). Recall Hermitian symmetry: U(jω)‾=U(−jω)  ⟺  u(t)∈R\overline{U(j\omega)}=U(-j\omega)\iff u(t)\in\mathbb{R}. Then

Y(jω)=F[u(−t)]=U(−jω)=U(jω)‾ ⇒ ∣Y(jω)∣=1⋅∣U(jω)∣,∠Y(jω)=−∠U(jω).Y(j\omega)=\mathcal{F}[u(-t)]=U(-j\omega)=\overline{U(j\omega)}\ \Rightarrow\ |Y(j\omega)|=1\cdot|U(j\omega)|,\quad\angle Y(j\omega)=-\angle U(j\omega).

HC1 is fulfilled (H0=1H_0=1 for all ω\omega) but the phase is −∠U-\angle U, which is not linear in ω\omega: HC2 is extremely hard to satisfy and here one experiences the worst distortion. Not a surprise: a signal and its mirror image look very different.

Qualitative plots of the Heaviside conditions: ∣H(jω)∣|H(j\omega)| is flat at the level H0H_0 on [−ωc,ωc][-\omega_c,\omega_c] (and may decay outside); ∠H(jω)\angle H(j\omega) is a straight line of slope −t0-t_0 through the origin on [−ωc,ωc][-\omega_c,\omega_c].

Adding requirements 2 and 3: the ideal low-pass filter

HILP(jω)=rect ⁣(ω2ωc),hILP(t)=F−1[HILP(jω)]=ωcπ sinc ⁣(ωcπt)=sin⁡(ωct)πt.H_{ILP}(j\omega)=\mathrm{rect}\!\left(\frac\omega{2\omega_c}\right),\qquad h_{ILP}(t)=\mathcal{F}^{-1}[H_{ILP}(j\omega)]=\frac{\omega_c}\pi\,\mathrm{sinc}\!\left(\frac{\omega_c}\pi t\right)=\frac{\sin(\omega_ct)}{\pi t}.

The impulse response is a sinc with peak ωcπ\frac{\omega_c}{\pi} at t=0t=0 and first zeros at t=±πωct=\pm\frac\pi{\omega_c}.

It is not applicable to real systems because:

  • hILP(t)h_{ILP}(t) has unbounded support (which means slow filtering dynamics);
  • hILP(t)h_{ILP}(t) is not BIBO-stable, because sinc∉L1(R)\mathrm{sinc}\notin L^1(\mathbb{R});
  • hILP(t)h_{ILP}(t) is not causal: h(t)≠0h(t)\ne0 for t<0t<0.

Practical design of (low-pass) filters

A realistic magnitude response is specified by:

  • ωp\omega_p: end of the passband (PP = passband); ωs\omega_s: beginning of the stopband (SS = stopband); ideally ωp=ωc=ωs\omega_p=\omega_c=\omega_s;
  • transition band: ωs−ωp\omega_s-\omega_p;
  • ripple in the passband δp∈(0,1)\delta_p\in(0,1): the modulus stays between 1−δp1-\delta_p and 1+δp1+\delta_p for ω≤ωp\omega\le\omega_p;
  • ripple in the stopband δs∈(0,1)\delta_s\in(0,1): the modulus stays below δs\delta_s for ω≥ωs\omega\ge\omega_s.

The parameters ωp,ωs,δp,δs\omega_p,\omega_s,\delta_p,\delta_s can be regulated but they end up being in a trade-off every time.

This design can be implemented in practice through analog circuits. Nowadays, however, we are more interested in discrete-time filters to use on digital devices, see FIR and IIR FiltersDiscrete-time (digital) filters are described by ARMA difference equations; FIR filters have finite impulse response (moving average, no auto-regression), IIR filters have auto-regression and a rational frequency response; worked examples of a first-order IIR low-pass/high-pass filter and a moving-average FIR low-pass filter.FIR and IIR Filters →.

Versione ripasso

  • Filtering: y=h∗u⇒Y(jω)=H(jω)U(jω)y=h*u\Rightarrow Y(j\omega)=H(j\omega)U(j\omega). Ideal LP: HILP=rect(ω2ωc)H_{ILP}=\mathrm{rect}(\frac\omega{2\omega_c}); ideal HP: HIHP=1−HILPH_{IHP}=1-H_{ILP}.
  • First-order LP: HLP=11+jω/ωcH_{LP}=\frac1{1+j\omega/\omega_c} with ωc=1RC\omega_c=\frac1{RC} (output on the capacitor); HP: HHP=1−HLP=jω/ωc1+jω/ωcH_{HP}=1-H_{LP}=\frac{j\omega/\omega_c}{1+j\omega/\omega_c} (output on the resistor). Modulus inflection point at ωc/2\omega_c/\sqrt2.
  • Design criteria for LP: (1) non-distortion in the passband, (2) precise cut-off, (3) strong stopband attenuation.
  • Distortion-free: y=H0u(t−t0)y=H_0u(t-t_0), i.e. h=H0δ(t−t0)h=H_0\delta(t-t_0) and H(jω)=H0e−jωt0H(j\omega)=H_0e^{-j\omega t_0}. Delay and amplification are not distortion.
  • Heaviside conditions on the passband: HC1 ∣H(jω)∣=H0|H(j\omega)|=H_0; HC2 ∠H(jω)=−ωt0\angle H(j\omega)=-\omega t_0 (linear phase). Breaking HC1 changes relative amplitudes (cos⁡2πt+cos⁡4πt↦0.5cos⁡2πt+2cos⁡4πt\cos2\pi t+\cos4\pi t\mapsto0.5\cos2\pi t+2\cos4\pi t); time reversal u(−t)u(-t) satisfies HC1 but has phase −∠U-\angle U, the worst distortion.
  • hILP(t)=sin⁡(ωct)πt=ωcπsinc(ωctπ)h_{ILP}(t)=\frac{\sin(\omega_ct)}{\pi t}=\frac{\omega_c}{\pi}\mathrm{sinc}(\frac{\omega_ct}\pi): unbounded support, not BIBO-stable (sinc∉L1\mathrm{sinc}\notin L^1), not causal, so not realizable.
  • Practical filter: ωp\omega_p, ωs\omega_s, transition band ωs−ωp\omega_s-\omega_p, ripples δp\delta_p, δs\delta_s in (0,1)(0,1); all in trade-off.
  • Typical mistakes: treating a delay as distortion; forgetting that HC2 is a condition on the phase, not on the modulus; believing the ideal LP can be built (it is non-causal and unstable).