Fault diagnosis method for attached lifting scaffold based on support vector machine

When the attached lifting scaffold fails in the process of high-altitude lifting operation, it mainly relies on instrument alarm and operator's experience to make simple judgment and treatment, which has great potential safety hazards and accident risks. In this study, a fault diagnosis method of scaffolding jamming based on improved particle swarm optimisation least squares-support vector machine (LS-SVM) is proposed, which can automatically diagnose the cause of the fault. The experimental results on construction site show that the method can accurately judge the overall overload, specific position overload, overall under-load, local deformation and displacement asynchronism faults occurring during the operation of scaffolding, and has higher diagnostic accuracy than the methods of back propagation neural network and standard SVM. It is significant to improve the safety level and operation efficiency of attached scaffolding.


Introduction
Attached lifting scaffolding in the main construction of high-rise buildings above 45 m can greatly save construction costs and improve construction efficiency, which has become one of the new technologies vigorously promoted by China's construction industry in recent years. There are dozens of control nodes on the frame attached to the lifting scaffold. Electric hoist, load sensor, displacement sensor and control instrument are installed at each node, and the lifting state of each node is controlled by a master computer [1]. Attached lifting scaffolding is prone to blockage, overload, under-load and local deformation in the process of highaltitude lifting operation. The existing fault handling mechanism is that if the load or displacement at a node exceeds the preset threshold, the control instrument at the node will send an alarm signal, and the electric hoist at all nodes will stop immediately. After the frame is stationary, the operator needs to find the alarm node, and then according to experience to analyse the causes of the failure, after eliminating the fault, restart the frame. However, this fault judgment and handling mechanism mainly relies on the experience of operators, has great randomness, and has great potential safety hazards and accident risks [2][3][4][5].
Aiming at the above problems, a fault diagnosis method for attached lifting scaffolding based on support vector machine (SVM) is proposed in this paper. Since the fault diagnosis of attached lifting scaffolding belongs to the typical small sample pattern recognition problem, the introduction of SVM can effectively solve this kind of small sample, non-linear learning problem, so that the fault type can be quickly and accurately judged. Also the speed and accuracy of fault diagnosis can be further improved by choosing the appropriate optimisation algorithm to optimise the SVM. The diagnostic process is shown in Fig. 1.

Least squares support vector machine
At present, the main methods of pattern recognition are fuzzy theory, neural network and SVM, among which the fuzzy theory and neural network are based on the classification method of large samples, which are not suitable for the small sample pattern recognition problems such as gate jamming fault diagnosis [6,7].
SVM is a machine learning method based on the theory of Vapnik-Chervonenkis dimension and the principle of structural risk minimisation. It is very suitable for solving small sample, high dimension and non-linear practical problems, and has good generalisation ability, but it still has training speed for some largescale practical problems. But for some large-scale practical problems, the training speed is still relatively slow. The least squares-support vector machine (LS-SVM) transforms inequality constraints into equality constraints on the basis of classical SVM, and replaces the insensitive primary loss function with quadratic loss function. The quadratic optimisation problem is transformed into the solution of linear equations, which simplifies the calculation and improves the training speed. At present, it has been widely used in various fault diagnosis and prediction problems, and achieved good practical results [8][9][10][11].
LS-SVM maps the sample data {x i , y i } from the original space to the high-dimensional feature space F by using the non-linear transformation ϕ( ⋅ ). In this space, the unknown function is estimated by using (1) where ϕ(x) is a non-linear transformation function, ω is a linear regression coefficient, and b is a deviation. The optimisation problem is transformed into the following equation: where γ is regularisation parameter (similar to the penalty factor C in SVM); ξ i is regression error of model sample. In order to eliminate constraints, Lagrange function is introduced to solve (2) where a i is the Lagrange multiplier. According to the Karush-Kuhn-Tucker condition, the partial derivatives of ω, b, ξ and a are obtained and equal to 0. Equation (4): By eliminating ω and ξ of (4), the optimisation problem is transformed by solving the following linear equation: where Θ is a diagonal matrix with one diagonal element, are kernel functions, and y = y 1 , y 2 ⋯y n T , a = a 1 , a 2 ⋯a n T . Equation (5) obtains that the classification decision function of LSSVM is The commonly used kernels are sigmoid kernels, Fourier kernels, polynomial kernels and radial basis function (RBF) kernels. Since RBF has only one kernel parameter, which can reduce the complexity of the model, it is chosen as the kernel function, as shown in (7): At this time, the parameters that need to be determined are the parameters of regularisation and kernel function. In this paper, particle swarm optimisation (PSO) is used to optimise the above two parameters.

Basic particle swarm optimisation
PSO is an evolutionary computation technique proposed by Kennedy and Eberhart in 1995 to simulate the foraging behaviour of birds [12,13]. The classical PSO algorithm uses one particle to represent each solution in the solution space. In the D-dimensional space, the position of the first particle is expressed by vector

and its flight speed is expressed by vector
Particles calculate the quality of each position through a specific fitness function, so that they can get the best position they find p i and the global optimal position p g found by all the particles. In each iteration of the algorithm, particles update their positions and velocities according to the values of p i and p g . For the t + 1 iteration, the evolution equation of particles can be expressed as where w is inertia weight, which mainly balances global and local search ability; c 1 and c 2 are learning factors, which mainly regulate the maximum step size of particle flight; r 1 and r 2 are random numbers of mean and distribution between (0,1).

Improved particle swarm optimisation
The basic PSO algorithm is simple and practical, but it also has some shortcomings, such as easy to fall into local optimum, weak local search ability and slow convergence rate [14]. PSO algorithm must be improved in the application process, but because the algorithm used to improve PSO itself is more complex, and the operation time of the program after combining with PSO algorithm is longer, if the main work of the computer is to run the program and there is no real-time requirement for the operation results, the effect is better. Once the computer needs to run multiple functional programs at the same time and has strict real-time requirements for the operation results, its practical effect will be affected to a certain extent [15]. The fault diagnosis method of attached lifting scaffold proposed in this paper aims at practical engineering application. The fault diagnosis model should be packaged into a program function module and embedded in scaffold dispatching and monitoring software. Therefore, the fault diagnosis program cannot occupy too much hardware resources and computing time, otherwise the response speed of other function modules in the monitoring software will be greatly affected. The overall response speed of the monitoring software is reduced and the real-time adjustment of scaffolding operation status is affected. Through many experiments, the PSO algorithm is improved by the simple method of designing adaptive linear variable inertia weights.
Equations (10) and (11) of inertia weights w are as follows: where t is the current number of iterations and t max is the maximum number of iterations. Compared with other improved algorithms mentioned above, this algorithm is more suitable for the fault diagnosis program module of this design.

Input vector selection
During the operation of scaffolding, its operation state will be affected by its own gravity, inclination angle, wire rope tension, displacement speed of electric hoist, local deformation of scaffolding and other factors. If all factors are included in the input vector, the calculation complexity is very large and difficult to achieve. It is found that when the lifting scaffold fails, the most obvious change is the pulling force of the wire rope, and the measured value will increase sharply. The pulling force reflects the resultant force of the scaffold's own gravity, the resistance caused by blocking and the lifting force of the motor. In addition, the displacement of each sensor installation point is different, it will also make the scaffold have a certain inclination angle, so it will also have an impact on the overall force of the scaffold. After comprehensive consideration, the four indicators of the scaffolding, i.e. the most left node cable tension g1, the most right node cable tension g2, the most left node displacement h1 and the most right node displacement h2, are selected to form the eigenvector, and normalised as the input vector of LS-SVM.

Data normalisation
The input vectors for scaffolding fault diagnosis are composed of tension and displacement values, and their data dimensions are different. Support vector machines are most sensitive to data between 0 and 1. Therefore, before input data to support vector machines training, data need to be normalised, as shown in (11) where x is the data before normalisation; x′ is the data after normalisation; x min and x max are the minimum and maximum values of samples, respectively.

Classification and recognition of LS-SVM
LS-SVM in scaffolding fault diagnosis model is no longer a twoclass problem, but a multi-class problem. For multi-class problem, LS-SVM can adopt three methods: one-to-one, one-to-many and decision guide acyclic graph. By comparing its performance, this paper adopts a one-to-one method, that is, if the type of fault is k, then we need to construct a binary classifier. When categorising, the sample data are input and the results are voted, which categorisation is determined according to the number of votes obtained.

Improved particle swarm optimisation for LS-SVM
In LS-SVM classification model, regularisation parameter γ and kernel function parameter σ have great influence on classification performance. Therefore, the improved particle swarm optimisation algorithm is used to optimise the LS-SVM classification model. The specific steps are as follows: • Step 1: PSO population size, initial position and speed, iteration times and other parameters are initialised. • Step 2: The fitness of each particle is calculated. If the current fitness of the particle is better than its historical optimal fitness, the optimal position of the particle is updated to p i . • Step 3: Comparing the fitness value of each particle's optimal position with that of the whole population's optimal position, if the fitness value is better, the population's optimal position p g is updated. • Step 4: The particle position x i (t) and velocity v i (t) are updated according to Step 2 and Step 3. • Step 5: If the current number of iterations reaches a maximum, go to Step 6; otherwise go to Step 2 to continue the search.
• Step 6: k(k − 1)/2 binary classifiers are constructed by using the optimal model parameters to realise the fault diagnosis of attached lifting scaffolding.

Results and analysis of typical fault diagnosis of scaffold
In order to verify the validity of the above diagnosis model, 240 sets of data were selected as training samples and 120 sets of data as testing samples in the operation records of a building with attached lifting scaffolding installed in a construction site from 2017 to 2018. On the construction site, scaffolding monitoring system consists of force sensor, monitoring instrument, communication cable, motor and hinge, as shown in Fig. 2.
According to the common causes of gate blocking failure, the operation status of the gate is divided into six categories: normal operation, blocking operation, partial overload, partial underload, scaffold deformation and displacement asynchrony, which are expressed by A1-A6, respectively. The corresponding relationship between the fault type and the normalised values of each component in the input vector is shown in Table 1.
The number of initial particle population is set at 120; the learning factor is c 1 = c 2 = 2; the inertia weight is calculated by formula (10) and the maximum iteration number is set at 600. The optimum parameters are obtained by parameter optimisation: γ = 0.0453, σ = 0.8896. By training and testing the back propagation (BP) neural network and standard SVM (γ = 1, σ = 1) respectively, the results show that the LS-SVM classification accuracy based on improved PSO is significantly higher than other algorithms, and the results are shown in Table 2.

Modularisation of fault diagnosis program
After the establishment of scaffolding fault diagnosis model, in order to embed it as a function module into scaffolding dispatch monitoring software compiled by LabVIEW and realise automatic fault diagnosis function, three methods can be adopted: (i) Compile algorithm program in MATLAB software in normal way, and then call MATLAB through specific MATLAB Script nodes in LabVIEW, so as to run the algorithm program. (ii) Direct use of a support vector machine add-on package provided by LabVIEW -LIBSVM. (iii) The algorithm program is reconfigured and compiled according to LabVIEW programming mode, and the fault diagnosis model is packaged into a functional sub-VI, which is called directly in the main VI.
The first method mentioned above is the simplest and convenient to implement. It is enough to add a MATLAB script node to the main program of scaffold dispatching and monitoring software. However the disadvantage is also very obvious, that is, the speed of call is relatively slow, and it will occupy a large amount of computer hardware resources, which will have a greater impact on the operation of other functional modules in the monitoring software. If it is only used as algorithm simulation and  experiment, it is not necessary to do so, but it is not reliable in realtime monitoring program. The second method seems convenient, because there are many related functions that can be called directly, and these functions are called in the way of sub-VI or DLL, there is no problem of slow response in the first method. However, when used in practice, it will be found that the interface of the SVM function provided by this package is not flexible, and it is not easy to modify according to its own specific needs, and it only provides some related functions of SVM, but does not provide support for PSO and other algorithms.
The third method is relatively complex to implement, because most programs need to be rewritten and compiled according to LabVIEW's G language form, and the workload is relatively large. However, the advantages are also very obvious. Firstly, the seamless connection between the diagnosis model and the main program is realised, which greatly improves the overall response speed of the program and meets the real-time requirement of regulating the running state of scaffolding. Secondly, the interfaces of all functions can be freely defined, flexibly configured and used according to specific needs, and the commonly used functions can be played. After wrapping it into sub-VI, it will be convenient to call it directly in other programs.
Through the above analysis, the third method is used to modularise the diagnosis model. In the process of programming, considering that the operation time of fault diagnosis program is relatively long, multithreading programming technology in LabVIEW is used. The fault diagnosis program is placed in a separate thread and runs in parallel with the main thread. After each operation, the result of the operation is passed to the main thread through a flag bit and a value attribute node of a special variable. According to the result of calculation, the main thread displays the fault type in the main interface and warns the operator, or sends the emergency stop command directly to the control instrument to cut off the power supply of the hoist. The average response time of the fault diagnosis program is 18.53 s on a Windows 10 (64 bit) operating platform with Intel 2.70 GHz dualcore processor and 8 GB memory.

Conclusion
Aiming at the disadvantage of scaffolding fault diagnosis mainly depending on expert experience and low efficiency of manual diagnosis, a scaffolding fault diagnosis model based on improved PSO LS-SVM is established, and LabVIEW program module is made and embedded into scaffolding monitoring and dispatching software to realise automatic diagnosis and treatment of gate blocking fault. Practical application in construction site shows that the model is not only accurate in diagnosis, but also the average time of diagnosis is only 18.53 s, which improves the accuracy and efficiency of diagnosis compared with previous artificial diagnosis methods.

Acknowledgments
This work was supported by Educational Commission of Anhui Province of China (GXYQ2017098, KJ2017A565, and KJ2018A0566).