In[]:=
Vscc=1.5;f=0.6;​​τ1=Vscc;τ2=fVscc;τ3m=fVscc;m=10;​​PAI=0.04819277;λ=0.03150354;PSA=0.025;ni=IntegerPart[(m-τ1-τ2)/τ3m]+2;​​vti=Flatten[Append[Append[{0,τ1,τ1+τ2},Table[τ1+τ2+(i-2)τ3m,{i,3,ni}]],m]];​​F[t_]=1-Exp[-λt];​​vf={F[t]+PAI};​​Do[​​vf=Append[vf,F[t-vti[[i]]]+PSA(vf[[i-1]]/.tvti[[i]])]​​,{i,2,ni+1}];​​pwPA=Piecewise[Partition[Riffle[vf,Table[vti[[i]]⩽t<vti[[i+1]],{i,1,ni+1}]],2]];
In[]:=
pwtemp1=Piecewise[{{pwPA/.t(t-Vscc),Vscc⩽t<2Vscc},{pwPA/.t(t-fVscc),2Vscc⩽t<m}}];
In[]:=
FC1[t_]:=Count[vti,x_/;(t-Vscc)⩽x<t];​​FC2[t_]:=Count[vti,x_/;(t-fVscc)⩽x<t];​​pwtemp2[t_]:=Piecewise[{{PSA^FC1[t],Vscc⩽t<2Vscc},{PSA^FC2[t],2Vscc⩽t<m}}];
In[]:=
pwPAMV[t_]:=pwtemp1pwtemp2[t];
Plot[pwtemp1,{t,0,m},PlotRangeFull,FillingAxis,PlotTheme"Detailed"]​​NIntegrate[pwtemp1,{t,0,m}]/m​​Plot[pwPAMV[t],{t,0,m},PlotRangeFull,FillingAxis,PlotTheme"Detailed"]​​NIntegrate[pwPAMV[t],{t,0,m}]/m
Out[]=
pwtemp1
Out[]=
0.0210715
Out[]=
pwPAMV(t)
Out[]=
0.0210715