No BSD License  

Highlights from
GUI for the performance analysis of pedelecs

image thumbnail
from GUI for the performance analysis of pedelecs by Jan Cappelle
Modeling the behaviour of electric bicycles

Tslicesplot_ksi2(ksimodel,avail,what,T,Z,tit)
function Tslicesplot_ksi2(ksimodel,avail,what,T,Z,tit)
%vslicesplot_ksi(ksimodel,avail,what,v,Z,tit)



% make a new grid with max speed, max Torque and Speed step and Torque step
vgrid = 0:0.5:25;
Tgrid = T;
colors=['y','g','b','r'];
amodes=['ZA '
        'MAe'
        'MAn'
        'MAp'];
amodesstr=cellstr(amodes);

if max(T)>80
    errordlg(['Elements of T must be smaller than ', 80],'Bad Input','modal')
end

Xnew = ksimodel.X;
%save Xnew


ksi=ksimodel.ksi;
%save ksi

vop=[];
ksiop=[];

for i=1:length(T)
    k=1;
    j=1;
    while j<length(Xnew)
        if Xnew(j,2)==T(i)
        vop(k,i)=Xnew(j,1);
        ksiop(k,:,i)=ksi(j,:);
        j=j+1;
        k=k+1;
        else
        j=j+1;
        end
    end
end

hold on
set(text,'fontsize',14)
for i=1:length(T)
    k=round(2.5*max(T)/25*i*1/0.5);
      for j=2:4
        if what(j)==1
            if avail(j)==0
                 errordlg(['The ',amodes(j,:),' mode is not available for this pedelec'],'Bad Input','modal');
            else
                 plot(vop(:,i),100*ksiop(:,j-1,i),colors(j))
                 text(vop(k,i),100*ksiop(k,j-1,i),['\leftarrowT_{',amodes(j,:),'}= ',num2str(T(i)),'Nm'],'color',colors(j));
            end
        end
    end
end
title(tit,'fontsize',14);
ylabel('\xi [%]','rotation',0);
xlabel('Speed [km/h]');
axis([0 25 0 120]);
hold off
        %ksiop=[ksiop ksi(]


% doorsnedes per snelheid
% hold on
% for j=1:4
%         if what(j)==1
%             if avail(j)==0
%                 errordlg(['The ',amodes(j,:),' mode is not available for this pedelec'],'Bad Input','modal');
%             else
%                 plot3(Xnew(:,1),Xnew(:,2),ksi(:,j-1),'.')
%             end
%         end
% end
% hold off
%plot3(Xnew(:,1),Xnew(:,2),ksi,'.')

Contact us at files@mathworks.com