Changeset 227
- Timestamp:
- 01/12/09 13:28:20 (16 years ago)
- Location:
- pmsm
- Files:
-
- 1 added
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pmsm/CMakeLists.txt
r223 r227 27 27 EXEC (mpf_u_weight pmsmsim) 28 28 EXEC (mpf_u_delta pmsmsim) 29 EXEC (mpf_u_delta_real pmsmsim) 29 30 30 31 EXEC (sim pmsmsim) -
pmsm/mpf_test.cpp
r221 r227 50 50 51 51 vec mu0= "0.0 0.0 0.0 0.0"; 52 vec Qdiag ( "1e- 5 1e-5 0.0001 0.0001" ); //zdenek: 0.01 0.01 0.0001 0.000152 vec Qdiag ( "1e-6 1e-6 0.001 0.0001" ); //zdenek: 0.01 0.01 0.0001 0.0001 53 53 vec Rdiag ( "1e-8 1e-8" ); //var(diff(xth)) = "0.034 0.034" 54 54 chmat Q ( Qdiag ); … … 63 63 KFEp.set_est ( mu0, chmat ( zeros ( 4 ) ) ); 64 64 65 mgamma_fix evolQ ( rQ,rQ ); 65 //mgamma_fix evolQ ( rQ,rQ ); 66 migamma_fix evolQ ( rQ,rQ ); 66 67 MPF<EKF_unQ> M ( rx,rQ,evolQ,evolQ,Npart,KFEp ); 67 68 // initialize 68 evolQ.set_parameters ( 10.0, Qdiag, 1.0); //sigma = 1/10 mu69 evolQ.set_parameters ( 0.1, Qdiag, 1.0); //sigma = 1/10 mu 69 70 evolQ.condition (Qdiag ); //Zdenek default 70 epdf& pfinit=evolQ._epdf(); 71 M.set_est ( pfinit ); 72 evolQ.set_parameters ( 100.0, Qdiag, 0.99 ); //sigma = 1/10 mu 71 double xxx; 72 cout << Qdiag <<endl << "smp:"<< evolQ.samplecond(Qdiag,xxx) <<endl; 73 eigamma* pfinit=dynamic_cast<eigamma*>(evolQ._e()); 74 cout << pfinit->mean()<<endl; 75 M.set_est ( *pfinit ); 76 evolQ.set_parameters ( 0.10, Qdiag,0.995); //sigma = 1/10 mu 77 cout << Qdiag <<endl << "smp:"<< evolQ.samplecond(Qdiag,xxx) <<endl; 73 78 74 79 // … … 111 116 if (tK==3000) Qdiag(1)*=10; 112 117 if (tK==4000) Qdiag(1)/=10; 113 if (tK==5000) Qdiag(2)*=10 0;114 if (tK==6000) Qdiag(2)/=10 0;115 if (tK==7000) Qdiag(3)*=10 0;116 if (tK==8000) Qdiag(3)/=10 0;118 if (tK==5000) Qdiag(2)*=10; 119 if (tK==6000) Qdiag(2)/=10; 120 if (tK==7000) Qdiag(3)*=10; 121 if (tK==8000) Qdiag(3)/=10; 117 122 118 123 //estimator -
pmsm/simulator_zdenek/simulator.cpp
r218 r227 365 365 } 366 366 } 367 368 void pmsmsim_noreg_step(double ua, double ub) // you must link array KalmanObs[] to EKF modul 369 { 370 *us=ua; 371 *(us+1)=ub; 372 // pwm(modulace); 373 pmsm_model(5); 374 375 } 367 376 ////////////////////////////////////////////////////////////////////////////////////////////////////// 377 ////////////////////////////////////////////////////////////////////////////////////////////////////// -
pmsm/simulator_zdenek/simulator.h
r130 r227 19 19 extern void pmsmsim_set_parameters(double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0); 20 20 extern void pmsmsim_step(double Ww); 21 extern void pmsmsim_noreg_step(double ua, double ub); 21 22 22 23 extern double x[9];