Changeset 676 for applications/pmsm
- Timestamp:
- 10/22/09 01:13:47 (15 years ago)
- Location:
- applications/pmsm
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
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