Why does spectral phase from the fft of gaussian pulse shows sawteeth?
古いコメントを表示
Hello.
I'm interested in spectral analysis on laser pulse. I made a test code in which gaussian pulse is analyzed in FFT. The analytic answer is that the spectral amplitude is also gaussian profile while spectral phase is all zero.
clear; close all;
% Temporal profile
delta_t = 0.1; % Sampling interval.
t = -90:delta_t:90;
t_p = 35; wavelength = 790E-9; c = 3E8; k = 2*pi/wavelength; w = k*c; w = w*1E-15; % It is Just for getting normalized central frequency. Not imporant for this code.
E_field = exp(-1.38629*(t/t_p).^2).*cos(w*t);
figure(1); subplot(2,2,1); plot(t,E_field); title('Temporal envelope'); xlabel('Time(fs)'); ylabel('E-field');
% Spectral profile
N = 10*length(t); % number of FFT data points is 10 times data points of temporal signal.
spectrum = fft(E_field,N);
frequency = (0:N-1)/(N*delta_t);
figure(1); subplot(2,2,2); plot(frequency,abs(spectrum)); title('Spectrum'); xlabel('frequency(1*10^1^5 Hz)');
% Detailed spectral profile including phase
[pkv,pkl] = max(abs(spectrum(1:fix(N/2)))); % pkl is location of global maxima.
data_width = 50; % Data width over which a left peak is showed in details.
spectral_amplitude = abs(spectrum);
spectral_phase = angle(spectrum);
figure(1); subplot(2,2,3); plot(frequency(pkl - data_width:pkl + data_width),spectral_amplitude(pkl - data_width:pkl + data_width)); title('Detailed spectrum'); xlabel('frequency(1*10^1^5 Hz)'); figure(1);
subplot(2,2,4); plot(frequency(pkl - data_width:pkl + data_width),spectral_phase(pkl - data_width:pkl + data_width)); title('Spectral phase'); xlabel('frequency(1*10^1^5 Hz)'); phase = spectral_phase(pkl)
Number of FFT data points N are far larger than that of temporal signal and is also integral multiple of delta_t (= 1/sampling frequency) to avoid so called leakage problem.
It is found that the amplitude is really good however, phase profile is sawteeth shape far from what I expected.
I believe that there is no reason why phase continuously decreases thus phase jumps are occured.
Is it due to some numerical error? what kind of error should I consider? How can I solve this problem thus exact phase analysis is being made?
採用された回答
その他の回答 (1 件)
Dong-Gyu Jang
2012 年 8 月 16 日
編集済み: Dong-Gyu Jang
2016 年 2 月 3 日
1 投票
3 件のコメント
TheMellow
2014 年 5 月 12 日
This is very helpful, thanks! Not sure whether you meant to do this but there is a bracketing error in your code. This is the fixed version:
y(1:mid_t_s) = exp(-1.38629*(t_s(1:mid_t_s)/t_r).^2).*cos(w*t_s(1:mid_t_s));
y(mid_t_s:length(t_s)) = exp(-1.38629*(t_s(mid_t_s:end)/t_f).^2).*cos(w*t_s(mid_t_s:end));
Jonathan
2016 年 2 月 2 日
The Fig. 1 plotted using this code looks strange.
Dong-Gyu Jang
2016 年 2 月 3 日
カテゴリ
ヘルプ センター および File Exchange で Spectral Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!