# Connexions

You are here: Home » Content » Test Sampling and Channel Characterization

### Recently Viewed

This feature requires Javascript to be enabled.

# Test Sampling and Channel Characterization

Summary: The means by which we characterized our speaker to mic channel using a test signal.

## 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

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:

h channel ( t ) in ( t ) = out ( t ) h channel ( t ) in ( t ) = out ( t ) size 12{h_ ital "channel" $$t$$ * ital "in" $$t$$ = ital "out" $$t$$ } {}
(1)

or in terms of frequency domain:

H Channel ( ω ) IN ( ω ) = OUT ( ω ) H Channel ( ω ) IN ( ω ) = OUT ( ω ) size 12{H_ ital "Channel" $$ω$$ cdot ital "IN" $$ω$$ = ital "OUT" $$ω$$ } {}
(2)
H Channel ( ω ) = OUT ( ω ) / IN ( ω ) H Channel ( ω ) = OUT ( ω ) / IN ( ω ) size 12{H_ ital "Channel" $$ω$$ = ital "OUT" $$ω$$ / ital "IN" $$ω$$ } {}
(3)

where HChannel(ω)HChannel(ω) size 12{H_ ital "Channel" $$ω$$ } {}is the transfer function of the system and IN(ω)IN(ω) size 12{ ital "IN" $$ω$$ } {} and OUT(ω)OUT(ω) size 12{ ital "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.

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks