<< Chapter < Page Chapter >> Page >

Convolution is very useful and powerful concept. It appears quite frequently in DSP discussion. It is begun with a rather twisted definition (folding before shifting), but it then becomes the representation of linear systems, and is linked to the Fourier transform and the z-transform.

As for convolution, correlation is defined for both analog and digital signals. Correlation of two signals measure the degree of their similarity. But correlation of a signal with itself also has meaning and application. The strength of convolution lies in the fact that if applies to signals as well as systems, whereas correlation only applies to signals. Correlation is used in many areas such as radar, geophysics, data communications, and, especially, random processes.

Cross-correlation and auto-correlation

Cross-correlation, or correlation for short, between two discrete-time signals x(n) and v(n), assumed real-valued, is defined as

R x v ( m ) = n = x ( n ) v ( n m ) m = 0 , ± 1 , ± 2 , ... MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamiEaiaadAhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0ZaaabCaeaacaWG4bGaaiikaiaad6gacaGGPaGaamODaiaacIcacaWGUbGaeyOeI0IaamyBaiaacMcaaSqaaiaad6gacqGH9aqpcqGHsislcqGHEisPaeaacqGHEisPa0GaeyyeIuoakiaaywW7caaMf8UaamyBaiabg2da9iaaicdacaGGSaGaaGjbVlabgglaXkaaigdacaGGSaGaaGjbVlabgglaXkaaikdacaGGSaGaaiOlaiaac6cacaGGUaaaaa@5F17@

or equivalently

R x v ( m ) = n = x ( n + m ) v ( n ) m = 0 , ± 1 , ± 2 , ... MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamiEaiaadAhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0ZaaabCaeaacaWG4bGaaiikaiaad6gacqGHRaWkcaWGTbGaaiykaiaadAhacaGGOaGaamOBaiaacMcaaSqaaiaad6gacqGH9aqpcqGHsislcqGHEisPaeaacqGHEisPa0GaeyyeIuoakiaaywW7caaMf8UaamyBaiabg2da9iaaicdacaGGSaGaaGjbVlabgglaXkaaigdacaGGSaGaaGjbVlabgglaXkaaikdacaGGSaGaaiOlaiaac6cacaGGUaaaaa@5F0C@

Notice that correlation at index n is the summation of the product of one signal and other signal shifted.

When the signals x(n) and v(n) are interchanged, we get

R v x ( m ) = n = v ( n ) x ( n m ) m = 0 , ± 1 , ± 2 , ... MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamODaiaadIhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0ZaaabCaeaacaWG2bGaaiikaiaad6gacaGGPaGaamiEaiaacIcacaWGUbGaeyOeI0IaamyBaiaacMcaaSqaaiaad6gacqGH9aqpcqGHsislcqGHEisPaeaacqGHEisPa0GaeyyeIuoakiaaywW7caaMf8UaamyBaiabg2da9iaaicdacaGGSaGaaGjbVlabgglaXkaaigdacaGGSaGaaGjbVlabgglaXkaaikdacaGGSaGaaiOlaiaac6cacaGGUaaaaa@5F17@

or equivalently

R v x ( m ) = n = v ( n + m ) x ( n ) m = 0 , ± 1 , ± 2 , ... MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamODaiaadIhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0ZaaabCaeaacaWG2bGaaiikaiaad6gacqGHRaWkcaWGTbGaaiykaiaadIhacaGGOaGaamOBaiaacMcaaSqaaiaad6gacqGH9aqpcqGHsislcqGHEisPaeaacqGHEisPa0GaeyyeIuoakiaaywW7caaMf8UaamyBaiabg2da9iaaicdacaGGSaGaaGjbVlabgglaXkaaigdacaGGSaGaaGjbVlabgglaXkaaikdacaGGSaGaaiOlaiaac6cacaGGUaaaaa@5F0C@

Thus

R x v ( m ) = R x v ( m ) MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamiEaiaadAhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0JaamOuamaaBaaaleaacaWG4bGaamODaaqabaGccaGGOaGaeyOeI0IaamyBaiaacMcaaaa@4270@

This result shows that one correlation is the flipped version (mirror-imaged) of the other, but otherwise contains the same information.

The evalution of correlation is similar to that of convolution expect no signal flipping is need, hence the computing steps are slide (shift) – multiply – add. The method of sequence (vector), as for the convolution ( section ), is one of the possible ways.

Find the cross-correlation of the following signals x ( n ) = [ 2 , 5 , 2 , 4 ] MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadIhacaGGOaGaamOBaiaacMcacqGH9aqpdaWadaqaaiaaikdacaGGSaGaaGjbVlaaiwdacaGGSaGaaGjbVlaaikdacaGGSaGaaGjbVlaaisdaaiaawUfacaGLDbaaaaa@45CA@ v ( n ) = [ 2 , 3 , 1 ] MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadAhacaGGOaGaamOBaiaacMcacqGH9aqpdaWadaqaaiaaikdacaGGSaGaaGjbVlabgkHiTiaaiodacaGGSaGaaGjbVlaaigdaaiaawUfacaGLDbaaaaa@43B7@ The figures in bold face are samples at origin.

Solution

First we choose the shorter sequence, in this case v(n), to be shifted, and the longer sequence, x(n), to stay stationary. Next the evaluate the correlation at m = 0 (no shifting yet), then the correlation at m = 1, 2, 3 … (shifting v(n) to the right) until v(n) has gone past x(n) completely. Next, we evaluate the correlation at = -1, -2, -3 … (shifting v(n) to the left) until v(n) has gone past x(n) completely. At each value of m, we do the multiplication and summing. The evaluation is arranged as follows. Remember to align the values of x(n) and v(n) at origin at be beginning.

x ( n ) = 2 , 5 , 2 , 4 , m = 0 : v ( n ) = 0 , 2 , 3 , 1 R ( 0 ) = 8 m = 1 : v ( n 1 ) = 0 , 0 , 2 , 3 R ( 1 ) = 8 m = 2 : v ( n 2 ) = 0 , 0 , 0 , 2 R ( 2 ) = 8 m = 1 : v ( n + 1 ) = 2 , 3 , 1 , 0 R ( 1 ) = 9 m = 2 : v ( n + 2 ) = 3 , 1 , 0 , 0 R ( 2 ) = 1 m = 3 : v ( n + 3 ) = 1 , 0 , 0 , 0 R ( 3 ) = 2 MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOabaeqabaGaaGzbVlaaywW7caaMf8UaaGjbVlaaysW7caWG4bGaaiikaiaad6gacaGGPaGaeyypa0JaaGOmaiaacYcacaaMe8UaaGynaiaacYcacaaMe8UaaGOmaiaacYcacaaMe8UaaGinaiaacYcaaeaaaeaacaWGTbGaeyypa0JaaGimaiaacQdacaaMf8UaamODaiaacIcacaWGUbGaaiykaiabg2da9iaaicdacaGGSaGaaGjbVlaaikdacaGGSaGaaGjbVlaaiodacaGGSaGaaGjbVlabgkHiTiaaigdacaaMf8UaeyO0H4TaaGzbVlaadkfacaGGOaGaaGimaiaacMcacqGH9aqpcaaI4aaabaaabaGaamyBaiabg2da9iaaigdacaGG6aGaaGzbVlaadAhacaGGOaGaamOBaiabgkHiTiaaigdacaGGPaGaeyypa0JaaGimaiaacYcacaaMe8UaaGimaiaacYcacaaMe8UaaGOmaiaacYcacaaMe8UaeyOeI0IaaG4maiaaywW7cqGHshI3caaMf8UaamOuaiaacIcacaaIXaGaaiykaiabg2da9iabgkHiTiaaiIdaaeaacaaMf8oabaGaamyBaiabg2da9iaaikdacaGG6aGaaGzbVlaadAhacaGGOaGaamOBaiabgkHiTiaaikdacaGGPaGaeyypa0JaaGimaiaacYcacaaMe8UaaGimaiaacYcacaaMe8UaaGimaiaacYcacaaMe8UaaGOmaiaaywW7cqGHshI3caaMf8UaamOuaiaacIcacaaIYaGaaiykaiabg2da9iaaiIdaaeaaaeaacaWGTbGaeyypa0JaeyOeI0IaaGymaiaacQdacaaMf8UaamODaiaacIcacaWGUbGaey4kaSIaaGymaiaacMcacqGH9aqpcaaIYaGaaiilaiaaysW7cqGHsislcaaIZaGaaiilaiaaysW7caaIXaGaaiilaiaaysW7caaIWaGaaGzbVlabgkDiElaaywW7caWGsbGaaiikaiabgkHiTiaaigdacaGGPaGaeyypa0JaeyOeI0IaaGyoaaqaaaqaaiaad2gacqGH9aqpcqGHsislcaaIYaGaaiOoaiaaywW7caWG2bGaaiikaiaad6gacqGHRaWkcaaIYaGaaiykaiabg2da9iabgkHiTiaaiodacaGGSaGaaGjbVlaaigdacaGGSaGaaGjbVlaaicdacaGGSaGaaGjbVlaaicdacaaMf8UaeyO0H4TaaGzbVlaadkfacaGGOaGaeyOeI0IaaGOmaiaacMcacqGH9aqpcqGHsislcaaIXaaabaaabaGaamyBaiabg2da9iabgkHiTiaaiodacaGG6aGaaGzbVlaadAhacaGGOaGaamOBaiabgUcaRiaaiodacaGGPaGaeyypa0JaaGymaiaacYcacaaMe8UaaGimaiaacYcacaaMe8UaaGimaiaacYcacaaMe8UaaGimaiaaywW7cqGHshI3caaMf8UaamOuaiaacIcacqGHsislcaaIZaGaaiykaiabg2da9iaaikdaaaaa@10BC@

Final result :

R x v ( m ) = [ 2 , 1 , 9 , 8 , 8 , 8 ] MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOqaaiaadkfadaWgaaWcbaGaamiEaiaadAhaaeqaaOGaaiikaiaad2gacaGGPaGaeyypa0ZaamWaaeaacaaIYaGaaiilaiaaysW7cqGHsislcaaIXaGaaiilaiaaysW7cqGHsislcaaI5aGaaiilaiaaysW7caaI4aGaaiilaiaaysW7cqGHsislcaaI4aGaaiilaiaaysW7caaI4aaacaGLBbGaayzxaaaaaa@509D@

Given two signals x ( n ) = a n u ( n ) v ( n ) = b n u ( n ) MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOabaeqabaGaamiEaiaacIcacaWGUbGaaiykaiabg2da9iaadggadaahaaWcbeqaaiaad6gaaaGccaWG1bGaaiikaiaad6gacaGGPaaabaaabaGaamODaiaacIcacaWGUbGaaiykaiabg2da9iaadkgadaahaaWcbeqaaiaad6gaaaGccaWG1bGaaiikaiaad6gacaGGPaaaaaa@492E@ Compute the cross-corelation.

Solution

The cross-correlation is

R v x ( m ) = n = [ a n u ( n ) ] [ b n m u ( n m ) ] = n = a n b n m u ( n ) u ( n m ) MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabaGaaiaacaqaaeaadaqaaqaaaOabaeqabaGaamOuamaaBaaaleaacaWG2bGaamiEaaqabaGccaGGOaGaamyBaiaacMcacqGH9aqpdaaeWbqaamaadmaabaGaamyyamaaCaaaleqabaGaamOBaaaakiaadwhacaGGOaGaamOBaiaacMcaaiaawUfacaGLDbaaaSqaaiaad6gacqGH9aqpcqGHsislcqGHEisPaeaacqGHEisPa0GaeyyeIuoakmaadmaabaGaamOyamaaCaaaleqabaGaamOBaiabgkHiTiaad2gaaaGccaWG1bGaaiikaiaad6gacqGHsislcaWGTbGaaiykaaGaay5waiaaw2faaaqaaaqaaiaaywW7caaMf8UaaGzbVlabg2da9maaqahabaGaamyyamaaCaaaleqabaGaamOBaaaakiaadkgadaahaaWcbeqaaiaad6gacqGHsislcaWGTbaaaOGaamyDaiaacIcacaWGUbGaaiykaiaadwhacaGGOaGaamOBaiabgkHiTiaad2gacaGGPaaaleaacaWGUbGaeyypa0JaeyOeI0IaeyOhIukabaGaeyOhIukaniabggHiLdaaaaa@72C3@

The summation is divided into two ranges of of m depending on the shifting direction of v(n) with respect to x(n).

  • For m<0, v(n) is shifted to the left of x(n), the summation lower limit is n = 0 :

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 454 and ece 554 supplemental reading. OpenStax CNX. Apr 02, 2012 Download for free at http://cnx.org/content/col11416/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 454 and ece 554 supplemental reading' conversation and receive update notifications?

Ask