maple1




exercice 1 double masses
> with(inttrans):eqn1 := alpha*m*diff(x[1](t),t$2) = k*(x[2](t) - x[1](t)) + u(t);
> eqn2 := m*diff(x[2](t),t$2) = k*(x[1](t) - x[2](t));
> e1l := laplace(eqn1,t,s);
> Ics := {x[1](0) = 0, D(x[1])(0) = 0, x[2](0) = 1, D(x[2])(0) = 0};
> E1l := subs(Ics,e1l);
> e2l := laplace(eqn2,t,s);
> E2l := subs(Ics,e2l);
> ans := solve({E1l,E2l},map(laplace,{x[1](t),x[2](t)},t,s));
> Ans := subs(m=1,k=1,u(t) =Dirac(t),ans) ;
> impulse_response :=invlaplace(Ans,s,t);
> plot(subs(impulse_response,alpha=10,{x[1](t),x[2](t)}),t=0..10);
> map(x -> lhs(x) = int(rhs(x),t),impulse_response);
> step_response:=%:
> plot(subs(step_response,alpha=10,{x[1](t),x[2](t)}),t=0..10);
> e1 := diff(x1(t),t) = x2(t);
> e2 := diff(x2(t),t) = -k/(m*alpha)*x1(t) + k/(m*alpha)*x3(t) + u(t)/(m*alpha) ;
> e3 := diff(x3(t),t) = x4(t); e4 := diff(x4(t),t) = k/m*x1(t) - k/m*x3(t);
> eqn_list:= {seq(e||n,n=1..4)}; var_list := {seq(evaln(x||n)(t),n=1..4)};
> ics :={x1(0)=0,x2(0)=0,x4(0)=0,x3(0)=1} ; # initial length of sprign = 1
> dsolve(subs(u(t) =1, eqn_list union ics), var_list); # try a step - no good
> map(laplace,eqn_list ,t,s); # try laplace again
> subs(ics, %);
> solve(%%,map(laplace,var_list,t,s));
> subs(u(t)=Dirac(t),%);
> I_response := eval(%);
> invlaplace(%,s,t);
> ans:= subs(ics,%);
> plot(subs(ans,m=1,k=1,alpha=10,{x3(t),x1(t)}),t=0..10);

MOBILISONS NOUS POUR LE DEVELOPPEMENT DE SARGHINE EN AIDANT L'ASSOCIATION AMSIRAR.

Créer un site gratuit avec e-monsite - Signaler un contenu illicite sur ce site

×