- Timestamp:
- 03/14/11 09:32:33 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/simulator_zdenek/ekf_example/ekf_obj.cpp
r1245 r1294 505 505 { 506 506 // Tuning of matrix Q 507 Q[0]=prevod(.0 1,15); // 0.05507 Q[0]=prevod(.001,15); // 0.05 508 508 Q[5]=Q[0]; 509 509 Q[10]=prevod(0.0005,15); // 1e-3 510 Q[15]=prevod(0.00 1,15); // 1e-3510 Q[15]=prevod(0.0001,15); // 1e-3 511 511 512 512 Uf[0]=0x7FFF;// ! // 0.05 … … 603 603 mmultACh(PSI,Chf,PSICh,4,4); 604 604 //thorton(int16 *U, int16 *D, int16 *PSIU, int16 *Q, int16 *G, int16 *Dold, unsigned int16 dimx); 605 householder(PSICh,Q,4);606 //givens(PSICh,Q,4);605 //householder(PSICh,Q,4); 606 givens_fast(PSICh,Q,4); 607 607 // COPY 608 608 for (int16 ii=0; ii<16; ii++){Chf[ii]=PSICh[ii];} … … 629 629 //int16 xb[4]; xb[0]=x_est[0]<<2; xb[1]=x_est[1]<<2; xb[2]=x_est[2]<<2; xb[3]=x_est[3]; 630 630 631 carlson (difz,x_est,Chf,dR,2,4);631 carlson_fast(difz,x_est,Chf,dR,2,4); 632 632 //x_est[0] = xb[0]>>2; x_est[1]=xb[1]>>2; x_est[2]=xb[2]>>2; x_est[3]=xb[3]; 633 633 … … 649 649 Q[0]=prevod(.01,15); // 0.05 650 650 Q[5]=Q[0]; 651 Q[10]=prevod(0.0 1,15); // 1e-3652 Q[15]=prevod(0.0 1,15); // 1e-3651 Q[10]=prevod(0.0005,15); // 1e-3 652 Q[15]=prevod(0.001,15); // 1e-3 653 653 654 654 Chf[0]=0x3FFF;// ! // 0.05 … … 661 661 662 662 // Tuning of matrix R 663 R[0]=prevod(0. 1,15); // 0.05663 R[0]=prevod(0.05,15); // 0.05 664 664 R[3]=R[0]; 665 665