Show
Ignore:
Timestamp:
08/27/10 17:05:55 (14 years ago)
Author:
smidl
Message:

pmsm stuff fro bierman

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/simulator_zdenek/ekf_example/ekf_obj.cpp

    r384 r1168  
    88 
    99/////////////// 
    10 void EKFfixed::bayes(const vec &dt){ 
    11         ekf(dt(2),dt(3),dt(0),dt(1)); 
     10void EKFfixed::bayes(const vec &yt, const vec &ut){ 
     11        ekf(yt(0),yt(1),ut(0),ut(1)); 
     12         
    1213        vec xhat(4);     
    1314        //UGLY HACK!!! reliance on a predictor!! 
     
    1516        xhat(1)=zprevod(x_est[1],Qm)*Iref; 
    1617        xhat(2)=zprevod(x_est[2],Qm)*Wref; 
    17         xhat(3)=zprevod(x_est[3],15); 
     18        xhat(3)=zprevod(x_est[3],15)*Thetaref; 
    1819         
    1920        E.set_mu(xhat); 
     
    3334                double* Pp=Pfull._data(); 
    3435                for(int i=0;i<16;i++){*(Pp++) = zprevod(P_est[i],15);} 
     36                 
     37                E._R()._M()=Pfull; 
     38                 
    3539                 
    3640                BM::ll = -0.5* ( 4 * 1.83787706640935 +log ( det ( Pfull ) ) +xdif* ( inv(Pfull)*xdif ) );