Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bandpass filter with chirp signal input

Status
Not open for further replies.

magnetra

Full Member level 5
Joined
Apr 21, 2005
Messages
265
Helped
10
Reputation
20
Reaction score
7
Trophy points
1,298
Location
27.45N, 85.20E KTM, NP
Activity points
3,390
chirp signal

I am trying to emulate the output from a Gammatone filter for a hyperbolic chirp as input. The matlab script is shown below.
I have generated a hyperbolic chirp with frequency sweeping from 100kHz to 20kHz in 1ms. And the Gamma tone filter has center frequency of 50kHz and bandwidth of 20kHz. This means, theoretically the filter output should peak when the input chirp frequency hits 50kHz and this happens @ time t=250us.
However, the convoluted result ( output from GTF) seems to peak much earlier than 250us which is quite unexpected.

Please help me resolve this issue.

Code:
Fs = 500e3; % Sampling freq
T = 1e-3;   % 1ms sweep time
t = 0:1/Fs:T;

% Input Hyperbolic chirp generation
% The chirp frequency sweeps from f1 to f2 
% The beginning and end of the chirp amplitude is shaped with Hanning window
f1 = 100e3;
f2 = 20e3;
b = f2*T/(f1-f2);
a = b*f1;
freq = a./(t + b);
wHann = hann(101)';
wAmp = [wHann(1:51) ones(1,length(t)-101) wHann(52:101)];
x = cos(2*pi*freq.*t).*wAmp;       % Hyperbolic chirp with AM by Hanning window

% GTF impuse response
% Gammatone filter with bandwidth B and center freq fc
k = 1;      % Gain
n = 4;      % Choosen appropriately for human auditory model (Patterson 90)
B = 20e3;   % Bandwidth in Hz
fc = 50e3;  % Center frequency

% impuse response
h = k*t.^(n-1).*exp(-2*pi*B*t).*cos(2*pi*fc*t);

% Output from GTF
yG = conv(h,x)/Fs;
tg = (0:length(yG)-1)/Fs;
figure;
plot(tg,yG);
title('GTF output');
[/code]
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top