Code covered by the BSD License  

Highlights from
Logiciels temps réel

Logiciels temps réel

by

 

Real-time software concerning the domains of the signal processing, feedback and regulation

affichage.m
k=[];

Nbe=duree/te;
tinit=get_param(gcs,'simulationtime')
while(length(k)<Nbe-1)
pause(duree/10)
set_param(gcs,'SimulationCommand','WriteDataLogs') 
t=vit.time;
k=find(t>tinit);
end;
pause(5*te)
set_param(gcs,'SimulationCommand','WriteDataLogs') 
vitesse=vit.signals.values;
t=vit.time;
fl=flux.signals.values;
k=find(t>tinit);
t0=min(t(k));
figure(2)
plot(t(k)-t0,vitesse(k,2),'g')
hold on
plot(t(k)-t0,vitesse(k,1),'r')
legend('vitesse mesure','vitesse estime')
xlabel('t  (s)')    
ylabel('N  (tr/min)') 
title('VITESSES')

figure(3)
FLUX=sqrt(fl(k,1).^2+fl(k,2).^2);
plot(t(k)-t0,FLUX,'b')
hold on
title('FLUX ROTORIQUE')
xlabel('t  (s)')    
ylabel('\Psi  (Wb)') 
IDQ=idq.signals.values;
ia=IDQ(k,1);
ib=IDQ(k,2);
figure(4)
plot(t(k)-t0,ia,'b',t(k)-t0,ib,'r')
tmax=max(t(k));

Contact us