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

vslicesplot_ksi(ksimodel,avail,what,v,Z,tit)
function vslicesplot_ksi(ksimodel,avail,what,v,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 = v;
Tgrid = 0:0.5:80;


Xnew = ksimodel.X;
ksi=ksimodel.ksi;


% doorsnedes per snelheid



colors=['y','g','b','r'];
amodes=['ZA '
        'MAe'
        'MAn'
        'MAp'];
amodesstr=cellstr(amodes);

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


for i=1:length(vgrid)
                Tslice(:,i)=Xnew((i-1)*length(Tgrid)+1:i*length(Tgrid),2);
                vslice(:,i)=Xnew((i-1)*length(Tgrid)+1:i*length(Tgrid),1);
                for j=2:4
                 ksislice(:,i,j-1)=100*ksi((i-1)*length(Tgrid)+1:i*length(Tgrid),j-1);
                end
end

hold on
set(text,'fontsize',14)
for i=1:length(v);
    k=round(2.5*max(Tslice)/max(v)*i*1/0.5);
    l=round(k);
    %index=v(i)*1/deltav+1;
    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
                plot(Tslice(:,i),ksislice(:,i,j-1),colors(j))
                text(Tslice(k,i),ksislice(k,i,j-1),['\leftarrowv_{',amodes(j,:),'}= ',num2str(v(i)),'km/h'],'color',colors(j));
                %text(Tslice(k,i),Fslice(k,i,j),['\leftarrowv_{',amodes(j,:),'}= ',num2str(vslice(1,i)),'km/h'],'color',colors(j));
            end
        end
    end
end
title(tit,'fontsize',14);
ylabel('\xi [%]','rotation',0);
xlabel('Torque [Nm]');
%vektor(i,:)=[tekstZA(i) tekstMAp(i) titel(i) x(i) y(i)];
%set(vektor(k,:),'fontsize',14);
axis([0 80 0 100]);
hold off
end

% 

Contact us at files@mathworks.com