Show
Ignore:
Timestamp:
08/01/11 22:11:09 (13 years ago)
Author:
smidl
Message:

MPF v C

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/pmsmDS.h

    r1377 r1380  
    2525{ 
    2626        LOG_LEVEL(pmsmDS,logvoltage); 
    27  
     27                 
    2828protected: 
    2929    //! indices of logged variables 
     
    3838    int Dt;     
    3939public: 
     40        double x[8]; 
     41        double KalmanObs[8]; 
    4042    //! Constructor with fixed sampling period 
    4143    pmsmDS () : DS() 
     
    4446        Drv=RV ( "{o_ua o_ub o_ia o_ib t_ua t_ub o_om o_th Mz }" ); 
    4547                dtsize = Drv._dsize(); 
     48                pmsmsim_fill_xy(x,KalmanObs); 
    4649    } 
    4750    void set_parameters ( double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0 ) 
     
    6669    void step() 
    6770    { 
     71                pmsmsim_fill_xy(x,KalmanObs); 
    6872        static int ind=0; 
    6973        static double dW; // increase of W 
    7074        static double Ww; // W 
    7175        static double Mz; // W 
     76        double t;  
     77                t=pmsmsim_get_t(); 
    7278        if ( t>=dt_prof*ind ) 
    7379        { 
     
    210216                void step() 
    211217                { 
     218                        double t=pmsmsim_get_t(); 
     219                         
    212220                        static int ind=0; 
    213221                        static double dW; // increase of W 
     
    256264         
    257265 
     266#ifdef XXX 
    258267//! This class behaves like BM but it is evaluating EKF 
    259268class pmsmCRB : public EKFfull 
     
    279288                vec &mu = est._mu(); 
    280289                //assume we know state exactly: 
    281         vec true_state=vec(x,4); // read from pmsm 
     290        vec true_state=0;//TODO vec(x,4); // read from pmsm 
    282291        mu=true_state; 
    283292 
     
    418427 
    419428UIREGISTER ( pmsmCRBMz ); 
     429#endif  
    420430 
    421431#endif