0% found this document useful (0 votes)
62 views4 pages

Mechanical Vibrations - UUS 304E Homework #1

This document discusses representing a square wave function using a Fourier series. It defines the square wave function and the Fourier series representation. It then plots the actual square wave function and the approximated function using different numbers of terms in the Fourier series. As more terms are included, the approximated function gets closer to the actual square wave function. It also discusses how Fourier series are useful for solving differential equations that describe physical systems.

Uploaded by

AEROWORKER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views4 pages

Mechanical Vibrations - UUS 304E Homework #1

This document discusses representing a square wave function using a Fourier series. It defines the square wave function and the Fourier series representation. It then plots the actual square wave function and the approximated function using different numbers of terms in the Fourier series. As more terms are included, the approximated function gets closer to the actual square wave function. It also discusses how Fourier series are useful for solving differential equations that describe physical systems.

Uploaded by

AEROWORKER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Name/Surname: Buşra Nur Yüceur

Student ID: 14960021

Mechanical Vibrations – UUS 304E

Homework #1

-Take a square wave (unit step unction).

-Redefine this square signal by Fourier Series representation.

-Plot the actual function and approximated function.

-Compute the overshoot near the points discontinuity.

Solution

The Signal function:


𝑔𝑔(𝑥𝑥) = ⋯

The Fourier function:



𝑛𝑛𝑛𝑛𝑛𝑛 𝑛𝑛𝑛𝑛𝑛𝑛
𝑓𝑓(𝑥𝑥) = 𝑎𝑎0 + � �𝑎𝑎𝑛𝑛 cos + 𝑏𝑏𝑛𝑛 sin �
𝐿𝐿 𝐿𝐿
𝑛𝑛=1
Where
1 𝜋𝜋
𝑎𝑎0 = � 𝑓𝑓(𝑥𝑥)𝑑𝑑𝑑𝑑
𝜋𝜋 −𝜋𝜋
1 𝜋𝜋
𝑎𝑎𝑛𝑛 = � 𝑓𝑓(𝑥𝑥) cos(𝑛𝑛𝑛𝑛) 𝑑𝑑𝑑𝑑
𝜋𝜋 −𝜋𝜋
1 𝜋𝜋
𝑏𝑏𝑛𝑛 = � 𝑓𝑓(𝑥𝑥) sin(𝑛𝑛𝑛𝑛) 𝑑𝑑𝑑𝑑
𝜋𝜋 −𝜋𝜋
and n=1, 2, 3, ....

A Fourier series is an expansion of a periodic function f(x) in terms of an infinite sum of sines and
cosines. Fourier series make use of the orthogonality relationships of the sine and cosine
functions.
Many of the basic areas of physics and engineering can be mathematically described by
differential equations - heat flow, fluid dynamics, electromagnetic theory, quantum mechanics.
Fourier series naturally arise in solving some linear differential equations (heat equation, wave
equation, Schrodinger's equation, etc.) in bounded regions. I say "naturally" because they are
eigenfunctions of a differential operator (see Mathwonk's comment above). This application
alone would be motivation for including it in basic mathematical training of physicists and
engineers.
In here, we will analyze the basic concept of fourier series. Let us assume that f(x) is a periodic
signal with period of L. With the use of fourier series, we can resolve the signal of f (x) into an
infinite sum of sine and cosine terms.

As you can see in this fig by increase number of n the Fourier series be more close to this rectangular
pulse:
Fourier Series Representation w/ 2 Terms Fourier Series Representation w/ 4 Terms

1 1

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

Function Value
0
Function Value

-0.2 -0.2

-0.4 -0.4

-0.6 -0.6

-0.8 -0.8

-1 -1

0 2 4 6 8 10 0 2 4 6 8 10

Time Time

Fourier Series Representation w/ 6 Terms Fourier Series Representation w/ 20 Terms


1
1

0.8
0.8

0.6
0.6

0.4 0.4

0.2 0.2
Function Value

0
Function Value

-0.2 -0.2

-0.4 -0.4

-0.6 -0.6

-0.8 -0.8

-1 -1

0 2 4 6 8 10 0 2 4 6 8 10

Time Time
Fourier Series Representation w/ 200 Terms Fourier Series Representation w/ 1000 Terms

1 1

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

Function Value
Function Value

0 0

-0.2 -0.2

-0.4 -0.4

-0.6 -0.6

-0.8 -0.8

-1 -1

0 2 4 6 8 10 0 2 4 6 8 10

Time Time

Fourier Series Representation w/ 100000 Terms

0.8

0.6

0.4

0.2
Function Value

-0.2

-0.4

-0.6

-0.8

-1

0 2 4 6 8 10

Time

Source Code:
N = 100000;
Wo = pi/5;
t = -1:.001:11;
f = zeros(1,length(t));

for n = 1:2:N
an = 4/(pi*n);
f = f+ an*sin(Wo*n*t);
end

plot(t,f)
axis([-1 11 -1.1 1.1])
title(['Fourier Series Representation w/ ' num2str(N) '
Terms'],'FontSize',16)
xlabel('Time')
ylabel('Function Value')

Reference
https://www.physicsforums.com/threads

You might also like