Anda di halaman 1dari 4

A. Contoh 5.

Program MATLAB 5–1 menghasilkan empat kurva step Response. Kurva-kurva tersebut

ditunjukkan pada Gambar 5-1. (Perhatikan bahwa vektor waktu t ditentukan secara otomatis,

karena perintah tidak menyertakan t.)

Program MATLAB 5.1

A = [-1 -1;6.5 0];


B = [1 1;1 0];
C = [1 0;0 1];
D = [0 0;0 0];
step(A,B,C,D)

Gambar 5.1 Unit-step response curves.


B. Contoh 5.2
Program MATLAB 5.2 adalah program untuk memplot dua kurva respon langkah untuk

masukan u1 dalam satu diagram dan dua kurva respons langkah untuk masukan u2 di

diagram lain. Gambar 5.2 menunjukkan dua diagram, masing masing terdiri dari dua kurva

respons-langkah.

(Ini Program MATLAB menggunakan perintah teks. Untuk perintah seperti itu, lihat paragraf

berikut contoh ini.)


program MATLAB 5.2
% ***** In this program we plot step-response curves of a system
% having two inputs (u1 and u2) and two outputs (y1 and y2) *****
% ***** We shall first plot step-response curves when the input is
% u1. Then we shall plot step-response curves when the input is
% u2 *****
% ***** Enter matrices A, B, C, and D *****
A = [-1 -1;6.5 0];
B = [1 1;1 0];
C = [1 0;0 1];
D = [0 0;0 0];
% ***** To plot step-response curves when the input is u1, enter
% the command 'step(A,B,C,D,1)' *****
step(A,B,C,D,1)
grid
title ('Step-Response Plots: Input = u1 (u2 = 0)')
text(3.4, -0.06,'Y1')
text(3.4, 1.4,'Y2')
% ***** Next, we shall plot step-response curves when the input
% is u2. Enter the command 'step(A,B,C,D,2)' *****
step(A,B,C,D,2)
grid
title ('Step-Response Plots: Input = u2 (u1 = 0)')
text(3,0.14,'Y1')
text(2.8,1.1,'Y2')
Gambar 5.2 Unit-step response curves. (a) u1 is the input Au2=0B; (b) u2 is the input Au1=0B.

C. Contoh 5.4
Program MATLAB 5.4 akan menghasilkan plot respon unit-langkah dari sistem ini. Sebuah
plot kurva respons unit-langkah ditunjukkan pada Gambar 5.4.
Program MATLAB 5.4
% ------------- Unit-step response -------------
% ***** Enter the numerator and denominator of the transfer
% function *****
num = [25];
den = [1 4 25];
% ***** Enter the following step-response command *****
step(num,den)
% ***** Enter grid and title of the plot *****
grid
title (' Unit-Step Response of G(s) = 25/(s^2+4s+25)')
Gambar 5.4 Unit-step response curve

Anda mungkin juga menyukai