Research and Application of Haar Wavelet Transformation in Train Positioning

With the continuous increase of the urban population, urban traffic problems have become increasingly prominent. )e subway and light rail have the characteristics of large passenger volume and low pollution, which are the preferred solutions to solve the traffic problems in large and medium cities. Due to the high density of rail transit trains, the close distance between stations, and the high safety requirements, the real-time and accurate determination of the train’s position on the line is the premise to ensure safety, maximize efficiency, and provide the best service. How to accurately detect the speed and position of the train to control its the operation is the core content of the rail transit system.)erefore, the in-depth study of train positioningmethods has great and far-reaching significance for promoting the research of train operation control system and the development of rail transit system. It has become a research hotspot to rely on computer technology and image recognition technology to realize precise positioning of trains. In order to realize the real-time precise positioning of the train, this paper proposes a train positioning method based on Haar wavelet transform. First, the samples are obtained by the method of video acquisition, and the video images are initially processed by binarization. Second, the image is compressed, denoised, and enhanced by Haar wavelet transform, and the train number is determined. Finally, the orbital electronic map and satellite assistance are used to determine the position of the train and realize the train positioning. )e simulation experiments show that the image acquired by Haar wavelet transform can accurately identify the train and track. Based on the satellite aid of the orbital electronic map, the train positioning can be accurately realized, and the proposed Haar wavelet transform is proposed and has good positioning accuracy.


Introduction
With the rapid development of railways and the increasing speed of operation, safety has become the primary issue accompanying the development of railways. e safety guarantee is first and foremost an accurate and efficient train positioning system. e train positioning system is a very important link in the railway operation automation system. It makes the integration of dispatching command and operation more automatic and improves the operation efficiency and safety. In short, the train positioning system can determine the specific position of the train on the line and has the functions of supervising and controlling the speed of the train. e key to ensuring the safe operation of railways [1][2][3] is to have a high-performance train operation control system. e train control system passes the train speed. e information such as the train position is accurately grasped to realize the safety report on the train operation. As the train continues to increase speed, the equipment and system related to the safe driving must also be guaranteed, such as the positioning accuracy and reliability of the train. At present, train control systems in many countries adopt ground transponder-assisted wheel sensors to achieve train positioning. Due to the large amount of ground equipment used, this requires not only a large amount of capital to build facilities, but also a large amount of personnel management costs and material costs. And it takes a lot of time to maintain it constantly. At the same time, the construction cycle is relatively long, which will increase the cost of railway operations. erefore, there is a need to find new ways to optimize train positioning. In order to prevent sudden power equipment failures and safety accidents, it is necessary to conduct regular and irregular regular inspections of important substations and lines. It is possible to detect potential safety hazards in time and eliminate the safety accidents in the bud. As a result, the reliability of the grid operation will be improved. In recent years, the Beidou satellite navigation [4,5] system independently designed and developed by China has been continuously improved and developed, which promotes the further development of GNSS, and its application range is more spreading, such as in surveying, transportation, public safety, agriculture, and natural disaster detection. erefore, the application of Beidou satellite navigation system in train positioning has also received extensive attention. In order to improve the autonomy of China's railway train control system, more and more people are studying the research of Beidou satellite navigation system in train positioning.
Image-based positioning methods in current technology fall into three categories. (1) A region-based approach: this type of method divides the image into multiple regions by utilizing grayscale similarity or clustering of colors and then acquires the target region for certain characteristics. However, the method is highly targeted and utilizes the characteristics that the background is relatively simple and the color information is rich. When the car number color is determined and there is a large difference from the vehicle body, the candidate feature can be quickly determined employing the color feature and its shape characteristics. However, this method has higher requirements for the contrast between the target and the background, and the anti-interference ability is weak. erefore, the application of this algorithm is narrow and needs to rely on excellent image quality. (2) Edge-based positioning method: the edges contain information such as direction and step properties.
e extraction of such information is often done by using edge operators (Canny, Sobel, Robert) [6][7][8][9][10][11]. is type of method takes advantage of the high contrast between the target and the background at the edge of the target to obtain the gradient information; at the same time, it also has a good performance in resisting noise interference. However, if the edge information is proliferated in a complex scenario, then only the edge information is used as the judgment basis without excluding the irrelevant area in advance, which greatly increases the calculation amount of the character area positioning, reduces the positioning efficiency and accuracy, and increases the candidate area. It is difficult to determine the final license plate location. (3) Texture-based [12][13][14] positioning method: this method completes the positioning by distinguishing the background by the unique texture features of the target area. at is, when the target texture is strong and the texture of the background is relatively weak, this method can be adopted. However, when the texture is similar, it is easy to extract the pseudo target. At the same time, the biggest disadvantage of this method is the high computational complexity.
At present, the most commonly used positioning algorithms based on the above three methods are as follows: (1) Edge detection method: the method is based on the fact that the license plate area has more dense edges than the background. rough the vertical edge detection, the area in which the edge density is within a certain threshold is found in the image, and the geometric features of the license plate are filtered according to these areas to complete the positioning. However, in the case where the background image is complicated, the method is susceptible to interference and affects the positioning accuracy.
(2) Interlaced statistical edge method: the method is also carried out by enriching the edge information of the license plate area, scanning the image every N lines, obtaining the number of edge points of the line, and determining whether the threshold value is exceeded, thereby determining whether the license plate area is found. e positioning accuracy is closely related to the shooting distance and the size of the license plate, which has greater limitations and is greatly affected by the background image. (3) Straight line detection method: this method uses the Hough transform to detect the license plate frame for positioning. But this method will be difficult to work with when the license plate border is blurred, tilted, or twisted. (4) A positioning method based on mathematical morphology: this method employs the geometric characteristics of the license plate and its characters for positioning. is method is fast, but when the image is rotated, it will greatly affect the accuracy of the positioning. (5) Color-based positioning method. e key to the success of this method is the uniqueness of the license plate color. However, in the natural scene, the complexity of the background and the diversity of the license plate make the lack of accuracy and robustness of the method difficult to use.
During the running of the train, the data obtained by the accelerometer, the gyroscope, and the GPS receiver are subjected to discrete wavelet transform, and the components of different frequencies in each signal are decomposed into mutually nonoverlapping frequency bands. e processed data are subjected to data fusion by Kalman filtering, inputting the output of the filter to the map matching module, and determining the most likely driving section and the most likely position of the train in the section by an appropriate matching process. Finally, the matching position result is used to estimate and correct the GPS error through the negative feedback module to realize the effectiveness of the train combination positioning data. During the research, it was found that the Beidou navigation system realizes the train positioning. Like the problems faced by the global satellite navigation system, the Beidou satellite navigation is encountered when the train 2 Mathematical Problems in Engineering encounters more and more complicated geographical conditions during the whole journey. As a new positioning system, the system is also affected. erefore, in view of the above situation, the researchers began to explore the use of other auxiliary methods to solve the problems of these navigation systems, such as the use of inertial navigation system to assist the positioning of the train, but in the process of use, it is found that the positioning method has integral error in the use process. As the error increases, it will eventually cause deviations in the positioning results. Wavelet Transform [15] is an analysis method different from Fourier transform. It inherits and develops the idea of Fourier transform, but it also overcomes the shortcomings of the window size of Fourier transform and frequency conversion. A time-frequency analysis window that varies with frequency can be provided. e multiresolution analysis of wavelet transform has good characteristics of time domain and spatial domain. It can focus on the arbitrary details of the analysis object by using the gradually refined time domain or spatial wavelength of different frequency segments of the signal. It is therefore particularly suitable for handling nonstationary signals. In addition, wavelet transform has been applied to many fields such as speech recognition, computer vision, signal detection, and image processing. Wavelet transforms can also be divided into many classes, including classic wavelets, also known as primitive wavelets. Such wavelet transforms include Haar wavelet [16], Morlet wavelet [17][18][19], Mexican hat wavelet [20,21], and Gaussian wavelet [22,23]. e second type is orthogonal wavelets constructed by Daubechei. ese orthogonal wavelets are different from classical wavelets. ey are generally not given by a simple expression, but are generated by a weighted combination of expressions called "scalar functions". e third is a biorthogonal wavelet constructed by Cohen and Daubechies. e wavelet is proposed to obtain a linear phase wavelet and a corresponding filter bank under the condition of relaxing wavelet orthogonality.
Compared with the Fourier transform, the wavelet transform is a local transform of space (time) and frequency, so it can effectively extract information from the signal. Multiscale detailed analysis of functions or signals can be carried out by means of operations such as scaling and translation, which solves many difficult problems that cannot be solved by Fourier transform. Wavelet transform links applied mathematics, physics, computer science, signal and information processing, image processing, seismic exploration, and other disciplines. Mathematicians believe that wavelet analysis is a new branch of mathematics, which is the perfect crystallization of functional analysis, Fourier analysis, spline analysis, and numerical analysis; signal and information processing experts believe that wavelet analysis is time-scale analysis and multiresolution analysis. It has achieved scientifically meaningful and valuable results in research on signal analysis, speech synthesis, image recognition, computer vision, data compression, seismic exploration, and atmospheric and ocean wave analysis. e main purpose of signal analysis is to find a simple and effective signal transformation method, so that the important information contained in the signal can be revealed.
In order to realize the precise positioning of the train, this paper proposes a train positioning technology based on Haar wavelet transform combined with Haar wavelet transform. e specific contributions of this paper are as follows: (1) e sampled samples are obtained by the method of video acquisition, and the video images are initially processed by binarization (2) e image is compressed, denoised, and enhanced by Haar wavelet transform, and the train number is determined by identifying the train number of the train (3) e position of the train is determined by matching the electronic map of the track and satellite assistance to achieve train positioning

Wavelet Transform Method for Train Positioning
A wavelet is a function defined at a finite interval and whose mean is zero. It has a finite duration and abrupt frequency and amplitude, and the waveform can be either irregular or asymmetrical, but with an average amplitude of zero over the entire time range. e basic idea of wavelet transform is to utilize a family of functions to represent or approximate a signal. In wavelet transform, the approximation is the coefficient produced by the large scaling factor, representing the low frequency component of the signal; the detail value is a coefficient produced by a small scaling factor, denoting the high-frequency component of the signal. e wavelet transform is actually a combination of windowing techniques and variable-size windows, which allows large windows to be employed when it is desired to accurately observe low-frequency information, and small windows when observing high-frequency information. After wavelet transform, the signal can reveal many aspects of the signal, such as signal trend, break point, and discontinuity generated by high-frequency part and self-similarity, which are often ignored in other analysis methods. In addition, because wavelet transform can provide different observation angles of signals than other traditional methods, it can often compress and denoise signals without significantly reducing the quality.

Wavelet Transform.
Wavelet transform is an important analysis tool applied to image processing. e multiresolution characteristic of wavelet analysis makes the highfrequency wavelet coefficients of the wavelet decomposition coefficients have different characteristics in different directions. erefore, it is one of the development trends of wavelet denoising to use directional wavelet to reflect the situation that the image changes in any direction at different resolutions to use local closed values for denoising. e multiscale decomposition characteristics of wavelet transform are more in line with the human visual mechanism. After the character image is transformed by wavelet, it is very easy to extract the horizontal and vertical strokes, and it is concise and clear. Wavelet grid feature extraction and wavelet elastic grid feature extraction based on wavelet transform combine the advantages of statistical features and structural features. It is suitable for the classification idea from coarse to fine in character recognition, so it has become a development trend.
In fact, the application fields of wavelet analysis are very wide, including many subjects in the field of mathematics; signal analysis, image processing; quantum mechanics, theoretical physics; military electronic countermeasures and intelligence of weapons; computer classification and recognition; music and language artificial synthesis; medical imaging and diagnosis; seismic exploration data processing; and fault diagnosis of large machinery. For example, in mathematics, it has been used for construction of fast numerical methods, curved surface construction, differential equation solving, and cybernetics in numerical analysis; filtering, denoising, compression, and transmission in signal analysis; and image compression, classification, recognition and diagnosis, and decontamination in image processing. In medical imaging, it can reduce the time of B-ultrasound, CT, and MRI and improve the resolution.
From the point of view of image processing, wavelet transform has the following advantages: (1) Wavelet decomposition can cover the entire frequency domain (2) Wavelet transform can greatly reduce or remove the correlation between different extracted features by selecting appropriate filters (3) e wavelet transform has the "zoom" feature, which can use high frequency resolution and low time resolution (wide analysis window) in low frequency bands, and low frequency resolution and high time resolution (narrow analysis window) in high-frequency bands (4) ere is a fast algorithm in the realization of wavelet transform Multiresolution analysis is also called multiscale analysis by many scholars, which is a very prominent feature of using wavelet transform in signal processing. e basic idea of multiresolution analysis is to divide the data signal into several signals according to different resolutions and then process them on the signals corresponding to different resolutions or required resolutions.
ere is a more appropriate analogy; that is, the scale can be understood as the lens of the camera. If the scale changes from large to small, then it is equivalent to the lens of the camera approaching the object from far to near and vice versa; it is moving away from the object from near to far. In the large-scale space, it is shown as observing the target at a distance, and at this time, only the basic situation of the target can be seen roughly; in the small-scale space, it is shown as detecting the target at a closer distance, and at this time, it can be seen carefully, a specific part of the target. erefore, when we convert the scale from large to small, we can detect the target data signal from rough to fine, which is the basic idea of multiresolution analysis.
Wavelet transform is a localized analysis of spatial (time) frequency, and its mathematical description is as follows.
e function Φ(t) ∈ L 2 (R) is called a basic wavelet or a mother wavelet, and the function cluster of the basic wavelet that is shifted and stretched is called a continuous wavelet, where a is the scale parameter, a ∈ R, a ≠ 0; b is the translation parameter, b ∈ R. e wavelet transform of a function or (1) For mathematical convenience, the wavelet transform can also be expressed as a is the stretch factor, bis the translation factor, where Φ s (x) � 1/sΦ(x/s), and s is still a scale parameter.

Haar Wavelet Transform.
e Haar wavelet function is the simplest orthogonal function. Compared with other orthogonal functions, it has the characteristics of simple structure and convenient calculation. erefore, the Haar wavelet function has attracted widespread attention. Alfréd proposed Haar wavelet transform in 1909, which is the simplest method in wavelet transform. It is a special case of wavelet N � 2, which can be called D 2 . e mother wavelet of the Haar wavelet can be expressed as And the corresponding scaling function can be represented as

Its filter h[n] is defined as
Among all orthogonal wavelet transforms, wavelet transform is the simplest one. It is the only orthogonal wavelet with both symmetry and finite support, and it has applicable features of simple calculation, high efficiency, and better programming.

Selection of Optimal Wavelet Basis.
e GPS data processing based on wavelet transform is based on the wavelet transform of wavelet transform phase double-difference observation, and the selection of wavelet base affects the distribution of wavelet coefficients to some extent. us, good or bad wavelet base will directly affect the outcome of the process.
In the process of noise reduction, we need to focus on two points when determining the wavelet to be used. First, the wavelet needs to have good noise reduction correlation; that is, the wavelet coefficients that approach zero after wavelet transformation should be as many as possible. Second, after using the wavelet for noise reduction, our viewing effect needs to be considered. erefore, it is very important to determine the wavelet that meets the actual needs.
e choice of wavelet basis usually considers the following five criteria. (1) Orthogonality: strict normative orthogonality is beneficial to the accurate reconstruction of wavelet decomposition coefficients. Orthogonal and bioorthogonal are necessary conditions for selecting wavelet base in multiscale analysis methods. (2) Tight support: the tightly supported wavelet satisfies the requirement of spatial locality.
e narrower the support width, the better the localization characteristics of the wavelet, the lower the computational complexity of the wavelet transform and the faster implementation. (3) Regularity: it is a kind of description of the smoothness of the wavelet function. It is very useful for the reconstruction of the signal to obtain a better smoothing effect. e larger the regularity order, the better the regularity. (4) Symmetry: choosing a wavelet function with symmetry or antisymmetry can avoid distortion of the signal in multiscale decomposition and reconstruction, thus obtaining high quality reconstructed signals. (5) Vanishing Moment: the vanishing moment indicates the concentration of energy after wavelet transform. When the order of vanishing moment is large, the values of the high-frequency part at the fine scale are negligibly small. erefore, after the wavelet base with larger vanishing moment is decomposed, the signal concentrates the energy more. e eight wavelet bases (wavelet systems) commonly utilized in the MATLAB toolbox are Haar, dbN, biorNr, Nd, CoifN, symN, morl, mexh, and meyer, and their main features can be found in the literature. e GPS data processing based on wavelet transform depends on carrier phase double-difference measurement for wavelet decomposition and reconstruction. erefore, the selected wavelet base should have the characteristics of discrete wavelet transform, and it has orthogonality and symmetry. In the GPS fast precision positioning data processing, four wavelet basis functions such as Haar, dbN, CoifN, and symN can be selected. (1) Provide a basis for ensuring safe train separation (2) Provide accurate position information for the train automatic protection (ATP) subsystem, as the basis for calculating the speed curve of the train, opening the door after the train stops at the station, and shielding the door inside the station (3) e train precise position information is provided for the automatic train operation (ATO) subsystem as the main parameter for automatic speed control (4) Train position information is provided for the automatic train monitoring (ATS) subsystem as basic information for displaying the running status of the train (5) In some CBTC systems, it is used as the basis for wireless base station connection (6) In some ATC systems, section occupancy/clearing information is provided as a basis for sending track detection information and speed control information

Train Positioning Technical Requirements
(1) Accuracy: the accuracy of the train positioning system needs to meet two different requirements: one is the longitudinal positioning accuracy of the train on the same track and the other is the lateral positioning accuracy of the train between different tracks (2) Continuity: the positioning system must have the ability to perform train positioning without any interruptions; that is, it has good availability over time (3) Coverage: regardless of whether the train is operating in any geographic area, the location information must be provided to the ATC system without interruption; that is, there is good availability in space (4) Reliability and safety: the positioning system is independent of other subsystems of the train automatic control system. It has the ability to work continuously and can detect and report its own failures (5) Maintainability: the design and utilization of the positioning system must take into account factors such as preventive maintenance and corrective maintenance, thus minimizing the life cycle cost of the positioning system (6) Failure-safety: when the positioning system fails, the system cannot detect the "no car" notification information, but must have corresponding measures to ensure the safety of the train.

Train Positioning System
Features. Unlike conventional road vehicles that project in two-dimensional planes, high-speed trains are one-dimensional motions on existing orbits, and the presence of rails has a strong constraint on trains. us, compared with the social vehicle positioning Mathematical Problems in Engineering system, the train positioning system has several remarkable features.
(1) How the Coordinate System Is Defined. e train operation can be described as a reference point of the track, extending in a one-dimensional position along the running direction of the train. erefore, the coordinate system in which the train runs can be regarded as taking the position of the track as the origin (generally taking the kilometer as 0). e one-dimensional reference system is along the track direction, and the description of the train position refers to the relative distance between the train running on the track and the origin. erefore, in the position calculation result, the traditional vehicle positioning coordinate system describes the three-dimensional space (navigation coordinate system) in the ellipsoid coordinate system. For high-speed trains, the position estimation result requires to be mapped to the special coordinate system of the train operation by means of coordinate conversion.
(2) Operating Environment. Compared with road vehicles, trains have long running time, fast speed, wide distance extension, long radiation, and large vibration. eir motion cannot be regarded as a translation of a mass point. Rails have strong restraint ability for train operation. erefore, the positioning system needs to consider the processing of multisource noise and propose a reliable information fusion and fault handling strategy. In order to ensure the continuity of positioning, it is necessary to consider the positioning system to be safe and reliable under different harsh environments (such as satellite signal loss and sensor failure).
(3) Security Level. Safety is the primary prerequisite for railway operation. Compared with road vehicles, its safety level is higher, and its location service is closely related to railway system safety applications. Due to the higher running speed of the train and the longer body, it is necessary to add a longer safety redundancy distance at the front and the rear of the train after calculating the train position, forming a one-dimensional safety envelope and reducing the impact of calculation error on the safety of position information.
After the above analysis of the characteristics of the system, there is a big difference between the high-speed train combined positioning system and the traditional road vehicle positioning system. erefore, we must comprehensively consider the characteristics of the train operation and the functions expected to be realized. On the basis of the traditional navigation framework, considering the particularity of the train, we cannot simply copy the original combined positioning method. Based on the premise of safety, we design a train combination positioning system with high precision, strong real-time, and high continuity.

Car Number Positioning and Binarization.
Due to the large color of the body and the number of the passenger train, the illumination changes greatly, and the traditional positioning algorithm is often not ideal. In this paper, wavelet decomposition and morphological processing are introduced to complete the car number location, and the binarization algorithm based on local gray mean and standard deviation is used to threshold the car number. According to the texture analysis experiment of the car number region, this paper selects the two-layer decomposition detail signal for the car number positioning after the preprocessed car number image. e algorithm steps are as follows.
(1) e Haar wavelet is utilized to perform two-layer decomposition on the preprocessed image to extract vertical high-frequency components.

Establishment of Station Equation.
In urban rail transit, the momentum of the train is large, and the operation of the train must follow relevant guidelines and regulations. Under normal conditions, it is a constant speed operation and equal acceleration operation, and the uniform motion model can be considered as a uniform acceleration motion model with acceleration of Gaussian white noise. erefore, it is more suitable to describe the motion state of trains in urban rail transit by using uniform acceleration motion model. at is, where l v a are the position, velocity, and acceleration components of the train. Let w(t) be a Gaussian white noise, which is equivalent to the random disturbance acceleration. It can be seen that the acceleration of the train is the source of changing the train state.
en the station equation is 6 Mathematical Problems in Engineering _

X(t) � AX(t) + Bw(t). (8)
Discretization is done, taking T � t k − t k−1 , an iterative formula based on velocity and acceleration: where l(k) v(k) and a(k) are the position, velocity, and acceleration components of the train at time k; w l (k) w v (k) and w a (k) are system noises that affect train position, velocity, and acceleration at time k, respectively. It is expressed as the following matrix: en, X(k) � ΦX(k − 1) + ΓW(k − 1).

Establishment of Measurement Equation.
e measurement equation for the axle speed sensor is e accelerometer's measurement equation is e measurement equation of the Doppler radar speed sensor is where V(k) is measurement noise, and H(k) is the measurement matrix. In summary, the common station equation of the system is e observation equation for each sensor is

Map Matching Positioning Technology.
Since the train runs on a definite track, the motion of the train can be seen as moving back and forth on a definite line-i.e., "one-dimensionality." According to railway conventions, the location of trains on railway lines is expressed using kilometer markers; when using the navigation system for positioning, the receiver receives three-dimensional information (latitude, longitude, and altitude). erefore, when using the navigation system to determine the train position, the latitude and longitude information of the receiver needs to be converted into the kilometer mark required by the railway. e storage method of digital track map is to use the collection of sampling points to form railway lines from points to lines. is approach can not only describe the information of the railway line completely, but also help to realize the transformation of geographic information coordinates and one-dimensional coordinates of the railway line. e digital map is involved in train positioning, which can effectively correct errors and improve the integrity of the entire system. Map matching is a positioning method based on software correction. e train positioning trajectory measured by the GPS/DR is associated with the road network in the digital map, and thereby the position of the vehicle is determined relative to the map. Further correction of the GPS/ DR combined positioning result by map matching can improve the accuracy of the entire system again. e map matching principle is shown in Figure 1.
As shown in Figure 1, the line is simple due to the multiline and easing curve of the railway line. Utilizing the vertical projection method, the coordinates of the position of the train measured under the GPS/DR combined positioning condition are (X C , Y C ). Query the digital electronic map database of the train is to find the two-point coordinates closest to the measurement position on the trajectory

Simulation Environment and Parameter Settings.
e algorithm proposed in this paper is carried out in the Intel Core i5-3230M CPU, 2.6 GHz, 4 GB memory platform, Matlab2.14a simulation environment. In the experiment, a train track with a length of 1000 m (where both linear and curved tracks are 1000 m) is selected, and a certain number of anchor nodes are deployed beside the track. e parameters are set as follows.
(1) Anchor node communication radius: in this experiment, the communication radius of the anchor node is set to R � 50m for the first time; then, the communication radius of the anchor node is changed sequentially in the range [30, 70] at 5m intervals, and the influence of the communication radius on the positioning accuracy of the train is observed.
(2) e location information of the anchor node itself has been hard coded into its control chip prior to deployment. e error of the anchor node's own position and the influence of environmental factors are not considered.
(3) Anchor node deployment density. In the experiment, the deployment density of the anchor nodes (the distance between adjacent anchor nodes) is set to d 1 � 1m, and then the deployment density is changed within the range [1,15] to observe its influence on the train positioning error. (4) e running speed of the train: set the running speed of the train to v � 30m/s for the first time, then change the running speed in the range [10,45] and observe its influence on the train positioning error.
Here, the maximum running speed of a normal train is 160km/h (i.e., 45m/s). (5) e scanning period of the gateway sensor is T � 1s.
At each prediction step, the noise in the motion model is randomly selected from the range (0.5, 1). e parameter settings used for the specific algorithm simulation are shown in Table 1.

Simulation Analysis.
In the simulation experiment, the root mean square error (RMSE) is used to measure the positioning accuracy, which is defined as where (x k , y k ) and (x k , y k ) are the true position and estimated position of the train at time k, respectively.

Image Preprocessing.
In the whole process of image processing, noise has a certain influence on all steps, including input and output and steps in all aspects. erefore, a good image processing system will put noise reduction in a very critical position. Basically, most of the noise cannot be described by a certain rule, so no filter can be effective for any kind of noise in the past. According to different methods, it can be divided into many kinds: additive noise model, multiplicative noise model, Gaussian noise model, and so on. Subjective evaluation and objective evaluation are two more common evaluation criteria for image noise reduction. e subjective evaluation method requires us to directly observe the target with the naked eye and judge the visual effect of the target according to a specific standard, which is a qualitative evaluation. For subjective evaluation, let a certain number of testers observe the target image after noise reduction with the naked eye and then score according to established criteria, such as sharpness, brightness, hue, and softness, and then combine the scores of all testers, so that an evaluation result of the noise reduction effect of the target image can be generated. e objective evaluation method is to use the objective indicators of the image after noise reduction to measure the noise reduction effect of the image, including the measurement of noise reduction ability and image clarity after noise reduction, which is a quantitative evaluation.
In order to highlight the useful features in the image of the power device, it is necessary to preprocess the image. e following is a simulation to illustrate the preprocessing of the power equipment image, which is beneficial to the subsequent image feature extraction.
In the paper, the image is grayed out before filtering the image. e result is shown in Figure 2, where Figure 2(a) is the original image and Figure 2(b) is the grayscale image. As can be seen from Figure 2, the grayscale processing reduces the three-dimensional original image to a two-dimensional grayscale image, but the image basic information is retained without affecting the contour change of the image.

Mathematical Problems in Engineering
In digital image processing, binary image occupies a very important position. First, the binarization of the image facilitates further processing of the image, making the image simple, and the amount of data is reduced, which can highlight the contour of the target of interest. Secondly, to process and analyze the binary image, firstly, the grayscale image is binarized to obtain a binarized image. All pixels whose gradation is greater than or equal to the threshold are determined to belong to a specific object, and their gradation value is 255. Otherwise, these pixels are excluded from the object region, and the gradation value is 0, indicating a background or an exceptional object region.
At the same time, before the image processing, the image is binarized. e result is shown in Figure 3. Figure 3(a) is the original image, and Figure 3(b) is the grayscale image. Image binarization is to set the gray value of the pixel on the image to 0 or 255, which is to show the whole image a distinct black and white effect. A grayscale image of 256 brightness levels is selected by appropriate thresholds to obtain a binarized image that still reflects the overall and local features of the image.
Neighborhood mean filter is a noise reduction algorithm that appeared earlier and is easier to implement. It belongs to a linear low-pass filter. e brief idea of this method is to replace the value of the unknown point with the mean value of multiple points near the desired point, and the number of pixel points used to obtain the mean value is determined by itself according to the specific situation. e median filter is a relatively good image noise reduction algorithm. It is similar to the neighborhood mean filter described above in that it also belongs to window type noise reduction. e difference is that the mean was replaced by the median. e basic idea of threshold noise reduction is related to the properties of the coefficients used in the noise reduction process. First, the original input data are not uniformly distributed, so at each scale, its high-frequency coefficients only appear larger in fewer individual areas. Value and the region where it is located is the edge detail part of the input image, and the remaining high-frequency wavelet coefficients have smaller amplitudes. e second point is that after the main part of the noise in the image is decomposed, it still obeys the Gaussian distribution, so its decomposition coefficients at each scale are uniformly distributed, and the amplitude decreases as the scale increases. Figure 4 shows the experimental results of the filtering process in this paper, where Figure 4(a) is an image containing noise and Figure 4(b) is a filtered image. It can be seen from the figure that this paper utilizes the simple and easy noise threshold to filter the image, effectively filtering out the noise in the image and avoiding the noise to deteriorate the image quality. After filtering, the image quality is improved, which is beneficial to extract object features for analysis.

Algorithm Localization Performance under Linear
Motion Model. Figure 5 shows the trajectory curve of the following models of the linear motion model in different deployment modes. Figures 5(a) and 5(b) are the trajectory diagrams of the uniform linear deployment of the anchor node on one side and the uniform deployment of the two sides. It can be seen that the EKF positioning algorithm will generate large fluctuations regardless of the deployment mode. With the change of time, the positioning trajectory of the train is far from the real trajectory. e positioning trajectory of the proposed algorithm is close to the true trajectory of the train. It has good matching and robustness and is more stable than the other two algorithms. Figure 6 shows the positioning error of the following vehicles in the linear motion model. Figures 6(a) and 6(b) show the positioning error of the anchor node on one-side straight line uniform deployment and double-sided crossuniform deployment. It can be seen that under the same conditions, the proposed algorithm has higher filtering accuracy than the other two algorithms. e calculation of the positioning error proves the superiority of the algorithm. Because the algorithm is based on Bayesian theory, the extended Kalman filter algorithm is used to overcome the linearization error of the algorithm. When the rail-side anchor nodes are evenly distributed on both sides, the train positioning error is the smallest. is is because when the anchor nodes are evenly distributed on both sides, the possibility that the anchor sensor has a communication coverage blind zone is smaller than the other deployment mode. At the same time, due to different deployment modes, the anchor node information received by the gateway node is different at each moment. e two-sided cross-uniform deployment can receive more information, and then more positioning anchor nodes can be selected to improve the positioning accuracy.

Algorithm Localization Performance under Curve
Motion Model. Figure 7 shows the positioning trajectory curves corresponding to the three algorithms under the curve motion model. It can be seen that during the start of the turning maneuver (curving motion) of the train, the tracking and positioning curve of the EKF has fluctuated greatly and deviated from the real trajectory, and the positioning error gradually increased. However, the particle filter algorithm and the proposed algorithm can still maintain a good positioning trajectory, but as the running time increases, the positioning trajectory of the particle filter algorithm will gradually deviate. e algorithm of this paper can still maintain good matching with the real track of the train and has good positioning accuracy. Figure 8 shows the real-time nature of the three train positioning algorithms. at is, the calculation time of the positioning algorithm in each positioning period, which is the indicator of the real-time nature of the train positioning. It can be observed that since the algorithm needs to select the positioning anchor node in the anchor node that receives the information and because the train motion state changes, the algorithm needs to continuously resample to determine the motion state of the train at the current moment. erefore, it leads to an increase in the complexity of the algorithm and an increase in the amount of calculation. erefore, the running time of this algorithm is longer than the other two algorithms. Although the real-time performance of the positioning algorithm is poor, it has higher accuracy from the positioning accuracy. For the safe operation of the train, the comprehensive performance of the algorithm is better than the other two algorithms.

Conclusion
Utilizing the MATLAB simulation tool, the EKF algorithm, PF algorithm, and the proposed algorithm under two different deployment modes and train motion models are used from the positioning trajectory of the train, the positioning error, the running speed of the train, and the real-time performance of the algorithm. e performance was simulated and analyzed. e simulation results show that the Haar algorithm is less affected by the environment and the positioning accuracy is higher than the traditional algorithm. Although this paper analyzes and discusses the wavelet noise reduction algorithm in depth and systematically, it is still unable to achieve complete separation of image and noise. erefore, future research should balance the requirements of protecting the original image and filtering noise and try to achieve a better good performance.
Data Availability e data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest
e authors declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.