You are on page 1of 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

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.

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 : Student should be able to access MATLAB
Student able to use the MATLAB help facility, do simple (but large) calculations and
print out graphs.
Student able to do the full report of their work.

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.


for question 1, 3 and 4

is zero

if v(1) has cosine-like symmetry along the time axis about t=0. In other words for t
and t 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 and t. 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.

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


5

Question 1

General equation :
( )

( )

( )

( )

Application Question 1 to Matlab


syms t n;
T=2;
w0=pi;
%2*pi/T
a0 = (2/T)*(int(0.02,t,0,1))+...
(2/T)*(int(-0.02,t,1,2));
Z = 0.02;
an = (2/T)*(Z*int(cos(n*w0*t),t,0,1))+...
(2/T)*(-Z*int(cos(n*w0*t),t,1,2));

%period
%angular frequency

%amplitude

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);
%harmonic
plot(t,vt);
grid on;
ylabel ( 'v(t)' );
xlabel( 't(s)' );
title('The trigonometric Fourier Series');

Graph plotted :

%FS of vt up to 5th

%plot graph vt versus t


%grid on
%y-axis label
%x-axis label
%graph title

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 is
not smoothly.

Question 2

General equation :
( )

( )

( )

( )

Application Question 2 to Matlab


syms t n;
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');

Graph plotted :

10

Question 3

General equation :
( )

( )

( )

( )

11

Application Question 3 to Matlab


syms t n;
T=4;
w0=1.5707; %2*pi/T
Z = 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');

Graph plotted :

12

Question 4

General equation :
( )

( )

( )

( )

13

Application Question 4 to Matlab


syms t n;
T=2;
w0=pi; %2*pi/T
Z = 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');

Graph plotted :

14

15