A PID-BP neural network target track prediction method, device and medium
By combining the PID control concept with the BP neural network, a PID-BP neural network was designed, which solved the problems of slow convergence speed and poor accuracy of traditional BP neural networks in point prediction, and achieved high-precision and stable prediction in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional BP neural networks suffer from slow convergence, susceptibility to local minima, and poor prediction accuracy in point prediction, especially in complex marine and airspace environments where they are not adaptable enough.
By combining proportional error, integral error, and differential error with the backpropagation mechanism of the BP neural network, and by dynamically adjusting the network weights and thresholds, a PID-BP neural network model is designed to enhance the prediction accuracy and stability of the model.
It improves the accuracy, reliability, and stability of target point prediction, especially providing high-precision prediction results in nonlinear and time-dependent environments.
Smart Images

Figure CN121348709B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dot prediction, specifically to a PID-BP neural network method, device, and medium for predicting target dots, which predicts target dots by establishing a PID-BP neural network prediction model. Background Technology
[0002] The statements in this section are provided only as background information in connection with this disclosure and may not constitute prior art.
[0003] In modern navigation and aviation, the prediction of ship and aircraft tracks is of significant engineering importance. Traditional track prediction methods mainly rely on prediction algorithms based on physical models, such as least squares and Kalman filtering.
[0004] However, these methods often exhibit limitations in prediction accuracy and adaptability when faced with complex and ever-changing marine and airspace environments and nonlinear motions. In recent years, with the development of artificial intelligence technology, neural networks have been widely applied in the field of point prediction.
[0005] However, traditional BP neural networks suffer from drawbacks during training, such as slow convergence speed, susceptibility to local minima, unstable prediction results, and poor accuracy. Summary of the Invention
[0006] The purpose of this invention is to address the problems existing in the prior art by providing a PID-BP neural network method, device, and medium for target point prediction. By introducing proportional error, integral error, and differential error, and combining them with the backpropagation mechanism of the BP neural network, the prediction accuracy and stability of the model can be effectively improved. Simultaneously, by dynamically adjusting the network weights and thresholds, the model's fitting ability and generalization performance on point data are further enhanced. This method is particularly suitable for point prediction tasks with strong nonlinearity and time-dependent characteristics, and can provide more accurate, reliable, and stable high-precision target point prediction results in complex marine and airspace environments, thereby improving the accuracy, reliability, stability, and precision of air and sea target point prediction results.
[0007] The technical solution of the present invention is as follows:
[0008] A PID-BP neural network method for predicting target points includes the following steps:
[0009] Step S1: Normalize the acquired target point data and initialize the network parameters of the PID-BP neural network;
[0010] Step S2: Select the activation function for the hidden layer and calculate the output data of the hidden layer based on the input data of the hidden layer;
[0011] Step S3: Use the output data of the hidden layer as the input data of the output layer to calculate the actual output data of the output layer;
[0012] Step S4: Calculate the proportional error using the actual output data and the expected output data, integrate the proportional error to obtain the integral error, and differentiate the proportional error to obtain the differential error.
[0013] Step S5: The proportional error, integral error and differential error are fused according to preset weight coefficients to calculate the final training error of the PID-BP neural network, and the training error is used as the basis for backpropagation.
[0014] Step S6: Adjust the network weights and thresholds according to the backpropagation basis so that the training error tends to converge until the training stopping condition is met, and obtain the trained PID-BP neural network model.
[0015] Step S7: Use the trained PID-BP neural network model to predict the point data and calculate the predicted point data.
[0016] Furthermore, in step S1, the acquired target point data is normalized using the following formula:
[0017] (1)
[0018] (2)
[0019] In equation (1) It is the original training input data. The maximum value of the training input data; The minimum value of the training input data; The input data is normalized; in equation (2) It is the output data. The maximum value of the training output data; The minimum value of the training output data; The output data is normalized;
[0020] The initialization of the network parameters of the PID-BP neural network in step S1 includes:
[0021] Connection weights from input layer to hidden layer Connection weights from hidden layer to output layer Hidden layer threshold and output layer threshold Initialization is performed, including setting the dynamic learning rate, activation function, and number of nodes; among which, Specifically, the first The input layer node to the first The connection weights of each hidden layer node Specifically, the first From the nth hidden layer node to the nth The connection weights of each output layer node. Specifically, the first Threshold for each hidden layer node Specifically, the first The threshold for each output layer node;
[0022] The number of hidden layer nodes is calculated as shown in equation (3):
[0023] (3)
[0024] In formula (3) This represents the number of hidden layer nodes. The number of nodes in the input layer. This represents the number of nodes in the output layer. for A constant within the range.
[0025] Further, step S2 includes:
[0026] according to and The hidden layer output is calculated using equation (4). :
[0027] (4)
[0028] In formula (4) Indicates the first The output of each hidden layer node; Indicates the first Input data for each input layer node;
[0029] The activation function of the hidden layer is shown in equation (5):
[0030] (5)
[0031] In formula (5) For the hidden layer activation function, This represents the net input value for the hidden layer nodes. It is a natural constant.
[0032] Further, step S3 includes:
[0033] Output value through hidden layer Connection weights of the output layer and threshold Calculate the output value As shown in equation (6):
[0034] (6)
[0035] In formula (6) Indicates the first The output of each output layer node The activation function for the output layer;
[0036] The activation function of the output layer is shown in equation (7):
[0037] (7)
[0038] In equation (7) This is the net input value for the output layer node.
[0039] Further, step S4 includes:
[0040] According to the expected output and actual output Calculate the proportional error Differential error and integral error The error of each sample is represented as shown in equation (8):
[0041] (8)
[0042] In equation (8) Indicates the first The expected output value of each output layer node.
[0043] Further, step S5 includes:
[0044] Design cost function Gradient descent is used to optimize the weights and biases of the hidden and output layers, with the optimization objective being to minimize the error. Converging towards zero means iteratively adjusting the network to make the cost function converge to zero. Minimum, cost function As shown in equation (9):
[0045] (9)
[0046] in , , These are the proportional, integral, and differential terms of the error between the expected and actual outputs, as shown in equations (10), (11), and (12); parameters , , These represent the weights of the proportional, integral, and differential terms of the error between the expected and actual outputs, respectively, and are used to balance the importance of each part.
[0047] (10)
[0048] (11)
[0049] (12)
[0050] Through the cost objective function right and and threshold and Calculate the partial derivatives separately, and use the calculated partial derivatives as the gradient basis for backpropagation to update the network parameters.
[0051] Further, step S6 includes:
[0052] Update weights and and threshold and As shown in equation (13):
[0053] (13)
[0054] in, It is the learning rate.
[0055] Further, step S7 includes:
[0056] The predicted data is calculated according to the following formula (14):
[0057] (14)
[0058] In formula (14) This represents the predicted data.
[0059] The present invention also proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor performs the method described above by executing the instructions stored in the memory.
[0060] The present invention also proposes a computer-readable storage medium for storing instructions that, when executed, cause the method described above to be implemented.
[0061] Compared with existing technologies, the advantages of this invention are:
[0062] 1. Innovative design of PID-BP neural network:
[0063] This invention proposes a BP (backpropagation) neural network model based on the PID (proportional-integral-derivative) control concept. By incorporating the proportional, integral, and derivative error terms from PID control into the training error calculation of the neural network, more accurate prediction of point data is achieved. This innovative combination of PID control and BP neural network effectively improves the model's prediction accuracy and stability.
[0064] 2. Error fusion mechanism:
[0065] This invention designs a unique error fusion mechanism that fuses proportional error, integral error, and differential error according to certain weighting coefficients to obtain the final training error. This approach not only considers the error at the current moment (proportional error) but also introduces the accumulation of historical errors (integral error) and the rate of change of errors (differential error), enabling the model to better capture the long-term trends and dynamic changes of time series data.
[0066] 3. Application of sliding window technology:
[0067] This invention employs a sliding window technique to generate input and output sample data, and uses historical point data to predict future point data. This method effectively captures the temporal dependencies and dynamic characteristics of time-series data, enhancing the model's ability to predict point trajectories.
[0068] 4. Adaptive optimization of the number of hidden layer nodes:
[0069] This invention proposes an adaptive optimization method for the number of hidden layer nodes, which determines the size of the hidden layer by traversing different node numbers and selecting the optimal value. This adaptive optimization strategy can avoid manual trial and error, and improve the model's generalization ability and training efficiency.
[0070] 5. Improvement of the loss function:
[0071] Building upon the traditional BP neural network loss function, this invention enhances the model's ability to capture long-term trends and dynamic changes in time series data by introducing integral and differential terms. This improvement makes the model smoother and more stable when predicting point data, while also increasing prediction accuracy.
[0072] 6. Normalization processing of point data:
[0073] In this invention, the input and output data are normalized to ensure efficient data transmission and computation within the neural network. Normalization accelerates network convergence while improving model training efficiency and prediction accuracy.
[0074] 7. Comprehensive prediction of multi-dimensional point data:
[0075] This invention not only considers the longitude and latitude information of the track points, but also incorporates multi-dimensional data such as speed and heading, constructing a multi-input, multi-output prediction model. This comprehensive processing of multi-dimensional data can more fully reflect the movement patterns of the track points, improving the comprehensiveness and accuracy of the prediction.
[0076] 8. Adaptive adjustment of learning rate and weight coefficients:
[0077] This invention employs an adaptive adjustment strategy for the learning rate and weight coefficients, continuously optimizing network parameters through gradient descent, enabling the model to gradually converge to the optimal solution during training. This adaptive adjustment mechanism effectively avoids local optima and overfitting problems, improving the model's training performance. Attached Figure Description
[0078] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0079] Figure 1 This is a schematic diagram of the PID-BP neural network target point prediction method.
[0080] Figure 2 Detailed flowchart of the PID-BP neural network target point prediction method;
[0081] Figure 3 A diagram of the processor and memory architecture for running the PID-BP algorithm. Detailed Implementation
[0082] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0083] The features and performance of the present invention will be further described in detail below with reference to embodiments.
[0084] Example 1
[0085] This embodiment addresses the problems of low prediction accuracy, poor stability, and insufficient ability to capture long-term trends and dynamic changes in time series data in traditional neural networks for point prediction. It proposes a PID-BP neural network method for target point prediction. By introducing the PID control concept into the BP neural network, a novel PID-BP neural network model is constructed for point data prediction. To enhance the model's ability to capture long-term trends and cumulative effects in time series data, an integral term is introduced into the model's loss function. To improve the smoothness and stability of the prediction and enhance the model's ability to capture dynamic changes in time series data, a differential term is introduced into the model's loss function. The model must not only approximate the expected output value with the actual output value, but also ensure that its integral and differential approximations are separate. Its structure is further detailed below. Figure 1 As shown.
[0086] It should be noted that the prediction model includes an input layer, hidden layers, and an output layer, as shown in the appendix. Figure 1 The input layer is There are nodes, and the input vector is... The hidden layer is There are 1 node, and the output layer is 1. There are nodes, and the output vector is... The connection weights from the input layer to the hidden layer are: The connection weights from the hidden layer to the output layer are: The hidden layer threshold is The output layer threshold is .
[0087] Please see Figure 2 A PID-BP neural network method for predicting target points includes the following steps:
[0088] Step S1: Normalize the acquired target point data (including longitude, latitude, speed, heading, etc.) and initialize the network parameters of the PID-BP neural network;
[0089] Step S2: Select the activation function for the hidden layer and calculate the output data of the hidden layer based on the input data of the hidden layer;
[0090] Step S3: Use the output data of the hidden layer as the input data of the output layer to calculate the actual output data of the output layer;
[0091] Step S4: Calculate the proportional error using the actual output data and the expected output data, and simultaneously integrate (accumulate) the proportional error to obtain the integral error, and differentiate (differentialize) the proportional error to obtain the differential error.
[0092] Step S5: The proportional error, integral error and differential error are fused according to preset weight coefficients to calculate the final training error of the PID-BP neural network, and the training error is used as the basis for backpropagation.
[0093] Step S6: Adjust the network weights and thresholds according to the backpropagation basis so that the training error tends to converge until the training stopping condition is met, and obtain the trained PID-BP neural network model.
[0094] Step S7: Use the trained PID-BP neural network model to predict the point data and calculate the predicted point data.
[0095] In this embodiment, specifically, the normalization process for the acquired target point data in step S1 is performed using the following formula:
[0096] (1)
[0097] (2)
[0098] In equation (1) It is the original training input data. The maximum value of the training input data; The minimum value of the training input data; The input data is normalized; in equation (2) It is the output data. The maximum value of the training output data; The minimum value of the training output data; The output data is normalized;
[0099] The initialization of the network parameters of the PID-BP neural network in step S1 includes:
[0100] Connection weights from input layer to hidden layer Connection weights from hidden layer to output layer Hidden layer threshold and output layer threshold Initialization is performed, including setting the dynamic learning rate, activation function, and number of nodes; among which, Specifically, the first The input layer node to the first The connection weights of each hidden layer node Specifically, the first From the nth hidden layer node to the nth The connection weights of each output layer node. Specifically, the first Threshold for each hidden layer node Specifically, the first The threshold for each output layer node;
[0101] The number of hidden layer nodes is calculated as shown in equation (3):
[0102] (3)
[0103] In formula (3) This represents the number of hidden layer nodes. The number of nodes in the input layer. This represents the number of nodes in the output layer. for The constant within the range is iterated through and the best one is selected. Determine value.
[0104] In this embodiment, specifically, step S2 includes:
[0105] according to and The hidden layer output is calculated using equation (4). :
[0106] (4)
[0107] In formula (4) Indicates the first The output of each hidden layer node; Indicates the first Input data for each input layer node;
[0108] The activation function of the hidden layer is shown in equation (5):
[0109] (5)
[0110] In formula (5) For the hidden layer activation function, This represents the net input value for the hidden layer nodes. It is a natural constant.
[0111] In this embodiment, specifically, step S3 includes:
[0112] Output value through hidden layer Connection weights of the output layer and threshold Calculate the output value As shown in equation (6):
[0113] (6)
[0114] In formula (6) Indicates the first The output of each output layer node The activation function for the output layer;
[0115] The activation function of the output layer is shown in equation (7):
[0116] (7)
[0117] In equation (7) This is the net input value for the output layer node.
[0118] In this embodiment, specifically, step S4 includes:
[0119] According to the expected output and actual output Calculate the proportional error Differential error and integral error The error of each sample is represented as shown in equation (8):
[0120] (8)
[0121] In equation (8) Indicates the first The expected output value of each output layer node.
[0122] In this embodiment, specifically, step S5 includes:
[0123] Design cost function Gradient descent is used to optimize the weights and biases of the hidden and output layers, with the optimization objective being to minimize the error. Converging towards zero means iteratively adjusting the network to make the cost function converge to zero. Minimum, cost function As shown in equation (9):
[0124] (9)
[0125] in , , These are the proportional, integral, and differential terms of the error between the expected and actual outputs, as shown in equations (10), (11), and (12); parameters , , These represent the weights of the proportional, integral, and differential terms of the error between the expected and actual outputs, respectively, and are used to balance the importance of each part.
[0126] (10)
[0127] (11)
[0128] (12)
[0129] Through the cost objective function right and and threshold and Calculate the partial derivatives separately, and use the calculated partial derivatives as the gradient basis for backpropagation to update the network parameters.
[0130] In this embodiment, specifically, step S6 includes:
[0131] Update weights and and threshold and As shown in equation (13):
[0132] (13)
[0133] in, This is the learning rate, which typically takes a value between 0 and 1. ; ; .
[0134] In this embodiment, specifically, step S7 includes:
[0135] The predicted data is calculated according to the following formula (14):
[0136] (14)
[0137] In formula (14) This represents the predicted data.
[0138] In this embodiment, it should be noted that the input data is constructed using a sliding window technique, and the specific calculation formula is as follows:
[0139] According to the current time Select a length of Constructing input vectors from historical trace data sequences :
[0140] (15)
[0141] In the formula: For a fixed prediction step size; The number of steps the sliding window moves or the currently generated sample number is used to traverse the historical point dataset to generate paired input vectors. and expected output vector ; It is the "current moment" that changes as the window moves. ; This represents the normalized target point trace data; for example, when At that time, select the first group of training samples (corresponding to time). ),when At that time, the second group of training samples was selected (corresponding to time). This is equivalent to the window sliding backward one step;
[0142] According to the input vector Predict the future using a well-trained PID-BP neural network model. The point data vector at each time point :
[0143] (16)
[0144] Based on the same technical concept, embodiments of the present invention also provide an electronic device that can implement the PID-BP neural network target point prediction method provided in the above embodiments of the present invention. In one embodiment, the electronic device can be a server, a terminal device, or other electronic devices. Figure 3 As shown, the electronic device may include:
[0145] At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 3 The example used is the connection between the processor and memory via a bus. The bus... Figure 3 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 3 The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.
[0146] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can perform the PID-BP neural network target point prediction method described above. The processor can implement... Figure 3The functions of each module in the device shown.
[0147] The processor is the control center of the device. It can connect to various parts of the control equipment through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the various functions and data processing of the device as a whole.
[0148] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0149] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the PID-BP neural network target point prediction method disclosed in the embodiments of this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0150] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia cards, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), and electrically erasable programmable read-only memory (EPROM). Only memory (EEPROM), magnetic storage, magnetic disks, optical disks, etc. A memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in embodiments of this invention can also be a circuit or any other device capable of performing storage functions for storing program instructions and / or data.
[0151] By designing and programming the processor, the code corresponding to the PID-BP neural network target point prediction method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during runtime. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0152] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a PID-BP neural network target point prediction method described above.
[0153] In some alternative embodiments, the present invention also provides that various aspects of the PID-BP neural network target point prediction method can also be implemented in the form of a program product, which includes program code that, when the program product is run on a device, causes the control device to perform the steps in the PID-BP neural network target point prediction method according to various exemplary embodiments of the present invention described above.
[0154] It should be noted that although several units or sub-units of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Furthermore, although the operation of the method of the invention is described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0155] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can be implemented in one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs) containing computer-usable program code. The form of a computer program product implemented on ROM, optical memory, etc.
[0156] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a server, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0157] Program code for performing the operations of this invention can be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0158] In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0159] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0160] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0161] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed and specific, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
[0162] This background section is provided to generally present the context of the invention. The work of the currently named inventors, the work to the extent described in this background section, and aspects of this section that did not constitute prior art at the time of application are neither expressly nor impliedly acknowledged as prior art to the invention.
Claims
1. A PID-BP neural network method for predicting target points, characterized in that, Includes the following steps: Step S1: Normalize the acquired target point data and initialize the network parameters of the PID-BP neural network; Step S2: Select the activation function for the hidden layer and calculate the output data of the hidden layer based on the input data of the hidden layer; Step S3: Use the output data of the hidden layer as the input data of the output layer to calculate the actual output data of the output layer; Step S4: Calculate the proportional error using the actual output data and the expected output data, integrate the proportional error to obtain the integral error, and differentiate the proportional error to obtain the differential error. Step S5: The proportional error, integral error and differential error are fused according to preset weight coefficients to calculate the final training error of the PID-BP neural network, and the training error is used as the basis for backpropagation. Step S6: Adjust the network weights and thresholds according to the backpropagation basis so that the training error tends to converge until the training stopping condition is met, and obtain the trained PID-BP neural network model. Step S7: Use the trained PID-BP neural network model to predict the point data and calculate the predicted point data; Step S5 includes: Design cost function Gradient descent is used to optimize the weights and biases of the hidden and output layers, with the optimization objective being to minimize the error. Converging towards zero means iteratively adjusting the network to make the cost function converge to zero. Minimum, cost function As shown in equation (9): (9) in , , These are the proportional, integral, and differential terms of the error between the expected and actual outputs, as shown in equations (10), (11), and (12); parameters , , These represent the weights of the proportional, integral, and differential terms of the error between the expected and actual outputs, respectively, used to balance the importance of each part; (10) (11) (12) Through the cost objective function right and and threshold and Calculate the partial derivatives separately, and use the calculated partial derivatives as the gradient basis for backpropagation to update the network parameters; in, This represents the number of nodes in the output layer. Indicates the first The output of each output layer node Indicates the first The expected output value of each output layer node.
2. The PID-BP neural network target point prediction method according to claim 1, characterized in that, In step S1, the acquired target point data is normalized using the following formula: (1) (2) In equation (1) It is the original training input data. The maximum value of the training input data; The minimum value of the training input data; The input data is normalized; in equation (2) It is the output data. The maximum value of the training output data; The minimum value of the training output data; The output data is normalized; The initialization of the network parameters of the PID-BP neural network in step S1 includes: Connection weights from input layer to hidden layer Connection weights from hidden layer to output layer Hidden layer threshold and output layer threshold Initialization is performed, including setting the dynamic learning rate, activation function, and number of nodes; among which, Specifically, the first The input layer node to the first The connection weights of each hidden layer node Specifically, the first The hidden layer node to the first The connection weights of each output layer node. Specifically, the first Threshold for each hidden layer node Specifically, the first The threshold for each output layer node; The number of hidden layer nodes is calculated as shown in equation (3): (3) In formula (3) This represents the number of hidden layer nodes. The number of nodes in the input layer. This represents the number of nodes in the output layer. for A constant within the range.
3. The PID-BP neural network target point prediction method according to claim 2, characterized in that, Step S2 includes: according to and The hidden layer output is calculated using equation (4). : (4) In formula (4) Indicates the first The output of each hidden layer node; Indicates the first Input data for each input layer node; The activation function of the hidden layer is shown in equation (5): (5) In formula (5) For the hidden layer activation function, This represents the net input value for the hidden layer nodes. It is a natural constant.
4. The PID-BP neural network target point prediction method according to claim 3, characterized in that, Step S3 includes: Output value through hidden layer Connection weights of the output layer and threshold Calculate the output value As shown in equation (6): (6) In formula (6) Indicates the first The output of each output layer node The activation function for the output layer; The activation function of the output layer is shown in equation (7): (7) In equation (7) This is the net input value for the output layer node.
5. The PID-BP neural network target point prediction method according to claim 4, characterized in that, Step S4 includes: According to the expected output and actual output Calculate the proportional error Differential error and integral error The error of each sample is represented as shown in equation (8): (8) In equation (8) Indicates the first The expected output value of each output layer node.
6. The PID-BP neural network target point prediction method according to claim 5, characterized in that, Step S6 includes: Update weights and and threshold and As shown in equation (13): (13) in, It is the learning rate.
7. The PID-BP neural network target point prediction method according to claim 6, characterized in that, Step S7 includes: The predicted data is calculated according to the following formula (14): (14) In formula (14) This represents the predicted data.
8. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor performs the method as described in any one of claims 1-7 by executing the instructions stored in the memory.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store instructions that, when executed, cause the method as described in any one of claims 1-7 to be implemented.
Citation Information
Patent Citations
Neural network structure optimization method and device and electronic equipment
CN112149797A
PID controller parameter setting method based on physical information neural network
CN114185264A