A New Trajectory Optimizing Method Using Input Shaping Principles

Input shaping is an efficient control technique which has motivated a great number of contributions in recent years. Such a technique generates command signals that can manoeuvre flexible structures without exciting their vibration modes. *is paper introduces a new trajectory optimizing method based on input-shaping principles. *e main characteristic of this method in comparison with traditional input-shaping technique is the generating process of final trajectory. By adding reversion and postprocessing procedures before input shapers, time-delay and most of the trajectory deviation can be removed. *e improvement of the proposed method compared with a traditional method is evaluated by simulations. It will be shown that the proposed method leads to no time-delay and highly decreased trajectory deviation and little change of robustness.


Introduction
Many mechanical systems are characterized by parasitic vibrations, such as flexible robots, slewing flexible spacecraft, cranes, etc [1]. In recent years, there has been much effort on optimizing trajectories which lead to reduced residual vibration or overshoot. Various well-designed motion profiles, such as trapezoidal, S-curve, trigonometric functions are well-known methods for smooth motion control [2,3]. By using the response pattern of specific functions, reduced residual vibration trajectory can be obtained. However, these methods are based on parameter selection of specific motion equation. When other kinds of trajectories are required, these methods are unsuitable [4]. is inherent drawback highly restricts the use of well-designed profiles.
Next to well-designed motion profiles, input-shaping technique (IST) is another well-known technique through which to generate signals that do not excite the resonance modes, whilst the final position is attained without steadystate errors as shown in Figure 1(a) [5]. By convolving the reference input signal with a series of impulses, the vibratory mode excited by the signal can be effectively cancelled [6].
anks to its advantages, such as simplicity, effectiveness, and extensive applicability, IST has received much attention in the control theory and led to many engineering applications [7]. Zero vibration (ZV) shapers, zero vibration derivative (ZVD) shapers and zero vibration derivative-derivative (ZVDD) shapers were first developed [8]. en, more robust shapers, e.g., extra insensitive (EI) shaper, multihump input shaper and perturbation-based extra insensitive (PEI) input shaper, were developed by researchers [7,9,10]. However, when using these shapers, there are two key trade-offs: shaper length and parameter robustness [11]. To solve these problems, learning input shapers and adaptive input shapers were developed by researchers [12,13]. ese shaping methods are designed by using a short input shaper that is less robust and change its parameters in tune with the system. Besides, input shapers were also developed to deal with time-varying and multimode cases. However, these improvements mainly focus on the shapers' robustness or parameter selection, and little research has been paid on the drawbacks caused by IST itself. As the input shapers are decided, trajectory deviation and time-delay will be caused in convolving process, as shown in Figure 1(a). By adding trajectory compression process (C-IST), time-delay can be removed, as shown in Figure 1(b) [14]. However, damage of shaper's robustness will happen and trajectory deviation still remains. It should be noted that target trajectories are always designed based on different criteria [15,16]. As a result, less trajectory deviation and less change of robustness will be preferred. To our best knowledge, there is no such a report concentrating on this target.
In this report, a new trajectory optimizing method using IST principles is proposed to solve the two drawbacks to some extent. e basic idea of this method is shown in Figure 1(c).
rough an additional trajectory reconstruction process, a new trajectory is obtained before using IST. e reconstruction process is carried out with the decomposition operation of target trajectory based on IST principles. Spectrum analysis and postprocessing of the obtained trajectory is then carried out. Finally, inputshaping process is implemented. So, the method can be called reversion-input-shaping technique (R-IST). As verified by simulation results, the proposed R-IST is able to remove time-delay phenomenon, reduce a large proportion of trajectory deviation, and change little robustness of the shapers. Since the revision process includes some complex calculation, this method is suitable to be used in off-line trajectory optimizing process.
is report is organized as follows. In Section 2, the traditional IST is revisited. e main steps of R-IST are demonstrated using an example in Section 3. In Section 4, simulation results and discussions are carried out about the new method. Finally, in Section 5, the conclusion follows.

Preliminaries
An uncoupled, linear, vibratory system of any order can be specified as a cascaded set of second-order systems [8]. So, consider a second-order linear system: where ω 0 and ξ are the natural frequency and the damping ratio, respectively; u and y means input and output of the system. en impulse response w(t) of the system can be expressed as

Time Time Reference trajectory
Input shaper Shaped trajectory Input shaper Shaped trajectory Trajectory reconstruction 2 Shock and Vibration where L −1 (·) means the inverse Laplace transformation. e input-shaping method convolves the original command with a sequence of impulses, as shown in Figure 1. To generalize trajectory without residual vibration, amplitudes and moments of applied impulses need to be precisely selected. e input shaper may be expressed in the time domain as where A i is the amplitudes of the ith impulse, t i is the applied time moments of the ith impulse, and t n is the time at which the sequence ends (time of the last impulse). Function δ means unit-impulse function. e response to the impulses of the input shaper can be expressed by where In order to obtain zero vibration residual result when t > t n , A i , and t i to be determined should satisfy In addition, another two constraints should also be satisfied, as shown by  ese two constraints reflect the choice of time origin and the requirement that input shapers do not change the amplitude of trajectory. From the above equations, the parameters to be designed still can't be determined. Shan and other researchers have given various methods by adding different constraints [17]. In this place, Singer's solution was selected, as shown by Zero vibration (ZV) shapers and zero vibration derivative (ZVD) shapers can be calculated by selecting parameter n to be 2 and 3, respectively.

Main Principle of R-IST
e R-IST to be presented involves some extra necessary steps, which mainly concentrate on removing spikes or highfrequency components of applied trajectory. In order to demonstrate R-IST and additional steps that need to be used, a specific application was taken as an example. Figure 2 shows a simple mass-spring-damper system.
is System can be seen as a second-order linear system.
Dynamical model of the system can be expressed by (9). en, the parameters of the input shaper can be decided by (1) and (8): where m denotes the mass of the load and k and c present the stiffness and damping of the spring. During the simulation process, m is selected as 2 kg, while k and c are selected as 200 N/m and 0.05 Ns/m, respectively. Since this research is focused on decrease trajectory deviation caused by IST, comparison between R-IST and traditional IST using the same shapers are selected. In the following deduction of R-IST, it can be shown that different shapers are able to be applied in R-IST. Since some properties can be obtained by reversion process using ZV, ZVD, and ZVDD shapers, these shapers are selected. Because ZVD shaper has better robustness than ZV shaper and less time-delay than ZVDD shaper, ZVD shaper was selected to compare trajectory deviation, robustness, and time-delay properties between R-IST and IST. Since the mentioned methods are able to use different kinds of input shapers, we use R-ZVD to express R-IST based on ZVD shaper. Parameters of ZVD shaper can be selected by (8). During the derivation process, a trapezoidal velocity motion profile is selected as target trajectory S 0 , as shown in Figure 3. e main principle of reversion process is to calculate a new trajectory, called the origin trajectory, which is similar with target trajectory after processed by input shapers. Sorensen and his colleagues have proposed a calculation method based on deconvolution process [18]. However, this method will cause inevitable spikes in acceleration map of obtained trajectory and will lead to overload of actuators. In this paper, a discrete calculating method based on matrix manipulation is selected. At rst, the trajectory is discretized so that matrix operation can be carried out. e interval between two discrete points is selected as 2 ms. Trajectory S 0 becomes a column vector, where each element means displacement in corresponding moment. Also, input shapers should also be discretized. Because the time moment of shaper's impulse may not be integer multiples of the time interval, the interpolation method should be introduced. In our application, the linear interpolation method is selected for its simplicity when expressed by matrix. Velocity and acceleration coe cient matrix, which are used to calculate velocity and acceleration pro les, can be easily obtained by using nite di erence method, as shown by where a and v means acceleration and velocity in t moment, respectively, and Δt expresses time interval of discretization process. After the discretization process, the origin trajectory can be calculated using matrix operation, as shown by: where S 1 and e 1 denote the origin trajectory to be calculated and residual errors, respectively. Besides, matrix COE 1 is the input-shaping calculation matrix and has the same e ect with f(t) in (4). Each row of COE 1 represents the applied input shapers on corresponding moment and can be easily formed by (3). It should be noted that for any trajectory S 0 with moving time longer than the selected shaper, matrix COE 1 is always full rank. As a result, (11) is an overdetermined equation when e 1 is selected as zero. So the equation can be solved by least minimum square (LMS) method. Obtained trajectory COE 1 * S 1 by (11) is expressed by Figure 4(a). However, this result cannot be used directly. As can be seen in the picture, the acceleration pro le result is characterized by high-frequency components and large amplitude. is phenomenon is caused by LMS and will be discussed in detail in Section 4.3. To solve the problem, the weighted least minimum square (W-LMS) method is introduced. Solving equation is changed from (11) to (12): where S a and COE a means the target acceleration pro le and acceleration calculation matrix. Besides, k 1 and e 2 means weight factor and residual error. Parameter k 1 is used to balance the trade-o s: residual deviation and high-frequency components. Compared with the optimization method, LMS-like method costs much less computation time because there is no need for iteration. As resonance part will highly damage the robustness of target trajectory, it is reasonable to lter out the resonant components. rough comparing spectrum of S 0 and S 1 , di erences between 0 and 6 ω 0 are ltered out as S filtered . In the ltering process, upper limit of the bandwidth is selected as 6ω 0 because higher frequency components have little e ect to the second-order system (9). When faced with multidegree of freedom systems, the maximum of natural frequency should be selected as ω 0 . After using the lter, acceleration pro le in frequency domain is changed from Figures 5(a) and 5(b). en trajectory S 1 can be expressed as where S filtered denotes the ltered parts in this step, while S pass denotes the remaining components. However, the ltering operation is accomplished in acceleration pro les, which will lead to extra alteration of trajectory. As shown by Figure 6, S filtered has low frequency components and resonance components. Resonance components will cause damage of shaper robustness in obtained new trajectory and should be removed. Only the resonance components need to be wiped out, while the low frequency components to be kept, as shown by where S resonance denotes the resonance components. Empirical mode decomposition (EMD) has been applied widely in signal processing eld. is method has the ability to separate period signal from complex signal sources [19].
is method was selected because S filtered can appear as such a signal source. By using EMD, S filtered is decomposed into two parts, as shown by Figure 6 and (14). It should be noticed that the starting point and nal point of S 2 ′ is di erent with S 1 . As a result, further compensation need to be introduced. Another trajectory S 2add , which is similar with S 2 ′ , is added. After the compensating process, (14) becomes (15): where e 2 ′ means deviation generated during this process. As trajectory S 2 had already been obtained, (11) could be used to calculate nal trajectory S 0 ′ . Acceleration pro le of trajectory S 0 ′ is shown by Figure 7(a). It should be noticed that S 0 ′ still can't be used directly because of the spikes. As described before, W-LMS method was selected again to remove these spikes. So, target acceleration pro le should be obtained at rst. Di erent with former large amplitudes generated in reversion process, the spikes can be removed by signal processing methods. Wavelet transformation has been used widely for ltering out local spikes in the area of signal processing [20]. In our simulation, Haar wavelet is selected because of its simplicity. As shown in Figure 7(b), the acceleration pro le is decomposed in 6 levels. In the picture, a i means the approximations at level i, while d i (i 2, . . . , 6) means detail part of the pro le in level i. By using this method, the local spikes in S 0 ′ can be separated and removed. en, the weighted function can be expressed by where k 2 means weighting parameter to be selected properly. In our simulation, k 2 is chosen to be 0.01. e 4 and e 3 ′ represent residual deviation, and S 3 denotes the obtained trajectory in this step. is equation is also an overdetermined equation. Finally, through (11)-(16), the R-IST can be expressed by where e 1 , e 2 , and e 3 are trajectory deviation introduced in each step. S f and e denote the nal obtained original trajectory and total trajectory deviation generated by R-IST, respectively. Acceleration pro les of trajectory S f in time domain and frequency domain are shown in Figure 8(a).
Besides, e 1 , e 2 , e 3 , and e are also shown in Figure 8(b). As shown in Figure 8(b), e 2 occupied the major part of the total trajectory deviation, which means the deviation is mainly caused by removing the resonance components using EMD. As a result, it is easy to estimate the generated trajectory deviation after using EMD.

Simulation Results and Discussion
To simulate the properties of the generated trajectory, Simulink was selected as simulation software.

Residual Vibration and Trajectory Deviation.
Except the mentioned methods, trajectory compression before using input shapers, called C-IST, is also able to remove timedelay. In the following discussion, we use C-ZVD to express C-IST based on ZVD shaper. Responses to trajectory obtained by ZVD, R-ZVD, and C-ZVD are shown in Figure 9.
To be compared, response to target trajectory is also demonstrated. It can be seen that target trajectory generates residual oscillation, while ZVD method and R-IST method lead to zero vibration residual. Besides, ZVD method generates the least vibration during the movement. It should be noted that there exists three platforms using ZVD and C-ZVD. It is because in these regions, the system is balanced and the vibration caused by 3 pulses was cancelled. As for the results caused by R-ZVD method, larger vibration was caused because the acceleration is no longer constant which could excite the resonance of the system. However, the vibration curve had the similar trend with ZVD method. It is because a new reversion process is added to decrease the deviation of the target trajectory before using ZVD shapers while the selected ZVD shapers are the same. ose changes alerted the balance state of ZVD method, which leads to no platform region. Besides, it should be noted that ZVD  Shock and Vibration  method generated time-delay while R-ZVD and C-ZVD did not. Deviation of the target trajectory when using these methods is also simulated, as shown in Figure 10. Compared with generated vibration, trajectory deviation amplitude is much larger. It should be noticed that ZVD method leads to larger deviation, while R-IST the smaller. Deviation caused by ZVD method is always unidirectional, because the deviation is caused by time-delay. However, by using reversion process, R-IST generates less deviation. It is because the R-IST method is concentrated on generating trajectory with the smallest deviation and least resonant excitation source. Besides, trajectory deviation of R-ZVD is mainly caused by ltering the resonance part, as shown in Figure 8(c). Also, the deviation of C-ZCD is also decreased when compared with ZVD. e reason is that C-ZVD change the deviation from unidirectional to anisotropic, which alleviate the inuence of time-delay. By Figures 9 and 10, it can be seen that the R-ZVD method generates the least trajectory deviation. Compared with traditional ZVD, 88.6% less deviation in root mean square (RMS) was obtained, which shows the priorities of this method in reducing trajectory deviation.

Robustness Properties.
Except those applied in closeloop systems, such as adaptive and learning ones, IST is always applied without correction of shaper's parameters. As a result, an issue of robustness against system uncertainties is highly valued [7]. In general, as the R-IST is the method based on traditional IST, damage of robustness is unwanted. For comparison of the robustness properties, the sensitivity curve is recalled. e relative amplitudes of residual vibration of the three methods when faced with uncertainty of system's natural frequency is tested. As shown in Figure 11, the robustness properties of these three methods are exhibited. It can be found that all these curves are di erent with the ZVD robust curve obtained by impulse responses. In general, the robust curve of ZVD, when tested through impulse responses, is closed to be symmetrical under 10% residual vibration [8]. is phenomenon is caused because the initial trajectory of ZVD and C-ZVD is trapezoidal, which has the ability to cancel residual vibration when choosing proper parameters. Although the robust curves of the three methods have the similar trend, the di erence between them is also merit attention. Compared with ZVD and C-ZVD, R-ZVD method has di erent initial trajectory. ZVD and C-ZVD methods have not changed the initial trajectory, while R-ZVD has. e modi cation of the initial trajectory results in the loss of vibration cancellation of the initial trapezoidal trajectory. As for the similar trend of these three methods, similar trajectory should be the reason. In Figure 11, robust curve of C-ZVD and R-ZVD are homogeneous, and they have homogeneous trajectory, as shown in Figure 10. To be concluded, the robustness properties of the three methods are similar. Compared with 88.6% less trajectory deviation, the priority of C-ZVD is remarkable. However, for C-ZVD, the trajectory compression process will change the spectrum of initial trajectory, which may lead to unpredictable damage of the robustness. Although R-ZVD also changes the spectrum, the additional ltering process highly alleviates the unpredictability, which gives the possibility of industrial application.

Trajectory Reversion Property.
In Section 3, it should be noted that after trajectory reversion process, the obtained trajectory spectrum is more regular than the initial trajectory.
is property is important in analyzing robustness. When R-ZVD is used, the frequency of stimulation is focused on mω n (m 1, 3, 5, . . .), as shown in Figure 5(a). When R-IST based on ZV and ZVDD shaper is used, the frequency of stimulation is also focused on these frequencies,  Shock and Vibration as shown in Figure 12. To be detailed, the stimulating part on the frequency of ω n is of the most remarkable. ZVDD method has the most concentrated frequency distributions. is phenomenon can be explained by two points: First, LMS is aimed at reducing global trajectory deviation. In general, the target trajectory is continuous and smooth. Besides, the input shapers are a series of impulses, which means the shapers are discrete. e meaning of the reversion process is to generate a similar trajectory using the shapers. So, on both ends, the obtained trajectory is produced using not all of the impulses. To reduce the residual errors on the ends, extra displacements are added. ose  displacements, which follow the cycle of odd times of the impulse interval, are strengthened. It is because after processed by the shapers, the displacements can be cancelled. As the frequency becomes higher, residual errors become smaller, and the effectiveness in reducing residual errors becomes less. However, another part of the displacements, which follow the cycle of even multiple numbers of the impulse interval, is suppressed. It is because these displacements will be enhanced in the overlapping area, which will enlarge residual errors. is reason can help explain why we chose the trajectory obtained by larger time interval as the target trajectory. Second, the robustness of different shapers lead to different amplitudes of the frequency. e trajectory obtained directly from LMS leads to no residual vibration when the system parameter is already known. As the system parameter changed, residual vibration caused by residual error obtained by LMS becomes smaller. However, the vibration amplitude caused by target trajectory will also be changed.
rough the principle of linear superposition, trajectory obtained in reversion process need to compensate the changes of vibration amplitude. However, the used shapers have certain robustness against the parameters' alteration. As a result, resonant components are brought in. ese resonant components guarantee the conservation of vibration amplitude.
Finally, two important properties of the R-ZVD method can be obtained as follows.
Property 1: by utilizing the decomposition process based on different shapers, a new trajectory can be obtained with its excitation frequencies on specific value. In general, the period excitation parts are odd times of the impulse interval of chosen shaper.
Property 2: the amplitude on resonant frequency is decided by the robustness of chosen shaper. In general, the more robustness the shaper is, the bigger the amplitude of resonant part will be. By using these two properties, proper input shaper can be selected according to the robust requests, and proper parameters of the filters to be used can be selected easily.

Conclusions
In this paper, a new trajectory optimization process is proposed, the so-called reversion-input-shaping technique (R-IST). A reversion process is added based on inputshaping principles. By using this process, stimulating frequency of origin trajectory is redistributed and focused on the specific frequency region, while leading to little alteration on other frequency components. is result leads to easy selection of resonance components to be wiped out. Furthermore, the reason of this decomposing phenomenon is discussed.
rough simulation and analysis using ZVD shaper, the advantages and drawbacks of proposed R-IST were demonstrated. Although little damage of robustness properties could be caused by R-IST, the reduction of trajectory deviation is remarkable. In the future, research will be concentrated on three points. First, improve the R-IST to expand its application to time-varying systems. Second, combine R-IST with adaptive or learning IST.
ird, combine R-IST with other kinds of input shapers.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest.