Revision 1381, 0.5 kB
(checked in by smidl, 13 years ago)
|
simulator
|
Line | |
---|
1 | // Bayesian Filtering for PMSM using Marginalized Particle Filter |
---|
2 | |
---|
3 | #include "parametry_motoru.h" |
---|
4 | |
---|
5 | #define N 20 |
---|
6 | |
---|
7 | #define Lsd Ls*1.1 |
---|
8 | #define Lsq Ls |
---|
9 | #define _dt 0.000125 |
---|
10 | #define _ad Rs*_dt/Lsd |
---|
11 | #define _aq Rs*_dt/Lsq |
---|
12 | #define _b Fmag/Lsq*_dt |
---|
13 | #define _cd _dt/Lsd |
---|
14 | #define _cq _dt/Lsq |
---|
15 | |
---|
16 | double randn(); |
---|
17 | double randu(); |
---|
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]); |
---|