summaryrefslogtreecommitdiff
path: root/armaX.sci
diff options
context:
space:
mode:
authorpriyakedia2018-07-31 16:10:34 +0530
committerpriyakedia2018-07-31 16:10:34 +0530
commitdb25cb043776c50d0f0ee98636301906b065d8f0 (patch)
tree999773628035605e4963be2712401bf9836188a6 /armaX.sci
parenta0084443a1d6a9bebd29a0860c7ae83c22f08002 (diff)
downloadFOSSEE-System-Identification-Toolbox-db25cb043776c50d0f0ee98636301906b065d8f0.tar.gz
FOSSEE-System-Identification-Toolbox-db25cb043776c50d0f0ee98636301906b065d8f0.tar.bz2
FOSSEE-System-Identification-Toolbox-db25cb043776c50d0f0ee98636301906b065d8f0.zip
examples included
Diffstat (limited to 'armaX.sci')
-rw-r--r--armaX.sci48
1 files changed, 46 insertions, 2 deletions
diff --git a/armaX.sci b/armaX.sci
index 93376e2..e4ad412 100644
--- a/armaX.sci
+++ b/armaX.sci
@@ -1,5 +1,49 @@
function sys = armaX(varargin)
+// Parameters Estimation of ARMAX model using Input Output time-domain data
+//
+// Calling Sequence
+// sys = armaX(ioData,[na nb nc nk])
+//
+// Parameters
+// ioData : iddata or [outputData inputData] ,matrix of nx2 dimensions, type plant data
+// na : non-negative integer number specified as order of the polynomial A(z^-1)
+// nb : non-negative integer number specified as order of the polynomial B(z^-1)+1
+// nc : non-negative integer number specified as order of the polynomial C(z^-1)
+// nk : non-negative integer number specified as input output delay, Default value is 1
+// sys : idpoly type polynomial have estimated coefficients of A(z^-1),B(z^-1) and C(z^-1) polynomials
+//
+// Description
+// Fit ARMAX model on given input output data
+// The mathematical equation of the ARMAX model
+// <latex>
+// begin{eqnarray}
+// A(q)y(n) = B(q)u(n) + C(q)e(n)
+// end{eqnarray}
+// </latex>
+// It is SISO type model. It minimizes the sum of the squares of nonlinear functions using Levenberg-Marquardt algorithm.
+//
+// sys ,an idpoly type class, have different fields that contains estimated coefficients, sampling time, time unit and other estimated data in Report object.
+//
+// Examples
+// u = idinput(1024,'PRBS',[0 1/20],[-1 1])
+// a = [1 0.5];b = [0 2 3];
+// model = iddata(a,b,'Ts',0.1)
+// y = sim(u,model) + rand(length(u),1)
+// plantData = iddata(y,u,0.1)
+// sys = armaX(plantData,[2,2,1])
+//
+// Examples
+// u = idinput(1024,'PRBS',[0 1/20],[-1 1])
+// a = [1 0.5];b = [0 2 3];
+// model = iddata(a,b,'Ts',0.1)
+// y = sim(u,model) + rand(length(u),1)
+// plantData = [y,u]
+// sys = armaX(plantData,[2,2,1])
+//
+// Authors
+// Ashutosh Kumar Bhargava, Bhushan Manjarekar
+
[lhs , rhs] = argn();
if ( rhs < 2 ) then
errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while should be 2"), "armaX", rhs);
@@ -34,7 +78,7 @@ function sys = armaX(varargin)
error(errmsg);
end
- na = n(1); nb = n(2); nc = n(3); //nd = n(4);nf = n(5);
+ na = n(1); nb = n(2); nc = n(3); // nd = n(4);nf = n(5);
if (size(n,"*") == 3) then
nk = 1
@@ -42,7 +86,7 @@ function sys = armaX(varargin)
nk = n(4);
end
- // storing U(k) , y(k) and n data in UDATA,YDATA and NDATA respectively
+ // storing U(k) , y(k) and n data in UDATA,YDATA and NDATA respectively
YDATA = z(:,1);
UDATA = z(:,2);