Difference between revisions of "Theory of Stochastic Signals/Digital Filters"

From LNTwww
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
   
 
   
 
{{Header
 
{{Header
|Untermenü=Filterung stochastischer Signale
+
|Untermenü=Filtering of Stochastic Signals
 
|Vorherige Seite=Stochastische Systemtheorie
 
|Vorherige Seite=Stochastische Systemtheorie
 
|Nächste Seite=Erzeugung vorgegebener AKF-Eigenschaften
 
|Nächste Seite=Erzeugung vorgegebener AKF-Eigenschaften
 
}}
 
}}
==Allgemeines Blockschaltbild==
+
==General block diagram==
 
<br>
 
<br>
Jedes Signal $x(t)$ kann an einem Rechner nur durch die Folge $〈x_ν〉$ seiner Abtastwerte dargestellt werden, wobei $x_ν$ für $x(ν · T_{\rm A})$ steht. Der zeitliche Abstand $T_{\rm A}$ zwischen zwei Abtastwerten ist dabei durch das [[Signaldarstellung/Zeitdiskrete_Signaldarstellung#Das_Abtasttheorem|Abtasttheorem]] nach oben begrenzt.   
+
Each signal&nbsp; $x(t)$&nbsp; can be represented on a computer only by the sequence&nbsp; $〈x_ν〉$&nbsp; of its samples,&nbsp; where&nbsp; $x_ν$&nbsp; stands for&nbsp; $x(ν · T_{\rm A})$.&nbsp;
 +
[[File:P_ID552__Sto_T_5_2_S1_neu.png |right|frame| Block diagram of a digital filter]]
 +
*The time interval&nbsp; $T_{\rm A}$&nbsp; between two samples is thereby upper bounded by the&nbsp; [[Signal_Representation/Discrete-Time_Signal_Representation#Sampling_theorem|$\text{sampling theorem}$]].&nbsp;  
  
Um den Einfluss eines linearen Filters mit dem Frequenzgang $H(f)$ auf das zeitdiskrete Signal $〈x_ν〉$ zu erfassen, bietet es sich an, auch das Filter zeitdiskret zu beschreiben. Nachfolgend sehen Sie das entsprechende Blockschaltbild.  
+
*To capture the influence of a linear filter with frequency response&nbsp; $H(f)$&nbsp; on the discrete-time signal&nbsp; $〈x_ν〉$,&nbsp; it makes sense to also describe the filter in discrete time.
 +
*On the right you can see the corresponding block diagram.
  
[[File:P_ID552__Sto_T_5_2_S1_neu.png |center|frame| Blockschaltbild eines digitalen Filters]]
 
  
Für die Abtastwerte des Ausgangssignals gilt somit:  
+
Thus,&nbsp; for the samples of the output signal applies:
 
:$$y_\nu  = \sum\limits_{\mu  = 0}^M {a_\mu  }  \cdot x_{\nu  - \mu }  + \sum\limits_{\mu  = 1}^M {b_\mu  }  \cdot y_{\nu  - \mu } .$$
 
:$$y_\nu  = \sum\limits_{\mu  = 0}^M {a_\mu  }  \cdot x_{\nu  - \mu }  + \sum\limits_{\mu  = 1}^M {b_\mu  }  \cdot y_{\nu  - \mu } .$$
  
Hierzu ist folgendes zu bemerken:  
+
The applet&nbsp; [[Applets:Digital_Filters|"Digital Filters"]] illustrates the subject matter of this chapter.
*Die erste Summe beschreibt die Abhängigkeit des aktuellen Wertes $y_ν$ am Filterausgang vom aktuellen Eingangswert $x_ν$ und von den $M$ vorherigen Eingangswerten $x_{ν–1}$, ... , $x_{ν–M}.$  
+
<br clear=all>
*Die zweite Summe kennzeichnet die Beeinflussung von $y_ν$ durch die vorherigen Werte $y_{ν–1}$, ... , $y_{ν–M}$ am Filterausgang. Sie gibt somit den rekursiven Teil des Filters an.  
+
The following should be noted here:
*Man bezeichnet den ganzzahligen Parameter $M$ als die Ordnung des digitalen Filters.  
+
*The first sum describes the dependence of the current output&nbsp; $y_ν$&nbsp; on the current input&nbsp; $x_ν$&nbsp; and on the&nbsp; $M$&nbsp; previous input values&nbsp; $x_{ν–1}$, ... , $x_{ν–M}.$  
 +
*The second sum characterizes the influence of&nbsp; $y_ν$&nbsp; by the previous values&nbsp; $y_{ν–1}$, ... , $y_{ν–M}$&nbsp; at the filter output.&nbsp; Thus,&nbsp; it indicates the recursive part of the filter.
 +
*The integer parameter&nbsp; $M$&nbsp; is called the &raquo;'''order'''&laquo;&nbsp; of the digital filter.
  
==Nichtrekursives Filter==
+
==Non-recursive filter==
 
<br>
 
<br>
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Definition:}$&nbsp; Sind alle Rückführungskoeffizienten $b_{\mu} = 0$, so spricht von einem '''nichtrekursiven Filter'''.  
+
$\text{Definition:}$&nbsp; If all feedback coefficients are&nbsp; $b_{\mu} = 0$, we speak of a&nbsp; &raquo;'''non-recursive filter'''&laquo;.&nbsp; Otherwise,&nbsp; the filter is&nbsp; "recursive".}}
  
[[File:P_ID553__Sto_T_5_2_S2_neu.png|center |frame| Nichtrekursives digitales Filter]]}}
 
  
 
+
Such a&nbsp; $M$&ndash;th order non-recursive filter has the following properties:
Ein solches nichtrekursives Filter $M$&ndash;ter Ordnung besitzt folgende Eigenschaften:  
+
[[File:P_ID553__Sto_T_5_2_S2_neu.png|right |frame| Non-recursive digital filter of order&nbsp; $M$]]
*Der Ausgangswert $y_ν$ hängt nur vom aktuellen und den $M$ vorherigen Eingangswerten ab:  
+
*The output value&nbsp; $y_ν$&nbsp; depends only on the current and the&nbsp; $M$&nbsp; previous input values:
 
:$$y_\nu  = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot x_{\mu  - \nu } } .$$
 
:$$y_\nu  = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot x_{\mu  - \nu } } .$$
*Die Filterimpulsantwort erhält man daraus mit $x(t) = δ(t)$ (das entsprechende Eingangssignal in zeitdiskreter Schreibweise ist $x_ν ≡0$ mit Ausnahme von $x_0 =1$):
+
*The filter impulse response is obtained from this with&nbsp; $x(t) = δ(t)$:
 
:$$h(t) = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot \delta ( {t - \mu  \cdot T_{\rm A} } )} .$$
 
:$$h(t) = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot \delta ( {t - \mu  \cdot T_{\rm A} } )} .$$
*Durch Anwendung des Verschiebungssatzes folgt daraus für den Filterfrequenzgang:  
+
*The corresponding input signal in discrete-time notation is: &nbsp;  $x_ν ≡0$&nbsp; except for&nbsp; $x_0 =1$.
:$$H(f) = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot {\rm{e}}^{ - {\rm{j}}2{\rm{\pi }}f\mu T_{\rm A} } } .$$
+
*By applying the shifting theorem,&nbsp; it follows for the filter frequency response:
 
+
:$$H(f) = \sum\limits_{\mu  = 0}^M {a_\mu  \cdot {\rm{e}}^{ - {\rm{j}}\hspace{0.05cm} \cdot \hspace{0.05cm}2{\rm{\pi }}\hspace{0.05cm} \cdot \hspace{0.05cm}f \hspace{0.05cm} \cdot \hspace{0.05cm} \mu \hspace{0.05cm} \cdot \hspace{0.05cm} T_{\rm A} } } .$$
  
 
{{GraueBox|TEXT=   
 
{{GraueBox|TEXT=   
$\text{Beispiel 1:}$&nbsp; Ein Zweiwegekanal, bei dem
+
$\text{Example 1:}$&nbsp; A two-way channel, where
*das Signal auf dem Hauptpfad gegenüber dem Eingangssignal ungedämpft, aber um $2\ \rm &micro; s$ verzögert ankommt, und
+
*the signal arrives on the main path unattenuated with respect to the input signal,&nbsp; but delayed by&nbsp; $2\ \rm &micro; s$,&nbsp; and
*in $4\ \rm &micro;  s$ Abstand also absolut zur Zeit $t = 6\ \rm &micro; s$ – ein Echo mit halber Amplitude nachfolgt,  
+
*is followed at a distance of&nbsp; $4\ \rm &micro;  s$&nbsp; i.e. absolutely at time&nbsp; $t = 6\ \rm &micro; s$&nbsp; by an echo with half amplitude,
  
  
kann durch ein nichtrekursives Filter entsprechend obiger Skizze nachgebildet werden, wobei folgende Parameterwerte einzustellen sind:  
+
can be simulated by a non-recursive filter according to the above diagram, where the following parameter values are to be set:
 
:$$M = 3,\quad T_{\rm A}  = 2\;{\rm{&micro;  s} },\quad a_{\rm 0}    = 0,\quad a_{\rm 1}  = 1, \quad a_{\rm 2}  = 0, \quad a_{\rm 3}  = 0.5.$$}}
 
:$$M = 3,\quad T_{\rm A}  = 2\;{\rm{&micro;  s} },\quad a_{\rm 0}    = 0,\quad a_{\rm 1}  = 1, \quad a_{\rm 2}  = 0, \quad a_{\rm 3}  = 0.5.$$}}
  
==Rekursives Filter==
+
==Recursive filter==
 
<br>
 
<br>
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Definition:}$&nbsp; Sind alle Vorwärtskoeffizienten mit Ausnahme von $a_0$ identisch $a_\nu = 0$, so liegt ein '''(rein) rekursives Filter''' vor.}}
+
$\text{Definition:}$&nbsp; If all forward coefficients are&nbsp; $a_\nu \equiv 0$&nbsp; with the exception of&nbsp; $a_0$, &nbsp; then a&nbsp; &raquo;'''(purely) recursive filter'''&laquo;&nbsp; is present.}}
 +
 
 +
 
 +
[[File:P_ID554__Sto_T_5_2_S3_neu.png|right|frame| First-order recursive digital filter]]
 +
In the following,&nbsp; we restrict ourselves to the special case&nbsp; $M = 1$&nbsp; (block diagram corresponding to the figure).&nbsp; This filter has the following properties:
 +
*The output value&nbsp; $y_ν$&nbsp; depends (indirectly) on an infinite number of input values:
 +
:$$y_\nu = \sum\limits_{\mu  = 0}^\infty  {a_0  \cdot {b_1} ^\mu  \cdot x_{\nu  - \mu } .}$$
 +
*This is shown by the following calculation:
 +
:$$y_\nu  = a_0  \cdot x_\nu  + b_1  \cdot y_{\nu  - 1}  = a_0  \cdot x_\nu  + a_0  \cdot b_1  \cdot x_{\nu  - 1}  + {b_1} ^2  \cdot y_{\nu  - 2}.  $$
  
  
Im Folgenden beschränken wir uns auf den Sonderfall $M = 1$ (Blockschaltbild entsprechend Grafik):
+
{{BlaueBox|TEXT= 
[[File:P_ID554__Sto_T_5_2_S3_neu.png|right|frame| Rekursives digitales Filter erster Ordnung]]
+
$\text{Definition:}$&nbsp;
 +
*The&nbsp; &raquo;'''discrete-time impulse response'''&laquo;&nbsp; $〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$&nbsp; is by definition the output sequence when a single&nbsp; &raquo;'''one'''&laquo;&nbsp; is present at the input at&nbsp; $t =0$.&nbsp;
 +
*For a recursive filter,&nbsp; the discrete-time impulse response extends to infinity already with&nbsp; $M = 1$:&nbsp;
 +
:$$h(t)= \sum\limits_{\mu  = 0}^\infty  {a_0  \cdot {b_1} ^\mu  \cdot \delta ( {t - \mu  \cdot T_{\rm A} } )}\hspace{0.3cm}
 +
\Rightarrow \hspace{0.3cm}〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉= 〈\hspace{0.05cm}a_0,  \ a_0\cdot {b_1},  \ a_0\cdot {b_1}^2,  \ a_0\cdot {b_1}^3, \ \text{...}  \hspace{0.05cm}〉.$$}}
 +
 
  
Dieses Filter weist folgende Eigenschaften auf:  
+
Further, it should be noted:
*Der Ausgangswert $y_ν$ hängt (indirekt) von unendlich vielen Eingangswerten ab, wie die folgende Rechung zeigt:
+
*For stability reasons, &nbsp; $b_1 < 1$&nbsp; must hold.
:$$y_\nu  = a_0  \cdot x_\nu  + b_1 \cdot y_{\nu  - 1}  = a_0  \cdot x_\nu  + a_0  \cdot b_1  \cdot x_{\nu  - 1}  + {b_1} ^2  \cdot y_{\nu  - 2}  $$
+
*If&nbsp; $b_1 = 1$,&nbsp; the impulse response&nbsp; $h(t)$&nbsp; would extend to infinity and if&nbsp; $b_1 > 1$,&nbsp; &nbsp; $h(t)$&nbsp; would even resonate to infinity.
:$$\Rightarrow \hspace{0.3cm} y_\nu = \sum\limits_{\mu  = 0}^\infty  {a_0  \cdot {b_1} ^\mu  \cdot x_{\nu  - \mu } .}$$
+
*In such a first-order recursive filter,&nbsp; each individual Dirac delta line is smaller than the previous Dirac delta line by exactly the factor&nbsp; $b_1$:&nbsp;
*Die zeitdiskrete Impulsantwort $〈h_\mu〉$ ist definitionsgemäß der Ausgangsfolge, wenn am Eingang eine einzelne „Eins” bei $t =0$  anliegt.
 
*Die (zeitdiskrete) Impulsantwort eines rekursiven Filters reicht schon  mit $M = 1$ bis ins Unendliche:
 
:$$h(t)= \sum\limits_{\mu  = 0}^\infty  {a_0  \cdot {b_1} ^\mu  \cdot \delta ( {t - \mu  \cdot T_{\rm A} } )}$$
 
:$$\Rightarrow 〈h_\mu〉= 〈a_0,  \ a_0\cdot {b_1},   \ a_0\cdot {b_1}^2 \ \text{...}  〉.$$
 
*Aus Stabilitätsgründen muss $b_1 < 1$ gelten. Bei $b_1 = 1$ würde sich die Impulsantwort $h(t)$ bis ins Unendliche erstrecken und bei $b_1 > 1$ würde $h(t)$ sogar bis ins Unendliche anklingen.  
 
*Bei einem solchen rekursiven Filter erster Ordnung ist jede einzelne Diraclinie genau um den Faktor $b_1$ kleiner als die vorherige Diraclinie:  
 
 
:$$h_{\mu} = h(\mu  \cdot T_{\rm A}) =  {b_1} \cdot h_{\mu -1}.$$
 
:$$h_{\mu} = h(\mu  \cdot T_{\rm A}) =  {b_1} \cdot h_{\mu -1}.$$
  
[[File:Sto_T_5_2_S3_version2.png |frame| Zeitdiskrete Impulsantwort eines rekursiven Filters | rechts]]
+
[[File:Sto_T_5_2_S3_version2.png |frame| Discrete-time impulse response <br>of a recursive digital filter | right]]
 
{{GraueBox|TEXT=   
 
{{GraueBox|TEXT=   
$\text{Beispiel 2:}$&nbsp; Die nebenstehende Grafik zeigt die zeitdiskrete Impulsantwort $〈h_\mu〉$ eines rekursiven Filters erster Ordnung mit den Parametern $a_0 = 1$ und $b_1 = 0.6$.  
+
$\text{Example 2:}$&nbsp; The diagram on the right shows the discrete-time impulse response&nbsp; $\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$&nbsp; of a first-order recursive filter with the parameters&nbsp; $a_0 = 1$&nbsp; and&nbsp; $b_1 = 0.6$.  
*Der Verlauf ist exponentiell abfallend und erstreckt sich bis ins Unendliche.  
+
*The progression is exponentially decreasing and extends to infinity&ndash;in&ndash;time.  
*Das Verhältnis der Gewichte zweier aufeinander folgender Diracs ist jeweils $b_1 = 0.6$.}}  
+
*The ratio of the weights of two successive Dirac delta lines is&nbsp; $b_1 = 0.6$&nbsp; in each case.}}  
  
  
==Aufgaben zum Kapitel==
+
==Exercises for the chapter==
 
<br>
 
<br>
[[Aufgaben:5.3 Digitales Filter 1. Ordnung|Aufgabe 5.3: Digitales Filter 1. Ordnung]]
+
[[Aufgaben:Exercise_5.3:_1st_order_Digital_Filter|Exercise 5.3: 1st order Digital Filter]]
  
[[Aufgaben:5.3Z Nichtrekursives Filter|Aufgabe 5.3Z: Nichtrekursives Filter]]
+
[[Aufgaben:Exercise_5.3Z:_Non-Recursive_Filter|Exercise 5.3Z: Non-Recursive Filter]]
  
[[Aufgaben:5.4 Sinusgenerator|Aufgabe 5.4: Sinusgenerator]]
+
[[Aufgaben:Exercise_5.4:_Sine_Wave_Generator|Exercise 5.4: Sine Wave Generator]]
  
  
 
{{Display}}
 
{{Display}}

Latest revision as of 14:39, 18 January 2023

General block diagram


Each signal  $x(t)$  can be represented on a computer only by the sequence  $〈x_ν〉$  of its samples,  where  $x_ν$  stands for  $x(ν · T_{\rm A})$. 

Block diagram of a digital filter
  • To capture the influence of a linear filter with frequency response  $H(f)$  on the discrete-time signal  $〈x_ν〉$,  it makes sense to also describe the filter in discrete time.
  • On the right you can see the corresponding block diagram.


Thus,  for the samples of the output signal applies:

$$y_\nu = \sum\limits_{\mu = 0}^M {a_\mu } \cdot x_{\nu - \mu } + \sum\limits_{\mu = 1}^M {b_\mu } \cdot y_{\nu - \mu } .$$

The applet  "Digital Filters" illustrates the subject matter of this chapter.
The following should be noted here:

  • The first sum describes the dependence of the current output  $y_ν$  on the current input  $x_ν$  and on the  $M$  previous input values  $x_{ν–1}$, ... , $x_{ν–M}.$
  • The second sum characterizes the influence of  $y_ν$  by the previous values  $y_{ν–1}$, ... , $y_{ν–M}$  at the filter output.  Thus,  it indicates the recursive part of the filter.
  • The integer parameter  $M$  is called the »order«  of the digital filter.

Non-recursive filter


$\text{Definition:}$  If all feedback coefficients are  $b_{\mu} = 0$, we speak of a  »non-recursive filter«.  Otherwise,  the filter is  "recursive".


Such a  $M$–th order non-recursive filter has the following properties:

Non-recursive digital filter of order  $M$
  • The output value  $y_ν$  depends only on the current and the  $M$  previous input values:
$$y_\nu = \sum\limits_{\mu = 0}^M {a_\mu \cdot x_{\mu - \nu } } .$$
  • The filter impulse response is obtained from this with  $x(t) = δ(t)$:
$$h(t) = \sum\limits_{\mu = 0}^M {a_\mu \cdot \delta ( {t - \mu \cdot T_{\rm A} } )} .$$
  • The corresponding input signal in discrete-time notation is:   $x_ν ≡0$  except for  $x_0 =1$.
  • By applying the shifting theorem,  it follows for the filter frequency response:
$$H(f) = \sum\limits_{\mu = 0}^M {a_\mu \cdot {\rm{e}}^{ - {\rm{j}}\hspace{0.05cm} \cdot \hspace{0.05cm}2{\rm{\pi }}\hspace{0.05cm} \cdot \hspace{0.05cm}f \hspace{0.05cm} \cdot \hspace{0.05cm} \mu \hspace{0.05cm} \cdot \hspace{0.05cm} T_{\rm A} } } .$$

$\text{Example 1:}$  A two-way channel, where

  • the signal arrives on the main path unattenuated with respect to the input signal,  but delayed by  $2\ \rm µ s$,  and
  • is followed at a distance of  $4\ \rm µ s$  – i.e. absolutely at time  $t = 6\ \rm µ s$  – by an echo with half amplitude,


can be simulated by a non-recursive filter according to the above diagram, where the following parameter values are to be set:

$$M = 3,\quad T_{\rm A} = 2\;{\rm{µ s} },\quad a_{\rm 0} = 0,\quad a_{\rm 1} = 1, \quad a_{\rm 2} = 0, \quad a_{\rm 3} = 0.5.$$

Recursive filter


$\text{Definition:}$  If all forward coefficients are  $a_\nu \equiv 0$  with the exception of  $a_0$,   then a  »(purely) recursive filter«  is present.


First-order recursive digital filter

In the following,  we restrict ourselves to the special case  $M = 1$  (block diagram corresponding to the figure).  This filter has the following properties:

  • The output value  $y_ν$  depends (indirectly) on an infinite number of input values:
$$y_\nu = \sum\limits_{\mu = 0}^\infty {a_0 \cdot {b_1} ^\mu \cdot x_{\nu - \mu } .}$$
  • This is shown by the following calculation:
$$y_\nu = a_0 \cdot x_\nu + b_1 \cdot y_{\nu - 1} = a_0 \cdot x_\nu + a_0 \cdot b_1 \cdot x_{\nu - 1} + {b_1} ^2 \cdot y_{\nu - 2}. $$


$\text{Definition:}$ 

  • The  »discrete-time impulse response«  $〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$  is by definition the output sequence when a single  »one«  is present at the input at  $t =0$. 
  • For a recursive filter,  the discrete-time impulse response extends to infinity already with  $M = 1$: 
$$h(t)= \sum\limits_{\mu = 0}^\infty {a_0 \cdot {b_1} ^\mu \cdot \delta ( {t - \mu \cdot T_{\rm A} } )}\hspace{0.3cm} \Rightarrow \hspace{0.3cm}〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉= 〈\hspace{0.05cm}a_0, \ a_0\cdot {b_1}, \ a_0\cdot {b_1}^2, \ a_0\cdot {b_1}^3, \ \text{...} \hspace{0.05cm}〉.$$


Further, it should be noted:

  • For stability reasons,   $b_1 < 1$  must hold.
  • If  $b_1 = 1$,  the impulse response  $h(t)$  would extend to infinity and if  $b_1 > 1$,    $h(t)$  would even resonate to infinity.
  • In such a first-order recursive filter,  each individual Dirac delta line is smaller than the previous Dirac delta line by exactly the factor  $b_1$: 
$$h_{\mu} = h(\mu \cdot T_{\rm A}) = {b_1} \cdot h_{\mu -1}.$$
Discrete-time impulse response
of a recursive digital filter

$\text{Example 2:}$  The diagram on the right shows the discrete-time impulse response  $〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$  of a first-order recursive filter with the parameters  $a_0 = 1$  and  $b_1 = 0.6$.

  • The progression is exponentially decreasing and extends to infinity–in–time.
  • The ratio of the weights of two successive Dirac delta lines is  $b_1 = 0.6$  in each case.


Exercises for the chapter


Exercise 5.3: 1st order Digital Filter

Exercise 5.3Z: Non-Recursive Filter

Exercise 5.4: Sine Wave Generator