Why the Gaussian after chirp z-transform (CZT) is not correct?

3 views (last 30 days)
Dear all,
I would like to use the CZT to amplify the certain frequency range. When I use a real Gaussian signal as a test, the result of CZT transformation doesn't make sense (Gaussian should remain as Gaussian after czt). In my mind, the fft requires the zero frequency at the [1,1], so I use ifftshift(signal) and the result after czt are weird with multiple copy of original signals.
clear all;
close all;
Lx=1;
Ly=0.8;
M=200;
N=160;
dx=Lx/M;
dy=Ly/N;
x=linspace(-Lx/2,Lx/2,M+1);
y=linspace(-Ly/2,Ly/2,N+1);
% corresponding to M+1 size
fx=-1/(2*dx):1/Lx:1/(2*dx);
fy=-1/(2*dy):1/Ly:1/(2*dy);
% generate Gaussian signal
[Y,X]=meshgrid(y,x);
w0=0.05;
amp=exp(-pi*(X.^2+Y.^2)/w0^2);
figure;
imagesc(amp);
% targeted frequency
sampx=1/dx;
sampy=1/dy;
fx1=-18;
fx2=18;
fy1=-18.5;
fy2=18.5;
wx = exp(-1i*2*pi*(fx2-fx1)/(M*sampx));
ax = exp(1i*2*pi*(fx1)/sampx);
wy = exp(-1i*2*pi*(fy2-fy1)/(N*sampy));
ay = exp(1i*2*pi*(fy1)/sampy);
% czt
tmp2=czt(amp,M,wx,ax);
% tmp2=czt(ifftshift(amp,2),M,wx,ax);
amp_f2=czt(tmp2.',N,wy,ay);
figure;
subplot(1,3,1);
imagesc(fx,fy,abs(amp_f2));
colormap('jet');
subplot(1,3,2);
imagesc(fx,fy,real(amp_f2));
colormap('jet');
subplot(1,3,3);
imagesc(fx,fy,imag(amp_f2));
colormap('jet');

Answers (0)

Products


Release

R2015a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!