#### Abstract

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. The 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. The platform can verify the validity of the guidance law.

#### 1. 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.

The performance of the guidance system directly affects the missile’s precise guidance capability. The 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. The 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. The 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. Therefore, 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.

The 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. The 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. Therefore, it is necessary to expand the proportional guidance method for development requirements. The 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. Then BP neural network fuzzy guidance law has been optimized. Therefore, 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.

The 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.

#### 2. 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].

The relative motion relationship between the missile and the target is shown in Figure 1. The 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. is the angle of sight from missile to target, is the velocity of the missile, is the velocity of the target, is the ballistic inclination of the missile, and is the movement inclination of the target.

Equation of relative motion for both missile and target is as follows:where is the angle of sight between the missile and the target; is the relative distance between missile and target; is the missile speed; is the ballistic inclination of the missile; is the target speed; and 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:

For equation (3), make , where represents the component of the target acceleration in the line of sight. Make , where 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 represents the component of the target acceleration in the normal line of sight. Make , where represents the component of the missile acceleration in the normal line of sight.

Substituting equation (2) into equation (5), we get

From equations (1) to (6), the following equations are derived simultaneously:

The 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 and show a nonlinear relationship. Among them, there is a certain proportional relationship with and the distance between the missile-target. Therefore, the key to designing the terminal guidance law is how to control the change in the line-of-sight angular rate between the missile and the target through and make gradually approach 0, so that the missile can approach the target in parallel and achieve the goal of maximizing destruction.

#### 3. 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. Therefore, 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 state-space design method is introduced here for the sake of design convenience.

Let the expected terminal angle of the end of the missile be , and let there be two state variables and in the guidance of the missile end, the state variable indicates a state where the end has a terminal angle control, and the state variable indicates the state of the missile hitting the target:

It can be seen from equation (9) that if the state variable 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 approaches zero, the guidance law can meet the requirements for the missile to successfully hit the target. This article is to design such a guidance law that can meet these two requirements at the same time, that is, the state variables and 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

The joint expressions (10) and (11) can further simplify expression (11) to a spatial state expression including the state variable and the state variable :

In the equation of state of equation (12), is regarded as the control variable and is regarded as the interference value.

#### 4. 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. There 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. Through continuous switching of this sliding surface, make two state variables meet at the same time [9−12].

##### 4.1. 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 and in (12) approach 0 in a limited time. 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, should be set; therefore, the sliding surface of the design should have at least two state variables; they are and .

The switching function of the sliding surface is as follows:where is the normal number, which represents the angular error coefficient.

The physical meaning of this formula is as follows: when the relative distance between the missile and the target is large, the second term of the switching surface plays a major role, which is to guide the missile fly to the target; when the relative distance 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.

The 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].

The general expression of the sliding mode reaching law for a linear time-invariant system is given bywhere is a function about .

The general expression of the adaptive sliding mode reaching law is as follows:

In equation (17), represents the reaching law coefficient and represents the gain coefficient of the switching term.

The physical meaning of equation (17) is as follows: when the relative distance between the missile and the target is relatively large, the sliding mode approach rate can be adjusted slowly; as approaches 0, the sliding mode's approaching rate will increase rapidly. This will ensure that does not divergence, so that the accuracy of the missile will be very high. The adaptive adjustment approach law can reduce the sliding mode jitter.

Differentiating (14) gives the following equation:

Substituting (17) into (19), we get

Equation (21) can be simplified as follows:

The 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 and .

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 is the final output command acceleration; is the component of the target acceleration in the line of sight; is the sliding surface switching function; is the missile-target relative distance; is the missile-target line of sight; is the missile-target line-of-sight angular rate; is the missile speed; is the end restraint angle; is the reaching law coefficient; is the angular error coefficient; and is the switch gain coefficient.

In formula (22), represents the component of the missile acceleration in the normal line of sight, which is the guidance law of the final output. is the component of the target acceleration in the normal line of sight. The sliding mode switching function contains three important parameters: the reaching law coefficient , the angular error coefficient , and the gain coefficient .

#### 5. Fuzzy Variable Structure Terminal Guidance Law with Terminal Angle Constraint

The 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 , first construct a two-dimensional fuzzy controller. The command switching function is used as an input to the fuzzy controller, and the change rate of the switching function is used as the other input of the fuzzy controller. Nonlinear control quantity is used as output. Then, the output of is the fuzzy output of , which is . The final guidance law is written as follows:

When the system is running, and are calculated, and then, the quantization factors and are calculated according to the universe. The two input variables are quantized into fuzzy language variables and , and then the fuzzy variable is obtained according to fuzzy control rules and fuzzy logic reasoning. Finally, the fuzzy variable is multiplied by the output scale factor to obtain the precise control amount .

Define the fuzzy language words set of input variables and output variables as follows: {negative large, negative middle, negative small, zero, positive small, positive middle, positive large}, which is expressed as characters: {NB， NM， NS， O， PS， PM， PB}.

The fuzzy universes of the input variables and are as follows: [−6, +6], which is expressed as {−6, −5, −4, −3, −2, −1, 0, +1, +2, +3, +4, +5, +6}; Figure 2 shows the membership function of input variable , and Figure 3 shows the membership function of input variable .

The fuzzy set universe of output variable is [−7, +7], which is expressed as {−7, −6, −5, −4, −3, −2, −1, 0, +1, +2, +3, +4, +5, +6, +7}. Figure 4 shows the membership function of the output variable.

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.

The fuzzy control rules are shown in Table 1. Fuzzy reasoning uses the maximum-minimum method to generate the most likely solution. This 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.

#### 6. 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 , the initial missile ballistic inclination , the location of the target is (1000, 0), and the simulation step size is 0.01 s.

##### 6.1. Terminal Angular Constraint and Target Speed Change

(1)When the terminal angular constraint is , the speeds of the targets are , , , and . For several situations, the constant parameter takes , 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.(2)When the target speed is , the missile’s terminal angle constraint is divided into , , , and . For several situations, the constant value selection takes . The ballistic trajectory obtained by simulation is shown in Figure 7, and the data analysis is shown in 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. This 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.

##### 6.2. Reaching Law Coefficient

Parameter values are as follows: target speed = 15 m/s, terminal angle constraint = , and .

Figures 8–10 show the ballistic trajectory, trajectory inclination angle, and normal acceleration at different values. Table 4 shows the guidance effect data under different values.

It can be seen from the simulation diagram that when , 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 increases, the ballistic trajectory gradually becomes flat; the inclination of the missile has a zigzag wave in the middle stage when , but as the value of increases, the ballistic inclination is gradually smooth. The normal acceleration of the missile does not change much with the value of ; 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 value between 1 and 10.

###### 6.2.1. Angular Error Coefficients

Parameter values are as follows: target speed = 15 m/s, terminal angle constraint = , and .

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 , the missile did not hit the target at 1000 meters, and when , the missile successfully hit the target. This means that the value of cannot be too small to hit the target; when , 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, is a more appropriate value. The 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. Through the analysis of miss distance data and falling angle error data, it can be seen that the two problems of end-guided miss distance and terminal angle constraint are solved simultaneously. Through 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.

#### 7. Optimization of Fuzzy Variable Structure Terminal Guidance Law Based on Neural Network

The 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. The 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 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. The 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. The 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. Therefore, a single hidden layer can be used to map the fuzzy guidance law. The input layer has three input variables, which are the input line-of-sight angular rate , relative speed , and line-of-sight angle ; the output layer has only one variable, which is the command acceleration .

Figure 14 shows a neural network guidance circuit. The command acceleration is generated under the excitation of the input line-of-sight angular rate , relative speed , and line-of-sight angle . It can be expressed as follows:

In the above formula, represents a nonlinear function, which is used to realize the nonlinear mapping of (3-21). Finally, the commanded acceleration 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.

The transfer function of the hidden neuron is a nonlinear transfer function , where is the output of the -th hidden layer neuron and is the input of the -th hidden layer neuron, in which is the -th input of the input layer and is the connection weight between and ; the transfer function of the output layer neuron is a linear transfer function , where is the output of the output layer neuron and is the input, in which is the connection weight of the a hidden layer neuron and the output neuron and is the output of the -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 and under different conditions and the normal overload of the target maneuver.

Select several typical situations are as follows:(1), , , , , and (2) , , , , , and (3), , , , ,and (4), , , , , and (5) , , , , , and (6) , , , , , and

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. The process of neural network training is to continuously adjust and refresh this weight matrix. Through continuous training of samples, an optimized fuzzy rule table can be obtained, as shown in Table 6. The 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 , the initial missile ballistic inclination is , the location of the target is (1000, 0), the target speed is , let the simulation step be 0.01 s, and terminal angle constraint is 80 degrees, and the comparison of the curves when 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. The 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. Therefore, 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.

#### 8. 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. This will give people an intuitive and realistic experience. The 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. The 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. The hardware uses the MPC8247 processor and runs the VxWorks operating system. This 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. The PC platform uses creator and Vega Prime to develop and design a three-dimensional 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 , the target speed is , 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. The 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-to-ground missiles.

Figure 22 shows the real graph of the simulation platform. The 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. The two platforms communicate through a serial port protocol; use USB to serial port to complete data transmission.

#### 9. Conclusion

The 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. Through 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.

The 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. The 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

The authors declare that they have no conflicts of interest.