1) IDENTIFIKACE ARMA PROCESU ========================= help arxstruc (IDENT) ARXSTRUC Computes loss functions for families of ARX-models. V = ARXSTRUC(Z,ZV,NN) V: The first row of V is returned as the loss functions of the structures defined by the rows of NN. The remaining rows are returned as NN'. The last column of V contains the number of data points in Z. Z : the output-input data Z=[y u], with y and u as column vectors. Only Single-Output data are handled by this routine! For a time series Z=y only. ZV: the input-output data on which the validation is performed. (could equal Z). The number of rows in ZV need not equal those in Z. NN: Each row of NN is of the format [na nb nk], the orders and delays of the corresponding ARX model.(See also ARX and STRUC.) For a time series, each row of NN equals na only. See also SELSTRUC for analysis of V. Some parameters associated with the algorithm are accessed by V = ARXSTRUC(Z,ZV,NN,maxsize) See also AUXVAR for an explanation of maxsize, and IVSTRUC for an alternative approach. ------------------------------------------------------------------------------ help selstruc (IDENT) SELSTRUC Selects model structures according to various criteria. nn = selstruc(V,c) or [nn,Vm] = selstruc(V,c) V: is a matrix containing information about different structures, typically obtained as the output of ARXSTRUC or IVSTRUC. c: selects the criterion: c='PLOT' gives plots of the loss function and (if applicable) the conditioning number from IVSTRUC as func- tions of the number of estimated parameters. The user then selects the number of parameters. Automatic choices of structures are obtained by c='AIC', which gives Akaike's information theoretic criterion, while c='MDL' gives Rissanen's minimum description length criterion. If c is given a numeric value the structure is selected by minimization of (1 + c*d/N)*Vd, where d is the number of estimated parameters, Vd is the loss function of the corresponding model, and N is the number of data. If c is omitted, PLOT is chosen. nn: is returned as the chosen structure. The format is compatible with the input format for ARX and IV4. Vm: the first row of Vm contains the logarithms of the modified criteria of fit. The remaining rows of Vm coincide with V. ============================================================================== 2) ODHAD PARAMETRŮ A JEJICH PRESENTACE =================================== a) ODHAD PARAMETRŮ --------------- help ar (IDENT) AR Computes AR-models of signals using various approaches. TH = AR(y,n) or TH = AR(y,n,approach) or TH = AR(y,n,approach,win) TH: returned as the estimated parameters of the AR-model,see also THETA. y: The time series to be modelled, a column vector n: The order of the AR-model approach: The method used, one of the following ones: 'fb' : The forward-backward approach (default) 'ls' : The Least Squares method 'yw' : The Yule-Walker method 'burg': Burg's method 'gl' : A geometric lattice method For the two latter ones, reflection coefficients and loss functions are returned in REFL by [TH,REFL]=AR(y,n,approach) If any of these arguments end with a zero (like 'burg0'), the computation of the covariance is suppressed. win : Windows employed, one of the following ones: 'now' : No windowing (default, except when approach='yw') 'prw' : Prewindowing 'pow' : Postwindowing 'ppw' : pre- and post-windowing for TH = AR(y,n,approach,win,maxsize,T) see also AUXVAR. See also IVAR and for the multi-output case ARX and N4SID. ------------------------------------------------------------------------------ help armax (IDENT - opravená verze v '/home3/vesely/matlab/cas_rady') ARMAX Computes the prediction error estimate of an ARMAX model. TH = ARMAX(Z,NN) or TH = ARMAX(Z,NN,'trace') TH: returned as the estimated parameters of the ARMAX model A(q) y(t) = B(q) u(t-nk) + C(q) e(t) along with estimated covariances and structure information. For the exact format of TH, see also THETA. Z : The output-input data Z=[y u], with y and u being column vectors. For a time-series, Z=y only. The routine does not work for multi- output systems. Use state-space models and PEM for that case. NN: Initial value and structure information. When no initial parameter estimates are available enter NN as NN=[na nb nc nk], the orders and delay of the above model. For multi- input models, nb and nk are row vectors so that nb(k) and nk(k) is the order and delay associated with input # k. NN=[na nc] for the time-series case (ARMA-model). With an initial estimate available in THI, a theta matrix of standard format, enter NN=THI. Then the criterion minimization is initialized at THI. If a *last* argument to armax is entered as 'trace', information about the criterion minimization is given in the MATLAB Command Window. Some parameters associated with the algorithm are accessed by [TH,IT_INF] = ARMAX(Z,NN,maxiter,tol,lim,maxsize,T,'trace') See also AUXVAR for an explanation of these and their default values. See also ARX, BJ, IV4, N4SID, OE, PEM. ------------------------------------------------------------------------------ b) PREZENTACE VÝSLEDKŮ ------------------- help present (IDENT) PRESENT presents a parametric model on the screen. PRESENT(TH) This function displays the model TH together estimated standard deviations, innovations variance, loss function and Akaike's Final Prediction Error criterion (FPE). ------------------------------------------------------------------------------ help th2arx (IDENT) TH2ARX converts a THETA-format model to an ARX-model. [A,B]=TH2ARX(TH) TH: The model structure defined in the THETA-format (See also TEHTA.) A, B : Matrices defining the ARX-structure: y(t) + A1 y(t-1) + .. + An y(t-n) = = B0 u(t) + ..+ B1 u(t-1) + .. Bm u(t-m) A = [I A1 A2 .. An], B=[B0 B1 .. Bm] With [A,B,dA,dB] = TH2ARX(TH), also the standard deviations of A and B, i.e. dA and dB are computed. See also ARX2TH, and ARX ------------------------------------------------------------------------------ help th2par (IDENT) TH2PAR converts the theta-format to parameters and covariance matrix. [PAR,P,LAM] = TH2PAR(TH) TH: The model defined in the THETA-format (see also THETA). PAR: The parameter vector in THETA (nominal or estimated values of the free parameters) P: The covariance matrix of the estimated parameters LAM: The variance (covariance matrix) of the innovations ------------------------------------------------------------------------------ help th2poly (IDENT) TH2POLY computes the polynomials associated with a given model. [A,B,C,D,F,LAM,T]=TH2POLY(TH) TH is the model with format described by (see also) THETA. A,B,C,D, and F are returned as the corresponding polynomials in the general input-output model. A, C and D are then row vectors, while B and F have as many rows as there are inputs. LAM is the variance of the noise source. T is the sampling interval. See also POLY2TH. ------------------------------------------------------------------------------ help th2zp (IDENT) TH2ZP Computes zeros, poles, static gains and their standard deviations. [ZEPO,K] = TH2ZP(TH) For a model defined by TH (in the theta format. See also THETA.) ZEPO is returned as the zeros and poles and their standard deviations. Its first row contains integers with information about the column in question. See the manual. The rows of K contain in order: the input/output number, the static gain, and its standard deviation. Both discrete and continuous time models are handled by TH2ZP With [ZEPO,K] = TH2ZP(TH,KU,KY) the zeros and poles associated with the input and output numbers given by the entries of the row vectors KU and KY, respectively, are computed. Default values: KU=[1:number of inputs], KY=[1:number of outputs]. The noise e is then regarded as input # 0. The information is best displayed by ZPPLOT. ZPPLOT(TH2ZP(TH),sd) is a possible construction. See also TH2FF, TH2POLY, TH2TF, TH2SS, and ZP. ------------------------------------------------------------------------------ help zpplot (IDENT) ZPPLOT Plots zeros and poles. ZPPLOT(ZEPO) or ZPPLOT(ZEPO,SD) or ZPPLOT(ZEPO,MODE) or ZPPLOT(ZEPO,SD,MODE,AXIS) The zeros and poles, specified by ZEPO (See TH2ZP, or ZPFORM for the format) are plotted, with 'o' denoting zeros and 'x' poles. Poles and zeros associated with the same input, but different models are always plotted in the same diagram, and 'ENTER' advances the plot from one model to the next (if any). When ZEPO contains information about several different inputs there are some options: MODE='sub' (The default value) splits the screen into several plots. MODE='same' gives all plots in the same diagram. Use 'ENTER' to advance MODE='sep' erases the previous plot before the next input is treated. AXIS=[x1 x2 y1 y2] fixes the axes scaling. AXIS=m is the same as AXIS=[-m m -m m]. Default is autoscaling If SD>0, confidence regions around the poles and zeros are plotted. The region corresponding to SD standard deviations is marked. SD=0 is default. For multi-output models, each output is handled separately. See also TH2ZP, ZP, and ZPFORM. ============================================================================== 3) VERIFIKACE MODELU ================= a) VÝPOČET REZIDUÁLNÍHO ŠUMU ------------------------- help pe (IDENT) PE Computes prediction errors. E = PE(Z,TH) E : The prediction errors Z : The output-input data Z=[y u] TH: The model. Format as in HELP THETA A more complete set of information associated with the model TH and the data Z is obtained by [E,V,W,A,B,C,D,F] = PE(Z,TH) Here A,B,C,D,and F are the polynomials associated with TH and W = B/F u and V = A[y - W]. ------------------------------------------------------------------------------ help resid (IDENT) RESID Computes and tests the residuals associated with a model. E = RESID(Z,TH) Z : The output-input data Z=[y u], with y and u being column vectors. For multi-variable systems Z=[y1 y2 .. yp u1 u2 ... un]. For time-series Z=y only. TH: The model to be evaluated on the given data set. (For the theta format, see also THETA.) E : The residuals associated with TH and Z. [RESID(Z,TH); just performs and displays the tests, without returning any data.] The autocorrelation function of E and the cross correlation between E and the input(s) is computed and displayed. 99 % confidence limits for these values are also given (based on the hypothesis that the residuals are white and independent of the inputs). These functions are given up to lag 25, which can be changed to M by E = RESID(Z,TH,M). The correlation information can be saved and re- plotted by [E,R] = RESID(Z,TH). RESID(R); E = RESID(Z,TH,M,MAXSIZE) changes the memory variable MAXSIZE from its default value. See also AUXVAR. See also PE. ------------------------------------------------------------------------------ b) SIMULACE A PREDIKCE ------------------- help armasim VALIDATE AN ARMA(p,q) PROCESS VIA ONE-STEP SIMULATION function [xs,z,v] = armasim(x,phi,theta,x0) x ... observed data set which is to be validated as ARMA(p,q) process with coefficients phi and theta, n=ĺength(x). phi ... AR coefficients (estimated), p=length(phi), default=[] <=> p=0 theta ... MA coefficients (estimated), q=length(theta), default=[] <=> q=0 p=0 => x=MA(q) process, q=0 => x=AR(p) process p=0 & q=0 => x=zero-mean white noise process. x0 ... initial data sequence relevant to AR only (p>0), default=[], n0=length(x0). n0

the leading part of x0 updated with p-n0 zero samples n0>p => only the trailing p samples will be used. xs ... xs(t) = phi(1)*x(t-1)+phi(2)*x(t-2)+...+phi(p)*x(t-p) + + theta(1)*z(t-1)+theta(2)*z(t-2)+...+theta(q)*z(t-q), t=1,...,n, is one-step prediction (column vector), where x(-k) = x0(n0-k) for k=0,...,p-1. z ... = x-xs ... prediction (residual) error which should be zero-mean white noise process, length(z)=n, column vector. Do verify that actually z is white noise using trand(z) and/or inspecting the behaviour of acf(z). Provided that this cannot be confirmed, the model has to be rejected as inappropriate. v ... v=std(z).^2 is estimated variance of z. ------------------------------------------------------------------------------ help filter (standardni MATLAB) FILTER Digital filter. Y = FILTER(B, A, X) filters the data in vector X with the filter described by vectors A and B to create the filtered data Y. The filter is a "Direct Form II Transposed" implementation of the standard difference equation: y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb) - a(2)*y(n-1) - ... - a(na+1)*y(n-na) [Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final conditions, Zi and Zf, of the delays. See also FILTFILT in the Signal Processing Toolbox. ------------------------------------------------------------------------------ help predict (IDENT) PREDICT Computes the m-step ahead prediction. YP = PREDICT(Z,TH,M) Z : The output - input data for which the prediction is computed. Z = [Y U], where Y and U are column vectors (one column for each output and input) TH: The model in the THETA format (see also THETA). M : The prediction horizon. Old outputs up to time t-M are used to predict the output at time t. All relevant inputs are used. M = inf gives a pure simulation of the system.(Default M=1). YP: The resulting predicted output. With [YP,THPRED] = PREDICT(Z,TH,M) the predictor is returned in the THETA format See also COMPARE and IDSIM. ------------------------------------------------------------------------------ help compare (IDENT) COMPARE Compares the simulated/predicted output with the measured output. YH = COMPARE(Z,TH,M) Z : The output - input data for which the comparison is made (the validation data set. TH: The model in the THETA format (see also THETA). M : The prediction horizon. Old outputs up to time t-M are used to predict the output at time t. All relevant inputs are used. M = inf gives a pure simulation of the system.(Default M=inf). YH: The resulting simulated/predicted output. COMPARE also plots YH together with the measured output in Z, and displays the mean square fit between these two signals. (solid/yellow is YH. dashed/magenta is measured output) [YH,FIT] = COMPARE(Z,TH,M,SAMPNR,LEVELADJUST) gives access to some options: FIT: The mean square fit. SAMPNR: The sample numbers from Z to be plotted and used for the computation of FIT. (Default: SAMPNR = all rows of Z) LEVELADJUST: 'yes' adjusts the first values of YH and Z(:,1) to zero before plot and computation of FIT. 'no' is default. See also IDSIM and PREDICT. ==============================================================================