/
A Discrete-Time Signal Processing Framework A Discrete-Time Signal Processing Framework

A Discrete-Time Signal Processing Framework - PowerPoint Presentation

liane-varnes
liane-varnes . @liane-varnes
Follow
343 views
Uploaded On 2019-11-24

A Discrete-Time Signal Processing Framework - PPT Presentation

A DiscreteTime Signal Processing Framework Dr Veton K ë puska 10 September 2019 Veton Këpuska 2 Introduction DiscreteTime Signals 10 September 2019 Veton Këpuska 4 DiscreteTime Signals Signals in nature are defined by their continuously varying values ID: 767714

puska september 2019 veton september puska veton 2019 time discrete filter system signals signal 127 32767 2147483647 systems linear

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "A Discrete-Time Signal Processing Framew..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

A Discrete-Time Signal Processing Framework Dr. Veton K ë puska

10 September 2019 Veton Këpuska 2 Introduction

Discrete-Time Signals

10 September 2019 Veton Këpuska 4 Discrete-Time Signals Signals in nature are defined by their continuously varying values. The resulting analog (continuous) waveform is typically denoted by x(t) . x(t) – continuous-time signal or analog waveform On the other hand, discrete-time (DT) signals are, as the name implies, values that exists only at specific and discrete instances of time. Definition: Discrete Time Signals are functions (real or complex – valued) of an integer-valued independent variable, n, which is called “sample index” or “Discrete Time index”. The resulting discrete time signals are denoted by x [n] . A signal is indicated as a lower case letter: x ➨ Signal Name x [n] ➨ n’th sample of Discrete Time Signal

10 September 2019 Veton Këpuska 5 Examples of Discrete Time Signals   If x[n]=n 2 , the 2 nd sample of x is x[2]=2 2 =4. This form is called a “piece-wise” or “branch” definition of a signal.

10 September 2019 Veton Këpuska 6 Discrete Sequences & Graphical Representation   Figure 2.1 Graphical representation of a discrete-time signal. From Discrete-Time Signal Processing , 2e by Oppenheim, Schafer, and Buck ©1999-2000 Prentice Hall, Inc.

10 September 2019 Veton Këpuska 7 Matlab Stem Function

10 September 2019 Veton Këpuska 8 Discrete-Time Signals In the realm of Digital Signal Processing a limited number of types of signals are used due to their specific properties. In the next section those signals are introduced. Each signal will be defined analytically as well as its graphical representation will be given.

10 September 2019 Veton Këpuska 9 0 Special Types of Discrete Signals Unit Impulse/Sample    [n] n -3 -2 -1 1 2 3 1

10 September 2019 Veton Këpuska 10 Special Types of Discrete Signals Note: The unit impulse/sample  takes the value of 1 whenever its argument (contained in []) becomes zero. Example:  

10 September 2019 Veton Këpuska 11 1 n 1 2 3 Special Types of Discrete Signals Unit Step 0   u [n] -3 -2 -1

10 September 2019 Veton Këpuska 12 Special Types of Discrete Signals Note: The unit step u takes the value of 1 whenever its argument (contained in []) is greater and equal to zero. Example:  

Unit step sequence and unit sample can be expressed as a function of the other: 10 September 2019 Veton Këpuska 13    

10 September 2019 Veton Këpuska 14 -1 1 n 1 2 3 Special Types of Discrete Signals Unit Ramp 0   r [n] -3 -2

10 September 2019 Veton Këpuska 15 Special Types of Discrete Signals Note: Unit ramp function r[n] can be expressed as function of unit sample function r [ n ]= nu [ n ]

10 September 2019 Veton Këpuska 16 Special Types of Discrete Signals Exponential Function Note: The “shape” of the exponential signal dependents on the |  | and its sign(  ) . If |  |<1 then    

10 September 2019 Veton Këpuska 17 Special Types of Discrete Signals n -1 1 1 2 3 0 r [ n ] -3 -2  >1 n -1 1 1 2 3 0 r [ n ] -3 -2 0<  <1

10 September 2019 Veton Këpuska 18 Special Types of Discrete Signals n -1 1 1 2 3 0 r [n] -3 -2  <-1 n -1 1 1 2 3 0 r [n] -3 -2 -1< <0

10 September 2019 Veton Këpuska 19 Periodic Discrete-Time Signals Periodicity of Discrete-Time Signals vs. Continuous Signals: Continuous Signals: Discrete-Time Signals: A signal x is said to be periodic with period of N ≠ 0 (we assume that N >0) if only if    

10 September 2019 Veton Këpuska 20 Periodic Discrete-Time Signals Notes: It is necessary for N ≠ 0, otherwise all signals would be periodic. If x is periodic with period of N , then it is also periodic with period of 2 N , 3 N , etc. Definition: The smallest integer period of a periodic signal is called “fundamental period” of the signal. Examplex[n] = (-1)n, ∀n: periodic with fundamental period of N=2x[n] = u[n], : a-periodic signal

10 September 2019 Veton Këpuska 21 Periodic Discrete-Time Signals Interesting Facts: Let x and y be two periodic signals with fundamental period N and M respectively. If z[n]=x[n] ∓y[n] or z[n]=x[n] y[n] or z[n]=x[n] /y[n] (y[n]≠0, ∀ n) Then z[n] is periodic with fundamental period of least common multiple LCM(N,M). LCM(N,M) is computed as:  

10 September 2019 Veton Këpuska 22 Formal Definitions of LCM & GCD Definition 1 We say that “ d divides a ”, if there exists an integer k such that a = kd . If d divides a and d ≥ 0, we say that d is a divisor of a.If d divides a and d divides b, then d is a common divisor of a and b.Example 1 Every integer d ≥ 0 (including d = 0) is a divisor of 0. While 0 divides no integer except itself, 1 is a divisor of every integer. The divisors of 12 are {1, 2, 3, 4, 6, 12}.A common divisor of 14 and 77 is 7. If d divides a then d divides -a.

10 September 2019 Veton Këpuska 23 Formal Definitions of LCM & GCD Definition 2 (prime) An integer p > 1 is prime if its only divisors are 1 and p. Definition 3 (Greatest common divisor, relatively prime) The greatest common divisor, gcd(a, b), of two integers a and b is the largest of their common divisors, except that gcd(0; 0) = 0 by definition. Integers a and b are relatively prime if gcd(a, b) = 1. Example 2 gcd(24, 30) = 6 gcd(4, 7) = 1 gcd(0, 5) = 5 gcd(-6, 10) = 2

10 September 2019 Veton Këpuska 24 Formal Definitions of LCM & GCD Example 3 For all a ≥ 0, a and a + 1 are relatively prime. The integer 1 is relatively prime to all other integers. Example 4 If p is prime and 1 ≤ a < p, then gcd(a, p) = 1. That is, a and p are relatively prime. Definition 4 For any positive integer n, we define Euler’s phi function of n, denoted Φ (n), as the number of integers d, 1 ≤ d ≤ n, that are relatively prime to n. (Note that Φ (1) = 1.)

10 September 2019 Veton Këpuska 25 Formal Definitions of LCM & GCD Example 5 If p is prime, then Φ (p) = p - 1. For any integer k > 0, Φ (2 k ) = 2 k-1 . Definition 5 The least common multiple lcm( a , b) of two integers a ≥ 0, b ≥ 0, is the least m such that a divides m and b divides m.Exercise 1 It can be shown that lcm(a,b) = ab/gcd(a,b).

10 September 2019 Veton Këpuska 26 Periodic Discrete-Time Signals Example: Let x periodic with fundamental period 5 y periodic with fundamental period 10 If z[n]=x[n]y[n] then z[n] is periodic with fundamental period LCM(5,10)=10

10 September 2019 Veton Këpuska 27 Special Periodic Discrete-Time Signals The sinusoidal sequence  angular frequency of the sequence. A is magnitude of the sequence.  ,  is the phase offset. Note that the discrete-time sinusoidal signal is periodic in the time variable n with period N only if N = 2  k/  ∈ Z integer.  

10 September 2019 Veton Këpuska 28 Special Periodic Discrete-Time Signals Both formulations are called sinusoidal signals because a cosine can always be expressed as a sin-e function & vice-versa. Using appropriate phase shifts one can always transform a sinusoidal signal in its standard form: Example:      

10 September 2019 Veton Këpuska 29 Special Periodic Discrete-Time Signals Fact: Example:   k = N hence for N = 4 , k = 3  

10 September 2019 Veton Këpuska 30 Example Find the condition for which the given discrete time signal is periodic.  

10 September 2019 Veton Këpuska 31 Complex Exponential Discrete-Time Signals Although complex valued signals do not occur in nature, they are very useful for the analysis of DT systems as it will be demonstrated later. Definition: x[n] is periodic with fundamental period N/GCD(k,N) (Why? Hint: Euler's identity)  

10 September 2019 Veton Këpuska 32 Discrete-Time Signals (cont.) Complex exponential sequence with complex gain A = |A|e j Φ is written as: x[n] = Ae j ω n = |A|e j Φ e j ωn = |A|cos(ωn+Φ) + j|A|sin(ωn+Φ)Important Property:Complex exponential is periodic in the frequency variable ω with period 2π:Aej(ω+2π)n = AejωnIn discrete time we need to consider frequencies only in the range 0≤ω≤2π.

10 September 2019 Veton Këpuska 33 Periodic and A-periodic Discrete-time Sinusoids From Discrete-Time Signal Processing , 2e by Oppenheim, Schafer, and Buck ©1999-2000 Prentice Hall, Inc.

Operations on Discrete-Time Signals

10 September 2019 Veton Këpuska 35 Time-Shift Delay by n 0 samples n→n-n 0 Advance by n 0 samples n→n+n 0 Example: δ [n] δ [n-2]

10 September 2019 Veton Këpuska 36 Time Reversal Time reversal corresponds to reflection of the signal along n=0, the time axis (n → -n) Example x[n]= δ [n-2] y[n]= x[-n]= δ [-n-2]= δ [-(n+2)]= δ [n+2] Comment: δ[n] is an even function of n, that is, δ[-n]= δ[n].

10 September 2019 Veton Këpuska 37 Time Scaling Time Scaling is achieved by following transformation of time variable n: n → rn where r ∈ Q (set of all rational numbers), r≠0 If |r|<1, the it corresponds to expansion of the signal on the n-axis Otherwise, if |r|>1, it corresponds to contraction Note: Reversal is a special case of time scaling (r=-1) If for some value of n the product rn is not an integer, we simply skip this value by setting it equal to 0.

10 September 2019 Veton Këpuska 38 Examples x[n] = (-1) n u[n] y[n] = x[2n]u[2n] = (-1) 2n u[2n]=[(-1) 2 ] n u[n] = (1) n u[n] = u[n] Comment: Equivalence of u[2n]=u[n] was used in previous derivation. Show that this is correct and why? x [n]y[n]

10 September 2019 Veton Këpuska 39 Examples Comment: Contracting using r=2 caused y[n] to contain only every other sample of x[n]. In other words, y[n] is a sub-sampled ( decimated ) by 2 version of x[n].

10 September 2019 Veton Këpuska 40 Examples x[n]=u[n] n=0 y[0]=x[0]=1 y[n]=x[n/2] n=1 y[1]=x[1/2] – undefined y[1]=0 n=2 y[2]=x[1]=1 … x [n] y [n]

10 September 2019 Veton Këpuska 41 Examples Comment: Expanding by a factor of 2 (r=1/2) caused y[n] to contain the samples of x interleased with zeros. This is called over-sampling ( interpolation ) by 2 with zero insertion .

10 September 2019 Veton Këpuska 42 Additional Special Discrete-Signals After presenting 3 basic operations on signals, the more elaborate ones can be defined next.

10 September 2019 Veton Këpuska 43 Additional Special Discrete-Signals (Rectangular) Pulse Signal   ∏(n;n 1 ,n 2 ) n 1 n 2 Duration of pulse: n 2 -n 1 +1 samples

10 September 2019 Veton Këpuska 44 Relationship of Pulse with Step & Unit Impulse Signals

10 September 2019 Veton Këpuska 45 Train of Pulses For N≠0   T 3 (n)

10 September 2019 Veton Këpuska 46 Train of Pulses Comment: T N (n) is periodic with fundamental period N Note: T 1 (n)=1 ∀n

10 September 2019 Veton Këpuska 47 Representation of Signals as Superposition of Impulses Any sequence (e.g., digital signal representation) can be expressed as a weighted sum of unit sample shifted in time; e.g.,:  

10 September 2019 Veton Këpuska 48 General Representation of a Sequence Representation Theorem: In general, any sequence can be expressed as a weighted summation (superposition) of shifted unit impulses:  

10 September 2019 Veton Këpuska 49   Representation of Signals as Superposition of Impulses Let:

10 September 2019 Veton Këpuska 50 Representation of Signals as Superposition of Impulses In a similar fashion; if x [ n ]= u [ n ], then  

10 September 2019 Veton Këpuska 51 Selected Problems with Solutions Problem 1 Show that r[n]=nu[n-1] Solution: Considering that it has been shown that r[n]=nu[n], the stated problem states something strange. More specifically it needs to be shown that nu[n]=nu[n-1] ∀ n. To demonstrate this equality the Representation Theorem will be utilized:

10 September 2019 Veton Këpuska 52 Solution of the Problem 1

10 September 2019 Veton Këpuska 53 Solution of the Problem 1 (cont.) From (*) it can be observed that: r[n] = n δ [n]+nu[n-1]=nu[n-1], only if n δ [n]=0. Since δ [n]=1 for n=0 & δ [n]=0 for n≠0 ⇒ indeed n δ [n]=0.Therefore,r[n] = nu[n]=nu[n-1]Comment:The fact that nδ[n]=0 ∀n, is a special case of the sifting property of the impulse/δ function:x[n]δ[n-n0]=x[n0]δ[n-n0] ∀n,n0

10 September 2019 Veton Këpuska 54 Problem 2 Show that: ∏( n-n 0 ;n 1 ,n 2 )= ∏( n;n 1 +n 0 ,n2+n0) Solution  

10 September 2019 Veton Këpuska 55 Problem 3 Simplify r[2n] by writing it as an expression of elementary functions. Solution: r[2n]=(2n)u[2n]=(2n)u[n]=2nu[n]=2r[n]

10 September 2019 Veton Këpuska 56 Problem 4 Express x[n], given below in terms of elementary signal: Solution:    

10 September 2019 Veton Këpuska 57 Problem 5 Simplify y[n]=x[n]T N (n) Hint: Use sifting property. Solution  

Introduction to Discrete Time Systems

10 September 2019 Veton Këpuska 59 Overview Introduction to Discrete Time Systems Taxonomy of Systems based on System properties

10 September 2019 Veton Këpuska 60 Introduction to Discrete Time Systems DSP 1 ’s subject matter involves the mathematical modeling & analysis of real-world DSP 2 devices. Definition: A Discrete-Time system is an operator on the domain of complex-valued (in general) sequences, which take values in the same domain (range or co-domain)

10 September 2019 Veton Këpuska 61 Discrete-Time Signals A Discrete-Time Signal is a function of the sample index to set C : This function thus maps n ∈ Z to the value of the signal x[n].  

10 September 2019 Veton Këpuska 62 Discrete-Time Systems A Discrete-Time System is a function of functions ( operator ) that takes an input signal and maps it to an output signal. It is a mapping within the set of all complex valued signals S .  

10 September 2019 Veton Këpuska 63 Examples Discrete-Time Signal x: x[n]=2n 2 +1 n=0, ± 1, ± 2,… Discrete-Time System T: y[n]=T{x[n]}=x 3 [n]+x[n-1]+3n

10 September 2019 Veton Këpuska 64 Discrete-Time System A discrete–time system can be thought of as a transformation T(x) of an input sequence to an output sequence: y[n] = T{x[n]} Graphical Representation T x[n] y[n] Input signal Discrete-Time System Output signal

10 September 2019 Veton Këpuska 65 A First Taxonomy on Systems The presented definition of Discrete-Time System (operator) refers to a Single Input Single Output (SISO) system. However, systems can have multiple inputs and/or outputs: T x[n] y 1 [n] y 2 [n] H x 2 [n] y 1 [n] y 2 [n] T is a SIMO (Single Input Multiple Output) System H is a MIMO (Multiple Input Multiple Output) System x 1 [n]

10 September 2019 Veton Këpuska 66 A First Taxonomy on Systems (cont.) In general a MIMO system is represented with:  

10 September 2019 Veton Këpuska 67 Taxonomy of Systems (Based on System Properties Discrete-Time Systems can be categorized into many subgroups depending on whether they possess a given property or not. In the sequel - these properties are examined and examples are presented

10 September 2019 Veton Këpuska 68 Homogeneity or Scaling Property Definition: A Discrete-Time System T has the homogeneity ( scaling ) property if and only if: T{  x[n]} =  T{x[n]} =  y[n] ∀n x ∈ S & ∀  ∈ C

10 September 2019 Veton Këpuska 69 Examples Show that the system defined by T{x[n]}=2x[n] is homogeneous. Proof  

10 September 2019 Veton Këpuska 70 Examples Show that the system defined by T{x[n]}=x 2 [n] is NOT homogeneous. Proof  

10 September 2019 Veton Këpuska 71 T{} T{} Homogeneity or Scaling Property The homogeneity property indicates that if a system T is homogeneous the following two block diagrams are equivalent: x[n]  y[n]= T{  x[n]} x[n]  y[n]=  T{x[n]}  x[n] T{ x[n]} ≜ In other words, the order in multiplication of the multiplier and the system T can be interchanged

10 September 2019 Veton Këpuska 72 Superposition (Additive) Property Definition: A Discrete-Time System T has Superposition ( Additive ) property if and only if: T{x 1 [n] + x 2 [n]} = T{x 1 [n]} + T{x 2 [n]}∀ x1, x2 ∈ S

10 September 2019 Veton Këpuska 73 T{} T{} T{} Superposition (Additive) Property. If T has the Superposition (Additive) property, then the following block diagrams are equivalent. x 1 x 2 y= T{x 1 [n] + x 2 [n]} x 1 [n] + x 2 [n] x 1 x 2 T{x 2 [n]} y= T{x 1 [n]}+T{x 2 [n]} T{x 1 [n]} ≜

10 September 2019 Veton Këpuska 74 Examples Show that T{x[n]}=-3x[n] has/possesses the superposition property. Proof:  

10 September 2019 Veton Këpuska 75 Examples Show that T{x[n]}=x 2 [n] does NOT have/possess the superposition property. Proof:  

10 September 2019 Veton Këpuska 76 Linearity Property Definition: A Discrete-Time System T is linear (e.g., has linearity property) if and only if T has/possesses: Homogeneous property Superposition property

10 September 2019 Veton Këpuska 77 T{} T{} T{} ax 1 [n] + bx 2 [n] Property of Linear Systems T{ax 1 [n] + bx 2 [n]} = aT{x 1[n]} + bT{x2[n]} x 1 x 2 a b y= T{ax 1 [n] + bx 2 [n]} x 1 x 2 a b bT{x 2 [n]} y= a T{x 1 [n]}+ b T{x 2 [n]} aT{x 1 [n]} ≜

10 September 2019 Veton Këpuska 78 Comment A Discrete-Time system T that is not linear is called non-liner system. Linear Discrete-Time systems are of paramount importance in engineering because they are mathematically tractable and amenable to thorough and exact analysis. They have been studied for at least 3 centuries and there exists a rich volume of studies and results on them. The mainstream DSP discipline is almost entirely dedicated to linear systems, their analysis and their design. On the other hand, non-linear systems are often extremely hard to analyze and understand. Thus research on them has started relatively recently (last century) and encountered spectacular observations & results (e.g., Mathematical Chaos Theory, etc.) However, non-linear systems are beyond the scope of this class.

10 September 2019 Veton Këpuska 79 Time Invariance Property Definition: A Discrete-Time system is called (i.e., has the property of) time invariant if and only if the following holds: If y[n] = T(x[n]) then y[n-n 0 ] = T(x[n-n 0 ]) for ∀ n, n 0 ∈ Z

10 September 2019 Veton Këpuska 80 Time Invariance Property Explanation; Let the output of the system T be y[n] for the input x[n]. Now, let’s say that the same system has an input a delayed (or advanced) version of x[n] by n 0 samples. If the output of the system is the same as in the first case, only shifted by the same amount n 0 (i.e., y[n-n 0 ]) then T is Time Invariant system.

10 September 2019 Veton Këpuska 81 Ideal Time Delay Operator (System) It is useful at this point to introduce a very simple system, called the ideal time delay D . Ideal time delay system D is defined as: y[n]=D{x[n]}=x[n-1] Which delays its input signal by 1 sample. x[n] D x[n-1] n →n-1

10 September 2019 Veton Këpuska 82 Ideal Time Delay Operator (System) In general, one can define the ideal time delay by n 0 samples (if n 0 >0 it is delay , otherwise if it is n 0 <0 it is advance ) denoted as D n 0 and defined as: When n0=0, D0{x[n]}=x[n], which is called the identity system.  

10 September 2019 Veton Këpuska 83 Ideal Time Delay Operator Base on the presented definitions, the following block diagrams are equivalent: In other words, D 2 {} is a shorthand notation for D{D{}}. x[n] D x[n-2] D x[n] D 2 x[n-2]

10 September 2019 Veton Këpuska 84 Ideal Time Delay Operator Using the ideal delay we can re-express the definition of Time Invariance as follows. Definition: A Discrete-Time system is Time-Invariant if and only if: The D n 0 and T operators commute.  

10 September 2019 Veton Këpuska 85 Ideal Time Delay Operator If T is Time Invariant, then the following block diagrams are equivalent: The order of T and D n 0 in cascade connection is invariant. x[n] D n 0 T{x[n-n 0 ]}= T{D n0{x[n]}}T x[n-n0] x[n] T D n 0 {T{x[n]}}= T{x[n-n 0 ]} D n 0 T{x[n]}

10 September 2019 Veton Këpuska 86 Time Variant Systems Systems that are not Time-Invariant are called Time Variant systems.

10 September 2019 Veton Këpuska 87 Examples T{x[n]}=x 4 [n]+3. Show that T is Time Invariant. Proof: The operator D commutes with itself, thus D, that is, the ideal time delay system is Time Invariant  

10 September 2019 Veton Këpuska 88 Examples Show that the following system, T{x[n]}=nx[n], is not Time Invariant, that is, it is Time Variant. Proof  

Linear Time Invariant Systems

10 September 2019 Veton Këpuska 90 Linear Time Invariant Systems Definition: A Discrete Time system T is Linear, and Time invariant, Then the system is referred to as linear time-invariant (LTI) system. Comment: LTI systems are the easiest, more manageable to analyze and design mathematically.

10 September 2019 Veton Këpuska 91 Unit Sample Response and LTI Any sequence (digital signal) can be expressed as a weighted sum of unit sample shifted in time; e.g.,: In General: On the other hand:      

10 September 2019 Veton Këpuska 92 Convolution By applying Superposition Principle and Linear Time Invariance we can derive expression that defines convolution:  

Convolution 10 September 2019 Veton Këpuska 93  

10 September 2019 Veton Këpuska 94 Dynamic Systems Definition A Discrete-Time system is called dynamic if and only if its output y[n] depends not only on the present value of its input (i.e., x[n]), but also on x’s future and/or past values. A Discrete-Time system that is not dynamic is called memory-less or static . In this case y[n] depends only on the current value of x: x[n].

10 September 2019 Veton Këpuska 95 Examples y[n]=T{x[n]}=(n 2 -1)x 3 [n] T is static/memoryless because y[n]=T{x[n]} depends only on the present value of x (i.e., x[n]) y[n]=T{x[n]}=x[n+3]+5 T is dynamic because y[n]=T{x[n]} depends on the future value of x (i.e., x[n+3], 3 samples ahead)

Discrete-Time Systems Properties of LTI

10 September 2019 Veton Këpuska 97 Causality: Definition A Discrete-Time system is called a causal system if and only if its output y[n] does not depend on the future values of its input. Otherwise, the system is called non-causal . A more formal definition of a causal system is one where for any time instant n 0 , y[n 0 ] – output of the system, does not depend on its input x[n] for n>n 0:

10 September 2019 Veton Këpuska 98 Examples y[n]=T{x[n]}=D{x[n]}=x[n-1] Proof: y[n] depends only on the past values of x, that is x[n-1]. Thus, T{D} is causal . y[n]=T{x[n]}=D -2 {x[n]}=x[n+2] y[n] depends on the future values of x (x[n+2]) the system thus is non-causal. T{D -2 } is non-causal .

10 September 2019 Veton Këpuska 99 Comments All static/memoryless systems are causal (Why?) Systems, whose output depend only on present and future values of their inputs, are called anti-causal . Thus, anti-causal systems are a subset of non-causal systems.

10 September 2019 Veton Këpuska 100 Stability – BIBO Stable Systems Definition: A Discrete Time signal x is called bounded if and only if for some positive constant Mx depending on x the following holds: |x[n]|≤Mx ∀n ⇔ - Mx≤x[n]≤Mx ∀n That is, x is bounded within the strip [- Mx, Mx]

10 September 2019 Veton Këpuska 101 Graphical Example of a Bounded Signal Mx -Mx

10 September 2019 Veton Këpuska 102 BIBO Stable Systems Definition: A Discrete Time system T is called BIBO stable if and only if any bounded input of the system produces a bounded output. For: If for |x[n]|≤M x ∀n |T{x[n]}| ≤M y ∀n, the system then is called BIBO stable. Note M x is not necessarily equal to My.A system that is not BIBO stable is called unstable.

10 September 2019 Veton Këpuska 103 Examples y[n]=T{x[n]}=x 2 [n], T is BIBO Stable. Proof. |T{x[n]}|=|x 2 [n]|=|x[n]| 2 ……(1) Let’s assume that |x[n]|≤M x ∀n, ⇒ |x[n]|2≤Mx2 ……(2)Combining (1) & (2)|T{x[n]}|=|x[n]|2 ≤Mx2 or|T{x[n]}|≤My where My=Mx2

10 September 2019 Veton Këpuska 104 Examples y[n]=T{x[n]}=log(x[n]), T is unstable. Proof Assume that |x[n]|≤M x ∀n, ……(1) Then |T{x[n]}|=|log(x[n])| ……(2) From (1) |x[n]|≤M x ∀n ⇒ -Mx≤x[n]≤Mx ∀n However, log(x[n]) will be undefined for values of x[n]<0 and it will take unbounded negative value (-∞) when x[n]→0.This in turn ⇒ from (2) that can not be bound and thus T is unstable.

Discrete-Time Systems Properties of LTI

10 September 2019 Veton Këpuska 106 Properties of LTI: Stability: Every bounded input produces a bounded output: If |x[n]| < ∞, then |y[n]| < ∞ for all n. Necessary and sufficient condition for stability is that h[n] be absolutely summable:  

10 September 2019 Veton Këpuska 107 Properties of LTI: Causality: A causal system is one where for any time instant n 0 , y[n 0 ] does not depend on x[n] for n>n 0: Output does not depend on the future values of the input. A necessary and sufficient condition for causality is that: h[n] = 0, for n<0. A consequence of causality is that for the system y[n] = T(x[n]): if x 1 [n] = x2[n] for n<n0, then y1[n] = y2[n] for n<n0,

10 September 2019 Veton Këpuska 108 Example 2.1 Assume that an LTI system has an exponentially decaying impulse response: h[n] = Aa n for n≥0 Causality: h[n] = 0 for n≤0 Stability: |a| < 1 the system is stable because the impulse response is absolutely summable:  

10 September 2019 Veton Këpuska 109 Properties of LTI Systems (cont). h 1 [n] h 2 [n] x[n] y[n] h 2 [n] h 1 [n] x[n] y[n] h 1 [n]*h 2 [n] x[n] y[n] h 2 [n]*h 1 [n] x[n] y[n] h1[n] h 2 [n] x[n] y[n] h 1 [n]+h 2 [n] x[n] y[n] h 2 [n]+h 1 [n] x[n] y[n]

Linear Constant-Coefficient Difference Equations

10 September 2019 Veton Këpuska 111 Linear Constant-Coefficient Difference Equations All discrete time, linear, causal, time invariant systems can be described by the N th order difference equations that have constant-coefficients .

10 September 2019 Veton Këpuska 112 Liner Constant-Coefficient Difference Equations Nth-order linear constant-coefficient difference equation is of the form: Where x[n] is the input, and y[n] is the output. Normalizing the equation by the value of a 0 the following is obtained:    

10 September 2019 Veton Këpuska 113 Accumulator Example Accumulator function is defined as:  

10 September 2019 Veton Këpuska 114 Liner Constant-Coefficient Difference Equations (cont.)   D x[n] y[n] y[n-1]

10 September 2019 Veton Këpuska 115 General Formulation of Difference Equation Equation: Along with initial conditions: y [-1], y [-2], …, y [-N] Uniquely specifies the LTI system. General equation must be computed using recursive procedure.  

10 September 2019 Veton Këpuska 116 Flow Graph Representation of Liner Constant-Coefficient Difference Equation D D D x[n] y[n] β 1 x[n-1] β 2 x[n-2] β M x[n-M] D D D α 1 y[n-1] α 2 y[n-2] α N y[n-N] β 0

10 September 2019 Veton Këpuska 117 Example Recursive Computation of Difference Equations: y[n] = ay[n-1]+x[n] Initial condition is given by y[-1] = c; Input x[n] = K [n] Solution n≥0: y[0] = ac+K y[1] = ay[0]+0 = a(ac+K) = a 2 c+aK … y[n] = a n+1 c+a nK, n≥0

10 September 2019 Veton Këpuska 118 Example (cont.) Solution n<0: y[n] = ay[n-1]+x[n] ➲ y[n-1] = a -1 (y[n]-x[n]) y[-1] = c y[-2] = a -1 (y[-1]-x[-1]) = a -1 (c+0) = a-1c…y[n] = an+1c, n<0Overall solutiony[n] = an+1c+Kanu[n], n

Digital Filters FIR, IIR Filters.

10 September 2019 Veton Këpuska 120 General Formulation of a Digital Filter through Difference Equation Equation: Along with initial conditions: y [-1], y [-2], …, y [-N] Uniquely specifies a Digital Filter system.  

10 September 2019 Veton Këpuska 121 Digital Filters There are two (2) broad classes of filters that can be defined based on the properties of general constant-coefficient difference equation. Finite Impulse Response (FIR) Filters, & Infinite Impulse Response (IIR) Filters

10 September 2019 Veton Këpuska 122 FIR Filter A system that has a k coefficients equal to zero for k=1,…,N is said to be a Finite Impulse Response ( FIR ) filter. The name reflects the fact that FIR filters have finite impulse (e.g., unit sample) response. FIR filters are also called moving average ( MA ) filters considering the fact their output is simply a weighted average of the input values. 

10 September 2019 Veton Këpuska 123 IIR Filters The second class of digital filters are infinite impulse response ( IIR ) filters. This class includes both Autoregressive ( AR ) filters and The most general form autoregressive and moving average ( ARMA ) filters. AR filter:ARMA filter:    

FIR Filters

10 September 2019 Veton Këpuska 125 FIR Filters General constant-coefficients equation: Impulse (unit sample) response, h[n], of the filter is obtained when x[n]= δ [n].      

10 September 2019 Veton Këpuska 126 Linear Phase of FIR Filters If FIR filter has coefficients that are symmetric, as depicted in the following relationship: Then it can be shown that the resulting filter has linear phase ⇒ constant delay for all frequency components of the input signal. This property is very important in many communications data streams (speech, data, …) and image processing applications.  

10 September 2019 Veton Këpuska 127 FIR Filter Structures For a given difference equation there are different ways to implement a digital filter. Selection of a particular filter structure to be implemented is dependent on many factors: Programming considerations Hardware Sensitivity of Quantizing Coefficients Quantization noise of the input signal.

10 September 2019 Veton Këpuska 128 Direct Structure of an FIR filter D x[n] y[n] β 0 x[n-1] D β 1 x[n-2] D β 2 x[n-M] β M  

10 September 2019 Veton Këpuska 129 Symmetric – Linear Phase FIR filter Better Implementation: D D D x[n] y[n] x[n-1] x[n-2] x[n-M/2+1] D D β L/2 x[n-M/2] β 1 β 0

10 September 2019 Veton Këpuska 130 MATLAB fdatool MATLAB’s filter design & analysis tool ( fdatool ) can be used to obtain filter coefficients that fulfill required criteria. Important Design Parameters of a Filter Pass Band (F pass ) Stop Band (F stop ) Transition Band Sample Rate (F s ) Pass Band Attenuation (A pass ) Stop Band Attenuation (A stop )

10 September 2019 Veton Këpuska 131 Digital Filter Specifications Additional Filter Specifications & Definitions Pass-band δ s 1 - δ p 1 + δ p H( ω ) 0 0 1 A p Transition band ω p ω s ω π A s Stop-band Pass-band Ripple   Stop-band Ripple    

Example: Chebyshev FIR Filter 10 September 2019 Veton Këpuska 132

10 September 2019 Veton Këpuska 133

Time & Frequency Domain Representation 10 September 2019 Veton Këpuska 134

FIR Filter Impulse Response 10 September 2019 Veton Këpuska 135

Exporting Filter Coefficients 10 September 2019 Veton Këpuska 136

Double Precision Filter Coeffs /* * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool * Generated by MATLAB(R) 9.2 and the Signal Processing Toolbox 7.4. * Generated on: 05-Oct-2017 15:46:43 */ /* * Discrete-Time FIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form FIR * Filter Length : 101 * Stable : Yes * Linear Phase : Yes (Type 1) */ /* General type conversion for MATLAB generated C-code */ #include " tmwtypes.h " /* * Expected path to tmwtypes.h * C:\Program Files\MATLAB\R2017a\extern\include\tmwtypes.h */10 September 2019Veton Këpuska137

const int BL = 101; const real64_T B[101] = { 1.242575504571e-06,3.613463478719e-06,-1.604575535582e-20,-1.034852825548e-05, -8.338323755514e-06,1.767130176435e-05,3.145726376084e-05,-1.332227624413e-05, -7.138512439134e-05,-2.514866477747e-05,0.0001126743531421, 0.000121396153423, -0.0001117911351032,-0.0002779234695703,1.974092467395e-18, 0.000445899290354, 0.00028823982035,-0.0005047276658825,-0.0007593635942055, 0.000276729826275, 0.001294811347326, 0.000403227591654,-0.001613663417362,-0.001566912869014, 0.001310738257002, 0.002980829904163,-4.428547345523e-18,-0.004075742951651, -0.002452149770156, 0.004016293839772, 0.005678544009039,-0.001953581295799, -0.008667601799902,-0.002570874520001, 0.009843077639442, 0.009186843671145, -0.007422835970842, -0.01639157026913,1.189267801698e-17, 0.02152219247079, 0.01282865763273, -0.02100739775759, -0.03002973947377, 0.01059425246544, 0.04911083470707, 0.0156177852628, -0.06659591672908, -0.07359568413636, 0.07889962678076, 0.3068065282419, 0.4166657037476, 0.3068065282419, 0.07889962678076, -0.07359568413636, -0.06659591672908, 0.0156177852628, 0.04911083470707, 0.01059425246544, -0.03002973947377, -0.02100739775759, 0.01282865763273, 0.02152219247079,1.189267801698e-17, -0.01639157026913, -0.007422835970842, 0.009186843671145, 0.009843077639442,-0.002570874520001, -0.008667601799902,-0.001953581295799, 0.005678544009039, 0.004016293839772, -0.002452149770156,-0.004075742951651,-4.428547345523e-18, 0.002980829904163, 0.001310738257002,-0.001566912869014,-0.001613663417362, 0.000403227591654, 0.001294811347326, 0.000276729826275,-0.0007593635942055,-0.0005047276658825, 0.00028823982035, 0.000445899290354,1.974092467395e-18,-0.0002779234695703, -0.0001117911351032, 0.000121396153423,0.0001126743531421,-2.514866477747e-05, -7.138512439134e-05,-1.332227624413e-05,3.145726376084e-05,1.767130176435e-05, -8.338323755514e-06,-1.034852825548e-05,-1.604575535582e-20,3.613463478719e-06, 1.242575504571e-06};10 September 2019Veton Këpuska138

Single Precision Filter Coeffs /* * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool * Generated by MATLAB(R) 9.2 and the Signal Processing Toolbox 7.4. * Generated on: 05-Oct-2017 16:06:29 */ /* * Discrete-Time FIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form FIR * Filter Length : 101 * Stable : Yes * Linear Phase : Yes (Type 1) */ /* General type conversion for MATLAB generated C-code */ #include " tmwtypes.h " /* * Expected path to tmwtypes.h * C:\Program Files\MATLAB\R2017a\extern\include\tmwtypes.h *//* * Warning - Filter coefficients were truncated to fit specified data type. * The resulting response may not match generated theoretical response. * Use the Filter Design & Analysis Tool to design accurate * int32 filter coefficients. */10 September 2019Veton Këpuska139

const int BL = 101; const int32_T B[101] = { 2668, 7760, 0, -22223, -17906, 37949, 67554, -28609, -153298, -54006, 241966, 260696, -240070, -596836, 0, 957561, 618990, -1083894, -1630721, 594273, 2780586, 865925, -3465316, -3364920, 2814789, 6401283, 0, -8752591, -5265952, 8624925, 12194580, -4195284, -18613533, -5520911, 21137848, 19728597, -15940419, -35200629, 0, 46218556, 27549332, -45113043, -64488374, 22750984, 105464714, 33538938, -143013642, -158045528, 169435658, 658862002, 894782785, 658862002, 169435658, -158045528, -143013642, 33538938, 105464714, 22750984, -64488374, -45113043, 27549332, 46218556, 0, -35200629, -15940419, 19728597, 21137848, -5520911, -18613533, -4195284, 12194580, 8624925, -5265952, -8752591, 0, 6401283, 2814789, -3364920, -3465316, 865925, 2780586, 594273, -1630721, -1083894, 618990, 957561, 0, -596836, -240070, 260696, 241966, -54006, -153298, -28609, 67554, 37949, -17906, -22223, 0, 7760, 2668};10 September 2019Veton Këpuska140

Signed 16-bit integer /* * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool * Generated by MATLAB(R) 9.2 and the Signal Processing Toolbox 7.4. * Generated on: 05-Oct-2017 16:13:19 */ /* * Discrete-Time FIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form FIR * Filter Length : 101 * Stable : Yes * Linear Phase : Yes (Type 1) */ /* General type conversion for MATLAB generated C-code */ #include " tmwtypes.h " /* * Expected path to tmwtypes.h * C:\Program Files\MATLAB\R2017a\extern\include\tmwtypes.h *//* * Warning - Filter coefficients were truncated to fit specified data type. * The resulting response may not match generated theoretical response. * Use the Filter Design & Analysis Tool to design accurate * int16 filter coefficients. */10 September 2019Veton Këpuska141

const int BL = 101; const int16_T B[101] = { 0, 0, 0, 0, 0, 1, 1, 0, -2, -1, 4, 4, -4, -9, 0, 15, 9, -17, -25, 9, 42, 13, -53, -51, 43, 98, 0, -134, -80, 132, 186, -64, -284, -84, 323, 301, -243, -537, 0, 705, 420, -688, -984, 347, 1609, 512, -2182, -2412, 2585, 10053, 13653, 10053, 2585, -2412, -2182, 512, 1609, 347, -984, -688, 420, 705, 0, -537, -243, 301, 323, -84, -284, -64, 186, 132, -80, -134, 0, 98, 43, -51, -53, 13, 42, 9, -25, -17, 9, 15, 0, -9, -4, 4, 4, -1, -2, 0, 1, 1, 0, 0, 0, 0, 0 }; 10 September 2019 Veton Këpuska142

IIR Filters

10 September 2019 Veton Këpuska 144 IIR Filters IIR Filters in general (ARMA) are of the form: Properties: No simple relationship between the coefficient of the IIR filter and the impulse response as compared to FIR. Because symmetry is required for linear phase, most IIR filters will not have linear phase since they are right-sided and infinite in duration. A class of linear phase IIR filters has been shown to exist (M.A. Clements and J.W. Pease, “On Causal Linear Phase IIR Digital Filters,”, IEEE Transaction Acoustics, Speech and Signal Processing, vol. 37, no 4, pp.479-485, April 1989. In general IIR filters require less coefficients to approximate a given filter frequency response than FIR filters.  

10 September 2019 Veton Këpuska 145 Flow Graph Representation of ARMA Difference Equation D D D x[n] y[n] β 1 x[n-1] β 2 x[n-2] β M x[n-M] D D D α 1 y[n-1] α 2 y[n-2] α N y [n-N] β 0

10 September 2019 Veton Këpuska 146 Direct Form Realization of an IIR filter  

Direct Form Realization of an IIR filter (cont.) 10 September 2019 Veton Këpuska 147  

Direct Form Realization of an IIR filter (cont.) 10 September 2019 Veton Këpuska 148  

Direct Form Realization of an IIR filter (cont.) 10 September 2019 Veton Këpuska 149  

Direct Form Realization of an IIR filter (cont.) 10 September 2019 Veton Këpuska 150  

10 September 2019 Veton Këpuska 151 Direct Form Realization of an IIR D D D x[n] y[n] β 1 d[n-1] β 2 d[n-2] β M d[n-M] α 1 d[n-1] α 2 d[n-2] α M d[n-M] β 0 D α N d[n-N]

Example: IIR Filter Design -Chebyshev Type II, Order 20 10 September 2019 Veton Këpuska 152

Magnitude and Phaze Response 10 September 2019 Veton Këpuska 153

10 September 2019 Veton Këpuska 154 Impulse Response of IIR Filter

10 September 2019 Veton Këpuska 155 Export of Filter Coefficients

10 September 2019 Veton Këpuska 156 Floating Point (Double Precision) IIR Filter Coefficients: float64 #define MWSPT_NSEC 21 const int NL[MWSPT_NSEC] = { 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 }; const real64_T NUM[MWSPT_NSEC][3] = { { 0.7602090521033, 0, 0 }, { 1, -0.5118722830641, 1 }, { 0.7012817822195, 0, 0 }, { 1, -0.4649859321869, 1 }, { 0.6426098615717, 0, 0 }, { 1, -0.3671283220828, 1 }, { 0.5829322220034, 0, 0 },/* * Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool * Generated by MATLAB(R) 9.2 and the Signal Processing Toolbox 7.4. * Generated on: 05-Oct-2017 16:33:57 *//* * Discrete-Time IIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form II, Second-Order Sections * Number of Sections : 10 * Stable : Yes * Linear Phase : No *//* General type conversion for MATLAB generated C-code */#include "tmwtypes.h"/* * Expected path to tmwtypes.h * C:\Program Files\MATLAB\R2017a\extern\include\tmwtypes.h */

{ 1, -0.2100714675086, 1 }, { 0.5221912610589, 0, 0 }, { 1, 0.01812065472288, 1 }, { 0.4616829828366, 0, 0 }, { 1, 0.33052112153, 1 }, { 0.4042262779079, 0, 0 }, { 1, 0.7328559321778, 1 }, { 0.3541012215421, 0, 0 }, { 1, 1.203268897037, 1 }, { 0.3164715207174, 0, 0 }, { 1, 1.661136007666, 1 }, { 0.2961714354762, 0, 0 }, { 1, 1.958612552033, 1 }, { 1, 0, 0 }};10 September 2019Veton Këpuska157

const int DL[MWSPT_NSEC] = { 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 }; const real64_T DEN[MWSPT_NSEC][3] = { { 1, 0, 0 }, { 1, -0.7936506725907, 0.9249388336912 }, { 1, 0, 0 }, { 1, -0.7110079175494, 0.7874853187574 }, { 1, 0, 0 }, { 1, -0.6111238673374, 0.6604233102482 }, { 1, 0, 0 }, { 1, -0.4955540282244, 0.5389610448969 }, { 1, 0, 0 }, { 1, -0.3673665077585, 0.4212114774173 }, { 1, 0, 0 }, { 1, -0.2321414618874, 0.3081034048391 }, { 1, 0, 0 }, { 1, -0.09877103779267, 0.2034632193155 }, { 1, 0, 0 }, 10 September 2019Veton Këpuska 158

{ 1, 0.02048793793224, 0.1137934914362 }, { 1, 0, 0 }, { 1, 0.1113992783921, 0.04724600150727 }, { 1, 0, 0 }, { 1, 0.1608537839918, 0.01157417803795 }, { 1, 0, 0 } }; 10 September 2019Veton Këpuska159

10 September 2019 Veton Këpuska 160 Fixed Point Coefficients of IIR Low-pass Filter: Q.31 /* General type conversion for MATLAB generated C-code */ #include "tmwtypes.h" /* * Expected path to tmwtypes.h * C:\MATLAB6p5p1\extern\include\tmwtypes.h */ #define MWSPT_NSEC 11 const int NL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int32_T NUM[MWSPT_NSEC][3] = { { 8156376, 0, 0}, { 2147483647, 2147483647, 2147483647}, { 2147483647, 2147483647, 2147483647}, { 2147483647, 2147483647, 2147483647}, { 2147483647, 1955625778, 2147483647}, { 2147483647, 1147841473, 2147483647}, { 2147483647, 496727511, 2147483647}, { 2147483647, 7250145, 2147483647}, { 2147483647, -336703210, 2147483647}, { 2147483647, -553999449, 2147483647}, { 2147483647, -658938807, 2147483647}}; /* * Discrete-Time IIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form II, Second-Order Sections * Filter Order : 20 * Stable : Yes * Linear Phase : No */ const int DL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int32_T DEN[MWSPT_NSEC][3] = { { 2147483647, 0, 0}, { 2147483647, 1045146066, 140984708}, { 2147483647, 921586457, 217821385}, { 2147483647, 696437214, 360212748}, { 2147483647, 405260096, 550146428}, { 2147483647, 85955653, 769037951}, { 2147483647, -229535171, 1002388064}, { 2147483647, -518418894, 1241822623}, { 2147483647, -766268901, 1485201141}, { 2147483647, -964356214, 1736041397}, { 2147483647, -1106538428, 2003277384} };

10 September 2019 Veton Këpuska 161 Fixed Point Coefficients of IIR Low-pass Filter: Q.15 /* General type conversion for MATLAB generated C-code */ #include "tmwtypes.h" /* * Expected path to tmwtypes.h * C:\MATLAB6p5p1\extern\include\tmwtypes.h */ #define MWSPT_NSEC 11 const int NL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int16_T NUM[MWSPT_NSEC][3] = { { 124, 0, 0 }, { 32767, 32767, 32767 }, { 32767, 32767, 32767 }, { 32767, 32767, 32767 }, { 32767, 29840, 32767 }, { 32767, 17515, 32767 }, { 32767, 7579, 32767 }, { 32767, 111, 32767 }, { 32767, -5138, 32767 }, { 32767, -8453, 32767 }, { 32767, -10055, 32767 }}; /* * Discrete-Time IIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form II, Second-Order Sections * Filter Order : 2 0 * Stable : Yes * Linear Phase : No */ const int DL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int16_T DEN[MWSPT_NSEC][3] = { { 32767, 0, 0 }, { 32767, 15948, 2151 }, { 32767, 14062, 3324 }, { 32767, 10627, 5496 }, { 32767, 6184, 8395 }, { 32767, 1312, 11735 }, { 32767, -3502, 15295 }, { 32767, -7910, 18949 }, { 32767, -11692, 22662 }, { 32767, -14715, 26490 }, { 32767, -16884, 30568 } };

10 September 2019 Veton Këpuska 162 Fixed Point Coefficients of IIR Low-pass Filter: Q.7 /* General type conversion for MATLAB generated C-code */ #include "tmwtypes.h" /* * Expected path to tmwtypes.h * C:\MATLAB6p5p1\extern\include\tmwtypes.h */ #define MWSPT_NSEC 11 const int NL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int8_T NUM[MWSPT_NSEC][3] = { { 0, 0, 0 }, { 127, 127, 127 }, { 127, 127, 127 }, { 127, 127, 127 }, { 127, 117, 127 }, { 127, 68, 127 }, { 127, 30, 127 }, { 127, 0, 127 }, { 127, -20, 127 }, { 127, -33, 127 }, { 127, -39, 127 }}; /* * Discrete-Time IIR Filter (real) * ------------------------------- * Filter Structure : Direct-Form II, Second-Order Sections * Filter Order : 20 * Stable : Yes * Linear Phase : No */ const int DL[MWSPT_NSEC] = { 1,3,3,3,3,3,3,3,3,3,3 }; const int8_T DEN[MWSPT_NSEC][3] = { { 127, 0, 0 }, { 127, 62, 8 }, { 127, 55, 13 }, { 127, 42, 21 }, { 127, 24, 33 }, { 127, 5, 46 }, { 127, -14, 60 }, { 127, -31, 74 }, { 127, -46, 89 }, { 127, -57, 103 }, { 127, -66, 119 } };

Analysis of Quantization Error with MATLAB (Q.16) 10 September 2019 Veton Këpuska 163

10 September 2019 Veton Këpuska 164 Analysis of Quantization Error with MATLAB (Q.8)

End 10 September 2019 Veton Këpuska 165

10 September 2019 Veton Këpuska 166