# Input Shaping Control of a Flexible Structure for Rest-to-Rest and Non-Rest-to-Rest Maneuvers
## 8 The Optimized ZVDD Input Shaper
### Example-1, Rest-to-Rest Example  
For the rest-to-rest example problem, the result obtained using the proposed method is presented in Figure 10.  
To perform the optimization, two sets bounds are defined as follows:  
1. Impulse amplitude constraints: \(A_{1}=A_{2}=A_{3}=0.25\).
2. Time increments constraints: \(0.1<(\epsilon_{1},\epsilon_{2},\epsilon_{3})\leq 12\).  
Figure 10: Rest-to-rest case with optimized convoluted torque. The plot units are degree (\(\theta_{1}(t)\) and \(\theta_{2}(t)\)), degree/second (\(\dot{\theta}_{1}(t)\) and \(\dot{\theta}_{2}(t)\)) and N.m (\(u(t)\)).  
Comparing the minimum-time control solution obtained using GPOPS-II in Figure 8 with the numerically optimized solution of the ZVDD shaped problem in Figure 10, it is clear that both reach a resting final state, but the proposed method significantly reduces the magnitude of the vibration of \(\theta_{1},\theta_{2}\), and \(\dot{\theta}_{2}\) during the maneuver. To visually compare the minimum time solution of GPOPS-II and the optimized shaper, an overlapped plot is generated for the four angular components and displayed using Figure 11.  
Table 3 shows a comparison between the results of four types of torque profiles: the single-switch bang-bang torque, conventional ZVDD, baseline numerically optimized using GPOPS-II, and the proposed optimized ZVDD method.  
**Remark 1**.: _For rest-to-rest and non-rest-to-rest problems (minimum time optimal control problem), the GPOPS-II optimal control software produces exact zero final states (as shown in Table 3). However, if the torque profile produced by GPOPS-II is used with the linear/nonlinear dynamics model with an ODE solver (e.g., ODE89, [[https://www.mathworks.com/help/matlab/ref/ode89.html](https://www.mathworks.com/help/matlab/ref/ode89.html)]([https://www.mathworks.com/help/matlab/ref/ode89.html](https://www.mathworks.com/help/matlab/ref/ode89.html)), (accessed on 8 January 2025)), then the result is an approximately zero final state (not an exact zero). For example, as shown in Table 3, all final values are zero using GPOPS-II but using ODE89 (using the same torque profile produced by GPOPS-II), the final state is [0.3331\({}^{o}\), 0.0483\({}^{o}\)/s, 0.0048\({}^{o}\), \(-0.0985^{o}\)/s]\({}^{T}\)._  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Parameters at Final Time** & **Bang-Bang (Figure 3)** & **ZVDD (Figure 5)** & **GPOPS-II (Figure 8)** & **Proposed Method (Figure 10)** \\ \hline \(\theta_{1}\) (deg) & \(7\times 10^{-06}\) & 0.1255 & 0 & \(-2\times 10^{-03}\) \\ \(\dot{\theta}_{1}\) (deg/s) & 1.4530 & 0 & 0 & \(-1\times 10^{-05}\) \\ \(\theta_{2}\) (deg) & 0.2517 & 0 & 0 & \(1\times 10^{-05}\) \\ \(\dot{\theta}_{2}\) (deg/s) & \(-2.9409\) & 0 & 0 & \(-1\times 10^{-04}\) \\ \hline Final Time & 31.4480 & 38.7410 & 31.5379 & 45.9951 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Summary of various test results obtained using different torque inputs for the rest-to-rest problem.  
Figure 11: Comparison of GPOPS-II minimum time control (red) and optimized ZVDD performance (black) for rest-to-rest control. The plot units are degree (\(\theta_{1}(t)\) and \(\theta_{2}(t)\)) and degree/second (\(\dot{\theta}_{1}(t)\) and \(\dot{\theta}_{2}(t)\)).