DIGITAL SIGNAL PROCESSING

lecture notes for advanced digital signal processing. how is digital signal processing used. digital signal processing concepts and applications pdf free download
AlexSwift Profile Pic
AlexSwift,Singapore,Professional
Published Date:14-07-2017
Your Website URL(Optional)
Comment
DSP NOTES PREPARED BY Ch.Ganapathy Reddy Professor & HOD, ECE Shaikpet, Hyderabad-08 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 1 DIGITAL SIGNAL PROCESSING  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:ganapathi7898gmail.com,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. S = A Sin(wt) : real valued signal 1 jwt 4. S = A e : A Cos(wt)+j A Sin(wt) : Complex valued signal 2 S1(t)   5. S (t)= S2(t) : Multichannel signal 4   S3(t)  Ex: due to earth quake, ground acceleration recorder Ir(x, y,t)   6. I(x,y,t)= multidimensional Ig(x, y,t)  Ib(x, y,t)  II. Based on Representation: Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 3 III. Based on duration. 1. right sided: x(n)=0 for nN 2. left sided :x(n)=0 for nN 3. causal : x(n)=0 for n0 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 n0 Arbitrary sequence can be represented as a sum of scaled, delayed impulses. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 4 P (n) = a (n+3) +a  (u-1) +a (u-2) +a  (u-7) -3 1 2 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 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 n x (n) = A  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(w n+ ) for all n o 8.Complex exponential sequence Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 5 jwo If = e  j A = A e n j jwon x(n) = A e e n n = A Cos(w n+ ) + j A Sin(w n+ ) o o If  1, the sequence oscillates with exponentially growing envelope. If  1, the sequence oscillates with exponentially decreasing envelope. jwon So when discussing complex exponential signals of the form x(n)= A e or real sinusoidal signals of the form x(n)= A Cos(w n+ ) , we need only consider frequencies o in a frequency internal of length 2 such as  Wo  or 0 Wo2 . t V. Deterministic (x (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. 1 2  x(t) is an energy signal if it is finite valued and x (t) decays to zero fasten than t as t . Power signal: E =, P 0, P Ex: All periodic waveforms n Neither energy nor power: E=, P=0 Ex: 1/ t t 1 E=, P=, Ex: t VIII. Based on Symmetry 1. Even x(n)=x (n)+x (n) e o 2. Odd x(-n)=x (-n)+x (-n) e o 3. Hidden x(-n)=x (n)-x (n) e o 1 4. Half-wave symmetry. x (n)= x(n)+x(-n) e 2 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 6 1 x (n)= x(n)-x(-n) o 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: x (t) = x (t nT) p p T 1 2 For periodic signals P = x(t) dt  T 0 X rms = P For non periodic T 1 2 P = Lt x(t) dt  To 0 To x(t)dt Xavg = Lt  0 2  x(t) = A cos( 2 f t + ) P=0.5 A o  j( 2 fo t + ) 2 x(t) = A e P=A Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 7 1 1 2 2 2 E= A b E = A b E = A b 2 3 Q.  1 - t e dt =   0 Q. 1 1 2 2 2 Ex = A 0.5T + (-A) 0.5T = 0.5 A T 2 2 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 8 2 Px = 0.5 A Q. 1 1 2 2 Ey = A 0.5T 2 = A T 3 3 1 2 Py = A 3 jwt  x(t) = A e is periodic T 1 2 2 Px = x(t) dt = A  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: x (t) dt =0 0    Even symmetry: x (t) dt = 2 x (t) dt e e   0 Xe (t) +Ye (t): even symmetry. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,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 X (n)= x(n)+x(-n) e 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.  F = GCD ( f ,f ) 0 1 2 T = LCM (T , T2) 1  Y(t) = x (t) + x (t) 1 2 P = P +P y x1 x2 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 W =1- 1  W =1+ almost periodic OR non periodic. 2 2 2 P = 0.50.5 +0.5 =0.25 W x 2 Area of any sinc or Sinc equals area of triangle ABC inscribed within the main lobe. Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 10 Even though the sinc function is square integrable ( an energy signal) , it is not 1 absolutely integrable( because it does not decay to zero faster than ) 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 . -t = 2  (t) – 2e u(t) -t 2 e (t) = 2  (t) 1  (t )   t- =  2 2 I = 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 2  44   x1(t) = x(t) (t-kt ) = x(kt ) (t-kt  s s s) k  k  Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,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 d x(t) (t) = x() (t)= x ( ) ’ (t- ) -2 dt dt 1 = 2 x’ ( )  (t- ) + x (t) ’ (t- ) = x ( ) ’ (t- ) Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 12  x (t) ’ (t- ) = x ( ) ’ (t- ) - x’ ( )  (t- )  x (t) ’ (t- ) dt = x ( ) ’ (t- ) dt - x’ ( ) (t- ) dt    = 0- x’ ( ) = - x’ ( )  n n n Higher derivatives of (t) obey (t) = (-1) (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) -t What does the signal x(t) = e  ’(t) describe? x(t) = ’ (t) – (-1)  (t) = ’ (t) +  (t) 2 (t 3) (2t 2) 8cos(t) '(t 0.5)dt I =  2 d = 0.5 (t-3) t1 - 8 costt 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:ganapathi7898gmail.com,9052344333 13 2. x(n+2) = 2,3,4,5, 6 ,7 shift x(n) left 2 units.  4 3. x(-n) = 7,6,5, ,3,2 fold x(n) about n=0.  5 4. x(-n+1) = 7,6, ,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 1 1 , 2, 6, 4, 8  , 6, 8  , 1, 6, 6, 8, 8  n 2n n n/2 Step interpolation Decimation 1, 2, 6, 4, 8  1, 1,2,2,6, 6,4,4,8, 8  1, 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. 1 Ex: x(n) = 1, 2, 5, -1  Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 14 x(n/3) = 1,0,0, 2 2,0,0,5,0,0,-1,0,0 Zero interpolation.  2 = 1,1,1, ,2,2,5,5,5,-1,-1,-1 Step interpolation.  4 5 2 1 = 1, , , 2 , 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 4 y(n) = h(2n) = x(n-0.5) = x( ) = 2, , 6, 8  2 OR g(n) = x(n/2) = 2,3,4,5, 6 ,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) 3 = n x(n) + b x (n) 2 = x(n) = 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:ganapathi7898gmail.com,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/ (m +m +1) x(n k) 1 2 km1 th This system computes the n sample of the o/p sequence as the average of (m +m +1) 1 2 th samples of input sequence around the n 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:ganapathi7898gmail.com,9052344333 16 x(n) = …0,3,2,1,0,1,2,3,0,…. y(n) = …0,3,5,6,6,7,9,12,12… th th O/p at the n sample depends on the i/p’s till n 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 =  2 k0 k0 5. Linear Systems. If y (n) & y (n) are the responses of a system when x (n) & x (n) are the respective 1 2 1 2 inputs, then the system is linear if and only if x1(n) x2(n)= x1(n) + x2(n) = y (n) + y (n) (Additive property) 1 2 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 x1(n) + b x2(n) 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 n the o/p sequence value at index n= n o o depends only on the input sequence values for n n o. 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:ganapathi7898gmail.com,9052344333 17 For every bounded input B  for all n, there exists a fixed +ve finite value x(n) x By such that y(n) B . y 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(n ) = h(k)x(no k) o  k 1 = h(k)x(no k) + h(k)x(no k)  k k0 = h(-1) x(n +1) + h(-2) x(n +2)……….+h(0) x(n ) + h(1) x(n -1) + …. 0 0 0 0 y(n) is causal sequence if h(n) =0 n0 y(n) is anti causal sequence if h(n) =0 n 0 y(n) is non causal sequence if h(n) =0 nN  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) h (n) + h (n) = x(n) h (n) + x(n) h (n) 1 2 1 2 4. Convolution property is associative. x(n) h (n) h (n) = x(n) h (n) h (n) 1 2 1 2 Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 18 5 y(n) = h w(n) = h2(n)h1(n)x(n) = h3(n)x(n) 2 6 h (n) = h (n) + h (n) 1 2 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) b  x   y(n) B h(k) x  k   S= h(k) is necessary & sufficient condition for stability.  k   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:ganapathi7898gmail.com,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 n0. h(n) = 0.4 h(n-1) +  (n) h(0) = 0.4 h(-1) + =1  (0) h(1) = 0.4 h(0) = 0.4 2 h(2) = 0.4 n h(n) = 0.4 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)-  (n) h(-1) = 2.5 h(0)-  (0) = -2.5 2 n h(-2) = -2.5 . …….. h(n) = -2.5 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) -1 Y (z) = X (z) 1-0.5Z Ch Ganapathy Reddy, Prof and HOD, ECE, GNITS id:ganapathi7898gmail.com,9052344333 20

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.