# I have a time domain signal.I want to calculate energy of my signal......

조회 수: 172(최근 30일)
vahid torabi 2014년 10월 18일
댓글: Nidhi Singh 2022년 1월 9일
Suppose my signal is X(t) then I want to get Fourier Transform >>> X(f) and then I want to calculate energy of my signal...
Can anyone help me? Thank you so much
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Sukshith Shetty 2021년 9월 24일
How to calculate power of this signal?
Do I need to use fft ?

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

### 채택된 답변

SK 2014년 10월 18일
편집: SK 2014년 10월 18일
Use the fft() function to calculate fourier transform. Then take the of squares of the coefficients:
F = fft(X);
pow = F.*conj(F);
This gives the power at each frequency. You can sum it (using the sum() fumction) to get the total power.
##### 댓글 수: 4표시숨기기 이전 댓글 수: 3
Sukshith Shetty 2021년 9월 24일
How to calculate power of this signal?
Do I need to use fft ?
or any other approach?

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

### 추가 답변(2개)

SK 2014년 10월 20일
Your time values are more or less uniformly spaced with some slight variation but that shouldn't matter. Just type in the exact same code as above. I get as my answer:
total_pow =
4.7414e+03
##### 댓글 수: 4표시숨기기 이전 댓글 수: 3
Sukshith Shetty 2021년 9월 24일
How to calculate power of this signal?
Do I need to use fft ?
Should I use any other approach ?

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

SK 2014년 10월 22일
편집: SK 2014년 10월 22일
I'm not sure what your question is, but if you want to understand how it works, you will have to study the "Discrete Time Fourier Trasform" (DTFT) and "Discrete Fourier Transform" (DFT). This is the discrete time, discrete frequency version of the continuous Fourier transform. "Fast Fourier Transfrom" (FFT) is a fast algorithm to compute the DFT. You can easily find many tutorials online on these topics.
Mathematically there is an elegant theory for Fourier transforms and if you are an engineer it will be worth it to invest the time to know the theory. The equivalence of the variance and the sum of squares of the fourier coefficients comes from there and is known as Parseval's theorem. Another way to say it is that the fourier transform maps the space of square summable sequences (square integrable functions in the continuous case) onto the same space and preserves distance in that space (this is called isometry).
The naive implementation of dft is simple. fft is more involved so this is not the place to describe it, but you can find the implementation in some textbooks. A good textbook is "Linear Algebra and its applications" by Gilbert Strang.
##### 댓글 수: 3표시숨기기 이전 댓글 수: 2
Nidhi Singh 2022년 1월 9일
What is the unit of power when I calculate it from fft of the signal ? Is it in dB? After using the same code above I got the answer of total power in complex numbers. eg. Total_power = 1.30e02 + 1.77e-14i Can I use absolute value of that total power ? Or I don't know the use of conj here.. please explain.

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

### Community Treasure Hunt

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

Start Hunting!