THz-TDS Fast Fourier Analysis in MATLAB

AI Thread Summary
The discussion revolves around analyzing Terahertz time-domain spectroscopy (THz-TDS) data using MATLAB. Users share insights on converting delay length to time and performing a fast Fourier transform (FFT) on voltage data. It is noted that the output from FFT can appear disorganized, and using the `fftshift` function along with normalization by the number of points is crucial for obtaining a properly organized spectrum. Additionally, to derive the power spectrum, users are advised to take the absolute value of the FFT output and consider the complex nature of the data. The conversation highlights the importance of correct data handling and normalization in THz-TDS analysis.
Pene1
Messages
2
Reaction score
0
Hello,

Basically I have some Terahertz time-domain-spectroscopy which I'm trying to analyse.

The data that I have has Voltage and "Delay length" within the array.

Apparently I can convert the delay length to a time using t=(delay length)/c. Then I can do a fast Fourier transform in MATLAB to swap things to the frequency domain.

The column with the voltage data I have is called 'V' and I just fft(V); however, the data Iget out is strange. My final plot should be amplitude on the y afis and frequency along the x axis.

Has anyone done anything like this before? Am I supposed to use both vectors in the array to do the transform?

Best wishes
 
Physics news on Phys.org
Hi Pene1 (curious name, by the way)

I found this topic searching for other step in this long process of THz-TDS, but I might be able to help you at this step.

The data that you obtain after executing fft(V) is the Spectrum, but with the frequencies disorganized due to the internal behavior of the FFT algorithm.
In order to short them you should use the command:
>> fftshift(fft(V)/npoints);
After this you'll obtain the spectrum properly organized and with the correct magnitude (check the normalization by npoints)
Another thing that you should consider is what you want to obtain. I assume that you want to obtain the power spectrum.
This spectrum should be
>> abs(fftshift(fft(V)/npoints));

I hope you'll find this usefull
regards
 
Super helpful thanks; I do have another query... my fft gives complex numbers, I read somewhere that to get the power spectrun you multiply by the complex conjugate in order to get a real number - is that what you have done?

I might be able to help with your step if you let me know what's troubling you?


nriqone said:
Hi Pene1 (curious name, by the way)

I found this topic searching for other step in this long process of THz-TDS, but I might be able to help you at this step.

The data that you obtain after executing fft(V) is the Spectrum, but with the frequencies disorganized due to the internal behavior of the FFT algorithm.
In order to short them you should use the command:
>> fftshift(fft(V)/npoints);
After this you'll obtain the spectrum properly organized and with the correct magnitude (check the normalization by npoints)
Another thing that you should consider is what you want to obtain. I assume that you want to obtain the power spectrum.
This spectrum should be
>> abs(fftshift(fft(V)/npoints));

I hope you'll find this usefull
regards
 
FFT is an application over a complex space. Don't worry about the imaginary part because physics uses to happen in ℝ^3 and you should take the modulo of the data (in MATLAB is the built in function "abs"). Unpleasantly there are several options to take the modulo or magnitude of the signal (I discovered it in Origin's Lab help).

Luckily I solved my problem, but thank you in any case.
Recently we started with a THz-TDS system from Ekspla and I wanted to reproduce their data to check my algorithm.
This guys gave you the power spectrum normalized as MSA (Mean Squared Amplitude) or that is what I think after looking for more information.
So that the power spectrum can be evaluated as follows:
let me suppose that X=fftshift(fft(V))/nptos

>>PowerSpectrum=abs(X)=sqrt(real(X).^2+imag(x).^2)/nptos;

>>PoweSpectrum(as MSA)=(real(X).^2+imag(x).^2)/nptos^2;
 
Thread 'Help with Time-Independent Perturbation Theory "Good" States Proof'
(Disclaimer: this is not a HW question. I am self-studying, and this felt like the type of question I've seen in this forum. If there is somewhere better for me to share this doubt, please let me know and I'll transfer it right away.) I am currently reviewing Chapter 7 of Introduction to QM by Griffiths. I have been stuck for an hour or so trying to understand the last paragraph of this proof (pls check the attached file). It claims that we can express Ψ_{γ}(0) as a linear combination of...

Similar threads

Replies
12
Views
2K
Replies
6
Views
2K
Replies
8
Views
2K
Replies
2
Views
13K
Replies
2
Views
2K
Replies
2
Views
2K
Back
Top