0% found this document useful (0 votes)
12 views12 pages

CS Assignment 4

The document outlines an assignment focused on synthesizing periodic waveforms using Fourier series, specifically square, triangular, and sawtooth waves, with MATLAB code provided for each. It discusses the Gibbs phenomenon, which causes ringing in square waveforms, and suggests methods to reduce this effect, such as using smoother summation techniques. The conclusion emphasizes the application of Fourier analysis to implement various periodic signals.

Uploaded by

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

CS Assignment 4

The document outlines an assignment focused on synthesizing periodic waveforms using Fourier series, specifically square, triangular, and sawtooth waves, with MATLAB code provided for each. It discusses the Gibbs phenomenon, which causes ringing in square waveforms, and suggests methods to reduce this effect, such as using smoother summation techniques. The conclusion emphasizes the application of Fourier analysis to implement various periodic signals.

Uploaded by

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

Circuit Simulation Laboratory

Assignment 4
Synthesis of periodic waveforms using Fourier series

a) Square Wave

4 1

π n=0 ( 2n+ 1 )
sin ⁡( 2 n+1 ) x

b) Traingular Wave:

8 1
2∑
cos ⁡( 2 n+1 ) x
π n=0 ( 2 n+1 )2
c) Sawtooth Wave:

2 n−1 1

π n=1
( −1 )
n
sin nx

Why is ringing observed in square waveform? How can we reduce it?

PART a)

%Fourier series Square wave


sum=0;
x=-2*pi:0.001:2*pi;
for i=0:1000
a=(4/(pi*(2*i+1)))*sin((2*i+1)*x);
sum=sum+a;
end
plot(x,sum);

1
Circuit Simulation Laboratory

n=10

n=100

n=1000

2
Circuit Simulation Laboratory

3
Circuit Simulation Laboratory

PART b)

%Fourier series Triangular wave


sum=0;
x=-2*pi:0.001:2*pi;
for i=0:1000
a=(8/(pi*pi*((2*i+1)^2)))*cos((2*i+1)*x);
sum=sum+a;
end
plot(x,sum);

n=10

n=50

4
Circuit Simulation Laboratory

n=100

n=1000

5
Circuit Simulation Laboratory

6
Circuit Simulation Laboratory

PART c)

%Fourier series Sawtooth wave


clear all;
tic;
sum=0;
x=-2*pi:0.01:2*pi;
for i=1:1000
sum=sum+(1/i)*((-1)^(i-1))*sin(i*x);
end
plot(x,(2/pi)*sum);
toc;

Output on command window:- Elapsed time is 0.062844 seconds.

n=10

n=50

7
Circuit Simulation Laboratory

8
Circuit Simulation Laboratory

n=100

n=1000

9
Circuit Simulation Laboratory

INFORMATION:

Tic:

Toc:

10
Circuit Simulation Laboratory

Why is ringing observed in square waveform? How can we reduce it?


Ans.

Gibbs phenomenon (Ringing) is the peculiar manner in which the Fourier series of
a piecewise continuously differentiable periodic function behaves at a jump discontinuity.
The nth partial sum of the Fourier series has large oscillations near the jump, which might
increase the maximum of the partial sum above that of the function itself. The overshoot does not
die out as n increases, but approaches a finite limit. This sort of behavior was also observed by
experimental physicists, but was believed to be due to imperfections in the measuring
apparatuses.

Solutions

In practice, the difficulties associated with the Gibbs phenomenon can be ameliorated by using a
smoother method of Fourier series summation, such as Fejér summation or Riesz summation,
or by using sigma-approximation. Using a continuous wavelet transform, the wavelet Gibbs
phenomenon never exceeds the Fourier Gibbs phenomenon. Also, using the discrete wavelet
transform with Haar basis functions, the Gibbs phenomenon does not occur at all in the case of
continuous data at jump discontinuities, and is minimal in the discrete case at large change
points. In wavelet analysis, this is commonly referred to as the Longo phenomenon.

11
Circuit Simulation Laboratory

Conclusion:-

Thus we used the Fourier analysis and implemented the different periodic signals using
MATLAB.

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy