Changeset 349 for applications/pmsm/Barcelona/real_pmsm.m
- Timestamp:
- 05/27/09 21:40:30 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/pmsm/Barcelona/real_pmsm.m
r346 r349 1 1 M=pmsm_estim_mex('real_mx.cfg'); 2 2 3 ids = [1:size(M. EKFMz_mean,1)];3 ids = [1:size(M.mean_EKFMz,1)]; 4 4 kftime=[ids-ids(1)]*0.000125; 5 5 … … 7 7 subplot(2,1,1); 8 8 hold off 9 plot(kftime,M. EKFMz_mean(ids,3)/2/pi);9 plot(kftime,M.mean_EKFMz(ids,3)/2/pi,'-.'); 10 10 hold on 11 plot(kftime,M.EKF_mean(ids,3)/2/pi,'r'); 11 plot(kftime,M.mean_EKF(ids,3)/2/pi,'r'); 12 13 title('Measured and estimated \omega_{me}'); 14 xlabel('time [s]') 12 15 13 16 subplot(2,1,2); 14 plot(kftime, M.EKFMz_mean(ids,5)); 17 plot(kftime, M.mean_EKFMz(ids,5)); 18 title('Estimated load T_L'); 19 15 20 16 21 % ----- 17 22 18 load ~/work/vs/Pohony/DATA_MERENI/DATA_MCU/data1.dat -ascii 23 load ~/work/vs/Pohony/DATA_MERENI/DATA_MCU/data9.dat -ascii 24 25 data=data9; 19 26 20 27 subplot(2,1,1); 21 28 setime=[0:799]*0.004666; % fitted on currents 22 plot(setime,data 13([0:799]+711,6),'--k','LineWidth',3);23 plot(setime,data13([0:799]+711,11),'--g','LineWidth',3);29 plot(setime,data([0:799]+711,6),'--k','LineWidth',3); 30 %plot(setime,data([0:799]+711,11),'--g','LineWidth',3); 24 31 %plot(setime,2*pi*data1([0:799]+620,6),'--k','LineWidth',3); 25 32 33 legend('EKF T_L estimate','EKF estimate','Sensor readings') 26 34 35 set(gca,'XLim',[0,kftime(end)])