Show
Ignore:
Timestamp:
05/27/09 21:40:30 (15 years ago)
Author:
smidl
Message:

Barcelona + mex for pmsm + results of pwm experiment for off-line use with pwm.m (>> pwm(0))

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/Barcelona/real_pmsm.m

    r346 r349  
    11M=pmsm_estim_mex('real_mx.cfg'); 
    22 
    3 ids = [1:size(M.EKFMz_mean,1)]; 
     3ids = [1:size(M.mean_EKFMz,1)]; 
    44kftime=[ids-ids(1)]*0.000125; 
    55 
     
    77subplot(2,1,1); 
    88hold off 
    9 plot(kftime,M.EKFMz_mean(ids,3)/2/pi); 
     9plot(kftime,M.mean_EKFMz(ids,3)/2/pi,'-.'); 
    1010hold on 
    11 plot(kftime,M.EKF_mean(ids,3)/2/pi,'r'); 
     11plot(kftime,M.mean_EKF(ids,3)/2/pi,'r'); 
     12 
     13title('Measured and estimated \omega_{me}'); 
     14xlabel('time [s]') 
    1215 
    1316subplot(2,1,2); 
    14 plot(kftime, M.EKFMz_mean(ids,5)); 
     17plot(kftime, M.mean_EKFMz(ids,5)); 
     18title('Estimated load T_L'); 
     19 
    1520 
    1621% -----  
    1722 
    18 load ~/work/vs/Pohony/DATA_MERENI/DATA_MCU/data1.dat -ascii 
     23load ~/work/vs/Pohony/DATA_MERENI/DATA_MCU/data9.dat -ascii 
     24 
     25data=data9; 
    1926 
    2027subplot(2,1,1); 
    2128setime=[0:799]*0.004666; % fitted on currents 
    22 plot(setime,data13([0:799]+711,6),'--k','LineWidth',3); 
    23 plot(setime,data13([0:799]+711,11),'--g','LineWidth',3); 
     29plot(setime,data([0:799]+711,6),'--k','LineWidth',3); 
     30%plot(setime,data([0:799]+711,11),'--g','LineWidth',3); 
    2431%plot(setime,2*pi*data1([0:799]+620,6),'--k','LineWidth',3); 
    2532 
     33legend('EKF T_L estimate','EKF estimate','Sensor readings') 
    2634 
     35set(gca,'XLim',[0,kftime(end)])