This repository contains the development and execution of an academic project for the servomechanisms class, which consists of the design and validation in simulation of a 2R mechanism controlled to follow a 4-leaf stylized cloverleaf trajectory.
- One fixed base and two movable links. The movement must be in a vertical plane.
- Two motorized joints, both of Rotational (R) type.
- The test trajectory is measured at the distal end of the second link. The trajectory has the shape of a "four-leaf clover with stylized outline", as shown in the previous figure. For the case
$L_{min}=15\ cm$ . - The desired trajectory and the path should be plotted from a computer, preferably in real time and should allow for scaling up to a factor of
$1.3$ and rotation of$\pm90\degree$ . - At the start of the movement the mechanism (retracted) should be at most half the height of the "Stylized Clover" and to the left of the square in which it is circumscribed.
- The speed with which the trajectory is traversed is assumed to be constant. It is considered to be between
$1\frac{cm}{s}$ and$10\frac{cm}{s}$ . - After an approach stage, the servomechanism should automatically follow the motion profiles by traversing the stylized clover for several cycles (up to 10) in a fast and precise way.
Considering the following dc motor model with fixed magnetic field (coil generated or with permanent magnet).
This model is derived from physical principles
- Newton's second law
- 's law (
$\phi=kte$ )
- Kirchhoff's current law
- 's law
Unifying these equations, the following block diagram can be obtained
Considering the following model of a DC motor with fixed magnetic field (coil-generated or permanent magnet).
This model will be used for the mechanism motors, which will move each of the rotational joints to reach a required position.
The inertia of second block is the motor inertia plus the inertia of the mechanism. To calculate the total inertia, we need to know the inertia of the motor (provided by manufacturer) and the inertia of the links.
The motors can be modeled with the Simulink transfer fcn
block and the function described above, or another option is to use Simscape Driveline with a controlled dc source voltage and DC motor
block.
Taking into account the above, the final end of the mechanism is in:
The development of these equations is in the forward kinematics function.
Using the law of cosines, we find that:
For this project only the elbow down configuration is considered, but an elbow up solution is not ruled out.
The development of these equations is in the inverse kinematics function.