<< Chapter < Page
  Digital signal processing - dsp     Page 16 / 24
Chapter >> Page >

Compute the complex energy at each frequency

That is all there is to it. For each frequency of interest, you can use this process to compute a complexnumber, Real(F)-jImag(F), which represents the complex energy corresponding to that frequency in the target time series.

Similarly, you can compute the sum of the squares of the real and imaginary parts and consider that to be a measure of the power at that frequency in thetime series. The square root of the power is the amplitude of the energy at that frequency.

Nested for loops

Normally we are interested in more than one frequency, so we would repeat the above procedure once for each frequency of interest. This suggests the use ofnested for loops in the algorithm. The outer loop specifies the frequency of interest. The inner loop computes the sum of the products at a particularfrequency.

Description of the transform method

The static method named transform performs a real to complex Fourier transform. The method does not implement the FFT algorithm. Rather, itimplements a straightforward sampled data version of the continuous Fourier transform defined using integral calculus. (See ForwardRealToComplexFFT01 for an FFT algorithm.)

The return values

The method returns the following:

  • Real part of the spectral analysis result
  • Imaginary part of the spectral analysis result
  • Magnitude of the spectral analysis result
  • Phase angle of the spectral analysis result in degrees

The transform method parameters

The method parameters are:

  • double[] data - incoming real data
  • double[] realOut - outgoing real data
  • double[] imagOut - outgoing imaginary data
  • double[] angleOut - outgoing phase angle in degrees
  • double[] magnitude - outgoing amplitude spectrum
  • int zero - the index of the incoming data sample that represents zero time
  • double lowF - low frequency limit for computation as a fraction of sampling frequency
  • double highF - high frequency limit for computation as a fraction of sampling frequency

Frequency increment, magnitude spectrum, and number of returned values

The computational frequency increment is the difference between the high and low limits divided by the length of the magnitude array.

The magnitude or amplitude is computed as the square root of the sum of the squares of the real and imaginary parts. This value is divided by the incomingdata length, which is given by data.length .

The method returns a number of points in the frequency domain equal to the incoming data length regardless of the high and low frequency limits.

The beginning of the transform method

The class and the transform method begin in Listing 14 . The code in Listing 14 is described above.

Listing 14. The beginning of the transform method.
public class ForwardRealToComplex01{ public static void transform(double[] data,double[] realOut,double[] imagOut,double[] angleOut,double[] magnitude,int zero, double lowF,double highF){ double pi = Math.PI;//for convenienceint dataLen = data.length; double delF = (highF-lowF)/data.length;

Questions & Answers

how do we prove the quadratic formular
Seidu Reply
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
Shirley Reply
thank you help me with how to prove the quadratic equation
may God blessed u for that. Please I want u to help me in sets.
what is math number
Tric Reply
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Sidiki Reply
Need help solving this problem (2/7)^-2
Simone Reply
what is the coefficient of -4×
Mehri Reply
the operation * is x * y =x + y/ 1+(x × y) show if the operation is commutative if x × y is not equal to -1
Alfred Reply
An investment account was opened with an initial deposit of $9,600 and earns 7.4% interest, compounded continuously. How much will the account be worth after 15 years?
Kala Reply
lim x to infinity e^1-e^-1/log(1+x)
given eccentricity and a point find the equiation
Moses Reply
12, 17, 22.... 25th term
Alexandra Reply
12, 17, 22.... 25th term
College algebra is really hard?
Shirleen Reply
Absolutely, for me. My problems with math started in First grade...involving a nun Sister Anastasia, bad vision, talking & getting expelled from Catholic school. When it comes to math I just can't focus and all I can hear is our family silverware banging and clanging on the pink Formica table.
I'm 13 and I understand it great
I am 1 year old but I can do it! 1+1=2 proof very hard for me though.
Not really they are just easy concepts which can be understood if you have great basics. I am 14 I understood them easily.
hi vedant can u help me with some assignments
find the 15th term of the geometric sequince whose first is 18 and last term of 387
Jerwin Reply
I know this work
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
virgelyn Reply
hmm well what is the answer
If f(x) = x-2 then, f(3) when 5f(x+1) 5((3-2)+1) 5(1+1) 5(2) 10
how do they get the third part x = (32)5/4
kinnecy Reply
make 5/4 into a mixed number, make that a decimal, and then multiply 32 by the decimal 5/4 turns out to be
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing - dsp' conversation and receive update notifications?