Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Fourier transform basic

Status
Not open for further replies.

neptune

Member
Hello,

I have a confusion on how fourier transform works fourier transform is defined as
F(ω) = ∫ f(t).e-jωt dt limits -∞ to ∞

which can be expanded to F(ω) = ∫ f(t). (cosjωt + jsinωt) dt
these cosine and sine wave are extrapolated on F(t) signal , their resultant is calculated by adding sin and cosine waves amplitude to f(t)'s amplitude at a all time t.
then in step 2 frequency ω is varied, and then again resultant is calculated by above process , we repeat this process to plot frequency and amplitude graph of a given signal f(t).

Q1 - is my basic understanding correct ?
Q2 - why do we use imaginary term j with sine wave , cant we simply use sine wave here. (sine and cosine are orthogonal functions out of phase by 90 degrees)
 
ok i dont want to go into basic of "i" or "j".
what i want to know is how will the graph of sine wave change when "j" is added to it ?
does it become out of phase ?
 
nepture,

ok i dont want to go into basic of "i" or "j".
what i want to know is how will the graph of sine wave change when "j" is added to it ?
does it become out of phase ?

It all depends on whether you are graphing the real part, the orthogonal (imaginary) part, or the magnitude. Your cos term is incorrect and the sign is wrong for the sin term in the expansion you posted. You should also read the link at https://en.wikipedia.org/wiki/Euler's_identity and learn about Euler's formula. It is basic material you should know well. You had better have a good concept of what j means, too, or you will have a hard time understanding the material.

Ratch
 
Hello,
I read that euler's formula in my college, it states that e^jω=cosω + jsinω
[sorry i wrote wrong equation above it is F(ω) = ∫ f(t). (cosωt + jsinωt) dt limit -∞ to ∞]
Now, when we superimpose this eulers formula or both these Cosω and jsinω on any given signal then we get both Real and imaginary part of that signal after multiplying and integrating. Result is displayed in frequency domain graph.
Q- is my basic understanding correct now ?
 
Hi there,


To answer your question more directly, the expression:
cos(wt)+j sin(wt)

in exponential form is:
e^(jwt)

However the expression:
cos(wt)+sin(wt)

in exponential form is:
(1/2)*((1-j)*e^jwt+(1-j)*e^(-jwt))

So you see that leaving out the 'j' multiplier for the sin(wt) term leads to a totally different expression. Thus, the 'j' is required.

It's also interesting that sometimes we can interpret the imaginary part of the imaginary part as part of the negative real part, but here we can not assume that we have an imaginary part of an imaginary part. The sin(wt) is simply the imaginary part of the complex number.

Another explanation is that when we work in the time domain we need the j operator to show what the imaginary part is. This means that expression assigns a complex number to every wt we can come up with, not just a single real number that would result if we just added the sin and cos together (which would be possible without the 'j' ). Thus instead of getting numbers like 0.9-0.4j, 0.4+0.9j, etc., we would get single real numbers like 0.2, 0.4, 0.5234, 0.8175, etc., so the whole theory would not work :)
Actually, to show what would happen if we interpreted j*sin(wt) as the imaginary part of the imaginary part, then we would get -cos(wt), and that would lead to:
cos(wt)-cos(wt)

which means we wouldnt have any expression anymore 'cause it would go to zero :)
Perhaps we can interpret it as a rotation in another dimension, where sin(wt) runs along the y axis and cos(wt) runs along the x axis.

It was a good question.
 
Last edited:
hi,
I am not imagining negative part of a signal f(t) to be imaginary.
please see this video
https://www.youtube.com/watch?v=ObklYbQaX24 (it is only 7 min.)

at time 5:54 he has used to sinousoidal waves one in red(sine) another in green(cosine) and constructed Frequency domain results out of them.
he shows red as imaginary result and green as real result.
My question is where does he used "i" imaginary number in this whole process ? he used two sine waves which are out of phase (90 degrees) !
how can a normal time domain signal f(t) has imaginary part ?
 
Hi,

You really need to watch parts II and III of that series to get a better understanding.
One thing though, he doesnt go into detail about what you do with the cos and sin parts, but he does touch on it by explaining that you can either represent the result as real+j*imag or by expressing it as magnitude and phase.

Be aware that the summing he talks about is not the summing of the sin and cos parts. It is the summing of complex numbers like a+b*j, which retain the individual real and imaginary parts. In other words, cos+j*sin is not a sum, at least not directly. It represents a single complex number that does not need to be summed nor should be summed.

In the end, to convert to the magnitude we still dont sum the cos and sin directly, but rather use the square root of the sum of squares:
A=sqrt(real+imag)
and the phase from the inverse tangent:
TH=atan(imag/real)
taking note of which quadrant the result is supposed to reside in and adjusting the sign as necessary.

So you have to watch how you interpret his use of the word "sum".

Quick little example. For X1 and X2 both complex:
X1=cos(6*t)+j*sin(6*t)
X2=cos(8*t)+j*sin(8*t)

The sum of X1 and X2 is:
cos(6*t)+cos(8*t)+j*(sin(6*t)+sin(8*t))

and that's the end of it, unless we want to calculate the magnitude and phase.

Note that if we leave it in complex form we have two parts, real and imaginary, and if we convert it into magnitude and phase we still have two parts that obviously cannot be combined.
 
Last edited:
i had watched part II and part III previously,
what i understood from what you write is that cosω + jsinω are real+ imaginary parts
but what they really signify is that they are magnitude + phase , which are two really different quantity's ,one can not add phase and magnitude, so therefore we use "j" an imaginary notation so that we dont sum both of them up. :)

am i right ?
 
Hi,


Yes if i understand you right but let me clarify.

There are two possible ways to represent the complex pair. Either directly as a+b*j or as Magnitude@Angle. With the magnitude and angle you dont use the 'j' operator, you use some sign for the angle such as a little zero above the number to the right for the degrees or 'rad' for radian angles. Sometimes they use a little 'angle' sign for the angle (look that up on the web).
 
>ok if we dont use "i" for magnitude + angle,
then what is it used for, what is there imaginary in time domain signal ? or notation of "i" is a general case to donate two seperate quantities in on function?

>form what i read about FT , it uses two orthogonal function to convert time domain into frequency domain.
I wonder what happens if only we use single sine wave or single cosine wave to define a time domain signal into frequency domain.
 
Last edited:
Hi,

Why dont we do a much simpler example so you can get familiar with these things.

Take an RC low pass filter with R in series with the source voltage and we look at the voltage across C.

The voltage across C is:
Vc=(1/sC)/(R+1/sC)
which simplified comes out to:
Vc=1/(s*R*C+1)
or:
Vc=(1/RC)/(s+1/RC)
and declare a:
a=1/(R*C)
we get:
Vc=a/(s+a)

Now for an AC input signal we can replace s with j*w (or i*w) and we get:
Vc=a/(j*w+a)

Now lets get this into a more manageable form before we go any farther. Multiply both top and bottom by the complex conjugate of the denominator:
Vc=a*(a-j*w)/((a+j*w)*(a-j*w))

Simplify a little we get:
Vc=(a^2-a*j*w)/(a^2-j^2*w^2)

or:
Vc=(a^2-a*j*w)/(a^2+w^2)

Making:
D=(a^2+w^2)

we can expand Vc to:
Vc=a^2/D-a*j*w/D)

which is in the form:
Vc=A+B*j

Now we can convert that into a magnitude and phase angle with:
Ampl=sqrt(A^2+B^2)
Phase=atan2(B,A)

That represents a sine wave who's amplitude is Ampl and phase angle is Phase. So if we got an answer:
Vc=4+3*j

the amplitude would be:
Ampl=sqrt(16+9)=sqrt(25)=5

and the phase would be:
Phase=atan2(3,4)

and since the point 4,3 is in the first quadrant that reduces to:
Phase=atan(3/4)=36.87 degrees (approximate)

So we have a sine wave who's amplitude is 5 and phase angle is about 37 degrees.

Does that make more sense now?
 
Hello,

why are you converting everything to laplace ? this thread is about fourier basics.
your final result came out to be Vc=A+B*j , what i understood from this that voltage difference that is created across capacitor is consist of two factors real+imaginary , can you explain me what is real voltage and imaginary votage ? how are they created across capacitor in this example ?
or are they magnitude+phase ?
 
Hi,

That was just an example of using a complex number to represent an amplitude and phase shift.

An example of the low pass filter with R=1000 and C=C=0.27566e-6 and frequency F=1000Hz we have:

w=2*pi*1000
R=1000
C=0.27566e-6
imag=-w*C*R/(w^2*C^2*R^2+1)=-0.433
real=1/(w^2*C^2*R^2+1)=0.25
Ampl=sqrt(real^2+imag^2)=0.5 (peak)
Phase=taninv(imag/real)*180/pi=-60 degrees (correctly adjusted for quadrant)

Now above the real is 0.25 and the imaginary is -0.433 so we would write this as:
0.25-0.433*j

Since the amplitude and phase are calcualted above and come out to 0.5 @ -60 degrees, the output is therefore a sine wave
with amplitude (peak) of 0.5 and phase shifted by -60 degrees. This is quite easy to picture, because it's just a sine wave with
peak of 0.5 and phase shifted.

The complex interpretation in this case is that the sinusoidal part has amplitude 0.25 and the cosine part is -0.433, and when these two
waves are added together we get a sinusoidal wave that is 0.5 units in amplitude (peak) and phase shifted by -60 degrees. This is a
direct addition in time of the two waves:
v=0.25*sin(w*t)-0.433*cos(w*t)

and that is the same as a sinusoidal shaped wave with peak of 0.5 and phase shift of -60 degrees.
 
what happens when we integrate incoming signal f(t) like this
F(t)= ∫ f(t). (sinωt) dt (limit -∞ to ∞)
and then sum up all Resultants F(t) for limited frequencies, like this ∑ F(t) (from ω=0 to ω=10)
wouldnt we get amplitude vs Frequency graph.

this thing is also same as Fourier transform.
 
Last edited:
Hi again,


I think maybe what you are after is the line spectrum. In that case you would do this:

ck=(1/T)*Integral[-T/2 to T/2] f(t)*e^(-j*k*w0*t) dt

and for each ck you get a real and imag part, then you take the square root of the sum of the squares:
|ck|=sqrt(real^2+imag^2)

That gives you a graph of amplitudes vs integer frequencies,

then the amplitude of the sinusoidal (actually cosinusoidal) components (not the DC component) is:
ampl=2*|ck|

and reconstructing the original signal involves using the |ck| and the phase shift. If it were not for the 'j' operator we would never be able to calculate a phase shift. For example:
a+b

is simply two real numbers added together, which obviously does not have a phase shift. However:
a+b*j

is a real number and an imaginary number which makes up a complex number which does have a phase shift which we need to know.

The main point though is that when you see a 'j' in front of something like that, it means that the entire expression is to be treated as a complex number. If it wasnt so, they would not include the 'j' operator.
 
Last edited:
I am totally amazed by fourier transform and fourier series , it takes any random signal and tells us its periodocity in terms of cosine wave and phase shift in terms if sine wave.
while i am not amazed by Complex numbers because it is obvious they show two numbers in different dimensions but they are acting to one force in same manner for Example resistor in DC circuit is still a resistor but Inductor in DC circuit is short circuit.
but as soon we apply AC the dimensions change and both start acting as resistor , although in a very different way, resistor opposes current because of material Coductance , while Inductor acts resistor because of opposing magnetic field, both of these forces are completely opposite but complex numbers brings them together.
we can know their resultant magnitude and phase difference created from base signal.

what i learned from fourier transform is that we can express any signal in terms of any other signal. like random signal defined in terms of unit step function, it is just like convolution.

what confuses me is how come phase difference is calculated when we dont know the base signal.
 
Hi,

Well, you've talked in very general terms there so what you need to do is start to work some actual problems.
For example, take a pulse and calculate it's ck for say 11 ac components (and 1 dc component) and then try to reconstruct the original signal. If you can program in any language you can set this up inside a program and reconstruct the signal using say 111 ac components or even 1111 components for that matter as the program can calculate these in less than a second.
For an example pulse, say we have the following:
The pulse amplitude is 1 unit high. The pulse starts at t=0.5 seconds and ends at t=0.75 seconds. It repeats every 1 seconds (period=1). Calculate the ck for N components and then use that data to reconstruct the pulse signal. To get the right output you either have to use sines and cosines together or you can use a cosine and a phase shift or possibly even a sine and a phase shift.
Using 0.05 second intervals the pulse amplitudes would look something like this: 00000000001111100000
where that whole time period repeats and the period is 1 second (see attachment).

This kind of example shows how important it is to have the extra information given by the phase shift when we're using only one sinusoidal or cosinusoidal representation instead of both.
So we either have:
y=A*sin(wt)+B*cos(wt)
or we have:
y=C*cos(wt+ph)
where ph is the phase shift.
This is not too hard to see if we think about what it takes to make the wave: A*sin(wt)+B*cos(wt) with only a single 'soid, like cosine. The sin and cos terms when added create just another sine shaped wave but it has a phase shift along with it.

The attachment shows a single period of the pulse and also what it looks like as it repeats over and over. The pulse amplitude is 1.0 high.
 

Attachments

  • Pulse01.gif
    Pulse01.gif
    2.5 KB · Views: 347
Last edited:
nepture,

it takes any random signal and tells us its periodocity in terms of cosine wave and phase shift in terms if sine wave.

If a signal is truly random, then it has no periodicity, and Fourier analysis cannot be made. What you mean to say is, Fourier analysis takes an arbitrary periodic signal, and relates it to a series of sinusoidal signals of varying multiple frequencies and amplitudes.

i am not amazed by Complex numbers because it is obvious they show two numbers in different dimensions

They show numbers in an orthogonal relationship. That is shown is the link I submitted in this thread earlier.

but as soon we apply AC the dimensions change and both start acting as resistor , although in a very different way, resistor opposes current because of material Coductance , while Inductor acts resistor because of opposing magnetic field, both of these forces are completely opposite but complex numbers brings them together.

Resistance and reactance are not forces, and they are not opposites. They are just different phenomena. Resistance reduces current in a circuit by dissipating away the energy of the charge carriers as heat. Reactance reduces current by setting up an opposing voltage, and does not take away any energy from the charge carriers.

what i learned from fourier transform is that we can express any signal in terms of any other signal. like random signal defined in terms of unit step function, it is just like convolution.

Do you mean "random" or "arbitrary"?

Ratch
 
Last edited:
If a signal is truly random, then it has no periodicity, and Fourier analysis cannot be made. What you mean to say is, Fourier analysis takes an arbitrary periodic signal, and relates it to a series of sinusoidal signals of varying multiple frequencies and amplitudes.
I think you are right if a signal is Truly Random then it can not be expressed in Fourier transform.
but if we have a complex signal i.e. mixture if different periodic signal then FT can tell us some hidden periodic signals which may seam randon on VCO.
They show numbers in an orthogonal relationship. That is shown is the link I submitted in this thread earlier.
are orthogonal signals no two dimension signal ?
Do you mean "random" or "arbitrary"?
arbitary orthogonal signals, but i dont understand why they need to be orthogonal !
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top