Tag: 4 Dof

  • 4-Dof SCARA – Robot A Tutorial in MATLAB and Simulink

    The FORWARD KINEMATICS problem is Calculating the matrix T4

    KINEMATIC PARAMETER (DENAVIT HARTENBERG)

    USING MATLAB TO CALCULATE MATRIX T4

    The INVERSE KINEMATIC problem Is calculating (θ1; θ2; d3;θ4)

    code

  • 4 -Dof -Robot A Tutorial in MATLAB and Simulink

    4-DoF Robot – A Tutorial in MATLAB and Simulink

    The forward kinematics problem is Calculating the matrix T4

    Kinematic parameter (Denavit – Hartenberg)

    Θi :Angle of rotation about the Z axis

    α : Angle of rotation of the Z axis around the X axis (positive counterclockwise)

    ai : Distance between axes Z

    di:  Distance between axes Z

    General Matrix

    An=Rot(z,θ)Trans(0,0,d)Trans(a,0,0)Rot(x,α)

                          cosθ            -sinθcosα                sinθsinα             a cosθ

                           sinθ              cosθcosα             -cosθsinα            a sinθ

     An =               0                     sinα                       cosα                   d

                            0                       0                            0                       1

    Using  Mat Lab  to calculate the Matrix T4 

    T1 = [ C1   0   – S1      0;

               S1    0 – C1     0;

               0     -1   0   371;

               0     0     0       1];

    T2 = [ C2      – S2    0     505*  C2;

               S2       0      C2     505* S2;

               0         0     1                0;

               0         0     0               1];

    T3 = [ C3   -S 0 348*C3;

               S3   C3 0  348*S3;

               0     0   1           0;

               0     0   0          1];

    T4 = [ C4   -S4  0 109*C4;

               S4   C4    0 109*S4;

                0     0     1           0;

                0     0     0         1];

    T = T1*T2*T3*T4;

    cos(θ1) =C1 ; cos(θ2) =C2 ; cos(θ3) =C3 ; cos(θ4) =C4 ;

    sin(θ1) =S1; sin(θ2) =S2; sin(θ3) =S3; sin(θ4) = S4 .

    INVERSE KINEMATIC Is calculating θ1; θ23; θ4

    tan(θ1 )= Py / Px  =>

    θ1 = atan2d(Py , Px)

    Triangle O2O3O4:

    O2O42= O2O32 +O3O42   -2O2O3*O3O4  cos(1800 –θ3 )       

    cos(1800 –θ3 )    =-cos(θ3 )=    ((L2 )2 + (L3 )2 – O2O4 )/2*L2L3

    Triangle O2CO4:

    O2O42 =O2C2 + O4C2

    C234 = cos(θ234)

    S234 = sin(θ234)

    Triangle O5EO4:

    O4 E= L4 *Sin(θ234 )=L4*S234                                                                                                                 

    O5E=L4 *Cos(θ234 )=L4*C234

    O2C = OB – BC = √(〖Py〗^2+〖Px〗^2 )   – L4*C234 

    O4C = O4 E + EC =  P – d1 + L4*S234 

    C3=cos(θ3)

    C3 =[( √(〖Py〗^2+〖Px〗^2 )   – L4*C234   )2 + (P – d1 + L4*S234 ) – (L2  + L32 ) ]/2*L2*L3   ;                  

    S3=√(1-〖C3〗^2 )

    θ3 = atan2d(S3, C3)