## 2 Materials and Methods
### Path Tracking and Control
#### 2.4.2 Feedforward Plus Feedback Controller  
The second control strategy applied intends to attain greater levels of precision when following trajectories. Feedforward controllers consider using the model of the robot's dynamics to proactively generate forces instead of waiting for errors. Inside this strategy, the controller computes the control action based on the desired position, velocity, and acceleration from the trajectory generator, and the system's dynamics [28]. In real applications, platform's dynamic analysis will not always exactly represent real-life circumstances. Moreover, some non-considered disturbances from environment dynamics and inside the mechanism may cause unwanted reactions. Because of this, adding the feedback term (such as the PD controller detailed on the previous section) will deal with all non-considered robot and environment dynamics. Hence, using a feedforward controller based on the dynamic analysis from the studied plant and adding the previous PD term should result in an improved performance for the path tracking problem faced by each limb. Additionally, the proper choice of gains \((kp,\ kd)\) will ensure exponential decay of the trajectory error. In order to make a fair comparison between these first two control strategies, proportional and derivative gains from the feedback and the feedforward plus feedback controllers will remain constant.  
Remembering that (33) presents the dynamic equation for the forces \(F_{i}\) required to actuate each limb, the new control law for the force entering the plant will be reformulated as:  
\[f_{i}=\propto F_{i}^{\prime}+\mathrm{H}; \tag{40}\]  
where \(\propto\) is the diagonal mass matrix \(D\), \(\mathrm{H}\) is the sum of the Coriolis, gravitational and Lagrange constraint matrices, and \(F_{i}^{\prime}\) is the law control from the PD controller. By expanding and solving for Equations (33) and (40), the feedback control output \(F_{i}^{\prime}\) will be defined as:  
\[\begin{array}{ll}D\ddot{d}_{i}+C\Big{(}d,\theta,\dot{\theta}_{i}\Big{)}\theta _{(1,2),i}+G\theta_{2,i}+&\lambda_{j}=\ DF_{i}^{\prime}+C\Big{(}d,\theta,\dot{ \theta}_{i}\Big{)}\theta_{(1,2),i}+G\theta_{2,i}+\ \lambda_{j}\ \therefore\\ &\ F_{i}^{\prime}=\ddot{d}_{i}.\end{array} \tag{41}\]  
Moreover, to achieve the linear error dynamics, the desired acceleration on limbs \(\ddot{d}_{iD}\) should be computed and the feedback of \(d_{i}\) and \(\dot{d}_{i}\) should be employed to compute position and velocity errors \(e\) and \(\dot{e}\). Then, by working on (41), the control action from the PD feedback controller will be defined as:  
\[\ddot{d}_{i}=\ddot{d}_{iD}+kp\cdot e_{i}(t)+kd\cdot\dot{e_{i}}(t)\ \ \text{for}\ i=1,2,3. \tag{42}\]  
With the implementation of a feedforward plus feedback controller, it is desired to find a closed loop control where the dynamic behavior of the system is anticipated. This controller should be able to compensate for the dynamics of the system in the presence of perturbations and abrupt changes by working with the accelerations attained inside the whole model. Then, by complementing actions with help of the classic PD controller, error is intended to decay while achieving a smooth performance for the forces applied to the plant. Figure 7 describes the block diagram for the implementation of the feedforward plus feedback controller.