Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Test Sampling and Channel Characterization

Sample Signal Generation

For our sample signal we decided on a chirp covering the range of human hearing, 15 Hz to 20000 Hz. This signal was created using the Matlab chirp command as follows:
%% Chirp Function
    
    Fs = 44100;
    
    f0 = 15;
    f1 = 20000;
    t = 0:1/Fs:1-1/Fs;
    y = chirp(t,f0,1,f1);
    
where f0 and f1 are the edges of the spectrum of human hearing. The vector t has 44100 entries, each separated by 1/44100. Taken as a time vector and with the end time of the chirp set as 1 second, this creates a chirp which goes from 15 Hz to 20000 Hz in 1 second at intervals of 1/44100 seconds, which allows for a clean transition from 15 Hz to 20000 Hz at the standard sampling rate of 44100 Hz.

Finding the Transfer Function of the Speaker to Mic Channel

Figure 1: Microphone and Speaker Equipment used for signal sampling
Figure 1 (graphics1.jpg)
In order to find HRTFs we first had to know the transfer function of the speaker to mic channel through air. We did this by first playing our chirp signal at a mic held approximately 3 feet away and recording the mic output. We did this twice and averaged the two outputs to remove any anomalies. Then using the property that for an LTI filter:
hchannel(t)in(t)=out(t)(1)
or in terms of frequency domain:
HChannel(ω)IN(ω)=OUT(ω)(2)
HChannel(ω)=OUT(ω)/IN(ω)(3)
where HChannel(ω)is the transfer function of the system and IN(ω) and OUT(ω) are the fourier transforms of the input and output signals respectively. Thus, by taking the fft of the mic output and pointwise dividing by the fft of the chirp signal (3), we found the transfer function of the speaker to mic channel.
Figure 2: Amplitude Spectrum of Mic to Speaker Transfer Function
Figure 2 (graphics2.jpg)

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.