ModelisationMaple.mw

> #http://www.totofweb.net/robots-projet-55.html
restart;
 

> with(inttrans):
 

Modélisation du moteur 

> #Fonctions de transfert associées à U et Cr (voir document PDF)
Hm:=solve(((laplace(U*Heaviside(t),t,p)-Ke*OmegaM)*Kc/(R+L*p))/(J*p)=OmegaM,OmegaM)/laplace(U*Heaviside(t),t,p);
Gm:=solve(((laplace(U*Heaviside(t),t,p)-Ke*OmegaM)*Kc/(R+L*p)-Kcr*OmegaM)/(J*p)=OmegaM,OmegaM)/laplace(U*Heaviside(t),t,p);
 

(Typesetting:-mprintslash)([Hm := Kc/(Ke*Kc+J*p*R+J*p^2*L)], [Kc/(Ke*Kc+J*p*R+J*p^2*L)]) 

(Typesetting:-mprintslash)([Gm := Kc/(Ke*Kc+Kcr*R+Kcr*L*p+J*p*R+J*p^2*L)], [Kc/(Ke*Kc+Kcr*R+Kcr*L*p+J*p*R+J*p^2*L)]) 

> f:=laplace(U*Heaviside(t),t,p)*Hm;  # Sans couple résistant
 

(Typesetting:-mprintslash)([f := U*Kc/(p*(Ke*Kc+J*p*R+J*p^2*L))], [U*Kc/(p*(Ke*Kc+J*p*R+J*p^2*L))]) 

> F:=simplify(invlaplace(f,p,t)):
 

> #Applications numériques d'un moteur Maxon
Ke := 0.0603:
Kc := 0.0603:
Kcr:= 0.01:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
U  := 12:
 

> #Valeur finale
Vf:=evalf(limit(F,t=infinity)); #=evalf(limit(p*f,p=0))=U/Ke
 

(Typesetting:-mprintslash)([Vf := 199.0049752], [199.0049752]) 

> #Courbe d'évolution
plot([Vf,F(t)],t=0..0.5,gridlines,thickness=[1,2],color=[blue,red]);
 

Plot 

> #RAZ des applications numériques
Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
U  := 'U':
 

Asservissement en vitesse 

Correction type P 

> Hp:=Kp->solve((laplace(OmegaC*Heaviside(t),t,p)-OmegaM)*Kp*Hm=OmegaM,OmegaM)/laplace(OmegaC*Heaviside(t),t,p):
 

> Fp:=Kp->simplify(invlaplace(Hp(Kp)*laplace(OmegaC*Heaviside(t),t,p),p,t)):
Up:=Kp->simplify(invlaplace(Hp(Kp)*laplace(OmegaC*Heaviside(t),t,p)/Hm,p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
OmegaC:=200:
 

> plot([OmegaC,Fp(0.2),Fp(0.5),Fp(1),Fp(2),Fp(5)],t=0..0.04,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Up(0.2),Up(0.5),Up(1),Up(2),Up(5)],t=0..0.04,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Courbes montrant l'apparition d'oscillations
plot([OmegaC,Fp(5),Fp(20),Fp(50)],t=0..0.005,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Up(5),Up(20),Up(50)],t=0..0.005,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Courbes ne dépassant pas les valeurs maximales
plot([OmegaC,Fp(0.05),Fp(0.1),Fp(0.15)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Up(0.05),Up(0.1),Up(0.15)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
OmegaC:='OmegaC':
 

Correction type PI 

> Hpi:=(Kp,Ki)->solve((laplace(OmegaC*Heaviside(t),t,p)-OmegaM)*(Kp+Ki/p)*Hm=OmegaM,OmegaM)/laplace(OmegaC*Heaviside(t),t,p):
 

> Fpi:=(Kp,Ki)->simplify(invlaplace(Hpi(Kp,Ki)*laplace(OmegaC*Heaviside(t),t,p),p,t)):
Upi:=(Kp,Ki)->simplify(invlaplace(Hpi(Kp,Ki)*laplace(OmegaC*Heaviside(t),t,p)/Hm,p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
OmegaC:=200:
 

> #courbes d'évolution et tensions correspondantes
plot([OmegaC,Fpi(1,0),Fpi(1,100),Fpi(1,320),Fpi(1,1000)],t=0..0.05,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Upi(1,0),Upi(1,320),Upi(1,100),Upi(1,1000)],t=0..0.05,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #valeurs ne dépassant par la zone limite d'endommagement
plot([OmegaC,Fpi(0.15,0),Fpi(0.15,2),Fpi(0.15,4),Fpi(0.15,8)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Upi(0.15,0),Upi(0.15,2),Upi(0.15,4),Upi(0.15,8)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
OmegaC:='OmegaC':
 

Correction type PID 

> Hpid:=(Kp,Ki,Kd)->solve((laplace(OmegaC*Heaviside(t),t,p)-OmegaM)*(Kp+Ki/p+p*Kd)*Hm=OmegaM,OmegaM)/laplace(OmegaC*Heaviside(t),t,p):
 

> Fpid:=(Kp,Ki,Kd)->simplify(invlaplace(Hpid(Kp,Ki,Kd)*laplace(OmegaC*Heaviside(t),t,p),p,t)):
Upid:=(Kp,Ki,Kd)->simplify(invlaplace(Hpid(Kp,Ki,Kd)*laplace(OmegaC*Heaviside(t),t,p)/Hm,p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
OmegaC:=200:
 

> #Courbes respectant la zone de fonctionnement normale du moteur
#elles peuvent sembler aberrantes, mais c'est en fait le résultat de la discontinuité de la dérivée de l'erreur en 0
plot([OmegaC,Fpid(0.15,8,0),Fpid(0.15,8,0.01)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
plot([Ke*OmegaC,Upid(0.15,8,0),Upid(0.15,8,0.01)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
OmegaC:='OmegaC':
 

Récapitulation 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
OmegaC:=200:
 

> plot([OmegaC,F(t),Fp(0.15),Fpi(0.15,4)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
 

Plot 

Asservissement en position 

Correction type P 

> Hp:=Kp->solve((laplace(ThetaC*Heaviside(t),t,p)-ThetaM)*Kp*Hm/p=ThetaM,ThetaM)/laplace(ThetaC*Heaviside(t),t,p):
 

> Fp:=Kp->simplify(invlaplace(Hp(Kp)*laplace(ThetaC*Heaviside(t),t,p),p,t)):
Up:=Kp->simplify(invlaplace(Hp(Kp)*laplace(ThetaC*Heaviside(t),t,p)/(Hm/p),p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
ThetaC:=300:
 

> #L'erreur statique est nulle même en P car les frottements secs n'ont pas été modélisés (impossible de faire la transformée de Laplace)
plot([ThetaC,Fp(0.1),Fp(0.2),Fp(0.5),Fp(1),Fp(2),Fp(5)],t=0..0.5,axis=[gridlines=[10, color=grey]]);
plot([0,Up(0.1),Up(0.2),Up(0.5),Up(1),Up(2),Up(5)],t=0..0.5,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Valeurs ne dépassant pas la zone limite du moteur
plot([ThetaC,Fp(0.02),Fp(0.05),Fp(0.1)],t=0..7,axis=[gridlines=[10, color=grey]]);
plot([0,Up(0.02),Up(0.05),Up(0.1)],t=0..7,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Apparition d'oscillations
plot([ThetaC,Fp(50),Fp(183),Fp(250)],t=0..0.15,axis=[gridlines=[10, color=grey]]);
 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
ThetaC:='ThetaC':
 

Correction type PI 

> Hpi:=(Kp,Ki)->solve((laplace(ThetaC*Heaviside(t),t,p)-ThetaM)*(Kp+Ki/p)*Hm/p=ThetaM,ThetaM)/laplace(ThetaC*Heaviside(t),t,p):
 

> Fpi:=(Kp,Ki)->simplify(invlaplace(Hpi(Kp,Ki)*laplace(ThetaC*Heaviside(t),t,p),p,t)):
Upi:=(Kp,Ki)->simplify(invlaplace(Hpi(Kp,Ki)*laplace(ThetaC*Heaviside(t),t,p)/(Hm/p),p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
ThetaC:=300:
 

> plot([ThetaC,Fpi(0.1,0),Fpi(0.1,0.02),Fpi(0.1,0.1),Fpi(0.1,0.2)],t=0..7,axis=[gridlines=[10, color=grey]]);
plot([0,Upi(0.1,0),Upi(0.1,0.02),Upi(0.1,0.1),Upi(0.1,0.2)],t=0..7,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Valeurs restant dans la zone de fonctionnement normal du moteur
plot([ThetaC,Fpi(0.1,0),Fpi(0.1,0.01)],t=0..7,axis=[gridlines=[10, color=grey]]);
plot([0,Upi(0.1,0),Upi(0.1,0.01)],t=0..3,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
ThetaC:='ThetaC':
 

Correction type PID 

> Hpid:=(Kp,Ki,Kd)->solve((laplace(ThetaC*Heaviside(t),t,p)-ThetaM)*(Kp+Ki/p+p*Kd)*Hm/p=ThetaM,ThetaM)/laplace(ThetaC*Heaviside(t),t,p):
 

> Fpid:=(Kp,Ki,Kd)->simplify(invlaplace(Hpid(Kp,Ki,Kd)*laplace(ThetaC*Heaviside(t),t,p),p,t)):
Upid:=(Kp,Ki,Kd)->simplify(invlaplace(Hpid(Kp,Ki,Kd)*laplace(ThetaC*Heaviside(t),t,p)/(Hm/p),p,t)):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
ThetaC:=300:
 

> plot([ThetaC,Fpid(0.05*183,0.1/(0.5*0.132/5),5*0.132/5)],t=0..1,axis=[gridlines=[10, color=grey]]);
plot([0,Upid(0.05*183,0.1/(0.5*0.132/5),5*0.132/5)],t=0..1,axis=[gridlines=[10, color=grey]]);
 

Plot 

Plot 

> #Valeurs ne dépassant pas de la zone normale du moteur
plot([ThetaC,Fpid(0.1,0,0),Fpid(0.08,0.01,0)],t=0..7,axis=[gridlines=[10, color=grey]]);
 

Plot 

> Ke := 'Ke':
Kc := 'Kc':
R  := 'R':
J  := 'J':
L  := 'L':
ThetaC:='ThetaC':
 

Résultat final 

> Hpid:=(Kp,Ki,Kd)->solve((laplace(ThetaC*Heaviside(t),t,p)-ThetaM)*(Kp+Ki/p+p*Kd)*Hm/p=ThetaM,ThetaM)/laplace(ThetaC*Heaviside(t),t,p):
 

> Fpid:=(Kp,Ki,Kd)->invlaplace(Hpid(Kp,Ki,Kd)*laplace(ThetaC*Heaviside(t),t,p),p,t):
Upid:=(Kp,Ki,Kd)->invlaplace(Hpid(Kp,Ki,Kd)*laplace(ThetaC*Heaviside(t),t,p)/Hm,p,t):
 

> Ke := 0.0603:
Kc := 0.0603:
R  := 1.91:
J  := 10^(-4):
L  := 0.63*10^(-3):
ThetaC:=300:
 

> plot([ThetaC,Fpid(183,0,0)],t=0..0.2,axis=[gridlines=[10, color=grey]]);
Kplim:=183: Tosc:=0.183/7:
 

Plot 

> plot([ThetaC,Fpid(0.6*Kplim,1/(0.5*Tosc),0.125*Tosc)],t=0..0.05,axis=[gridlines=[10, color=grey]]);
 

Plot 

>