# Adaptive Feedforward Control of a Pressure Compensated Differential Cylinder
## 6 Simulation Results  
For the simulation, a point-to-point trapezoidal velocity path generator has been used as a reference. The point-to-point path generator has previously been developed in [26]. The path generator operates in actuator space, which eliminates the effects of the non-linearities between the hydraulic cylinder strokes and the joint angles in joint space. A path has been made such that the cylinder experiences both resistive and assistive loads in both directions of motion. The references for position and velocity are shown in Figure 15. The adaptation gain \(\gamma\) is different for the two controllers, due to the use of \(\text{sign}(x)\), and has been experimentally set to \(\gamma=200\text{ s}\cdot\text{m}^{-3}\) for the MIT-rule feedforward, and \(\gamma=0.1\text{ m}^{-1}\) for the sign-sign feedforward. The unit is adapted accordingly to obtain the correct output. The position error for the MIT-rule feedforward simulation is shown in Figure 16. The position error decreases towards a bounded error of \(\pm 6\text{ mm}\), which is shown with the dashed lines. The RMS error after convergence is \(1.6\text{ mm}\), showing high performance. The states \(z_{ff}\) for the MIT-rule feedforward simulation are shown in Figure 17. The dashed lines show the theoretical values for a fixed feedforward gain. The states converge to values slightly larger than the theoretical ones. This small discrepancy can be attributed to the constant velocity reference and ramped position reference. When moving with a ramp position reference, there will always be a small constant position error without an integrator in the position controller. Having a slightly larger feedforward gain helps reducing this constant position error by giving the cylinder a small velocity boost. Since the position error is measured, the adaptive controller is able to adapt the feedforward gains to minimize the position error. Figure 14: Differential sign-sign adaptive feedforward. Figure 18 shows the control signals \(u_{ff}\) and \(u_{fb}\) from the feedforward and feedback controller, respectively. Given that the total control signal \(u=u_{fb}+u_{ff}\), it can be seen that the contribution from the feedforward controller clearly dominates, providing more than 95% at steady state. Figure 16: Cylinder position error during MIT-rule feedforward simulation, \(\gamma=200\;\mathrm{s}\cdot\mathrm{m}^{-3}\). Figure 17: Feedforward states during MIT-rule feedforward simulation, \(\gamma=200\;\mathrm{s}\cdot\mathrm{m}^{-3}\). Figure 15: Point-to-point path references for simulation. (**a**) Position reference; (**b**) Velocity reference. The position error for the sign-sign feedforward simulation is shown in Figure 19. The same bounded error of \(\pm 6\) mm is shown with the dashed lines. The RMS error after convergence is 2.1 mm. The states \(z_{ff}\) for the sign-sign feedforward simulation are shown in Figure 20. The dashed lines show the theoretical values for a fixed feedforward gain. The same results can be seen here as with the MIT-rule, the states converge to values slightly larger than the theoretical ones, although convergence is slower with 700 s compared to 400 s.  
Figure 19: Cylinder position error during sign-sign feedforward simulation, \(\gamma=0.1\) m\({}^{-1}\). Figure 16.0 Feedforward states during sign-sign feedforward simulation, \(\gamma=0.1\) m\({}^{-1}\). To show the difference in performance between the fixed gain controller and the adaptive controllers, a simulation with fixed gain feedforward has been made and compared with the MIT-rule feedforward at a simulation time where the states \(z_{ff}\) have converged, at \(t=800\) s. This is shown in Figure 16.1 It can be seen that the position error for the MIT-rule feedforward is lower compared to the fixed gain feedforward, showing that the MIT-rule feedforward controller outperforms the fixed gain controller even with an ideal model with correlation between cylinder velocity and feedforward gain.