fourier calculator in matlab of square wave

fourier calculator made in matlab and fourier result in matlab shows , fourier series form matlab c

Table Of Contents

Table Of Contents

Ø Introduction to Fourier Transform and Series

Ø Concept of function Vs vectors

Ø Dot Product of Vectors and Orthogonality

Ø Dot Product of Analogue functions and Orthogonality

Ø Fourier Series

Ø Fourier Transform

Ø Fourier Series Vs Fourier Transform

Ø Introduction to MATLAB

Ø Fourier Transform in MATLAB

Ø Using MATLAB for Fourier Calculator

Ø GUI of Fourier Calculator

joseph fourier

1. Introduction to Fourier Transform and Series

Introduction to Fourier Transform and Series

The concept of Fourier transform is very simple. It is used to find the frequency component of the any electrical (analogue) signal. Whenever I read Fourier transform I always ask questions from myself that how Joseph Fourier came up with the Fourier series. These types of stupid questions arise in my mind (not only in case of Fourier transform but also in every type invention and discovery). And the answer that I found is that they think, think and think and then try, try and try to implement those thoughts and came up with something innovative. And with the passage of time revisions of their equations by other mathematicians adds different flavors to their work. So Joseph Fourier simply shows that any function can be written as the series of sinusoidal components because they are orthogonal.

In my point of view the every function in time can be written as summation of infinite series of any function with variable coefficients and variable phase for every term in the series i.e. if we have two functions f(t) and g(t)

two functions

2. Introduction to Fourier Transform and Series

Then we can write f(t) in term of g(t)

f(t)=c0 g(t – x0) + c2 g(t – x1) + c2 g(t – x2) + . . . . . . . . .

c is the coefficient

x is the phase difference or time delay

Concept of function Vs vectors

Concept of function Vs vectors

What is Fourier Transform?

The concept of Fourier transform is very simple. It is used to find the frequency component of the any electrical (analogue) signal. It all starts with the discovery that every function can considered as vector. As three dimensional vector is written as A=(2,3,1). So function f(t) can be represented as n-dimensional vector e.g.f(t)=x2 can be written as f(t)=(1, 4, 9, 16, 25 . . . . ) , for better approximations we can decrease the step size from 1 to 0.001 or more less, here domain of f(t) is [1 to infinity] with step size 1.

fourier transforn and fourier calculater in matlab

As i said earlier function can be represented as vectors, and also functions behavior is very much same as that of vectors, then we can say that every vector can be represented with the help of basis or orthogonal components e.g A=(1,2,3) can be written as A=1i+2j+3k where i,j,k are unit vectors.

fourier calculator and fourier transform in matlab

So orthogonal components found in analog domain are sine and cosine functions. The orthogonality of two vectors can be tested as if there do product is zero i.e. A.B=0 where A and B are vectors and they have discrete values. if A is n-dimensional vector then A has components a1,a2,a3. . . . and B has b1,b2,b3 . . . . then There dot product can also be expressed with the help of following expression.

pic: dot product expression

orthogonality test in analong domain

As i explained earlier that analogue functions are also treated as vectors so the orthogonality test can also be applied on these functions. If we A and B are function of time in the above expression the summation sign will be replaced by the integral sign.

pic: dot product analog expression

fourier transform and its calculator


Further details can be found in the book of B.P Lathi. Sine and cosine have particular frequencies. So we can say that every function contains sine and cosine of different frequencies and amplitude.

Search This Blog

source code for fourier transform


F=3.75 * 1000000;
T=1/F;
v=[-0.000001:.00000001:0.000001];
n=1;
ans=3.3*0.4;

an=(3.3/(n*pi) * sin (n* 0.4 *2*pi));
bn=(3.3/(n*pi) * (1-cos(n* 0.4 *2*pi)) );
ans=ans+an*cos(n* (2*pi/T)*v)+bn*sin(n* (2*pi/T)*v);
n=n+1;
end
plot (v,ans)

fourier calculator explanation

this is a result of fourier series in matlab with 40% duty cycle
replece 0.4 with desired duty cycle of square wave

Details of variable
F is frequecy and v is the range

With the help of these details you can make any type of fouries calculator in matlab.

UNDER CONSTRUCTION

UNDER CONSTRUCTION

No posts.
No posts.