[SOLVED] ELEC3104 Mini Project P0

100.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon ELEC3104-mini-project-v193nu.zip (4364 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

✓This mini project (individual) will focus on understanding and modelling the spectral analyses carried out by the human cochlea.d modelling the spectral analyses carried out by the human cochlea.
TLT – Level 1
▪ Introduction to Human Auditory System and MATLAB coding fundamentals
TLT – Level 2 (Pass Level)
▪ Implementation of a cascaded filter bank model of the cochlea for analysis purposes.Assignment Project Exam Help
TLT – Level 3 (Credit Level)
TLT – Level 4 (Distinction Level)
TLT – Level 5 (High Distinction Level)
▪ Incorporate mechanisms into the cascaded cochlear model that makes the cascaded filter bank adaptive.
Additional Information: In addition to the information provided to you in these slides, you are strongly encouraged to find and view animations and videos that describe the functioning of the peripheral auditory system and the cochlea in particular. Visualisation in the form of these animations will be very helpful in understanding cochlear signal processing.
Eg: Cochlear Animation – https://www.youtube.com/watch?v=dyenMluFaUw

Introduction to the Human Auditory System
✓ The human auditory system is responsible for converting pressure variations caused by the sound waves that reach the ear into nerve impulses that are interpreted by the brain.
✓ The Human Auditory System is designed to assess frequency (pitch) and amplitude (loudness).
✓ The peripheral auditory system is divided into the Outer Ear, Middle Ear, and Inner Ear.
✓ The peripheral auditory system and in particular the cochlea can be viewed as a real-time spectrum analyser.
✓ The primary role of the cochlea is to transform the incoming complex sound wave at the ear drum into electrical signals.
✓ The human ear can respond to minute pressure variations in the air if they are in the audible frequency range, roughly 20 Hz – 20 kHz
Sounds Level
Faint 20dB (A faint Whisper is 30dB)
Soft (Quiet) 40dB
Moderate 60dB (normal conversation)
Loud 80dB (alarm clocks, vacuum cleaners)
Very Loud 90dB(Blenders);110dB (Concerts, car horns)
Uncomfortable 120dB (jet planes during take off)
Painful and dangerous 130dB(Jackhammers); 140dB(Gunshots)
*Use hearing protection
Electrical signals.
L
✓ Over 85 dB for extended periods can cause permanent hearing loss
✓ Zero decibels (0 dB) represent the absolute threshold of human hearing, below which we cannot hear a sound.

Outer Ear (Air Vibration): A resonator
✓ The pinna surround the ear canal and functions as sound wave reflectors and attenuators .
✓ The sound waves enter a tube-like structure called ear canal and it serves as a sound amplifier.
✓ The sound waves travel through the canal and reach the eardrum and cause it to vibrate
✓ The length (L) of the human ear canal is 2.8 cm (and 7 mm in diameter)
✓ Speed of sound (c) = 340.3 m/sec ;
✓ 𝑐
The resonant frequency (f) of the canal is =
4𝐿
= 3,038Hz.
✓ The human outer ear is most sensitive at about 3kHz and provides about 20dB (decibels) of gain to the eardrum at around 3000Hz.
Outer ear is a low-Q bandpass filter
(Representative figure only)
Middle Ear: An Impedance Matcher & an Amplifier
✓ Middle ear transforms the vibrating motion of the eardrum into motion of the stapes via the two tiny bones, the malleus and incus .
✓ The pressure of the sound waves on the oval window is around 25 times higher than on the eardrum.
✓ Since the sound Intensity (𝐼) is proportional (∝) to the square pressure (𝑃2) , the sound intensity
increases 625 times (or 28dB)
✓ Middle ear converts acoustic energy to mechanical energy and mechanical energy to hydraulic energy
Middle Ear Gain function
Outer Ear Middle Ear
Sound input
The combined frequency response of the outer and middle ear is a band-pass response, with its peak dominated near 3 kHz
Inner Ear
✓ The inner ear consists of the cochlea responsible for converting the vibrations of sound waves into electrochemical impulses which are passed on to the brain via the auditory nerve.
✓ The cochlea is a spiral shaped structure which is about 3.5 cm in length if uncoiled.
✓ The cochlea is divided along its length by the basilar membrane (BM)

A longitudinal section of an uncoiled cochlea

Basilar Membrane (Hydro Dynamical process)
✓ The Basilar Membrane varies in width and stiffness along its length.
✓ At basal end it is narrow and stiff where as towards the apex it is wider and more flexible.
✓ Each point along the basilar membrane has a characteristic frequency, 𝑓𝑝(𝑥), to which it is most
✓
✓
✓ responsive.
The maximum membrane displacement occurring at the basal end for high frequencies (20 kHz) and at the apical end for low frequencies (70Hz) .
When the vibrations of the eardrum are transmitted by the middle ear into movement of the stapes, the resulting pressure differences between the cochlear fluid chambers, generate a travelling wave that propagates down the cochlea and reach maximum amplitude of displacement on the basilar membrane at a particular point before slowing down and decaying rapidly
The location of the maximum amplitude of this travelling wave varies with the frequency of the eardrum vibrations
If 𝑥 is the distance of a point on the basilar membrane from the stapes, then the frequency, 𝑓𝑝(𝑥), that produces a peak at this point is given by:
𝑓𝑝 𝑥 = 20000.0 10−0.667 𝑥 𝐻𝑧 0 ≤ 𝑥 ≤ 3.5 𝑐𝑚
• It is evident that a 20 kHz tone at the stapes will cause the BM to vibrate at a point 𝑥 = 0.
• A 70 Hz tone will excite the BM at a point x = 3.5 cm (i.e. at the apex)
3.5 cm
0.05155 cm Basilar membrane
Base
Apex
= 3.5 cm
sympathy with pressure variations in the cochlear fluid.

Basilar Membrane
✓ Different frequencies stimulate different areas of the basilar membrane
✓ When a tone (single sinusoid) is applied, the cochlear fluid oscillates in phase with the stimulating frequency causing a travelling wave pattern of the vibration on the basilar membrane
✓ There will be one place where the resonant frequency of the membrane matches the stimulus frequency and this place will show the maximum amount of vibration
✓ By measuring vibration at particular points on the membrane for a range of stimulus frequencies we can plot the frequency response of each place on the membrane
✓ The essential function of the basilar membrane is to act as a frequency analyser (a set of band-pass filters each responding to a different frequency region) resolving an input sound at the eardrum into its constituent frequencies
Organ of Corti
✓ Attached to the basilar membrane and running its entire length is the organ of corti containing some 30,000 sensory hair cells.
✓ The hairs (cilia) of these cells stick up from the organ of corti and are in contact with overlying Tectorial Membrane
✓ There are two types of sensory hair cells:
▪ One row of inner hair cells, whose cilia float freely in the fluid-filled region called subtectorial space
▪ Three rows of outer hair cells whose cilia are attached to the tectorial membrane
✓ Most of the afferent fibres (neurons which carry signals to the brain) come from inner hair cells,
✓ The efferent fibres (which receive signals from the brain) go mainly to outer hair cells.
✓ This in turn triggers the inner hair cells to transmit nerve impulses along the afferent fibres and eventually to brain.
✓ The motion of each part of the basilar membrane as detected by the inner hair cells is transmitted as neural description to the brain.
Inner Ear (Cochlea)
SOUND
A simplified Diagram of a Human Auditory System
Here bending the inner hair cell cilia is simulated by charging of the capacitor and returning to the initial position of the cilia is equivalent to discharging the capacitor.
✓ The mechanical displacement to electrical energy transduction process takes place in the inner hair cells
✓
✓
✓
✓ thus modulating current flow through the hair cell.
The modulation being directly proportional to the degree of bending of the cilia and the bending of the cilia is one direction only; in effect a half wave rectification of the basilar membrane displacement takes place.
Bending of the cilia releases neurotransmitter which passes into synapses of one or more nerve cells which fire to indicate vibration
The amount of firing is thus related to the amount of vibration
Since the neurotransmitter is only released when
the cilia are bent in one direction, firing tends to be in phase with basilar membrane movement
Mechanical to Neural Transduction (Electro Chemical)

Mechanical to Neural Transduction (Electro Chemical)
✓ The model inner hair cell is a capacitor model, in which the input voltage corresponds to the spatially differentiated membrane displacement output of the auditory model. (Second part of Figure below). Here bending the inner hair cell cilia is simulated by charging of the capacitor and returning to the initial position of the cilia is equivalent to discharging the capacitor.
✓
✓
✓ Spatially differentiation refers to taking the derivative with respect to position (along the basilar membrane) and a discrete model is given by:
𝑑 𝑖 + 1 − 𝑑 𝑖
𝑠 𝑖 =
Assignment Project Exam HelpΔ𝑥𝑖
where, 𝑑 𝑖 is the displacement at the 𝑖𝑡ℎ section along the membrane and Δ𝑥𝑖 is the width of the 𝑖𝑡ℎ section
Cochlear Modelling: Cascade and Parallel Models
✓ The basic model of the cochlea is a transmission line model ✓The peripheral auditory system is often
(cascade model) in which the basilar membrane is modelled as a modelled as a bank of 128 bandpass filters

cascade of 128 low pass filters, notch filters and resonators as shown above.
✓ Each digital filter section in the model above represents a section of the basilar membrane (tuned to a specific frequency) with 128 sections representing the entire basilar membrane
Magnitude response of the cascaded filter bank model
(auditory filters) with overlapping passbands.
✓ Typically modelled using a finite number of bandpass filters, equally spaced along the Basilar Membrane.
Magnitude response of the parallel filter bank model

Learning Activity 1: Modelling the Outer Ear and the Middle Ear
(a) Obtain the transfer function of the middle ear filter, by suitably placing poles and zeros on the z-plane. Verify your results in MATLAB.
(b) Using placement of poles and zeros, estimate a model for the Assignment Project Exam Helpouter ear and cascade it with your previous model of the middle ear and show using MATLAB that the overall response matches the one shown in this figure.
The combined frequency response of the outer and middle ear is a band-pass response (sum – see the adjacent magnitude response diagram), with its peak dominated near 3 kHz
Filter Design: Pole zero placement
✓ Calculate the digital filter coefficients of the resonant pole and resonant zeros using pole zero placement (e.g. : see diagram below)
2𝜋𝑓𝑝
✓ Resonant pole frequency = 𝜃𝑝; radius = 𝑟𝑝; 𝜃𝑝 = 𝑓𝑠 ; 𝑓𝑠 = 16𝑘𝐻𝑧 (or higher)
2𝜋𝑓𝑧
✓ Resonant zero frequency = 𝜃𝑧; radius = 𝑟𝑧 (𝑟𝑧 > 𝑟𝑝 and closer to unit circle); 𝜃𝑧 =

𝑓𝑠
𝑧2 𝑧2 𝑧2 1
✓ 𝐻𝑝 𝑧 = 𝑧−𝑟 𝑒𝑗𝜃𝑝 𝑧−𝑟𝑝𝑒−𝑗𝜃𝑝 =Assignment Project Exam Help𝑧2−𝑟𝑝 𝑒𝑗𝜃𝑝+𝑒−𝑗𝜃𝑝 𝑧+𝑟𝑝2 = 𝑧2−𝑟𝑝 2 cos 𝜃𝑝 𝑧+𝑟𝑝2 = 1−2𝑟𝑝 cos 𝜃𝑝𝑧−1+𝑟𝑝2𝑧−2
𝑝
1

✓ Similarly, 𝑎1 = 2𝑟𝑧 cos 𝜃𝑧 and 𝑎2 = 𝑟𝑧2 for 𝐻𝑧 𝑧 = 1 − 𝑎1𝑧−1 + 𝑎2𝑧−2
✓ Both transfer functions can be normalised such that DC gain = 1 as follows:
𝐻𝑝 𝑧 = 1−𝑏11−𝑧−𝑏11++𝑏𝑏22𝑧−2 and 𝐻𝑧 𝑧 = 1−𝑎11−𝑧−𝑎11++𝑎𝑎22𝑧−2
✓ 𝑟𝑝 and 𝑟𝑧 can be calculated approximately as follows:
𝑟𝑝 ≈ 1 − 𝜋 ; 𝑟 ≈ 1 −𝜋
Q-factors: 𝑝 𝐵𝑊𝑝 ; 𝑄𝑧 𝐵𝑊𝑧
Pole – zero plots and magnitude responses of the outer ear
% Outer ear implementation – Learning activity 1 % convert the poles and zeros to numerator and
% Using the magnitude response (dotted line) given in slide 15 denominator polynomials
% You can observe that the magnitudes at 0 Hz and 10 kHz are zeros_outer_ear = [zero_1 zero_2 zero_3 zero_4];
closer to zero. poles_outer_ear = [pole_1 pole_2 pole_3 pole_4];
% Hence, we need to place zeros at real axis and complex zeros b = poly([zero_1 zero_2 zero_3 zero_4]); closer to 10 kHz. a = poly([pole_1 pole_2 pole_3 pole_4]);
% Therefore, we need to place a complex conjigate pair sgtitle(‘Outer ear implementation’);
zero_1 = 0.8; subplot 212
zero_2 = 0.8; n = 1024; % FFT points zero_3 = -0.9 + 0.1i; [H,w] = freqz(b,a,n); zero_4 = -0.9 – 0.1i; mag_db = 10*log10(abs(H));
% plot the x axis in log scale
pole_1 = 0; semilogx(fs/2*(w/w(end)),mag_db);
pole_2 = 0; grid on;
pole_3 = 0.8 + 0.5i; title(‘Magnitude response’); pole_4 = 0.8 – 0.5i; ylabel(‘Magnitude (dB)’);
xlabel(‘Frequency (Hz)’);

Pole – zero plots and magnitude responses of the outer ear

Pole – zero plots and magnitude responses of the middle ear
% Middle ear implementation – Learning activity 1 figure
zero_1 = 0.95; zero_2 = 0.95; zero_3 = -0.4+0.1i; zero_4 = -0.4-0.1i;
pole_1 = 0; pole_2 = 0; pole_3 = 0.9+0.3i; pole_4 = 0.9-0.3i; sgtitle(“Middle ear implementation”); subplot 211
zplane(b,a) % plot zplane of middle ear model title(‘Pole-Zero Plot’);
Assignment Project Exam Help% compute freq. resp. of middle ear model n = 1024; % FFT points
% convert the poles and zeros to numerator and –
% -denominator polynomials
zeros_middle_ear = [zero_1 zero_2 zero_3 zero_4]; poles_middle_ear = [pole_1 pole_2 pole_3 pole_4]; b = poly(zeros_middle_ear); a = poly(poles_middle_ear); subplot 212
% plot the x axis in log scale
semilogx(fs/2*w/w(end),10*log10(abs(H))); grid on xlabel(‘Frequency (Hz)’) ylabel(‘Magnitude (dB)’)
title(‘Approximate mag. res. of middle ear’);
Pole – zero plots and magnitude responses of the middle ear

Combined magnitude responses of the outer & middle ear
% Combine Outer ear and middle ear implementation Learning activity 1 zeros_combined = [zeros_outer_ear zeros_middle_ear]; [H, w] = freqz(k0*b,a,n); subplot 212
% plot the x axis in log scale
semilogx(fs/2*w/w(end),10*log10(abs(H)));
poles_combined = [poles_outer_ear poles_middle_ear]; grid on
Assignment Project Exam Helpxlabel(‘Frequency (Hz)’)
b = poly(zeros_combined); ylabel(‘Magnitude (dB)’)
figure
zplane(b,a) ;% plot zplane of middle ear model title(‘Pole-Zero Plot’);
% compute freq. resp. of middle ear model n = 1024; % FFT points k0 = 100; % gain factor
Combined magnitude responses of the outer & middle ear

Learning Activity 2 : Impulse and Magnitude Responses
✓The impulse response of an auditory filter can be modelled by:
𝒈 𝒏 =𝒌 𝒏𝑻 𝑵−𝟏𝒆−𝟐𝝅𝒃 𝟐𝟒.𝟕+𝟎.𝟏𝟎𝟖𝒇𝒑 𝒏𝑻𝒄𝒐𝒔 𝟐𝝅𝒇𝒑𝒏𝑻
You will notice that the impulse responses have infinite duration, and thus each impulse response will need to be truncated to, say, 150 to 200 coefficients (i.e., 0≤𝑛<200).
✓Plot the impulse responses of all four filters.
✓Plot the magnitude responses of all four filers.
✓Plot the centre frequency, bandwidth and Q factor for all filters.
Discuss your plots with your lab demonstrator.

Learning Activity 2 – MATLAB code
% Impulse and magnitude response calculation of an auditory G=fft(g, NFFT); % filter’s frequency response in [0 fs]
filter G=abs(G(1:NFFT/2,:)); % filter’s magnitude response in [0 fs/2] clc; clear all; close all for i=1:num_filter
fs=20000; % normalize all the impulse response max to 1
num_filter = 128; % nubmer of filters g(:,i)=g(:,i)/max(abs(G(:,i)));
NFFT=1024; % number of FFT points end
% 2.9985 and 0.0869 are xmax and xmin G=fft(g, NFFT); % normalised filter’s frequency response in [0
Assignment Project Exam Help
delta_x = (2.9985-0.0869)/(num_filter-1); fs]
k = 128:-1:1; % filter index % normalised filter’s magnitude response [0 to fs/2] in dB
% Auditory filter parameters b=1.14;
T=1/fs; % sampling period N=4; % order of filter n=0:199; % sample index
% filter’s impulse response for i=1:num_filter % est. filter’s bandwidth
for i=1:num_filter
% find frequency index in passband region of filter pass_band_freqID = find(G(:,i)>=-3);
g(:,i)=((n*T).^(N-1)).*exp(2*pi*b*(24.7+0.108*fp(i))*n*T).*…
cos(2*pi*fp(i)*n*T); % Bandwidth of filter end BW = [BW freqHz(pass_band_freqID(end))-
freqHz(pass_band_freqID(1))];
end
Learning Activity 2 – MATLAB code

Q = fp./BW; % Q factor of filter (Selectivity) figure subplot 311 plot(fp/10^3) % plot centre frequencies xlim([1 num_filter]) ylabel(‘fp (kHz)’) title(‘Filter”s centre frequency’)
for i = 1:length(checked_filter_index) subplot(4,1,i) plot(g(:,checked_filter_index(i))) axis([0 200 min(g(:,checked_filter_index(i)))…
max(g(:,checked_filter_index(i)))]) title([‘Impulse response of filter ‘ num2str(i) … ‘; fp=’ num2str(round(fp(i))) ‘Hz’])

subplot 312 Assignment Project Exam Helpendxlabel(‘Sample index’)
plot(BW/10^3) % plot bandwidth figure
plot(Q) % plot Q factor axis([0, fs/2/10^3 -50 0]); xlim([1 num_filter]) ylim([-30 0]);
ylabel(‘Q’) title(‘Magnitude response of 4 selected filters’); xlabel(‘Filter number’) grid on; title(‘Filter”s Q factor’) figure
plot(freqHz/10^3,G(:,:));
figure xlabel(‘Frequency (kHz)’);
vlimit=[0.02 0.05 0.1 0.5]; ylabel(‘Magnitude (dB)’); checked_filter_index = [70, 90, 110, 121]; axis([0, fs/2/10^3 -50 0]);
ylim([-30 0]);
title(‘Magnitude response of all filters’);
Learning Activity 2 – Filter responses
Learning Activity 2
Reflections
(a) What major differences do you see between the impulse responses you have plotted and why?
(b) Using these impulses responses, find the magnitude responses of all four filters and plot them (frequency vs magnitude in dB) on the same figure so you can compare them.
(d) Approximately estimate the 3dB bandwidths of all four filters from your plots. Do they vary with the centre
frequency? If so, how do you think they are related?
(e) Explain your understanding of constant-Q filters and constant-Bandwidth filters.

39

  • ELEC3104-mini-project-v193nu.zip