Changeset 703 for library/tests/LQG_test.cpp
- Timestamp:
- 11/04/09 22:55:17 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/tests/LQG_test.cpp
r699 r703 39 39 } 40 40 41 TEST(to_state_arx_test) { 42 mlnorm<fsqmat> ml; 43 mat A="1.1, 2.3"; 44 ml.set_parameters(A, vec_1(1.3), eye(1)); 45 RV yr=RV("y",1); 46 RV ur=RV("u",1); 47 ml.set_rv(yr); 48 yr.t_plus(-1); 49 ml.set_rvc(concat(yr, ur)); 50 51 shared_ptr<StateFromARX> Stsp=new StateFromARX; 52 Stsp->connect_mlnorm(ml); 53 54 /* results from 55 [A,B,C,D]=tf2ss([2.3 0],[1 -1.1]) 56 */ 57 cout << "---" << endl; 58 } 59 41 60 TEST(arx_LQG_test){ 42 61 mlnorm<fsqmat> ml; 43 62 mat A="1.81, -.8189, .00468, .00438"; 44 ml.set_parameters(A, vec_1(0 ), eye(0.0001));63 ml.set_parameters(A, vec_1(0.0), 0.00001*eye(1)); 45 64 RV yr=RV("y",1); 46 65 RV ur=RV("u",1); … … 48 67 rgr.add(yr.copy_t(-2)); 49 68 rgr.add(yr.copy_t(-2)); 69 rgr.add(ur.copy_t(-2)); 50 70 rgr.add(ur.copy_t(-1)); 51 rgr.add(ur);52 71 53 72 ml.set_rv(yr); … … 64 83 65 84 L.redesign(); 85 cout << L.to_string()<<endl; 66 86 }