| 1 | \hypertarget{arx_ui}{}\subsection{Running experiment $\backslash$c estimator with ARX data fields}\label{arx_ui} | 
|---|
| 2 | The experiment estimator::cpp can be run either on command line, or as a mex file in Matlab.\hypertarget{arx_ui_cmd}{}\section{Command-line usage}\label{arx_ui_cmd} | 
|---|
| 3 | In order to use it for estimation of an ARX model, we can define the following \hyperlink{ui}{User Infos and their use} structure: | 
|---|
| 4 |  | 
|---|
| 5 | \begin{DocInclude}\begin{verbatim}//Data generating system | 
|---|
| 6 | system = { | 
|---|
| 7 | type = "ArxDS"; | 
|---|
| 8 | y = {type="rv"; names=["y", "u"];}; | 
|---|
| 9 | u = {type="rv"; names=[]; }; | 
|---|
| 10 | rgr = {type="rv"; | 
|---|
| 11 | names = ["y","y","y","u"]; | 
|---|
| 12 | times = [-1, -2, -3, -1]; | 
|---|
| 13 | }; | 
|---|
| 14 | //AR parameters | 
|---|
| 15 | theta = [0.8, -0.3, 0.4, 1.0, | 
|---|
| 16 | 0.0, 0.0, 0.0, 0.0]; | 
|---|
| 17 | // offset | 
|---|
| 18 | offset = [0.0, 0.0]; | 
|---|
| 19 | //variance | 
|---|
| 20 | r = [0.1, 0.0, | 
|---|
| 21 | 0.0, 1.0]; | 
|---|
| 22 | // log also theta | 
|---|
| 23 | opt="L_theta"; | 
|---|
| 24 | }; | 
|---|
| 25 |  | 
|---|
| 26 | //store results | 
|---|
| 27 | logger = { | 
|---|
| 28 | type= "dirfilelog"; | 
|---|
| 29 | dirname = "exp/arx_ui"; | 
|---|
| 30 | maxlen = 1000; // | 
|---|
| 31 | }; | 
|---|
| 32 |  | 
|---|
| 33 | //estimation | 
|---|
| 34 | estimator = { | 
|---|
| 35 | type = "ARXest"; | 
|---|
| 36 | y = {type="rv"; names=["y"]; }; | 
|---|
| 37 | rgr = {type="rv"; | 
|---|
| 38 | names = ["y","y","y","u"]; | 
|---|
| 39 | times = [-1, -2, -3, -1]; | 
|---|
| 40 | }; | 
|---|
| 41 |  | 
|---|
| 42 | //optional fields | 
|---|
| 43 | dV0 = [1e-3, 1e-5, 1e-5, 1e-5, 1e-5]; //default: 1e-3 for y, 1e-5 for rgr | 
|---|
| 44 | nu0 = 8.;      //default: rgrlen + 2 | 
|---|
| 45 | frg = 1.0;    // forgetting, default frg=1.0 | 
|---|
| 46 | }; | 
|---|
| 47 |  | 
|---|
| 48 | //experiment description | 
|---|
| 49 | experiment:{ | 
|---|
| 50 | ndat = 9000; | 
|---|
| 51 | }; | 
|---|
| 52 | \end{verbatim} | 
|---|
| 53 | \end{DocInclude} | 
|---|
| 54 | \hypertarget{arx_ui}{}\subsection{Running experiment $\backslash$c estimator with ARX data fields}\label{arx_ui} | 
|---|
| 55 | The experiment estimator::cpp can be run either on command line, or as a mex file in Matlab.\hypertarget{arx_ui_cmd}{}\section{Command-line usage}\label{arx_ui_cmd} | 
|---|
| 56 | In order to use it for estimation of an ARX model, we can define the following \hyperlink{ui}{User Infos and their use} structure: | 
|---|
| 57 |  | 
|---|
| 58 | \begin{DocInclude}\begin{verbatim}//Data generating system | 
|---|
| 59 | system = { | 
|---|
| 60 | type = "ArxDS"; | 
|---|
| 61 | y = {type="rv"; names=["y", "u"];}; | 
|---|
| 62 | u = {type="rv"; names=[]; }; | 
|---|
| 63 | rgr = {type="rv"; | 
|---|
| 64 | names = ["y","y","y","u"]; | 
|---|
| 65 | times = [-1, -2, -3, -1]; | 
|---|
| 66 | }; | 
|---|
| 67 | //AR parameters | 
|---|
| 68 | theta = [0.8, -0.3, 0.4, 1.0, | 
|---|
| 69 | 0.0, 0.0, 0.0, 0.0]; | 
|---|
| 70 | // offset | 
|---|
| 71 | offset = [0.0, 0.0]; | 
|---|
| 72 | //variance | 
|---|
| 73 | r = [0.1, 0.0, | 
|---|
| 74 | 0.0, 1.0]; | 
|---|
| 75 | // log also theta | 
|---|
| 76 | opt="L_theta"; | 
|---|
| 77 | }; | 
|---|
| 78 |  | 
|---|
| 79 | //store results | 
|---|
| 80 | logger = { | 
|---|
| 81 | type= "dirfilelog"; | 
|---|
| 82 | dirname = "exp/arx_ui"; | 
|---|
| 83 | maxlen = 1000; // | 
|---|
| 84 | }; | 
|---|
| 85 |  | 
|---|
| 86 | //estimation | 
|---|
| 87 | estimator = { | 
|---|
| 88 | type = "ARXest"; | 
|---|
| 89 | y = {type="rv"; names=["y"]; }; | 
|---|
| 90 | rgr = {type="rv"; | 
|---|
| 91 | names = ["y","y","y","u"]; | 
|---|
| 92 | times = [-1, -2, -3, -1]; | 
|---|
| 93 | }; | 
|---|
| 94 |  | 
|---|
| 95 | //optional fields | 
|---|
| 96 | dV0 = [1e-3, 1e-5, 1e-5, 1e-5, 1e-5]; //default: 1e-3 for y, 1e-5 for rgr | 
|---|
| 97 | nu0 = 8.;      //default: rgrlen + 2 | 
|---|
| 98 | frg = 1.0;    // forgetting, default frg=1.0 | 
|---|
| 99 | }; | 
|---|
| 100 |  | 
|---|
| 101 | //experiment description | 
|---|
| 102 | experiment:{ | 
|---|
| 103 | ndat = 9000; | 
|---|
| 104 | }; | 
|---|
| 105 | \end{verbatim} | 
|---|
| 106 | \end{DocInclude} | 
|---|
| 107 |  | 
|---|