<< Chapter < Page Chapter >> Page >
Tabs Showing Convolution Properties

Linear circuit analysis using convolution

In this part, let us consider an application of convolution in analyzing RLC circuits to gain a better understanding of the convolution concept. A linear circuit denotes a linear system, which can be represented with its impulse response h ( t ) size 12{h \( t \) } {} , that is, its response to a unit impulse input. The input to such a system can be considered to be a voltage v ( t ) size 12{v \( t \) } {} and the output to be the circuit current i ( t ) size 12{i \( t \) } {} . See [link] .

Impulse Response Representation of a Linear Circuit

For a simple RC series circuit shown in [link] , the impulse response is given by [link] ,

h ( t ) = 1 RC exp ( 1 RC t ) size 12{h \( t \) = { {1} over {RC} } "exp" \( - { {1} over { ital "RC"} } t \) } {}

which can be obtained for any specified values of R and C. When an input voltage v ( t ) size 12{v \( t \) } {} (either DC or AC) is applied to the system, the circuit current i ( t ) size 12{i \( t \) } {} can be obtained by simply convolving the system impulse response with the input voltage, that is

i ( t ) = h ( t ) v ( t ) size 12{i \( t \) =h \( t \) * v \( t \) } {}
RC Circuit

Similarly, for the simple RL series circuit shown in [link] , the impulse response is given by [link] ,

h ( t ) = R L exp ( R L t ) size 12{h \( t \) = { {1} over {L} } "exp" \( - { {R} over {L} } t \) } {}

When an input voltage v ( t ) size 12{v \( t \) } {} is applied to the system, the circuit current i ( t ) size 12{i \( t \) } {} can be obtained by computing the convolution integral.

RL Circuit

[link] shows the block diagram of this linear system and [link] the corresponding front panel. From the front panel, one can control the system type (RL or RC), input voltage type (DC or AC) and input voltage amplitude. One can also observe the system response by changing R, L and C values. Three graphs are used to display the input voltage v ( t ) size 12{v \( t \) } {} , impulse response of the circuit h ( t ) size 12{h \( t \) } {} and circuit current i ( t ) size 12{i \( t \) } {} .

Block Diagram of the Linear Circuit Application

Front Panel of the Linear Circuit Application

Lab exercises

Echo Cancellation

In this exercise, consider the problem of removing an echo from a recording of a speech signal. The LabVIEW MathScript function sound() or the function Play Waveform in LabVIEW can be used to play back the speech recording. To begin, load the .m file echo_1.wav provided on the book website by using the function wavread(‘filename’) . This speech file was recorded at the sampling rate of 8 kHz, which can be played back through the computer speakers by typing

>>sound(y)

You should be able to hear the sound with an echo. If the LabVIEW function Play Waveform (Functions Programming Graphics&Sound Sound Output Play Waveform) is used to play the sound, you first need to build a waveform based on the loaded data and the time interval dt = 1 / 8000 size 12{ ital "dt"=1/"8000"} {} because this speech was recorded using an 8 kHz sampling rate. Connect the waveform to the function Play Waveform .

An echo is produced when the signal (speech, in this case) is reflected off a non-absorbing surface like a wall. What is heard is the original signal superimposed on the signal reflected off the wall (echo). Because the speech is partially absorbed by the wall, it decreases in amplitude. It is also delayed. The echoed signal can be modeled as ax ( t τ ) size 12{ ital "ax" \( t - τ \) } {} where a < 1 size 12{a<1} {} and τ size 12{τ} {} denotes the echo delay. Thus, one can represent the speech signal plus the echoed signal as [7]

y ( t ) = x ( t ) + ax ( t τ ) size 12{y \( t \) =x \( t \) + ital "ax" \( t - τ \) } {}

What is heard is y ( t ) size 12{y \( t \) } {} . In many applications, it is important to recover x ( t ) size 12{x \( t \) } {} – the original, echo-free signal – from y ( t ) size 12{y \( t \) } {} .

Method 1

In this method, remove the echo using deconvolution. Rewrite Equation (7) as follows [7]:

y [ ] = x [ ] + ax [ ( n N ) Δ ] = x [ ] ( δ [ ] + [ n N ] Δ ) = x [ ] h [ ] size 12{y \[ nΔ \] =x \[ nΔ \]+ ital "ax" \[ \( n - N \) Δ \] =x \[ nΔ \]* \( δ \[ nΔ \] +aδ \[ n - N \]Δ \) =x \[ nΔ \] * h \[ nΔ \]} {}

The echoed signal is the convolution of the original signal x ( ) size 12{x \( nΔ \) } {} and the signal h ( ) size 12{h \( nΔ \) } {} . Use the LabVIEW MathScript function deconv(y,h) to recover the original signal.

Method 2

An alternative way of removing the echo is to run the echoed signal through the following system:

z [ ] = y [ ] az [ ( n N ) Δ ] size 12{z \[ nΔ \] =y \[ nΔ \]- ital "az" \[ \( n - N \) Δ \] } {}

Assume that z [ ] = 0 size 12{z \[ nΔ \] =0} {} for n < 0 size 12{n<0} {} . Implement the above system for different values of a size 12{a} {} and N size 12{N} {} .

Display and play back the echoed signal and the echo-free signal using both of the above methods. Specify the parameters a size 12{a} {} and N size 12{N} {} as controls. Try to measure the proper values of a size 12{a} {} and N size 12{N} {} by the autocorrelation method described below.

The autocorrelation of a signal can be described by the convolution of a signal with its mirror. That is,

R xx [ n ] = x [ n ] x [ n ] size 12{R rSub { size 8{ ital "xx"} } \[ n \] =x \[ n \]* x \[ - n \] } {}

Use the autocorrelation of the output signal (echo-free signal) to estimate the delay time ( N size 12{N} {} ) and the amplitude of the echo ( a size 12{a} {} ). For different values of N size 12{N} {} and a size 12{a} {} , observe the autocorrelation output. To have an echo-free signal, the side lobes of the autocorrelation should be quite low, as shown in [link] .

Autocorrelation Function of a Signal: (a) Echo Is Not Removed Completely; (b) Echo Is Removed

[link] shows a typical front panel for this exercise. It is not necessary to obtain the same front panel but there should be controls for a size 12{a} {} and N size 12{N} {} as well as graphs to observe the echoed signal, echo-free signal and autocorrelation function of the echo-free signal.

Front Panel for the Echo Cancellation System

Insert Solution Text Here

Noise Reduction Using Mean Filtering

The idea of mean filtering is simply to replace each value in a signal with the mean (average) value of its neighbors. A mean filter is widely used for noise reduction.

Start by adding some random noise to a signal (use the file echo_1.wav or any other speech data file). Then, use mean filtering to reduce the introduced noise. More specifically, take the following steps:

  1. Normalize the signal values in the range [0 1].
  2. Add random noise to the signal by using the function randn . Set the noise level as a control.
  3. Convolve the noise-added signal with a mean filter. This filter can be designed by taking an odd number of ones and dividing by the size. For example, a 1 × 3 size 12{1 times 3} {} size mean filter is given by [1/3 1/3 1/3] and a 1 × 5 size 12{1 times 5} {} size mean filter by [1/5 1/5 1/5 1/5 1/5]. Set the size of the mean filter as an odd number control (3, 5 or 7, for example).

Insert Solution Text Here

Impulse Noise Reduction Using Median Filtering

A median filter is a non-linear filter that replaces a data value with the median of the values within a neighboring window. For example, the median value for this data stream [2 5 3 11 4] is 4. This type of filter is often used to remove impulse noise. Use the file echo_1.wav or any other speech data file and take the following steps:

  1. Normalize the signal values in the range [0 1].
  2. Randomly add impulse noise to the signal by using the LabVIEW MathScript function randperm . Set the noise density as a control.
  3. Find the median values of neighboring data using the function median and replace the original value with the median value. Set the number of neighboring values as an odd number control (3, 5 or 7, for example).

Insert Solution Text Here

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, An interactive approach to signals and systems laboratory. OpenStax CNX. Sep 06, 2012 Download for free at http://cnx.org/content/col10667/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?

Ask