final year project presentation

23
Final Year Project Final Year Project Presentation Presentation Laura Reddy Laura Reddy

Upload: dash

Post on 12-Feb-2016

142 views

Category:

Documents


0 download

DESCRIPTION

Final Year Project Presentation. Laura Reddy. Visual Alerting system for Emergency Vehicle Proximity for hear compromised drivers. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Final Year Project Presentation

Final Year Project Final Year Project PresentationPresentation

Laura ReddyLaura Reddy

Page 2: Final Year Project Presentation

Visual Alerting system for Emergency Vehicle Proximity for hear

compromised drivers

The aim of this project is to create a way for people who The aim of this project is to create a way for people who are deaf or who are wearing head protection to be more are deaf or who are wearing head protection to be more aware of emergency vehicles that are approaching them. aware of emergency vehicles that are approaching them.

This involves detecting the sounds and then comparing This involves detecting the sounds and then comparing them to the specific characteristics of the different sirens them to the specific characteristics of the different sirens to lower the chances of false alarms going off.to lower the chances of false alarms going off.

Page 3: Final Year Project Presentation

Visual Alerting system for Emergency Vehicle Proximity for hearcompromised drivers cont.

Once the siren has been detected it should start a led Once the siren has been detected it should start a led flashing so that the driver will be aware of the presence flashing so that the driver will be aware of the presence of the emergency vehicle.of the emergency vehicle.

The system will have to be battery operated so that it The system will have to be battery operated so that it can easily be placed on the dash board of a car or on a can easily be placed on the dash board of a car or on a motorbike.motorbike.

The system will also have to have a method of turning on The system will also have to have a method of turning on and off so that the user can turn it off while they are not and off so that the user can turn it off while they are not driving to help with power consumption.driving to help with power consumption.

Page 4: Final Year Project Presentation

Garda Sirens The Gardaí have two different sirens that they use to let The Gardaí have two different sirens that they use to let

drivers know that they are approaching.drivers know that they are approaching.

The 1The 1stst siren is the one that they would use while driving in siren is the one that they would use while driving in busy traffic or trying to get someone to pull over.busy traffic or trying to get someone to pull over.

The 2The 2ndnd siren is the one that they use if they are siren is the one that they use if they are approaching a busy intersection and they need to let approaching a busy intersection and they need to let people know that they are trying to get through.people know that they are trying to get through.

I have taken sample recordings of both of these sirens.I have taken sample recordings of both of these sirens.

Page 5: Final Year Project Presentation

MatlabMatlab I have used Matlab to get graphs of these sirens.I have used Matlab to get graphs of these sirens.

I have saved the results from reading the siren into Matlab into I have saved the results from reading the siren into Matlab into a text file called outFile. a text file called outFile.

I have also tried to do some Fourier analysis on both of these I have also tried to do some Fourier analysis on both of these sound waves.sound waves.

The graphs for the Fourier analysis are not coming out like sin The graphs for the Fourier analysis are not coming out like sin waves they are coming out like strange circles when I just use waves they are coming out like strange circles when I just use the plot() but if I use the semilog() command the results come the plot() but if I use the semilog() command the results come better for the 1better for the 1stst siren but they disappear for the 2 siren but they disappear for the 2ndnd siren. siren.

Page 6: Final Year Project Presentation

Graph of 1Graph of 1stst Garda Siren Garda Siren

Page 7: Final Year Project Presentation

Graph of Fourier analysis on the 1Graph of Fourier analysis on the 1stst Siren Siren using plot()using plot()

Page 8: Final Year Project Presentation

Graph of Fourier analysis on the 2Graph of Fourier analysis on the 2ndnd Siren Siren using plot()using plot()

Page 9: Final Year Project Presentation

Graph of Fourier analysis on the 1Graph of Fourier analysis on the 1stst Siren Siren using semilog()using semilog()

Page 10: Final Year Project Presentation

Graph of 2Graph of 2ndnd Garda Siren Garda Siren

Page 11: Final Year Project Presentation

Graph of Fourier analysis on the 2Graph of Fourier analysis on the 2ndnd Siren Siren using semilog()using semilog()

Page 12: Final Year Project Presentation

Work doneWork done I used two methods to try and get the output of the I used two methods to try and get the output of the

Fourier transform to look like a sin wave.Fourier transform to look like a sin wave.

The 1The 1stst one just plots the result of the fft() function. one just plots the result of the fft() function.

The 2The 2ndnd one was the same as the method we were one was the same as the method we were shown in the tutorial yesterday but that keeps throwing shown in the tutorial yesterday but that keeps throwing an error that the vectors are not the same length, they an error that the vectors are not the same length, they should be as one value is determining the other. (Ts = should be as one value is determining the other. (Ts = 1/Fs)1/Fs)

Page 13: Final Year Project Presentation

Work to be doneWork to be done

I have to see why neither method I used to get the I have to see why neither method I used to get the Fourier transform worked correctly. Fourier transform worked correctly.

Once I have the determined the values of frequencies for Once I have the determined the values of frequencies for each of the sirens I will have to write code to compare an each of the sirens I will have to write code to compare an input signal to these values to establish whether the input signal to these values to establish whether the input is the same as one of the Garda signals.input is the same as one of the Garda signals.

I will also have to get sample recordings of the sirens I will also have to get sample recordings of the sirens that the fire brigade & the ambulances use so that they that the fire brigade & the ambulances use so that they can be integrated into the system as well.can be integrated into the system as well.

Page 14: Final Year Project Presentation

Matlab codeMatlab code % Laura Reddy 06608523% Laura Reddy 06608523 % Code to do fourier analysis on Garda sirens% Code to do fourier analysis on Garda sirens clear all;clear all; close all;close all; clcclc [x fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren1.wav');[x fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren1.wav'); outFile = fopen('outFile.txt', 'w');outFile = fopen('outFile.txt', 'w'); fprintf(outFile, '%f\n', x);fprintf(outFile, '%f\n', x); fclose(outFile);fclose(outFile); ts = 1/fs;ts = 1/fs; t = 0:ts:0.5-ts;t = 0:ts:0.5-ts;

Page 15: Final Year Project Presentation

Matlab code contMatlab code cont

X = fft(x);X = fft(x); X1 = semilogx(x);X1 = semilogx(x); figure(1);figure(1); plot(x);plot(x); figure(2);figure(2); plot(X);plot(X); figure(3);figure(3); plot(X1);plot(X1);

abs(x)abs(x)

Page 16: Final Year Project Presentation

Matlab code cont.Matlab code cont. %plot(t,x);%plot(t,x); %grid on;%grid on; % % get fft of the signal% % get fft of the signal %fftOfSignal1 = fft(x,1024);%fftOfSignal1 = fft(x,1024); % % looking at positive sides only% % looking at positive sides only %fftOneSided1 = fftofSignal1(1:512);%fftOneSided1 = fftofSignal1(1:512); % % getting the frequency axis% % getting the frequency axis %df = (fs/2)/511;%df = (fs/2)/511; %freqAxis = 0:df:fs/2;%freqAxis = 0:df:fs/2; %figure(2);%figure(2); %plot(freqAxis,abs(fftOneSided1));%plot(freqAxis,abs(fftOneSided1)); %xlabel('frequency (Hz) ');%xlabel('frequency (Hz) ');

Page 17: Final Year Project Presentation

Matlab code cont.Matlab code cont. %ylabel('Amplitude (db) ');%ylabel('Amplitude (db) '); %hold on;%hold on; %grid on;%grid on; %figure(3);%figure(3); %plot(freqAxis,20*log10(abs(fftOneSided1)));%plot(freqAxis,20*log10(abs(fftOneSided1))); %xlabel('frequency (Hz) ');%xlabel('frequency (Hz) '); %ylabel('Amplitude (db) ');%ylabel('Amplitude (db) '); %hold on;%hold on; %grid on;%grid on; % Siren 2% Siren 2 [y fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren2.wav');[y fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren2.wav'); outFile = fopen('outFile2.txt', 'w');outFile = fopen('outFile2.txt', 'w');

Page 18: Final Year Project Presentation

Matlab code cont Matlab code cont fprintf(outFile, '%f\n', y);fprintf(outFile, '%f\n', y); fclose(outFile);fclose(outFile); Y = fft(y);Y = fft(y); Y1 = semilogx(y);Y1 = semilogx(y); figure(4);figure(4); plot(y);plot(y); figure(5);figure(5); plot(Y);plot(Y); figure(6);figure(6); plot(Y1);plot(Y1); abs(y)abs(y)

Page 19: Final Year Project Presentation

Matlab code cont.Matlab code cont.

%plot(t,x);%plot(t,x); %grid on;%grid on; % % get fft of the signal% % get fft of the signal %fftOfSignal1 = fft(x,1024);%fftOfSignal1 = fft(x,1024); % % looking at positive sides only% % looking at positive sides only %fftOneSided1 = fftofSignal1(1:512);%fftOneSided1 = fftofSignal1(1:512); % % getting the frequency axis% % getting the frequency axis %df = (fs/2)/511;%df = (fs/2)/511; %freqAxis = 0:df:fs/2;%freqAxis = 0:df:fs/2; %figure(5);%figure(5);

Page 20: Final Year Project Presentation

Matlab code cont.Matlab code cont. %plot(freqAxis,abs(fftOneSided1));%plot(freqAxis,abs(fftOneSided1)); %xlabel('frequency (Hz) ');%xlabel('frequency (Hz) '); %ylabel('Amplitude (db) ');%ylabel('Amplitude (db) '); %hold on;%hold on; %grid on;%grid on; %figure(6);%figure(6); %plot(freqAxis,20*log10(abs(fftOneSided1)));%plot(freqAxis,20*log10(abs(fftOneSided1))); %xlabel('frequency (Hz) ');%xlabel('frequency (Hz) '); %ylabel('Amplitude (db) ');%ylabel('Amplitude (db) '); %hold on;%hold on; %grid on;%grid on; %[y fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren2.wav')%[y fs bits] = wavread('E:\Final Year Project\Laura\GardaSiren2.wav') %X = fft(x)%X = fft(x)

Page 21: Final Year Project Presentation

Matlab code cont.Matlab code cont.

%X1 = semilogx(x)%X1 = semilogx(x) %Y = fft(y)%Y = fft(y) %Y1 = semilogx(y)%Y1 = semilogx(y) %plot(x)%plot(x) %plot(y)%plot(y) %abs(x)%abs(x) %abs(y)%abs(y)

Page 22: Final Year Project Presentation

Sample output of Fourier analysis on 1Sample output of Fourier analysis on 1stst sirensiren

Page 23: Final Year Project Presentation

Sample output of Fourier analysis on 2Sample output of Fourier analysis on 2ndnd sirensiren