<< Chapter < Page | Chapter >> Page > |
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 , that is, its response to a unit impulse input. The input to such a system can be considered to be a voltage and the output to be the circuit current . See [link] .
For a simple RC series circuit shown in [link] , the impulse response is given by [link] ,
which can be obtained for any specified values of R and C. When an input voltage (either DC or AC) is applied to the system, the circuit current can be obtained by simply convolving the system impulse response with the input voltage, that is
Similarly, for the simple RL series circuit shown in [link] , the impulse response is given by [link] ,
When an input voltage is applied to the system, the circuit current can be obtained by computing the convolution integral.
[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 , impulse response of the circuit and circuit current .
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 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 where and denotes the echo delay. Thus, one can represent the speech signal plus the echoed signal as [7]
What is heard is . In many applications, it is important to recover – the original, echo-free signal – from .
Method 1
In this method, remove the echo using deconvolution. Rewrite Equation (7) as follows [7]:
The echoed signal is the convolution of the original signal
and the signal
. 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:
Assume that for . Implement the above system for different values of and .
Display and play back the echoed signal and the echo-free signal using both of the above methods. Specify the parameters and as controls. Try to measure the proper values of and 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,
Use the autocorrelation of the output signal (echo-free signal) to estimate the delay time ( ) and the amplitude of the echo ( ). For different values of and , observe the autocorrelation output. To have an echo-free signal, the side lobes of the autocorrelation should be quite low, as shown in [link] .
[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 and as well as graphs to observe the echoed signal, echo-free signal and autocorrelation function of the echo-free signal.
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:
randn
. Set the noise level as a control.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:
randperm
. Set the noise density as a control.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
Notification Switch
Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?