User:Ama0608

From MariachiWiki

Amorita R. Davidson

Enlarge

My name is Amorita R. Davidson and I am a first year undergraduate student at Stony Brook University. I am a member of WISE and I am taking WSE 187 during my Spring 2008 semester. My first project is at the NSL where I will be investigating the basic processing of radio signals.


I am an only child and a resident of Queens, New York. This is my first time at a 'public' school (one without uniforms). I attended Saint Benedict Joseph Labre School from kindergarten through eighth grade. I graduated from Saint Benedict’s in 2003 and then attended The Mary Louis Academy, an all girls school in Jamaica Estates. I graduated from Mary Louis in May 2007. I was a member of the National Honor Society and at graduation I received the award for Excellence in Social Studies. Stony Brook was not my first choice but I am glad that I decided to come here. I first visited the campus when I came for an informational meeting about the CSTEP program. It was at this meeting that I made the decision to attend Stony Brook.


I participated in the CSTEP Summer Program. I had the opportunity to get to know the campus and its resources before the fall semester began. I prepared a research paper and PowerPoint presentation on “Current Treatments for Sleep Apnea Patients who are Suffering from COPD.”


I am a biology major with a pre-med concentration. I am pursuing a career as a brain surgeon and I hope to work in a NYC hospital.


I like to spend time with my family and friends. I enjoy watching medical shows like House and Grey’s Anatomy. I also like to watch Forensic Files. My hobbies are taking pictures and watching movies. I also enjoy cooking for my family. I like to watch the Food Network to find recipies that my family would like. My favorite shows are Iron Chef, Ace of Cakes and Good Eats. I also enjoy watching sports. My favorite sports to watch are football and cricket.

My Interests

Australian Cricket Team Image:Manning.jpg House M.D.

NSL: MARIACHI


DAY 1


Cosmic Ray: High energy particles originating from somewhere in the universe.

Radio Signal: Microwave traveling at speed of light.

Objective of MARIACHI

General Goal: Based on measured radio signals, detect and classify events.

Ultimate Goal: Be able to detect and identify signals due to UHECRs.

WinRadio Receiver: Tracks frequency band of interest.

Software: Spectrum Lab and MATlab.

Signal Processing tasks: Detection, Estimation and Classification.

Classification: Receive a signal and decide which category it belongs to.

- There may be signals that are detected that do not result from activities of interest.


DAY 2


Antenna: Transmits or receives electromagnetic waves (radiowaves).

Types of Antenna 1. Omni-directional: Radiates equally in all directions. 2. Directional: Radiates more in one direction - horizontal or vertical - than the other.

Receiver: Electric circuit that receives radio signal from antenna and converts it into sound, pictures, etc.


DAY 3


DAQ: Data Aquisition

Today we used the WinRadio Receiver to record 10 seconds of audio. We had to change it from the USB setting to the AM or Amplitude Modulation setting. We adjusted the bandwith and frequency of the station to one that broadcasts in the area.


DAY 4


MATlab Signal Generation - Sounds

MATlab is a numerical computing environment and programming language created by The Mathworks. It allows for easy matrix manupulation, plotting of functions and data, implementation of algorithms, creation of user interfaces and interfacing of programs in other languages.

Exercise: Signal Generation

Objective: Generation and representation of basic signals in MATlab.

A signal is represented by a vector (array) or by a row (column).

1. In the command window of MATlab find command prompt and enter the following:

(a)>> a = [1,2,3,4,5]

(b)>> b= [1:5]

(c)>> c= [1:1:5]

(d)>> t = 1:1:5

(e)>>d = [ 1;2;3;4;5]

(f)>> e = a'


Entries a through c will result in the following sequence:

                   1 2 3 4 5

While entries d and e will result in the following sequence:

                       1
                       2
                       3
                       4
                       5

Entry f will result in entry a's sequence in the form of entries and e:

                       1
                       2
                       3
                       4
                       5

After a introduction to MATlab, we created a 1 x 10 array using the ones and zeros format.

Using the ones format, an array would be entered into command prompt as follows:

>> a = ones (1,10)

This will result in the following matrix:

           1 1 1 1 1 1 1 1 1 1

In the entry the number '1' corresponds to the number of rows and the number '10' corresponds to the number of columns.

Entering a sequence in the zeros format (>> a = zeros (1,10)) will result in:

           0 0 0 0 0 0 0 0 0 0

We then used the random format to generate a random matrix of numbers. >> a = rand (4)

             1  2  3  4
             5  6  7  8 
             9  1  2  3

This produces a randomly generated matrix of the desired dimensions.

We also learned how to create a 1 x 20 array with zeros everywhere except the 10th and 11th positions, which have the value of 1.

We first inputted the array. >> a = zeros (1,20)

To replace the 10th and 11th positions with ones we inputted the following: >> a(10) = 1 >>a(11) = 1

We then plotted the data. >> plot (a)

We also learned how to change the colors of the plot and its points.

For example the following plot, >> plot (21,40,a,'r-+') produces the plot of array a with the dimensions 21 x 40 in red with both the lines (-) and points (+) in the selected color ('r') red.

We also learned how to create an array in the general construction pattern. >> array = start:step:stop >> t = 0:0.01:1

Any buillt in function that operates on a scalar can also operate on an array.

Example: >> sin(pi/4) ans = 0.7071

We also generated a sinusoid signal y(t) with t generated as an array and y(t)= sin(2pi*f*t) with f=2 where f indicates the period of the sinusoid.

>> sin(pi*2*2*t)

We then plotted the array by itself and with another array. >> plot(array, sin(pi*2*2*t))


DAY 5


MATlab - Signal Generation - Sounds (continued)

5. We generated a new t array with step 1/8000, starting at 0 and stopping at 1. Then we generated a new y(t) with f=500 and plotted it. Since the frequency was 500 it was difficult to read.

6. We then repeated the last step and changed the stop of the t array from 1 to 0.01.

2 Listening To The Sound

The MATlab function sound with syntax: sound(sampledSignal, frequency), sends the one-dimensional array or vector sampledSignal to the audio card in the PC. The second argument specifies the sampling frequency in Hertz. The values in sampledSignal are assumed to be real numbers in the range [-1.0,1.0]. Values outside this range are clipped to -1.0 to 1.0.

1. We used the function

            >> t = 0:1/8000:2 

to generate

            y(t) = sin(2π*440t)

Then we used

            sound(sin(2π*440t),8000) 

to listen to the sound generated by y(t). The 10 msec interval created a short beep. The 1 and 2 second intervals sounded the same but differed in length.

2. Then we listened to

            sound(0.5*sin(2π*440t)*8000)

and

            sound(2*sin(2π*440t)*8000)

They were the same sound but the second one was much louder than the first. This was because the numbers 0.5 and 2 referred to the amplitude of the sound.

3. After that we listened to

            sound(sin(2π*440t)*8000/2)

and

            sound(sin(2π*440t)*8000*2)

The first sound was really low and the second was really high pitched.


Additive Noise and WAVE File Processing in MATlab

1. Noise Additive to Sound

The MATlab function randn with syntax randn(N,M) generates a Gaussian Noise in a N x M array.

1. We generated a sound signal

             y(t) = sin(2π*830t) 

with sampling frequency f=8000 and a 2 second interval.

2. We used the function randn to generate a noise signal having the same length as y(t)

             randn(1,length(y))*0.1

3. Then we listened to

             sound(randn(1,length(y))*0.1, frequency) 

with the sampling frequency set at 8000. It sounded like the static from a radio.

4. Then we listened to

             sound(sampledSignal,frequency) 

where the sampledSignal was sin(2π*440t) and the frequency was 8000. It sounded like a long beep.

We also listened to

             sound(sin(2π*440t)+randn(1,length(y))*0.1,8000)

This sounded just like the last sound but a Gaussian noise was added by the randn function.

5. We then listened to

             sound(sin(2π*440t)+randn(1,length(y))*0.5,8000)

and

             sound(sin(2π*440t)+randn(1,length(y))*0.01,8000)

The first sound was the same as before but the Gaussian noise was louder. The second sound was the same sound but there was no Gaussian noise.


Additive Noise and WAVE File Processing in MATlab (continued)

2. WAVE File Saving and Loading

WAVE (or WAV), short for Waveform audio format, is a Microsoft and IBM audio file format standard for storing audio on PCs. It supports a variety of bit resolutions, sample rates, and channels of audio and is widely used in professional programs that process digital audio waveforms.

In MATlab, function wavwrite with syntax

             wavwrite(writesignal, frequency, wavFileName)

writes writesignal to a Windows WAVE file specified by the file name wavFileNAme. The second argument specifies the sampling frequency in Hz.

And function wavread with syntax

            [readsignal, frequency] = wavread(wavFileName)

reads a WAVE file specified by the file name wavFileName, returning the sampled data in array readsignal. The second output returns the sampling frequency in Hz.

1. We used the wavewrite function to save the function y(t) = sin(2*pi*830t) where t = 0:1/8000:2 The sampling frequency was 8000Hz and wavFileName was '1.wav'

            wavwrite(y(t), 8000, '1.wav')

2. We then used the wavread function to load '1.wav' to an array readSignal. We also used the sound function to listen to the readSignal.

            y = wavread('1.wav')
            [y,c] = wavread('1.wav')
                          
                            c = 8000
            sound(y,c)

3. Then we saved y(t) with sampling frequency = 4000Hz and wavFileName '2.wav'

           wavwrite(y, 4000, '2.wav')

4. After that we saved y(t) with sampling frequency = 16000Hz and wavFileName '3.wav'

          wavwrite(y, 16000, '3.wav')

5. We read both '2.wav' and '3.wav'

          [y,c] = wavread('2.wav')
          [y,c] = wavread('3.wav')

6. Then we listened to them.

          sound(y,c) where y = wavread('2.wav') and c = 4000
          sound(y,c) where y = wavread('3.wav') and c = 16000

7. Finally, we listened to

          sound(readSignal2 + readSignal3,8000) 
          sound(g+k,8000)

where g = wavread('2.wav') and k = wavread('3.wav')

3. Small Project

We recorded 10 seconds signal using the WinRadio G313i receiver.

         wavFileName: 'amorita.wav'

We then read the recorded the signal in MATlab.

         [s,d] = wavread('amorita.wav')

We found out the sampling frequency of the recorded signal and plotted it against time.

         d = frequency = 16000Hz
         plot(s)

Image:Amorita.jpg


DAY 6


Basic Processing of Radio Signals

Time and Frequency Representation

Two Different Standpoints

A signal can be viewed from two different standpoints

Time Domain: analysis of mathematical functions or physical signals with respect to time.

Frequency Domain: analysis of mathematical functions or physical signals with respect to frequency.

Any signal can be fully described in either of these domains. To go between these two you must use the Fourier Transform which is a specific form of Fourier analysis.


GUI in MATlab

1. Using GUI to Study the Time and Frequency Representation of Sound Signals.

A graphical user interface (GUI) is user interface built with graphical objects, such as buttons, text fields, sliders, and menus. Applications that provide GUIs are generally easier to learn and use since the person using the application does not need to know what commands are available or how they work. The objective of our GUI program is to verify signals generated in previous classes and learn frequency characteristic of signals.

1. We located the directory of the GUI files, 'C\wse\GUI'.

2. We executed GUI in MATlab by typing the prompt

            >> inclassexercise

3. With GUI launched, we were then able to generate, load, save and play signals with specified parameters.

(a)LOAD and SOUND

We loaded our previously saved wav files, 'C\WISE187MARIACHI\amorita.wav'

(b)GENERATE and PLOT

1. We generated a 1-component sinusoid with SamplingFrequency = 200, Start = 0, Stop = 1, Comp = 1 and F1 = 20

2. We plotted the signal and checked to see if the period of the signal is consistent with F1.

3. We generated a 2-components sinusoid with the same setting as above except F2 = 50. We then plotted the signal to confirm our findings in the frequency domain.

4. We then generated a noise-only signal with the noise level at 0.5 and the same settings as above. We plotted it and observed the frequency characteristics of the noise signal.

5. We then generated different noise signals with different noise levels. When we decreased the noise level the sound was lower and shorter. Increasing the noise level makes the noise level louder.

Image:GUI5.jpg

6. We then generated a 1-component sinusoid with noise signal. We set the sampling frequency = 200, Start = 1, Stop = 1, Comp = 1, F1 = 20 and Noise level = 0.5. We plotted the signal and observed the time and frequency differences.

Image:GUI6.jpg

(c) More Fun

1. We loaded several windows system wave file into GUI from 'C:\i386'. We studied the time and frequency features of each.

Image:CHIMES.jpg

Image:GUIBLIP.jpg

2. We changed the sampling frequency and played them to listen to the differences.


DAY 7


Data Processing Project (WSE 187 Spring 2008)

1. Background - Power in Decibel (dB)

The decibel (dB) is a logarithmic unit of measurement that expresses the magnitude of a physical quantity (usually power or intensity) relative to a specified or implied reference level. Its logarithmic nature allows very large or very small ratios to be represented by a convenient number, in a similar manner to scientific notation. When referring to measurements of power or intensity, the equation is

           PdB = 10 x log(base10) (P/Po)

normally we use Po = 1 as the reference. If the decibel milliwatt (dBmW) is used as a final unit, then Po = 1 mW and P will be converted into milliwatt before calculation. If decibel watt (dBW) is used as a final unit, then Po = 1 W and P will be converted into watt.

From the pure mathematical perspective, the logarithm has an interesting property, that is

          log(a x b) = log(a) + log(b)
          log (a/b) = log(a) - log(b)

while it expresses an isomorphism between the multiplicative group of the positive real numbers and the additive group of all the reals. It is very convenient in the engineering field, since when we need a power Pa to be 10^c times smaller than Pb, we could simply use Pa(dB) = Pb(dB) - c instead of going through all the complicted calculations in division.

2. Project

Inside folder 'C:\wse\project'of your computer, there is a set of data files with names 'T.dat'. Those files were recorded here in NSL. on Dec. 15, 2007. The numbers in the names are formatted in way of YYMMDDhh, therefore the last two digits before the dot are indicators for the hours of the day. Everyfile contains four columns of data, the date, the time, the signal power (in dB), and the estimated noise power (in dB). The numbers were written into those files every 0.1 seconds, row by row.

1. Task 1. Time Plots

We chose the file 'T07121507.dat' from the folder 'C:\wse\project'. We then plotted 4 graphs with the data

(a) Signal Power (in dB) vs. Time

Image:Sigpowerdb.jpg

(b) Signal Power (not in dB) vs. Time

Image:Sigpowerndb.jpg

(c) Estimated Noise Power (in dB) vs. Time

Image:EstNPdb.jpg

(d) Estimated Noise Power (not in dB) vs. Time

Image:EstNPNdb.jpg

2. Task 2. Detection

We used the same file, 'T07121507.dat', to compare the signal power with a threshold which is (10^0.6 * Estimated Noise Power) at the same instant. If the signal power was greater than the threshold at that time instant, we marked the detection indicator as 1, if the signal power was not greater we marked it with 0.

Then we plotted the detection indicators with time.

Image:Detectionind.jpg

DAY 8


3. Task 3. Count

We counted the number of events in this 5 minutes. We considered continuous 1 detection as one event. We modified the detection indicators with a 101-111 rule, meaning that if there was 101 in the detection indicators we changed it into 111. Then we plotted the modified detection indicators with time and counted again.

Image:Moddetection.jpg