You are on page 1of 3

Brilian Pracoyo Adi

13/348511/TK/40948
o

Percobaan 3.1

Kode MATLAB
clear all;
clc;
H = tf([0 1],[1 1])
%K awal (Ko) = 1
Ko = 1
%Periode2 pencuplikas
(Tsample)
Ts = 0.5 %Tsample = 0.5s
Hd = c2d(H,Ts,'zoh')
G = tf([1 0],[1 -1],Ts);
Hz = Ko*G*Hd
Ts1
Hd1
G1
Hz1

=
=
=
=

1
%Tsample = 1s
c2d(H,Ts1,'zoh')
tf([1 0],[1 -1],Ts1);
Ko*G1*Hd1

Ts2 = 2
%Tsample = 2s
Hd2 = c2d(H,Ts2,'zoh')
G2 = tf([1 0],[1 -1],Ts2);
Hz2 = Ko*G2*Hd2

Ts =
0.5000
Hd =
0.3935
---------z - 0.6065
Sample time: 0.5 seconds
Discrete-time transfer
function.
Hz =
0.3935 z
---------------------z^2 - 1.607 z + 0.6065
Sample time: 0.5 seconds
Discrete-time transfer
function.
Ts1 =

%Root-Locus
figure(1)
rlocus(Hz)
figure(2)
rlocus(Hz1)
figure(3)
rlocus(Hz2)

Hasil Kompilasi
H =
1
----s + 1
Continuous-time transfer
function.

1
Hd1 =
0.6321
---------z - 0.3679
Sample time: 1 seconds
Discrete-time transfer
function.
Hz1 =
0.6321 z
---------------------z^2 - 1.368 z + 0.3679
Sample time: 1 seconds
Discrete-time transfer
function.

Ko =
1

Ts2 =

Root Locus
1

Hd2 =

0.8
0.6

0.8647
---------z - 0.1353

System: TFz2
Gain: 2.62
Pole: -0.999
Damping: 0.000377
Overshoot (%): 99.9
Frequency (rad/s): 1.57

Imaginary Axis

0.4

Sample time: 2 seconds


Discrete-time transfer
function.

0.2
0
-0.2
-0.4

Hz2 =

-0.6

0.8647 z
---------------------z^2 - 1.135 z + 0.1353

-0.8
-1
-1.5

Sample time: 2 seconds


Discrete-time transfer
function.

-1

-0.5

0.5

1.5

Real Axis
Root Locus

1
0.8

>> Discrete-time transfer


function.

0.6
0.4
Imaginary Axis

Ts = 0.5 s
Root Locus
1
0.8
0.6

Imaginary Axis

0.4
0.2

System: TFz
Gain: 8.17
Pole: -1.01
Damping: -0.00225
Overshoot (%): 101
Frequency (rad/s): 6.28

0.2
0
System: TFz1

-0.2Gain: 4.34
Pole: -1.01
-0.4Damping: -0.00282
Overshoot (%): 101
Frequency (rad/s): 3.14

-0.6

-0.8

-1
-2

-0.2

-1.5

-1

-0.5

Real Axis

-0.4

-0.6

Ts = 2 s

-0.8
-1
-2.5

-2

-1.5

-1

-0.5
Real Axis

Ts = 1 s

0.5

1.5

Percobaan 3.2

Kode MATLAB
clear all;
clc;
H = tf([0 1],[1 1])

0.5

1.5

% K = 0.654, Tsample = 1 s
K = 0.654
Ts = 1
Hd = c2d(H,Ts,'zoh')
G = tf([1 0],[1 -1],Ts);
Hz = K*G*Hd
Yz = feedback(Hz, 1)

Sample time: 1 seconds


Discrete-time transfer function.

Yz =
0.4134 z
----------------------z^2 - 0.9545 z + 0.3679

sinfo = stepinfo(Yz)
[Wn, x] = damp(Yz)

Sample time: 1 seconds


Discrete-time transfer function.

Hasil Kompilasi

sinfo =

H=
1
----s+1
Continuous-time transfer function.

K=
0.6540

RiseTime: 2
SettlingTime: 7
SettlingMin: 0.9903
SettlingMax: 1.1017
Overshoot: 10.1684
Undershoot: 0
Peak: 1.1017
PeakTime: 4

Wn =
0.8321
0.8321

Ts =
1

Hd =
0.6321
---------z - 0.3679
Sample time: 1 seconds
Discrete-time transfer function.

Hz =
0.4134 z
---------------------z^2 - 1.368 z + 0.3679

x=
0.6009
0.6009

You might also like