Cardano joint

Fixed unit vectors:

i={1,0,0};
j={0,1,0};
k={0,0,1};

Rotation matrices:

rot1[θ_]=RotationMatrix[θ,i]

rot1[θ]//MatrixForm

rot2[θ_]=RotationMatrix[θ,j]

rot2[θ]//MatrixForm

rot3[θ_]=RotationMatrix[θ,k]

rot3[θ]//MatrixForm

Other fixed unit vectors:

λ[α_]=rot3[α].i       (* output shaft *)

Rotating unit vectors (Cardano joint):

a[φ1_]=rot1[φ1].k

b[α_,φ3_]=rot3[α].(rot1[φ3].j)

b[α,φ3]//MatrixForm

Orthogonality provides the relationship between I/O angles:

position[α_,φ1_,φ3_]=a[φ1].b[α,φ3]    (* scalar product *)

-Cos[α] Cos[φ3] Sin[φ1]+Cos[φ1] Sin[φ3];

positioncompact[α_,φ1_,φ3_]=((position[α,φ1,φ3]/Cos[φ3])/Cos[φ1])//Simplify

-Cos[α] Tan[φ1]+Tan[φ3];

Angular speeds (time differentiation):

velocity=D[position[α,φ1[t],φ3[t]]==0,t]//Simplify

velocitycompact=D[positioncompact[α,φ1[t],φ3[t]]==0,t]//Simplify

Cos[α] ((Sec[φ1[t]])^2) (φ1)'[t]==((Sec[φ3[t]])^2) (φ3)'[t];

Getting an explicit relationship:

expl=Solve[{velocity,position[α,φ1[t],φ3[t]]==0},{φ3[t],φ3'[t]}]//Simplify

explcompact=Solve[{velocitycompact,position[α,φ1[t],φ3[t]]==0},{φ3[t],φ3'[t]}]

solution=expl[[1,1]]

link=φ3'[t]/. solution

D[link,t]//Simplify

Approximate solution:

Series[((Cos[α] (φ1)'[t])/(((Cos[φ1[t]])^2)+((Cos[α])^2) ((Sin[φ1[t]])^2))) ,{α,0,2}]//Simplify

((Cos[φ1[t]])^2)+((Cos[α])^2) ((Sin[φ1[t]])^2)-(1-((Sin[φ1[t]])^2)((Sin[α])^2))//Simplify

Ratio between angular speeds:

τ[α_,φ1_]=((Cos[α] )/(((Cos[φ1])^2)+((Cos[α])^2) ((Sin[φ1])^2)))

Approximate ratio between angular speeds:

τapprox[α_,φ1_]=1-(1/2) (Cos[2 φ1] ) (α^2)

τapprox[α_,φ1_,2]=Normal[Series[((Cos[α] )/(((Cos[φ1])^2)+((Cos[α])^2) ((Sin[φ1])^2))) ,{α,0,2}]]//Simplify

τapprox[α_,φ1_,4]=Normal[Series[((Cos[α] )/(((Cos[φ1])^2)+((Cos[α])^2) ((Sin[φ1])^2))) ,{α,0,4}]]//Simplify

From speeds to angles:

φφ3[α_,φ1_]=Integrate[τ[α,φ1],φ1]

φφ3[α_,φ1_]=ArcTan[-((Cos[φ1])/(Sqrt[((Cos[φ1])^2)+((Cos[α])^2) ((Sin[φ1])^2)])),       -((Cos[α] Sin[φ1])/(Sqrt[((Cos[φ1])^2)+((Cos[α])^2) ((Sin[φ1])^2)]))]

Acceleration:

accel[α_,φ1_]=(D[τ[α,φ1[t]],t]//Simplify)/.{φ1'[t]->1,φ1[t]->φ1}

Manipulate[Module[{},
bc=10;

spider1={Green,Cylinder[{{0,-bc,0},{0,bc,0}}]};
bearing1a={Yellow,Cylinder[{{0,bc-1.4,0},{0,bc+1,0}},1.7]};
bearing1b={Yellow,Cylinder[{{0,-bc-1,0},{0,-bc+1.4,0}},1.7]};

spider2=Cylinder[{{0,0,-bc},{0,0,bc}}];
bearing2a={Yellow,Cylinder[{{0,0,bc-1.4},{0,0,bc+1}},1.7]};
bearing2b={Yellow,Cylinder[{{0,0,-bc-1},{0,0,-bc+1.4}},1.7]};

r1={RGBColor[0.3,0.6,1],ParametricPlot3D[{Cos[t] (bc+Cos[u]),Sin[t] (bc+Cos[u]),Sin[u]},{t,-Pi/2,Pi/2},{u,0,2Pi},Mesh->None][[1]]};
r2=Rotate[Rotate[r1,Pi/2,{1,0,0}],Pi,{0,0,1}];

shaft1={RGBColor[0.2,0.5,0.3],Cylinder[{{bc,0,0},{1.5bc,0,0}}]};
shaft2={Red,Cylinder[{{-bc,0,0},{-2bc,0,0}}]};

axis1=Line[{{-0bc,0,0},{bc,0,0}}];
axis2={Red,Line[{{-bc,0,0},{0bc,0,0}}]};

(*par2=ParametricPlot3D[bc{ 0,Cos[x],Sin[x]},{x,0,2Pi},PlotStyle->Dashed][[1]];
par1=ParametricPlot3D[bc{ 0,Cos[x],Sin[x]},{x,0,2Pi},PlotStyle->{Dashed,Green}][[1]];*)

ivec={Red,Arrow[{{0,0,0},ii*20i}]};
kvec=Arrow[{{0,0,0},kk*20k}];
λvec={RGBColor[0.2,0.5,0.3],Arrow[{{0,0,0},λλ*20λ[α Degree]}]};
avec={Blue,Arrow[{{0,0,0},aa*20a[0]}]};
bvec={Darker[Green],Arrow[{{0,0,0},-bb*20b[α Degree,0]}]};

rotaz2=Rotate[{spider2,bearing2a,bearing2b,r2,shaft2,axis2,avec},θ,{1,0,0}];
rotaz1=Rotate[{Rotate[{spider1,bearing1a,bearing1b,r1,shaft1,axis1},α Degree,{0,0,1}],bvec,λvec},θ,{1,Tan[α Degree],0}];

Column[{
Graphics3D[{Thick,ivec,kvec,rotaz2,rotaz1},
ViewAngle->Pi/14,
ImageSize->1.2{500,400},
SphericalRegion->False,
Boxed->False,
PlotRange->25{{-1,1},{-1,1},{-1,1}}],

Row[{Show[{Plot[{τ[α Degree,φ ](*,
τapprox[α Degree,φ ,2],
τapprox[α Degree,φ ,4]*)},{φ,0,2Pi},
PlotRange->{0,2},
ImageSize->400,
PlotStyle->Thick,
AxesStyle->Large,
AxesLabel->{"(Subscript[φ, 1])","τ"}],

Graphics[{PointSize[0.0431],Point[{θ,τ[α Degree,θ]}]}]
}],

Show[{Plot[accel[α Degree,φ ],{φ,0,2Pi},
PlotRange->{-3,3},
ImageSize->400,
PlotStyle->Thick,
AxesStyle->Large,
AxesLabel->{"(Subscript[φ, 1])","(OverDot[τ])"}],

Graphics[{PointSize[0.0431],Point[{θ,accel[α Degree,θ]}]}]
}],

Show[{Plot[φφ3[α Degree,φ ]+Pi,{φ,0,2Pi},
PlotRange->{0,2Pi},
ImageSize->400,
PlotStyle->Thick,
AxesStyle->Large,
AxesLabel->{"(Subscript[φ, 1])","(Subscript[φ, 3])"}],

Graphics[{PointSize[0.0431],Point[{θ,φφ3[α Degree,θ]+Pi}]}]
}]
}]



}]


],

{{ii,0},{0,1}},
{{λλ,0},{0,1}},
{{kk,0},{0,1}},
Delimiter,
{{aa,0},{0,1}},
{{bb,0},{0,1}},
Delimiter,
{{α,20,"α"},0,60,Appearance->"Open"},
Delimiter,
{{θ,0.2,"(Subscript[φ, 1])"},0,2Pi,Appearance->"Open",AnimationRate->0.041},
(*TrackedSymbols:>Manipulate,*)ControlPlacement->Right,
SaveDefinitions->True]