Você está na página 1de 13

Farhan Nomani

0905123

Signal Processing Lab EE2

BRUNEL UNIVERSITY SCHOOL OF ENGINEERING AND DESIGN ELECTRICAL AND ELECTRONIC ENGINEERING Signal Processing Lab(EE2607)

Farhan Nomani 0905123


Aims: Experiment 1 The purpose of this experiment is to introduce the students to: (a) generation, storage, processing and filtering of signals (b) retrieval of sine waves in noise using filters designed by pole-zero placement method. Main tasks: Task1: Generate and store Nsamples of the sum of N sine waves. Task2: Generate and store Nsamples of noise. Task3: Scale noise and add to signal to obtain a noisy signal with a signal to noise ratio of SNR. Plot: the noisy signal in time and in frequency. Task4: Design N second order zero-pole filters to cancel out the N sine waves, Plot: the overall pole-zero diagrams and the overall frequency response of the filters. Task5: Design the inverse filter to retrieve the N sine waves. Plot the restored signal, Playback the restored signal.

Farhan Nomani

0905123

Signal Processing Lab EE2

Experiment 1: Task 1: Generate and store N samples of the sum of sine waves. To create sine waves in respect to N samples first of all sampling Frequency must be defined. Sampling frequency is 1600Hz if we are to generate any signal the sampling frequency (Fs) must be minimum twice as much as the sampling rate . In our question I have chosen Fs to be 8000 so we should expect the BW to be 16000Hz. If this is not optimum then we could have overlapping which is aliasing As in the question we need to produce 3 different sine waves each must be plotted on a separate graph and they need to have a set amplitude and frequency. We can show these in arrays. I chose F = [400 800 1200] and amplitude A = [20 10 4] of course first each had to be separately be specified. We can say that N samples is defined as m when m is 0:N samples -1 this tells us the concentration of the samples to give us the sine waves, as we will be using a for loop, this will automatically add the sine waves.

. In the code I have used the formula x=A*sin (2*pi*F'*m/Fs) as it is to normalise then divide by Fs

to give us the sine wave.

Farhan Nomani

0905123

Signal Processing Lab EE2

When it is together we get the following waveform

Here I experimented by changing the array for F to 500,1000 and 1500 to see how it behaves and the summation of the sine waves.

Farhan Nomani Task 2: Generate random Gaussian noise.

0905123

Signal Processing Lab EE2

We can add Noise in Matlab by finding a function which makes a matrix array of N samples which it distributes to the random numbers so we can use randn function. Again the same code in task 1 is used with the sine waves to add the Noise to it. As it is a discrete fourier transform we need to apply it with the faster fourier transform and this is shown on the graph.

Farhan Nomani

0905123

Signal Processing Lab EE2

Task 3: Calculate a scaling factor for noise, to add signal and noise at a SNR dB.

We can use this formula to get alpha on its own and apply this to the matlab code.

Farhan Nomani

0905123

Signal Processing Lab EE2

Task4: Design N second order zero-pole filters to cancel out the N sine waves
We can apply the following transfer function equation

The transfer function

Closer r is to 1 the less noise but more delay in response. The reason of using two pairs of zeros is to have the trough in the spectrum of the signal this is all dependent on the angular position of the zeros. The poles work oppositely with respect to zeros as they produce a peak which is also dependant on the angular position of the poles in unit circle.

Changing this value of r to a slightly lower one will now give us the poles and the zeros to be slightly closer to the middle of the unit circle and this INCREASES the peak or the trough in the frequency spectrum.

Farhan Nomani

0905123

Signal Processing Lab EE2

Task5: Design the inverse filter to retrieve the N sine waves. Plot the restored signal, Playback the restored signal.

Experiment 2

Farhan Nomani

0905123

Signal Processing Lab EE2

Farhan Nomani

0905123

Signal Processing Lab EE2

Farhan Nomani

0905123

Signal Processing Lab EE2

This shows us that it starts from zero when it is at its loudest point. At the start the sound has alot of decay very quickly and then it gets gradual. If we change alpha and the envelope characteristics we would experience a different decay and initial stage. Decay time is time taken to reach a significant level when falling. For when alpha is 0.1 and beta is 4

Farhan Nomani

0905123

Signal Processing Lab EE2

Farhan Nomani Changing beta

0905123

Signal Processing Lab EE2

Farhan Nomani

0905123

Signal Processing Lab EE2

Conclusion: Overall in the lab I was able to make filters and make several sine wave signals, we could apply the aliasing theorem. We could make random noise and adding these sine waves. Also I could also be able to make Gaussian noise and add it to the sine wave. I could also use the transfer function for a second pole zero filter. The radius of the unit circle determines where they are eon the unit circle, if it is closer to 1 the better the signal. This decreases the noise but has a longer transient response. The second order pole zeros add a trough to the frequency spectrum, this is all to do with the position of the angular zeros. The poles add a peak to the frequency spectrum this is dependent on the angular position of the poles from the origin of the unit circle. With the second experiment I had to play around with and work out how to generate the spectrum however I could not accomplish this and use the code that was provided and altered it slightly to generate the frequency spectrum and the signal rate

Você também pode gostar