Changeset 871 for applications/pmsm
- Timestamp:
- 03/19/10 11:23:05 (15 years ago)
- Location:
- applications/pmsm
- Files:
-
- 16 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/Barcelona/MM.cfg
r342 r871 26 26 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 27 27 rv = {type="rv"; names=["EKF"]; sizes=[4];}; 28 options="logll";28 log_level="logevidence"; 29 29 }; 30 30 E2= {type="EKF"; … … 41 41 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 42 42 rv = {type="rv"; names=["EKFw"]; sizes=[4];}; 43 options="logll";43 log_level="logevidence"; 44 44 }; 45 45 … … 51 51 {type="internal";path="E1";}, 52 52 {type="internal";path="E2";}); 53 options="logll";53 log_level="logevidence"; 54 54 }); 55 55 -
applications/pmsm/Barcelona/Mz.cfg
r365 r871 11 11 profileW = [0, 1, 5, 10, 10, 3, 0, 0, -3, -3, -10, -10, -4, 0, 0]; 12 12 profileM = [0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0]; 13 options = "modelu";13 log_level = "logvoltage"; 14 14 }; 15 15 … … 32 32 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 33 33 rv = {class="RV"; names=("EKFMz"); sizes=[5];}; 34 options="logll,logbounds";34 log_level="logevidence,logbounds"; 35 35 }, 36 36 // … … 47 47 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 48 48 rv = {class="RV"; names=("EKF"); sizes=[4];}; 49 options="logll,logbounds";49 log_level="logevidence,logbounds"; 50 50 }, 51 51 // … … 62 62 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 63 63 rv = {class="RV"; names=("EKFw"); sizes=[4];}; 64 options="logll,logbounds";64 log_level="logevidence,logbounds"; 65 65 }, 66 66 … … 78 78 //drv = {class="RV"; names=("o_ia","o_ib","t_ua","t_ub");}; // true u 79 79 rv = {class="RV"; names=("CRB"); sizes=[5];}; 80 options="logll,logbounds";80 log_level="logevidence,logbounds"; 81 81 } 82 82 -
applications/pmsm/Barcelona/Mz.m
r706 r871 30 30 'drv', Orv,... 31 31 'rv', struct('type','rv', 'names', {{'EKFMz'}},'sizes',[5]),... 32 ' options','logll,logbounds')};32 'log_level','logevidence,logbounds')}; 33 33 34 34 %S.logger= struct( 'type','mexlog','maxlen',32000); -
applications/pmsm/Barcelona/Mz_mx.cfg
r352 r871 11 11 profileW = [0, 3, 10, 10, 3, 0, 0, -3, -3, -3, -10, -10, -4, 0, 0]; 12 12 profileM = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 13 // options = "modelu";13 // log_level = "logvoltage"; 14 14 }; 15 15 … … 28 28 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 29 29 rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 30 options="logll,logbounds";30 log_level="logevidence,logbounds"; 31 31 }, 32 32 // … … 45 45 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 46 46 rv = {type="rv"; names=["CRB"]; sizes=[5];}; 47 options="logll,logbounds";47 log_level="logevidence,logbounds"; 48 48 }, 49 49 … … 61 61 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 62 62 rv = {type="rv"; names=["CRB2"]; sizes=[4];}; 63 options="logll,logbounds";63 log_level="logevidence,logbounds"; 64 64 } 65 65 -
applications/pmsm/Barcelona/pwm.cfg
r338 r871 27 27 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 28 28 rv = {type="rv"; names=["EKF"]; sizes=[4];}; 29 options="logbounds";29 log_level="logbounds"; 30 30 }, 31 31 /////////// -
applications/pmsm/Barcelona/pwm_mx.cfg
r349 r871 11 11 profileW = [1, 5, 10, 100, 3, 3, 0, 0]; 12 12 //profileM = [0, 0, 10, 10, 10, 0, 10, 0]; 13 options = "modelu";13 log_level = "logvoltage"; 14 14 }; 15 15 -
applications/pmsm/Barcelona/real.cfg
r349 r871 28 28 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 29 29 rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 30 options="logll,logbounds";30 log_level="logevidence,logbounds"; 31 31 } 32 32 ); -
applications/pmsm/Barcelona/real_mx.cfg
r349 r871 26 26 drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];}; // observed u 27 27 rv = {type="rv"; names=["EKFMz"]; sizes=[5];}; 28 options="logll,logbounds";28 log_level="logevidence,logbounds"; 29 29 }, 30 30 {type="EKF"; … … 41 41 drv = {type="rv"; names=["o_ia","o_ib","o_ua","o_ub"];}; // observed u 42 42 rv = {type="rv"; names=["EKF"]; sizes=[4];}; 43 options="logll,logbounds";43 log_level="logevidence,logbounds"; 44 44 } 45 45 ); -
applications/pmsm/TR2245/pmsm_wishart.cpp
r706 r871 83 83 dirfilelog *L = UI::build<dirfilelog> ( F, "logger" );// ( "exp/mpf_test",100 ); 84 84 85 KFE. set_options ( "logbounds" );85 KFE.log_level[logbounds] = true; 86 86 KFE.log_add ( *L,"KF" ); 87 M. set_options ( "logbounds" );87 M.log_level[logbounds] = true; 88 88 M.log_add ( *L,"M" ); 89 89 DS->log_add(*L); -
applications/pmsm/TR2245/unitsteps.cpp
r744 r871 87 87 int l_Q= L->add_vector ( rQ, "" ); 88 88 89 KFE. set_options ( "logbounds" );89 KFE.log_level[ logbounds] = true; 90 90 KFE.log_register ( *L,"KF" ); 91 M. set_options ( "logbounds" );91 M.log_level[logbounds] = true; 92 92 M.log_register ( *L,"M" ); 93 93 L->init(); -
applications/pmsm/TR2245/wishart.cpp
r706 r871 83 83 int l_fullQ= L->add ( rQ, "full" ); 84 84 85 KFE. set_options ( "logbounds" );85 KFE.log_level[logbounds] = true; 86 86 KFE.log_add ( *L,"KF" ); 87 M. set_options ( "logbounds" );87 M.log_level[logbounds]= true; 88 88 M.log_add ( *L,"M" ); 89 89 L->init(); -
applications/pmsm/cfg/mpf_test.cfg
r661 r871 16 16 drv = {class="RV"; names=("o_ia","o_ib","o_ua","o_ub");}; 17 17 rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");}; 18 options= "logbounds";18 log_level = "logbounds"; 19 19 n=20; 20 20 } -
applications/pmsm/cfg/sim.cfg
r676 r871 25 25 //drv = {type="rv"; names=["o_ia","o_ib","t_ua","t_ub"];}; // true u 26 26 rv = {class="RV"; names=("EKF"); sizes=[4];}; 27 options= "logbounds";27 log_level = "logbounds"; 28 28 } 29 29 ); -
applications/pmsm/cfg/uni_test.cfg
r686 r871 35 35 rvc = {class="RV"; names=("o_ua","o_ub");}; 36 36 rv = {class="RV"; names=("e_ia","e_ib","e_om","e_th");}; 37 options= "logbounds";37 log_level = "logbounds"; 38 38 n=1000; 39 39 } -
applications/pmsm/filters.h
r767 r871 137 137 this->set_BM ( *kal ); 138 138 139 string opt; 140 if ( UI::get ( opt,set,"options",UI::optional ) ) { 141 set_options ( opt ); 142 } 143 144 validate(); 139 UI::get ( log_level,set,UI::optional ); 145 140 } 146 141 void bayes ( const vec &yt, const vec &cond ) { -
applications/pmsm/pmsmDS.h
r744 r871 21 21 class pmsmDS : public DS 22 22 { 23 LOG_LEVEL(pmsmDS,logvoltage); 23 24 24 25 protected: … … 32 33 double dt_prof; 33 34 //! Number of miliseconds per discrete time step 34 int Dt; 35 //! options for logging, - log predictions of 'true' voltage 36 bool opt_modu; 37 //! options for logging, - 35 int Dt; 38 36 public: 39 37 //! Constructor with fixed sampling period … … 49 47 pmsmsim_set_parameters ( Rs0, Ls0, Fmag0, Bf0, p0, kp0, J0, Uc0, DT0, dt0 ); 50 48 } 51 //! parse options: "modelu" => opt_modu=true; 52 void set_options ( string &opt ) 53 { 54 opt_modu = ( opt.find ( "modelu" ) !=string::npos ); 55 } 56 void getdata ( vec &dt ) const 49 50 void getdata ( vec &dt ) const 57 51 { 58 52 dt.set_subvector(0,vec ( KalmanObs,6 )); … … 123 117 L_iu = L.add_vector ( ru, "t" ); 124 118 // log differences 125 if ( opt_modu)119 if ( log_level[logvoltage] ) 126 120 { 127 121 L_optu = L.add_vector ( ru, "model" ); … … 135 129 L.log_vector ( L_ou, vec_2 ( KalmanObs[0],KalmanObs[1] ) ); 136 130 L.log_vector ( L_iu, vec_2 ( KalmanObs[4],KalmanObs[5] ) ); 137 if ( opt_modu)131 if ( log_level[logvoltage] ) 138 132 { 139 133 double sq3=sqrt ( 3.0 ); … … 181 175 182 176 string opts; 183 if ( root.lookupValue( " options", opts ) )177 if ( root.lookupValue( "log_level", opts ) ) 184 178 set_options(opts); 185 179 }