Question: How do I get my procedure to work?

What does "Warning, `delta_Ia_con_p` is implicitly declared local to procedure `inductor_current_RMS_AVG_p`" exactly mean?

I get this, when I execute the following procedure:

# art=0 returns RMS current and art=1 returns AVG current
> inductor_current_RMS_AVG_p:=proc(Ue,Ua,Ia,L,T,art)
>
> delta_Ia_con_p:=(Ue-Ua)/L*Ua/Ue*T;
> inititial_inductor_current_con_p:=Ia-delta_Ia_con_p/2;
> initial_inductor_current_p:=piecewise(Ia<eval(IaLG_boundary_condition), 0, inititial_inductor_current_con_p);
> # initial_inductor_current_input:=initial_inductor_current;
> inductor_current_increase_p:=initial_inductor_current_p+(Ue-Ua)/L*t;
> inductor_current_decrease_p:=initial_inductor_current_p+(Ue-Ua)/L*dutycycle(Ia,L,Ua,Ue,T)*T-Ua/L*(t-dutycycle(Ia,L,Ua,Ue,T)*T);
> inductor_current_p:=piecewise(t<=dutycycle(Ia,L,Ua,Ue,T)*T, inductor_current_increase_p, (t<=T and inductor_current_decrease_p>=0), inductor_current_decrease_p, 0);
> if art=0 then
> return sqrt((1/T)*int((eval(inductor_current_p))^2, t=0..T))
> else return 1/T*int(inductor_current_p, t=0..T)
> end if
> end proc:
> # eval(inductor_current_RMS_AVG):
>
> inductor_current_RMS_at_input:=inductor_current_RMS_AVG_p(Ue_input,Ua_input,Ia_input,L_input,T_input,1);

The procedure dutycycle looks like this:

dutycycle:=proc(Ia,L,Ua,Ue,T)
> if Ia<=1/2*(Ue-Ua)/L*Ua/Ue*T
> then sqrt((Ia*2*L*Ua)/(Ue*T*(Ue-Ua)))
> else
> Ua/Ue
> end if
> end proc:
> eval(dutycycle);

By the way, when do I have to use eval(dutycycle)?

How can I get my procedure inductor_current_RMS_AVG_p to work?


Kai

P.S.: In my worksheet the variables are defined as follows:


> # --- Begin User Input: ---
> Ue_input:=1500;
> Ie_input:=20;
> Ua_input:=300;
> L_input:=0.00005;
> f_input:=80000;
> T_input:=1/f_input;
> # --- End User Input ---
>
> Ia_input:= Ue_input*Ie_input/Ua_input;
> evalf(Ia_input);

Ue_input := 1500


Ie_input := 20


Ua_input := 300


L_input := 0.00005


f_input := 80000


T_input := 1/80000


Ia_input := 100


100.


Please Wait...