You are on page 1of 9

clc

clear all
s = tf('s');
z = tf('z');

Primer literal
% Discretizacion de la planta
TM = 0.001;
Gp = 0.3/(1.4e-6*s^2+1.6e-3*s+0.29);
Gpz = c2d(Gp,TM,'zoh')

% Funcion en lazo abierto


Gc = (5.80018*z-5.79982)/(2*z-2)
Gla = Gpz*Gc

% Funcion en lazo cerrado


Glc = feedback(Gla,1)

% Respuesta ante una entrada escalon unitario


step(Glc)
figure (1)
imshow('imagen.png')

% Valores caracteristicos
stepinfo(Glc)
figure (2)
imshow('imagen1.png')

Gpz =

0.07456 z + 0.051
----------------------
z^2 - 1.198 z + 0.3189

Sample time: 0.001 seconds


Discrete-time transfer function.

Gc =

5.8 z - 5.8
-----------
2 z - 2

Sample time: unspecified


Discrete-time transfer function.

Gla =

0.4325 z^2 - 0.1367 z - 0.2958


------------------------------------
2 z^3 - 4.395 z^2 + 3.033 z - 0.6378

Sample time: 0.001 seconds


Discrete-time transfer function.

Glc =

0.4325 z^2 - 0.1367 z - 0.2958


------------------------------------
2 z^3 - 3.963 z^2 + 2.896 z - 0.9336

Sample time: 0.001 seconds


Discrete-time transfer function.

Warning: Image is too big to fit on screen; displaying at 67%

ans =

struct with fields:

RiseTime: 0.0020
SettlingTime: 0.0110
SettlingMin: 0.7169
SettlingMax: 0.9084
Overshoot: 20.1613
Undershoot: 0
Peak: 0.9084
PeakTime: 0.0040
Segundo literal
TM1 = 0.4;
Gp1 = 2*(s+1)/(s*(s+2));

% Funcion discretizada
Gp1z = c2d(Gp1,TM1,'zoh')

% Respuesta ante una entrada escalon unitario


step(Gp1z)
figure (3)
imshow('imagen2.png')

Gp1z =

0.6753 z - 0.4551
----------------------
z^2 - 1.449 z + 0.4493

Sample time: 0.4 seconds


Discrete-time transfer function.

Warning: Image is too big to fit on screen; displaying at 67%

You might also like