~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/arma/armax.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
armax            Scilab Group            Scilab Function              armax
2
 
NAME
3
 
   armax - armax identification 
4
 
  
5
 
CALLING SEQUENCE
6
 
 [arc,la,lb,sig,resid]=armax(r,s,y,u,[b0f,prf])
7
 
PARAMETERS
8
 
 y               : output process  y(ny,n); ( ny: dimension of y , n :
9
 
                 sample size) 
10
 
                 
11
 
 u               : input process   u(nu,n); ( nu: dimension of u , n :
12
 
                 sample size) 
13
 
                 
14
 
 r and s         : auto-regression orders r >=0 et s >=-1
15
 
                 
16
 
 b0f             : optional parameter. Its default value is 0 and it means
17
 
                 that the coefficient b0 must be identified. if bof=1 the
18
 
                 b0 is supposed to be zero and is not identified 
19
 
                 
20
 
 prf             : optional parameter for display control. If prf =1, the
21
 
                 default value,  a display of the identified Arma is given.
22
 
                 
23
 
 arc             : a Scilab arma object (see armac) 
24
 
                 
25
 
 la              : is the list(a,a+eta,a-eta) ( la = a in dimension 1) ;
26
 
                 where eta is the estimated standard deviation.  ,
27
 
                 a=[Id,a1,a2,...,ar] where each ai is a matrix of size
28
 
                 (ny,ny)
29
 
                 
30
 
 lb              : is the list(b,b+etb,b-etb) (lb =b in dimension 1) ;
31
 
                 where etb is the estimated standard deviation.
32
 
                 b=[b0,.....,b_s] where each bi is a matrix of size (nu,nu)
33
 
                 
34
 
 sig             : is the estimated standard deviation of the noise and
35
 
                 resid=[ sig*e(t0),....] ( 
36
 
                 
37
 
DESCRIPTION
38
 
   armax is used to identify the coefficients of a n-dimensional  ARX
39
 
  process
40
 
  
41
 
    A(z^-1)y= B(z^-1)u + sig*e(t)
42
 
   where e(t) is a n-dimensional white noise with variance I. sig  an nxn
43
 
  matrix and A(z) and B(z):
44
 
  
45
 
 A(z) = 1+a1*z+...+a_r*z^r; ( r=0 => A(z)=1)
46
 
 B(z) = b0+b1*z+...+b_s z^s ( s=-1 => B(z)=0)
47
 
   for the method see Eykhoff in trends and progress in system
48
 
  identification, page 96. with    z(t)=[y(t-1),..,y(t-r),u(t),...,u(t-s)] 
49
 
  and  coef= [-a1,..,-ar,b0,...,b_s]  we can write  y(t)= coef* z(t) +
50
 
  sig*e(t) and the algorithm minimises  sum_{t=1}^N ( [y(t)- coef'z(t)]^2)
51
 
  where t0=maxi(maxi(r,s)+1,1))).
52
 
  
53
 
EXAMPLE
54
 
 //-Ex1- Arma model : y(t) = 0.2*u(t-1)+0.01*e(t-1)
55
 
 ny=1,nu=1,sig=0.01;
56
 
 Arma=armac(1,[0,0.2],[0,1],ny,nu,sig)  //defining the above arma model
57
 
 u=rand(1,1000,'normal');     //a random input sequence u
58
 
 y=arsimul(Arma,u); //simulation of a y output sequence associated with u.
59
 
 Armaest=armax(0,1,y,u);   //Identified model given u and y.
60
 
 Acoeff=Armaest('a');    //Coefficients of the polynomial A(x)
61
 
 Bcoeff=Armaest('b')     //Coefficients of the polynomial B(x)
62
 
 Dcoeff=Armaest('d');    //Coefficients of the polynomial D(x)
63
 
 [Ax,Bx,Dx]=arma2p(Armaest)   //Results in polynomial form. 
64
 
 
65
 
 //-Ex2- Arma1: y_t -0.8*y_{t-1} + 0.2*y_{t-2} =  sig*e(t)
66
 
 ny=1,nu=1;sig=0.001;
67
 
 // First step: simulation the Arma1 model, for that we define
68
 
 // Arma2: y_t -0.8*y_{t-1} + 0.2*y_{t-2} = sig*u(t)
69
 
 // with normal deviates for u(t).  
70
 
 Arma2=armac([1,-0.8,0.2],sig,0,ny,nu,0);
71
 
 //Definition of the Arma2 arma model (a model with B=sig and without noise!)
72
 
 u=rand(1,10000,'normal');  // An input sequence for Arma2
73
 
 y=arsimul(Arma2,u); // y = output of Arma2 with input u 
74
 
 //                     can be seen as output of Arma1.
75
 
 // Second step: identification. We look for an Arma model
76
 
 // y(t) + a1*y(t-1) + a2 *y(t-2) =  sig*e(t)
77
 
 Arma1est=armax(2,-1,y,[]);
78
 
 [A,B,D]=arma2p(Arma1est)
79
 
AUTHOR
80
 
   J-Ph. Chancelier.
81
 
  
82
 
SEE ALSO
83
 
   imrep2ss, time_id, arl2, armax, frep2tf
84