# Modified Smith Input-Shaper Crane-Controller for Position Control and Sway Reduction
## 3 Control Structures for Controlling a Cargo Transfer
And its amplitude ratio and phase shift are  
\[\mid G(j\omega)\mid=\sqrt{B_{1}^{2}+2B_{1}B_{2}\cos(\omega\Delta)+B_{2}^{2}}, \tag{18}\]  
and  
\[\varphi=arg(G(j\omega))=-\arctan\biggl{(}\frac{B_{2}\sin(\omega\Delta)}{B_{1}+ B_{2}\cos(\omega\Delta)}\biggr{)} \tag{19}\]  
respectively. Using these equations, the [PERSON]'s amplitude and phase diagram can be drawn, shown in Figures 4 and 5. This method is a feedforward method, which introduces a problem when incorporated within the position control loop. This can be seen from these [PERSON]'s diagrams. It decreases the closed-loop phase reserve because it introduces the delay in the position control loop. Because of this, it is intended to be implemented outside of a feedback loop. This delay introduces the oscillation in the position closed loop, and the only way to use this technique in the position control loop is to decrease the proportional gain of the PD controller, which will decrease the desired positioning speed. If the position speed is decreased, then there is no need to use the input shaper technique because the residual sway would be small because of the small acceleration and deceleration of the cargo. The Smith predictor is indispensable for using the input shaper technique with the same positioning speed. It ensures that the same PD position control parameters from the position control loop without the sway reduction can be used with the input shaper technique, maintaining the speed of the position with the sway reduction. Figure 4: ZV input-shaper-amplitude Bode’s diagram. Figure 5: ZV input-shaper-phase Bode’s diagram. Neglecting the mechanical constant of the DC motor, the transfer function Equation (13) becomes  
\[G_{PC}(s)=\frac{K_{sm}}{s} \tag{20}\]  
If the sample time is taken to be very small for the transfer function of the closed loop of the Smith predictor according to the disturbance, it can be written in the continuous Laplace domain, which is  
\[G_{d}(s)=\left(1-\frac{G_{PD}G_{PC}G_{IST}}{1+G_{PD}G_{PC}}\right)G_{PC}G_{IST} \tag{21}\]  
By using the theorem of the final value, the static error can be obtained for the input shaper ZV and the ideal transfer function of the PD controller (neglecting the PD first-order derivative filter)  
\[\lim_{s\to 0}G_{d}(s)=\frac{T_{osc}K_{sm}d}{4}+\frac{x_{r}}{2} \tag{22}\]  
The integral action in the dynamics of the crane cart causes the error in the position, which is proportional to the time constant of the cargo sway \(T_{osc}\), the overall gain of the crane \(K_{sm}\), and the value of the disturbance \(d\). All dynamics that are not modeled, like static and dynamic friction, moving mass effect [38; 39] (which some authors take care of within their proposed crane models [40; 41]), cable force, etc., are considered with this disturbance. From (22), it can be seen that there will be a static error if there is a disturbance. Additionally, if there is no friction and the forces are produced by the cargo's sway, the Smith controller will have an error of position of 50%. Some modifications must be made to use the Smith predictor, which benefits the cargo crane system positioning. The modification of the Smith predictor and the control structure, proposed to be used for the position and the sway reduction, is given in Figure 6.  
This proposed control structure of the crane is made of the position PD controller \(G_{PD}\left(q^{-1}\right)\) with the mathematical model of the position dynamics of the crane cart \(G_{PC}\left(q^{-1}\right)\), and the error control loop to eliminate the error of the position because of the unmodeled dynamics and the disturbances. Unmodeled dynamics and disturbances are detected by comparing the output position sensor signal of the crane \(x(k)\) and its mathematical model \(\hat{x}(k)\). For the error controller, the P controller \(G_{p}\left(q^{-1}\right)=K_{P,e}\) is used.