# Modified Smith Input-Shaper Crane-Controller for Position Control and Sway Reduction
## 3 Control Structures for Controlling a Cargo Transfer  
The crane control system is tasked with the complex challenge of simultaneously positioning the cargo and reducing its sway. With only one control input, the system's design is a formidable puzzle. Decoupling these tasks to meet a given percentage is the intellectual challenge at hand. The position controller is used to accomplish the positioning task, which is usually realized with a linear PD controller. The position control loop is shown in Figure 2.  
The PD position controller is implemented by the equation  
\[ \begin{split} G_{PD}\Big{(}q^{-1}\Big{)}=&\frac{K_{D }+K_{P}\Big{(}T_{st}+T_{f}\Big{)}}{\Big{(}T_{st}+T_{f}\Big{)}-T_{f}q^{-1}}\\ &-\frac{\Big{(}K_{P}T_{f}+K_{D}\Big{)}q^{-1}}{\Big{(}T_{st}+T_{f }\Big{)}-T_{f}q^{-1}}\end{split}  \tag{14}\]  
where \(K_{P}\) is proportional gain, \(K_{D}=K_{P}T_{D}\) is derivative gain, \(T_{f}=T_{D}/N\) is the derivative filter constant, \(T_{st}\) is sample time, and \(q^{-1}\) is the backward shift operator. This position control system is configured to produce the control signal, bringing the cargo to the desired position with the minimum time. According to the optimal control for the positioning, the control signal that will position the cargo with minimum time is given by bang-bang control [37], which is achieved here using the PD controller. However,  
Figure 2: Position control without sway reduction. this bang-bang control will give the maximum acceleration and deceleration of the cargo, producing the maximum sway angles. The position control system of the crane cart, without the sway reduction algorithm, is not commonly used in practice. However, it is included in this paper to estimate the sway that would occur in its absence. This analysis is crucial in determining the percentage reduction in sway that can be achieved by the proposed control algorithm, underlining its importance and potential impact. In real-world applications, it is crucial to reduce the sway angle at the goal location and during transport. To achieve this, the sway reduction algorithm \(G_{IST}(q^{-1})\) must be an integral part of the position control algorithm, as depicted in Figure 3.  
Because the main reason for the cargo sway is the position control of the cargo, the input shaper technique is chosen to reduce the cargo sway. The input shaping represents the convolution of the control signal with a sequence of impulses  
\[\delta_{IST}(t)=\sum_{i=1}^{N}B_{i}\delta(t-\Delta_{i}) \tag{15}\]  
where \(\Delta_{i}\) is the i-th impulse time, \(\delta\) is the Dirac delta function, \(N\) is the number of the impulses, and \(B_{i}\) is the amplitude of the i-th impulse. The pulses are determined to eliminate system vibrations at precisely known frequencies. This method eliminates cargo oscillations if the system damping and natural frequency are precisely known. Input-shaping methods vary depending on the constraints they use and today there are lots of proposed input-shaping methods depending on the robustness and speed, which are two opposing criteria: ZV (Zero Vibration), ZVD (Zero Vibration and Derivative), ZVDD (Zero Vibration and two Derivatives), etc. The shaped signal at the input shaper output is gained by using convolution of the impulses and input control signal:  
\[ \begin{split} y(t)=&\int_{-\infty}^{t}\delta_{IST} (t-\tau)u(\tau)\\ =&\int_{-\infty}^{t}\sum_{i=1}^{N}B_{i}\delta(t- \tau-\Delta_{i})u(\tau)d\tau\\ =&\sum_{i=1}^{N}B_{i}u(t-\Delta_{i})\end{split}  \tag{16}\]  
This equation can be transferred to the Laplace domain, and because the first impulse of any input shaping method does not have delay, can be written as  
\[G_{IST}(s)=B_{1}+\sum_{i=2}^{N}B_{i}e^{-\Delta_{i}s} \tag{17}\]  
Figure 3: Position control with sway reduction. The ZV input shaping used in this paper has only two impulses with time shift \(\Delta\).