Changeset 676 for applications
- Timestamp:
- 10/22/09 01:13:47 (15 years ago)
- Location:
- applications
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/estimator.cpp
r658 r676 141 141 } 142 142 143 Ds->log_ add ( *L);143 Ds->log_register ( *L, "DS" ); 144 144 string Ename; 145 145 Setting &S=Cfg; … … 151 151 } 152 152 153 Es ( i )->log_ add( *L,Ename ); // estimate153 Es ( i )->log_register ( *L,Ename ); // estimate 154 154 } 155 155 L->init(); … … 177 177 for ( int tK=0;tK<Ndat;tK++ ) { 178 178 Ds->getdata ( dt ); // read data 179 Ds->log it ( *L);179 Ds->log_write ( ); 180 180 181 181 for ( int i=0; i<Es.length(); i++ ) { 182 182 Es ( i )->bayes ( Dls ( i )->pushdown ( dt ) ); // update estimates 183 Es ( i )->log it ( *L);183 Es ( i )->log_write (); 184 184 } 185 185 -
applications/bdmtoolbox/mex/simulator.cpp
r627 r676 125 125 } 126 126 127 Ds->log_ add ( *L);127 Ds->log_register ( *L, "DS" ); 128 128 L->init(); 129 129 … … 132 132 for ( int tK=0;tK<Ndat;tK++ ) { 133 133 Ds->getdata ( dt ); // read data 134 Ds->log it ( *L);134 Ds->log_write ( ); 135 135 136 136 L->step(); -
applications/pmsm/cfg/sim.cfg
r654 r676 9 9 params = "pmsm107@zcu.cfg"; 10 10 tstep = 1.0; // steps for profile in [s] 11 profileW = [1, 5, 0, -3, 0, 0, 0, 1, 0, 0 ];11 profileW = [1, 40, 0, -40, 0, 0, 0, 1, 0, 0 ]; 12 12 opt = "u"; 13 13 }; -
applications/pmsm/pmsmDS.h
r654 r676 52 52 opt_modu = ( opt.find ( "modelu" ) !=string::npos ); 53 53 } 54 void getdata ( vec &dt ) 54 void getdata ( vec &dt ) const 55 55 { 56 56 dt.set_subvector(0,vec ( KalmanObs,6 )); … … 114 114 }; 115 115 116 void log_ add( logger &L )116 void log_register ( logger &L ) 117 117 { 118 118 L_x = L.add ( rx, "x" ); … … 127 127 } 128 128 129 void log it( logger &L )129 void log_write ( logger &L ) 130 130 { 131 131 L.logit ( L_x, vec ( x,4 ) ); -
applications/pmsm/pmsm_estim.cpp
r666 r676 30 30 F.lookupValue ( "experiment.ndat",Ndat ); 31 31 32 pDS->log_ add ( *L);33 string nic="";32 pDS->log_register ( *L, "true" ); 33 string Ename; 34 34 for (int i=0; i<nE; i++){ 35 Es(i)->log_add(*L,nic); // estimate 35 try { 36 UI::get ( Ename, F.getRoot()["estimators"][i], "name",UI::optional ); 37 } catch ( ...) { 38 Ename="Est"+num2str ( i ); 39 } 40 Es(i)->log_register(*L,Ename); // estimate 36 41 } 37 42 L->init(); … … 48 53 pDS->step(); // simulator step 49 54 pDS->getdata ( dt ); // read data 50 pDS->log it ( *L);55 pDS->log_write (); 51 56 52 57 // Estimators … … 54 59 Es(i)->bayes ( Dls(i)->pushdown ( dt ) ); // update estimates 55 60 56 Es(i)->log it (*L);61 Es(i)->log_write (); 57 62 } 58 63 // Regulators