Now we’re going to add some noise to the
music and then filter it out. The first type of noise we’re goingto add is a single frequency sinusoidal noise. As you know from
class, the best filter to use for this type of filter is a simplenotch filter.
Using the BNC to RCA adapter, connect the long black cable coming from the computer soundcard (the line-in cable) to the FUNC OUT output of the function generator.
Turn on the function generator and set it up to generate a 1000 Hz, 0.2 V sine wave. Don’t forget to activate the signal by pressing the OUT/ON button on the function generator, setting its value to 1, and then pressing the EXEC button.
In Surround Mixer, activate the Line-in input. Run the program in LabVIEW and you should hear an annoying 1000 Hz. tone. Adjust the volume of the Line-in source in Surround Mixer so that the output sine wave amplitude is close to 5000 units.
Now restart the CD. You should hear the music, but it will be corrupted with a very annoying sinusoidal tone. (Depending on your music selection, you may possibly need to increase the amplitude of the sinusoidal noise so that it can be heard over the music). Examine both the time- and frequency-domain displays of the signal + noise. Stop the program before the noise drives you crazy.
Add a Biquad VI from Functions»Signal Processing»Filters»Biquad.vi . This block allows you to specify the coefficients of a generic 2nd-order digital filter. A biquad is just a particular configuration for a 2nd-order digital filter.
Determine the transfer function of the notch filter needed to remove the 1000 Hz. noise. Use a value of
alpha = 0.9.
Double click on the Biquad VI and enter the coefficient values. Insert the Biquad VI between the output of the Add function and the inputs to the Analog Output elemental I/O (see Figure 5 for the modified Block Diagram). (You’ll need to break the existing connections first).
Re-run the program and take notice of whether the filter effectively removes the noise without removing too much of the music signal. Take special note of the frequency spectrum of the filtered signal + noise.
Answer these questions
Calculate the transfer function of the notch filter needed to remove the sinusoidal noise. Show your work.
To see how sensitive this filter is, increase the frequency of the sinusoidal noise in increments of 10 Hz until the filter no longer seems to be removing the sinusoidal noise adequately. This is somewhat subjective and may also depend on the music that you’re combining with the sinusoidal noise.
Answer these questions
At what sinusoidal noise frequency does this filter no longer effectively remove the sinusoidal tone from the music?
Now turn off the music so that you only have the sinusoidal noise going through the system. Sweep the sine wave frequency through a range from about 500-3000 Hz. and note how the tone cuts out in the vicinity of 1000 Hz. Next determine the smallest frequency>1000 Hz. at which the output signal appears to be at full amplitude.
Answer these questions
At what sinusoidal noise frequency does the filter no longer attenuate the sine wave at all?
Using alpha = 0.5, repeat from step Don’t forget to turn your music back on and to reset your sinusoid to 1000 Hz. before starting the test. Also, use the same music as you did before. Otherwise, you may not be able to compare the 2 different filters accurately.
Answer these questions
Using this new
alpha vaue, calculate the transfer function of the notch filter needed to remove the sinusoidal noise. Show your work below.
Based on your observation, does decreasing seem to make the filter remove a larger or smaller range of sinusoidal frequencies? Explain why this is so.