Changeset 1380 for applications/pmsm/pmsmDS.h
- Timestamp:
- 08/01/11 22:11:09 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/pmsmDS.h
r1377 r1380 25 25 { 26 26 LOG_LEVEL(pmsmDS,logvoltage); 27 27 28 28 protected: 29 29 //! indices of logged variables … … 38 38 int Dt; 39 39 public: 40 double x[8]; 41 double KalmanObs[8]; 40 42 //! Constructor with fixed sampling period 41 43 pmsmDS () : DS() … … 44 46 Drv=RV ( "{o_ua o_ub o_ia o_ib t_ua t_ub o_om o_th Mz }" ); 45 47 dtsize = Drv._dsize(); 48 pmsmsim_fill_xy(x,KalmanObs); 46 49 } 47 50 void set_parameters ( double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0 ) … … 66 69 void step() 67 70 { 71 pmsmsim_fill_xy(x,KalmanObs); 68 72 static int ind=0; 69 73 static double dW; // increase of W 70 74 static double Ww; // W 71 75 static double Mz; // W 76 double t; 77 t=pmsmsim_get_t(); 72 78 if ( t>=dt_prof*ind ) 73 79 { … … 210 216 void step() 211 217 { 218 double t=pmsmsim_get_t(); 219 212 220 static int ind=0; 213 221 static double dW; // increase of W … … 256 264 257 265 266 #ifdef XXX 258 267 //! This class behaves like BM but it is evaluating EKF 259 268 class pmsmCRB : public EKFfull … … 279 288 vec &mu = est._mu(); 280 289 //assume we know state exactly: 281 vec true_state= vec(x,4); // read from pmsm290 vec true_state=0;//TODO vec(x,4); // read from pmsm 282 291 mu=true_state; 283 292 … … 418 427 419 428 UIREGISTER ( pmsmCRBMz ); 429 #endif 420 430 421 431 #endif