Ask Other Engineering Expert

Assignment -

There are two raw data files containing 8-bit two's complement samples taken at the rate of 44,100 samples per second. One is from an audio signal named "xxxxxCleanSig.txt" and the other is from a noisy audio signal named "xxxxxNoisySig.txt" where "xxxxx" represents your last name.

To read in a signal use MATLAB code similar to the following code fragment:

fid = fopen('xxxxxCleanSig.txt','r','b') ;

sig = fread(fid,inf,'int8') ;

fclose(fid) ;

(The file is not really text but I used that extension so you could directly examine it with an editor as ASCII characters.) The file must be in your MATLAB "path" for the fopen command to work. The signals are in the form of a stream of 8-bit bytes and can be converted to double precision numbers in MATLAB by the double command using code similar to the following:

sig = double(sig)/127;

The division by 127 converts from the 8-bit two's complement data range -127 to 127 to the data range -1 to 1. This is the data range expected by the MATLAB command sound. You can use sound to hear your audio signal.

Design a digital filter to remove as much noise as possible from the noisy signal, while at the same time preserving as much of the signal as possible, to make it more intelligible. The random noise is in various frequency bands of various widths at various center frequencies. There is also some broadband random noise. The file xxxxx.txt contains some information about the noise that was added. Report the filter you used as a cascade of first- and second-order digital filter sections. Each first or second order section can described in one of the following forms:

H(z) = A(z+b1/z+a1) or H(z) = A(z2+b1z+b2/z2+a1z+a2)

Report the coefficients of each cascaded section of your digital filter in a plain text file of one of the following forms:

Section

#

A

number

b1

number

a1

number

Or

Section

#

A

number

b1

number

b2

number

a1

number

a2

number

where the two columns are separated by a "tab" character, # is a unique sequence number for each section and number is a decimal number, possibly with a power of 10 in the "E" format used in computers. Here is an example text file for three cascaded sections, one first order and two second order.

Section    1

A           13

b1          0

b2         1.5

a1          4

a2          19

Section    2

A         -5E2

b1        -11

a1        2e3

Section   3

A          233

b1        0.2

b2        1.2

a1       -0.65

a2        0.98

One could really go wild with a huge number of filter sections in a attempt to do the best possible filtering. So in your digital filter design observe the limit

(number of 1st order sections) + (number of 2nd order sections) × 2 < 16.

After you have filtered your noisy signal, send it back to me by e-mail in a file consisting only of the 8-bit data sample values in a bit stream. First scale your filtered signal to fill the range -1 to +1. Then you can convert from double precision to 8-bit two's complement integers using code similar to sigf = int8(sigf*127);

You can use code similar to the following to save the bit stream to file:

fid = fopen('xxxxxFilteredNoisySignal.txt','w','b') ;

fwrite(fid,sigf,'int8') ;

fclose(fid) ;

where "xxxxx" again is your last name.

Also include in your report the following:

1. A graph of the original clean signal vs. discrete-time over its full time range.

2. A graph of the noisy signal before filtering vs. discrete-time over its full time range.

3. A graph of the noisy signal after filtering vs. discrete-time over its full time range.

4. A graph of the power spectral density of the original clean signal vs. discrete-time radian frequency Ω over the frequency range 0 < Ω <1. (Power spectral density is defined below.)

5. A graph of the power spectral density of the noisy signal before being filtered vs. discrete-time radian frequency Ω over the frequency range 0 < Ω <1.

6. A graph of the power spectral density of the noisy signal after being filtered vs. discrete-time radian frequency Ω over the frequency range 0 < Ω <1.

7. Graphs of the magnitude and phase of the frequency response of your overall digital filter vs. discrete-time radian frequency Ω over the frequency range 0 < Ω <1. (Warning: I had some trouble using freqz in MATLAB to compute the frequency response of higher-order filters. I had to write my own frequency response function to get a good graph. You may have to do the same. See example code below.)

8. A graph of the cross correlation between the original clean signal and the filtered noisy signal for 0 ≤ m < N/2 and a second graph of cross correlation for 0 ≤ m <10mmax where mmax is the shift for maximum cross correlation. (Cross correlation is defined below.) Ideally those two signals would be identical but that is impossible in reality. Call the clean original signal x and the filtered noisy signal y. Find the shift m for maximum cross correlation between x and y. Remove the first m samples of y, leaving N-m samples. Remove the last m samples of x. Now both x and y have N-m samples. Compute the correlation coefficient between the new x and the new y,

203_figure.png

and report this number in your report. A correlation coefficient of one would indicate that the filtering was perfect and that the original signal and the filtered noisy signal looked exactly alike. That is, that the filter removed all the noise and kept all the original signal. This is impossible. A correlation coefficient of zero would indicate that there is no similarity between the original signal and the filtered noisy signal. Typical correlation coefficients will be between 0.4 and 0.7. The exact value depends on the nature of the original signal and the added noise. In your parameter file I have given you a correlation coefficient that I computed for your original signal and a filtering of your noisy signal. My filtering is based on a fairly simple algorithm. You can probably do a little better.

Attachment:- Assignment Files.rar

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M92773519

Have any Question?


Related Questions in Other Engineering

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Mine safety amp environmental engineering assignment -part

Mine Safety & Environmental Engineering Assignment - Part 1 - Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the fo ...

Projectflow processing of liquor in a mineral refining

Project Flow Processing of Liquor in a Mineral Refining Plant The aim of this project is to design a flow processing system of liquor (slurry) in a mineral (aluminum) refining plant. Aluminum is manufactured in two phase ...

Learning outcomes evaluate multiuser communication and

Learning Outcomes Evaluate multiuser communication and resource sharing techniques; Apply the techniques of, and report on, digital communication applications using Matlab and hardware devices. Assignment Description The ...

Operations engineering assignment -please select only one

Operations Engineering Assignment - Please select only one of the following case studies for your assignment: CASE A. Tesla Motors Tesla is an innovative manufacturer that designs, assemble and sells fully electric vehic ...

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Engineering materials term paper assignment -conduct a

ENGINEERING MATERIALS TERM PAPER ASSIGNMENT - Conduct a thorough literature search and write a 15-20 page technical review paper on the evolution of the engineering materials used in the manufacturing of any one of the f ...

Task 1using the lab kit design a circuit for the processor

Task 1: Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or ...

Control theory - lab reportsfor experiments 1 to 4 you must

Control Theory - Lab Reports For experiments 1 to 4 you must undertake the following: a) At the start of each section (including the pre-lab activities) there are a number learning outcomes. That is, what students should ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As