convert the time domain signal into frequency domain signal

조회 수: 7 (최근 30일)
hi guys, this is the second part of this topic ,
I have divided into two part in order to make the topic readable and useful and I'd like to thank Mr Star Strider for his useful answer and support
Ok, let carry on
I have the acceleration data of 3 axes(x, y, and z) and it's represented in time domain signal.
There are about 10500 records (data points or samples)in the file for each axis and I have divided these records into segments ( each segment contains 256 data points.
now, I'd like to convert each segment in the time domain into frequency domain .
As we know this can be done using FFT function
One of the limitations of using the FFT function is that the number of data points in the segment must be a power of two. and I have already fixed the size of each segment into 256( 2 to the power 8)
i have used this code,
% FD_Signal_X{nn,1}=fft(X_Segments_256{nn});
Note, NN is the number of segments, X_Segments_256 contains the data of X axes of each segment, which is 256
my question is
1- I have used this code to calculate the Energy of the frequency domain signal,
FD_Signal_X{nn,1}=fft(X_Segments_256{nn});
Energy_X{nn,1} = (FD_Signal_X{nn}).^2;
or this one is correct?
FD_Signal_X{nn,1}=fft(X_Segments_256{nn});
Magnitude_X {nn,1} = abs(FD_Signal_X{nn});
Energy_X{nn,1} = (Magnitude_X{nn}).^2;
With my respect

채택된 답변

Star Strider
Star Strider 2016년 9월 6일
The second is correct.
The first squares a complex signal, so both the real an imaginary parts of the signal are squared, producing a complex result. I do not believe that is what you want. I would not use it.
The second squares the absolute value of the complex signal, producing a real result. That calculates the power in your signal, essentially the power spectral density of your signal.
The energy of your signal at each frequency is the absolute value of the Fourier transform of your signal. The power at each frequency is the square of the energy.
  댓글 수: 32
neamah al-naffakh
neamah al-naffakh 2016년 12월 24일
it's ok sir no problem. many thanks
neamah al-naffakh
neamah al-naffakh 2017년 5월 5일
Dear Star Strider, how are you? sorry for bothering again, could you please help me with this topic, it is signal processing!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 AI for Signals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by