41 | | |
| 41 | TEST(arx_LQG_test){ |
| 42 | mlnorm<fsqmat> ml; |
| 43 | mat A="1.81, -.8189, .00468, .00438"; |
| 44 | ml.set_parameters(A, vec_1(0), eye(0.0001)); |
| 45 | RV yr=RV("y",1); |
| 46 | RV ur=RV("u",1); |
| 47 | RV rgr = yr.copy_t(-1); |
| 48 | rgr.add(yr.copy_t(-2)); |
| 49 | rgr.add(yr.copy_t(-2)); |
| 50 | rgr.add(ur.copy_t(-1)); |
| 51 | rgr.add(ur); |
| 52 | |
| 53 | ml.set_rv(yr); |
| 54 | ml.set_rvc(rgr); |
| 55 | ml.validate(); |
| 56 | |
| 57 | shared_ptr<StateCanonical > Stsp=new StateCanonical; |
| 58 | Stsp->connect_mlnorm(ml); |
| 59 | |
| 60 | LQG L; |
| 61 | L.set_system(Stsp); |
| 62 | L.set_control_parameters(eye(1), eye(1), vec_1(0.0), 100); |
| 63 | L.validate(); |
| 64 | |
| 65 | L.redesign(); |
| 66 | } |