- Timestamp:
- 03/16/12 16:46:40 (12 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/simulator_zdenek/ekf_example/mpf_double.h
r1438 r1439 2 2 3 3 #include "parametry_motoru.h" 4 #define Fpm 0.1989 5 //#define pi 3.141596 4 6 5 #define N 207 #define N 1 6 8 7 9 #define Lsd Ls*0.9 8 10 #define Lsq Ls 9 11 #define _dt 0.000125 10 #define _ad (1.-Rs*_dt/ Lsd)11 #define _aq (1.-Rs*_dt/ Lsq)12 #define _b F mag/Lsq*_dt13 #define _cd _dt/ Lsd14 #define _cq _dt/ Lsq12 #define _ad (1.-Rs*_dt/(Lsd)) 13 #define _aq (1.-Rs*_dt/(Lsq)) 14 #define _b Fpm/Lsq*_dt 15 #define _cd _dt/(Lsd) 16 #define _cq _dt/(Lsq) 15 17 16 double randn();17 double randu();18 18 19 void mpf_bayes ( const double &isa, const double &isb , const double &usa, const double &usb ); 20 void mpf_init(double qom0, double qth0, double r0); 21 void mpf_mean(double *Ecosth, double *Esinth, double *Eome); 22 void mpf_th(double th1[N]); 19 # define floatx float 23 20 24 double kalman_om ( const double &isa, const double &isb , const double &usa, const double &usb, const double &th ); 21 floatx qrandn(); 22 floatx qrandu(); 23 24 void mpf_bayes ( const floatx isa, const floatx isb , const floatx usa, const floatx usb ); 25 void mpf_init(floatx qom0, floatx qth0, floatx r0); 26 void mpf_mean(floatx *Ecosth, floatx *Esinth, floatx *Eome); 27 void mpf_th(floatx th1[N]); 28 29 floatx kalman_om ( const floatx isa, const floatx isb , const floatx usa, const floatx usb, const floatx th );