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