root/applications/bdmtoolbox/tutorial/userguide/arx_ctrl_example.m @ 724

Revision 724, 0.5 kB (checked in by smidl, 15 years ago)

Ctrl examples

Line 
1% name random variables
2y = RV({'y'},1);
3u = RV({'u'},1);
4
5% create f(y_t| y_{t-3}, u_{t-1})
6fy.class = 'mlnorm<ldmat>';
7fy.rv    = y;
8fy.rvc   = RVtimes([y,u], [-3, -1]);
9fy.A     = [0.5, -0.9];
10fy.const = 0;
11fy.R     = 1e-2;
12
13DS.class = 'PdfDS';
14DS.pdf = fy;
15
16% create ARX estimator
17A1.class = 'ARX';
18A1.rv = y;
19A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y}
20A1.options ='logbounds,logll';
21
22C1.class = 'LQG_ARX';
23C1.ARX = A1;
24C1.Qu = 0.1*eye(1);
25C1.Qy = eye(1);
26C1.yreq = 1;
27C1.horizon = 100;
28
29M= controlloop(DS,{C1});
Note: See TracBrowser for help on using the browser.