Академический Документы
Профессиональный Документы
Культура Документы
Introduo
Os modelos matemticos devem ser constitudos a partir de dados
observados que descrevam o comportamento do sistema em estudo. Assim,
modelagem matemtica a rea do conhecimento que estuda maneiras de
construir e implementar modelos (matemticos) de sistemas reais.
A motivao para o estudo de tcnicas de identificao de sistemas surge do
fato que frequentemente no se conhecem as equaes envolvidas no
funcionamento de um determinado sistema ou elas so conhecidas, mas seria
impraticvel, por limitaes de tempo e recursos, levantar tais equaes e
estimar seus respectivos parmetros.
O presente trabalho est focado na identificao de um sistema para uma
sonda de temperatura, sendo os valores experimentais para entrada uma
tenso de caraterstica degrau, e para a sada gerada uma variao de
temperatura, para um perodo de amostragem de 2 segundos, isso
observado na figura 1.
Figura 1: Valores da tenso de entrada
200
tenso de entrada
temperatura de saida
180
160
140
120
100
80
60
40
20
0
200
400
600
800
1000
tempo discreto
1200
1400
1600
Metodologia
A partir dos dados fornecidos, desenhou-se pela ferramenta GUIDE de
MATLAB, uma interface grfica nomeada ARMAX (autoregressive moving
average with exogenous inputs), pelas suas siglas em ingls, mostra-se na
figura 2, a janela principal de controle a qual manipula os dados respeito aos
requerimentos do usurio.
Figura 2: Aplicativo ARMAX
Ordem
EMQ
1 (T1)
2 (T2)
Vector de
pesos W
H(Z)
0.315741
0.9677
1.2176
-0.5724
-0.5724 z + 1.216
------------------------z - 0.9677
0.277372
-0.1504
1.1178
1.1005
-1.0706
0.6193
Ordem
H(S)
-0.5724 s + 0.3269
------------------------s + 0.01642
Primeira
Segunda
Amplitude
120
100
80
60
40
20
0
200
400
600
800
1000
1200
1400
1600
Time (seconds)
Amplitude
120
100
80
60
40
20
0
200
400
600
800
1000
1200
1400
1600
Time (seconds)
Bibliografa
Aguirre, L. A. (2007). Introduo identificao de sistemas. Belo Horizonte: UFMG.
CHAPMAN, S. J. (2011). programaao em MATLAB para engenheiros. SAO PAULO: CENAGE
LEARNING.
Ivan Nunez da Silva, D. H. (2010). Redes Neurais Artificiais para engenharia e cincias
aplicadas. So Paulo: Artliber.
ANEXOS
Funciones desenvolvidas
function varargout = ARMAX(varargin)
% ARMAX MATLAB code for ARMAX.fig
%
ARMAX, by itself, creates a new ARMAX or raises the existing
%
singleton*.
%
%
H = ARMAX returns the handle to a new ARMAX or the handle to
%
the existing singleton*.
%
%
ARMAX('CALLBACK',hObject,eventData,handles,...) calls the local
%
function named CALLBACK in ARMAX.M with the given input
arguments.
%
%
ARMAX('Property','Value',...) creates a new ARMAX or raises the
%
existing singleton*. Starting from the left, property value
pairs are
%
applied to the GUI before ARMAX_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to ARMAX_OpeningFcn via varargin.
%
%
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows
only one
%
instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help ARMAX
% Last Modified by GUIDE v2.5 10-Nov-2015 01:13:26
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ARMAX_OpeningFcn, ...
'gui_OutputFcn', @ARMAX_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback',
[]);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = ARMAX_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
ya=Y(1:2*trama/3);
Y1a=Y((trama-trama/3+1):trama);
xa=X(1:2*trama/3);
X1a=X((trama-trama/3+1):trama);
yb=[Y(1:trama/3) Y(2*trama/3+1:trama)];
Y1b=Y((trama/3+1):(2*trama/3));
xb=[X(1:trama/3) X(2*trama/3+1:trama)];
X1b=X((trama/3+1):(2*trama/3));
yc=Y(trama/3+1:trama);
Y1c=Y(1:trama/3);
xc=X(trama/3+1:trama);
X1c=X(1:trama/3);
y=Y(1,1:500);
Y1=Y(1,501:801);
x=X(1,1:500);
X1=X(1,501:801);
10
janela =str2double(get(handles.edit1,'string'));
janela1 =str2double(get(handles.edit2,'string'));
pos =get(handles.popupmenu4,'value');
if pos==1
T=1;
end
if pos==2
T=5;
end
if pos==3
T=0;
end
if T>janela
T=janela;
end
if cruza==0
fim=length(y);
i=0;
for i=1:fim-janela
yin(i,:)=y(i:janela+i-1);
yout(i)=y(janela + i);
xin(i,:)=[x(janela-janela1+i:janela+i)];
%
xin(i,:)=[x(janela-janela1+i:janela+i-1), -1];
end
YIN=[yin xin];
[linha1,~]=size(YIN');
w=1*randn(1,linha1);
end
while tempo<4
if cruza == 1
switch tempo
case 1
fim1=length(ya);
i=0;
for i=1:fim1-janela
yin(i,:)=ya(i:janela+i-1);
yout(i)=ya(janela + i);
xin(i,:)=[xa(janela-janela1+i:janela+i)];
%xin(i,:)=[xa(janela-janela1+i:janela+i-1),-1];
end
YIN=[yin xin];
[linha1,~]=size(YIN');
w=1*randn(1,linha1);
case 2
fim2=length(yb);
i=0;
for i=1:fim2-janela
yin(i,:)=yb(i:janela+i-1);
yout(i)=yb(janela + i);
xin(i,:)=[xb(janela-janela1+i:janela+i)];
11
base=Y1(1,1:janela);
[c,~]=size(YYin);
YYIN=[YYin XXin];
count = 0;
for j=1:c
12
13
14
figure;
plot(t,Y);
hold on
lsim(H,u,t,y0,'-r');
grid on
15
16