Show
Ignore:
Timestamp:
12/02/13 13:54:59 (10 years ago)
Author:
smidl
Message:

upravy rand

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/simulator_zdenek/ekf_example/mpf_double.h

    r1468 r1469  
    11// Bayesian Filtering for PMSM using Marginalized Particle Filter  
    22 
    3 #include "parametry_motoru.h" 
    4 #define Fpm 0.1989 
    5 //#define pi 3.141596 
     3//#define Fpm 0.1989 
     4#ifndef M_PI 
     5#define M_PI 3.141596 
     6#endif 
    67 
    78#define N 4 
    89 
    9 #define Lsd Ls*0.9 
    10 #define Lsq Ls 
    11 #define _dt 0.000125 
    12 #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) 
     10//#define Lsd Ls*0.9 
     11//#define Lsq Ls 
    1712 
     13#define VYBER_MODELU    0       // 0 = plny model s respektovanim Lsd/Lsq ... implicitne 
     14                                                        // 1 = parametry modelu z identifikace 
     15#define _dt     0.000125 
    1816 
    19 # define floatx float 
     17#define floatx float 
    2018 
    2119floatx qrandn(); 
     
    2826void mpf_th(floatx th1[N]); 
    2927void mpf_om(floatx om1[N]); 
     28void mpf_best( floatx *Ecosth, floatx *Esinth, floatx *Eome); 
    3029 
    3130floatx kalman_om ( const floatx isa, const floatx isb , const floatx usa, const floatx usb, const floatx th );