Professional Documents
Culture Documents
Sistemas Dinmicos:
-
Control
Automatizacin
Robtico
Biomdico
Economa
Estadstica
= funciones instantneas
2) Parte con memoria: Conjunto de Componentes que guardan las variables internas
Sistemas Continuos:
Sistemas Discretos :
Sistemas Continuos:
Sistemas Discretos:
Note que:
Ejemplo 1
Figura 2 Tanque
Tenemos:
-
La variacin de volumen es :
Ley de Newton
Luego:
Tenemos, entonces, una representacin en espacio estados con x1 y x2 como las variables de
estado.
3
La
Finalmente
Este modelo es adecuado para controlar la velocidad. En el caso que se desee controlar la
posicin, debemos considerar el ngulo .
Y la siguiente tabla:
Sistema Trmico
Variables
Sistema Elctrico
Smbolo
Unidades
o
Variables
Smbolo
Unidades
Tensin
Corriente
Temperatura
Flujo Trmico
Resist. Trmica
C.s/cal
Resistencia
Capaci.
Trmica
cal/deg
Capacitancia
cal/s
Ecuacin de Conduccin
Ecuacin de almacenamiento
Donde:
u entrada de control para el servo.
v velocidad angular de la torre
p aceleracin angular
q posicin de la servo-vvula hidrulica
Km= ganancia del servomotor
J momento de inercia de la torre.
Ejemplo 6 Circuito RLC
Linealizacin
Para una determinada clase de sistemas no lineales y considerando las perturbaciones
pequeas, podemos encontrar un sistema lineal que se representa por:
Ejemplo: Lorenz
Las ecuaciones que describen el sistema de Lorenz son:
10
Observe que
invariante en el tiempo
De la segunda ecuacin:
Luego:
11
Parte Mecnica
12
Implementacin en Matlab
% Input
Vin=external_input(t,SP1,SP2,t0); % Vin=0.01; % Input
% States
dydt(1) = (1/R)*(Vin-(y(1)*y(2))/(epsilon*A));
dydt(2) = y(3);
dydt(3) = -(1/m)*((y(1)*y(1))/(2*epsilon*A)+k*(y(2)-g0)+b*y(3));
13
function u = external_input(t,SP1,SP2,t0)
% function u = external_input(t,SP1,SP2,t0) returns the value of a
% step input starting at t0
%
if (t<=t0)
u=SP1;
else
u=SP2;
end;
%Simulation of an Electrostatic Actuator
clc;close all;clear;
dt=0.01;
oldOpts=odeset;
newOpts=odeset(oldOpts,'InitialStep',dt,'MaxStep',dt);
% External values
tff=input('Final time [50] => ');
if isempty(tff)
tff=50;
end;
tspan=[0 tff];
y0=input('Initial Condition (3 values) => ');
if isempty(y0)
y0=[0 0 0]';
end;
Vin=input('Input (Step function) [0.01] : ');
if isempty(Vin)
Vin=0.01;
end;
t=(0:dt:tff)';
[ans,y]=ode45(@eleactuator,t,y0,newOpts,0,Vin,0);
figure(1);plot(t,y);title(sprintf('Nonlinear system driven by the input
x(t)=%gu(t)',Vin));
xlabel('Time');ylabel('States');grid;
yss=y(end,:); % Steady State
% New simulation - t=0 just to make things easier
Ku=input('Step input over the operating point [-0.001 0.01] : ');
if isempty(Ku)
Ku=[-0.001 0.01];
end;
t0=input('Start time of the input (step) [5] : ');
if isempty(t0)
t0=5;
end;
if t0>tff
t0=tff/2;
end;
% Linearization
%% Parameters
R=0.001; % Resistor
epsilon=1; % Permittivity
A=100.0; % Area
m=1.0; % Massdo
B=jacobian(f,[V]);
14
% Fixed Point
x3=0;
aux=subs(solve(f(1),'X1'),'V',Vin);
aux=subs(subs(f(3),'X1',aux),'X3',x3);
x2=solve(aux,'X2');
disp(' ');
disp('Check whether the fixed points for X2 are complex or not');
eval(x2)
disp('I am assuming that they are not and therefore taking the
absolute value of them.');
x2=abs(eval(x2));
x1=zeros(3,1);
for i=1:3
x1(i)=eval(solve(subs(subs(f(1),'X2',x2(i)),'V',Vin),'X1'));
end;
% Linear System - I am choosing the first fixed point
a=subs(subs(subs(subs(A,'X1',x1(1)),'X2',x2(1)),'X3',x3),'V',Vin);
b=subs(subs(subs(subs(B,'X1',x1(1)),'X2',x2(1)),'X3',x3),'V',Vin);
c=eye(3);
d=0;
sys=ss(a,b,c,d);
% Simulation of the linearized system
for j=1:length(Ku)
[ans,y1]=ode45(@eleactuator,t,yss,newOpts,Vin,Vin+Ku(j),t0);
i=find(t>=t0);
u=zeros(size(t));
u(i)=Ku(j)*ones(size(i));
yl=lsim(sys,u,t);
figure(1+j);
subplot(3,1,1);
plot(t,y1(:,1),t,yl(:,1)+yss(1));
title(sprintf('Nonlinear versus Linear - operating point - a step of %g
applied',Ku(j)));
xlabel('Time');ylabel('Output');grid;legend('Nonlinear','Linear');
subplot(3,1,2);
plot(t,y1(:,2),t,yl(:,2)+yss(2));
xlabel('Time');ylabel('Output');grid;legend('Nonlinear','Linear');
subplot(3,1,3);
plot(t,y1(:,3),t,yl(:,3)+yss(3));
xlabel('Time');ylabel('Output');grid;legend('Nonlinear','Linear');
end;
Eduardo
Edisp(' ');
disp('We can clearly see that the linearization only works for small');
disp('values of perturbations around the operating point');
Eduardoduardo
15
Eduardo
16