Sei sulla pagina 1di 6

Technical Elective 2

LAB 01
GNU Octave Familiarization

Name : Emmanuel B.Irog-irog Rating:


Date : 20 February 2018

1.1 Problem 1
Use GNU Octave to find the following:

1.2 Matlab Code or Simulink Model for Problem 1


%*******************************************************************
%La Salle University
%ELC423 Feedback and Control systems Laboratory
%Student Name : Emmanuel B. Irog-irog
%z January 2018
%Num1.m
%*******************************************************************

P11=[1 7 0 3 2 1 3]
P22=[0 3 1 3 2 2 1]
P33=[0 4 0 3 4 1 3]

%Roots of polynomial
R11=roots(P11)

% Basic Operations
P44=P11+P22
P55=conv(P11,P33)
P66=P33/P22
1.3 Result

1.4 Discussion
Using techniques similar to MATLAB we can create polynomials and do
basic operations with them like addition, multiplication or finding
its roots.
2.1 Problem 2
Use GNU Octave to generate the transfer function

2.2 Matlab Code or Simulink Model

%*******************************************************************
%La Salle University
%ELC423 Feedback and Control systems Laboratory
%Student Name : Emmanuel B. Irog-irog
%z January 2018
%Num2.m
%*******************************************************************

#2
pkg load control

P7 = [0 1 7 0 3 2 1 3]
P8 = [3 1 0 1 4 2 2 1]

G1 = tf(P7,P8);

2.3 Result (for problem 2)

2.4 Discussion Using G1 = tf(num,den) we can generate a Transfer


function
3.1 Use GNU Octave to convert this transfer function into a ratio of
polynomials.

3.2 Matlab Code or Simulink Model


%*******************************************************************
%La Salle University
%ELC423 Feedback and Control systems Laboratory
%Student Name : Emmanuel B. Irog-irog
%z January 2018
%Num2.m
%*******************************************************************

#3

P99=conv([1,2],conv([1,1],conv([1 4],conv([1 5], [1 9]))))


P1010=conv([1 7],conv([1 5],conv([1 6],conv([1 3],conv([1 2], [1 1])))))

G2 = tf(P99,P1010);

3.3 Result

3.4 Discussion
Using Conv we can simplify the numerator and denominator and then
using tf we can make it a transfer function.
4.1 Convert the G1(s) into a ratio of factors.

4.2 Matlab Code or Simulink Model


%*******************************************************************
%La Salle University
%ELC423 Feedback and Control systems Laboratory
%Student Name : Emmanuel B. Irog-irog
%z January 2018
%Num2.m
%*******************************************************************

#4
R12=roots(P7)
R13=roots(P8)

4.3 Result

4.4 Discussion
We can extract the ratio of factors by finding its roots
5.1 Convert the G1(s) into a ratio of factors.

5.2 Matlab Code or Simulink Model


%*******************************************************************
%La Salle University
%ELC423 Feedback and Control systems Laboratory
%Student Name : Emmanuel B. Irog-irog
%z January 2018
%Num2.m
%*******************************************************************

#5
P10 =[ 5 10]
P11 =[1 8 15 0]
[r4,p4,k4] = residue(P10,P11)

5.3 Result

5.4 Discussion
Using residue for Partial Fraction expansion and then using tf we
can get the result.

Potrebbero piacerti anche