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