Anda di halaman 1dari 5

1

Analysis Frequency Spectra an Audio Signal


Subject: Signals and Systems Students: Gerardo Hernandez code. 809027 Luis Mendoza code.209045 Orlando Delgado code.809018 Teacher: Oscar Marino Universidad Nacional de Colombia, Manizales

Abstract With the help computational tool, Matlab, we want apply some of the concepts discussed in the signals and systems course. Well make a software at Matlab that permit us obtain a audio signal in a given format and process it at different ways for comparing their spectra. The audio signal can be taken from a sound le existing in the computer or upload trough direct recording using P.C microphone. Well implement the objectoriented programming in the GUIDE for achieve a nice graphical interface and easy manipulation for user, according their needs. Index Terms Fourier transform, signals, sound, discrete ,sampling, lter, spectrum, frequency.

IV. IV-A.

T HEORETICAL F RAMEWORK

File Wav

I.

I NTRODUCTION

This text discloses a specic application on Fourier Transform, taking into account the lters (low pass lters and high pass lters), developed based on the collection of sounds from outside or exporting les WAV to then get the transformed and it ltrated in this manner, you can nd the best way to listen to a recording for which you use the graphical interface Matlab (Guide), for facilitating user interaction with application development. II. G ENERAL O BJECTIVE

Waveform Audio File Format (WAVE, or more commonly known as WAV due to its lename extension),[3][6][7][8] (also, but rarely, named, Audio for Windows[9]) is a Microsoft and IBM audio le format standard for storing an audio bitstream on PCs. It is an application of the RIFF bitstream format method for storing data in chunks, and thus is also close to the 8SVX and the AIFF format used on Amiga and Macintosh computers, respectively. It is the main format used on Windows systems for raw and typically uncompressed audio. The usual bitstream encoding is the linear pulse-code modulation (LPCM) format. IV-B. Fourier Transform

Develop a practical application of some of the concepts covered in the course of signals and systems III. S PECIFIC O BJECTIVES

The Fourier transform is a mathematical operation that decomposes a signal into its constituent frequencies. Thus the Fourier transform of a musical chord is a mathematical representation of the amplitudes of the individual notes that make it up. The original signal depends on time, and therefore is called the time domain representation of the signal, whereas the Fourier transform depends on frequency and is called the frequency domain representation of the signal. The term Fourier transform refers both to the frequency domain representation of the signal and the process that transforms the signal to its frequency domain representation. In mathematical terms, the Fourier transform transforms one complex-valued function of a real variable into another. In effect, the Fourier transform decomposes a function into

Apply the Fourier transform in audio signal processing using Matlab. Analyze audio signals from their spectra in the time domain and frequency, in the discrete time.

oscillatory functions. The Fourier transform and its generalizations are the subject of Fourier analysis. In this specic case, both the time and frequency domains are unbounded linear continua. It is possible to dene the Fourier transform of a function of several variables, which is important for instance in the physical study of wave motion and optics. It is also possible to generalize the Fourier transform on discrete structures such as nite groups. The efcient computation of such structures, by fast Fourier transform, is essential for high-speed computing. There are several common conventions for dening the Fourier transform of an integrable function f : R C . This report will use the denition:

IV-C.1. Low Pass Filters: An ideal low-pass Filters transfer function is shown. The frequency between pass and stop bands is called the cut-off frequency (wc ). All of the signals with frequencies be- low !c are transmitted and all other signals are stopped. In practical Filters, pass and stop bands are not clearly dened, |H (jw)| varies continuously from its maximum toward zero. The cut-off frequency is, therefore, dened as the frequency at which |H (jw)| is reduced to 1/ 2 = 0,7 of its maximum value. This corresponds to signal power being reduced by 1/2 as P V 2 . IV-C.2. High Pass Filter: A high-pass lter, or HPF, is an LTI lter that passes high frequencies well but attenuates (i.e., reduces the amplitude of) frequencies lower than the lters cutoff frequency. The actual amount of attenuation for each frequency is a design parameter of the lter. It is sometimes called a low-cut lter or bass-cut lter. V. M ETHODOLOGY

F () =

f (x) e2ix dx

For every real number . When the independent variable x represents time (with SI unit of seconds), the transform variable represents frequency (in hertz). Under suitable conditions, f can be reconstructed from f by the inverse transform:

Program development is done as follows: The program basically allows us to represent an audio signal at the time domain and transform it to frequency domain, using Fast Fourier Transform (FFT) Analysis. Once represented in frequency terminus, becomes a high pass lter or low pass lter to desired frequencies for then compare the changes in the spectrum and sound reproduction. For obtain audio signal, we using some commands in Matlab, which can upload in memory a sound le with .WAV format (default), or record since microphone an audio signal during a specic time, that will be able save with the format same, for after be used. The les have to be in the same folder where the program run. Once you enter the signal is possible to see their representation in the time domain, in this case graphically shows the evolution of the amplitude (of the magnitude that we measure: intensity and volume of sound) versus time. Later, will be able to observe and characterize the spectrum of the analog audio signal, through

f (x) =

F () e2ix d

For every real number x. For other common conventions and notations, including using the angular frequency instead of the frequency , see Other conventions and Other notations below. The Fourier transform on Euclidean space is treated separately, in which the variable x often represents position and momentum. IV-C. Filters

Filters are electronic circuits which perform signal processing functions, specically to remove unwanted frequency components from the signal, to enhance one wanted it, or both. Filters can be:

Fourier transform, through Fourier transform, which not only contains information about the intensity to certain frequency, but also about phase, this information can be represented as a two-dimensional vector or as a complex number. Frequency representation capture the spectral characteristics of the audio signal, which the signal spectrum shows the energy distribution within the frequency range. Addition the fundamental frequency, there are many frequencies present in a waveform. A spectral representation shows the frequency content sound. The individual frequency components of the spectrum can be called harmonics or partial. Harmonic frequencies are simple integer of fundamental frequency. Fourier analysis will be able to represent any waveform through a set of harmonically related components of appropriate amplitude and phase. As FT is an intensive computational process, then use a technique called Fast Fourier Transform (FFT) analysis, available in Matlab, which provide conversion to the frequency domain of the auditory signal, allowing spectrum analysis. The FFT uses mathematical shortcuts to minimize processing time, but this puts at risk the itself analysis. The resulting analysis le known as the FFT size, indicates the number of original signal samples used in the analysis and determines the number of discrete frequency bands. When using many frequency bands, the bands have less bandwidth, allowing more accurate frequency readings. FFT takes N consecutive samples of signal and performs a mathematical operation to produce N samples of the signal spectrum. The N samples are complex values with real and imaginary part which can calculate the absolute value, which is spectrum magnitude. Sampling and quantization of the analog signal will have a sampling rate of 44100 Hz and will yield a corresponding digital signal. Finally, for achieve adequate sampled signal we use low pass lters or high pass, as needed. In the end, the program can compare each spectra of the input signal and used it according to convenience.

VI. VI-A.

U SER M ANUAL

Open the Program

For run the program, you must have installed Matlab on your computer. Then go to the folder where is the application, select it and double click or intro and the program will run automatically. Once executed, the following window opens:

Fig. 1. Main window program.

Here you can see that program contains a space for the acquisition and audio signal processing and a graphical interface where it shows the behavior of signal and their spectra, as explained in the following points.

VI-B.

Upload the Audio Signal to the Program

When is required process an audio signal, whether the recording of an interview, a sound of some natural event, a music le, etc, often the user already has the le which it want to do the respective analysis, but sometimes, occurrence of imminent events makes it necessary obtain an immediate recording and high quality. For this, the program has two ways to load the audio signal: VI-B.1. Direct Recording From Microphone: One way to process the audio signal may be recorded from outside the computer using the PC microphone or headset. For record the signal, connect a microphone to your computer (if this is not included) and then position yourself in the position for recording (in the top left of the program) as shown in gure (2)

should be addressed to upload a le.as shown in Figure (5).

Fig. 2. Recording area.

Later, enter the time in seconds for which to record and press the record button as shown in the gure (3).

Fig. 5. Upload sound le.

you must Enter the name of the le and sampling speed. After click the open button and the program will load it .

VI-C.
Fig. 3. Recording made.

Play and Plot the Signal

Once signal is recorded, can process it immediately or save it for later use. To save the le, simply type the desired name in the place designated for this (see gure 4). The program is saved by default in the folder where is the executable with wav format.

Play and plot the signal is very simple, once loaded the audio signal, you must press the play and graph button (see gure 5) and the program plays the le and show the spectrum of behavior of the audio signal in time in sound graphic(see example in Figure 6)

Fig. 4. Save recording.

Fig. 6. Graphic example sound in time.

VI-B.2. Upload Sound File: Another way get the sound signal, is load an existing le on the computer, for this, the le must be contained in the same folder where is the executable application. The format of the le must be .wav extension. Once you save the le in the folder,

For look the spectrum of the loudness of the signal in terms of frequency, simply press the transform button that shown in Figure (5) and automatically appear in Spectrum of the audio signal, see gure (7).

VII.

C ONCLUSIONS

Fig. 7. Sound spectrum for the example given.

VI-D.

Filtering Process

Filter the signal, should be located in the Filtering options, then choose the type of ltering (high pass or low pass), then enter the frequency value that you want to do the ltering, and press the lter button for observe the spectrum (see gure 8), the spectrum appear in the section spectrum of the audio signal ltered(see gure 9). You can play the ltered signal to observe changes, as well as save them for later use, which you need to press the respective button, and name the le (see gure 8)

The Fourier transform facilitates the analysis of a function, since it is represented in terms of frequency and not time facilitating mathematical development in all the required operations. The Fourier transform as one of its main applications in engineering is the observing efciency due to the harmonics produced in circuits applied. Guide is an important tool that facilitates interaction with the user applications, taking into account the delays the execution process.

Fig. 8. Filtering Options.

Fig. 9. Signal with low pass lter of the example.

VI-E.

Note:

For a closer view of the spectra, only pressed click on the desired graph as many times as needed for the program to make the respective zooms.

Anda mungkin juga menyukai