Revision 1469, 0.8 kB
(checked in by smidl, 11 years ago)
|
upravy rand
|
Line | |
---|
1 | // Bayesian Filtering for PMSM using Marginalized Particle Filter |
---|
2 | |
---|
3 | //#define Fpm 0.1989 |
---|
4 | #ifndef M_PI |
---|
5 | #define M_PI 3.141596 |
---|
6 | #endif |
---|
7 | |
---|
8 | #define N 4 |
---|
9 | |
---|
10 | //#define Lsd Ls*0.9 |
---|
11 | //#define Lsq Ls |
---|
12 | |
---|
13 | #define VYBER_MODELU 0 // 0 = plny model s respektovanim Lsd/Lsq ... implicitne |
---|
14 | // 1 = parametry modelu z identifikace |
---|
15 | #define _dt 0.000125 |
---|
16 | |
---|
17 | #define floatx float |
---|
18 | |
---|
19 | floatx qrandn(); |
---|
20 | floatx qrandu(); |
---|
21 | void rng_init(); |
---|
22 | |
---|
23 | void mpf_bayes ( const floatx isa, const floatx isb , const floatx usa, const floatx usb ); |
---|
24 | void mpf_init(floatx qom0, floatx qth0, floatx r0); |
---|
25 | void mpf_mean(floatx *Ecosth, floatx *Esinth, floatx *Eome); |
---|
26 | void mpf_th(floatx th1[N]); |
---|
27 | void mpf_om(floatx om1[N]); |
---|
28 | void mpf_best( floatx *Ecosth, floatx *Esinth, floatx *Eome); |
---|
29 | |
---|
30 | floatx kalman_om ( const floatx isa, const floatx isb , const floatx usa, const floatx usb, const floatx th ); |
---|