You are on page 1of 2

% Ejercicio s 1: sistema en ss criticamente estable

clear var;
close all;
clc;
%% Ejercicio 1
A=[0 1 0;0 0 1; -2 -1 -2];
B=[0;0;1];
C=[1 0 0];
D=[0];
u_1=-5; u_2=-2+1i; u_3=-2-1i;
P=[u_1 u_2 u_3];
sys_ss=ss(A,B,C,D);
[num, den]=ss2tf(A, B, C, D);
G_sys= tf(num, den)

G_sys =

1
-------------------
s^3 + 2 s^2 + s + 2

Continuous-time transfer function.

sys_ss

sys_ss =

A =
x1 x2 x3
x1 0 1 0
x2 0 0 1
x3 -2 -1 -2

B =
u1
x1 0
x2 0
x3 1

C =
x1 x2 x3
y1 1 0 0

D =
u1
y1 0

Continuous-time state-space model.

L=acker(A',C',P)'

L =
7
10
-4

sim('lab ')

1
figure(1); hold on; grid on;
plot(y); plot (y_est); plot(u,'b'); hold off;

figure(2);hold on;grid on;


plot (x);plot(x_esta);hold off;

figure(3); hold on; grid on;


plot(e);

You might also like