Due to the comprehensive influence of many nonlinear coupling factors within a system, when the input signal provided by an electrohydraulic servo shaker is sinusoidal, it often leads to the existence of high-order harmonic components of the system, which makes the output servo signal parameters exist extremely serious. Therefore, the detection of harmonics of the electrohydraulic servo shaker has very important application significance. In this paper, by using simulated annealing (SA) based harmonic detection, a kernel function is introduced to study area influence-based particle swarm optimization (PSO). Using a super accurate and fast global convergence brought by the combination of hybrid particle swarm optimization algorithm and simulated annealing algorithm, it can quickly jump out of the trap of traditional local optimization algorithms and a more stable, high-precision, as well as fast global convergence optimal solution can be obtained. Through the detection and simulation of the amplitude and phase of the harmonics in the system, by comparing the PSO-SA detection with PSO detection, it is proved that the PSO-SA algorithm can well satisfy the accuracy of the detection system, which has advantages such as a fast convergence speed, a high search accuracy, etc.; meanwhile, it is simple and easy to implement.

1. Introduction

Due to the existence of nonlinear factors such as component frictions, installation clearance, and dead zones in the control system, nonlinear systems often lead to a decrease in the accuracy of the system output signal or even make the system in an unstable state [1, 2]. An electrohydraulic servo system is combined with mechanical, hydraulic, electronic, and other nonlinear phenomena, that is, the flow and pressure characteristics and various typical nonlinearities. The parameters related to flow, pressure, and oil viscosity also change with time, so the nonlinearity of the hydraulic system control is an important research direction [3]. Therefore, when an electrohydraulic servo shaker is excited by a sinusoidal signal, high-order harmonics often appear at the signal output, which makes the signal obviously distorted. Therefore, in order to suppress the harmonics inside a system, it is necessary to analyze them. Factors such as the order, amplitude, and phase of the harmonics affect the degree of distortion of the harmonics, which need to be considered.

However, a complex electrohydraulic servo control system in practical use is sometimes subject to nonlinear conditions and various time-varying interactions; meanwhile, many components often do not satisfy the principle of linear superposition. The uncertainty caused by these nonlinear and time-varying factors lead to the existence of various harmonic components in response signals when a shaker is used for the sinusoidal acceleration test, where the output signal waveform may have some serious linear distortion, thus reducing the reliability of the tests [4].

Tayal et al. proposed a fast and accurate method based on an artificial neural network (ANN). Using feature extraction of the input waveform, the unique identification of various types of equipment and different harmonic characteristics was realized through the ANN [5]. Gao et al. established a load equivalent model, model composition, and model parameter determination method and introduced the distortion coefficient to determine the harmonic sources [6]. Santiprapan et al. conducted an in-depth analysis of the harmonic identification algorithm in nonideal systems, using Fourier with a positive-sequence voltage detector (DQFP), which was a new harmonic identification algorithm for filters [7]. In order to improve the detection accuracy of harmonics in the system, Sun proposed a new harmonic detection method based on the synchronous serialization transform and a Hilbert operator based on local spectral maximum [8]. Abdelsamad et al. suggested a Hammerstein–Wiener identification method to establish a black-box model for a voltage source converter, which could satisfy the requirement of obtaining harmonic characteristics and a low computational cost [9]. Taking advantage of the advantages of the FFT to detect steady-state harmonics and dynamic harmonics, a method combining FFT and wavelet transform was put forward by Zheng et al. [10]. To improve the processing speed and simplify the harmonic detection process, Temurtas et al. used feedforward and Elman recurrent neural networks to detect the harmonics of distorted waves instead of Fourier transforms or low-pass filters [11]. Aiming at the contradictions between the convergence speed of harmonic detection and the steady-state error, Liu projected a new algorithm for dynamic detection during an iterative process, through which harmonics could be effectively detected based on the instantaneous characteristics of the least mean square harmonic adaptive detection [12].

However, different types of basic methods often have advantages and disadvantages like different degrees of theoretical limitations in engineering practice. To solve this problem, it is necessary to apply enhancements and improvements on the basis of the above methods. In practical engineering applications, there is a high complexity in solving the global optimization problem, and factors such as large-scale, high-dimensional, nonlinear, nonconvex, as well as much local minima should be comprehensively considered. Algorithms with a single structure and a relatively single implementation mechanism are generally difficult to be used to effectively and efficiently optimize an algorithm. Through the application of the hybrid algorithm, the computing efficiency can be effectively improved, achieving the desired effect.

In order to further study and solve the problem of multitarget search accuracy and precision, a hybrid search algorithm is produced based on regional influence, combining the advantages of the PSO algorithm and the SA algorithm. PSO search is used for the optimal early search stage of the hybrid algorithm. If the search results are stagnant, it is only necessary to restart the SA algorithm at the searched global optimal position, starting from the search for the local optimal position, and then jump out and go back to search for the global optimum. Finally, through a comparison of simulation data, the effectiveness of the hybrid algorithm when detecting harmonics is proved.

An electrohydraulic servo shaker has a strong ability to withstand load vibrations, which continuously generates various large-angle exciting forces and shock vibrations with a large displacement direction. It is an important test equipment used in laboratories for load vibration and impact tests, which is widely used in various engineering fields. Therefore, it is of practical significance and great practical value to study the electrohydraulic servo shaker in depth. Based on the current situation, the main object of harmonic analysis and detection is the power system, and there is relatively less research on electrohydraulic servo systems. What is obviously different from other systems is that for hydraulic transmission systems, the accuracy of response time required by the test results is relatively high. The methods applied to power systems are not necessarily applicable to hydraulic systems, so the research in this paper has significant practical significance.

A difficulty of harmonic estimation is that harmonic generation is dynamic and nonlinear in nature. Therefore, a fast and accurate harmonic estimation method is needed. In this paper, aiming at the phenomenon that the harmonic distortion of acceleration response signals occurs in the sinusoidal vibration characteristic test on a shaker, how to construct harmonic detection and analyze harmonic components using the PSO-SA algorithm is studied. For a harmonic component detection and analysis system established based on the PSO-SA algorithm, various higher-order harmonic component analyses can be carried out on the basis of a shaker. At the end of the paper, the comparison simulation result with PSO algorithm shows that the PSO-SA algorithm has a good convergence and precision, together with good stability, performance, and fast convergence speed, which can well complete the task of system harmonic detection.

2. Simulated Annealing Algorithm

2.1. The Concept of Simulated Annealing Algorithm

Simulated annealing algorithm (SA) actually refers to the so-called global optimization of the performance of a serial structure, through which the global optimization of the final performance of a system is mainly achieved by avoiding the local minimum value as effectively as possible and minimizing the probability of complex changes during the search process. This new idea was first put forward mainly by N. Metropolis in 1953. In 1983, S Kirkpatrick et al. proposed to directly introduce the basic control idea of simulated annealing technology into the field of composite-structure optimization for the first time, whose main objective was to try to propose another combinatorial random optimization algorithm based on the Monte–Carlo iterative optimization strategy. One of its two basic purposes and starting points is to seek the similarities between the solid in thermal body physics experiments and the common combinatorial random iterative optimization method in annealing experiments [13, 14].

The simulated annealing algorithm is used to find the optimal solution of each global variable in the solution of the objective function step by step in a spatial range. Starting from a certain initial temperature parameter value of a specific variable in an objective function, the initial temperature parameter is gradually reduced, which is gradually increased by combining its mutation characteristics with the probability characteristics. The optimal solution is bounced out randomly and gradually becomes relatively stable, which finally develops into the optimal solution of one of the global functions [15]. The simulated annealing algorithm is a kind of general system optimization design algorithm in which the performance requirements of stochastic and global optimization systems are considered on the basis of theories, which has been widely and maturely applied in many fields such as industrial control automation engineering, machine learning, neural networks, and intelligent signal processing algorithms [16].

The Metropolis algorithm used in the simulated annealing algorithm refers to the sequence of each combinatorial optimization problem generated using each adapted transition probability relative to the Metropolis criterion.

Decide whether to accept the transformation of the current solution i to j. Equation (1) in the formula represents the control parameter. The calculation starts from a relatively large value (corresponding to the melting temperature of the solid). After the transferring to the temperature, slowly and gradually reduce the temperature t (corresponding to “slow” cooling), repeat the calculation until the cooling temperature satisfies the characteristic temperature, and then stop it. Therefore, the simulated annealing algorithm can also be considered as an iteration of the Metropolis algorithm, which reduces the value of the control parameters [17].

The simulated annealing algorithm can also directly accept some new types of optimization solutions according to the Metropolis standard, so it is usually not limited to accepting these optimization solutions completely, but those optimization solutions can also be accepted based on a limited degree of performance degradation. If the value of t is found to be large from the beginning, a less degraded solution is likely chosen to be accepted. As the range of the value of t decreases gradually, only a better degraded solution can be considered. Finally, when this t value tends to be zero, the degenerate solution becomes unacceptable, which undoubtedly further makes the simulated annealing problem more likely to jump out of its local optimal solution range, and the overall optimal solution to the combinatorial optimization problem is obtained [18]. Therefore, for most optimization problems of search combination algorithms, the simulated annealing algorithm is better than the local search algorithm.

2.2. Simulated Annealing Algorithm Flow

SA algorithm is used to automatically generate a random solution in the solution space model of a problem and then automatically simulate the process of energy state transition among energy particles in the solid model within a specific temperature range by calculating the random alteration of its temperature. The solution of random disturbance is automatically evaluated, and its effect on the results of the current solution is comprehensively compared, which can be replaced according to the current Metropolis standard. Any number of random perturbation solutions is performed in multiple same temperature ranges. The change curve of its own temperature parameters is usually used to simulate the process of solid temperature drop until it reaches a specified temperature value. The solution of the equation obtained at this time is generally considered to be a final solution [19, 20]. Figure 1 shows the basic flowchart of SA algorithm implementation.

The simulated annealing algorithm has a strong global optimization search ability, which is not constrained by search space or finite hypothesis space, nor do it need continuity, derivations, unimodality, or other assumptions. It indicates that the value of the objective function is not very good with a certain probability, which may cause the algorithm to fall into a local optimization trap. But in theory, it will pop up after a time that is long enough and converge to the global optimization. Therefore, through the annealing algorithm, a high initial temperature, a low annealing rate, a large number of iterations, and disturbances are generated under two environmental conditions with an identical initial temperature. It is proved that the disadvantages of this algorithm is obvious, which lies in the contradiction between the solution quality and the long solution time.

3. Particle Swarm Algorithm

Particle swarm optimization, abbreviated as PSO, is an evolutionary algorithm similar to the simulated annealing algorithm, which starts from solving a random solution, repeating, and iterating continuously, and finally another known optimal solution is found. In fact, it may also need to conduct a comprehensive analysis to evaluate the overall implementation and quality of a solution through applicability test indicators, which is obviously more intuitive and simpler than the genetic algorithm [21, 22].

The application field of PSO has gradually expanded from a simple function optimization problem at the beginning to a wider application field. Various research results of the most advanced algorithm theory are introduced into PSO, such as the coevolutionary PSO with bottleneck learning, which uses the bottleneck objective learning (BOL) strategy for multiobjective optimization [23]; the fuzzy multiobjective feature selection method with PSO can achieve feature sets with excellent performance in approximation, diversity, and feature cost [24]; the dual substitution assisted cooperative PSO algorithm simultaneously obtains multiple competitive optimal solutions at a lower computational cost [25]; PSO based on adaptive parameters and strategies has good global and local search ability when it dealt with large-scale problems [26]; the performance optimization improvement of the neighborhood topology based on PSO facilitates the simulation and verification of various types of social systems [27]. These optimization supplements are essential experiences in expanding and deepening the research of PSO.

Through the standard particle swarm optimization algorithm, it is assumed that each particle swarm i in the swarm space represents a feasible solution in the solution space. In the space flight of a solution, each particle flies freely in the whole solution space at a certain speed. The speed direction and position are dynamically adjusted by one’s individual and group flight experience, so that they can be used for space information exchange [28].

In PSO, each particle i has four components: position , velocity , historical optimum , and historical optimum . The standard PSO search can be described aswhere . N is the number of particles in the group and D is the dimension of the particles. c1 and c2 are the acceleration constants. unifrnd1, and unifrnd2 are the two mutually independent and uniform distributions on random number [0 1].

It can be seen from equation (2) that the equation is divided into the following three parts in the right part, namely, the original velocity, the influence of the particles’ previous optimal position on the current position, and the influence of the historical optimal position of the particle population on the current position [29]. In a real natural social system, the long-distance transmission of information is affected by some huge social influence caused by spatial and geographical factors. Two or more individuals who are relatively close or adjacent to each other often transfer information immediately and obtain a large amount of identical information. Based on this principle, PSO based on area of influenceresearch is changed as follows [30]:where f (x) is a diagonal function defined as follows:

Here, c and e are the given constants, and ω0 is an adjustable parameter that represents the distance among particles.

Considering that f (x) does not have asymptotic properties, a kernel function is introduced, in which σ is a parameter that controls the size of the kernel window. The particle swarm velocity update formula of thenew PSO algorithm based on regional influence is as follows:where D is the Euclidean distance from the current particle position to the historical optimal position.

4. PSO-SA Algorithm

Based on the fast convergence ability of PSO and the ability of SA to jump out of local traps as well as find the global optimization, the standard particle swarm optimization algorithm is a simulated annealing particle swarm optimization algorithm with fast improvement performance by introducing an inertia weighting coefficient and a contraction weighting coefficientcombining with a simulated annealing algorithm for synthesis and improvement. By combining PSO with SA algorithm, more effective hybrid intelligent algorithm is obtained for more accurate solution. When the PSO evolution is stagnant, SA is used to optimize the detected global optimal position. Because the value of identification amplitude and phase, especially the value of phase, is relatively close, it is easier to jump out of local convergence by selecting random selection. Although it may increase the corresponding calculation time, it also makes the calculation results more accurate. The basic flow of the algorithm is as follows, and the basic process is shown in Figure 2.Step 1: The number of iterations of the current iteration particle is t1 = 1; the number of iterations of the maximum particle is Tmax. The current particle population is N and the current dimension is D.Step 2: Evaluate the fitness of each particle to obtain the historical optimal fitness and the global optimal population.Step 3: If it can meet the requirements, jump to Step 6 directly.Step 4: Make t1 = t1 + 1, and turn to Step 6 if it is reached to Tmax.Step 5: Update the position, move speed of particles, and turn to Step 2.Step 6: The number of iteration cycles of the current cycle is t2 = 1, and the maximum number of internal iteration cycles is T1max.Step 7: Calculate the fitness values and select the updated solution according to the Metropolis criteria.Step 8: If the solution cannot satisfy the requirements under this temperature range, make the solution t2 = t2 + 1. If t2 does not reach T1max, turn to Step 7.Step 9: Cool down and return to Step 7 until an ideal solution is obtained.

5. Harmonic Detection Based on PSO-SA Algorithm

Any periodic nonsine wave is defined as a periodic harmonic as long as it conforms to Dirichlet’s definition conditions. The total harmonic can also be simply expressed by any periodic fundamental sine wave plus a series of other sine waves. The definition standard is that “a harmonic is a sine wave component of a periodic quantity, whose frequency is an integer of the fundamental wave frequency.” Since the fundamental frequency range used for the generation of periodic harmonics must be a maximum integer multiple of the frequency amplitude of periodic fundamental waves, the phenomenon of high periodic harmonics is sometimes called high-order harmonics.

With the increasingly mature development of science and technologies of system application research methods in recent years, especially the further popularization and practical application of the nonlinear system load optimization technology, some high-order harmonics existing in the system of electrohydraulic servo shaker itself become more and more acute and complex. There are harmonics whose frequency is not only an integer multiple of power frequency but also a large number of noninteger harmonics. If harmonics of different frequencies can be located in different frequency bands, those including integer orders can be separated. Therefore, harmonic detections and analyses can be realized.

Due to the existence of nonlinear loads, the actual harmonic of a hydraulic servo system has characteristics including nonlinearity, randomness, and nonstationarity. Therefore, there are some nonstationary harmonic problems such as the waveform. Harmonics with a known magnitude and phase are as follows:where Xl and Φl (l = 1, 2, 3, …, n) are, respectively, the amplitude and phase of the lth harmonic; ω is the fundamental frequency.

Using the PSO-SA algorithm, the objective function value is optimized to make the relative difference between x (tk) and the expected value dk as small as possible. It is required that the corresponding parameters is obtained directly and quickly through harmonic detection. The basic method steps of optimization using the objective function method are as follows:(1)Establish an objective function according to the demandAssuming that the expected value of harmonics is x (tk), the actual sampling value is dk, and the established objective function is(2)The constructor, i.e., E = ξk, is processed with the objective function so that its minimum value corresponds to the optimal solution to the problem. From the formula and its corresponding derivations, it can be seen that the function E is monotonically decreasing. If and only if , E is the smallest, and the system reaches a stable point at this time.(3)Optimize the objective function using an optimization algorithm. The input vector is generated by referencing the harmonic. The error between the actual value and the estimated value is iteratively optimized using the algorithm. The harmonic detection problem is expressed as an optimization problem.

6. Case Analysis

Through an electrohydraulic servo shaker, the performance of a product itself is effectively tested, such as the vibration resistance to fatigue loads, so as to ensure that the product still satisfies the performance requirements of itself when being subjected to vibrations and impact loads. The electrohydraulic servo shaker is shown in Figure 3. A hydraulic system structure includes a hydraulic oil source, a hydraulic power mechanism, and a shaker control system. The hydraulic oil source system is generally composed of a hydraulic pump station, an accumulator, and an oil source control system, which provides necessary and stable hydraulic power for the vibration test system. The function of a variable piston pump is to provide a certain pressure and system flow for an accurate control of the entire hydraulic system. The flow and pressure change correspondingly at any time according to the actual hydraulic working conditions between different working conditions under the whole system.

The control system of a shaker is mainly composed of structural components such as an electrohydraulic servo valve, a connecting rod, a platform, and supports. The electrohydraulic servo valve plays the role of directly connecting the control electric signals as well as transforming and outputting them into the controlled hydraulic flow and pressure signals. The structure and composition of the control system are shown in Figure 4. The main components include a computer, a data acquisition card with complete functions such as digital to analog conversion, a signal conditioner, and various electronic sensors.

Considering that in the actual analysis and detection of harmonics, with the gradual increase of harmonic frequency detected by analysis, the harmonic frequency also increases accordingly. Therefore, a harmonic model for detecting the fundamental wave and the 2nd to 6th is established. Set the detected simulation harmonic source as follows:

The detected magnitude and phase based on the PSO-SA and PSO algorithm are shown in Figures 5 and 6, respectively. It can be seen from the two algorithms that in the process of amplitude and phase detection, the curve oscillation is small and the convergence time is short. The graph of the relationship between fitness and the number of iterations is shown in Figure 7. The convergence speed and accuracy of the POS-SA detection algorithm are better than those of the PSO detection algorithm. The comparison between the harmonic diagram based on the detected amplitude and phase and the actual harmonic is shown in Figure 8. Figure 9 shows the comparison error signal between the detection signal and the actual signal. It can be seen from the figure that the stable state is basically reached at the beginning, and the error value detected by the PSO-SA algorithm is smaller than that of the PSO algorithm. Figure 10 shows the waveforms of each order. Both algorithms can reflect the amplitude and phase characteristics of each harmonic. Table 1 lists the comparison results between the actual harmonic values and the detected values based on PSO-SA and PSO algorithm. The values are very close, and the PSO-SA algorithm detects harmonic information better than the PSO algorithm.

During the amplitude detection process, there is little fluctuation in the detection process, and the safety performance of the system itself is better; in the process of phase detection, the curve fluctuates slightly, tending to be stable in a very short time, and the convergence time is short, satisfying the detection requirements. The detection curve of fundamental wave and high-order harmonic detection should also be able to reach a stable state quickly and stably in a short time, with a detection speed that is almost the same. Meanwhile, with the gradual increase of harmonic number, the time spent does not increase significantly.

It can be seen intuitively from the actual operation and test that the simulation detection results obtained based on the PSO-SA algorithm have better convergence performance and robustness, achieving a faster convergence speed. The operation convergence time of the PSO-SA algorithm is reduced, and the solution results are more accurate than that of the PSO algorithm. Therefore, the optimal method based on the PSO-SA algorithm is more acceptable and easier to apply. From the basic steps and flowchart of the PSO-SA algorithm, the computational complexity of this algorithm has increased some computational steps. However, from the comparison curve between the fitness of PSO-SA and PSO and the number of iterations, it can be seen that the operation speed of iteration is not slowed down, and the convergence is achieved faster. However, if there are too many target values to be detected, the population number N needs to be increased accordingly, which may increase the calculation time and increase the complexity of calculation and application memory. Therefore, it is necessary to choose the detection number carefully.

7. Conclusions

With the increasingly extensive application of various hydraulic servo device technologies in the manufacturing of complex mechanical systems and the increasing requirements of nonlinear working loads, the harmonic conditions encountered in the system become more and more complex. The harmonic of the hydraulic system not only affects the output signal quality but also causes errors in the sensors and instruments. In the actual system operation, when a serious harmonic amplification occurs in equipment, the stable and safe operation of the system equipment itself is also endangered. In order to reduce the influence of the harmonic of the hydraulic servo system on the operation, it is important to detect the harmonic accurately and take corresponding measures to suppress it, so as to improve the output accuracy and quality.

Due to the inherent nonlinear effect of the hydraulic servo system, the input sinusoidal signal response is a time-varying signal. Therefore, the fast and accurate harmonic estimation algorithm is required. In this paper, the PSO-SA algorithm is mainly used for harmonic detection, and the SA algorithm is used to urge the PSO search in the stagnant stage, so as to jump out of the local extremum as much as possible. The comparison between PSO-SA detection and PSO detection simulation results shows that the PSO-SA detection time through this method is relatively short with small error, which can better meet the actual needs of the hydraulic system device for harmonic detection. However, a disadvantage is that the more sufficient the algorithm search is, the more likely it is to find the global optimal solution, meanwhile, also increasing the algorithm search time accordingly. In addition, whether this algorithm is suitable for more complex multidegree of freedom electrohydraulic servo system or not, it needs further verification.

An electrohydraulic servo shaker system is complex, and there are many requirements for nonlinear and driving control factors. In order to achieve the overall technical goal of correctly realizing analog input signals and reproducing the characteristics of input system signals as accurately as possible, many professional research fields are involved, which need to be further explored. The frequency response characteristics of signals on a multidegree of freedom shaker and the detection of harmonic characteristics of those are still in the research stage, and further relevant research as well as test work are needed.

Data Availability

Figures and equipment parameters data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that thy have no conflicts of interest.


This project was supported by the HTC3250μn precision NC lathe and turning center and is a subproject attached to the National Science and Technology Major Project (2009ZX04001-053) and the Scientific Research Support Plan of Shenyang Ligong University to introduce high-level talents (1010147001113).