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

From LNTwww
Line 7: Line 7:
 
==General block diagram==
 
==General block diagram==
 
<br>
 
<br>
Each signal&nbsp; $x(t)$&nbsp; can be represented on a computer only by the sequence&nbsp; $〈x_ν〉$&nbsp; of its samples, where&nbsp; $x_ν$&nbsp; stands for&nbsp; $x(ν · T_{\rm A})$.&nbsp;
+
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]]
 
[[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|sampling theorem]].&nbsp;   
 
*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|sampling theorem]].&nbsp;   
Line 15: Line 15:
  
  
Thus, for the samples of the output signal applies:
+
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 } .$$
<br clear=all>
+
 
 
The following should be noted here:
 
The following should be noted here:
 
*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 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, it indicates the recursive part of the filter.
+
*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 ''order''&nbsp; of the digital filter.
+
*The integer parameter&nbsp; $M$&nbsp; is called the '''order'''&nbsp; of the digital filter.
  
==Nonrecursive filter==
+
==Non-recursive filter==
 
<br>
 
<br>
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Definition:}$&nbsp; If all feedback coefficients are&nbsp; $b_{\mu} = 0$, we speak of a&nbsp; '''nonrecursive filter'''.}}  
+
$\text{Definition:}$&nbsp; If all feedback coefficients are&nbsp; $b_{\mu} = 0$, we speak of a&nbsp; '''non-recursive filter'''.&nbsp; Otherwise,&nbsp; the filter is&nbsp; "recursive".}}  
  
  
 
Such a&nbsp; $M$&ndash;th order non-recursive filter has the following properties:
 
Such a&nbsp; $M$&ndash;th order non-recursive filter has the following properties:
[[File:P_ID553__Sto_T_5_2_S2_neu.png|right |frame| Nonrecursive digital filter]]
+
[[File:P_ID553__Sto_T_5_2_S2_neu.png|right |frame| Non-recursive digital filter of order&nbsp; $M$]]
 
*The output value&nbsp; $y_ν$&nbsp; depends only on the current and the&nbsp; $M$&nbsp; previous input values:
 
*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 } } .$$
Line 36: Line 36:
 
:$$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} } )} .$$
 
*The corresponding input signal in discrete-time notation is: &nbsp;  $x_ν ≡0$&nbsp; except for&nbsp; $x_0 =1$.
 
*The corresponding input signal in discrete-time notation is: &nbsp;  $x_ν ≡0$&nbsp; except for&nbsp; $x_0 =1$.
*By applying the shifting theorem, it follows for the filter frequency response:
+
*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} } } .$$
 
:$$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{Example 1:}$&nbsp; A two-way channel, where
 
$\text{Example 1:}$&nbsp; A two-way channel, where
*the signal arrives on the main path unattenuated with respect to the input signal, but delayed by&nbsp; $2\ \rm &micro; s$,&nbsp; and  
+
*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  
 
*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,
 
*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,
  
Line 55: Line 55:
  
 
[[File:P_ID554__Sto_T_5_2_S3_neu.png|right|frame| First-order recursive digital filter]]  
 
[[File:P_ID554__Sto_T_5_2_S3_neu.png|right|frame| First-order recursive digital filter]]  
In the following, we restrict ourselves to the special case&nbsp; $M = 1$&nbsp; (block diagram corresponding to the diagram).&nbsp; This filter has the following properties:
+
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:
 
*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 } .}$$
 
:$$y_\nu = \sum\limits_{\mu  = 0}^\infty  {a_0  \cdot {b_1} ^\mu  \cdot x_{\nu  - \mu } .}$$
Line 64: Line 64:
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
 
$\text{Definition:}$&nbsp;  
 
$\text{Definition:}$&nbsp;  
*The&nbsp; '''discrete-time impulse response'''&nbsp; $〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$&nbsp; is by definition the output sequence when a single "one" is present at the input at&nbsp; $t =0$.&nbsp;  
+
*The&nbsp; '''discrete-time impulse response'''&nbsp; $〈\hspace{0.05cm}h_\mu\hspace{0.05cm}〉$&nbsp; is by definition the output sequence when a single&nbsp; "'''one'''"&nbsp; is present at the input at&nbsp; $t =0$.&nbsp;  
*For a recursive filter, the (discrete-time) impulse response already extends to infinity with&nbsp; $M = 1$:&nbsp;  
+
*For a recursive filter, 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}
 
:$$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 \ \text{...}  \hspace{0.05cm}〉.$$}}
+
\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}〉.$$}}
  
  
Line 73: Line 73:
 
*For stability reasons, &nbsp; $b_1 < 1$&nbsp; must hold.
 
*For stability reasons, &nbsp; $b_1 < 1$&nbsp; must hold.
 
*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.
 
*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.
*In such a first-order recursive filter, each individual diracline is smaller than the previous diracline by exactly the factor&nbsp; $b_1$:&nbsp;  
+
*In such a first-order recursive filter,&nbsp; each individual Dirac line is smaller than the previous Dirac line by exactly the factor&nbsp; $b_1$:&nbsp;  
 
:$$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| Discrete-time impulse response of a recursive filter | right]]
+
[[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{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$.  
 
$\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$.  
*The progression is exponentially decreasing and extends to infinity.  
+
*The progression is exponentially decreasing and extends to infinity&ndash;in&ndash;time.  
*The ratio of the weights of two successive diracs is&nbsp; $b_1 = 0.6$ in each case.}}  
+
*The ratio of the weights of two successive Dirac lines is&nbsp; $b_1 = 0.6$&nbsp; in each case.}}  
  
  

Revision as of 18:32, 28 January 2022

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
  • The time interval  $T_{\rm A}$  between two samples is thereby upper bounded by the  sampling theorem
  • 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 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 identical  $a_\nu = 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 line is smaller than the previous Dirac 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 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