<< Chapter < Page
  Digital signal processing - dsp     Page 6 / 14
Chapter >> Page >

There are more efficient ways to write this method taking known symmetry and asymmetry conditions into account. However, I wrote the method the way that Idid because I wanted it to mimic the behavior of an FFT algorithm. Therefore, the complex input must extend from zero to the sampling frequency.

The method does not implement an FFT algorithm. Rather, the inverseTransform method implements a straight-forward sampled-data version of the continuous inverse Fourier transform that is defined usingintegral calculus.

Parameters for the inverseTransform method

The parameters to the inverseTransform method are:

  • double[] realIn - incoming real data
  • double[] imagIn - incoming image data
  • double[] realOut - outgoing real data

The method considers the data length to be realIn.length , and considers the computational time increment to be 1.0/realIn.length .

Assumptions

The method returns a number of points equal to the data length. It assumes that the real input consists of positive frequency points for a symmetric realfrequency function. That is, the real input is assumed to be symmetric about the folding frequency. The method does not test this assumption.

The method assumes that the imaginary input consists of positive frequency points for an asymmetric imaginary frequency function. That is, the imaginaryinput is assumed to be asymmetric about the folding frequency. Once again, the method does not test this assumption.

A real output

A symmetric real part and an asymmetric imaginary part guarantee that theimaginary output will be all zero values. Having made that assumption, the program makes no attempt to compute an imaginary output. If the assumptionsdescribed above are not valid, the results won't be valid.

The program was tested using JDK 1.8 under Windows 7.

Beginning of the inverseTransform method

The beginning of the class and the beginning of the static inverseTransform method is shown in Listing 5 .

Listing 5. Beginning of the class named InverseComplexToReal01.
public class InverseComplexToReal01{ public static void inverseTransform(double[] realIn,double[] imagIn,double[] realOut){int dataLen = realIn.length; double delT = 1.0/realIn.length;double startTime = 0.0;

Listing 5 declares and initializes some variables that will be used later.

The inverse transform computation

Listing 6 contains a pair of nested for loops that perform the actual inverse transform computation.

Listing 6. The inverse transform computation.
//Outer loop interates on time domain // values.for(int i=0; i<dataLen;i++){ double time = startTime + i*delT;double real = 0; //Inner loop iterates on frequency// domain values. for(int j=0; j<dataLen; j++){ real += realIn[j]* Math.cos(2*Math.PI*time*j)+ imagIn[j]*Math.sin(2*Math.PI*time*j); }//end inner looprealOut[i] = real;}//end outer loop }//end inverseTransform}//end class InverseComplexToReal01

If you have been studying the earlier modules in this series, you should be able to understand the code in Listing 6 without further explanation. Pay particular attention to the comments that describe the two for loops.

Questions & Answers

the diagram of the digestive system
Assiatu Reply
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
what is cell divisoin?
Aron Reply
Diversity of living thing
ISCONT
what is cell division
Aron Reply
Cell division is the process by which a single cell divides into two or more daughter cells. It is a fundamental process in all living organisms and is essential for growth, development, and reproduction. Cell division can occur through either mitosis or meiosis.
AI-Robot
What is life?
Allison Reply
life is defined as any system capable of performing functions such as eating, metabolizing,excreting,breathing,moving,Growing,reproducing,and responding to external stimuli.
Mohamed
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




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?

Ask