Anda di halaman 1dari 6

Filtering music with the EMONA myDSP digital filter

Overview:
Music has always been processed in the studio in the past by analog processing elements. In this
tutorial you will dive right into creating your own digital fiter and listening to the effects of various
digital filters on that music.

Input and output music from an NI myDAQ


Implement digital filters and listen to the effects of DSP
View time and spectrum displays to better understand the processing

Download the example program and follow the tutorial to recreate the experiment in your lab or
dorm

Background
The cost of digital systems is now so low and the flexibility they offer is so high that it is critical to
understand how they work so as to be able to use them when necessary. The EMONA myDSP is
supplied with an Experiment manual which takes you from introductory concepts through to real
world implementation of digital signal processing systems.
In this tutorial you will implement digital filters by designing the specifications of the filter and
having the LabVIEW Digital Filter Design toolkit blocks carry out the laborious calculations for you
in the myDSP Instrument SFP.
Operating at this design level will quickly let you see how powerful digital filter specifications are
whilst at the same time allowing you to peep under the bonnet and see the math that operates
in the background of such systems.

What is EMONA myDSP


EMONA myDSP is a single channel, audio band, DSP-based digital filter board which can
th
implement up to and including 10 order filters of LPF, HPF, BPF and Bandstop type in real time
hardware, primarily for educational purposes.
It can be used alongside other myDAQ minisystems to process their signals, and/or with the
extensive Experiment manual supplied, as a complete Introduction to Signals & Systems as well
as DSP course.

Understanding the connections on the EMONA myDSP


Here are descriptions of the I/O connections including myDAQ channels used, A quick snapshot
of the connections between the myDSP and myDAQ in table form:
EMONA myDSP
Dig 7-0 outputs

myDAQ connection
Dig 7-0

All other myDAQ signals are passed through and available at the output connector.

Setting up the experiment


You will need:
- NI myDAQ & EMONA myDSP
- Elenco myProtoboard or Combicon screw terminal connector
- 3.5mm stereo jack with leads
- portable source of music such as an MP3 player
- stereo ear buds or headphones with 3.5mm plug
- stereo lead with 3.5mm stereo male plugs at each end (supplied with myDAQ)
-patching leads (supplied with myDSP and myProtoboard)
Plug the myDSP into the myDAQ, and then plug the myProtoboard into the myDSP output
connector.

Make connections as shown in the photo above. Follow the patching diagram below.
Plug headphones into AUDIO OUT of myDAQ and the music source via the stereo cable into
the 3.5 mm jack.
Notice that you have the anti-aliasing filter included by selecting YES, and also notice that
you are taking your output from the Filtered DAC output.

Running the experiment


1. Download the EMONA myDSP *.zip from www.myEMONA.com, and extract all the
contents onto your computer.
2. Run the EMONA myDSP.exe code. This requires LabVIEW Runtime Engine 2012.
3. Open the EMONA myDSP Audio in-out Spectrum monitor.VI. This is written in LV2012
and so will require at least LV2012 or later to open.
4. Running this code will automatically detect the myDAQ you have connected and will
display the selection on the front panel as shown in the example immediately below.

5. Run the VI and observe the displayed active signals in both the time and frequency
domain. For more information about time and frequency domains please refer to, and
complete the Experiments in the EMONA myDSP Experiment Manual.
The myDSP powers up with a default filter of LPF type, with passband corner frequency of 1kHz,
and a sampling rate of 5kHz. The unfiltered input signal is blue and the filtered output signal is red
in all displays on the front panel.
6. Play some music from your MP3 player and listen to the stereo earbuds one at a time.
7. Note that one channel will be the original music, whilst the other channel will be the
filtered music. You may find it easier to listen to one earbud at a time.
8. Try changing the filter design on the myDSP SFP to remain as a Lowpass, but with
th
fpass1 = 200, and fstop1 = 800. This will also be a 4 order filter running at 5kHz. Press
EXTRACT to compute the filter co-efficients, and then press LOAD myDSP to transfer
the implementation coefficients to the hardware. You will now hear that most high pitched
sounds have reduced and mainly low frequency sounds are outputas expected
according to your design specifications.
The spectrum monitor program displays the spectrum of the processed signal and for
further insights into this spectrum please refer to, and complete the Experiments in the
EMONA myDSP Experiment Manual.
9. Finally change the filter type to Highpass. Enter a fpass1=2000, and fstop1=1000. Leave
sampling frequency as is at 5kHz. Switch to the manual gains entry mode tab and
review the selections there. Extract the hardware gains, and download to the myDSP.
Listen to the high frequencies remaining in your music, and notice how much energy is
present in the low frequencies and how noticeable it is when this is removed.
The myDSP SFP setup for the Highpass filter is pictured below:

The signal monitor front panel will appear similar to below:

There are several interesting things to notice in this display.


Notice how little signal level is remaining in the output signal.
In the red display showing the zoomed FFT of the output you notice the response ramps up as
expected for the highpass filter designed, but then ramps back down. This lowpass effect is due
to either the anti-aliasing or reconstruction filters on the myDSP, which aim to limit the bandwidth
of the signal being processed.
As well, in the ai 1 magn complete spectrum display you can see the images created due to
sampling at 5ksps. These images are repeated on either side of the 5kHz point and need to be
th
eliminated by the reconstruction filters on the output of the DAC. The myDSP has 4 order
reconstruction filters and these will give approximately a 4 x 6 db attenuation per octave, so we
expect the output signal to be 24 dB down at 6kHz as compared to at the cutoff frequency of
3kHz. Better input and output filters make for better recovered signals.These issues are covered
in more detail in the Experiment manual.

Challenge:
To gain an understanding as to how to create your own custom filters, complete the Experiments
in the Experiment Manual. This will introduce you to all the fundamental concepts behind
implementing DSP filters.
Experiment with different filter types and specifications and listen to the effects. Remember to
keep your designs within the capabilities of the myDSP hardware. You will need to refer to both
the User Manual and the Experiment manual for help with this.
Using real hardware will expose you to many of the real world issues involved in implementing
digital filters in hardware.
Enjoy exploring, and remember to aim to relate your findings back to the theory.

EOD 2.1

Anda mungkin juga menyukai