## 2 Mathematical Modelling
### Dynamics  
Manipulator dynamics is the study of the equations governing motion, in particular how the manipulator responds to torques exerted by its actuators or external forces. There are different methods for solving the dynamics of flexible manipulators, as discussed in the introduction. The Euler-Lagrange method with lumped parameters is a good choice for modeling a manipulator with flexible links for several reasons. First, the Euler-Lagrange method is known for its simplicity and accuracy in describing the complex mechanical systems dynamics. It allows the lumped parameters inclusion, which simplifies the representation of distributed parameters in flexible links and facilitates accurate modeling of real-world scenarios. It provides a comprehensive framework to accurately capture the dynamic behavior of the manipulator. Unlike decoupling methods that simplify the system by treating each link independently, the Euler-Lagrange method takes into account the interactions between all links, resulting in a more realistic representation. In addition, the equivalent rigid-link method, the Euler-Bernoulli method, and the assumed mode method may not be suitable for complex manipulator systems due to their limitations in capturing higher-order modes and non-linearities. The finite element method offers high accuracy but can be computationally intensive, making it less efficient for real-time simulations. The Hamilton method, the Newton-Euler method, and the pseudo-rigid body method also have their own advantages, but the Euler-Lagrange method balance between computational efficiency and accuracy. The Timoshenko beam theory method focuses primarily on beam deformations, which limits its applicability to manipulator systems with other types of deformations. Finally, when modeled for control purposes, the Euler-Lagrange method is compatible with various control strategies, such as PID controllers or advanced techniques like optimal control, which makes it suitable for practical applications. Therefore, the Euler-Lagrange method with lumped parameters proves to be advantageous as it provides an accurate and efficient approach to modeling manipulators with flexible links. A model with lumped parameters for a flexible link is a mathematical model used to signify the performance of a flexible link in a robotic or mechanical system. It approximates the flexible link as a series of discrete elements, each of which is represented by a lumped parameter such as mass, damping, or stiffness coefficient. This model is useful for predicting the flexible link behavior under varying operating conditions. In this model, it is assumed that the lumped parameter for the flexibility of the link is represented by a spring and a damper at each joint and the mass at the links' center of gravity. To derive the 3 DOF manipulator with flexible links dynamic model applying the Euler-Lagrange technique with lumped parameters, the system parameters are defined, including the mass and inertia, the length, and the distance from the joint to the center of mass of each link. These parameters correspond to those of the test rig. The stiffness coefficients of the flexible links are determined experimentally, and the damping coefficient is assumed. For each link, the center of mass and the second moment of inertia I are calculated by accurately drawing the parts in SOLIDWORKS 2020 with the defined materials used in the test rig. The products of the inertia terms are assumed to be zero as they are relatively small compared to the principal terms. The characteristics of the motors are neglected to reduce the model complexity, and the weight of the motor is added as a part of the link. Link 2 assembly using SOLIDWORK and sectional view of the VSL are shown in Figure 2.  
For the 3 DOF manipulator, three generalized coordinates \((q_{1},q_{2},q_{3})\) can be defined to represent the joint angles, and three generalized velocities \((\dot{q}_{1},\dot{q}_{2},\dot{q}_{3})\) to represent the joint angular velocities.