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