Sei sulla pagina 1di 17

COVENTRY UNIVERSITY Faculty of Engineering and Computing Electronic Engineering

310SE Advanced Digital Systems DSP CAD exercise

By: MAJED ALRASHEED

2011/2012

Majed Alrasheed

310SE

SID: 3342389

Content page:

Content introduction filter characteristics Design Basic structure The parameters Filter design and analysis tool Filter analysis Testing Conclusion Literature study references

Page number 3 3 4 4 5 7,8 9,10,11,12 13 16 16 17

Majed Alrasheed

310SE

SID: 3342389

Introduction:
The main aim of the exercise is to design a filter using filter design and analysis tool (FDA Tool) available on MATLAB- Simulink and use it to remove the interfering sine wave added to a recorded audio voice and try to get rid of the noise as possible. Filters are usually used to remove interfering (noise) from a required information carrying data signal. The main filter characteristics are: Low pass filters (LPF) High pass filters (HPF) Band pass filters (BPF) Band stop filters (BSF) All-pass filters (APF)

Low pass filters are used to pass low frequencies and stop high frequencies. High pass filters are used to pass high frequencies and stop low frequencies. Band pass filters are used to pass range frequencies and stop below and above the set range. Band stop filters are used to pass all frequencies except the ones within a defined range. All-pass filters are used to pass all frequencies but they modify the phase of the frequency components. The type of filter that might be useful for our case is the band stop filter because we need it to pass a range of frequencies and stop below and above the set range.

Figure 1: band stop filter (Poole2010)

Majed Alrasheed

310SE

SID: 3342389

Design:
Using the DSP (digital signal processing) for design digital filter has the following advantages: Programmable Repeatable Easy to configure Changeable coefficients Easy to change filter type

In order to design digital filter we need the following requirements: MATLAB with Embedded Target for TI C6000. Code composer studio. Texas Instrument DSK6713 hardware. An audio recording. MP3 player and jack to jack cable. Headphones.

Basic structure:

Figure2: basic structure.

The figure above shows the basic structure of designing digital filters, this structure has been created by using Simulink available in MATLAB.

Majed Alrasheed

310SE

SID: 3342389

The parameters: 1. C6713DSK. 2. C6713DSK analogue to digital converter. 3. C6713DSK digital to analogue converter. 4. Filter design and analysis tool (FAD Tool). 5. Matrix concatenate. 6. Sine wave (Generate continuous or discrete sine wave). 7. Add point(Add or subtract inputs)

Recording the voice using sound recorder available in windows, and set it up as the following:

Figure3: sound property.

The analogue to digital converter must be set as following:

Figure4: ADC.

Majed Alrasheed

310SE

SID: 3342389

The frequency which can be heard by human called audio or sonic and the range is between 20 Hz and 20,000 Hz, so the sampling rate must be the double of the maximum human hearing frequency or more, so we have chosen the sampling rate at 48 kHz.

The digital to analogue converter must be set as following: The sampling rate is also 48 kHz and the scaling is Normalize and the overflow mode is wrap.

Figure5: DAC

The Source Block Parameters of the Sine wave is configured to provide a 3500 Hz signal at the sample frequency of 48000 Hz and amplitude of 0.01as required in the exercise to prevent damage to the ears.

Figure6: sin wave source.

Majed Alrasheed

310SE

SID: 3342389

Figure7: Matrix concatenate.

Filter design and analysis tool (FDA Tool):

The filter which we have used is band-stop filter because we need it to pass all frequencies except the ones within a defined range. After choosing the filter type we need to choose the method of designing filter .There are two methods to design digital filters as following: 1. Infinite impulse response (IIR) 2. Finite impulse response (FIR) The response of IIR filter to s signal impulse is infinite and the response of IIR filter to signal impulse is finite. In my filter design I have chosen IIR method because it has the following advantages:

Majed Alrasheed

310SE

SID: 3342389

It meets a given set of specifications with a much lower order than a corresponding FIR filter. Sharp cut off frequency.

Figure8: digital filter design. The figure above shows the digital filter design window, as we can see the filter type is band stop and the design method is IIR, the sampling frequency is 48 kHz, the filter will pass all frequencies except the ones within a defined range which is from (3495Hz to 3505Hz) it will be cut off.

Figure9: modulated response.

Majed Alrasheed

310SE

SID: 3342389

Figure10: pole/zero plot.

Figure11: filter information. The figure above shows the filter information which provides second order section and non linear phase.

Figure13: filter coefficients.

Majed Alrasheed

310SE

SID: 3342389

Figure 14: round-off noise power spectrum.

Figure 15: Magnitude Response Estimate.

Figure 16: step response.

10

Majed Alrasheed

310SE

SID: 3342389

Figure 17: impulse response.

Figure 18: phase delay.

Figure 19: Group delay.

11

Majed Alrasheed

310SE

SID: 3342389

Figure 20: magnitude (dB) and phase response.

Figure 21: phase response.

12

Majed Alrasheed

310SE

SID: 3342389

Testing:
The figure below is showing the frequency spectrum of the sound which we have taken from the output of the digital to analogue converter by connecting oscilloscope to the DSK6713.

Figure22: sound frequency spectrum.

The figure below is showing the frequency spectrum of the noise which we have taken from the output of the sin wave generator by connecting oscilloscope to the DSK6713.

Figure23: noise frequency spectrum.

13

Majed Alrasheed

310SE

SID: 3342389

The figure below is showing the frequency spectrum of the sound plus noise which we have taken from the output of the digital to analogue converter and sin wave generator by connecting oscilloscope to the DSK6713.

Figure24: sound plus noise frequency spectrum.

Testing Band Pass filter: Our filter is designed to cut off the frequency between 3495Hz to 3505Hz which is the noise frequency

Fiugure25: noise frequency at 3494 Hz. As we can see above band stop filter is passing the frequency at 3494 because this frequency is not in the range of 3495Hz to 3505Hz.

14

Majed Alrasheed

310SE

SID: 3342389

Fiugure26: noise frequency at 3499 Hz. As we can see above band stop filter is cutting off the frequency at 3499 because this frequency is in the range of 3495Hz to 3505Hz.

Fiugure27: noise frequency at 3516 Hz. As we can see above band stop filter is cutting off the frequency at 3516 because this frequency is not in the range of 3495Hz to 3505Hz.

15

Majed Alrasheed

310SE

SID: 3342389

Conclusion:
As we can see from the exercise results, the pand stop filter has been designed successfully using IIR method, and the noise has been removed perfectly. The exercise requirements have been met successfully. The filter which we have designed work perfectly and the band-stop filter pass all frequencies except the ones within a defined range.

Literature study:
Complex programmable logic device (CPLD): CPLDs is a programmable logic devise

16

Majed Alrasheed

310SE

SID: 3342389

Reference: Oliver, M. (2011) Advanced Digital Systems [online] available from < http://moodle.coventry.ac.uk/ec/course/view.php?id=3878 > [1 March 2012]

Lyons, R. (2004) Understanding digital signal processing. New Jersey: Person Education

Poole, N. (2010) Analogue and Digital Electronics 2 [online] available from < http://moodle.coventry.ac.uk/ec/course/view.php?id=1667 > [2 March 2012]

17

Potrebbero piacerti anche