Optimal Online Resonance Suppression in a Drive System Based on a Multifrequency Fast Search Algorithm

The resonant frequency drift caused by the change in mechanical parameters will cause the servo mechanism of CNC machine tools, robots and other equipment to produce mechanical resonance again. To address this problem, we propose a novel identification method of mechanical resonance based on the Fibonacci principle and a novel design method of notch filters based on optimization theory. First, by using a multifrequency sinusoidal signal, we design a fast search algorithm to search for the drift resonance frequency online; then, we optimize the notch filter to achieve fast and real-time resonance suppression by optimization theory. Compared with commonly employed passive resonance suppression methods, the proposed method can rapidly identify the parameters, more accurately suppress the resonance, minimize the phase angle loss and maintain the stability of the system. Finally, we apply the method to a 2-mass system experimental platform. The experimental results show that the proposed method is superior to the conventional passive resonant suppression method under the resonant frequency drift and other states and has strong robust performance.


I. INTRODUCTION
Permanent magnet synchronous motor (PMSM) drive systems are widely used for the motion control of precision equipment such as computer numerical control (CNC) machine tools, industrial robots, large optical telescopes and radar due to their high precision, high efficiency and high power density [1]- [4]. However, the mechanical transmission mechanism between the motor and the load often includes elastic factors that lead to mechanical resonance and limit the bandwidth of the position and speed control loop [5], [6]. The stiffness coefficient, inertia ratio, damping and other variables in the transmission system change with increasing equipment service life, so they are difficult to accurately measure. These variables make it difficult to identify and suppress mechanical resonance frequency drift, so the performance of the PMSM servo system is limited.
The associate editor coordinating the review of this manuscript and approving it for publication was Qinfen Lu .
At present, the research methods of mechanical resonance suppression are mainly divided into two categories: active methods and passive methods. Active methods mainly realize resonance suppression by changing the mechanical structure or by actively using advanced algorithms [7]. The adaptive neural network algorithm is adopted in [8], and the adaptive sliding mode control method is adopted in [7]- [11], while the adaptive feedback controller is used in [12], and the model predictive control algorithm is adopted in [13]. However, the operations of the above intelligent control algorithms are complex and require a large system computing capacity, which limits large-scale industrial applications [11]. In [14], an adaptive vector method for estimating the unknown parameters of the motor provided a new approach for parameter identification and resonance suppression. In recent years, state feedback control has been widely used to suppress mechanical resonance, where the idea is to observe state variables that include the mechanical resonance frequency [15]- [17]. However, these methods often require VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ additional sensors, which increases the hardware cost, and the installation of sensors is limited. The proportional integral (PI) controller is designed by pole assignment in [18], [19], and the system performance is improved by assigning the damping coefficient of the transfer function of the closed-loop system. However, the axial torque oscillation cannot be suppressed in the saturation stage of the speed regulator. In [11], [20], and [21], the shaft torque is measured directly or the displacement, speed and acceleration data of the load side are measured to obtain the resonance frequency and peak value, and then the mechanical resonance is suppressed by adjusting the controller parameters. These methods also increase the complexity and control cost of the system. Passive methods do not change the control structure, do not increase the hardware cost, and are easy to implement. At present, the main passive resonance suppression method is the notch filter method [22]- [25]. However, this method needs to accurately identify the resonance frequency and peak value in real time. The offline suppression method is adopted in [26], [27]: the system Bode diagram obtained by the frequency sweep is analyzed, and then the filter parameters are set according to the characteristics of the resonance frequency. This method can accurately identify the resonance frequency. However, changes in the stiffness coefficient, inertia ratio and damping lead to changes in the resonance frequency and peak value, which leads to resonance suppression failure. However, the online real-time resonance suppression method can effectively prevent this problem.
In this paper, the mechanical resonance frequency drift of a servo system is studied as follows: 1) The mechanical resonance model of a PMSM servo system is established through the dynamic equation, and the frequency characteristics and phenomenon of the mechanical resonance drift of the system are analyzed. 2) Two iterative algorithms, including multifrequency fast search and fast multifrequency dichotomy, are given. The resonance frequency and cutoff frequency can be identified quickly and accurately online, and then the parameters of the resonant system of the drift can be determined. 3) By using the frequency characteristics of the system, the parameters of the notch filter are optimized and designed to achieve optimal online resonance suppression and keep the system stable. 4) The experimental results for the PMSM servo system are given to verify the correctness of the theoretical analysis and the effectiveness of the proposed method. Compared with the traditional offline resonance suppression method, the optimal online resonance suppression algorithm designed in this paper functions in real time and is fast, accurate, and stable.
The rest of this paper is arranged as follows. In section II, the model of the PMSM drive system is analyzed, the simplified model is deduced, and the influencing factors of mechanical resonance drift are analyzed. In section III, an optimal online mechanical resonance suppression scheme is proposed, and specific implementation steps are organized. The advantages of the method are illustrated by comparison  with the offline method. The experimental results are given. Section IV presents the conclusion.

II. MATHEMATICAL MODEL OF A PMSM DRIVE SYSTEM
In the practical application of industrial production, PMSM drive systems have been widely used, as shown in Fig. 1. The system is generally composed of a CNC system, servo driver, servo motor, mechanical transmission mechanism and load. Usually, the CNC system controls the output electromagnetic torque of servo motors by servo drivers, and the motor and load are connected by a mechanical transmission mechanism. Fig. 2 shows that the mechanical transmission mechanism of the CNC machine tool includes screws, guide rails, a coupling, fasteners and other mechanical parts. The connection mode between these parts is not an ideal rigid connection but an elastic connection. The existence of elasticity introduces resonance points into the system and causes mechanical resonance.

A. ESTABLISHMENT OF A TWO-MASS MECHANICAL RESONANCE MODEL FOR THE PMSM SERVO SYSTEM
The typical two-mass mechanical model used to describe the servo system is shown in Fig. 3. The motor is connected to the load through a slender elastic shaft. The moments of inertia of the motor and the load are J m and J l , respectively, the stiffness  coefficient is k s , the damping coefficient is c s , the electromagnetic torque is T m , the ratio of inertia is p, the disturbance torque is T l , the shaft torque is T s , ω m and ω l are the rotation speed of the motor and load, respectively, and θ m and θ l are their rotation angles, respectively. The kinematic equations of the system can be expressed as The block diagram of the two-mass mechanical model is shown in Fig. 4, where T l is so small that it can be ignored. The transfer function from T m to ω m can be expressed as G r (s) is the transfer function of the mechanical resonance link of the servo system. ω n and ω an are the undamped resonance frequency and antiresonance frequency, respectively, which can be expressed as However, a change in the damping also causes drift of the resonance frequency, especially in some cases of servo precision control. Let The damped resonance frequency and antiresonance frequency are ω r and ω ar , respectively. The relationship between ω r and ω n is given as follows: The relationship between ω ar and ω an is given as follows: r ω an (9) By frequency domain analysis according to equation (2), the frequency characteristic curve of the mechanical resonance link of the servo system is obtained, as shown in Fig. 5.

B. ANALYSIS OF THE PHENOMENON OF MECHANICAL RESONANCE DRIFT
According to equations (4), (5), (8) and (9), the resonance frequency and antiresonance frequency are affected by the inertia ratio, stiffness coefficient and damping coefficient. The change in these three factors leads to drift in the resonance frequency. Therefore, the causes of resonance frequency drift can be summarized into three aspects: 1) The stiffness of the moving shaft is fixed in theory, but with increasing service life of the equipment, the aging of metal materials leads to a decrease in the stiffness coefficient; 2) in the process of VOLUME 9, 2021 using the equipment, a change in the preload and lubrication state of the transmission mechanism leads to a change in the damping coefficient; 3) in the working process of the CNC machine tools and industrial robots, a change in the load leads to a change in the inertia ratio. This paper discusses the influence of the simultaneous variation in the inertia ratio, stiffness coefficient and damping coefficient on the frequency drift of the mechanical resonance. According to the actual mechanical characteristics of CNC machine tools, the following assumptions need to be satisfied: 0 ≤ c s ≤ 1, 1 ≤ p ≤ 20, and 200 ≤ k s ≤ 500. In addition, the initial values of other mechanical parameters are established as follows: J m = 0.043kg · m 2 , J l = 0.22kg · m 2 , k s = 280N · m/rad, and c s = 0.22N · m · s/rad.

1) ANALYSIS OF THE VARIATION IN THE STIFFNESS COEFFICIENT
As shown in Fig. 6, when the inertia ratio p and the damping coefficient c s remain unchanged and only the stiffness coefficient changes, the resonance frequency point changes. With a gradual increase in k s , the resonance frequency of the system ω r increases in a piecewise manner.
The fitting correlation coefficient reaches 0.9999.

2) ANALYSIS OF THE VARIATION IN THE INERTIA RATIO
As shown in Fig. 7, when the stiffness coefficient c s and the damping coefficient c s remain unchanged, only the inertia ratio changes, and the resonance frequency point changes.
With the gradual increase in p, the resonance frequency ω r  decreases in a piecewise manner, and the interval [0, 80] is divided into two subintervals [0, 14] and [15,80]. When p = 14, the resonance frequency ω r jumps. The function fitted by the least square method is given as The fitting curves are shown in Fig. 8 and Fig. 9.

3) ANALYSIS OF THE VARIATION IN THE DAMPING COEFFICIENT
In most cases, the value of the damping coefficient is very small, and equations (8) and (9) can be rewritten as  This means that damping is ignored, but in some cases of precise control, damping can also affect the performance of the equipment. Fig. 10 shows the Bode diagram of the resonance frequency ω r with varying c s .
As shown in Fig. 10, with increasing c s , the resonance frequency increases in a piecewise manner, and the interval [0,1] is divided into seven cells. By using the least squares method, we can calculate the correlation coefficient and linear relationship between the damping coefficient c s and resonance frequency ω r in each cell.
As shown in Table 1, with decreasing damping coefficient, the resonance frequency of the system drifts to the lowfrequency region.

III. OPTIMAL ONLINE MECHANICAL RESONANCE SUPPRESSION SCHEME
From the above discussion, it can be seen that changes in the stiffness coefficient, inertia ratio and damping coefficient lead to resonance frequency drift, which causes the original resonance suppression method to fail. Aiming at the problem  of the real-time control of resonance point drift, first, a fast interval searching iterative algorithm based on the Fibonacci principle is proposed to accurately detect the resonance frequency in real time. Second, a fast multifrequency bisection method is proposed to quickly and accurately obtain the cutoff frequency. Third, the threshold frequency is calculated to determine the parameters of the mechanical resonance system. Finally, the performance index function is constructed, the parameters of the notch filter are designed by using optimization theory, and then online optimal suppression for the mechanical resonance of the servo system is implemented. The control structure of the frequency characteristic search algorithm is shown in Fig. 11.

A. SEARCH ALGORITHM DESIGN OF THE RESONANCE FREQUENCY
The commonly used one-dimensional search methods can be divided into two categories: trial methods and interpolation methods. Because the interpolation method needs to obtain a smooth function and satisfy other conditions, the trial method needs only to obtain a function that is unimodal. In comparison, the trial method is simple and feasible. Based on the principle of the Fibonacci method, an iterative algorithm for fast searching intervals is proposed in this paper. The method is as follows. First, let ϕ (λ) be the unimodal function. The interval [α, β] is inserted into n points λ 1 , λ 2 , · · · , λ n , and then the interval is equally divided into n + 1 cells. We calculate the function value ϕ (λ i ) (i = 1, 2, · · · , n) at each point. There must be a maximum value point λ r such that ϕ (λ r ) ≥ ϕ (λ i ) (i = 1, 2, · · · , n); then, we take the two adjacent points of λ r , namely, λ r−1 and λ r+1 . Obviously, the maximum point must be in the interval [λ r−1 , λ r+1 ]. Finally, the maximum value can be obtained by iteration. This method can quickly and accurately find the extremum of a single peak function. We use the multifrequency sinusoidal signal and Fibonacci method to search for the resonance frequency online, so this method is called the multifrequency fast search method. The specific measures are as follows.

1) DETERMINATION OF THE THRESHOLD
According to the variation ranges of the stiffness coefficient k s , inertia ratio p and damping coefficient c s , the search interval [f c , f e ] is determined such that the image in the search interval is a unimodal function. Here, ω = 2π f , as shown in Fig. 12.
The setting of the threshold value is related to fast Fourier transform (FFT) sampling. Following Shannon's sampling theorem, 1024 points are used for the FFT analysis in the experiment. The threshold value is H th = 1.5, and the threshold frequencies are f l and f h , corresponding to the angular frequencies ω l and ω h in Fig. 12. H max is the maximum value, and H min is the minimum value. If the amplitude of a certain frequency point exceeds the threshold, there is considered to be obvious resonance in the system. Let the amplitude of the two-mass system at the resonance frequency f be Q f ; the following expression can be obtained from equation (2): where f r is the resonance frequency found.

2) MULTIFREQUENCY SINUSOIDAL TORQUE CURRENT SIGNAL
It is assumed that the multifrequency sinusoidal torque current signal with online frequency variation is composed of n 0 sinusoidal signals with different frequencies. The frequency interval between each sinusoidal signal is τ = (f e − f c )/n 0 . The multifrequency sinusoidal torque current signal can be expressed by the following equation: where i q max is the limiting amplitude of the motor torque current and ξ is the adjustment coefficient, which ensures that the motor speed runs in a safe range.

3) RESONANCE FREQUENCY SEARCH
Using the multifrequency sinusoidal torque current excitation system shown in (15), the motor speed and torque current are sampled and stored online. By using equation (2), it can be deduced that the amplitude gain K of the mechanical resonance of the two-mass system at frequency f is expressed as follows: where K i is the motor torque coefficient, A m and A im are the amplitude of the motor angular speed and the amplitude of the torque current, respectively. Fig. 12 shows that the amplitude gain K reaches the minimum value and maximum value at the antiresonance frequency and resonance frequency of the system, respectively. The multifrequency fast search algorithm searches for the minimum value and maximum value of K in the target frequency [f c , f e ], and then the resonance frequency characteristics of the system are obtained.
The process of the multifrequency fast search method for finding the characteristics of the resonance frequency is as follows: x The initial interval is set as [f c , f e ]; n 0 , τ , ξ and i q max are determined; and the accuracy requirement ε = 1; y Using a multifrequency sinusoidal signal excitation system, the speed and torque current of the motor are transformed by FFT, and then A m and A im are obtained; z According to equation (16), the amplitude gain K = K (f c + iτ ) (i = 1, · · · , n 0 ) is determined, and the maximum point f r of K is obtained; { If f r+1 − f r−1 ≤ ε, the calculation is stopped; an appropriate point is taken as the approximate maximum point, and the corresponding function value is the approximate maximum value; otherwise, | is executed; | f c = f r−1 , and f e = f r+1 ; the search restarts at x. Similarly, the antiresonance frequency can be obtained.

4) CUTOFF FREQUENCY SEARCH
Using the dichotomy and multifrequency sinusoidal signal, we propose an iterative algorithm for fast searching for a cutoff frequency referred to as fast multifrequency bisection. The common point of the two search algorithms mentioned above is that they are fast and easy to operate. Let Then The steps of the fast multifrequency bisection method for searching for the cutoff frequency are as follows: Step x and step y are consistent with the above fast resonance frequency search algorithm.
{ If there is a frequency f r that makes h (f r ) = 0, then the calculation stops; otherwise, | is executed.
| The minimum frequency f r1 of h (f c + iτ ) > 0 and the maximum frequency f r2 of h (f c + iτ ) < 0 are determined. If f r1 − f r2 ≤ ε, then the calculation stops, and an appropriate point is taken as the cutoff frequency; otherwise, } is executed.
} f c = f r1 , and f e = f r2 ; the search restarts at x.

5) DETERMINATION OF THE THRESHOLD FREQUENCY AND DRIFT PARAMETERS
The mechanical resonance frequency, antiresonance frequency and cutoff frequency as well as their corresponding amplitudes A an , A n and 1 can be calculated by A and B. Let equation (14) be equal to A an , A n and 1, respectively. We have the coefficients k and ξ r , the damping coefficient c s , the inertia ratio p and the stiffness coefficient k s . Let equation (14) be equal to H th ; finally, we obtain the frequency equal to the threshold value H th .

B. OPTIMAL DESIGN OF THE NOTCH FILTER
To easily adjust the filter frequency, filter width and filter depth, an improved double-T network notch filter is adopted in this paper. Its transfer function is shown in equation (19), and the amplitude-frequency response characteristics are shown in Fig. 13. F is the amplitude gain of the notch filter at resonance frequency f 0 , and M is the bandwidth. Obviously, when the depth f 0 and the width M are larger, the amplitude near the resonance frequency point can obtain sufficient attenuation. However, if these parameters are too large, it leads to excessive resonance suppression and reduces the stability margin of the servo system, resulting in obvious vibration in the system response. We need to determine how to select a and b to find the optimal depth and width parameters, limit the amplitude of the resonance frequency below the threshold value, and minimize the phase angle loss. (19) Mechanical resonance reduces the stability margin of the system, which not only affects the dynamic performance of the system but also destroys the stability of the system. Let the system be stable without a notch filter, and the phase margin of its open loop is ϕ m , which can be expressed as  After the notch filter is added, the stability margin of the system is expressed as ϕ new m = ϕ m + ϕ where ϕ is the phase angle loss at the shear frequency f c , and the expression is Then, Then, (22) can be rewritten as Since a is much smaller than b, the absolute value of (25) is taken as the phase angle loss caused at the cutoff frequency f c ; then, we have Equation (26) shows that with a and b as the adjustment coefficients, the phase angle loss increases with decreasing a and vice versa, and the phase angle loss decreases with decreasing b and vice versa. Then, we can make the following conclusions. When b increases and a decreases, the depth of F and width of M increase, and the resonance suppression ability is enhanced. Simultaneously, the phase angle loss increases, which increases the influence on the stability of the system. When a increases and b decreases, the depth F and the width M decrease, and the resonance suppression ability decreases. Simultaneously, the phase angle loss decreases, and the influence on the stability of the system decreases. The final purpose of this paper is to select the optimal adjustment parameters a and b to minimize the phase angle loss, maintain the stability of the system, and effectively suppress the resonance.
Assuming the amplitude of the notch filter at frequency f is B f , the expression obtained from equation (19) is presented as follows: Obviously, B f is a function of a and b and can be expressed  (28) With equation (28), we have the following optimal regulation parameters: The specific steps of solving the optimization problem (29) with Zoutendijk's feasible direction method are presented as follows: x The initial point is set to x 1 = a 1 b 1 , and k = 1; y The constraint formula (28) is recognized as Ax k ≤ 0, r H th and x k = a k b k ; z Calculate ∇|ϕ(x k )| Obtain the optimal solution p k of the formula min  The determined a and b can place the amplitude attenuation at any frequency ω in the resonant link below the threshold value H th , and the phase angle loss is minimized to determine the optimal notch depth and notch width parameters, to avoid excessive suppression, and to maintain the stability of the system.

C. DESIGN OF THE OPTIMAL ONLINE RESONANCE SUPPRESSION ALGORITHM
The servo system resonance suppression scheme based on an adaptive notch filter mainly includes four steps: 1) data sampling, 2) FFT analysis, 3) resonance frequency fast search, and 4) notch filter parameter tuning. After the resonance online suppression function is turned on, the torque current signal is sampled. In each sampling period, the system completes data sampling, and at the same time, all the collected data are stored in the register. When the number of sampling points reaches the predetermined number, sampling is completed, and FFT analysis is carried out. The results of the FFT analysis are obtained by using the multifrequency fast search algorithm to obtain the resonance frequency and its amplitude gain. A notch filter is designed by using the resonance frequency and the parameters of the notch bandwidth and notch depth determined by optimization theory to realize online resonance suppression. The flow chart of the optimal online resonance suppression algorithm is shown in Fig. 14.

IV. EXPERIMENT
To verify that the optimal online resonance suppression algorithm can suppress the mechanical resonance frequency drift of the PMSM servo system in real time and maintain the stability of the system, an experimental device based on the two-mass elastic model is built, as shown in Fig. 15.
The experimental platform is mainly composed of a drive motor, load motor, damper, controller, and upper computer,  where the main chip of the controller is a TMS320F2812 of the TI company. C language is used for programming. The rated power of the permanent magnet synchronous motor is 750 W, and the switching frequency of the three-phase inverter is 10 kHz. The speed of the motor is obtained by a 2500 lines incremental encoder with itself, and the period of system speed loop is 0.45 ms. The drive motor and the load motor are connected by a slender elastic shaft. The motor parameters are shown in Table 2.
The load motor can provide different torques and obtain different moment of inertia ratios. The stiffness coefficient can be adjusted by changing different slender elastic shafts. The damping coefficient can be adjusted by adjusting the damper. When the three factors of the inertia ratio, stiffness coefficient and damping coefficient change at the same time, the experimental platform verifies the suppression effect of the optimal resonance suppression algorithm proposed in this paper and its influence on the stability of the servo system. Three experiments were carried out to verify the results. Experiment 1 verifies the suppression effect of the optimal online resonance suppression algorithm on mechanical resonance for the PMSM servo system. Experiment 2 verifies that the optimal online resonance suppression algorithm can still suppress the resonance in real time and keep the system stable after the resonance frequency drifts. Experiment 3 verifies that the optimal online resonance suppression algorithm has satisfactory robustness.

Experiment 1 Optimal online suppression of the resonance frequency
The initial mechanical parameters of the experimental platform are shown in Table 3. The optimal online resonance suppression method searches the resonance frequency online and automatically configures the filter. First, we initialize the multifrequency sinusoidal quadrature axis current signal, determine that the frequency search range [f c , f e ] is [0,300], and determine that the given speed is 500 r/min. Fig. 16 shows the cross-axis current response over the whole search process, and Fig. 17 shows the iterative update process of the multifrequency fast search algorithm. The  experimental results show that with 9 iterations, it takes 0.45 seconds to search for the resonance frequency f r , the antiresonance frequency f a , the amplitude gain K at the resonance frequency and the shear frequency f c . The first seven iterations search for the resonance frequency and antiresonance frequency, which takes 0.35 seconds. The next two iterations search for the cutoff frequency, which takes 0.10 seconds. Then, the frequencies f l and f h corresponding to the threshold H th are calculated by the algorithm. The results are shown in Table 4.
Both the fast search algorithm proposed in this paper and the search algorithm in [28] divide the search interval into 10 subintervals. The search algorithm in this paper can accurately determine each iteration interval with a small number of calculations and fast search speed, taking only 0.45 seconds, while the algorithm in [28] needs to judge and compare each subinterval to determine each iteration interval, so the number of calculations is large, taking 5.4 seconds to execute.
After the resonance frequency characteristics are identified by the fast search algorithm, the notch filter is automatically configured according to optimization theory. The performance index is established, and then the mechanical resonance amplitude is controlled below the threshold value, while the phase angle loss is minimized. The filter adjustment coefficients are determined to be a = 0.1074 and b = 0.2949. The simulation results are shown in Fig. 18, and the comparison of the phase margins is shown in Table 5. The results show that both the optimized notch filter and the ordinary notch filter can control the harmonic amplitude below the threshold value, but the less phase angle loss is caused by the optimized notch filter than by the ordinary notch filter. The optimized notch filter designed in this paper can minimize the loss of the phase angle and has little effect on the stability of the system. Fig. 19 and Fig. 20 show the response waveforms of the motor quadrature axis current and motor speed of the servo system, respectively.   It can be seen that the optimal notch filter designed in this paper barely changes the stability of the system, while the ordinary filter causes obvious fluctuations in the speed response and current response. Manual adjustment of the notch filter parameters was used in [27], which takes a long time and makes it difficult to achieve an optimal effect. However, this paper establishes a real-time and accurate performance index to obtain the optimal adjustment parameters through the optimal algorithm.
Comparisons of the waveforms through FFT analysis of the quadrature axis current are shown in Fig. 21 and Fig. 22. It can  be seen that the optimized filter can significantly attenuate the mechanical resonance and keep it below the set threshold.

Experiment 2 Optimal online suppression after resonance frequency drift
The resonance frequency drifts because of changes in the stiffness coefficient, damping coefficient and inertia ratio due to replacement of the slender elastic shaft, adjustment of the damper and adjustment of the torque of the load motor, respectively. The resonance frequency f r , antiresonance frequency f a , amplitude gain K at the resonance frequency and shear frequency f c can be identified by a multifrequency fast search algorithm. The response of the quadrature axis current in the search process is shown in Fig. 23, and the updating process of the multifrequency sinusoidal signal is shown in Fig. 24. Nine iterations take 0.36 seconds. The stiffness coefficient k s , damping coefficient c s , inertia ratio p and frequencies f l and f h corresponding to the threshold H th are calculated by the algorithm. The results are shown in Table 6.
After the resonance frequency characteristics are identified by the fast search algorithm, the notch filter parameters are   optimized by experiment 1, with filter adjustment coefficients a = 0.1202 and b = 0.5319. The simulation results are shown in Fig. 25.
The contrast of the resonance suppression effect is very obvious. Fig. 26 shows the waveform of the resonance suppression by the general filter whose resonance suppression failure is caused by the resonance frequency drift. Fig. 27 shows the waveform of the optimal online resonance suppression algorithm. The algorithm can effectively VOLUME 9, 2021   suppress the mechanical resonance after drift in real time. The phase margin comparison is shown in Table 7. Fig. 28 and Fig. 29 show the response curves of the quadrature axis current and speed of the servo system motor. The experimental results show that the optimal notch filter designed in this paper minimally changes the stability of the system, while the ordinary filter makes the speed and current obviously fluctuate.

Experiment 3 Robust analysis of optimal online resonance suppression algorithm
Keep the parameters a and b unchanged when the inertia ratio p, stiffness coefficient k s , viscosity damping coefficient c s and moment of inertia of the motor J m change. If the resonance peak value of the control system is less than the threshold H th in the process of external parameter changes, and the phase margin remains in the interval [30 • 70 • ], the system remains stable. This finding indicates that the system has strong robustness. Fig. 30 -Fig. 37 show the curves of the resonance peak and phase margin, respectively. When 19.1 ≤ p ≤ 31.2, 0.164 ≤ c s ≤ 1, 260 ≤ k s ≤ 270 and 0.00257 ≤ J m ≤ 0.00437, it is obvious that the resonance peak value is less than the threshold value H th and that the phase margin is in the interval [30 • 70 • ].    Fig. 38, Fig. 39, Fig. 40 and Fig. 41 show the motor speed response curves with p, c s k s and J m , respectively.
The results show that when the mechanical parameters p, c s , and k s and motor parameter J m change greatly, the system still has reasonable speed response characteristics. Thus, the control system based on the proposed method has strong robustness.   The commonly utilized manual adjustment method is time-consuming, inaccurate and untimely. The aim of the online adjustment method is to search the resonant frequency online in real time via the optimal algorithm. Compared with the algorithm in literature [28], the number of iterations of the multi-frequency fast search algorithm proposed in this paper is significantly reduced, which only needs 0.45 s, with a decrease of 5 s. According to the resonant VOLUME 9, 2021   frequency obtained from the search, the optimal algorithm is used to determine that the notch filter parameters only need 0.9 s. The whole algorithm (resonant frequency search + cutoff frequency search + drift parameter tuning + notch filter parameter determination) requires a total of 1.98 s (0.45 s+0.27 s+0.36 s+0.9 s), and the minimum phase angle loss is 0.0217 (1.2433 • ).

V. CONCLUSION
In this paper, an optimal online resonance suppression scheme is designed to address that the original notch filter fails when the resonance frequency drifts due to changes in the stiffness coefficient, inertia ratio and damping coefficient of the servo system. This scheme can not only effectively control the resonance system of the drift in real time but also maintain the stability of the system. The experimental results show that the proposed multifrequency fast search algorithm is fast and accurate; the designed optimized filter can effectively suppress mechanical resonance, providing a solid theoretical basis for industrial applications.