Study on Fuzzy Neural Sliding Mode Guidance Law with Terminal Angle Constraint for Maneuvering Target

Aiming at the requirement that the guidance law should meet the minimum miss distance and the desired terminal angle at the same time, a sliding mode variable structure control method is introduced. In order to improve the fuzzy variable structure guidance law for maneuvering target attack effect, a neural network to the optimization design is carried out on the guidance law. ,e neural network is trained by the samples, which is under the condition of different error coefficient of angle, the coefficient of reaching law, and the coefficient of on-off item about target. Fuzzy neural sliding mode guidance law with terminal angle constraint can increase the performance of the large maneuvering target. In addition, on the basis of the traditional PC platform visual simulation system, a new guidance law simulation platform based on embedded system and virtual reality technology is formed. ,e platform can verify the validity of the guidance law.


Introduction
An air-to-surface missile or guided bombs are precision weapons to attack ground targets launched from the aircraft, where the precision strike is concerned with many other factors, for example, the guidance system of the terminal guidance law design is critical, and it directly affects the final precision strike weapon capacity. e performance of the guidance system directly affects the missile's precise guidance capability. e entire guidance process of the missile will be divided into 3 stages: the first stage guidance, the middle stage guidance, and the last stage guidance, and the performance of the last stage guidance will directly determine whether the missile can effectively strike the target, so the study of the final guidance law is to improve the overall missile. e guidance ability of the system is of great help, and it is in this context that the research work on the terminal guidance law of the missile is carried out. e guidance law is to control the missile to intercept the target according to a certain trajectory according to the relative motion information of the missile and the target. erefore, the problem solved by the guidance law is the flight trajectory of the missile intercepting the target [1− 4].
For precision-guided weapons, the main task of the guidance system is to output appropriate commands, which ultimately makes the missile's end miss distance as small as possible. However, under certain special circumstances, while requiring the missile to accurately hit the target, it also requires the missile to have an optimal attitude when hitting the target. It is necessary to study the guidance law with the angle-of-restriction in depth and design a guidance law that can meet the requirements of miss distance and angle-of-fall constraint at the same time.
e current guidance laws in engineering practice are mostly the classic guidance laws formed in the 1960s to the 1970s, or improved versions based on these classic guidance laws. e typical guidance law representative is proportional guidance because it has the most improved versions. Proportional guidance was initially designed only for the target to be stationary, that is, the target is not maneuvering, and under the condition that the control energy is not constrained, then proportional guidance is the optimal guidance law for zero miss. However, when targeting a maneuverable target, the proportional guidance law has a relatively large off-target volume, which simply cannot meet the accuracy index required by the missile. erefore, it is necessary to expand the proportional guidance method for development requirements. e modern guidance law has been developed with the progress of modern control theory and gradually applied to engineering. Typical representatives include optimal guidance law, variable structure guidance law, neural network guidance law, and fuzzy logic guidance law.
Our main contribution in the present paper is that we simulate and analyze the guidance law through MATLAB software. en BP neural network fuzzy guidance law has been optimized. erefore, a new type of fuzzy neural network variable structure terminal guidance law is obtained. Meanwhile, in this paper, a new guidance law simulation platform based on embedded platform and PC platforms using virtual reality technology is achieved, compared with the traditional MATLAB software simulation platform, the new platform is close to the underlying algorithm engineering practice, and the effect is closer to the actual battlefield display, making it easier to verify the excellent characteristics of guidance law. e rest of this paper is organized as follows. In Section 1, the missile-target mathematical model is established. In Section 2, the terminal angle constraint in terminal guidance is analyzed. And in Section 3, variable structure terminal guidance law with terminal angular constraint is derived. We formalize fuzzy variable structure terminal guidance law with terminal angle constraint in Section 4, and we discuss some numerical results in Sections 5 and 6. In Section 7, we design a guidance law simulation platform based on virtual reality technology. In Section 8, the conclusion is given.

Establishment of Missile-Target Mathematical Model
Both missiles and targets can be seen as two different particles in space, missile and target coordinate systems are simplified into the same coordinate system, and the coordinate system is established with the distance between the missile and the target as the X-axis and the space height between the missile and the target as the Y-axis [5]. e relative motion relationship between the missile and the target is shown in Figure 1. e horizontal line parallel to the X-axis in the figure is used as the reference line, and r is the relative distance between the missile and the target. q is the angle of sight from missile to target, V M is the velocity of the missile, V T is the velocity of the target, σ M is the ballistic inclination of the missile, and σ T is the movement inclination of the target.
Equation of relative motion for both missile and target is as follows: where q is the angle of sight between the missile and the target; ris the relative distance between missile and target; V M is the missile speed; σ M is the ballistic inclination of the missile; V T is the target speed; and σ T is the angle of inclination of the target as it moves. Derivation of time on both sides of equation (1( can be obtained as follows: (3) where ω R represents the component of the target acceleration in the line of sight. Make where u R represents the component of the missile acceleration in the line of sight.
Putting equation (1) into equation (3), we get Derivation of time on both sides of equation (2) can be obtained as follows: In equation (5), in order to facilitate analysis and calculation, simplify the complex formula to the following: Let where ω Q represents the component of the target acceleration in the normal line of sight.
where u Q represents the component of the missile acceleration in the normal line of sight.
Substituting equation (2) into equation (5), we get 2 Mathematical Problems in Engineering From equations (1) to (6), the following equations are derived simultaneously: e equation is integrated and simplified according to formula (7) as follows: Equation (8) contains multiple parameters. From these parameters, it can be seen that the rate of line-of-sight (LOS) angle q and u Q show a nonlinear relationship. Among them, there is a certain proportional relationship with ω Q and the distance r between the missile-target. erefore, the key to designing the terminal guidance law is how to control the change in the line-of-sight angular rate _ q between the missile and the target through u Q and make _ q gradually approach 0, so that the missile can approach the target in parallel and achieve the goal of maximizing destruction.

Terminal Angle Constraint in Terminal Guidance
In the usual missile terminal guidance, the designers hope that the guided weapon can strike ground targets at high impact angle or even vertical angles, it is necessary to ensure that the miss distance is the smallest, and the large terminal angle control of the hit target is required, and this puts forward higher requirements for the missile's terminal guidance. erefore, in the design of the guidance law, it is necessary to consider the issue of miss distance and the control of the missile's terminal angle [6− 8].
According to the terminal angle requirement in the terminal guidance, the related relational expression in equation (8) cannot describe the issue of missile terminal angle control; therefore, by introducing a terminal angle parameter, the designers hope that the terminal angle control can be realized in the guidance law. In this way, two control variables appear in the guidance law. Both the missile's precise target hit at the end and the terminal angle control when it hits the target must be met; therefore, a statespace design method is introduced here for the sake of design convenience.
Let the expected terminal angle of the end of the missile be q d , and let there be two state variables x 1 and x 2 in the guidance of the missile end, the state variable x 1 indicates a state where the end has a terminal angle control, and the state variable x 2 indicates the state of the missile hitting the target: It can be seen from equation (9) that if the state variable x 1 approaches zero, then the missile can approach the target at the expected desired attack angle and then the target can be destroyed; if the state variable x 2 approaches zero, the guidance law can meet the requirements for the missile to successfully hit the target. is article is to design such a guidance law that can meet these two requirements at the same time, that is, the state variables x 1 and x 2 are both reach zero.
Derivation of time for each variable in equation (9) can be obtained as follows: Substitute equation (8) into equation (10) and simplify it to get e joint expressions (10) and (11) can further simplify expression (11) to a spatial state expression including the state variable x 1 and the state variable x 2 : In the equation of state of equation (12), u Q is regarded as the control variable and ω Q is regarded as the interference value.

Variable Structure Terminal Guidance Law with Terminal Angular Constraint
Equation (12) is a typical system of nonlinear equations, so solving this system of equations is a typical nonlinear problem. ere are many methods for solving nonlinear equations, but in order to satisfy these two states at the same time, the idea of sliding mode variable structure control is used here to introduce a suitable sliding surface. rough continuous switching of this sliding surface, make two state variables meet at the same time [9− 12].

Design Sliding Mode Reaching Law.
For the problem with the terminal angular constraint, the purpose of the guidance law design is to obtain zero miss distance and the expected terminal angle at the same time, that is, the outputs x 1 and x 2 in (12) approach 0 in a limited time. _ q � 0 represents the ideal state, and the missile can finally hit the target; if the requirement of the end attack angle constraint is to be achieved, q − q d � 0 should be set; therefore, the sliding surface of the design should have at least two state variables; they are e switching function of the sliding surface is as follows: where λ is the normal number, which represents the angular error coefficient. e physical meaning of this formula is as follows: when the relative distance r between the missile and the target is large, the second term _ q of the switching surface plays a major role, which is to guide the missile fly to the target; when the relative distance r is very small and almost approaches 0, the first term of the sliding surface plays the main role, that is, the guidance law is expected to hit the target at the desired attack angle, so that the original design requirements can be met.
Substitute equation (9) into equation (13), and then, equation (13) can be further simplified as follows: In order to ensure that the state of the system can reach the sliding mode and have excellent dynamic characteristics in the process of reaching the sliding mode, the reaching law can be used to derive the controller. e general exponential reaching law and constant velocity reaching law can only be applied to linear time-invariant systems, and the system state equation (14) is a linear time-varying system, so it is necessary to construct a sliding mode approximation with an adaptive time-varying parameter law to ensure that the sliding mode meets the conditions and good dynamic characteristics [13− 15]. e general expression of the sliding mode reaching law for a linear time-invariant system is given by where F(s) is a function about S. e general expression of the adaptive sliding mode reaching law is as follows: In equation (17), K represents the reaching law coefficient and ε represents the gain coefficient of the switching term.
e physical meaning of equation (17) is as follows: when the relative distance r between the missile and the target is relatively large, the sliding mode approach rate can be adjusted slowly; as r approaches 0, the sliding mode's approaching rate will increase rapidly. is will ensure that _ q does not divergence, so that the accuracy of the missile will be very high. e adaptive adjustment approach law can reduce the sliding mode jitter.
Differentiating (14) gives the following equation: Substituting (17) into (19), we get Bringing (13) into (20) gives Equation (21) can be simplified as follows: e adaptive sliding mode guidance law has relatively strong robustness to changes in system parameters, and the speed change during the missile's terminal guidance process is not very large, so it can be made equivalent processing, which is _ r ≈ V M and € r ≈ 0. So the law of guidance is obtained as follows: Bring equation (9) into equation (23) to get the mathematical relationship between the final command acceleration and the terminal angle: where u Q is the final output command acceleration; ω Q is the component of the target acceleration in the line of sight; S is the sliding surface switching function; r is the missile-target relative distance; q is the missile-target line of sight; _ q is the missile-target line-of-sight angular rate; V M is the missile speed; q d is the end restraint angle; K is the reaching law coefficient; λ is the angular error coefficient; and ε is the switch gain coefficient.
In formula (22), u Q represents the component of the missile acceleration in the normal line of sight, which is the guidance law of the final output. ω Q is the component of the target acceleration in the normal line of sight. e sliding mode switching function S contains three important parameters: the reaching law coefficient K, the angular error coefficient λ, and the gain coefficient ε.

Fuzzy Variable Structure Terminal Guidance
Law with Terminal Angle Constraint e reasoning process of the fuzzy system is as follows: first, compare the differences between the input variables and membership functions to obtain the membership of each language; then the inference engine finds the corresponding rules in the knowledge base through inference operations; finally, all the results are superimposed for fuzzy output.
To perform fuzzy processing on ε sgn S, first construct a two-dimensional fuzzy controller. e command switching function S is used as an input to the fuzzy controller, and the change rate _ S of the switching function is used as the other input of the fuzzy controller. Nonlinear control quantity u is used as output. en, the output of u is the fuzzy output of ε sgn S, which is u ≈ ε sgn S. e final guidance law is written as follows: (25) When the system is running, S and _ S are calculated, and then, the quantization factors K s and K _ S are calculated according to the universe. e two input variables are quantized into fuzzy language variables S and SC, and then the fuzzy variable U is obtained according to fuzzy control rules and fuzzy logic reasoning. Finally, the fuzzy variable U is multiplied by the output scale factor K u to obtain the precise control amount u.
In order to ensure that each fuzzy language variable can cover the entire universe better, here each fuzzy language word set uses 7 variables, and each fuzzy set universe contains 15 quantization levels, so that the universe elements is twice the number of elements in the fuzzy language words set, to achieve full coverage of the universes. e fuzzy control rules are shown in Table 1. Fuzzy reasoning uses the maximum-minimum method to generate the most likely solution.
is reasoning method is very simple and efficient and suitable for real-time control applications. Figure 5 shows a simulation diagram of the output fuzzy surface.

Simulation and Analysis
Simulation was done in MATLAB software. Simulation conditions are as follows: an air-to-ground missile attacks an object on the ground, let the initial position of the missile be (0, 2000), missile speed V M � 300 m/s, the initial missile ballistic inclination σ M � 0 ∘ , the location of the target is (1000, 0), and the simulation step size is 0.01 s.

Terminal Angular Constraint and Target Speed Change
(1) When the terminal angular constraint is − 90 ∘ , the speeds of the targets are V T � 15 m/s, 10 m/s, 5 m/s, and 0 m/s. For several situations, the constant parameter takes k � 1 and λ � 1, the trajectory obtained by simulation is shown in Figure 6, and the data analysis is shown in Table 2.
It can be seen from Figure 6 that when the target is stationary, the missile's trajectory is the smoothest.
As the target speed increases, the ballistic curve of the missile will fluctuate, and the amplitude of the fluctuation will increase as the speed increases. It can be seen from Table 2 that the stationary target is the easiest to attack, the miss distance and terminal angle deviation are also very small, and the flight time is the least, which is also completely in line with the actual missile attack target situation.  Table 3. It can be seen from Figure 7 that when the terminal angle is constrained to 90 degrees, that is, when the target is hit vertically, the ballistic trajectory will have a large reverse turn to adjust the vertical strike angle. As the angle decreases, the trajectory is relatively smooth.
From Table 3, it can be seen that the maximum miss distance when hitting the target is at 90 degrees, and at 80 degrees, the deviation between the miss distance and the terminal angle is very small. is also shows that the effectiveness of the warhead can be fully exerted when striking the target vertically, and at the same time, the accuracy of the missile is also affected; therefore, a balance must be made between the terminal angle of restraint and the effectiveness of the warhead. values. Table 4 shows the guidance effect data under different k values. It can be seen from the simulation diagram that when k � 0.1, the missile is fully capable of a 90°angle dive attack target, but in order to achieve the initial terminal angle constraint, it can be seen that the missile has a turning curve that intentionally maintains the landing angle. As the value of k increases, the ballistic trajectory gradually becomes flat; the inclination of the missile has a zigzag wave in the middle stage when k � 0.1, but as the value of k increases, the ballistic inclination is gradually smooth. e normal acceleration of the missile does not change much with the value of k; considering the miss distance and the falling angle deviation, the smaller the reaching law coefficient, the better the effect. In summary, it is better to choose k value between 1 and 10.

Angular Error Coefficients. Parameter values are as follows:
target speed � 15 m/s, terminal angle constraint � − 80 ∘ , and k � 1. Figures 11-13 show the ballistic trajectory ballistic inclination, and normal acceleration under different angular error coefficients. It can be seen from the figure that when the error coefficient λ � 0.1, the missile did not hit the target at 1000 meters, and when λ � 0.5, the missile successfully hit the target. is means that the value of λ cannot be too small to hit the target; when λ � 0.1, the ballistic inclination obviously fluctuates too much, and the normal acceleration is also obviously not normal, so this also verifies that λ cannot be smaller.
As can be seen from Table 5, λ � 0.5 is a more appropriate value. e miss distance and the falling angle deviation are also very small.    By setting different reaching law coefficients and angular error coefficients, different ballistic trajectories, trajectory inclination, and missile normal accelerations are obtained.
rough the analysis of miss distance data and falling angle error data, it can be seen that the two problems of endguided miss distance and terminal angle constraint are solved simultaneously. rough these characteristic curves, comparing the parameters such as miss distance and time of flight, different parameter value ranges are obtained under the conditions of terminal angle constraints and precise guidance.

Optimization of Fuzzy Variable Structure
Terminal Guidance Law Based on Neural Network e missile uses fuzzy variable structure terminal guidance law at the end, which can better hit low-speed ground targets, such as tanks and armored vehicles with a speed of 15 m/s. But for high-speed targets, the effect is not ideal. e main reason is to achieve the constraint of the terminal angle, and the missile needs to track the target trajectory in time by increasing the overload. But in the process of terminal guidance, the time is very short, and it is very difficult    Mathematical Problems in Engineering for the missile to provide a large overload in a short time. So for missiles, the guidance law is always expected to provide a straight or smooth trajectory [16− 18]. Different reaching law coefficients and angular error coefficients in variable structures have an impact on the final guidance law; when tracking a large maneuvering target, these two coefficients have an optimal range, so when the target is a large maneuver, they can automatically learn and adjust these two coefficients. e neural network system formed by this training should be able to track well big maneuvering target.
In the network structure design, a single hidden layer BP neural network is used. e theory proves that a feedforward network with a single hidden layer can map all continuous functions, and only two hidden layers are needed when learning discontinuous functions. erefore, a single hidden layer can be used to map the fuzzy guidance law. e input layer has three input variables, which are the input line-ofsight angular rate _ q, relative speed _ r, and line-of-sight angle q; the output layer has only one variable, which is the command acceleration A m . Figure 14 shows a neural network guidance circuit. e command acceleration A m is generated under the excitation of the input line-of-sight angular rate _ q, relative speed _ r, and line-of-sight angle q. It can be expressed as follows: In the above formula, ξ represents a nonlinear function, which is used to realize the nonlinear mapping of (3)(4)(5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)(21). Finally, the commanded acceleration A m generated is sent to the autopilot, and the missile guidance can be completed.
Considering the number of neurons in the input and output layers and the number of training samples, the number of hidden neurons was finally determined to be 20 after several simulations. e transfer function of the hidden neuron is a nonlinear transfer     Mathematical Problems in Engineering output of the i-th hidden layer neuron and x i � 2 j�1 W ij I j is the input of the i-th hidden layer neuron, in which I j is the j-th input of the input layer and W ij is the connection weight between I j and x i ; the transfer function of the output layer neuron is a linear transfer function f � x, where f is the output of the output layer neuron and x � 20 i�1 W 2i O i is the input, in which W 2i is the connection weight of the a hidden layer neuron and the output neuron and Q i is the output of the i-th hidden layer neuron. When determining the training samples of the BP neural network, in order to track large maneuvering targets, step maneuvers are selected as the typical maneuvering modes of the target, and the best reaching law coefficient and angular error coefficient are selected at the same time. For both cases, the line-of-sight angular rate, relative angular velocity, and line-of-sight angle obtained by the angularly constrained fuzzy variable structure guidance law are used as the input set of the training sample space, and the corresponding command acceleration is used as the output set.
Based on the fuzzy logic controller, this group of samples is obtained by adjusting the sizes of k and λ under different conditions and the normal overload of the target maneuver.
Select several typical situations are as follows: In a neural network, to determine the weight matrix from the hidden layer to the output layer, it represents 49 regular outputs. Use the rule table in Table 6 to assign values to it. e process of neural network training is to continuously adjust and refresh this weight matrix. rough continuous training of samples, an optimized fuzzy rule table can be obtained, as shown in Table 6. e results after training are shown in Figure 15.
An air-to-surface missile attacks an object on the ground, let the initial position of the missile be (0, 2000), the speed of the missile is V M � 300 m/s, the initial missile ballistic inclination is σ M � 0 ∘ , the location of the target is  (1000, 0), the target speed is V T � 300 m/s, let the simulation step be 0.01 s, and terminal angle constraint is 80 degrees, and the comparison of the curves when k � 1, λ � 1, and ε � 1 is shown in Figures 16 and 17.
From the ballistic trajectory in Figure 16, it can be seen that when the target is maneuvering, the fuzzy variable structure guidance law can still successfully hit the target, but the ballistic curve is too curved. In the actual missile guidance process, the missile cannot produce such a large amount of maneuver. e ballistic trajectory produced by the neural fuzzy guidance law optimized by the neural network has improved significantly, is smoother, and has less jitter. Figure 17 shows a comparison of the normal acceleration of the missile. It can be seen from the figure that the missile using fuzzy guidance law has a large normal acceleration before hitting the target, and the normal acceleration of the neural fuzzy guidance law has been relatively stable. erefore, it can be seen that the fuzzy guidance law optimized by the neural network has greatly improved its performance. Table 7 shows the comparison of various parameters of the guidance effect. It can be seen that compared with the fuzzy guidance law, the neural fuzzy guidance law has significantly improved the guidance accuracy and other aspects.

Design of Guidance Law Simulation Platform Based on Virtual Reality Technology
Virtual reality simulation first solves the mathematical model of the simulation system by a numerical analysis method and then displayed on the screen by the display technology of the computer system. is will give people an intuitive and realistic experience. e actual missile guidance law is solved by a missile-borne computer, which is a typical embedded system, which is quite different from a PC platform. If the designed guidance law can be calculated in an embedded system, the performance of the guidance law will be better verified. e above-mentioned fuzzy variable structure terminal guidance law with terminal angle constraint is combined with two technologies of embedded system and virtual reality to design a new guidance law simulation platform to intuitively show the research results of guidance law [19− 22]. Figure 18 shows a schematic diagram of the framework structure of the entire simulation platform. On the left is the embedded platform. e hardware uses the MPC8247 processor and runs the VxWorks operating system. is part is mainly responsible for the calculation of the guidance law algorithm and finally outputs the command acceleration to the PC platform through the serial port. e PC platform    uses creator and Vega Prime to develop and design a threedimensional visual environment, and this part mainly completes the three-dimensional display of the battlefield environment and finishes receiving the guidance law calculated under the embedded platform, transmitting the guidance law parameters to the missile model, and then driving the missile model to approach the target along a certain trajectory, and then destroys the target. Simulation parameters are as follows: the armed helicopter found a ground armored target and was ready to launch an air-to-ground missile to destroy it. Let the initial position of the missile be 2000 m above the ground, the speed of the missile is V M � 300 m/s, the target speed is V T � 300 m/s, the target fixed position is 5000 m from the helicopter horizontal distance of 5000 m, and the terminal angular constraint is 70 degrees.
In Figure 19, the helicopter found a ground target and launched an air-to-ground missile. e missile's ballistic trajectory can be seen in the upper subwindow. In Figure 20, the missile flies in the air according to a predetermined trajectory, and the trajectory can be clearly seen. In Figure 21, the missile accurately hits the target, and it can be clearly seen in the lower subwindow that, from the perspective of the entire trajectory, the terminal angular constraint is basically satisfied. It can be seen that the new guidance law simulation platform combining embedded systems and virtual reality technology has well demonstrated the entire process of accurate terminal guidance of air-toground missiles. Figure 22 shows the real graph of the simulation platform. e left side is the embedded system platform MPC8247 development board, the red light on the development board indicates that the development board is in normal working state. e two platforms communicate through a serial port protocol; use USB to serial port to complete data transmission.

Conclusion
e missile's terminal guidance not only needs to meet the miss distance but also requires that the terminal angle of the attack be restricted. In order to meet this requirement, this paper proposes a terminal guidance law based on sliding mode variable structure, and blurs the jitter problem in the guidance law by the fuzzy logic method. By setting different approach law coefficients and angular error coefficients, different ballistic trajectories, trajectory inclination, and missile normal accelerations are obtained.
rough the analysis of miss distance data and terminal angular error data, it can be seen that the two problems of terminal guidance miss distance and terminal angular constraint are solved simultaneously. At the same time, these characteristic curves, by comparing graphics, missed targets, flight time, etc., summarized the different parameter value ranges that meet both the terminal angle constraint and the precise guidance conditions. e BP neural network is used to optimize the fuzzy variable structure terminal guidance law with terminal angle constraint, which effectively solves the problem of fuzzy variable structure terminal guidance law for large maneuvering targets. By the neural network self-learning and adaptive capabilities using large maneuvering targets as sample inputs, use the best reaching law coefficient and angle error coefficient. e simulation results show that the fuzzy variable structure terminal guidance law optimized by the neural network has improved the guidance accuracy and other aspects significantly.
Based on this, a new guidance law simulation platform based on the combination of embedded system and virtual reality technology is designed. Simulation experiments verify the correctness of the guidance law and the display effect is better.

Data Availability
All data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.