matlab fourier series signal & system
TRANSCRIPT
-
8/10/2019 Matlab Fourier Series Signal & System
1/15
SIGNAL SYSTEM
SKEE2073-10
MATLAB REPORT
GROUP MEMBERS
NIK AHMAD FAISAL BIN MOHD KAMAROLZAMAN B14KE0038
MAZRUL BIN KARIM B14KE0052
MUHAMMAD ZULHILMI BIN ***** B14KE00**
Lecturer
DR MUHAMMAD RAMLEE KAMARUDIN
http://elearning.utm.my/14151/course/view.php?id=9566http://elearning.utm.my/14151/course/view.php?id=9566 -
8/10/2019 Matlab Fourier Series Signal & System
2/15
2
Introduction
From what we have learnt in Signal and System class, wave-like periodic signal for example
square waves actually is a sum of a lot sinusoidal graph that makes up in the end to behave a
desired shaped wave. In this report, we will discuss on how square waves make up a lot of
sinusoidal wave with certain equation. We called this as Fourier Series. Fourier Series has two
types, it is fourier series trigonometric and complex exponential fourier series form.
Fourier series is a representation of a complicated periodic signal in the frequency domain by
its frequency components(spectrum.) For example, the representation of musical sounds as
sums of waves of various frequencies is an audible example. Mostly in electrical engineering,
we will focus on electrical signal in term of communication.
-
8/10/2019 Matlab Fourier Series Signal & System
3/15
3
Objective
MATLAB is a software package for carrying out numerical computations and analyses. It
uses blocks of data called matrices (MATLAB stands for matrix laboratory). MATLAB is
probably the most commonly used scientific and engineering numerical software. (Other
software commonly used are PV-WAVE for processing seismograms and EDL for
processing satellite data. They are all converging and looking like each other at the front end
even if underneath they work on different principles.)
The objectives of doing this mat lab assignments are, firstly, is to train and expose
students to use MATLAB to plot results. It is an easy to use high-level language for solving
engineering and mathematical problems. It has become a popular tool of choice for research
and development in the industry. Our second objective is to evaluate the response of a linear
time invariant system due to signal operations. This is to enhance our knowledge about the
system and to gain better understanding about signal operations. Also give student a chance on
practicality of what they have learnt in class. Last but not least, the objective of this assignment
is to establish good report and to train student to work efficiently in groups. Since teamwork is
very important in a real working life, this mat lab assignment help improve our teamwork skills.
The end of this assignment, student shoulde be able :-
Studentshould be able to access MATLAB
Student able to use the MATLAB help facility, do simple (but large) calculations andprint out graphs.
Student able to do the full report of their work.
-
8/10/2019 Matlab Fourier Series Signal & System
4/15
4
Methodology
4 Questions were given to be calculated and the process need to involve the answers with
Matlab analysis on wave plotted. What we have learn before by using equation below we could
identify the shape of the graph.
is the time average of v(t). It is zero if it is symmetry in the period of time T. is zero
for question 1, 3 and 4
if v(1) has cosine-like symmetry along the time axis about t=0. In other words for t
andt of time magnitude is the same. This is true for question 4 based on observation.
if v(t) has sine-like odd symmetry along the time axis about t=0. In other words it has
same magnitude but but opposite sign at t andt. This is true for question 1,2, and 3.
if v(t) has skew symmetry. This is not applicable in square waves
Based on calculation of , ,and , we could conclude the shape of the wave based on the
representation of equation.
-
8/10/2019 Matlab Fourier Series Signal & System
5/15
5
Flow chart
Analyse the question for the assignment.
Test each signals.
Matlab software is used for programming
Troubleshoot programme using mat lab software
Compare the output signals from mat lab
software with the manual calculation
Writing a report and present it to the lecturer
-
8/10/2019 Matlab Fourier Series Signal & System
6/15
6
Question 1
General equation :
() ( )
()
()
()
-
8/10/2019 Matlab Fourier Series Signal & System
7/15
7
Application Question 1 to Matlab
Graph plotted :
syms tn;T=2; %periodw0=pi; %angular frequency
%2*pi/T
a0 = (2/T)*(int(0.02,t,0,1))+...(2/T)*(int(-0.02,t,1,2));Z = 0.02; %amplitudean = (2/T)*(Z*int(cos(n*w0*t),t,0,1))+...(2/T)*(-Z*int(cos(n*w0*t),t,1,2));
bn = (2/T)*(Z*int(sin(n*w0*t),t,0,1))+...(2/T)*(-Z*int(sin(n*w0*t),t,1,2)) ;
t=-4:0.01:4; %time scale
vt=(a0/2)+symsum(an*cos(n*w0*t)+bn*sin(n*w0*t),n,1,5); %FS of vt up to 5th%harmonic
plot(t,vt); %plot graph vt versus tgrid on; %grid onylabel ( 'v(t)'); %y-axis labelxlabel( 't(s)'); %x-axis labeltitle('The trigonometric Fourier Series'); %graph title
-
8/10/2019 Matlab Fourier Series Signal & System
8/15
8
Discussion
As the theory of fourier series the graph show an an odd signal this is because of th value of is
. As practically, after design at a software matlab it also the same graph. Meaning that,theory of fourier series and symmetry properties of FSis acceptable. The result shown the
ouput signal is not exactly same because there no filter is applied in the design, so the result isnot smoothly.
-
8/10/2019 Matlab Fourier Series Signal & System
9/15
9
Question 2
General equation :
() ( )
()
()
()
-
8/10/2019 Matlab Fourier Series Signal & System
10/15
10
Application Question 2 to Matlab
Graph plotted :
syms tn;T=2;w0=pi;
a0 = (2/T)*(int(0.04,t,0,1));Z = 0.04;an = (2/T)*(Z*int(cos(n*w0*t),t,0,1));
bn = (2/T)*(Z*int(sin(n*w0*t),t,0,1));
t=-4:0.01:4;vt=(a0/2)+symsum(an*cos(n*w0*t)+bn*sin(n*w0*t),n,1,5);
plot(t,vt);grid on;ylabel ( 'v(t)[mv]');xlabel( 't[s]');title('The trigonometric Fourier Series');
-
8/10/2019 Matlab Fourier Series Signal & System
11/15
11
Question 3
General equation :
() ( )
()
()
()
-
8/10/2019 Matlab Fourier Series Signal & System
12/15
12
Application Question 3 to Matlab
Graph plotted :
syms tn;T=4;
w0=1.5707; %2*pi/TZ = 0.02;a0 = (2/T)*(int(Z,t,0,1))+...
(2/T)*(int(-Z,t,2,3));
an = (2/T)*(Z*int(cos(n*w0*t),t,0,1))+...(2/T)*(-Z*int(cos(n*w0*t),t,2,3));
bn = (2/T)*(Z*int(sin(n*w0*t),t,0,1))+...(2/T)*(-Z*int(sin(n*w0*t),t,2,3)) ;
t=-4:0.02:4;vt=(a0/2)+symsum(an*cos(n*w0*t)+bn*sin(n*w0*t),n,1,5);
plot(t,vt);grid on;ylabel ( 'v(t)[v]');xlabel( 't[s]');title('The trigonometric Fourier Series');
-
8/10/2019 Matlab Fourier Series Signal & System
13/15
-
8/10/2019 Matlab Fourier Series Signal & System
14/15
14
Application Question 4 to Matlab
Graph plotted :
syms tn;T=2;w0=pi; %2*pi/TZ = 0.02;a0 = (2/T)*(int(Z,t,-0.5,0.5))+...
(2/T)*(int(-Z,t,0.5,1.5));
an = (2/T)*(Z*int(cos(n*w0*t),t,-0.5,0.5))+...(2/T)*(-Z*int(cos(n*w0*t),t,0.5,1.5));
bn = (2/T)*(Z*int(sin(n*w0*t),t,-0.5,0.5))+...(2/T)*(-Z*int(sin(n*w0*t),t,0.5,1.5)) ;
t=-4:0.02:4;vt=(a0/2)+symsum(an*cos(n*w0*t)+bn*sin(n*w0*t),n,1,5);
plot(t,vt);grid on;ylabel ( 'v(t)[v]');xlabel( 't[s]');title('The trigonometric Fourier Series');
-
8/10/2019 Matlab Fourier Series Signal & System
15/15
15