Processing math: 100%

Difference between revisions of "Applets:Digital Filters"

From LNTwww
Line 175: Line 175:
 
[[File:Exercises_binomial_fertig.png|right]]
 
[[File:Exercises_binomial_fertig.png|right]]
 
*First select the number '''1''' ... '''10''' of the task to be processed.
 
*First select the number '''1''' ... '''10''' of the task to be processed.
*A task description is displayed. The parameter values ​​are adjusted.
+
*A task description is displayed.  The parameter values ​​are adjusted.
*Solution after pressing "sample solution".
+
*Solution after pressing  "Sample Solution".
*The number '''0''' corresponds to a "reset": Same setting as when the program was started.
+
*The number '''0''' corresponds to a "reset":  Same setting as when the program was started.
 
<br clear=all>
 
<br clear=all>
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(1)'''&nbsp; The filter coefficients are a0=0.25, a1=0.5, a2=0.25, b1=b2=0. Which filter is it?<br>&nbsp; &nbsp; &nbsp; &nbsp; Interpret the impulse response hν, the step response σν and the rectangular response ρ(2,8)ν each in a time-discrete representation.}}
+
'''(1)'''&nbsp; The filter coefficients are&nbsp; a0=0.25,&nbsp; a1=0.5,&nbsp; a2=0.25,&nbsp; b1=b2=0.&nbsp; Which filter is it?<br>&nbsp; &nbsp; &nbsp; &nbsp; Interpret the impulse response&nbsp; hν,&nbsp; the step response&nbsp; σν&nbsp; and the rectangular response&nbsp; ρ(2,8)ν, each in a time-discrete representation.}}
  
:*&nbsp; Due to the missing b coefficients, it is a non-recursive digital filter &rArr; &nbsp; '''FIR filter''' (''Finite Impulse Response'').
+
:*&nbsp; Due to the missing&nbsp; b coefficients, it is a non-recursive digital filter &rArr; &nbsp; '''FIR filter''' (''Finite Impulse Response'').
:*&nbsp; The impulse response consists of M+1=3 Dirac lines according to the a coefficients: hν=a0, a1, a2=0.25, 0.5, 0.25, 0, 0, 0,....
+
:*&nbsp; The impulse response consists of&nbsp; M+1=3&nbsp; Dirac lines according to the&nbsp; a&nbsp; coefficients:&nbsp; hν=a0, a1, a2=0.25, 0.5, 0.25, 0, 0, 0,....
:*&nbsp; The step response is: σν=0.25, 0.75, 1, 1, 1, 1,.... The final value is equal to the DC signal transfer factor H(f=0)=a0+a1+a2=1.
+
:*&nbsp; The step response is:&nbsp; σν=0.25, 0.75, 1, 1, 1, 1,....&nbsp; The final value is equal to the DC signal transfer factor&nbsp; H(f=0)=a0+a1+a2=1.
:*&nbsp; The distortions with rise and fall can also be seen from the rectangular response ρ(2,8)ν=0, 0,0.25, 0.75, 1, 1, 1, 1, 1, 0.75, 0.25, ....
+
:*&nbsp; The distortions with rise and fall can also be seen from the rectangular response&nbsp; ρ(2,8)ν=0, 0,0.25, 0.75, 1, 1, 1, 1, 1, 0.75, 0.25, ....
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(2)'''&nbsp; How do the results differ with a2=0.25? }}
+
'''(2)'''&nbsp; How do the results differ with&nbsp; a2=0.25? }}
  
:*&nbsp; Taking into account H(f=0)=0.5 there are comparable consequences &nbsp; &rArr; &nbsp; Step response:&nbsp; &nbsp; σν=0.25, 0.75, 0.5, 0.5, 0.5, 0.5,....
+
:*&nbsp; Taking into account&nbsp; H(f=0)=0.5&nbsp; there are comparable consequences &nbsp; &rArr; &nbsp; Step response:&nbsp; &nbsp; σν=0.25, 0.75, 0.5, 0.5, 0.5, 0.5,....
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(3)'''&nbsp; Now let the filter coefficients a0=1, b1=0.9 and a1=a2=b2=0. Which filter is it? Interpret the impulse response hν.}}
+
'''(3)'''&nbsp; Now let the filter coefficients&nbsp; a0=1,&nbsp; b1=0.9&nbsp; and&nbsp; a1=a2=b2=0.&nbsp; Which filter is it?&nbsp; Interpret the impulse response&nbsp; hν.}}
  
:*&nbsp; It is a recursive digital filter &nbsp; &rArr; &nbsp; '''IIR filter'''&nbsp; (''Infinite Impulse Response'')&nbsp; of the first order. It is the discrete-time analogue of the RC low pass.
+
:*&nbsp; It is a recursive digital filter &nbsp; &rArr; &nbsp; '''IIR filter'''&nbsp; (''Infinite Impulse Response'')&nbsp; of the first order.&nbsp; It is the discrete-time analogon of the RC low pass.
:*&nbsp; Starting from h0=1 is h1=h0b0=0.9, h2=h1b0=b20=0.81, h3=h2b0=b30=0.729,&nbsp; and so on &nbsp; &rArr; &nbsp; hν&nbsp; extends to infinity.
+
:*&nbsp; Starting from&nbsp; h0=1 is h1=h0b0=0.9,&nbsp; h2=h1b0=b20=0.81,&nbsp; h3=h2b0=b30=0.729,&nbsp; and so on &nbsp; &rArr; &nbsp; hν&nbsp; extends to infinity.
:*&nbsp; Impulse response&nbsp; h(t)=et/T&nbsp; with&nbsp; T:&nbsp; intersection (Tangente bei&nbsp; t=0, Abscissa) &nbsp;  &rArr; &nbsp; hν=h(νTA)=eν/(T/TA)&nbsp; with &nbsp;T/TA=1/(h0h1)=10.
+
:*&nbsp; Impulse response&nbsp; h(t)=et/T&nbsp; with&nbsp; T: &nbsp; intersection (Tangente bei&nbsp; t=0, Abscissa) &nbsp;  &rArr; &nbsp; hν=h(νTA)=eν/(T/TA)&nbsp; with &nbsp;T/TA=1/(h0h1)=10.
:*&nbsp; So: The values ​​of the continuous time differ from the discrete-time impulse response. This results in the values 1.0, 0.9048, 0.8187 ...
+
:*&nbsp; So:&nbsp; The values ​​of the continuous time differ from the discrete-time impulse response.&nbsp; This results in the values&nbsp; 1.0, 0.9048, 0.8187 ...
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(4)'''&nbsp; The filter setting is retained. Interpret the step response hν and the rectangular response ρ(2,8)ν. What is the value for H(f=0)?}}
+
'''(4)'''&nbsp; The filter setting is retained.&nbsp; Interpret the step response&nbsp; hν&nbsp; and the rectangular response&nbsp; ρ(2,8)ν.&nbsp; What is the value for&nbsp; H(f=0)?}}
  
 
:*&nbsp; The step response is the integral over the impulse response: &nbsp; σ(t)=T(1et/T)] &nbsp;  &rArr; &nbsp; σν=10(1eν/10) &nbsp; &rArr; &nbsp; σ0=1,&nbsp; σ1=1.9,&nbsp; σ2=2.71, ...
 
:*&nbsp; The step response is the integral over the impulse response: &nbsp; σ(t)=T(1et/T)] &nbsp;  &rArr; &nbsp; σν=10(1eν/10) &nbsp; &rArr; &nbsp; σ0=1,&nbsp; σ1=1.9,&nbsp; σ2=2.71, ...
:*&nbsp; For large ν values, the (time-discrete) step response tends to the DC signal transmission factor H(f=0)=10:&nbsp; σ40=9.867,&nbsp; σ50=9.954,&nbsp;  σ=10.
+
:*&nbsp; For large&nbsp; ν&nbsp; values, the (time-discrete) step response tends to the DC signal transmission factor&nbsp; H(f=0)=10:&nbsp; σ40=9.867,&nbsp; σ50=9.954,&nbsp;  σ=10.
:*&nbsp;The rectangular response ρ(2,8)ν increases with a delay of 2 in the same way as σν. In the area ν8 the ρν values decrease exponentially.
+
:*&nbsp;The rectangular response&nbsp; ρ(2,8)ν&nbsp; increases with a delay of&nbsp; 2&nbsp; in the same way as&nbsp; σν.&nbsp; In the area&nbsp; ν8&nbsp; the&nbsp; ρν&nbsp; values decrease exponentially.
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(5)'''&nbsp; We continue to consider the filter with a0=1, b1=0.9, a1=a2=b2=0. What is the output sequence yν for the input sequence xν=1, 0, 0.5? <br>&nbsp; &nbsp; &nbsp; &nbsp; ''Note'': The task can also be solved with this program, although the constellation considered here cannot be set directly.}}
+
'''(5)'''&nbsp; We continue to consider the filter with&nbsp; a0=1,&nbsp; b1=0.9,&nbsp; a1=a2=b2=0.&nbsp; What is the output sequence&nbsp; yν&nbsp; for the input sequence&nbsp; xν=1, 0, 0.5? <br>&nbsp; &nbsp; &nbsp; &nbsp; ''Note'': The task can also be solved with this program, although the constellation considered here cannot be set directly.}}
  
:*&nbsp; You can help yourself by setting the coefficient a2=0.5 and reducing the input sequence to xν=1, 0, 0,  ... &nbsp; &rArr; &nbsp; „Dirac function”.
+
:*&nbsp; You can help yourself by setting the coefficient&nbsp; a2=0.5&nbsp; and reducing the input sequence&nbsp; to xν=1, 0, 0,  ... &nbsp; &rArr; &nbsp; „Dirac function”.
:*&nbsp; The actual impulse response of this filter (with&nbsp; a2=0)&nbsp; was determined in task '''(3)''': &nbsp; h0=1, &nbsp; h1=0.9, &nbsp; h2=0.81, &nbsp; h3=0.729, &nbsp; h4=0.646. &nbsp;
+
:*&nbsp; The actual impulse response of this filter&nbsp; (with&nbsp; a2=0)&nbsp; was determined in task&nbsp; '''(3)''': &nbsp; h0=1, &nbsp; h1=0.9, &nbsp; h2=0.81, &nbsp; h3=0.729, &nbsp; h4=0.646. &nbsp;
:*&nbsp; The solution to this problem is: y0=h0=1, &nbsp; y1=h1=0.9, &nbsp; y2=h2h0/2=0.31, &nbsp; y3=h3h1/2=0.279, &nbsp; y4=h4h2/2=0.251. &nbsp;
+
:*&nbsp; The solution to this problem is:&nbsp; y0=h0=1, &nbsp; y1=h1=0.9, &nbsp; y2=h2h0/2=0.31, &nbsp; y3=h3h1/2=0.279, &nbsp; y4=h4h2/2=0.251. &nbsp;
:*&nbsp; Caution: Step response and rectangular response now refer to the fictitious filter (with&nbsp; a2=0.5) and not to the actual filter (mit&nbsp; a2=0).
+
:*&nbsp; Caution:&nbsp; Step response and rectangular response now refer to the fictitious filter&nbsp; (with&nbsp; a2=0.5)&nbsp; and not to the actual filter&nbsp; (with&nbsp; a2=0).
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
'''(6)'''&nbsp; Consider and interpret the impulse response and the step response for the filter coefficients a0=1, b1=1, a1=a2=b2=0.}}
+
'''(6)'''&nbsp; Consider and interpret the impulse response and the step response for the filter coefficients
 +
:*&nbsp; You can help yourself by setting the coefficient&nbsp; a2=0.5&nbsp; and reducing the input sequence&nbsp; to xν=1, 0, 0,  ... &nbsp; &rArr; &nbsp; „Dirac function”.
 +
:*&nbsp; The actual impulse response of this filter&nbsp; (with&nbsp; a2=0)&nbsp; was determined in task&nbsp; '''(3)''': &nbsp; h0=1, &nbsp; h1=0.9, &nbsp; h2=0.81, &nbsp; h3=0.729, &nbsp; h4=0.646. &nbsp;
 +
:*&nbsp; The solution to this problem is:&nbsp; y0=h0=1, &nbsp; y1=h1=0.9, &nbsp; y2=h2h0/2=0.31, &nbsp; y3=h3h1/2=0.279, &nbsp; y4=h4h2/2=0.251. &nbsp;
 +
:*&nbsp; Caution:&nbsp; Step response and rectangular response now refer to the fictitious filter&nbsp; (with&nbsp; a2=0.5)&nbsp; and not to the actual filter&nbsp; (with&nbsp; a2=0). a0=1, b1=1, a1=a2=b2=0.}}
  
 
:*&nbsp; '''The system is unstable''': &nbsp; A time-discrete Dirac function at input (at time&nbsp; t=0)&nbsp; causes an infinite number of Diracs of the same height in the output signal.
 
:*&nbsp; '''The system is unstable''': &nbsp; A time-discrete Dirac function at input (at time&nbsp; t=0)&nbsp; causes an infinite number of Diracs of the same height in the output signal.
Line 232: Line 236:
 
:*&nbsp; The increase/decrease of b1&nbsp; leads to the larger/smaller period T0/TA and the larger/smaller amplitude A. b1<2 must apply.  
 
:*&nbsp; The increase/decrease of b1&nbsp; leads to the larger/smaller period T0/TA and the larger/smaller amplitude A. b1<2 must apply.  
 
:*&nbsp; a1 only affects the amplitude, not the period. There is no value limit for a1. If a1 is negative, the minus sine function results.
 
:*&nbsp; a1 only affects the amplitude, not the period. There is no value limit for a1. If a1 is negative, the minus sine function results.
:*&nbsp; '''Is there no discrepancy to h(t) continuous value???'''
 
  
 
{{BlaueBox|TEXT=
 
{{BlaueBox|TEXT=
Line 244: Line 247:
 
:*&nbsp; With a1=0.3826, b1=1.8478, b2=1 and xν=1,1,1,... is the output sequence yν the time-discrete analog of the step response σ(t).
 
:*&nbsp; With a1=0.3826, b1=1.8478, b2=1 and xν=1,1,1,... is the output sequence yν the time-discrete analog of the step response σ(t).
 
:*&nbsp; The step response is the integral over &nbsp; sin(πτ/8) &nbsp; within the limits of &nbsp; τ=0 &nbsp; to &nbsp; τ=t &nbsp; &rArr; &nbsp; σ(t)=8/πcos(πτ/8)+1.
 
:*&nbsp; The step response is the integral over &nbsp; sin(πτ/8) &nbsp; within the limits of &nbsp; τ=0 &nbsp; to &nbsp; τ=t &nbsp; &rArr; &nbsp; σ(t)=8/πcos(πτ/8)+1.
:*&nbsp; If you change &nbsp; a1=0.3826 &nbsp; on &nbsp; a1=0.3826π/8=0.1502, then &nbsp; σ(t)=cos(πτ/8)1 &nbsp; &rArr; &nbsp; Values ​​between 0 and 2.
+
:*&nbsp; If you change &nbsp; a1=0.3826 &nbsp; on &nbsp; $a_1=-0.3826\cdot\pi/8=-0.1502, then &nbsp;\sigma(t)=\cos(\pi\cdot\tau/8)-1&nbsp; &rArr; &nbsp; Values ​​between0and-2$.
 
:*&nbsp; Would you still in the block diagram &nbsp; zν=yν+1 &nbsp; add, then &nbsp; zν &nbsp; a time-discrete cosine curve with &nbsp; T0/TA=16 &nbsp; and &nbsp; A=1.
 
:*&nbsp; Would you still in the block diagram &nbsp; zν=yν+1 &nbsp; add, then &nbsp; zν &nbsp; a time-discrete cosine curve with &nbsp; T0/TA=16 &nbsp; and &nbsp; A=1.
 
      
 
      

Revision as of 16:33, 22 July 2020

Open Applet in a new tab

Applet Description


The applet should clarify the properties of digital filters, whereby we confine ourselves to filters of the order M=2. Both non-recursive filters (FIRFinite Impulse Response)  as well as recursive filters (IIRInfinite Impulse Response).

The input signal x(t) is represented by the sequence xν of its samples, where xν stands for x(ν·TA). The output sequence yνis calculated, i.e. the discrete-time representation of the output signal y(t).

  • TA denotes the time interval between two samples.
  • We also limit ourselves to causal signals and systems, which means that xν0 and yν0 for ν0.


It should also be noted that we denote the initial sequence yν as

(1) the discrete-time impulse response hν if the “discrete-time Dirac function” is present at the input:         xν=1, 0, 0, 0, 0, 0, 0,...,

(2) the time-discrete step response σν if the “time-discrete step function” is present at the input:         xν=1, 1, 1, 1, 1, 1, 1,...,

(3) the discrete-time rectangle response ρ(2,4)ν if the “discrete-time rectangle function” is present at the input:     xν=0, 0, 1, 1, 1, 0, 0,...;
        In quotation marks are the beginning of the ones (2) and the position of the last ones (4).


Theoretical background


General block diagram

Each signal x(t) can only be represented on a computer by the sequence xν of its samples, where xν stands for x(ν·TA).

Block diagram of a digital (IIR–) filter M–order
  • The time interval TA between two samples is limited by the sampling theorem.
  • We limit ourselves here to causal signals and systems, which means that xν0 for ν0.
  • In order to determine the influence of a linear filter with frequency response H(f) on the time-discrete input signal xν, it is advisable to describe the filter discrete-time. In the time domain, this happens with the discrete-time impulse response hν.
  • On the right you can see the corresponding block diagram. The following therefore applies to the samples of the output signal yν thus holds:
yν=Mμ=0aμxνμ+Mμ=1bμyνμ.

The following should be noted here:

  • The index ν refers to sequences, for example at the input xν and output yν.
  • On the other hand, we use the index μ to identify the a and b filter coefficients.
  • The first sum describes the dependency of the current output yν on the current input xν and on the M previous input values xν1, ... , xνM.
  • The second sum indicates the influence of yν by the previous values yν1, ... , yνM at the filter output. It specifies the recursive part of the filter.
  • The integer parameter M is called the order of the digital filter. In the program, this value is limited to M2.


Definitions: 

(1)  The output sequence yν is called the discrete-time impulse response hν if the “discrete-time Dirac function” is present at the input:

xν=1, 0, 0, 0, 0, 0, 0,....

(2)  The output sequence yν is called the time-discrete step response σν if the “time-discrete step function” is present at the input:

xν=1, 1, 1, 1, 1, 1, 1,....

(3)  The output sequence yν is called the discrete-time rectangle response  ρ(2,4)ν if the “discrete-time rectangular function” is present at the input:

xν=0, 0, 1, 1, 1, 0, 0,....
The beginning of ones (2) and the position of the last ones (4) are given in single quotes.


Non-recursive filter   ⇒   FIR–filter

Non-recursive digital filter  (FIR filter)  M order

Definition: If all feedback coefficients bμ=0 , one speaks of one non-recursive filter. In the English language literature, the term FIR filter (Finite Impulse Response) is also used for this.

The following applies to the order M applies:

  • The output value yν depends only on the current and the previous M input values:
yν=Mμ=0aμxμν.
  • Time-discrete impulse response with xν=1, 0, 0, 0, 0, 0, 0,...:
hμ=a0, a1, ..., aM.


Example 1:  A two-way channel where

  • the signal on the main path arrives undamped compared to the input signal but is delayed by 2 µs arrives with a delay, and
  • at 4 µs distance – so absolutely at time t=6 µs – follows an echo with half the amplitude,


can be simulated by a non-recursive filter according to the sketch above, whereby the following parameter values ​​must be set:

M=3,TA=2µs,a0=0,a1=1,a2=0,a3=0.5.


Example 2: Consider a non-recursive filter with the filter coefficients a0=1,a1=2,a2=1.

Nichtrekursives Filter

(1) The conventional impulse response is: h(t)=δ(t)+2δ(tTA)+δ(t2TA).
        ⇒   discrete-time impulse response: hμ=1, 2, 1.

(2)   The frequency response H(f) is the Fourier transform of h(t). By applying the displacement theorem:

H(f)=2[1+cos(2πfTA)]ej2πfTAH(f=0)=4.

(3)   It follows that the time-discrete step response σν tends to become 4 for large ν.

(4)   The discrete-time convolution of the input sequence xν=1,0,0,0,1,0,0,0,...  with hν=1, 2, 1  results

yν=1,2,1,0,1,2,1,0,0,0,0,....

(5)   The discrete-time convolution of the input sequence xν=1,1,0,0,1,0,0,0,...  with  hν=1, 2, 1  results

yν=1,3,3,2,2,1,0,0,0,0,0,....


Recursive filter   ⇒   IIR filter

First order recursive filter

Definition: 

  • If at least one of the feedback coefficients is bμ0, then this is referred to as a recursive filter (see graphic on the right). The term IIR filter  (Infinite Impulse Response) is also used for this, particularly in the English-language literature. This filter is dealt with in detail in the trial implementation.


  • If all forward coefficients are also identical aμ=0 with the exception of a0, a purely recursive filter is available (see graphic on the left).
Purely recursive first order filter


In the following we restrict ourselves to the special case “purely recursive filter of the first order”. This filter has the following properties:

  • The output value yν depends (indirectly) on an infinite number of input values:
yν=μ=0a0b1μxνμ.
  • This shows the following calculation:
yν=a0xν+b1yν1=a0xν+a0b1xν1+b12yν2=a0xν+a0b1xν1+a0b12xν2+b13yν3=....
  • By definition, the discrete-time impulse response is the same as the output sequence if there is a single "one" at t=0 at the input.
h(t)=μ=0a0b1μδ(tμTA)hμ=a0, a0b1, a0b12 ....

Conclusion:  With a recursive filter, the (time-discrete) impulse response extends to infinity with M=1:

  • For reasons of stability, b1<1 must apply.
  • With b1=1 the impulse response h(t) would extend to infinity and with b1>1 the variable h(t) would even continue to infinity.
  • With such a recursive filter of the first order, each individual Dirac line is exactly the factor b1 smaller than the previous Dirac line:
hμ=h(μTA)=b1hμ1.


rechts

Example 3:  The graphic opposite shows the discrete-time impulse response hμ of a recursive filter of the first order with the parameters a0=1 and b1=0.6.

  • The (time-discrete) course is exponentially falling and extends to infinity.
  • The ratio of the weights of two successive Diracs is b1=0.6.


Recursive filter as a sine generator

Proposed filter structure

The graphic shows a second-order digital filter that is suitable for generating a time-discrete sine function on a digital signal processor (DSP) if the input sequence xν  a (time-discrete) Dirac function is:

yν=sin(νTAω0).

The five filter coefficients result from the: Z transformation:

Z{sin(νTAω0)}=zsin(ω0TA)z22zcos(ω0TA)+1.

After implementing this equation using a second-order recursive filter, the following filter coefficients are obtained:

a0=0,a1=sin(ω0TA),a2=0,b1=2cos(ω0TA),b2=1.
  • The filter coefficients a0 and a2 can be omitted and b2=1 has a fixed value.
  • The angular frequency ω0 of the sine wave is therefore only determined by a0 and a0.


Example 3:  Let a1=0.5, b1=3, x0=1 and xν0=0.

(1)  Then the following applies to the initial values yν at times ν0:

  •   y0=0;
  •   y1=0.5                                                                                         ⇒  the „1” at the input only has an effect at time ν=1 because of a0=0 at the output;
  •   y2=b1y1y0=3/20.866                             ⇒   with ν=2 the recursive part of the filter also takes effect;
  •   y3=3y2y1=33/21/2=1          ⇒  for  ν2  the filter is purely recursive:     yν=b1yν1yν2;
  •   y4=3y3y2=313/2=3/2;
  •   y5=3y4y3=33/21=0.5;
  •   y6=3y5y4=31/23/2=0;
  •   y7=3y6y5=301/2=0.5.

(2)  By continuing the recursive algorithm one gets for large ν–values:     yν=yν12   ⇒   T0/TA=12.



Exercises

Exercises binomial fertig.png
  • First select the number 1 ... 10 of the task to be processed.
  • A task description is displayed.  The parameter values ​​are adjusted.
  • Solution after pressing  "Sample Solution".
  • The number 0 corresponds to a "reset":  Same setting as when the program was started.


(1)  The filter coefficients are  a0=0.25a1=0.5a2=0.25b1=b2=0.  Which filter is it?
        Interpret the impulse response  hν,  the step response  σν  and the rectangular response  ρ(2,8)ν, each in a time-discrete representation.

  •   Due to the missing  b coefficients, it is a non-recursive digital filter ⇒   FIR filter (Finite Impulse Response).
  •   The impulse response consists of  M+1=3  Dirac lines according to the  a  coefficients:  hν=a0, a1, a2=0.25, 0.5, 0.25, 0, 0, 0,....
  •   The step response is:  σν=0.25, 0.75, 1, 1, 1, 1,....  The final value is equal to the DC signal transfer factor  H(f=0)=a0+a1+a2=1.
  •   The distortions with rise and fall can also be seen from the rectangular response  ρ(2,8)ν=0, 0,0.25, 0.75, 1, 1, 1, 1, 1, 0.75, 0.25, ....

(2)  How do the results differ with  a2=0.25?

  •   Taking into account  H(f=0)=0.5  there are comparable consequences   ⇒   Step response:    σν=0.25, 0.75, 0.5, 0.5, 0.5, 0.5,....

(3)  Now let the filter coefficients  a0=1b1=0.9  and  a1=a2=b2=0.  Which filter is it?  Interpret the impulse response  hν.

  •   It is a recursive digital filter   ⇒   IIR filter  (Infinite Impulse Response)  of the first order.  It is the discrete-time analogon of the RC low pass.
  •   Starting from  h0=1 is h1=h0b0=0.9h2=h1b0=b20=0.81h3=h2b0=b30=0.729,  and so on   ⇒   hν  extends to infinity.
  •   Impulse response  h(t)=et/T  with  T:   intersection (Tangente bei  t=0, Abscissa)   ⇒   hν=h(νTA)=eν/(T/TA)  with  T/TA=1/(h0h1)=10.
  •   So:  The values ​​of the continuous time differ from the discrete-time impulse response.  This results in the values  1.0, 0.9048, 0.8187 ...

(4)  The filter setting is retained.  Interpret the step response  hν  and the rectangular response  ρ(2,8)ν.  What is the value for  H(f=0)?

  •   The step response is the integral over the impulse response:   σ(t)=T(1et/T)]   ⇒   σν=10(1eν/10)   ⇒   σ0=1σ1=1.9σ2=2.71, ...
  •   For large  ν  values, the (time-discrete) step response tends to the DC signal transmission factor  H(f=0)=10σ40=9.867σ50=9.954σ=10.
  •  The rectangular response  ρ(2,8)ν  increases with a delay of  2  in the same way as  σν.  In the area  ν8  the  ρν  values decrease exponentially.

(5)  We continue to consider the filter with  a0=1b1=0.9a1=a2=b2=0.  What is the output sequence  yν  for the input sequence  xν=1, 0, 0.5?
        Note: The task can also be solved with this program, although the constellation considered here cannot be set directly.

  •   You can help yourself by setting the coefficient  a2=0.5  and reducing the input sequence  to xν=1, 0, 0,  ...   ⇒   „Dirac function”.
  •   The actual impulse response of this filter  (with  a2=0)  was determined in task  (3):   h0=1,   h1=0.9,   h2=0.81,   h3=0.729,   h4=0.646.  
  •   The solution to this problem is:  y0=h0=1,   y1=h1=0.9,   y2=h2h0/2=0.31,   y3=h3h1/2=0.279,   y4=h4h2/2=0.251.  
  •   Caution:  Step response and rectangular response now refer to the fictitious filter  (with  a2=0.5)  and not to the actual filter  (with  a2=0).

(6)  Consider and interpret the impulse response and the step response for the filter coefficients

  •   You can help yourself by setting the coefficient  a2=0.5  and reducing the input sequence  to xν=1, 0, 0,  ...   ⇒   „Dirac function”.
  •   The actual impulse response of this filter  (with  a2=0)  was determined in task  (3):   h0=1,   h1=0.9,   h2=0.81,   h3=0.729,   h4=0.646.  
  •   The solution to this problem is:  y0=h0=1,   y1=h1=0.9,   y2=h2h0/2=0.31,   y3=h3h1/2=0.279,   y4=h4h2/2=0.251.  
  •   Caution:  Step response and rectangular response now refer to the fictitious filter  (with  a2=0.5)  and not to the actual filter  (with  a2=0). a0=1, b1=1, a1=a2=b2=0.
  •   The system is unstable:   A time-discrete Dirac function at input (at time  t=0)  causes an infinite number of Diracs of the same height in the output signal.
  •   A discrete-time step function at the input causes an infinite number of Diracs with monotonically increasing weights (to infinity) in the output signal.

(7)  Consider and interpret the impulse response and step response for the filter coefficients a0=1b1=1a1=a2=b2=0

  •   In contrast to exercise (6), the weights of the impulse response hν are not constantly equal to 1, but alternating ±1. The system is also unstable.
  •   With the jump response σν, however, the weights alternate between 0 (with even ν) and 1 (with odd ν).

(8)  We consider the „sine generator”: a1=0.5b1=3=1.732b2=1.  Compare the impulse response with the calculated values ​​in Beispiel 4.
        How do the parameters a1 and b1 influence the period duration T0/TA and the amplitude A of the sine function?

  •   xν=1,0,0,...   ⇒   yν=0,0.5,0.866,1,0.866,0.5,0,0.5,0.866,1,0.866,0.5,0,...   ⇒   sine,  period  T0/TA=12,  amplitude  1.
  •   The increase/decrease of b1  leads to the larger/smaller period T0/TA and the larger/smaller amplitude A. b1<2 must apply.
  •   a1 only affects the amplitude, not the period. There is no value limit for a1. If a1 is negative, the minus sine function results.

(9)  The basic setting is retained. Which a1 and b1 result in a sine function with period T0/TA=16 and amplitude A=1?

  •   Trying with b1=1.8478 actually achieves the period duration T0/TA=16. However, this increases the amplitude to A=1.307.
  •   Adjusting the parameter a1=0.5/1.307=0.3826 then leads to the desired amplitude A=1.
  •   Or you can calculate this as in the example: b1=2cos(2πTA/T0)=2cos(π/8)=1.8478,     a1=sin(π/8)=0.3827.

(10)  We continue with the "sine generator". What modifications do you have to make to generate a "cosine"?

  •   With a1=0.3826, b1=1.8478, b2=1 and xν=1,1,1,... is the output sequence yν the time-discrete analog of the step response σ(t).
  •   The step response is the integral over   sin(πτ/8)   within the limits of   τ=0   to   τ=t   ⇒   σ(t)=8/πcos(πτ/8)+1.
  •   If you change   a1=0.3826   on   a1=0.3826π/8=0.1502, then   σ(t)=cos(πτ/8)1   ⇒   Values ​​between 0 and 2.
  •   Would you still in the block diagram   zν=yν+1   add, then   zν   a time-discrete cosine curve with   T0/TA=16   and   A=1.


Applet Manual


About the authors


This interactive calculation tool was designed and implemented at the chair for communications engineering at the Technische Universität München.

Once again: Open Applet in new Tab

Open Applet in a new tab