# Input Shaping Control of a Flexible Structure for Rest-to-Rest and Non-Rest-to-Rest Maneuvers
## 3 Single Switch and ZVDD Input Shaping
### Single-Switch Reference Signal  
The proposed input shaping approach is based on the single-switch reference signal shown in Figure 2, with torque limit \(|u|\ \leq U\). Three points are labeled in the figure: point V2 is at the initial time \(t_{0}\), point V0 is at the final time \(t_{f}\), and point V1 is the switching point. The magnitude of the control is constant, with \(u(t)=-U\) being between V2 and V1, and \(u(t)=+U\) being between V1 and V0. When this input is applied to the two-body system, the linearized equations of motion (3)-(5) can be solved for the system states at the switching points:  
\[\theta_{1,v-1} = (2c_{3}^{4}\theta_{1,v}+2c_{3}^{4}t_{v,p-1}\dot{\theta}_{1,v}-2b_ {4}c_{1}u_{v}+2c_{1}c_{3}^{2}\theta_{2,v}+2b_{4}c_{1}u_{v}\cos(c_{3}t_{v,p-1} )-2c_{1}c_{3}\dot{\theta}_{2,v}\sin(c_{3}t_{v,p-1}) \tag{6}\] \[+2c_{1}c_{3}^{2}t_{v,p-1}\dot{\theta}_{2,v}-2c_{1}c_{3}^{2}\theta _{2,v}\cos(c_{3}t_{v,p-1})+b_{2}c_{3}^{4}(t_{v,p-1})^{2}u_{v}+b_{4}c_{1}c_{3}^ {2}(t_{v,p-1})^{2}u_{v})/(2c_{3}^{4})\] \[\dot{\theta}_{1,v-1} = (c_{3}^{3}\dot{\theta}_{1,v}+c_{1}c_{3}\dot{\theta}_{2,v}+b_{4}c_{ 1}c_{3}t_{v,p-1}u_{v}+b_{2}c_{3}^{3}t_{v,p-1}u_{v}\] (7) \[-c_{1}c_{3}\dot{\theta}_{2,v}\cos(c_{3}t_{v,p-1})+c_{1}c_{3}^{2} \theta_{2,v}\sin(c_{3}t_{v,p-1})-b_{4}c_{1}u_{v}\sin(c_{3}t_{v,p-1}))/(c_{3}^ {3})\] \[\theta_{2,v-1} = (c_{3}^{2}\theta_{2,v}\cos(c_{3}t_{v,p-1})+c_{3}\dot{\theta}_{2,v} \sin(c_{3}t_{v,p-1})+b_{4}u_{v}-b_{4}u_{v}\cos(c_{3}t_{v,p-1}))/(c_{3}^{2})\] (8) \[\dot{\theta}_{2,v-1} = (c_{3}\dot{\theta}_{2,v}\cos(c_{3}t_{v,p-1})-c_{3}^{2}\theta_{2,v} \sin(c_{3}t_{v,p-1})+b_{4}u_{v}\sin(c_{3}t_{v,p-1}))/(c_{3}) \tag{9}\]  
where \(v\in\{1,2\}\). In Equations (6)-(9), the \(\theta\) and \(\dot{\theta}\) terms have two subscripts; the first subscript indicates the body number (1 represents \(\mathcal{L}_{1}\); 2 represents \(\mathcal{L}_{2}\)) and the second subscript indicates the point number (\(v=2\) indicates V2, etc.). The term \(t_{v,v-1}\) represents the time interval between points \(v\) and \(v-1\). The control torque during the interval after switching point \(v\) is \(u_{v}\), where \(u_{2}=-U\) and \(u_{1}=U\). Figure 2: A simple unit amplitude bang-bang control torque. By substituting Equation (9) for the last three terms of Equation (7), a simplified expression can be found that relates the velocities of the two bodies at consecutive switching points:  
\[c_{3}^{3}\dot{\theta}_{1,v-1}=c_{3}^{3}\dot{\theta}_{1,v}+c_{1}c_{3}\dot{\theta} _{2,v}+t_{v,v-1}c_{3}(b_{4}c_{1}u_{v}+b_{2}c_{3}^{2}u_{v})-c_{1}c_{3}\dot{\theta }_{2,v-1} \tag{10}\]  
Equation (10) can be solved for \(t_{v,v-1}\), which gives a general expression for the duration of each switching interval:  
\[t_{(v)(v-1)}=\frac{(c_{3}^{2}\dot{\theta}_{1,v-1}+c_{1}\dot{\theta}_{2,v-1})-( c_{3}^{2}\dot{\theta}_{1,v}+c_{1}\dot{\theta}_{2,v})}{(b_{4}c_{1}u_{v}+b_{2}c_{3}^ {2}u_{v})} \tag{11}\]  
For the rest-to-rest problem, if the initial state is \(\theta(t_{0})=[\theta_{0},0,0,0]\), then \(\dot{\theta}_{1,2}=\theta_{2,2}=\dot{\theta}_{2,2}=0\). Likewise, if the final desired state is \(\theta(t_{f})=[0,0,0,0]\), then \(\theta_{1,0}=\dot{\theta}_{1,0}=\theta_{2,0}=\dot{\theta}_{2,0}=0\).