Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

UNIVERSITY OF ENGINEERING &

TECHNOLOGY PESHAWAR

CIRCUIT-II LAB REPORT (EE-201L)


Name : MUHAMMAD HASSAN SHAHZAD
Reg No. : 21PWELE5922
Section : C
Department : Electrical
Semester : 4th
Submitted To : Engr. Muhammad Farooq

LAB NO.12
Explaining waveform analysis and synthesis
using fourier components.
Objective of the lab:
To find values of unknown in an equation from its symbolic variables or to find
roots from expression. Also to plot waveform from an equation.
Component:
• Matlab
• Script file

Theory:
Matlab:
matlab stands for “matrix laboratory”, developed by math works. Matlab is
dealing with matrices. There is extensive libraries for pre-defined functions.
Matlab having different tools like Simulink etc. it is a high-performance
language for technical computing.
Script file:
A script is a file that contains multiple sequential lines of MATLAB commands
and function calls. You can run a script by typing its name at the command line.
Analysis:
What do we mean by analysis?
: a detailed examination of anything complex in order to understand its nature or
to determine its essential features : a thorough study. doing a careful analysis of
the problem. : a statement of such an examination. : separation of a whole into
its component parts.

Synthesis:
To recombine the whole components which we get in analysis and form the
waveform from that components.

Script commands:
1. Syms x y % symbolic variables
2. Solve(eqn) % to finally solve equation for unknowns 3. Factor(exp) % to
factorize expression or to find its roots 4. Diff(y,x) % diravative of y w.r.t x
5. Diff(y,x,n) % n represent higher order derivatives 6. Dsolve(eqn) % to solve
the differential equations 7. Int(y,x) % for integration
8. Int(y,x,0,2) % integration along with its limits
Practical example:
Example of fourier seriese to find its components using matlab and integration
commands in script file.
Program:

R es ult :

Verification by piecewise integration:

Its result:
Synthesis:
We will be now plot for that fourier seriese whose components we already get in
above programs.
The general form of fourier series is ……
now we have to plot for this general form of
fourier series.
Matlab program for plot of this fourier series is ……

ketch:

Conclusion:
After successful completion of this lab we are now able to use matlab script file
for finding unknown values in an equation also we able to find roots of equation
we now using matlab perform any derivative and integration.
How to plot sketch for fourier series we do that easily now using script file.

You might also like