DSP NOTES PREPARED

BY

Ch.Ganapathy Reddy Professor & HOD, ECE Shaikpet, Hyderabad-08

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 1

DIGITAL  A signal is defined as any physical quantity that varies with time, space or another independent variable.  A system is defined as a physical device that performs an operation on a signal.  System is characterized by the type of operation that performs on the signal. Such operations are referred to as signal processing. Advantages of DSP 1. A digital programmable system allows flexibility in reconfiguring the digital signal processing operations by changing the program. In analog redesign of hardware is required. 2. In digital accuracy depends on word length, floating Vs fixed point arithmetic etc. In analog depends on components. 3. Can be stored on disk. 4. It is very difficult to perform precise mathematical operations on signals in analog form but these operations can be routinely implemented on a digital computer using software. 5. Cheaper to implement. 6. Small size. 7. Several filters need several boards in analog, whereas in digital same DSP processor is used for many filters. Disadvantages of DSP 1. When analog signal is changing very fast, it is difficult to convert digital form .(beyond 100KHz range) 2. w=1/2 Sampling rate. 3. Finite word length problems. 4. When the signal is weak, within a few tenths of millivolts, we cannot amplify the signal after it is digitized. 5. DSP hardware is more expensive than general purpose microprocessors & micro controllers.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 2

6. Dedicated DSP can do better than general purpose DSP. Applications of DSP 1. Filtering. 2. Speech synthesis in which white noise (all frequency components present to the same level) is filtered on a selective frequency basis in order to get an audio signal. 3. Speech compression and expansion for use in radio voice communication. 4. Speech recognition. 5. Signal analysis. 6. Image processing: filtering, edge effects, enhancement. 7. PCM used in telephone communication. 8. High speed MODEM data communication using pulse modulation systems such as FSK, QAM etc. MODEM transmits high speed (1200-19200 bits per second) over a band limited (3-4 KHz) analog telephone wire line. 9. Wave form generation. Classification of Signals I. Based on Variables: 1. f(t)=5t : single variable 2. f(x,y)=2x+3y : two variables

3. S1= A Sin(wt) : real valued signal jwt 4. S2 = A e : A Cos(wt)+j A Sin(wt) : Complex valued signal

S1(t)    5. S4(t)= S2(t) : Multichannel signal S3(t) Ex: due to earth quake, ground acceleration recorder

Ir(x, y,t)    6. I(x,y,t)= Ig(x, y,t) multidimensional Ib(x, y,t) II. Based on Representation:

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 3

III. Based on duration. 1. right sided: x(n)=0 for nN 3. causal : x(n)=0 for n<0 4. Anti causal : x(n)=0 for n  0 5. Non causal : x(n)=0 for n >N

IV. Based on the Shape. 1.  (n)=0 n  0 =1 n=0

2. u (n) =1 n 0 =0 n<0

Arbitrary sequence can be represented as a sum of scaled, delayed impulses.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 4

P (n) = a-3 (n+3) +a1 (u-1) +a2 (u-2) +a7 (u-7) Or

 x(n) =  x(k) (n  k) k

n u(n) =   (k) = (n) + (n-1)+ (n-2)….. k

 =   (n  k) k0 3.Discrete pulse signals. Rect (n/2N) =1 n  N = 0 else where. 5.Tri (n/N) = 1- n /N N = 0 else where.

1. Sinc (n/N)= Sa(n  /N) = Sin(n /N) / (n /N), Sinc(0)=1 Sinc (n/N) =0 at n=kN, k=  1, 2… Sinc (n) = (n) for N=1; (Sin (n ) / n =1= (n)) 6.Exponential Sequence x (n) = A  n If A & are real numbers, then the sequence is real. If 0< <1 and A is +ve, then sequence values are +ve and decreases with increasing n. For -1< <0, the sequence values alternate in sign but again decreases in magnitude with increasing n. If  >1, then the sequences grows in magnitude as n increases. 7.Sinusoidal Sequence

x(n) = A Cos(won+ ) for all n

8.Complex exponential sequence Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 5

jwo If  =  e

j A = A e

j n jwon x(n) = e  e

n n = Cos(won+ ) + j Sin(won+ ) If >1, the sequence oscillates with exponentially growing envelope. If <1, the sequence oscillates with exponentially decreasing envelope. So when discussing complex exponential signals of the form x(n)= A ejwon or real

sinusoidal signals of the form x(n)= A Cos(won+ ) , we need only consider frequencies

in a frequency internal of length 2  such as < Wo < or 0  Wo<2 . V. Deterministic (x (t) = t x (t) = A Sin(wt)) & Non-deterministic Signals. (Ex: Thermal noise.) VI. Periodic & non periodic based on repetition. VII. Power & Energy Signals Energy signal: E = finite, P=0  Signal with finite energy is called energy signal.  Energy signal have zero signal power, since averaging finite energy over infinite time. All time limited signals of finite amplitude are energy signals. Ex: one sided or two sided decaying. Damped exponentials, damped sinusoidal.

 x(t) is an energy signal if it is finite valued and x2 (t) decays to zero fasten than 1 t

as t   . Power signal: E =  , P  0, P Ex: All periodic waveforms Neither energy nor power: E= , P=0 Ex: 1/ t t 1 E= , P= , Ex: tn VIII. Based on Symmetry

1. Even x(n)=xe(n)+xo(n)

2. Odd x(-n)=xe(-n)+xo(-n)

3. Hidden x(-n)=xe(n)-xo(n) 1 4. Half-wave symmetry. xe(n)= [x(n)+x(-n)] 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 6

1 xo(n)= [x(n)-x(-n)] 2 Signal Classification by duration & Area. a. Finite duration: time limited.

b. Semi-infinite extent: right sided, if they are zero for t < where = finite

c. Left sided: zero for t >

Piecewise continuous: possess different expressions over different intervals. Continuous: defined by single expressions for all time. x(t) = sin(t)

Periodic: xp (t) = xp (t  nT)

1 T For periodic signals P =  x(t) 2 dt T 0

X rms = P For non periodic

1 T P = Lt  x(t) 2 dt To 0

To Xavg = Lt  x(t)dt 0

2 x(t) = A cos( 2  fo t + ) P=0.5 A x(t) = A e j( 2 fo t + ) P=A2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 7

1 1 E= A2 b E = A2 b E = A2 b 2 3 Q.

 1  e - t dt = 0 

Q.

1 1 Ex = A2 0.5T + (-A)2 0.5T = 0.5 A2 T 2 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 8

Px = 0.5 A2 Q.

1 1 Ey = [ A2 0.5T] 2 = A2 T 3 3

Py = A2

 x(t) = A ejwt is periodic

1 T Px =  x(t) 2 dt = A2 T 0  x(2t -6 ): compressed by 2 and shifted right by 3 OR shifted by 6 and compressed by 2.  x(1-t): fold x(t) & shift right by 1 OR shift right and fold.  x(0.5t +0.5) Advance by 0.5 & stretched by 2 OR stretched by 2 & advance by 1.

(t  2)  t 2 y (t) = 2 x [- ] = 2 x[  ] 2 x( t +  ) ; 5 +  =-1; - + =1 => = -1/3 3 3 3 ; = 2/3 Area of symmetric signals over symmetric limits (- , )

 Odd symmetry:  x0 (t) dt =0 

  Even symmetry:  xe (t) dt = 2  xe (t) dt  0 Xe (t) +Ye (t): even symmetry. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 9

Xe (t) Ye (t): even symmetry. Xo (t) +Yo (t): odd symmetry. Xo (t) Xo (t): even symmetry. Xe (t) +Yo (t): no symmetry. Xe (t) Yo (t): odd symmetry. 1 Xe(n)= [x(n)+x(-n)] 2 1 Xo (n) = [x (n)-x (-n)] 2  Area of half-wave symmetry signal always zero.  Half wave symmetry applicable only for periodic signal.

 F0 = GCD ( f1,f2)

T = LCM (T1, T2)

 Y(t) = x1(t) + x2(t)

Py= Px1+Px2 Y(t)rms = Py  U(0) = 0.5 is called as Heaviside unit step.  X(t) = Sin(t) Sin(  t) = 0.5 cos (1- )t – 0.5 cos (1+ ) t

W1=1-

W2=1+ almost periodic OR non periodic. 2 2 Px = 0.5[0.5 +0.5 ] =0.25 W

Area of any sinc or Sinc 2 equals area of triangle ABC inscribed within the main lobe.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 10

Even though the sinc function is square integrable ( an energy signal) , it is not

absolutely integrable( because it does not decay to zero faster than 1 ) t

 (t) = 0 t  0

 =  t=0  ( )d = 1  An impulse is a tall narrow spike with finite area and infinite energy. The area of impulse A (t) equals A and is called its strength. How ever its hight at t=0 is  .

= 2 (t) – 2e-t u(t) 2 e-t (t) = 2 (t) 1 [ [t-  ]] =  (t   ) 

2 2 I 2 =  cos(2t) (2t 1)dt = cos(2t)0.5 (t  0.5)dt = 0.5 cos(2  t) at t=-0.5 = -0.5 4 4

  x1(t) = x(t)  (t-kts ) =  x(kts) (t-kts) k  k 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 11

x1(t) is not periodic. The doublet

 ’(t) =0 t  0

 = undefined t=0  '(t)dt  0 ’ (-t) = - ’ (t) then Odd function.  1 [ [t-  ]] =  (t   )  Differentiating on both sides 1 ’ [ [t- ]] =  '(t   )   With =-1 ’ (-t) = - ’ (t) d [x(t) (t )]= x’ (t) (t- ) + x (t) ’ (t- ) dt = x’ ( ) (t- ) + x (t) ’ (t- )------1 Or d = [x() (t )] = x ( ) ’ (t- ) ------2 dt 1 = 2 x’ ( ) (t- ) + x (t) ’ (t- ) = x ( ) ’ (t- )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 12

 x (t) ’ (t- ) = x ( ) ’ (t- ) - x’ ( ) (t- )

   x (t) ’ (t- ) dt =  x ( ) ’ (t- ) dt - x’ ( ) (t- ) dt   = 0- x’ ( ) = - x’ ( ) Higher derivatives of (t) obey n(t) = (-1)n n(t) are alternately odd and even, and possess zero area. All are eliminating forms of the same sequence that generate impulses, provided their ordinary derivatives exits. None are absolutely integrable. The impulse is unique in being the only absolutely integrable function from among all its derivatives and integrals (step, ramp etc) What does the signal x(t) = e-t ’(t) describe? x(t) = ’ (t) – (-1) (t) = ’ (t) + (t)

2 I = [(t  3) (2t  2)]  8cos(t) '(t  0.5)]dt 2 d = 0.5 (t-3) t  1 - 8 [cost]t  0.5 dt = 23.1327 Answer. Operation on Signals: 1. Shifting. x(n)  shift right or delay = x(n-m) x(n)  shift left or advance = x(n+m) 2. Time reversal or fold. x(-n+2) is x(-n) delayed by two samples. x(-n-2) is x(-n) advanced by two samples. Or x(n) is right shift x(n-2), then fold x(-n-2) x(n) fold x(-n) shift left x(-(n+2)) = x(-n-2) Ex: x(n) = 2, 3 , 4 , 5, 6, 7 .  Find 1. y(n)=x(n-3) 2. x(n+2) 3. x(-n) 4. x(-n+1) 5. x(-n-2) 1. y(n)= x(n-3) = { 0 ,2,3,4,5,6,7} shift x(n) right 3 units.  Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 13

2. x(n+2) = { 2,3,4,5, 6 ,7} shift x(n) left 2 units.  3. x(-n) = { 7,6,5, 4 ,3,2} fold x(n) about n=0.  4. x(-n+1) = { 7,6,5 ,4,3,2} fold x(n), delay by 1.  5. x(-n-2) = { 7,6,5,4,3,2} fold x(n), advanced by 2. 3. a. Decimation. Suppose x(n) corresponds to an analog signal x(t) sampled at intervals Ts. The signal y(n) = x(2n) then corresponds to the compressed signal x(2t) sampled at Ts and contains only alternate samples of x(n)( corresponding to x(0), x(2), x(4)…). We can also obtain directly from x(t) (not in compressed version). If we sample it at intervals 2Ts (or at a 1 sampling rate Fs = ). This means a two fold reduction in the sampling rate. 2Ts Decimation by a factor N is equivalent to sampling x(t) at intervals NTs and implies an N-fold reduction in the sampling rate. b. Interpolation. y(n) = x(n/2) corresponds to x(t) sampled at Ts/2 and has twice the length of x(n) with one new sample between adjacent samples of x(n). The new sample value as ‘0’ for Zero interpolation. The new sample constant = previous value for step interpolation. The new sample average of adjacent samples for linear interpolation. Interpolation by a factor of N is equivalent to sampling x(t) at intervals Ts/N and implies an N-fold increase in both the sampling rate and the signal length.

Ex: Decimation Step interpolation {1 , 2, 6, 4, 8}  {1 , 6, 8} { , 1, 6, 6, 8, 8}   n 2n n n/2

Step interpolation Decimation

{ , 2, 6, 4, 8} { , 1,2,2,6, 6,4,4,8, 8} { , 2, 6, 4, 8} n n/2 n 2n Since Decimation is indeed the inverse of interpolation, but the converse is not necessarily true. First Interpolation & Decimation. Ex: x(n) = { 1, 2, 5, -1} Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 14

x(n/3) = { 1,0,0, 2 2,0,0,5,0,0,-1,0,0} Zero interpolation.  = { 1,1,1, 2 ,2,2,5,5,5,-1,-1,-1} Step interpolation.  4 5 2 1 = { 1, , , , 3,4,5,3,1,-1, - ,- } Linear interpolation. 3 3 3 3 4. Fractional Delays. M (Nn  M ) It requires interpolation (N), shift (M) and Decimation (n): x (n - ) = x ( ) N N 2n 1 x(n) = {2, 4, 6 , 8}, find y(n)=x(n-0.5) = x ( )  2 g(n) = x (n/2) = {2, 2, 4, 4, 6 , 6, 8,8} for step interpolation.  n 1 h(n) =g(n-1) = x( ) = {2, 2, 4, 4 , 6, 6,8,8} 2  2n 1 y(n) = h(2n) = x(n-0.5) = x( ) = {2, , 6, 8} 2 OR g(n) = x(n/2) = {2,3,4,5, ,7,8,4} linear interpolation.

h(n) = g(n-1) = {2,3,4, 5 , 6, 7,8,4}  g (n) = h(2n)={3,5,7,4} Classification of Systems 1. a. Static systems or memory less system. (Non Linear / Stable) Ex. y(n) = a x (n) = n x(n) + b x3(n) = [x(n)]2 = a(n-1) x(n) y(n) =  [x(n), n] If its o/p at every value of ‘n’ depends only on the input x(n) at the same value of ‘n’ Do not include delay elements. Similarly to combinational circuits. b. Dynamic systems or memory. If its o/p at every value of ‘n’ depends on the o/p till (n-1) and i/p at the same value of ‘n’ or previous value of ‘n’. Ex. y(n) = x(n) + 3 x(n-1)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 15

= 2 x(n) - 10 x(n-2) + 15 y(n-1) Similar to sequential circuit. 2. Ideal delay system. (Stable, linear, memory less if nd=0) Ex. y (n) = x(n-nd) nd is fixed = +ve integer. 3. Moving average system. (LTIV ,Stable)

m2 y(n) = 1/ (m1+m2+1)  x(n  k) km1 th This system computes the n sample of the o/p sequence as the average of (m1+m2+1) samples of input sequence around the nth sample.

If M1=0; M2=5

5 y(7) = 1/6 [  x(7  k) ] k0 = 1/6 [x(7) + x(6) + x(5) + x(4) + x(3) + x(2)] y(8) = 1/6 [x(8) + x(7) + x(6) + x(5) + x(4) + x(3)] So to compute y (8), both dotted lines would move one sample to right. 4. Accumulator. ( Linear , Unstable )

n y(n) =  x(k) k 

n1 =  x(k) + x(n) k  = y(n-1) + x(n)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 16

x(n) = { …0,3,2,1,0,1,2,3,0,….} y(n) = { …0,3,5,6,6,7,9,12,12…} O/p at the nth sample depends on the i/p’s till nth sample Ex: x(n) = n u(n) ; given y(-1)=0. i.e. initially relaxed.

1 n y(n) =  x(k)+ x(k) k  k0

n n n(n 1) = y(-1) +  x(k) = 0 +  n = k0 k 0 2 5. Linear Systems.

If y1(n) & y2(n) are the responses of a system when x1(n) & x2(n) are the respective inputs, then the system is linear if and only if [x1(n) x2(n)] = [x1(n)] + [x2(n)]

= y1(n) + y2(n) (Additive property) [ax(n)] = a [x(n)] = a y(n) (Scaling or Homogeneity) The two properties can be combined into principle of superposition stated as [ax1(n) bx2(n)] = a + b Otherwise non linear system. 6. Time invariant system. Is one for which a time shift or delay of input sequence causes a corresponding shift in the o/p sequence. y(n-k) = [x(n  k)] TIV

 TV 7. Causality.

A system is causal if for every choice of no the o/p sequence value at index n= no depends only on the input sequence values for n  no. y(n) = x(n) + x(n-1) causal. y(n) = x(n) + x(n+2) + x(n-4) non causal. 8. Stability.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 17

For every bounded input x(n)  Bx <  for all n, there exists a fixed +ve finite value

By such that y(n) By <  . PROPERTIES OF LTI SYSTEM.

 1. x(n) =  x(k) (n  k) k

 y(n) =  [  x(k) (n  k) ] for linear k

  x(k) [ (n-k)] for time invariant k 

  x(k)h(n  k) = x(n) * h(n) k Therefore o/p of any LTI system is convolution of i/p and impulse response.

 y(no) = h(k)x(no  k) k

1  = h(k)x(no  k) +h(k)x(no  k) k k0

= h(-1) x(n0+1) + h(-2) x(n0+2)……….+h(0) x(n0) + h(1) x(n0-1) + …. y(n) is causal sequence if h(n) =0 n<0 y(n) is anti causal sequence if h(n) =0 n  0 y(n) is non causal sequence if h(n) =0 |n|>N

 Therefore causal system y(n) = h(k)x(n  k) k0

n If i/p is also causal y(n) = h(k)x(n  k) k0 2. Convolution operation is commutative.

x(n) * h(n) = h(n) * x(n) 3. Convolution operation is distributive over additive.

x(n) * [h1(n) + h2(n)] = x(n) * h1(n) + x(n) * h2(n) 4. Convolution property is associative.

x(n) * h1(n) * h2(n) = [x(n) * h1(n)] * h2(n)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 18

5 y(n) = h2 * w(n) = h2(n)*h1(n)*x(n) = h3(n)*x(n)

6

h (n) = h1(n) + h2(n) 7 LTI systems are stable if and only if impulse response is absolutely summable.

  y(n) = h(k)x(n  k)   h(k) x(n  k) k k 

Since x (n) is bounded x(n) bx<

 y(n) Bx

S= is necessary & sufficient condition for stability.

8  (n) * x(n) = x(n) 9 Convolution yields the zero state response of an LTI system. 10 The response of LTI system to periodic signals is also periodic with identical period.

y(n) = h (n) * x(n)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 19

 = h(k)x(n  k) k

 y (n+N) = h(k)x(n  k  N) k put n-k = m

 = h(n  m)x(m  N) m

 = h(n  m)x(m) m m=k

 = h(n  k)x(k) = y(n) (Ans) k Q. y (n)-0.4 y(n-1) =x (n). Find causal impulse response? h(n)=0 n<0. h(n) = 0.4 h(n-1) +  (n)

h(0) = 0.4 h(-1) +  (0) =1 h(1) = 0.4 h(0) = 0.4 h(2) = 0.42 h(n) = 0.4n for n  0 Q. y(n)-0.4 y(n-1) = x(n). find the anti-causal impulse response? h(n)=0 for n 0 h(n-1) = 2.5 [h(n)- ]

h(-1) = 2.5 [h(0)-  (0) ] = -2.5

h(-2) = -2.52 . …….. h(n) = -2.5n valid for n  -1 Q. x(n)={1,2,3} y(n)={3,4} Obtain difference equation from i/p & o/p information y(n) + 2 y(n-1) + 3 y(n-2) = 3 x(n) + 4 x(n-1) (Ans) Q. x(n) = {4,4,}, y(n)= x(n)- 0.5x(n-1). Find the difference equation of the inverse system. Sketch the realization of each system and find the output of each system. Solution: The original system is y(n)=x(n)-0.5 x(n-1) The inverse system is x(n)= y(n)-0.5 y(n-1) y (n) = x (n) – 0.5 x(n-1) Y (z) = X (z) [1-0.5Z-1] Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 20

Y (z) -1 =1-0.5 Z System X (z)

Inverse System y (n) – 0.5 y(n-1) =x(n) Y (z) [1-0.5 Z-1] = X (z) Y(z)  [1-0.5 Z-1] -1 X (z)

g (n) = 4  (n) - 2 (n-1) + 4 (n-1) - 2 (n-2) = 4 (n) + 2 (n-1) - 2 (n-2) y (n) = 0.5 y(n-1) + 4 (n) + 2 (n-1) – 2 (n-2) y (0) = 0.5y(-1) + 4 (0) = 4 y(1) = 4 y(2) = 0.5 y(1) - 2 (0) = 0 y(n) = {4, 4} same as i/p. Non Recursive filters Recursive filters

 N N y(n) =  ak x(n-k) y(n) =  ak x(n-k) –  bk y(n-k) k  k 0 k 1 for causal system Present response is a function of the  present and past N values of the =  ak x(n-k) k 0 excitation as well as the past N values For causal i/p sequence of response. It gives IIR o/p but not

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 21

N always. y(n) =  ak x(n-k) k 0 y(n) – y(n-1) = x(n) – x(n-3) Present response depends only on present i/p & previous i/ps but not future i/ps. It gives FIR o/p. 1 Q. y(n) = [x (n+1) + x (n) + x (n-1)] Find the given system is stable or not? 3 Let x(n) =  (n)

h(n) = [ (n+1) + (n) + (n-1)]

h(0) =

h(-1) =

h(1) =

S=h(n) <  therefore Stable.

Q. y(n) = a y(n-1) + x(n) given y(-1) = 0 Let x(n) =  (n) h(n) = y(n) = a y(n-1) + (n) h(0) = a y(-1) + (0) = 1 = y(0) h(1) = a y(0) + (1) = a h(2) = a y(1) + (2) = a2 ...... h(n) = an u(n) stable if a<1. 1 y(n-1) = [ y(n) – x(n)] a 1 y(n) = [ y(n+1) – x(n+1)] a

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 22

1 y(-1) = [ y(0) – x(0)]=0 a y(-2) = 0 1 Q. y(n) = y(n-1) + x(n) for n  0 n 1 = 0 otherwise. Find whether given system is time variant or not? Let x(n) =  (n) h (0) = 1 y(-1) + (0) = 1 h(1) = ½ y(0) + (1) = ½ h(2) = 1/6 h(3) = 1/24 if x(n) = (n-1) y(n) = h(n-1) 1 h(n-1) = y(n) = h(n-2) + (n-1) n 1 n=0 h(-1) = y(0) = 1 x 0+0 =0 n=1 h(0) = y(1) = ½ x 0 + (0)= 1 n=2 h(1) = y(2) = 1/3 x 1 + 0 = 1/3 h(2) = 1/12 h (n, 0)  h(n,1) TV Q. y (n) = 2n x(n) Time varying 1 Q. y (n) = [x (n+1) + x (n) + x (n-1)] Linear 3 Q. y (n) = 12 x (n-1) + 11 x(n-2) TIV Q. y (n) = 7 x2(n-1) non linear Q. y (n) = x2(n) non linear Q. y (n) = n2 x (n+2) linear Q. y (n) = x (n2) linear Q. y (n) = ex(n) non linear Q. y (n) = 2x(n) x (n) non linear, TIV

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 23

(If the roots of characteristics equation are a magnitude less than unity. It is a necessary & sufficient condition) Non recursive system, or FIR filter are always stable. Q. y (n) + 2 y2(n) = 2 x(n) – x(n-1) non linear, TIV Q. y (n) - 2 y (n-1) = 2x(n) x (n) non linear, TIV Q. y (n) + 4 y (n) y (2n) = x (n) non linear, TIV Q. y (n+1) – y (n) = x (n+1) is causal Q. y (n) - 2 y (n-2) = x (n) causal Q. y (n) - 2 y (n-2) = x (n+1) non causal Q. y (n+1) – y (n) = x (n+2) non causal Q. y (n-2) = 3 x (n-2) is static or Instantaneous. Q. y (n) = 3 x (n-2) dynamic Q. y (n+4) + y (n+3) = x (n+2) causal & dynamic Q. y (n) = 2 x (n )

If  =1 causal, static <1 causal, dynamic >1 non causal, dynamic  1 TV Q. y (n) = 2(n+1) x (n) is causal & static but TV. Q. y (n) = x (-n) TV Solution of linear constant-co-efficient difference equation Q. y(n)-3 y (n-1) – 4 y(n-2) = 0 determine zero-input response of the system; Given y(-2) =0 & y(-1) =5 Let solution to the homogeneous equation be n yh (n) =   n - 3 n-1 - 4 n-2 =0 n-2[ 2 - 3 - 4] =0 = -1, 4 n n n n yh (n) = C1 1 + C2 2 = C1(-1) + C2 4 y(0) = 3y(-1) +4 y(-2) = 15 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 24

 C1+ C2 =15 y (1) = 3y (0) +4 y (-1) = 65

 -C1+4C2 = 65 Solve: C1 = -1 & C2=16 y(n) = (-1)n+1 + 4n+2 (Ans) n n 2 n If it contain multiple roots yh(n) = C1  1 + C2 n 1 + C3 n 1 n 2 or 1 [C1+ nC2 + n C3….]

Q. Determine the particular solution of y(n) + a1y(n-1) =x(n) x(n) = u(n)

Let yp (n) = k u(n)

k u(n) + a1 k u(n-1) =u(n) To determine the value of k, we must evaluate this equation for any n  1

k + a1 k =1 1 k = 1 a1 1 yp (n) = u(n) Ans 1 a1

x(n) yp(n) 1. A K 2. Amn Kmn m m m-1 3. An Ko n + K1n + …. Km

4. A Coswon or A Sinwon K1 Coswon + K2 Sinwon 5 1 Q. y(n) = y(n-1) - y(n-2) + x(n) x(n) = 2n n 0 6 6 n Let yp (n) = K2

K2n u(n) = K 2n-1 u(n-1) - K 2n-2 u(n-2) + 2n u(n)

For n 2

4K = (2K) - K +4 Solve for K=8/5

8 n  yp (n) = 2 Ans 5 Q. y(n) – 3 y(n-1) - 4 y(n-2) = x(n) + 2x(n-1) Find the h(n) for recursive system. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 25

n n We know that yh (n) = C1 (-1) + C2 4

yp (n) =0 when x(n) =  (n) for n=0 y(0) - 3y(-1) - 4 y(-2) =  (0) + 2 (-1) y(0) =1 y(1) = 3 y(0) +2 = 5

C1 + C2 =1 1 6 -C1 + C2 =5 Solving C1 =  ; C2 = 5 5 1 6 h(n) = [  (-1)n + 4n ] u(n) Ans 5 5 OR h(n) – 3 h(n-1) -4 h(n-2) = (n) + 2 (n-1) h(0) = 1 h(1) =3 h(0) + 2 = 5 plot for h(n) in both the methods are same. Q. y(n) – 0.5 y(n-1) = 5 cos 0.5n  n  0 with y(-1) = 4 n yh(n) =  n – 0.5 n-1 =0 n-1 [ -0.5] =0 =0.5 n yh(n) = C (0.5)

yp(n) = K1 cos 0.5n + K2 sin 0.5n

yp(n-1) = K1 cos 0.5(n-1) + K2 sin 0.5(n-1)

= - K1 sin 0.5n - K2cos 0.5n

yp(n) - 0.5 yp(n-1) = 5 cos 0.5 n

= (K1 + 0.5 K2) cos 0.5 n -(0.5 K1 – K2) sin 0.5n

K1 + 0.5 K2 = 5

0.5 K1 – K2 =0 Solving we get: K1= 4 & K2=2

yp(n) = 4 cos 0.5 n + 2 sin 0.5n

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 26

The final response y (n) = C (0.5)n + 4 cos 0.5 n  + 2 sin 0.5n with y(-1) = 4 4 = 2C-2 i.e. C=3  y (n) = 3 (0.5)n + 4 cos 0.5 n + 2 sin 0.5n for n  0 Concept of frequency in continuous-time and discrete-time.

1) xa (t) = A Cos ( t) x (nTs) = A Cos ( nTs) = A Cos (wn) w = Ts

= rad / sec w = rad / Sample F = cycles / sec f = cycles / Sample 2) A Discrete- time – sinusoid is periodic only of its f is a Rational number. x (n+N) = x (n)

Cos 2 f0 (n+N) = Cos 2 f0 n K 2 f0N = 2 K => f0 = N  Ex: A Cos ( ) n 6  w = = 2 f 6 1 f = N=12 Samples/Cycle ; Fs= Sampling Frequency; Ts = 12 Sampling Period Q. Cos (0.5n) is not periodic

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 27

Q. x (n) = 5 Sin (2n) 1 2 f = 2 => f = Non-periodic  Q. x (n) = 5 Cos (6 n) 2 f = 6 => f = 3 N=1 for K=3 Periodic 6n Q. x (n) = 5 Cos 35 6 3 2 f = => f = for N=35 & K=3 Periodic 35 35 Q. x (n) = Sin (0.01 n) 0.01 2 f = 0.01 => f = for N=200 & K=1 Periodic 2 Q. x (n) = Cos (3 n) for N=2 Periodic

fo = GCD (f1, f2) & T = LCM (T1, T2) ------For Analog/digital signal

[Complex exponential and sinusoidal sequences are not necessarily periodic in ‘n’ 2 with period ( ) and depending on Wo, may not be periodic at all] Wo N = fundamental period of a periodic sinusoidal. 3. The highest rate of oscillations in a discrete time sinusoid is obtained when w =  or -

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 28

Discrete-time sinusoidal signals with frequencies that are separated by an integral multiple of 2 are Identical. Fs Fs 4. -  F  2 2 - Fs 2 F Fs   -  Ts Ts - Ts Therefore - w 5. Increasing the frequency of a discrete- time sinusoid does not necessarily decrease the period of the signal. n x1(n) = Cos ( ) N=8 4 3n x2(n) = Cos ( ) N=16 3/8 > 1/4 8 2  f = 3 /8 3 => f = 16 1 6. If analog signal frequency = F = samples/Sec = Hz then digital frequency f = 1 Ts

W = Ts

2 f = 2 F Ts => f =1

 2 F = 4 ; 2 f = /4

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 29

1 F = ; T = 8 ; f = N=8 8 7. Discrete-time sinusoids are always periodic in frequency.

Q. The signal x (t) = 2 Cos (40 t) + Sin (60 t) is sampled at 75Hz. What is the common period of the sampled signal x (n), and how many full periods of x (t) does it take to obtain one period of x(n)?

F1 = 20Hz F2 = 30Hz 20 4 K1 30 2 K2 f1 =   f2 =   75 15 N1 75 5 N2

The common period is thus N=LCM (N1, N2) = LCM (15, 5) = 15

The fundamental frequency Fo of x (t) is GCD (20, 30) = 10Hz 1 And fundamental period T =  0.1s Fo Since N=15 1 1sample ------sec 75 15 15 sample ------? =>  0.2S 75

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 30

So it takes two full periods of x (t) to obtain one period of x (n) or GCD (K1, K2) = GCD (4, 2) = 2 Frequency Domain Representation of discrete-time signals and systems For LTI systems we know that a representation of the input sequence as a weighted sum of delayed impulses leads to a representation of the output as a weighted sum of delayed responses. Let x (n) = ejwn

y (n) = h (n) * x (n)

  = h(k)x(n  k)  h(k) ejw (n-k) k k

 = ejwn h(k) e-jwk k 

Let H (ejw) = e-jwk is the frequency domain representation of the system.

y (n) = H (ejw) ejwn ejwn = eigen function of the system. H (ejw) = eigen value Q. Find the frequency response of 1st order system y (n) = x (n) + a y (n-1) (a<1) Let x (n) = ejwn jwn yp (n) = C e C ejwn = ejwn + a C ejw (n-1) C ejwn [1-ae-jw] = ejwn 1 C = [1 ae  jw ] 1 1 Therefore H (ejw) = = [1 ae  jw ] 1 a(cos w  j sin w) 1 H(e jw ) = 1 2a cos w  a 2

jw 1 aSinw H(e )  Tan ( ) 1 aCosw Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 31

1 Q. Frequency response of 2nd order system y(n) = x(n) - y(n  2) 2 x (n) = e jwn

(n)  ce jwn y p

1 c = - ce jw(n2) 2 1 1 2 jw 20 16Cos2w c (1+ e ) = c = c  2 1 2 jw 1 e 5  4Cos2w 2

1 Sin2w  c  tan   2  Cos2w  

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 32

UNIT - II

Continuous Time  ot = onTs = won Discrete Time

Periodic f (t) = 2 N 1 jK n N  ck e jkot Periodic xp(n) =  c e k 0  k k  DTFS Non periodic Periodic Ck = T 1 2 f (t)e jKotdt 1 N 1  j nK Ck = T  x (n)e N 0  p N n0 2nTs 1  jK k=0 to N-1 x(n)e T NTs 

T = N Ts

t = n Ts : dt = Ts Non-Periodic f(t) = Non – Periodic x(n) =

 2 1 jt 1 jwn  F(w)e d  X (w)e dw 2  2 0  x(n)e jwn Non-Periodic F(w) = Periodic X(w) =  n  X(w) = FT of DTS f (t)e jt dt  

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 33

Energy and Power

2    1 2 x(n)  x(n)x* (n) x(n) X * (w)e jwndw E =   =   n n n 2 0

2  1 *   jwn  =  X (w)  x(n)e dw 2 0 n 

2 1 * =  X (w)X (w)dw 2 0

2 1  =  X (w) dw 2 

2  2 1  x(n)  X (w) dw Therefore: E =   ------Parsval’s Theorem n 2  1 N 2 Lt x(n) P = N   for non periodic signal 2N 1 nN 1 N 1 2 =  x(n) for periodic Signal N n0

2 1 N 1 1 N 1 N 1  j nk x(n)x* (n)  x(n) C *e N =    k N n0 N n0 k0

2 N 1  1 N 1  j nk  C * x(n)e N =  k    k0  N n0 

N 1 2 N 1 2 Therefore P =  Ck E = N  Ck k0 k0 Ex: Unit step

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 34

N 1 2 P = Lt u (n) N  2N 1 n0 N 1 1 = Lt  Power Signal N 2N 1 2

E =  jwon Ex: x (n) = Ae 1 N 2 Ae jwon P = Lt  N  2N 1 nN

1 2 = Lt A [11 ...... ] N 2N 1 A2 (2N 1)  A2 = Lt it is Power Signal and E = N 2N 1 Ex: x (n) = n u(n) neither energy nor power signal Ex: x (n) = 3 (0.5)n n  0

  2 n 9  x (n)  9(0.25)   12J n 1 E =   note: [  ] n n0 1 0.25 n0 1 2n Ex: x (n) = 6 Cos whose period is N=4 x (n) = {6,0,6,0 } 4  1 3 1 x 2 (n)  [36  36]  18W P =  4 n0 4

2n j Ex: x (n) = 6 e 4 whose period is N = 4 1 3 2 1 x(n)  [36  36  36  36]  36Watts P =  4 n0 4

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 35

DISCRETE CONVOLUTION

 It is a method of finding zero input response of linear Time Invariant system. Ex: x(n) = u(n) h(n) = u(n)

 u(k)u(n  k) y(n) =  k u(k) = 0 k<0 u(n-k) = 0 k>n

n u(k)u(n  k) n  = 1 = (n+1) u(n) = r(n+1) k0 k 0 Q. x(n) = an u(n) and h(n) = an u(n) a<1 find y(n)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 36

n y(n) =  ak an-k = an (n+1) u(n) k 0 n Q. x(n) = u(n) and h(n) =  u(n)  <1 find y(n)

 n k k n+1 y(n) =   u(k) u(n-k) =  = (1- ) / (1- ) k  k 0 The convolution of the left sided signals is also left sided and the convolution of two right sided also right sided. n Q. x(n) = rect ( ) = 1 n  N 2N = 0 else where

h(n) = rect ( n ) 2N

y(n) = x(n) * h(n)

= [u (n+N) – u (n-N-1)] * [u (n+N) – u (n-N-1)]

= u (n+N) * [u (n+N) – u (n-N-1)] – u (n-N-1)* [u (n+N) – u (n-N-1)]

= u (n+N) * u (n+N) – 2 u (n+N)*u (n-N-1)] + u (n-N-1) * u (n-N-1) = r(n+2N+1) – 2r(n) + r(n-2N-1) n = (2N+1) Tri ( ) 2N 1

n n Tri ( ) = 1- for n N N N = 0 elsewhere.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 37

Q. x(n) = {2,-1,3} h(n) = { 1,2,2,3} Graphically  Fold-shift-multiply-sum y(n) = 1 2 2 3 2 2 4 4 6 -1 -1 -2 -2 -3 3 3 6 6 9 y(n) = { 2,3,5,10,3,9}

Q. x(n) = {4, 1 ,3} h(n) = { 2,5, 0 ,4}   2 5 0 4 4 8 20 0 16 1 2 5 0 4 3 6 15 0 12

y(n) = { 8,22,11,31,4,12} Note that convolution starts at n=-3

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 38

Q) h(n): 2 5 0 4 x(n): 4 1 3 ______8 20 0 16 2 5 0 4 6 15 0 12 ______

y(n): 8 22 11 31 4 12 

Q. Convolution by sliding step method: h(n) = 2 , 5, 0, 4 ; x(n)= 4 , 1, 3  

i) 2 5 0 4 ii) 2 5 0 4 3 1 4 3 1 4 ______y(0) = 8 2 20 y(1) = 2+20 = 22

iii) 2 5 0 4 iv) 2 5 0 4 3 1 4 3 1 4 ______6 5 0 y(2) = 11 15 0 16 y(3) = 31

v) 2 5 0 4 Vi) 2 5 0 4 3 1 4 3 1 4 ______0 4 y(4) = 4 12 y(5) = 12 If we insert zeros between adjacent samples of each signal to be convolved, their convolution corresponding to the original convolution sequence with zeros inserted between its adjacent samples. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 39

Q. h(n) = 2 , 5, 0, 4 ; x(n)= 4 , 1, 3 X(z) = 2z3+5z2+4 ; X(z) = 4z2+z+3   Their product Y(z) = 8z5+22z4+11z3+31z2+4z+12

y(n) = 8 ,22,11,31,4,12 

h(n) = , 0, 5, 0, 0, 0, 4 ; x(n) = 4, 0, 1, 0, 3

H(z) = 2z6+5z4+ 4 ; X(z) = 4z4+z2+3 Y(z) = 8z10+22z6+31z4+4z2+12 y(n) = { 8,0,22,0,11,0,31,0,4,0,12} Q. Compute the linear convolution of h(n)={1,2,1} and x(n) = { 1, -1, 2, 1 ,2, -1, 1, 3, 1} using overlap-add and overlap-save method. h (n): 1 2 1 x (n): 1 -1 2 1 2 -1 1 3 1

x1(n): 1 -1 2

x2(n): 1 2 -1

x3(n): 1 3 1 ______

y1(n) = (h (n)*x1(n))1 1 1 3 2

y2(n) = 1 4 4 0 -1

y3(n) = 1 5 8 5 1 y(n) = { 1 1 1 4 6 4 1 4 8 5 1 }  OVER LAP and SAVE method

h (n): 1 2 1 0 0 (N2=3)

x1(n): 1 -1 2 1 2 (N3+N2-1) = 5

x2(n): 1 2 -1 1 3

x3(n): 1 3 1 0 0

y1(n) = 1 1 1 4 6 5 2

y2(n) = 1 4 4 1 4 7 3

y3(n) = 1 5 8 5 1 y(n) = { 1 1 1 4 6 4 1 4 8 5 1}

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 40

Discrete Fourier Series Q. Determine the spectra of the signals

a. x(n) = Cos 2  n

wo = 1 fo = is not rational number 2  Signal is not periodic. Its spectra content consists of the single frequency  n b. x (n) = Cos 3 after expansion x(n)={ 1,0.5,-0.5,-1,-0.5,0.5} 1 fo = N=6 6

2 1 5  j nk x(n)e 6 Ck =  k=0 to 5 6 n0

 2 4 5 1   j k  j k  j k  j k  x(0)  x(1)e 3  x(2)e 3  x(3)e jk  x(4)e 3  x(5)e 3 C =   k 6   1 x(0)  x(1)  x(2)  x(3)  x(4)  x(5) For k=0 Co = 6 = 0 Similarly

K=1 C1 = 0.5 , C2 = 0 = C3 = C4 , C5 = 0.5

Or

2 2 2 j n  j n 5 j kn  1 6 1 6 6 x (n) = Cos n  e + e = Ck e 3 2 2 k0

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 41

2 4 6 8 10 j n j n j n j n j n 6 6 6 6 6 = Co+C1 e +C2e + C3 e +C4 e +C5 e 1 By comparison C1= 2

2  56  10n  j n j2  n j 6  6  6 Since e = e = e 1 C  5 2 c. x (n) = {1,1,0,0}

nk 1 3  j2 x(n)e 4 Ck=  k=0, 1, 2, 3 4 n0

2k 1   j  11e 2  = 4  

1 1 1  ;  1 j;  0 ;  1 j c0 2 c1 4 c2 c3 4 1 Co  & C = 0 2 0 2    c1 4 & C1 = 4  0 c2 & C2 undefined 2   c3 & C3 = 4 4

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 42

PROPERTIES OF DFS 1. Linearity ~ DFS x1 (n)  Ck1 ~ DFS x2 (n)  Ck 2 ~ ~ DFS ax1 (n)  bx2 (n)  aCk1  bCk 2 2. Time Shifting 2mk  j ~ N DFS x(n  m) e Ck 3. Symmetry ~* * DFS x (n) C k C = k

2nk 1 N 1  j ~x(n)e N  N n0

 N 1 j2 nk ~* * ~x(n)  C e N DFS x (n) C k  k k0

~ ~* ~  x(n)  x (n) 1 * Rex(n)  DFS   Ck  C k  Cke DFS  2  2

~ ~* ~  x(n)  x (n) 1 * j Imx(n)  DFS   Ck  C k  Cko DFS  2  2 ~ If x(n) is real then

~ ~* ~  x(n)  x (n) xe (n)     2  Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 43

~ ~* ~  x(n)  x (n) xo (n)     2 

~ 1 * x (n)  C  C k  ReC  DFS e 2 k k

~ 1 * x (n)  C  C k  j ImC  DFS o 2 k k Periodic Convolution N 1  ~x (m)~x (n  m)  C C DFS  1 2  k1 k 2 m0  If x(n) is real * Ck  C k

Re[Ck ]  Re[Ck ]

Im[Ck ]  Im[Ck ]

Ck  Ck

Ck  Ck PROPERTIES OF FT (DTFT) 1. Linearity

y (n) = a x1 (n) + b x2 (n)

jw jw Y (e ) = a X1(e ) + b X2(e ) 2. Periodicity

j(w2 ) H (e ) = H (e ) 3. For Complex Sequence

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 44

h (n) = hR(n) + j hI(n)

 H (e jw ) = [ h R (n)  j h I (n) ] [Cos(wn) - j Sin(wn)] n-

 [ h (n) Cos(wn)  h (n)Sin(wn)  R I = HR (e ) n-

 [ h (n) Cos(wn)  h (n)Sin(wn) jw  I R = HI (e ) n-

jw jw jw H (e ) = HR (e )  jH I (e )

2 jw 2 jw jw * jw = H R (e )  H I (e )  H(e )H (e )

jw jw 1  H I (e )  H(e )  tan  jw  H R (e ) 4. For Real Valued Sequence

 jw  jwn H(e ) = h(n)e n

  =  h(n)Cos(wn)  j h(n)Sin(wn) n n

jw jw = HR (e )  jH I (e ) ------(a)

 jwn  jw h(n)e H(e ) =  n

  =  h(n)Cos(wn)  j h(n)Sin(wn) n n

 jw  jw = H R (e )  jH I (e ) ------(b) From (a) & (b)

jw  jw H R (e )  H R (e )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 45

jw  jw H I (e )  H I (e )  Real part is even function of w Imaginary part is odd function of w

 jw * jw  H(e )  H (e )

jw jw * jw * -jw -jw -jw => H (e )  H (e )H (e )  H (e )H(e )  H(e )

Magnitude response is an even function of frequency  H (e-jw )   H (e jw )  H (e-jw )  tan-1 I  tan-1 I  H (e jw )  -jw   jw  HR (e ) HR (e ) Phase response is odd function. 5. FT of a delayed Sequence

  jwn FT [h (n-k)] = h(n  k)e n Put n-k = m

  jw(mk ) = h(m)e m   jwk  jwk  jwm jw = e h(m)e = H (e ) e m 6. Time Reversal x (n)  X (w) x (-n)  X (-w)

  jwn F T [x (-n)] =  x(n)e n Put –n = m

 x(m)e jwm  X (w)  m

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 46

7. Frequency Shifting

jwon x(n) e  X (w-wo)

 jw n F T [x (n) e o ] =  x (n) e-jwn n

 j(wwo )n =  x (n) e = X (w-wo) n 8. a. Convolution

x1 (n) * x2 (n) X1(w) X2(w)

-jwn -jwn [x1 (n) * x2 (n) ] e =  [ x1 (k) x2 (n-k) ] e k  Put n-k = m

 -jw (m+k) = x1 (k)  [x2(m)] e m

 -jwk -jwm = x1 (k) e  [x2(m)] e m

= X1(w) X2(w) 1 b. [X1(w) * X2(w)] x1 (n) x2 (n) 2 9. Parsevals Theorem 1  * * x1(n) x2 (n) =  [X1(w) X2 (w)] dw 2  dX (w) n x (n) j dw 10. F T of Even Symmetric Sequence

jw H (e ) = h (n) e-jwn

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 47

1  =  h (n) e-jwn + h (0) +  h (n) e-jwn n n1 Let n = -m

  =  h (-m) ejwm + h (0) +  h (n) e-jwn m1 n1 Let h (-m) = h (m) for even

Therefore = h (0) + 2 h (n) Cos (wn) is a real valued function of frequency

  0 ; H (e jw ) >0

   ; H (e ) <0 11. F T of Odd Symmetric Sequence For odd sequence h (0) = 0

H (e ) = h (n) [e-jwn - ejwn ]

= -j 2 h (n) Sin (wn) HI (e ) is a imaginary valued function of freq. and a odd function of w i.e, H (e  jw ) = - H (e )

jw H (e ) = HI (e ) for HI (e ) > 0

= - HI (e ) for HI (e ) < 0

jw  H(e )  For w over which H (e ) > 0 2 I    = 2 for w over which HI (e ) < 0 1 2 X (w)dw 12. x(0) =  Central Co-ordinates 2 0 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 48

 X (0) =  x(n) n 13. Modulation

X (w  w0 ) X (w  w0 ) Cos (w n) x (n)   o 2 2 FOURIER TRANSFORM OF DISCRETE TIME SIGNALS

 X (w) =  x (n) e-jwn n

F T exists if x(n)  

The FT of h (n) is called as Transfer function 1 Ex: h (n) = for -1 n 1 3 = 0 otherwise

1 1  jwn 1 jw  jw 1 Sol: H (e jw ) =  e = e 1 e  = 1 2Cos(w) n13 3 3

w

0 1

 1

2 3 1  - 3

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 49

Ex: h (n) = an u (n)

 n  jwn H (e jw ) = a e n0

 1  jw n = (ae ) =  jw n0 1 ae n Q. x(n) = n  u(n)  <1 d  1  n n u(n)  j dw 1e jw  e jw = (1e jw ) 2

  n  jwn  jw n 1 n (e ) Hint: u(n)  e =  =  jw n0 n0 1e

Q. x(n) = n 0  n N Or x(n) = n [ u(n) – u(n-N)] = n u(n) – N n-N u(n-N) Using Shifting Property 1 e jwN  N [ ] X(w) = 1e jw 1e jw 1 (e jw ) N = 1e jw Ans

n Q. x(n) =    1 two sided decaying exponential

x(n) = n u(n) + -n u(-n) -  (n) using folding property

2 1 1 1 =  1 = 2 1e jw 1e jw 1 2Cosw  Q. x (n) = u (n) Since u (n) is not absolutely summable Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 50

1   (w)  we know that u (t) jw 1  (w) Similarly X (w) = 1 e jw +

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 51

DFT (Frequency Domain Sampling) The Fourier series describes periodic signals by discrete spectra, where as the DTFT describes discrete signals by periodic spectra. These results are a consequence of the fact that sampling on domain induces periodic extension in the other. As a result, signals that are both discrete and periodic in one domain are also periodic and discrete in the other. This is the basis for the formulation of the DFT.

  jwn Consider aperiodic discrete time signal x (n) with FT X(w) =  x(n)e n

Since X (w) is periodic with period 2 , sample X(w) periodically with N equidistance 2 samples with spacing w  . N

K = 0, 1, 2…..N-1

2   j Kn  2k  N X     x(n)e  N  n The summation can be subdivided into an infinite no. of summations, where each sum contains

N 1 2 1 2  j Kn 2k  j Kn N   N x(n)e X    ......   x(n)e   +  N  nN n0

2 2N 1  j Kn N  x(n)e  ...... nN

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 52

2  lN N 1  j Kn x(n)e N =   l nlN Put n = n-lN

2 N 1  j K (nlN ) x(n  lN )e N =  n0

 2 N 1  j Kn x(n  lN )e N =   n0 l

N 1 2  j Kn N X(k) =  xp(n) e n0

N 1 2 j Kn N We know that xp(n) =  Ck e n= 0 to N-1 k0

1 Ck= N xp(n) k=0 to N-1 1 Therefore C = X(k) k=0 to N-1 k N 2 N 1 j Kn N IDFT ------xp (n) =  X(k) e n = 0 to N-1 k 0

This provides the reconstruction of periodic signal xp(n) from the samples of spectrum X(w). The spectrum of aperiodic discrete time signal with finite duration L

Prove: x(n) = xp (n) 0  n N-1

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 53

Using IDFT

2 1 N 1 j Kn x (n) =  X(k) e N N k 0

N 1 X (w) =  [ X (k) ] e-jwn n0

2  jn(w K ) = X (k) [ e N ]

If we define p(w) = e-jwn

wN  N 1  jwN Sin  jw  1 e  2  2  =   jw  = e 1 e w   NSin 2 2k Therefore: X (w) = X (k) P(w- ) N 2k At w = P (0) =1 N And P (w- ) = 0 for all other values

X (w) = X(k) = X( )

Ex: x(n) = an u(n) 0

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 54

 0 nlN xp (n) =  x(n  LN)  a l l  a n a n alN   =  N 0 n N-1 l0 1 a

Aliasing effects are negligible for N=50

If we define aliased finite duration sequence x(n)

xˆ(n)  x p (n) 0 n N-1 = 0 otherwise

N 1 N 1 Xˆ (w)  xˆ(n)e jwn  jwn  x p (n)e n0 =  n0

N 1 a n 1 N 1 e jwn (ae  jw )n =  N = N  n0 1 a 1 a n0

N  jwN ˆ 1 1 a e  X (w)  N   jw  1 a  1 a e 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 55

2k   j N  N N ˆ  2K  1 1 a e  X    N  2K   N  1 a  j  1 a e N  1  2K    =  j2k = X N 1 ae N  

2k  Although Xˆ (w)  X (w),the samples at W = are identical. k N

1 1 Ex: X (w) = & X (k) = 2  jw  j k 1 a e 1 a e N Apply IDFT

2nk  j  1 N 1  e N  x (n) =   2k  using Taylor series expansion N k0  j 1 ae N 

2nk 2kr N 1  j    j 1 N r N = e a e N k0   r0

(nr)  N 1 j2k 1 r   = a e N  N r0 k0  = 0 except r = n+mN

  nmN n N m  x (n) = a = a (a ) m0 m0 a n = 1 a N The result is not equal to x (n), although it approaches x (m) as N becomes  .

Ex: x (n) = {0, 1, 2, 3} find X (k) =?

2k 3  j n 4 X (k) =  x(n)e n0 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 56

3 X (0) =  x(n) = 0+1+2+3 = 6 n0

2 3  j n 4 X (1) =  x(n)e = -2+2j n0 X (2) = -2 X (3) = -2-2j DFT as a linear transformation

2  j N Let WN  e

N 1 nk X (k) =  x(n)WN k = 0 to N-1 n0

N 1 1 nk x (n) =  X (k)WN n = 0, 1…N-1 N k0  X (0)   x(0)         x(1)  X (1)             Let x =   X = N   N             x(N 1) X (N 1) 1 1 1  1  1 W 1 W 2  W (N 1)   N N N  2 4 2(N 1) 1 WN WN  WN  W =   N        N 1 2(N 1) (N 1)( N 1)  1 WN WN  WN 

The N point DFT may be expressed in matrix form as

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 57

DFT IDFT 1 W * X XN = WN xN xN = N N N

1  xN  WN X N

KN K 1. WN  WN

N 1 K  W 1  W * W 2  W K N N N 2. N N

Ex: x (n) = {0, 1, 2, 3}

1 1 1 1  1 1 1 1  1 1 1 1   1 2 3   1 2 3    1 W W W 1 W4 W4 W4 1  j 1 j  4 4 4      2 0 2 DFT W4 = 2 4 6 =   = 1 W4 W4 W4  1 W4 W4 W4 1 1 1 1  3 6 9   3 2 1    1 W4 W4 W4  1 W4 W4 W4  1 j 1  j 0 6  1   2  2 j W x     X4 = 4 4 = 2 =  2      3  2  2 j IDFT

6   2  2 j 1 * 1   x4 = WN X N = = Ans 4 4  2     2  2 j Q. x (n) = {1,0.5}  h (n) = { 0.5,1} 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 58

Find y (n) = x (n)  h (n) using frequency domain. Since y (n) is periodic with period 2. Find 2-point DFT of each sequence. X (0) = 1.5 H (0) = 1.5 X (1) = 0.5 H (1) = -0.5 Y (K) = X (K) H (K) Y (0) = 2.25 Y (1) = -0.25 Using IDFT y (0) = 1; y (1) = 1.25 ~  ~ ~y(n)  h(n)  ~x(n)  h(k)~x(n  k)  k  ~ ~x(k)h(n  k) =  k  ~ ~ ~x(k)h(k) y(0) =  k ~ ~ ~ ~ = x(0)h(0)  x(1)h(1) = 1 * 0.5 + 0.5 * 1 = 1  ~ ~ ~x(k)h(1 k) y(1) =  k Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 59

~ ~ ~ ~ = x(0)h(1)  x(1)h(0) = 1 * 1 + 0.5 * 0.5 = 1.25

 ~ ~ ~ y(2) =  x(k)h(2  k) k ~ ~ ~ ~ = x(0)h(2)  x(1)h(1) = 1 * 0.5 + 0.5 * 1 = 1 ~ y(n) = {1, 1.25, 1, 1.25…..} Q. Find Linear Convolution of same problem using DFT Sol. The linear convolution will produce a 3-sample sequence. To avoid time we convert the 2-sample input sequence into 3 sample sequence by padding with zero. For 3- point DFT X (0) = 1.5 H (0) = 1.5 2 2  j  j 3 X (1) = 1+0.5 e 3 H (1) = 0.5+ e

4 4  j  j 3 X (2) = 1+0.5 e H (2) = 0.5+ e 3 Y (K) = H (K) X (K) Y (0) = 2.25

Y (1) = 0.5 + 1.25 + 0.5

8  j 3 Y (2) = 0.5 + 1.25 + 0.5 e Compute IDFT

2kn 1 2 j Y(k)e 3 y(n) =  3 k0 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 60

y(0) = 0.5 y(1) =1.25 y(2) =0.5 y(n) = { 0.5, 1.25, 0.5} Ans PROPERTIS OF DFT 1. Linearity

If h(n) = a h1(n) + b h2(n)

H (k) = a H1(k) + b H2(k) 2. Periodicity H(k) = H (k+N) ~  h(n)  h(n  mN) 3.  m

4. y(n) = x(n-n0) 2kn  j 0 N Y (k) = X (k) e

5. y (n) = h (n) * x (n) Y (k) = H (k) X (k) 6. y (n) = h(n) x(n) 1 H(k)  X (k) Y (k) = N 7. For real valued sequence N 1 2kn H R (k)  h(n)Cos n0 N N 1 2kn H I (k)  h(n)Sin n0 N a. Complex conjugate symmetry h (n) H(k) = H*(N-k) h (-n) H(-k) = H*(k) = H(N-k)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 61

i. Produces symmetric real frequency components and anti symmetric N imaginary frequency components about the 2 DFT N ii. Only frequency components from 0 to need to be computed in order 2 to define the output completely.

b. Real Component is even function

HR (k) = HR (N-k) c. Imaginary component odd function

HI (k) = -HI (N-k)

d. Magnitude function is even function

H(k)  H(N  k) e. Phase function is odd function

H(k)  H(N  k) f. If h(n) = h(-n) H (k) is purely real g. If h(n) = -h(-n) H (k) is purely imaginary 8. For a complex valued sequence x*(n) X*(N-k) = X*(-k)

N 1 nk DFT [x(n)] = X(k) =  x(n)WN n0

N 1 * * nk X (k) =  x (n)WN n0

N 1 * * nk * X (N-k) =  x (n)WN = X (-k) n0

DFT [x*(n)] = = X*(N-k) proved

Similarly DFT [x*(-n)] = X*(k) Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 62

9. Central Co-ordinates

N 1 1 N 1 N 1 k x (0) =  X (k) x ( ) = (1) X (k) N=even N k0 2 N k0

N 1 N 1 n X (0) =  x(n) X ( ) = (1) x(n) N=even n0 n0 10. Parseval’s Relation

N 1 N 1 2 2 N  x(n)   X (k) n0 k0

N 1 * Proof: LHS N x(n)x (n) n0

N 1 N 1  1 * nk  = N x(n)  X (k)WN  m0  N k0 

N 1 N 1 *  nk  =  X (k) x(n)WN  k0 n0 

N 1 N 1 2 * =  X (k) X (k) =  X (k) k0 k0 11. Time Reversal of a sequence

x((n))N  x(N  n)  X ((k))N  X (N  k) Reversing the N-point seq in time is equivalent to reversing the DFT values.

 j2k N 1 n DFT x(N  n)   x(N  n)e N n0 Let m=N-n

j2k N 1 (N m) N = x(m)e m=1 to N = 0 to N-1 n0

 j2k N 1 m N =  x(m)e m0 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 63

 j2m N 1 (N k) N =  x(m)e = X(N-k) m0 12. Circular Time Shift of a sequence

 j2k l N x(n  l) N  X (k)e

 j2k N 1 n DFT x(n  l)  x(n  l) e N  N   N n0

l1  j2k  j2k n N 1 n x(n  l) e N N =  N +  x(n  l) N e n0 nl

 j2k  j2k N 1 n l1 n N x(N  n  l)e N =  x(N  n  l) e +  n0 nl Put N+n-l = m

 j2k  j2k N 1 (ml) 2N 1l (ml) x(m)e N x(m)e N =  +  mN l mN

N to 2N-1-L is shifted to N  0 to N-1-L Therefore 0 to N-1 = (0 to N-1-L) to ( N-L to N-1) 2k N 1  j (ml) x(m)e N Therefore  m0

2k 2k N 1  j m  j l x(m)e N N =  e m0 2k  j l N = X(k) e RHS 13. Circular Frequency Shift Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 64

2l j n N x(n)e  X (k  l) N

2l 2k 2l N 1  j n  j n  j n N N N DFT x(n)e  =  x(n)e e   n0

2n N 1  j (kl) N =  x(n)e = X (k  l) N RHS n0 14. x(n)  X(k)  k {x(n), x(n), x(n)…….x(n)} M X ( m ) (m-fold replication) n x( )  {X (k), X (k),...... X (k)} m (M- fold replication) 2, 3, 2, 1  8, -j2, 0, j2 Zero interpolated by M {2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1}  {24, 0, 0, -j6, 0, 0, 0, 0, 0, j6, 0, 0} 15. Duality x(n) X(k)

X(n) N x(N-k) 0  K  N 1 2 1 N1 j n X ()e N x(n) =  N 0

2 1 N1 j (Nk ) X ()e N x(N-k) =  N 0

2 1 N1  j k X ()e N =  N 0

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 65

2 N1  j k X ()e N N x(N-k) =  0

2k N 1  j n N =  X (n)e = DFT [ X(n) ] LHS proved n0 1 X (k) X (k) X ((k)) X *((k))  16. Re[x(n)]  ep ep = 2 N N

j Im[x(n)] X op(k)

xep (n)  Re[X(k)]

xop(n)  j Im[X(k)] 1 x (n)  x(n)  x((n))  ep Even part of periodic sequence = 2 N 1 x (n)  x(n)  x((n))  op Odd part of periodic sequence = 2 N

N 1 x(n)W nk Proof: X(k) =  N n0

N 1 nk X(N-k) =  x(n)WN  X ((k)) N n0

N 1 x* (n)W nk X*(k) =  N n0

N 1 x*(n)W nk  X *((k)) X*(N-k) =  N N n0

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 66

X ((k))  X * ((k)) 1 N 1 N N  x(n)  x* (n) W nk   N 2 2 n0 = DFT of [Re[x (n)]] LHS

N 1 N 1 * * 1 17.  x1 (n)x2 (n) =  X 1 (k)X 2 (k) n0 N k0

* Let y(n) = x1(n)x2 (n) 1 X (k)  X * (k) Y(k) = N 1 2

N 1 1 * =  X1 (l)X 2 (k  l) N l0

N 1 1 * Y(0) =  X1 (l)X 2 (l) N l0 Using central co-ordinate theorem

Y(0) =

Therefore =

QUESTIONS 1 Q. (i) {1,0,0,…….0} (impulse) {1,1,1…..1} (constant) (ii) {1,1,1,……1} (constant) ) {N,0,0,…….0} (impulse)

 j2k  n  N 1  j2k N N    N  1 N 1 ( )  n   e    (iii)  j2k    j2k  k0   N  1 e N  1  N  2nko  (iv) Cos     (k  ko )   (k  (N  ko )  N  2 (Impulse pair) Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 67

Or Cos (2 nf ) = Cos (wn)

j2nko  j2nko ) e N  e N Sol. x(n) = 2

j2nko j2n(N ko ) e N  e N = 2

We know that 1  N  (k)

j2nKo N x(n)e  X (K  Ko) N  (k  k )   (k  (N  k ) x(n)  2 o o I. Inverse DFT of a constant is a unit sample. II. DFT of a constant is a unit sample. 2 Q. Find 10 point IDFT of X(k) = 3 k=0 = 1 1  k  9

Sol. X(k) = 1+2 (k) 1 = 1 + 10 5 1  (n) x(n) = 5 + Ans 3 Q. Suppose that we are given a program to find the DFT of a complex-valued sequence x(n). How can this program be used to find the inverse DFT of X(k)? N 1 x(n)W nk X(k) =  N n0

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 68

N 1 nk 1 X (k)WN x(n) =  N k0

N 1 X * (k)W nk N x*(n) =  N k0  1. Conjugate the DFT coefficients X(k) to produce the sequence X*(k). 2. Use the program to fing DFT of a sequence X*(k). 3. Conjugate the result obtained in step 2 and divide by N.

4 Q. x (n) = {1 , 2, 3, 4, 5, 0, 0, 0} p 

(i) f (n) = x (n-2) = { 0 , 0, 1, 2, 3, 4, 5, 0} p p 

(ii) g (n) = x (n+2) = { 3 , 4, 5, 0, 0, 0, 1, 2} p p 

(iii) hp(n) = xp(-n) = {1, 0, 0, 0, 5, 4, 3, 2} 5 Q. x(n) = {1, 1, 0, 0, 0, 0, 0, 0} n = 0 to 7 Find DFT.

 j2k  jk 1 n x(n)e 8 4 X(k) =  = 1 + e k = 0 to 7 n0 X(0) = 1+1 = 2  j 4 X(1) = 1+ e = 1.707 - j 0.707  j 2 X(2) = 1+ e = 1- j

 j3 X(3) = 1+ e 4 = 0.293 - j 0.707 X(4) = 1-1 = 0 By conjugate symmetry X(k) = X*(N-k) = X*(8-k)  X(5) = X*(3) = 0.293 + j 0.707 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 69

X(6) = X*(2) = 1+j X(7) = X*(1) = 1.707 + j 0.707  X(k) = { 2 , 1.707 - j 0.707, 0.293 - j 0.707, 1-j, 0, 1+j, 0.293 + j 0.707, 1.707 + j  0.707 } 6 Q. x(n) = {1, 2, 1, 0} N=4 X(k) = {4, -j2, 0, j2} (i) y(n) = x(n-2) = {1, 0, 1, 2}

 j2k (no2) Y(k) = X(k) e 4 = 4, j2, 0, -j2 (ii) X(k-1) = {j2, 4, -j2, 0} j2 ln N IDFT  x(n) e

jn = x(n) e 2 = {1, j2, -1, 0} (iii) g(n) = x(-n) = 1, 0, 1, 2 G(k) = X(-k) = X*(k) = {4, j2, 0, -j2} (iv) p(n) = x*(n) = {1, 2, 1, 0} P(k) = X*(-k) = {4, j2, 0, -j2}* = {4, -j2, 0, j2} (v) h(n) = x(n) x(n) = {1, 4, 1, 0} 1 1 H(k) = X (k)  X (k) = [ 24, -j16, 0, j16] = {6, -j4, 0, j4} 4 4 (vi) c(n) = x(n)  x(n) = {1, 2, 1, 0}  {1, 2, 1, 0} = {2,4,6,4} C(k) = X(k)X(k) = {16, -4, 0, -4} (vii) s(n) = x(n)  x(n) = {1, 4, 6, 4, 1, 0, 0} S(k) = X(k) X(k) = {16, -2.35- j 10.28, -2.18 + j 1.05, 0.02 + j 0.03, 0.02 - j 0.03, -2.18 - j 1.05, -2.35 + j 10.28} 2 (viii)  x(n) 1 4 1 0  6 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 70

1 2 1 X (k)  [16  4  4]  6 4  4

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 71

III UNIT: FFT

N 1 nk X(k) =  x(n)WN 0  K  N 1 n0

N 1 nk =  { Re[x(n)] + j Im[x(n)] } { Re(WN ) + j Im( ) } n0

= Re[x(n)] Re( ) - Im[x(n)] Im( ) +

j{ Im[x(n)] Re( ) + Im( )Re[x(n)]}

2  Direct evaluation of X(k) requires N complex multiplications and N(N-1) complex additions.

2  4 N real multiplications  { 4(N-1) + 2} N = N(4N-2) real additions The direct evaluation of DFT is basically inefficient because it does not use the symmetry

N K  2 K N & periodicity properties WN   & WN  DITFFT:

N N 1 1 2 2 2nk (2n1)k X(k) =  x(2n)WN +  x(2n 1)WN n0 n0 (even) (odd) N N 1 1 2 2 2nk 2nk K x (n)W xo (n)WN =  e N + WN  n0 n0

N N 1 1 2 2 nk x (n)W nk =  xe (n)WN / 2 +  o N / 2 n0 n0

= Xe(k) + Xo(k)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 72

Although k=0 to N-1, each of the sums are computed only for k=0 to N/2 -1, since Xe(k) & Xo(k) are periodic in k with period N/2

N K  K 2 For K  N/2 WN = -WN X(k) for K N/2

N K  2 X(k) = Xe(k-N/2) -WN Xo(k-N/2)

N = 8

x(2n) = xe(n) ; x(2n+1) = xo(n)

xe(0) = x(0) xo(0) = x(1)

xe(1) = x(2) xo(1) = x(3)

xe(2) = x(4) xo(2) = x(5)

xe(3) = x(6) xo(3) = x(7)

k X(k) = Xe(k) + W8 Xo(k) k = 0 to 3

k4 = Xe(k-4) - W8 Xo(k  4) k = 4 to 7

0 0 X(0) = Xe(0) + W8 Xo(0) ; X(4) = Xe(0) - W8 Xo(0)

1 1 X(1) = Xe(1) + W8 Xo(1) ; X(5) = Xe(1) - W8 Xo(1)

2 2 X(2) = Xe(2) + W8 Xo(2) ; X(6) = Xe(2) - W8 Xo(2)

3 3 X(3) = Xe(3) + W8 Xo(3) ; X(7) = Xe(3) - W8 Xo(3) X(0) & X(4) having same i/ps with opposite signs

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 73

N N This pt DFT can be expressed as combination of pt DFT. 2 4

2k N Xe(k) = Xee(k) + W Xeo(k) k = 0 to -1 (0 to 1) N 4

N 2(k ) N W 4 Xeo(k  ) = Xee(k- )- N 4 k = to -1 ( 2 to 3 )

2k Xo(k) = Xoe(k) + WN Xoo(k) k = 0 to -1

N 2(k ) N W 4 Xoo(k  ) = Xoe(k- ) - N 4 k = to -1 For N=8

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 74

0 Xe(0) = Xee(0) + W8 Xeo(0) ; xee(0) = xe(0) = x(0)

2 Xe(1) = Xee(1) + W8 Xeo(1) ; xee(1) = xe(1) = x(2)

Xe(2) = Xee(0) - Xeo(0) ; xeo(2) = xe(2) = x(4)

Xe(3) = Xee(1) - Xeo(1) ; xeo(3) = xe(3) = x(6)

Where Xee(k) is the 2 point DFT of even no. of xe(n) & Xeo(k) is the 2 point DFT of odd no. of xe(n)

Similarly, the sequence xo(n) can be divided in to even & odd numbered sequences as

xoe(0) = xo(0) = x(1)

xoe(1) = xo(2) = x(5)

xoo(0) = xo(1) = x(3)

xoo(1) = xo(3) = x(7)

Xo(0) = Xoe(0) + Xoo(0) ;

Xo(1) = Xoe(1) + Xoo(1) ;

Xo(2) = Xoe(0) - Xoo(0) ;

Xo(3) = Xoe(1) - Xoo(1) ;

Xoe(k) is the 2-pt DFT of even-numbered of xo(n)

Xoo(k) is the 2-pt DFT of odd-numbered of xo(n)

Xee(0) = xee(0) + xee(1) = xe(0) + xe(2) = x(0) + x(4)

Xee(1) = xee(0) - xee(1) = xe(0) - xe(2) = x(0) - x(4)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 75

Xee(0) = xee(0) + xee(1) = xe(0) + xe(2) = x(0) + x(4)

Xee(1) = xee(0) - xee(1) = xe(0) - xe(2) = x(0) - x(4)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 76

No. of No. of Complex Speed No. of points N Multiplications Improvement Factor:

Stages Direct N2 FFT N 2

N N Log N Log N 2 2 2 2 2 4 16 4 4 3 8 64 12 5.33 4 16 256 32 8 5 32 1024 80 12.8 6 64 4096 192 21.33 For N=8

No of stages given by= Log2N = Log28 = 3. ( Log N -1 ) No. of 2 i/p sets = 2 2 = 4

Total No. of Complex additions using DITFFT is NLog2 N Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 77

= 8 * 3 =24 Each stage no. of butterflies in the stage= 2m-q where q = stage no. and N=2m Each butterfly operates on one pair of samples and involves two complex additions and one complex multiplication. No. of butterflies in each stage N/2 DITFFT: ( different representation) (u can follow any one) ( both representations are correct)

N N 1 1 2 2 2nk x(2n 1)W (2n1)k X(k) =  x(2n)WN +  N n0 n0

N N 1 1 2 2 x (n)W nk k nk =  e N + WN  xo (n)WN / 2 n0 2 n0

K 4 pt DFT Xe(k) + WN Xo(k) k= 0 to N/2 -1 = 0 to 3

N N (K  ) N Xe(k- ) - W 2 Xo(k- ) k = N/2 to N-1 = 4 to 7 2 N 2

2K 2 pt DFT Xe(k) = Xee(k) + WN Xeo(k) k = 0 to N/4-1 = 0 to 1

N 2(k ) 4 = Xee(k-N/4) - WN Xeo(k-N/4) k = N/4 to N/2 -1 = 2 to 3 Xo(k) = Xoe(k) + Xoo(k) k = 0 to N/4-1 = 0 to 1

N 2(k ) 4 = Xoe(k-N/4) - WN Xoo(k-N/4) k = N/4 to N/2 -1 = 2 to 3

2 1 W8  W4 N=8

0 X(0) = Xe(0) + W8 Xo(0) ; X(4) = Xe(0) - Xo(0)

1 1 X(1) = Xe(1) + W8 Xo(1) ; X(5) = Xe(1) - W8 Xo(1)

2 2 X(2) = Xe(2) + W8 Xo(2) ; X(6) = Xe(2) - W8 Xo(2)

3 3 X(3) = Xe(3) + W8 Xo(3) ; X(7) = Xe(3) - W8 Xo(3)

0 Xe(0) = Xee(0) + W8 Xeo(0) ; Xe(2) = Xee(0) - Xeo(0)

2 Xe(1) = Xee(1) + W8 Xeo(1) ; Xe(3) = Xee(1) - Xeo(1)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 78

0 Xo(0) = Xoe(0) + W8 Xoo(0) ; Xo(2) = Xoe(0) - Xoo(0)

2 Xo(1) = Xoe(1) + W8 Xoo(1) ; Xo(3) = Xoe(1) - Xoo(1)

N 1 4 1 4nk x(4n)W 4nk x(4n)W 4k Xee(k) =  N =  N =x(0) + x(4) W8 0 n0 Xee(0) = x(0)+x(4) Xee(1) = x(0)-x(4)

x(0) x(0) x(0) x(4) x(2) x(1) x(2) x(4) x(2)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 79

x(6) x(6) x(3) x(1) x(1) x(4) x(5) x(3) x(5) x(3) x(5) x(6) x(7) x(7) x(7) Other way of representation

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 80

DIFFFT:

N 1 2 N 1 nk x(n')W n'k X(k) =  x(n)WN +  N put n’ = n+N/2 n0 n1 N / 2

N 1 2 (nN / 2)k = +  x(n  N / 2)WN n0

N N 1 k 2 2 x(n  N / 2)W nk = + WN  N n0

N 1 2 nk [x(n) k N =  + (-1) x(n+ )]WN n0 2

N nk X(2k) = + x(n+ )]WN / 2 2

N 1 2 n nk X(2k+1) = {[x(n) - x(n+ )]WN }WN / 2 n0 Let f(n) = x(n) + x(n+N/2) n g(n) = { x(n) – x(n+N/2) }WN

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 81

N=8 f(0) = x(0) + x(4) f(1) = x(1) + x(5) f(2) = x(2) + x(6) f(3) = x(3) + x(7)

0 g(0) = [x(0) - x(4)] W8 1 g(1) = [x(1) - x(5)] W8 2 g(2) = [x(2) - x(6)] W8 3 g(3) = [x(3) - x(7)] W8

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 82

N 1 4 nk [ f (n) N X(4k) =  + f(n+ )]WN / 4 n0 4

N 1 4 N n nk X(4k+2) = [{ f (n) - f(n+ )}WN / 2 ]WN / 4 n0 4

N 1 4 X(4k+1) = [g(n) + g(n+ )] n0

N 1 4 nk X(4k+3) = [{g(n) - g(n+ )}WN / 2 ] n0

4k X(4k) = f(0) + f(2) + [ f(1) + f(3) ] W8

2 4k X(4k+2) = f(0) – f(2) + { [ f(1) – f(3) ] W8 }W8 X(0) = f(0) + f(2) + f(1) + f(3)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 83

X(4) = f(0) + f(2) – [ f(1) + f(3) ]

2 X(2) = f(0) - f(2) + [ f(1) - f(3)] W8

X(6) = f(0) - f(2) - [ f(1) - f(3)]

Find the IDFT using DIFFFT X(k) = { 4, 1-j 2.414, 0, 1-j 0.414, 0, 1+j 0.414, 0, 1+j 2.414 } Out put 8x*(n) is in bit reversal order x(n) = { 1,1,1,1,0,0,0,0}

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 84

UNIT-IV DIGITAL FILTER STRUCTURE The difference equation

N P M y(n) =  ak x(n-k) +  bk y(n-k) k  N F k 1

N P k ak z  NpNF 1 k  N F (1 Ck )Z M N H(z) = or = A Z F  M 1 b z k k1 1  k  (1 d k )Z k 1 k1

If bk= 0 non recursive or all zero filter. Direct Form – I

1. Easily implemented using computer program.

2. Does not make most efficient use of memory = M+Np+NF delay elements. Direct form-II

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 85

Smaller no. of delay elements = Max of (M, Np) + NF Disadvantages of D-I & D-II 1. They lack hardware flexibility, in that, filters of different orders, having different no. of multipliers and delay elements. 2. Sensitivity of co-efficient to quantization effects that occur when using finite-precision arithmetic. Cascade Combination of second-order section (CSOS) y(n) = x(n) + a1 x(n-1) + a2 x(n-2) + b1 y(n-1) + b2 y(n-2)

1 2 1 a1Z  a2Z H(z) = 1 2 1b1Z b2Z

Ex:

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 86

2 2 z 5 5 Z z  5 1 5Z 1 3    Z 1  1 Z   Z  3 12 12 12 3  4 4 4  H(z) = Z 1 Z 2 = Z 1 Z 2 1  1  2 4 2 4 z  1  1 Z 1 1 Z 1  Z 2  3  4  1  1  1 Z 1  Z 2  1 Z 1 = Z 1 Z 2 = z   Z 1 Z 2 1  3  4  1  2 4 2 4

Ex:

1 2 1 Z 2  Z 3 Z  Z  Z  Z   H(z) = = 1 1 1  Z 1  Z 1  Z 1   Z  Z  Z  1 1 1  1 1 1   2  4  8   2  4  8  0.65  0.45Z 1  Z 2 1.45  Z 1 Z    =  Z 1  Z 1  Z 1  1 1 1   2  4  8  1.45  Z 1  0.65  0.45Z 1  Z 2  = Z  Z 1  Z 1 Z 2 1  1   2  4 32

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 87

Parallel Combination of Second Order Section (PSOS) Ex:

3 2   z 5 5 Z 1 5 1 5 2 Z   Z 1  Z   Z  Z   3 12 12 12 3 12 12 12  H(z) = Z 1 Z 2 = Z 1 Z 2 1  1  2 4 2 4

1 2 3 1 Z Z  Z 5 2 1 5 1  Z 7 1    Z   Z    2 4  12 12 3 12  3 3 Z 3 Z 2 Z 1   12 6 3 ___-____+____-______7Z 2 Z 1 1   12 12 3 7Z 2 7Z 1 7   12 6 3 ______5 7 Z 1  4 3

 7 5 1  1  Z  Z 3 4   2   2  H(z) = Z 3 1 Z  1 Z    2 4 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 88

Ex: Z  Z 1  Z 2  H(z) = 1 1 1 obtain PSOS  Z  Z  Z  1 1 1   2  4  8 

1 1 1 Z 1 2Z  A B C 1 1 1   = 1 1 1  Z  Z  Z   Z   Z   Z  1 1 1  1  1  1   2  4  8   2   4   8  A = 8/3 B = 10 C = -35/3

Jury – Stability Criterion N(z) H(z) = D(z)

N N i b Z N N-1 N-2 1 D(z) =  i = bo Z +b1 Z + b2 Z +….. bN-1 Z + bN i0 ROWS COEFFICIENTS

1 bo b1 ……. bN

2 bN bN-1 ……. bo

3 Co C1 ……. CN-1

4 CN-1 CN-2 ……. Co

5 do d1 ……. dN-2

6 dN-2 dN-3 ……. do

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 89

. . .

2N-3 r0 r1 r2

bo bN i

Ci = i = 0,1,…N-1 bN bi

co cN 1i di = i = 0,1,…N-2 cN 1 ci i. D(1) > 0 ii. (-1)N D(-1) > 0

b  b c  c d  d r  r iii. o N o N1 o N2 o 2 Ex: Z 4 H(z) = D(z) = 4Z 4 3Z 3  2Z 2  Z 1 4Z 4  3Z 3  2Z 2  Z 1 1 4 3 2 1 1 2 1 1 2 3 4 3 15 11 6 1 4 1 6 11 15 5 224 159 79 D(1) = 4+3+2+1+1 = 11 > 0, (-1)4 D(-1) = 3 >0

bo  b4 co  c3 do  d2 Stable. Ex: 1 4Z 2 H(z) = 7 1 = 2 Ans: Unstable 1 Z 1  Z 2 4Z  7Z  2 4 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 90

UNIT-V Non Recursive filters Recursive filters

 Np M y(n) =  ak x(n-k) y(n) =  ak x(n-k) –  bk y(n-k) k  k Nf k 1 for causal system for causal system

 Np M =  ak x(n-k) y(n) =  ak x(n-k) –  bk y(n-k) k 0 k 0 k 1 For causal i/p sequence It gives IIR o/p but not always. N Ex: y(n) = x(n) – x(n-3) + y(n-1) y(n) =  ak x(n-k) k 0 N P a z k It gives FIR o/p. All zero filter.  k k  N F General TF : H(z) = M Always stable. k 1 bk z k 1 bk = 0 for Non Recursive Nf= 0 for causal system

FIR filters IIR filters 1. Linear phase no phase distortion. Linear phase, phase distortion. 2. Used in speech processing, data Graphic equalizers for digital audio, transmission & correlation processing tone generators filters for digital telephone 3. Realized non recursively. Realized recursively. 4. stable Stable or unstable. H(n) = an u(n) a<1 stable = 0 a>1 unstable 5. filter order is more Less 6. more co-efficient storage Less storage 7. Quantization noise due to finite Quantization noise precision arithmetic can be made negligible 8. Co-efficient accuracy problem is More Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 91 less severe 9. used in multirate DSP (variable sampling rate) IIR FILTER DESIGN  Butterworth, chebyshev & elliptic techniques.  Impulse invariance and bilinear transformation methods are used for translating s- plane singularities of analog filter to z-plane.  Frequency transformations are employed to convert LP digital filter design into HP, BP and BR digital filters.  All pass filters are employed to alter only the phase response of IIR digital filter to approximate a linear phase response over the pass band. The system function = H(s) The frequency transfer function = H(j  ) = H(s) / s=j 

2 The power transfer function = H( j) = H(j  ) H*(j ) = H(s) H(-s) / s=j To obtain the stable system, the polse that lie in the left half of the s-plane are assigned to H(s). BUTTERWORTH FILTER DESIGN 1 The butterworth LP filter of order N is defined as H (s) H (-s) = 2N B B  s  1    jc 

Where s = j c

2 1 H ( j ) = or H ( j ) db = -3dB ‘s B c 2 B c It has 2N poles

2N  s  1   = 0  jc 

2N  s    = -1  jc  2N 2N S = -1 ( jc )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 92

 j  j 2N j 2N 2 2N j 2 j2m = e (e c ) = c e e e

 1N2m    2N j   2N   S = c e

 1N 2m  j    2N  Sm = c e 0  m  2N 1

Ex: for N=3

(42m) 2 4 5 2 7 j j j j j j e 6 = e 3 , e j , e 3 , e 3 , e , e 3 = 1200, 1800, 2400, 3000, 3600, 600

1 Vo(s) 1  CS  Vi(s) 1 1 RCS R  CS 1 1 1 c    RS s 2 1    1   c    c 

Poles that are let half plane are belongs to desired system function.

2 1 H ( j) B = 2N    1    c  For a large  , magnitude response decreases as  -N, indicating the LP nature of this filter.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 93

2 H B ( j) dB = 10log10 H B ( j)

2N    = -10 log10(1   )  c  As   

= -20 N log10  = -20 N dB/ Decade = -6 N dB/Octane As N increases, the magnitude response approaches that of ideal LP filter. The value of N is determined by Pass & stop band specifications.

Ex: Design Butterworth LPF for the following specifications. Pass band:

2 -1< H( j) dB  0 for 0   1404 ( p = 1404 ) Stop band:

dB < -60 for  8268 ( s = 8268 )

If the c is given

2N 2  s  -1 -6 H( js) = [1   ] < 10 (-60dB)  c  log(106 1) = N > s 2log( ) c

Since c is not given, a guess must be made.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 94

The specifications call for a drop of -59dB, In the frequency range from the edge of the pass band (1404 ) to the edge of stop band (8268 ). The frequency difference is equal to

 8268  log2   = 2.56 octaves. 1404  1 oct ---- - 6N dB 2.56 ------? => 2.56 X - 6N dB = -59 dB’s 59 N =  3.8  2.56X 6 There fore: N =4

2N 2  s    -1 -6 Now H B ( js) = [1   ] < 10  c 

2N  s  1   > 106  c 

2N s > 106 c 2N

6 s 10 2N > c => 1470.3 >  c c <1470.3 Let c =1470.3 At this c it should satisfy pass band specifications.

2N 2  p    -1 H B ( jp) = [1   ] > 0.794 (= -1dB)  c  = 0.59 This result is below the pass band specifications. Hence N=4 is not sufficient. Let N=5

c < s X 10 = 2076.8

10  1404  -1 In the pass band = [1   ] = 0.98  2076  Since N=5 c = 2076

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 95

S1 = -2076

 j144 S2, 3 = 2076 (cos (4 /5)  j sin(4 /5)) = 2076 e

 j108 S4, 5 = 2076 (cos (3 /5) j sin(3 /5)) = 2076 e 2076 5 HB(s) = s  2076 s2  3359s  (2076 )2 s2 1283s  (2076 )2 

1. Magnitude response is smooth, and decreases monotonically as  increases from 0 to  2. the magnitude response is maximally flat about =0, in that all its derivatives up to order N are equal to zero at =0 Ex: c=1, N=1

2 2 -1 H B ( j) = (1+ ) The first derivative

d 2  2 H B ( j) = 2 =0 at =0 d 1  2  The second derivative

d 2 = -2 at =0 d 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 96

 N 3. The phase response curve approaches for large  , where N is the no. of poles of 2 butterworth circle in the left side of s-plane. Advantages: 1. easiest to design 2. used because of smoothness of magnitude response . Disadvantage: Relatively large transition range between the pass band and stop band. Other procedure Avo When c = 1 Avs = 2N  w  1    wo 

2 Avo H B (s) = 2N  s  1    j 

If n is even S2N = 1 = e j(2k1)

 j(2k1) The 2N roots will be Sk= e 2N k=1,2,….2N   Sk =Cos(2k 1)  jSin(2k 1) 2N 2N 1  Therefore: = T(s) = N / 2 where  k = (2k 1) 2 2N  (s  2Cos k s 1) k1 If N is odd S2n =1 = e j2k Sk = e j2k / N k=0,1,2….(2N-1) 1  T(s) = (N 1) / 2 where k = k 2 N  (s  2Cos k s 1) k1

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 97

0  20log H( j)  K1 for   1

20log H( j)  K2 for   2

    2n k1 1  1    10 10 1 10 log 2N = K1     1    c  1      c  

    2n k 2 1  2    10 10 1 10 log 2N = K2     2    c  1      c  

k1 2n  1  10 10 1 Dividing     2  k 2 10 10 1

 k1  10 10 1 log   10  k 2  10 10 1 n =    1  2log10   2 

choosing this value for n, results in two different selections for c . If we wish to satisfy our requirement at 1 exactly and do better than our req. at 2 , we use

1 2 = 1 or = 1 for better req at k1 k 2    2n    2n  10   10  10 1 10 1     End CHEBYSHEV FILTER DESIGN

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 98

 1  2 2  S  Defined as Hc(S) Hc(-S) = 1  C    N  jp       = measure of allowable deviation in the pass band.

-1 CN(x) = Cos(NCos (x)) is the Nth order polynomial. Let x = Cos

CN(x) = Cos(N )

C0(x) = 1

C1(x) = Cos =x 2 2 C2(x) = Cos2 = 2 Cos -1 = 2x -1 3 3 C3(x) = Cos3 = 4 Cos -3 Cos = 4x -3x etc..

N CN(x) 0 1 1 x 2 2x2-1 3 4x3-3x 4 8x4- 8x2 +1

Two features of Chebyshev poly are important for the filter design

1. CN (x) 1 for x 1

2 1 2 1    Hc ( j) 1 for 0    p

Transfer function lies in the range for 0    p Whereas the frequency value important for the design of the Butterworth filter was the c , the relevant frequency for the Chebyshev filter is the edge of pass band p .

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 99

2. x 1, CN (n) Increases as the Nth power of x. this indicates that for  >> p , the magnitude response decreases as  -N, or -6N dB Octane. This is identical to Butterworth filter. Now the ellipse is defined by major & minor axis.

Define  =  1  1  2

 1 1   N N       Minor r =   2

 1 1   N N       Major R =   N = Order of filter. 2

SP = r Cos +j R Sin

Ex: Pass band:

2 -1< H( j) dB  0 for 0   1404 Stop band:

dB < -60 for  8268

Value of  is determined from the pass band

1 10 log 1  2  > -1dB -1dB = 0.794

1 < 100.1 12 = 0.508 = 0.508

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 100

Value of N is determined from stop band inequality

1 2   2 2  s  -6 H  js = 1  CN    <10 c  jp     

1 s 106 1 2 Since  5.9 CN(5.9) >  2  = 1969 p    Evaluating

C3(5.9) = 804 C4(5.9) = 9416 therefore N = 4 is sufficient. Since this last inequality is easily satisfied with N=4 the value of  can be reduced to as small as 0.11, to decrease pass band ripple while satisfying the stop band. The value =0.4 provides a margin in both the pass band and stop band. We proceed with the design with =0.508 to show the 1dB ripple in the pass band. Axes of Ellipse:  =0.508-1 + (1+0.508-2)1/2 = 4.17

1404  1 1  R = 4.17 4  4.17 4   702 (1.43  0.67) 1494 2  

1404  1 1  r = 4.17 4  4.17 4   512 2   7 5 poles locations :  , 8 8 7 7  j130 S = 512Cos  j1494Sin =  473  j572  742e 1,2 8 8

5 5  j98 S = 512Cos  j1494Sin = 196  j1380 1394e 3,4 8 8 742 1394 2 H (S) = 2 2 2 2 c [S  S *2*742Cos(130)  (742 ) ] [S  S *2*1394Cos(98) 1394 ]

 Chebyshev filter poles are closer to the j  axis, therefore filter response exhibits a ripple in the pass band. There is a peak in the pass band for each pole in the filter, located approximately at the ordinate value of the pole.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 101

 Exhibits a smaller transition region to reach the desired attenuation in the stop band, when compared to Butterworth filter.  Phase response is similar.  Because of proximity of Chebyshev filter poles to j  axis, small errors in their locations, caused by numerical round off in the computations, can results in significant changes in the magnitude response. Choosing the smaller value of  will provide some margin for keeping the ripples within the pass band specification. However, too small a value for may require an increase in the filter order.  It is reasonable to expect that if relevant zeros were included in the system function, a lower order filter can be found to satisfy the specification. These relevant zeros could serve to achieve additional attenuation in the stop band. The elliptic filter does exactly this. IMPULSE INVARIANCE METHOD

 H(z) = h(n)Z n n0

ST STn H(z) (at z = e ) = h(n)e

re jw  e  j)T  r = eT e jw  e jT  w  T

T jT Let S1 =   j => Z1 = e e

2 T jT j2 T jT S2 =   j(  ) => Z2 = e e  e e T

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 102

 If the real part is same, imaginary part is differ by integral multiple of 2 , this is the T biggest disadvantage of Impulse Invariance method. s  a s  a Let HA(S) = = s  a2  b2 s  a  jb s  a  jb

at hA(t) = e Cosbt for t 0 s1 = -a-jb

= 0 otherwise s2 = -a+jb h (nTs) = eanTsCos(bnTs) for n 0

aTs 1 aTs 1 H(z) = 1 e Cos(bTs)Z = 1 e Cos(bTs)Z 1 2eaTsCos(bTs)Z 1  Z 2 (1 e(a jb)Ts Z 1 )(1 e(a jb)Ts Z 1 )

The pole located at s=p is transformed into a pole in the Z-plane at Z = e pTs , however, the finite zero located in the s-plane at s= -a was not converted into a zero in the z-plane at Z = eaTs , although the zero at s=  was placed at z=0.

Desing a Chebyshev LPF using Impulse-Invariance Method.

S1,2 = -473  j 572

S3,4 = -196 j 1380 [The freq response for analog filter we plotted over freq range 0 to 10000 . To set the  discrete-time freq range (0, ), therefore Ts = 10-4] Ts

S1,2Ts 0.148 j0.179  j10.2 Z1,2 = e = e = 0.862 e

S3,4Ts 0.061 j0.433  j24.8 Z3,4 = e = e = 0.94 e k H(z) = (1 2*0.862Cos10.2Z 1  0.8622 Z 2 )(1 2*0.94Cos24.8Z 1  0.942 Z 2 )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 103

k = (11.69Z 1  0.743Z 2 )(11.707Z 1  0.88Z 2 )

Methods to convert analog filters into Digital filters: 1. By approximation of derivatives dx x(nTs)  x(nTs Ts) / t=nTs = dt Ts

1 Z 1 S = Ts

Or Using forward-difference mapping based on first order approximation Z = esTs  1+STs Z 1 S = Ts Using backward- difference mapping is based on first order approximation Z 1  esTs 1 STs

Z 1 S  = ZTs

d 2 x d dx /t=nTs = /t  nTs dt 2 dt  dt 

x(nTs)  x(nTs Ts) x(nTs Ts)  x(nTs  2Ts)  = Ts Ts Ts Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 104

x(nTs)  2x(nTs Ts)  x(nTs  2Ts) = Ts2

2 1 2Z 1  Z 2 1 Z 1  S 2    2 =   Ts  Ts 

1 k k 1 Z  Therefore S =    T 

1 Z 1  Therefore H(z) = Ha(s) /s=   using backward difference  T  1 0.5(1 STs) Z = = 0.5 + 1 STs 1 STs 1 1 jTs = =  1 jTs 1 2Ts2 1 2Ts2 0.5(1 STs) Z - 0.5 = (1 STs)

z  0.5  0.5 is mapped into a circle of radius 0.5, centered at Z=0.5

Using Forward-difference Z 1 S= Z=1+STs Ts u+jv = 1+ (   j) Ts

if  =0 u=1 and j axis maps to Z=1 If  >0, then u>1, the RHS-plane maps to right of z=1. If <0, then u<1, the LHS-plane maps to left of z=1.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 105

The stable analog filter may be unstable digital filter.

Bilinear Transformation  Provides a non linear one to one mapping of the frequency points on the jw axis in s- plane to those on the unit circle in the z-plane.  This procedure also allows us to implement digital HP filters from their analog counter parts.

2 Z 1 2 1 Z 1 S = = Ts Z 1 Ts 1 Z 1

{Using trapezoidal rule y(n)=y(n-1)+0.5Ts[x(n)+x(n-1)]

H(Z)=2(Z-1) / [Ts(Z+1)] }

To find H(z), each occurrence of S in HA(s) is replaced by

STs 1 And Z = 2 STs 1 2

1/ 2 2 Ts   Ts   j tan1  Ts 2   1 e 2 j 1  2  jw 2     e  = 1/ 2 Ts 2 Ts   j tan1  j 1 2  Ts   1 e 2 2       2  

Ts j2 tan1  Ts e jw  e 2 w=2tan-1 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 106

The entire j  axis in the s-plane -

As in the impulse invariance method, the left half of s-plane maps on to the inside of the unit circle in the z-plane and the right half of s-plane maps onto the outside.

2  w  In Inverse relationship is   tan  Ts  2 

3 w  w w  Sin   .... 2 2  2 8  w For smaller value of frequency   2 =    Ts w Ts w2 Ts Cos 1 .... 2 4

(B.W of higher freq pass band will tend to reduce disproportionately)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 107

The mapping is  linear for small  and w. For larger freq values, the non linear compression that occurs in the mapping of to w is more apparent. This compression causes the transfer function at the high freq to be highly distorted when it is translated to the w-domain. Prewarping Procedure: When the desired magnitude response is piece wise constant over frequency, this compression can be compensated by introducing a suitable prescaling or prewarping to the freq scale. scale is converted into * scale.

2  Ts  * = tan  Ts  2  We now derive the rule by which the poles are mapped from the s-plane to the z-plane. 1 Let HA(s) = S=Sp S  Sp

1 H(z) = 1 = Ts(1 Z ) 2 1 Z 1   2  SpTs     Sp 2  SpTs1 Z 1   1    Ts 1 Z   2  SpTs  2  SpTs A pole at S=Sp in the s-plane gets mapped into a zero at z= -1 and a pole at Z = 2  SpTs Ex: Chebyshev LPF design using the Bilinear Transformation Pass band:

-1< H( j) dB  0 for 0   1404 =4411 rad Stop band:

H( j) dB < -60 for  8268 rad/sec =25975 rad/s Let the Ts = 10-4 sec Prewarping values are

4 p* = = 2*10 tan(0.0702 ) = 4484 rad/sec

4 And s* = = 2*10 tan(0.4134 ) = 71690 rad/sec

The modified specifications are

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 108

Pass band: -1< H( j*) dB  0 for 0   * 4484 rad/s Stop band:

H( j*) dB < -60 for *  71690rad/sec

1 Value of  : is determined from the pass band ripple 10log 1  2   1dB

 = 0.508 Value of N: is determined from

1 2   s *   H  js* = 1  2C 2    <10-6 c N  p *     s * Since 16 p*

6 2 10 1 CN (16) <  2    

1  106 1  2 CN(16) <  2  = 1969 (0.508) 

C3(16) = 16301 N = 3 is sufficient Using Impulse Invariance method a value of N=4 was required.  =4.17

 1 1    N   N    1 1 4484       3 3  Major R = p * = 4.17  4.17   5001 2 2  

1 1 4484     3 3  r = 4.17  4.17   2216 2   2 Since there are three poles, the angles are  & 3

S1 = r cos + j Rsin = -2216

2 2  j104.4 S2,3 = 2216 Cos  j 5001 Sin = -1108  j 4331 = 4470 e 3 3

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 109

4.43*1010 Hc(s) = (s  2216)(S 2  2223s  44702 ) Pole Mapping

At S=S1 2  (2216*104 ) In the Z-plane there is zero at Z = -1 and pole at Z =  0.801 2  (2216*104 ) S2,3 = there are two zeros at Z=-1

2  (1108  j4331)*104 Z =  0.801 j0.373  0.9e j24.5 2  (1108  j4331)*104

1 Z 1 1 2Z 1  Z 2 H(z) = 4.29 * 10-3 1 0.801Z 1 11.638Z 1  0.81Z 2 Pole Mapping Rules: -1 Hz(z) = 1-CZ zero at Z=C and pole at Z = 0 1 Hp(z) = pole ar Z=d and zero at z=0 1 dZ 1 C and d can be complex-valued number. Pole Mapping for Low-Pass to Low Pass Filters

Applying low pass to low pass transformation to Hz(z)  we get    c  1  Z 1 Z 1  1 c  HLZ(Z) = 1-c = (1+c ) 1Z 1 1Z 1    c  The low pass zero at z=c is transformed into a zero at z=C1 where C1 =   1 c 

And pole at z=0 is Z= Similarly,

1Z 1 HLP(Z)=     d  1  1 d 1  Z   1d  

   d  Pole at z=d => Z=   1d  Zero at z=0 => z =

1 1 2 H(z) = K 1 Z 1 2Z  2Z  1 0.622Z 1 11.07Z 1  0.674Z 2 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 110

1 (1)(0.356)3 K =  0.029 (1 0.801*0.356)(1 (0.819  j0.373)(0.356))(1 (0.819  j0.373)(0.356))

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 111

UNIT-VI () Phase Delay:   p   d() Group Delay:   g d

If  p =  g =constant and independent of frequency are called as constant time delay or linear phase filters. ()  o  o    Changes with frequency p 

 g = -  =constant. Type 1 Sequence

N 1 Center of Symmetry M=  integer value 2  N 3  2 h(n)  2 h(n)CosT(n  m)e jnT H(w) =    n0    N 1    T  2 

Amplitude spectrum is even symmetric about w=0 &  & both H(0) & H( ) can be non zero. Type 2 Sequence

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 112

h(n) = h(N-1-n) N 1 Center of Symmetry M=  half-integer value 2

N  1  2 2 h(n)CosT(n  m)e jMT H(w) =    n0  

The Amplitude spectrum is even symmetric about w=0 & odd symmetric about w=  & both H( ) is always zero for type 1 & 2 : Constant phase delay and group delay. Type 3 Sequence

M= integer value

 N 3  2 2 h(n)SinT(M  n)e jMT H(w) = j    n0  

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 113

 It shows generalized linear phase of  MT and constant group delay of M. The 2 Amplitude spectrum is odd symmetric about w=0 & w= and H(0) & H( ) are always zero. (Generalized means () may jump of at   0 if H(ejw) is imaginary. Type 4 Sequence

N  1  2 2 h(n)SinT(M  n)e jMT H(w) = j    n0   Generalized linear phase and constant group delay of M. The Amplitude spectrum is odd symmetric about w=0 & even symmetric about w= and H(0)=0 always. For N=even, even Symmetry h(n) = h(N-1-n)

N 1  jnT H( e jT ) = h(n)e n0

N 1 N 1 2  jnT  jnT = h(n)e + h(n)e  N n0 n 2 Let N-1-n = m

N 1 2 0  jnT  jT (N 1m) = h(n)e + h(N 1 m)e N n0 m 1 2 But h(N-1-m) = h(m)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 114

N N 1 1 2 2  jnT  jT (N 1m) == h(n)e + h(m)e n0 m0

N 1 N 1 N   1  N 1 2  jT   2  jnT  2   jT   = h(n)e e + h(m)e jT (N 1n)e  2  n0 n0

N T T 1  N 1   j(nT (N 1)  j(T (N 1n) (N 1)  2  jT   e 2  e 2 2h(n)e  2    =    n0 2  

N 1  N 1 2  jT    2    N 1 = 2h(n)e cosTn    n0   2 

N  N 1 1  jT   2  2    N 1 = e 2h(n)cosTn    ----Magnitude n0   2 

 N 1    T Linear Phase  2  Poles & Zeros of linear phase sequences: The poles of any finite-length sequence must lie at z=0. The zeros of linear phase sequence must occur in conjugate reciprocal pairs. Real zeros at z=1 or z=-1 need not be paired (they form their own reciprocals), but all other real zeros must be paired with their reciprocals. Complex zeros on the unit circle must be paired with their conjugate (that form their reciprocals) and complex zeros anywhere else must occur in conjugate reciprocal quadruples. To identify the type of sequence from its pole-zero plot, all we need to do is check for the presence of zeros at z=  and count their number. A type-2 seq must have an odd number of zeros at z=-1, a type-3 seq must have an odd number of zeros at z=-1 and z=1, and type-4 seq must have an odd number of zeros at z=1. The no. of other zeros if present (at z=1 for type=1 and type-2 or z=-1 for type-1 or type-4) must be even.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 115

FIR Filters  Fs Fs Fourier series Method  F  2 2  2Fs 2Fs  2F  2 2  s s    2 2 1. Frequency response of a discrete-time filter is a periodi function with period  s (sampling freq). 2. From the F.S analysis we know that any periodic function can be expressed as a linear combination of complex exponentials. Therefore desired freqency response of a discrete time filter can be represented by F.S as

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 116

 jT  jnT H(e )  h(n)e T = sampling period n The F.S co-efficient or impulse response samples of filter can be obtained using

1 s / 2 H(e jT )e jnTd h (n) = s s / 2 clearly if we wish to realize this filter with impulse response h(n), then it must have finite no. of co-efficient, which is equivalent to truncating the infinite expansion of H(e jT ) , which leads to approximation of H(e jT ), which is denoted by

m H (e jT )  h(n)e jnT 1  . nm N 1 We choose M= 2 , in order to keep ‘N’ no of samples in h(n).

M h(n)Z n H1(z) =  nM However, this filter can’t be physically realizable due to the presence of +ve powers of Z, means that the filter must produce an output that is advanced in time with respect to the i/p. this difficulty can be overcome by introducing a delay M= samples.

-M -M Therefore H(z) = Z H1(z) = Z

H(z) = h(-M)Z0 + h(-M+1) Z-1 +…. +h(M) Z-2M Let bi = h(i-M) i=0 to 2M

2M i H(z) = bi Z be the transfer function of discrete filter that is physically realizable. i0 Properties: 1. N=2M+1, impulse response co-eff, bi = 0 to 2M.

2. h(n) is symmetric about bM Ex: M=4 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 117

3. The duration of impulse response is Ti = 2MT 4. Its magnitude and time delay function can be found in the following way

jT  jMT jT H(e )  e H1(e )

jT jT H(e )  H1 (e )

This implies that magnitude response of the filter we have desired approximates the desire magnitude response. The time delay of H(ejw) is a constant M. thus sinusoids of different frequencies are delayed by the same amount as they are processed by the filter, we have designed. Consequently, this is a linear phase filter, which means that it does not introduce phase distortion. Ex: Design a LPF (FIR) filter with frequency response H(e jT ) 1 for   c

s = 0 for c    2 c 1 jnT h(n) = e d s c

2 c = Cos(nT)d s 0 2 SincnT = s nT

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 118

2 1 SincnT  SincnT = 1 n 2Fsn. Fs

bi = h(i-M) 2M b Z i H(z) =  i i0

s 2Fs 1 w= T  T    2 2 Fs

Ex: Design LPF that approximate following freq response. H(F) = 1 0  F 1000Hz = 0 else where 1000 F Fs/2 When the sampling frequency is 8000 SPS. The impulse response duration is to be limited to 2.5ms Ti = 2MT

2.5*103 M = 10 N=21 1 2* 800

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 119

c 1 jnT h(n) = 1.e d s c

Fc Fc Fc 1 j2FnT 1 j2FnT 2 = 1.e 2dF = e dF  Cos(2FnT )dF 2Fs Fc Fs Fc Fs 0 1 1 Sin2FcnT  Sin(0.25n ) = n n ______OR 1  w =  T = 2 *1000*  8000 4 w   Hc(w) = 1 4 = 0 else where

 1 4 jwn 1  1.e dw Sin(0.25n )  = 2 4 n h(0) = 0.25 h(6) = -0.05305 h(1) = 0.22508 h(7) = -0.03215 h(2) = 0.15915 h(8) = 0 h(3) = 0.07503 h(9) = 0.02501 h(4) = 0 h(10) = 0.03183 h(5) = -0.04502 bi = h(i-10)

20 i H(z) = bi Z i0 FIR HPF

1 c s / 2 h(n) =  1.e jnTd  e jnTd s s / 2 c 

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 120

jnT jnT 1 e c e s / 2   =  s / 2 c  s  jnT jnT 

s s  j nT j nT   jcnT jcnT  1 e  e 2  e 2  e  = s  jnT   

s s  j nT  j nT   2 1 e jcnT  e jcnT e 2  e 2    = s nT  2 j 2 j   

 2  s nT  = Sinc nT  Sin  2FsnT  2 

1 1 = sin  nT  Sinn = sin c nT  n c n FIR BPF

2 u 1 h(n) = cos nT d = sin u nT  sin l nT  s l n Ex: Desing a BPF for H(f) = 1 160  F 200Hz = 0 else where Fs = 800SPS Ti = 20 ms

Ti 20*103 M =   8 N = 17 2T 1 2* 800 1 sin 0.5n  sin 0.4n h(n) = Sin2Fu nT  Sin2Fl nT  = n n

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 121

h(0) = 0.1 h(4) = 0.07568 h(1) = 0.01558 h(5) = 0.06366 h(2) = -0.09355 h(6) = -0.05046 h(3) = -0.04374 h(7) = -0.07220 h(8) = 0.02338

16 i H(z) = bi Z i0 bi = h(i-8) h(-n) = h(n) WINDOWING Disadvantage of F.S is abrupt truncation of FS expansion of the freq response. This truncation result in a poor convergence of the series.

The abrupt truncation of infinite series is equivalent to multiplying it with the rectangular sequence.

WR(n) = 1 n  M = 0 else where  h(n)  h(n)WR (n)

 jw jw jw H(e )  H(e )*WR (e )

 1 j j(w ) = H(e )WR (e )d 2  Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 122

jw WR(e ) => FT of Rectangular Window

N 1 wN wN 2 Sin NSa 1.e jwndw 2 2 W (ejw) =  = = R  N 1  w w n  Sin Sa  2  2 2

4  Main lobe width = & it can be reduced by increasing N, but area of side lobe will N be constant.  For larger value of N, transition region can be reduced, but we will find overshoots & undershoots on pass band and non zero response in stop band because of larger side lobes. So there overshoots and leakage will not change significantly when rectangular window is used. This result is known as Gibbs Phenomenon. The desined window chts are 1. Small width of main lobe of the fre response of the window containing as much as of the total energy as possible. 2. Side lobes of the frequency response that decrease in energy as w tends to  . 3. even function about n=0 N 1 4. zero in the range n  2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 123

Let us consider the effect of tapering the rectangular window sequence linearly from the middle to the ends. Triangular Window:

2 n N 1 W (n) 1 n  T N 1 2 = 0 else where In this side lobe level is smaller that that of rectangular window, being reduced from -13 8 to -25dB to the maximum. However, the main lobe width is now . There is trade off N between main lobe width and side levels. General raised cosine window is  2n  W(n) =   (1)Cos  for  N 1 = 0 else where

If  =0.5 Hanning Window

If  =0.54 Hamming Window  2n   4n  W (n) = 0.42 + 0.5 Cos   0.08Cos  Blackman Window B  N 1  N 1 Kaiser Window

2   2n   Io 1     N 1      Wk (n)  for Io( ) = 0 else where  is constant that specifies a freq response trade off between the peak height of the side lobe ripples and the width or energy of main lobe and Io(x) is the zeroth order modified Bessel function of the first kind. Io(x) can be computed from its power series expansion given by

k 2   1  x   Io(x) = 1+     k1 k! 2   Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 124

2 2 3 0.25x 0.25x 2  0.25x 2  = 1 + 2 + + +….. (1!) (2 !)2 (3 !)2

Window Peak amplitude Transition width Minimum stop of side lobe dB of main lobe band deviation dB Rectangular -13 4 -21 k=1 N Triangular -25 8 -25 k=2 N Hanning -31 8 -44 k=2 N Hamming -41 -53 k=2

BlackMan -57 12 -74 k=3 N Kaiser variable variable -

If we let K1,W1 and K2,W2 represent cutoff (pass band) * stop band requirements for the digital filter, we can use the following steps in design procedure.

1. Select the window type from table to be the one highest up one list such that the stop band gain exceeds K2. 2. Select no. of points in the windows function to satisfy the transition width for the type 2 of window used. If Wt is the transition width, we must have Wt = W2-W1  k. N where K depends on type of window used. K=1 for rectangular , k=2 triangular….. 2 Therefore N  K w2  w1

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 125

If analog freq are given, it must be converted in to Digital using w=  T Ex: Apply the Hamming Window to improve the low pass filter magnitude response ontained in ex1:

 2n  N 1 WH(n) = 0.54 + 0.46 Cos  for n   N 1 2 = 0 else where N = 2M+1 = 21

WH(0) = 1 WH(6) = 0.39785

WH(1) = 0.97749 WH(7) = 0.26962

WH(2) = 0.91215 WH(8) = 0.16785

WH(3) = 0.81038 WH(9) = 0.10251

WH(4) = 0.68215 WH(10) = 0.08

WH(5) = 0.54 Next these window sequence values are multipled with coefficients h(n), obtained in ex1, to ontain modified F.S Co eff h’(n). h’(0) =0.25 h’(1) =0.22 h’(2) =0.14517 h’(3) =0.0608 h’(4) =0 h’(5) =0.02431 h’(6) =0.02111 h’(7) =-0.0086725 h’(8) =0 h’(9) =0.00256 h’(10) =0.00255

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 126

2M i H’(z) = b'i Z i0

bi' = h’(i-M) 0  i  20 h’(-n) = h’(n)

Ex: Find a suitable window and calculate the required order the filter to design a LP digital filter to be used A/D-H(Z)-D/A structure that will have a -3dB cutoff of at 30 rad/sec and an attenuation of 50dB at 45 rad/sec. the system will use a sampling rate of 100 samples /sec Sol: The desired equivalent digital specifications are obtained as 1 Digital ….. w  w  cT  30  0.3 k  3dB 1 c 100 1 1 w  2T  45  0.45 k  50dB 2 100 2 1. to obtain a stop band attenuation of -50dB or more a Hamming window is shosen since it has the smallest transition band. 2. the approximate no. of points needed to satisfy the transition band requirement (or the order of the filter ) can be found for w1 =0.3 rad &w2 = 0.45 rad, using Hamming window (k=2), to be 2 2.2 N  k  =26.65 w2  w1 0.45  0.3 N = 27 is selected

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 127

 the attractive property of the Kaiser window is that the side lobe level and main lobe width can be varied continuously by simple varying the parameter  . Also as in other window, the main lobe width can be adjusted by varying N.  we can find out the order of Kaiser window, N and the Kaiser parameters  to design FIR filter with a pass band ripple equal to or less that Ap, a minimum stop band attenuation equal to or greater than As, and a transition width Wt, using the following steps: Step 1 :

0.05Ap 0.05As 10 1  10 , p  s 100.05Ap 1 1p 1p Ap = 20log10 As = 20log10 => As =  20logs 1p s

1  100.05Ap = 1 0.05Ap 1 10 = 1

Therefore: solving above eq for  , we get 100.05Ap -1   100.05Ap 1 Step 2: Calculate As using the shosen values Aso=  20log

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 128

Step 3: Calculate the parameter  as follows for

= 0 for Aso  21 dB 0.4 = 0.5842(Aso -21) + 0.07886(Aso -21) for 21< Aso 50 dB

= 0.1102(Aso -8.7) for Aso >50 dB

Step 4: Calculate D as follows

D = 0.9222 for Aso 21 dB As  7.95 = for Aso >21 dB 14.36 Step 5: Select the lowest odd value of N satisfying the inequality samD N  1 t Wsam : Angular Sampling frequency  sam : Analog Freq  t = s- p for LPF = p- s for HPF Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 129

= Min[(  p1- s1), ( s2- p2)] for BPF

= Min[( s1 - p1), ( p2- s2)] for BSF -3dB cutoff freq c can ve considered as follows 1 c = p  s for LPF & HPF 2 t t c =   ;    for BPF 1 p1 2 c2 p2 2 t t c =  p1  ;c2   p2  for BSF 1 2 2 Ex: Calculate the Kaiser parameter and the no. of points in Kaiser window to satisfy the following lowpass specifications. Pass band ripple in the freq range 0 to 1.5 rad/sec  0.1 dB Minimum stop band attenuation in 2.5 to 5.0 rad /s  40 dB Sampling frequency : 10 rad/s Sol: 1 The impulse response samples can be calculated using h(n) = sin c nT  n 1 Where c = (1.5  2.5)=2rad/s 2 And the no. of points required in this sequence can be found as follows Step1:

0.05(40) s 10  0.01

0.05(0.1) 10 1 3 p   5.7564*10 100.05(0.1) 1

3 Therefore we choose,   5.7564*10 Step 2:

Aso = -20 log( ) = 44.797 dB Step 3 & 4:  = 0.5842 ( 44.797 -21)0.4 + 0.07886 ( 44.797 -21) = 3.9524

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 130

D = 2.566 Step 5: 10(2.566) N  1  26.66 => N=27 1

2   2n   Io 1     N 1      W (n)  k Io( ) Io() Wk (0)  1 Io()

2   2   Io3.9524 1     26      Io(3.94) 10.269 Wk (n)  =   0.9899 Io(3.9524) Io(3.9524) 10.3729

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 131

OBJECTIVE PAPER-1

1)What is the parsval’s theorem expression in DTFT :

∑ |x(n)|2=(1/2π) 2dw n=-∞

Match the following: 2) E = , P = 0 a) power 3) E  , P = 0 b) Neither energy nor power 4) E = , P  0, P   c) Energy

Match the following 5) e-t u(t) a) power 6) u(t) b) Neither energy nor power 7) 1/t c) Energy

j 2  n / 4 8) x (n) = 6e , what is the power of the signal a) 36W b) 72W c) 18W d) none

Match the following: For a real valued sequence, the DTFT follow the properties as 9) Re [H (jw) ] a) Real valued function of w 10) Im[ H(jw) ] b) even function of w 11) F.T [even symmetric sequence] c) Imaginary valued function of w 12) F.T [odd symmetric sequence] d) odd function of w

13) x(n) = {4, 1, 3} h(n) = {2, 5, 0, 4} what is the output of the system.

a) {8, 22, 11, 31, 4, 12} b) {8, 22, 11, 31, 4, 12} c) {8, 22, 11, 31, 4, 12} d) none

14) y(n) = x(n) * h(n) then y1 (n) = {0, 0, x(n), 0 } * { 0, h(n), 0 } is equal to a) {0, 0, y(n), 0} b) {0, 0, 0, y(n), 0, 0} c) [0, 0, y(n), 0 } d) {0, y(n), 0, 0}

15)If x(n) and h(n) are having N values each, to obtain linear convolution using circular convolution, the number of zeros to be appended to each sequence is a) N – 1 b) 2N – 1 c) N d) N + 1

9 16)W4 = ? a) – j b) + j c) + 1 d) -1

17) DFT [ x* (-n) ] = ? a) X * (K) b) X * (-K) c) X * (N-K) d) none 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 b c a c a b a b d a c c b a a a

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 132

OBJECTIVE PAPER-2

1) The region of convergence of the Z-transform of a unit step function is a)|Z| >1 b) |Z|<1 c) (real part of Z ) >0 d) (real part of Z ) <0

2) The Z T of the function f(nT) = anT is a) Z/(Z-aT) b) Z/(Z+aT) c) Z/(Z-a-T) d) Z/(Z+a-T)  3) The Z T of the function  (n  k) is k0 a) (Z-1)/Z b) Z/(Z-1)2 c) Z/( Z-1) d) (Z-1)2/Z

4) The Z T of a signal is given by X(Z)= Z-1(1-Z-4)/( 4(1-Z-1)2) its final value is a) ¼ b) 0 c) 1 d) infinity

5) Consider the system shown in fig. The transfer function Y(Z) / X(Z) of the system is

  x(n) y(n) + +

Z-1

-b a a) (1+aZ-1)/ ( 1+bZ-1) b) (1+bZ-1)/ ( 1+aZ-1) c) (1+aZ-1)/ ( 1-bZ-1) d) (1-bZ-1)/ ( 1+aZ-1)

6) A linear discrete time system has the characteristic equation Z3-0.8 Z=0, the system a) is stable b) is marginally stable c) is un stable d) stability cannot be assessed from the given information

7) The advantage of Canonic form realization is a) smaller no of delay elements b) larger no of delay elements c) hard ware flexibility d) none 3 5 akx(n  k) bky(nk) 8) y(n) =  - k1 the minimum no of delay elements k2 needed to realize the system is a) 5 b) 10 c) 8 d) 11

9) Expand CSOS Ans: Cascaded form of second order section. PSOS Ans: Parallel form of Second order section

10) To ensure a causal system, the total no of zeros must be less than or equal to the total number of poles ( T / F )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 133

1 2 3 4 5 6 7 8 9 10 a a c c a a a c T

11) The poles or zeros at the origin do effect the magnitude response ( T / F)

12) All poles and zeros of a minimum phase system lie inside the unit circle ( T / F)

13) To realize FIR filter a) no feedback paths and forward path b) no feedback paths and no forward path c) feedback paths and no forward path d) feedback paths and forward path

14) Find total no of complex multiplications using FFT for N=8: ______

15) Find total no of complex additions using FFT for N=8: ______

16) Find total no of real additions using direct DFT for N=8: ______

11 12 13 14 15 16 F T a 12 24 240

17) What is Z T of 2 (3n) u (-n-1): ____(-2)/(1-3z-1_)___ or (-2z)/(z-3)______

18) (2M) Show the structure of Z Direct form –II for 2nd order system Z x(n) y(n)

Z -1 a1 + b1 -1 b2 Z a2

-1 19) Show the structure of butterfly b3 Z a3

Z-1 bnp anp Z-1 bm

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 134

OBJECTIVE PAPER-3 State TRUE or FALSE  1) u(n) =  (n  k) K 0 2) x(n) = cos 0.5n is periodic sequence

3) Discrete-time sinusoidal signals with frequency that are separated by an integral multiple of 2π are identical

4) y(n) =x(-n) is time invariant

Match the following  5)  h(k)   1 Zero input response  6) Impulse response of difference equation is 2 linear

7) y(n) = |x(n)| 3 Stable

8) y(n) = x(n2) 4 Time invariant

CHOOSE THE CORRECT ANSWER

9) x(n) = Cos 0.125n , what is the period of the sequence a) 8 b) 16 c) 125 / 2 d) none

10) y (n) = x (2n) a) Causal b) Non-Causal c) Time invariant d) none

11) x(-n + 2) is obtained using following operartion a) x (-n) is delayed by two samples b) x (-n) is advanced by two samples c) x (n) is shifted left by two samples d) none

12) In situations where both interpolation and decimation are to be performed in succession, it is therefore best to a) Interpolate first, then decimate b) Decimate first and interpolate c) Any order we can perform d) none

1 2 3 4 5 6 7 8 9 10 11 12 T F T F 3 1 4 2 B B A a 13) The output of anti causal LTI system is  n a) y (n) = h(k)x(n  k) b) y (n) = h(k)x(n  k) K 0 K 0 1  c) y (n) = h(k)x(n  k) d) y (n) = h(k)x(n  k)   Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 135

14) (n-k) * x (n-k) is equal to a) x(n-2k) b) x(n-k) c) x(k) d) none

15) Given x(n) the y(n) = x(2n – 6) is a) x(n) is Compressed by 2 and shifted by 6 b) x(n) is Compressed by 2 and shifted by 3 c) x(n) is Expanded by 2 and shifted by 3 d) none

16) Decimation by a factor N is equivalent to a) Sampling x(t) at intervals ts / N b) Sampling x(t) at intervals tsN c) N fold increase in sampling rate d) none

17) In fractional delay, x(n-M/N), specify the order of operation. a) Decimation by N, shift by M, Interpolation by N b) Shift by M, Decimation by N and Interpolation by N c) Interpolation by N, Shift by M and Decimation by N d) All are correct

18) Given g(n) ={1,2,3}, find x(n) = g (n / 2), using linear interpolation  a) 1, 0, 2, 0, 3 b) 1, 1, 2, 2, 3, 3 c) 1, 3/2, 2, 5/2, 3 d) none

19) h1(n) + h3(n) y(n)

+

x(n) h2(n)

In the figure shown, how do you replace whole system with single block a) [ h1(n) + h2(n) ] * h3(n) b) h1(n)h3(n) * h2(n)h3(n) c) [ h1(n) + h2(n) ] h3(n) d) none

20 The h(n) is periodic with period N, x(n) is non periodic with M samples, the output y(n) is a) Periodic with period N b) Periodic with period N+M c) Periodic with period M d) none 13 14 15 16 17 18 19 20 C A B B C C A A

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 136

OBJECTIVE PAPER-4

1) If x(n) = {-1, 0, 1, 2, 1, 0, 1, 2, 1, 0, -1} What is X(0)

a) 6 b) 10 c) 0 d) none

2) If x(n) = 1, |n|≤2 0, other wise Find DTFT a) sin(5w)/sinw b) sin(4w)/sinw c) sin(2.5w)/sin(0.5w) d) none of the above

3) If x(n)=h(n)=u(n), then h(n) is equal to a) (n+1)u(n) b) r(n) c) r(n-1) d) none

4) if x ~ (n) = { 1,0,1,1} and h ~(n) = { 1, 2, 3,1} find y ~(n) a) {6 , 6, 5, 4} b) {1, 2, 4, 4} c) {5, 4, 1, 0} d) None

5) x(n) = {4, 1, 3} h(n) = {2, 5, 0, 4} what is the output of the system.

a) {8, 22, 11, 31, 4, 12} b) {8, 22, 11, 31, 4, 12} c) {8, 22, 11, 31, 4, 12} d) none

6) y(n) = x(n) * h(n) then y1 (n) = {0, 0, x(n), 0 } * { 0, h(n), 0 } is equal to a) {0, 0, y(n), 0} b) {0, 0, 0, y(n), 0, 0} c) [0, 0, y(n), 0 } d) {0, y(n), 0, 0}

7) If x(n) and h(n) are having N values each, to obtain linear convolution using circular convolution, the number of zeros to be appended to each sequence is a) N – 1 b) 2N – 1 c) N d) N + 1

9 8)W4 = ? a) – j b) + j c) + 1 d) -1

9) DFT [ x* (-n) ] = ? a) X * (K) b) X * (-K) c) X * (N-K) d) none

10) If x(n)X(K), then IDFT [ X (K), X(K) ] = ? a) x (n / 2) b) 2x (n/2) c) ½ x (2n) d) none.

11) Both discrete and periodic in one domain are also periodic and discrete in other domain (T / F)

12) If h(n)= -h(-n) then H(K) is purely real (T / F)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 137

13) Reversing the N point sequence in time is equivalent to reversing the DFT values (T / F)

14) FT of non periodic discrete time sequence is non periodic (T / F) Match the following: For a real valued sequence, the DTFT follow the properties as 15) Re [H (jw) ] a) Real valued function of w 16) Im[ H(jw) ] b) even function of w 17) F.T [even symmetric sequence] c) Imaginary valued function of w 18) F.T [odd symmetric sequence] d) odd function of w n=N-1 nk 19) Write DFF & IDFT formulas. X(k)=∑x(n)Wn n=0 N-1 x(n)=(1/N)∑X(k)Wnnk K=0 20) Total no of real multiplications in DFT is: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 A C A A C B A A A A T F T F B D A C 4n2

OBJECTIVE PAPER-5

Choose the Correct Answers

1. The Fourier transform of a finite energy discrete time signal, x(n) is defined as [ ]

  a) X( )=  x(n) ejn b) X( )= x(n) en n=- n=-

  c) X( )= x(n) e-jn d) X() = x(n) e-jn n=- n=0 2. Inverse DFT (IDFT) of X(K) is x(n), where k=0,1,-----n-1. It is given as [ ]

N 1 j2kn N 1 j2kn 1 a) x(n) =  X(k) e N b) a) x(n) =  X(k) e N N n0 n0  j2kn N j2kn c) x(n) =  X(k) e k d) a) x(n) =  X(k) e N n0 n0 3. A N – periodic sequence x(n) and its DFT x(k) are known. Then the DFT of x(n) = (n) will be a) e-j2nk b) 1 c) e-j2nok/N d) e-j2nk /N [ ]

4. If the length of sequence x(n) is L and h(n) is M then the length of o/p sequence of the circular convolution is [ ] a) L+M b) L+M-1 c) L if L>M d) 2L if L=M

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 138

STATE TRUE OR FALSE

5. The DFT of a sequence is a continuous function of  [ ]

6. The DFT of even sequence is purely imaginary and DFT of odd sequence is purely real [ ]

7. The circular shift of an N point sequence is equivalent to linear shift of its periodic extension [ ] 8. The multiplication of DFT of two sequences is equal to DFT of the linear convolution of two sequences [ ]

Fill in the blanks

9. The 4-point DFT of a sequence x(n) is ______

10. DFT of a sequence x(n) =  (n-n0) is ______

11. An N point sequence is called ______if it is antisymmetric about point zero on the circle

12. The two methods of sectioned convolution are ______& ______

13. DFT of multiplication of two sequences DFT {x1 (n) x2(n) } = ______

14. DFT of even sequence is X(k)= ______& DFT of odd sequence is X(k) = ______

15. To get the result of linear convolution with circular convolution of sequence x(n) & h(n), the sequences should extended to the length of ______

16. Match the following

1 DFT [ x1(n) x2(n) ] a) X (N-K) * 1 2. DFT [ x (n) ] b) [ X1(k)  X2(k)] N * 3. DFT [ x((-n))N ] c) X (N-K)

* 4. X1(k) X2 (k) d) x1(n) x2(n)

* e) x1(n) x2 (-n)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 139

1= 2= 3= 4=

17. Show that the given sequence x(n) = { 1,-2,3,2,1,0} for the following conditions using concentric circles. a) x(-n) b) x(2-n) (2M)

18. Compute 4-point DFT of a sequence x(n) = {1,2,0,2} (2M)

OBJECTIVE PAPER-6 MULTIPLE CHOICES 1. In Impulse invariant transformation, the mapping of analog frequency  to the digital frequency is a) one to one b) many to one c) one to many d) none 2. The digital frequency in bilinear transformation is -1 -1 a) w = 2 tan (Ts/2) b) w = tan (Ts/2) -1 -1 c) w = 2 tan (Ts) d) w = 2 tan (/2) 3. Which technique is useful for designing analog LPF a) Butter worth filter b) Chebyshev filter c) Both a and b d) none 4. Which filter is more stable? a) Butter worth b) Chebyshev c) none 5. As  increases , the magnitude response of LPF approaches with a) –20Ndb/oct b) –6Ndb/oct c) –10Ndb/dec d) none 6. Using Impulse invariant technique the pole at S= SP is mapped to Z-plane as -S (S ) S a) Z=e PTs b) Z=e PTs c) Z=e P (Ts) d) None TRUE or FALSE 7. The disadvantage of Chebyeshev filter is less transition region 8. The advantage of Butter worth filter is flat magnitude response. 9. for the given same specifications order of the Chebyshev filter is more than Butterworth filter 10. Poles of Butterworth filter lies on circle.

1 2 3 4 5 6 7 8 9 10 B A C A B B F T F T

FILL IN THE BLANKS 2N 11. The Butterworth LPF of order N is defined as: 1/(1+(s/jΩc) ) 12. For N=3 what are the stable Butter worth angles :1200,1800,2400

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 140

13. –0.5db convert in to gain equivalent =0.994

±j144° 2 2 14. Let S1,2 = 2076e Ha(S)= k/(s -10552.7s+(2076π) (2M)

-4 * 15. Given s = 2000; Ts = 10 ; s = 2006

16. Using Bi-linear transformation, the pole at S = Sp is mapped into Z-plane using (2M) Z=1-(2+SpTS)/(2-SpTs)

17. Given allowable ripples in Pass band is –3 dB, the value of  is 0.997 (2M)

OBJECTIVE PAPER-7 Choose the correct Answer

1. In impulse invariant transformation the mapping of analog frequency  to digital frequency  is [ ] a) one to one b) many to one c) one to many none

2. The digital frequency in Bi –linear transformation is [ ] a)  = 2 tan-1( T /2) b)  = tan-1( T /2) c)  = 2 tan-1( T ) d)  = 2 tan-1( /2) 3. Using bilenear transformation for T = 1sec the pole pk is in S- Plane is mapped to Z – plane using [ ] 1 z 1 Z 1 a) S = 2 b) S = c) S = 2 d) S= 1 z 1 Z 1

4. The normalized magnitude response of chebyshev type – I filter has a value of ______at cut off frequency are [ ] 1 1 1 a) b) c) d) 1  2 1  2 1  1  2

5. For high pass analog filter the transformation used is [ ] a) SS/ b) S  /S c) SS/c d) S c /S

6. The magnitude response of Type I – chebyshev LPF is given by [ ] 2 1 1 a) H a () = 2 b) = 2 2 1  CN ( / c ) 1  CN ( / c ) 1 c) = 2 2 d) H a () = 1  CN ( / c )

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 141

7. The width of main lobe in rectangular window spectrum is [ ] a) 2/N b) 4/N c) 8/N d) 16/N

8. The width of main lobe in Hamming window is [ ] a) 4/N b) 2/N c) 8/N d) 16/N 9. The frequency response of rectangular window WR(w ) is [ ] Sinwn / 2 Sinwn / 2 Sinwn / 2 Sinwn / 2 a) b) c) d) Sinw / 2 Sinw Sinwn Sinwn / 2

10. In …………………. Window spectrum the width of main lobe is double that of rectangular window for same value of N [ ] a) Hamming window b) Kaiser window c) Blackman window d) none

State TRUE or FALSE

11. The disadvantage of chebyshev filter is less transition region [ ]

12. For chebyshev Type 2 filter ripples are present in pass band and stop band [ ]

13. The advantage of Butter worth filter is flat magnitude response. [ ]

14. for cheby shev Type 1 filter equi–ripples are present only [ ] in pass band.

15. For same specifications, the order N of chebyshev filter is less compared to Butter worth filter. [ ]

16. FIR filter have non-linear phase characteristics. [ ]

17. FIR filters are non – recursive and stable filters. [ ] 18. The design of Digital transformation H (z) of IIR filter is direct and FIR is indirect [ ]

19. Poles of chebyshev filter lies on circle [ ]

20. In FIR filter with constant phase delay the impulse response is symmetric [ ]

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 142

OBJECTIVE PAPER-8

CHOOSE THE CORRECT ANSWER 1. The DTFT of a sequence x(n) is [ ]     a)  x(n)e jwn b)  x(n)e jwn c)  x(n)e jwndw d)  x(n)e jwndw n n  

2. DTFT of ejwon x(n) is [ ] j(ww ) a) x[ e j(wwo ) ] b) x[ e j(wwo ) ] c) x[ e o ] d) x[ e j(wwo ) ]

3. DTFT of x1[n] * x2[n] is [ ] 1 1 a) X1[w] X2[w] b) X1[w] X2[w] c) X1[w] * X2[w] d) X1[w] * X2[w] N N 4. The smallest value of N for which x(n +N) = x(n) holds is called [ ] a) Fundamental period b) Fundamental frequency c) fundamental signal d) None

5. DFS of real part of periodic signal is [ ] a) Xe(K) b) Xo (K) c) XR(K) d) XIm(K)

6. Expression for DFT is [ ] N 1 N 1 N 1 Kn Kn Kn a)  x(n)WN b)  x(n)WN C)  x(n)WN d) n0 n0 K 0

7. DFT of x1[n] x2[n] is [ ]

a) X1[K] * X2[K] b) X1[K] + X2[K] c) X1[K] * X2[K] d) X1[K] + X2[K]

8. If M & N are the lengths of x(n) & h(n) then length of x(n) * h(n) is [ ] a) M+ N –1 b) M + N +1 c) max (M,N) d) min (M,N)

9. Zero padding means [ ] a) increasing length by adding zeros at the end of sequence b) Decreasing length by removing zeros at the end c) Inserting zeros in between the samples d) None of the above II STATE TRUE OR FALSE 10. The F.T of discrete signal is a discrete function of  [ ]

11. In a discrete signal x(n), if x(n) =x(-n) then it is called symmetric signal [ ]

12. The F.T of the product of two time domain sequence is equivalent to product of their F.T [ ] 13. The DFT of a signal can be obtained by sampling one period of FT of the signal [ ] 14. DFS is same as DTFS [ ] Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 143

OBJECTIVE PAPER-9 CHOOSE THE CORRECT ANSWER 1. Power signal is a) Periodic b) aperiodic c) Continuous d) none [ ]

nK 2. WN is  j2K  j2Kn 2Kn a) e N b) e j2nK c) e N d) e N [ ]

3. When the sequence is circularly shifted in time domain by ‘m’ samples i.e. x((n-m))N then on applying DFT, it is equivalent multiply sequence in frequency domain by j2Km  j2Km 2Km a) e N b) e N c) e j2Km d) e N [ ]

4. Multiplication of sequence in time domain, on apply DFT, it corresponds to circular convolution in frequency domain and is given as DFT a) x1(n) x2(n)X1(K) X2(K) b) x1(n) x2(n) X1(K)X2(K) c) x1(n) * x2(n) X1(K) X2(K) N 1 d) x1(n) x2(n)  X1(K)X2(K) K 0

5. Linear convolution of two sequences N1 and N2 produces an output sequence of length a) N1 – N2 +1 b) N1 + N2 –1 c) N1 + N2 +1 d) 2N1 – N2 +1[ ]

FILL IN THE BLANKS 6. The basic signal flow graph for butterfly computation of DIT-FFT is

7. The Fourier transform of discrete time signal is called ………………………

8. FFT’s are based on the ………………………….. of an N-point DFT into successively smaller DFT’s.

9. The Fourier transform of x(n)*h(n) is equal to …………………………..

10. Appending zeros to a sequence in order to increase the size or length of the sequence is called ……………………..

11. In N-point DFT using radix 2 FFT, the decimation is performed …………… times.

12. In 8-point DFT by radix 2 FFT, there are …………… stages of computations with …………………….. butterflies per stage.

ln 13. If DFT of x(n) is X(K), then DFT of WN x(n) is …………………….

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 144

ANSWER THE FOLLOWING

14. What are the differences between linear and circular convolution?

15. How many multiplications and additions are required to compute N-point DFT using radix 2 FFT

16. How many multiplications and additions are required to compute N-point DFT

17. What is the expression for N-point DFT of a sequence x(n) ?

18. What is the expression for N-point IDFT of a sequence X(K) ?

19. Define Aliasing error.

20. What is meant by Inplace computation.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 145

OBJECTIVE PAPER-10 1. How we can calculate IDFT using FFT algorithm. (2M)

2. Draw the basic butterfly diagram for DIF algorithm.

3. Z[x(n)] = X(Z) then Z{x(n-m)} = …………………………………..

4. Define convolution property in Z-Transform.

5. Find the Z-Transform and ROC for the signal x(n) = an u(n).

6. Find the Z-Transform and ROC for the signal x(n) = - an u(-n-1).

7. Write the initial value theorem expression.

8. Z{(n)} = ……………………..

Z 9. Find inverse Z-Transform for X(z) = when ROC is Z<1 Z 1

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 146

10. What are the differences and similarities between DIT and DIF algorithms. (2M)

11. Give the Direct form II realization for second order system.

12. Give the Direct for I realization for second order system.

13. What is the relationship between Z-Transform and Fourier transform.

STATE TRUE OR FALSE:

14. ROC of a causal signal is the exterior of a circle of some radius r. [ ]

15. ROC of a anti causal signal is the exterior of a circle of some radius r. [ ]

16. ROC of a two sided finite duration frequency is entire Z-plane. [ ]

17. Direct form I required less no.of memory elements as compared to Canonic form.[ ] 18. A linear time invariant system with a system function H(Z) is BIBO stable if and only if the ROC for H(Z) contains unit circle. [ ]

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 147

OBJECTIVE PAPER-11

ANSWER THE FOLLOWING

1. What are the advantages of digital filter over analog filter.

2. What is the relation between analog and digital radiant frequency in Impulse Invariance design..

3. What is the relation between analog and digital radiant frequency in Bilinear transformation design.

4. What are the drawbacks with Impulse Invariance method?

5. What is the disadvantage with Bilinear transformation technique.

6. What is the relation between S & Z in Bilinear transformation?

7. Mention any two techniques to design IIR Filter from analog filter.

8. What are the differences between Chebyshev type I and type II.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 148

9. What are the differences between Butterworth & Chebyshev filter.

10. What is the expression for magnitude squared frequency response of Butterworth analog filter?

11. What is the expression for magnitude squared frequency response of Chebyshev analog filter?

TRUE OR FALSE 12. Poles of Butterworth filter lies on circle. [ ]

13. Poles of Chebyshev filter lies on circle. [ ]

14. Transition bandwidth for Chebyshev is more as compared to Butterworth filter.[ ] 15. Butterworth filters are all pole filters. [ ]

16. Chebyshev, type-II are all pole filters. [ ]

17. Chebyshev, type II filter exhibit equiripple behavior in the pass band and monotonic characteristic in the stopband. [ ]

18. Chebyshev, type I filter exhibit equiripple behavior in the pass band and monotonic characteristic in the stopband. [ ]

19. Butterworth filter exhibit monotonic behavior both in passband and stopband.[ ]

20. For the given specifications order of the Chebyshev filter is more as compared to Butterworth filter. [ ]

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 149

OBJECTIVE PAPER-12

1. Define the following

a. Time variant system with an example(Equation)

b. Power signal with an example

c. Dynamic system

d. Recursive System

e. Non Recursive system

2. Give the example for FIR and IIR systems.

3. Give an example of Causal system

4. Write the condition to test the Linearity of the system

5. Plot y(n) = x(n-2) Give x(n) ={1,2,3,5,6}

6. Resolve the signal into impulse x(n)={4,5,4,4} ------2 Marks

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 150

7. Give the expression for Convolution sum y(n)=

8. Find the Convolution Sum Graphically with all the steps------3 Marks x(n)= 2 1 h(n)= 1 1

-1 0 0 1

9. Write the properties of Convolution Sum ------2 Marks

10. Write the expression for X(n) in terms of impulses

11. Write the necessary condition for the stability of the system

12. Write the general form of Difference equation

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 151

OBJECTIVE PAPER-13 State TRUE or FALSE

1. In direct –form II realization the number of memory locations required is more than that of direct form –I realization [ ]

2. An LTI system having system function H(z) is stable if and only if all poles of H(z) are out side the unit circle. [ ]

3. The inverse Z – transform of z/z-a is an u(n) [ ]

4. Digital filters are not realizable for ideal case. [ ]

5. As the order of Butter worth filter increases than the response is closer to ideal filter response. [ ] Answer the following

6. Find the transfer function H(z) of the given difference equation Y(n) = 0.7 y(n-1) – 0.12y(n-2) + x(n-1) + x(n-2)

7. Indicate the poles and zeros of the given system and also check the stability of the system z(z 1) H(z) = (2M) (z  0.2)(z  0.4)(z  0.5)

8. Realize the given system function H(z) using direct form –II 3  3.6z 1  0.6z 2 H(z) = (2M) 1 0.1z 1  0.2z 2

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 152

9. Realize the given system function H(z) using cascade form (2M) 1 H(z) = (1 0.5z 1 )(1 0.5z 1 )

z 10. Find the inverse z-transform of x(z) = using partial fraction method. (z  2)(z  3) (2M)

11. Using cauchy residue method find the inverse z- transform of z x(z) = for ROC :z >2 (2M) (z 1)(z  2)

12. Mention the two conditions to realize any digital filter

13. Draw the Magnitude response of Low Pass Butter Worth filter.

14. The order of the Butter Worth filter is obtained by using the formula N ______

15. The cut- off frequency c is obtained by using the formula ______

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 153

OBJECTIVE PAPER-14

Fill in the Blanks 1. The expansion of FFT is ______

2. The main advantage of FFT is ______

3. The number of multiplications needed in the calculation of DFT using FFT with 32- point sequence = ______

4. ______number of additions are required to compute N – pt DFT using radix –2 FFT.

5. What is decimation in time algorithm.

State TRUE or FALSE

6. For DIT –FFT algorithm the input is bit reversed and the output is in natural order [ ]

7. By using radix –2 DIT –FFT algorithm it is possible to calculate 6-point DFT.[ ]

NK 8. WN  1 [ ]

NK 9. WN / 2  1 [ ]

10. In DIT –FFT, the input sequence is divided into smaller subsequences [ ]

Answer the following

11. Calculate the DFT of the sequence x(n)={1,0,0,1} using DIT –FFT (2M) 12. Draw the Butterfly diagram for 8-point DFT using DIT –FFT algorithm (2M)

13. Find IDFT of the sequence X(k) = { 10, 0, 10, 0} (2M)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 154

14. Write the steps for the calculation of IDFT using DIT –FFT (2M)

15.Write the values of the following 0 2 3 5 a) W8 b) W8 c) W8 d) W8 OBJECTIVE PAPER-15 CHOOSE THE CURRECT ANSWER

1. y(n)=x(2n) is a ______system [ ] a) time invariant b) causal c) non causal d) none

2. y(n) = nx2(n) is a ______system [ ] a) Linear b) Non-linear c) time-invariant d) none

3. y(n)= x(n) +x(n-1) is a ______system [ ] a) Dynamic b) Static c) time variant d) None

4. x(-n+2) is obtained by which of the following operations [ ] a) x(-n) is shifted left by 2 samples b) x(-n) is shifted right by 2 samples c) x(n) is shifted left by 2 samples d0 none

5. The necessary and sufficient condition for causality of an LTI system is [ ] a) h(n) =0 for n=0 b) h(n) =0 for n>0 c) h(n) =0 for n<0 d) none

6. The convolution of two sequences x(n) =h(n) = {1, 2, -1} [ ] a) { 1,4,2,-4,1} b) {1,-4,1,2,4} c) { 1,1,2,-4,4} d) { 4,-4,2,1,1}

II STATE TRUE OR FALSE

7. An IIR system exhibits an impulse response for finite interval [ T/F ]

8. If the energy of a signal is infinite then it is called energy signal [ T/F ]

9. Static systems does not require memory [ T/F ]

10. A linear system is stable if its impulse response is absolutely summable[T/F ]

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 155

III Answer the following:

11. The average power of a discrete time signal with period N is given by ______

12. The convolution sum of causal system with causal sequence is ______

13. Give the graphical representation of the following discrete signals.

i) x(n) = (5-x) [ 4(x) – 4(x-3)}

ii) x(n) = -0.5(n+1) + 0.5(n) – 0.75 (n-2)

14. x(n) = {3, -2, 1,0,-1} show for x(-n) (1M)

15. If x(n) = {1,2,-2,-1} show for x(n-2) & X( -n+2) (2M)

16. Find the convolution of u(n) * u(n-2) (1M)

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 156

17. If the impulse response h(n) = 2n u( -n) then determine the corresponding system is causal or stable. (1M)

18. Test the given discrete system for linearity , causality and time invariance h(n) = n ex(n) ( 2M) ASSIGNMENT UNIT-5 1 (a) Draw the frequency response of N-point rectangular window. (b) Design a fifth order band pass linear phase filter for the following specifications. i. Lower cut-off frequency = 0.4 πrad/sec ii. Upper cut-off frequency = 0.6 πrad/sec iii. Window type = Hamming Draw the filter structure. [4+12]

2) Design a band pass filter to pass frequencies in the range 1-2 radians/second using Hanning window N=5. Draw the filter structure and plot its spectrum. [16]

3) (a) Compare the performances of rectangular window, hamming window and Keiser window (b) The desired response of a low pass filter is Hd(ej!) = _ e−j3!, −3π _ ω _ 3π/4 0 , 3π/4 _ |ω| _ π Determine H(ej!) for M=7 using a Hamming window. [6+10]

4) (a) Design a linear phase low pass filter with a cut-off frequency of π/2 radians/seconds. Take N=7 (b) Derive the magnitude and phase functions of Finite Impulse Response filter when i. impulse response is symmetric & N is odd ii. impulse response is symmetric & N is even. [8+8]

5) (a) Design a low pass filter by the Fourier series method for a seven stage with cut-off frequency at 300 Hz if ts = 1msec. Use hanning window. (b) Explain in detail, the linear phase response and frequency response properties of Finite Impulse Response filters. [8+8]

6) (a) Outline the steps involved in the design of FIR filter using windows. (b) Determine the frequency response of FIR filter defined by y(n) = 0.25x(n)+ x(n-1)+ 0.25x(n-2). Calculate the phase delay and group delay. [8+8]

7) (a) Define Infinite Impulse Response & Finite Impulse Response filters and com-pare.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 157

(b) Design a low pass Finite Impulse Response filter with a rectangular window for a five stage filter given: Sampling time 1 msec; fc = 200Hz.Draw the filter structure with minimum number of multipliers. [6+10]

ASSIGNMENT UNIT-7 1) a) What are the advantages of Multirate signal processing? b) Differentiate between Decimator and Interpolator? 2) Prove that spectrum of down sampler is sum of M uniformly shifted and stretched version of X(ejw) scaled by a factor 1/M and also discuss the aliasing effect? 3) State and prove any one identity property in down sampler and any one identity property in up sampler? 4) Let x(n)={1,3,2,5,-1,-2,2,3,2,1},find a) Up sample by 2 times and down sample by 4 times b) Down sample by 4 times and up sample by 2 times c) Justify why these outputs are not equal.

Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:[email protected],9052344333 158