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