MATLAB Answers

Rmove known chip form signal.

1 view (last 30 days)
zohar
zohar on 7 Jan 2014
Edited: zohar on 8 Jan 2014
Hi all,
I have a time series y, with known chirp xc and I want to remove the chirp, How can I remove the chirp?
This is what i have done by now:
% Generate time seris
fs = 2^13;N=10000;f = [2000 2200 2400]';A = 10.^(([0 25 10])/20) ;
t = (0:5*N-1);
x = A*sin(2*pi*f/fs*t);x=x';
y = x+randn(size(x));
figure
spectrogram(y,1024,[],1024,fs,'yaxis')
title('Original')
% Generate chirp
fs = 2^13;f1 = 1800;f2 = 2500;t1 = (0:N-1)'/fs;A1 = 10.^((25)/20) ;
xc = A1*chirp(t1,f1,1,f2);
xcc = A1*chirp(t1+1/fs*0.3,f1,1,f2);
% Add chirp to specific point
idx = N*3/2;
n1 = idx - floor(length(xc)/2);n2 = n1+length(xc)-1;
y(n1:n2) = y(n1:n2)+ xc;
figure
spectrogram(y,1024,[],1024,fs,'yaxis')
title('Original + chirp')
%Find chirp location
xf = xc(end:-1:1);
c = abs(conv(y,xf,'same'));
[m1 m2] = max(c);m2=m2+1;
%%Remove chirp
shift = 0;
n1 = m2 + shift - floor(length(xc)/2);n2 = n1+length(xc)-1;
xn = y;
xn(n1:n2) = xn(n1:n2) - xc;
figure
spectrogram(xn,1024,[],1024,fs,'yaxis')
title('After removing chirp')
Until now it's looks perfect !!!
But here is the problem. Assuming i have error with finding pick location of my cross corrlation of 1 sample,
I can't remove the chirp !?
shift = 1;
n1 = m2 + shift - floor(length(xc)/2);n2 = n1+length(xc)-1;
xn = y;
xn(n1:n2) = xn(n1:n2) - xc;
figure
spectrogram(xn,1024,[],1024,fs,'yaxis')
title('After removing chirp with err 1 sample')
1) The problem also appears with err of half sample.
2) What can I do if there is 2 or three chirp (without overlap) ?
3) I'm open to any suggestions, even wavelet.
Ty.....

  0 Comments

Sign in to comment.

Answers (0)

Tags