You are on page 1of 14

MATLAB®

EE 6319 CONTROL THEORY


COMPUTER ASSIGNMENT 01
The Answer of the computer Assignment 01 by using Matlab and SIMULINK are
included in this document according to their Question number.

DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING

FACULTY OF ENGINEERING UNIVERSITY OF RUHUNA

ARIYADASA L.P.N.I
RU/E/2006/013
5/18/2009
EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q1. (I) I write the Matlab m-file to find the zero and poles and also s-plane representation

Values of Zero and Poles

z = -7

p=

-1.0000 + 1.0000i

-1.0000 - 1.0000i

k=3

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 1


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

S-plane representation of zero and poles

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 2


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q1. (ii) The Matlab m-file to find the zero and poles and also s-plane representation

Values of Zero and Poles

>> q12

z = -2

p=

2.0000

-3.0000

-1.0000

k=5

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 3


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

S-plane representation of zero and poles

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 4


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q1. (iii) The Matlab m-file to find the zero and poles and also s-plane representation

Values of Zero and Poles

>> q13

z=

-5.0000 + 0.0000i

-5.0000 - 0.0000i

-3.0000

p=

-2.0000

0.0000 + 2.0000i

0.0000 - 2.0000i

-0.0000 + 2.0000i

-0.0000 - 2.0000i

k=2

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 5


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

S-plane representation of zero and poles

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 6


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q2). (I) Matlab command for partial fraction expansion of transfer function

num = [2 5 3 6];

den = [1 6 11 6];

[r, p, k] = residue (num, den)

Results of the partial fraction expansion

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 7


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q2). (ii) Matlab command for partial fraction expansion of transfer function

num = [2 4];

den = conv ([1 1], [1 0 4]);

[r, p, k] = residue (num, den)

Results of the partial fraction expansion

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 8


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q2). (iii) Matlab command for partial fraction expansion of transfer function

num = [3 2];

den = [1 4 20];

[r, p, k] = residue (num, den)

Results of the partial fraction expansion

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 9


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q3). (i)The Matlab .m files to plot of the impulse response

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 10


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q3). (ii)The Matlab .m files to plot of the impulse response

Plot of Impulse Response

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 11


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

Q3), (iii) The Matlab SIMULINK model for Unit-step function

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 12


EE 6319 CONTROL THEORY
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
COMPUTER ASSIGNMENT 01

The result of the SIMULINK

FACULTYOF ENGINEERING UNIVERSITY OF RUHUNA ARIYADASA L.P.N.I (RU/E/2006/013) Page 13