Speed synthesis method and device of dynamic system
Through the combination of sinusoidal function and BP neural network model, the accurate calculation problem of high-dimensional nonlinear velocity signals is solved, and the speed calculation accuracy and environmental perception ability of dynamic systems are improved.
Patent Information
- Application Number
- CN202510144951.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-17
AI Technical Summary
When traditional linear models and simple velocity fitting calculation methods deal with high-dimensional, nonlinear dynamic system velocity signals, it is difficult to accurately calculate the actual motion speed of the dynamic system, resulting in inaccurate position and environment perception.
The velocity vector is encoded using a sine function, and the coded feature vector is predicted in combination with the BP neural network model. Through standardization and anti-standardization processing, the actual velocity value of the dynamic system is obtained.
It improves the accuracy and robustness of signal processing in high-dimensional and complex speeds, reduces computing resource consumption, and enhances the positioning and environmental perception capabilities of dynamic systems.
Smart Images

Figure CN120163192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a method and device for synthesizing the speed of a dynamic system. Background Art
[0002] In the fields of modern science and engineering, during the movement of many dynamic systems, such as unmanned aerial vehicle flight, autonomous vehicle driving, robot navigation, etc., there are problems of how to process complex, high-dimensional, and non-linear speed calculations. Speed generally includes speed magnitude, speed direction, and motion speed period, etc. Speed signals are collected by deploying sensors or odometers in the dynamic system, and then through data processing, such as extracting the main features in the speed to perform motion planning or execute target tasks for the dynamic system. However, other influencing factors may also be involved during the movement of the dynamic system. For example, wind speed or air resistance will interfere with the speed signal. The collected speed signal is high-dimensional and non-linear, and complex information in these speed signals needs to be comprehensively considered to accurately calculate the actual motion speed of the dynamic system for motion planning or executing target tasks.
[0003] Traditional linear models and simple speed fitting calculation methods generally perform vector encoding and summation tasks. However, they have certain limitations when dealing with high-dimensional and non-linear speed signals. Because there are various complex influencing factors interfering during the movement of the dynamic system, such as wind speed or water flow speed interfering with the motion speed. Thus, for multiple speed data and interference data, only through linear vector calculation and low-dimensional fitting calculation, it is difficult to capture the complex information in the speed signal, and there is still a large gap between the calculated result and the actual motion speed of the dynamic system, making it difficult to obtain accurate position, speed, and perception of the surrounding environment of the dynamic system, which limits the effect in practical applications. Summary of the Invention
[0004] The present invention provides a method and device for synthesizing the speed of a dynamic system to overcome the defect that traditional linear models and simple speed fitting calculation methods in the prior art have certain limitations when performing high-dimensional and non-linear speed calculations.
[0005] The present invention provides a method for synthesizing the speed of a dynamic system, and the method includes the following steps: Obtain at least two initial speed values in the dynamic system, where the initial speed value includes the speed vector during the movement of the dynamic system; Call the sine function to perform encoding processing on the modulus and angle in each speed vector to obtain an encoded feature vector; Perform normalization processing on the encoded feature vector, and call the BP neural network model to perform prediction processing on the encoded feature vector after normalization processing to obtain a predicted feature vector; Perform inverse normalization on the predicted feature vector to obtain the actual speed value of the dynamic system during movement.
[0006] In some embodiments, the step of encoding the magnitude and angle in each speed vector by invoking the sine function to obtain an encoded feature vector includes: Determine N equidistant sampling points within the angular range from 0 to 2π. Within each sampling point, calculate the encoded value for each sampling point according to the following formula: where e represents the encoded value of each sampling point, represents the sampling point, represents the angle in the speed vector, represents the magnitude in the speed vector; Combine the encoded values of each sampling point to obtain the encoded vector corresponding to the speed vector; Concatenate the encoded vectors corresponding to each speed signal to obtain the encoded feature vector.
[0007] In some embodiments, the normalization process of the encoded feature vector includes: Respectively determine the mean and standard deviation of the vector values in the encoded feature vector; For each vector value, determine the difference between the vector value and the mean, and take the ratio of the difference to the standard deviation as the normalized value of the vector value; Concatenate the standard values of each vector value to obtain the normalized encoded feature vector.
[0008] In some embodiments, the step of predicting the normalized encoded feature vector by invoking the BP neural network model to obtain a predicted feature vector includes: Input the normalized encoded feature vector into the hidden network layer of the BP neural network model, where the BP neural network model includes two consecutive hidden network layers, and the activation function of the hidden network layer is the Leaky ReLU activation function; Map the calculation result of the hidden network layer through the Leaky ReLU activation function to obtain the predicted feature vector.
[0009] In some embodiments, the training process of the BP neural network model includes: Obtain speed signal samples, each of which includes at least two initial speed vector samples and the corresponding true speed vector; Call the sine function to encode the magnitude and angle in each of the initial velocity vector samples to obtain encoded feature vector samples; Input the encoded feature vector samples into a BP neural network model for forward propagation to obtain predicted velocity vectors; Construct a training loss function for the BP neural network model based on the true velocity vectors and the predicted velocity vectors; Perform backpropagation in the BP neural network model through the training loss function to update the parameters of the BP neural network model.
[0010] In some embodiments, the training loss function of the BP neural network model includes a mean square error loss function or a mean absolute error loss function; The construction process of the mean square error loss function includes: Calculate a magnitude mean square error loss value based on the predicted magnitude in the predicted velocity vector and the true magnitude in the true velocity vector; Calculate an angle mean square error loss value based on the predicted angle in the predicted velocity vector and the true angle in the true velocity vector; Take the sum of the magnitude mean square error loss value and the angle mean square error loss value as the mean square error loss function; The construction process of the mean absolute error loss function includes: Calculate a magnitude mean absolute error loss value based on the predicted magnitude in the predicted velocity vector and the true magnitude in the true velocity vector; Calculate an angle mean absolute error loss value based on the predicted angle in the predicted velocity vector and the true angle in the true velocity vector; Take the sum of the magnitude mean absolute error loss value and the angle mean absolute error loss value as the mean absolute error loss function.
[0011] The present invention also provides a velocity calculation device for a dynamic system. The device includes the following modules: An acquisition module for acquiring at least two initial velocity values in the dynamic system, where the initial velocity values include velocity vectors during the movement of the dynamic system; An encoding module for calling the sine function to encode the magnitude and angle in each of the velocity vectors to obtain encoded feature vectors; A prediction module for performing normalization processing on the encoded feature vectors and calling a BP neural network model to perform prediction processing on the normalized encoded feature vectors to obtain predicted feature vectors; A processing module, configured to perform denormalization processing on the predicted feature vector to obtain the actual speed value of the dynamic system during the movement process.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the speed synthesis method of the dynamic system as described in any one of the above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the speed synthesis method of the dynamic system as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the speed synthesis method of the dynamic system as described in any one of the above is implemented.
[0015] The speed synthesis method and device of the dynamic system provided by the present invention first call the sine function to encode at least two initial speed values in the dynamic system. In this way, through the periodic characteristics of the sine, information loss in the signal processing process can be reduced, ensuring that more key information can be retained when processing high-dimensional and complex speed signals, thereby improving the robustness and calculation accuracy of the subsequent model. Next, call the BP neural network model to predict the normalized encoded feature vector to obtain the predicted feature vector, and obtain the final speed signal. In this way, by leveraging the powerful computing power of the neural network for vector calculation, not only the consumption of computing resources in the training and signal processing processes of the traditional method is reduced, but also the effectiveness in vector encoding and summation tasks is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art one by one. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 It is a schematic flowchart of the speed synthesis method of the dynamic system provided by the present invention.
[0018] Figure 2 It is a schematic diagram of speed calculation during the flight of the unmanned aerial vehicle provided by the present invention.
[0019] Figure 3 It is a schematic structural diagram of the speed calculation device of the dynamic system provided by the present invention.
[0020] Figure 4It is a schematic structural diagram of the electronic device provided by the present invention. Specific embodiments
[0021] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0022] The speed synthesis method of the dynamic system provided by the present invention can be applied to a dynamic system to assist the dynamic system in calculating speed signals, so as to achieve positioning, motion state analysis or surrounding environment perception, etc. of the dynamic system. The dynamic system can be an entity device or entity equipment that can move and generate speed signals. For example, it can be an unmanned aerial vehicle, an electric vehicle, an artificial intelligence robot, etc. These dynamic systems need to perform real-time speed calculations during the movement process to determine the final speed signal to complete the scenario task. For example, an unmanned aerial vehicle performs flight cruise, an electric vehicle performs a driving task (car race), and an artificial intelligence robot performs underwater exploration. The initial speed value of the dynamic system during the movement process is collected by devices such as sensors or odometers installed in the dynamic system, and then the actual speed value of the dynamic system during the movement process is calculated through the speed synthesis method of the dynamic system provided by the present invention for performing the corresponding scenario task.
[0023] The following describes the speed synthesis method and device of the dynamic system of the present invention with reference to the accompanying drawings. Refer to Figure 1 , Figure 1 is a schematic flowchart of the speed synthesis method of the dynamic system provided by the present invention. As Figure 1 shown, the method includes the following steps 101 to step 104.
[0024] Step 101: Obtain at least two initial speed values in the dynamic system, where the initial speed value includes the speed vector of the dynamic system during the movement process.
[0025] First, during the movement process of the dynamic system, the initial speed value of the dynamic system during the movement process can be collected by devices such as sensors or odometers installed in the dynamic system. The unit can be meters per second or kilometers per hour. Generally, there are at least two initial speed values. Hereinafter, two initial speed values will be taken as an example for description.
[0026] Among them, the initial velocity value includes the velocity vector of the dynamic system during the movement process. This velocity vector is a vector, having both a velocity magnitude and a velocity direction. The velocity vector can be represented using a standard rectangular coordinate system. However, the rectangular coordinate system cannot intuitively represent the magnitude and direction. Therefore, in the embodiments of the present invention, the corresponding polar coordinate vector of the velocity vector is calculated here. The velocity vector is a coordinate point in the rectangular coordinate system. The length of the line connecting the origin of the coordinate system to the coordinate point is the velocity magnitude, and the direction of the line connecting the origin of the coordinate system to the coordinate point is the velocity direction.
[0027] Here, the x value and y value of the coordinate point of the velocity vector on the rectangular coordinate system are converted into polar coordinate forms. The velocity magnitude and velocity direction are respectively represented by the modulus length and angle of the polar coordinates. And during the calculation process, the angle also needs to be processed to ensure that the angle is within the range. The processing process of the angle is realized through the following formula: (1) In the above formula (1), represents the polar coordinate angle calculated from the velocity vector, represents the processed angle.
[0028] Step 102: Call the sine function to perform encoding processing on the modulus length and angle in each velocity vector to obtain an encoded feature vector.
[0029] After calculating the modulus length and angle of the velocity vector, then call the sine function to perform encoding processing on the modulus length and angle in each velocity vector to obtain an encoded feature vector. By designing the corresponding sine function sin to calculate multiple different sine values of the angle, and then taking the product of the sine value and the modulus length as the encoded value, and then combining multiple encoded values to obtain the encoded feature vector.
[0030] Step 103: Perform normalization processing on the encoded feature vector, and call the BP neural network model to perform prediction processing on the encoded feature vector after normalization processing to obtain a predicted feature vector.
[0031] The encoded feature vector obtained through sine function encoding is further subjected to normalization processing. The normalization processing can be Z-Score normalization. By calculating the standard deviation and mean of the vector values in the encoded feature vector, and then further calculating the normalized encoded feature vector according to the vector values, standard deviation, and mean.
[0032] The standardized encoded feature vectors can be directly input into the BP neural network model. Through the BP neural network model, predictive processing is performed on the standardized encoded feature vectors to obtain predictive feature vectors. Before inputting into the BP neural network model, it is necessary to splice the encoded feature vectors corresponding to the two velocity signals after standardization, and then input the spliced feature vectors into the BP neural network model.
[0033] It can be understood that if there are more (i.e., greater than two) initial velocity values, then the encoded feature vectors corresponding to multiple velocity signals after standardization are spliced, and then the spliced feature vectors are input into the BP neural network model.
[0034] Step 104: Perform inverse standardization processing on the predictive feature vectors to obtain the actual velocity values during the movement of the dynamic system.
[0035] Through inverse standardization processing, the predictive feature vectors can be restored to the form of magnitude and angle. The inverse standardization process can be calculated using the mean or standard deviation calculated during the standardization process. After the predictive feature vectors obtained by the BP neural network model are restored to magnitude and angle, they can be determined as the actual velocity values during the movement of the dynamic system, so as to complete the scenario task of the dynamic system.
[0036] In one example, as Figure 2 shown, the scenario task is drone cruising, that is, the dynamic system is a drone. During the flight of the drone, the flight speed of the drone relative to the air and the wind speed are measured by an odometer or a sensor as two initial velocity values. Of course, there may be winds in more than one direction (such as southeast wind or northwest wind), so there will be more than two initial velocity values. Then, the actual velocity values are calculated through the above steps 101 to 104. From this, the actual flight speed of the drone can be determined, that is, the actual flight speed of the drone under the influence of the wind speed. Subsequently, the cruising task of the drone can be planned or the drone can be positioned based on this.
[0037] In another example, the scenario task is the underwater exploration of an AI robot, that is, the dynamic system is an AI robot. During the underwater exploration of the robot, the moving speed of the current robot and the water flow speed are measured by an odometer or a sensor as two initial velocity values. Of course, there may be water flows in more than one direction, so there will be more than two initial velocity values. Then, the actual velocity values are calculated through the above steps 101 to 104. From this, the actual moving speed of the robot during the exploration process under the influence of water resistance can be determined. Subsequently, the exploration task of the robot can be planned or the pose estimation of the robot can be performed based on this.
[0038] In an embodiment of the present invention, the sine function is first called to encode at least two initial velocity values in a dynamic system. Thus, through the periodic characteristics of the sine, information loss during signal processing can be reduced, ensuring that more key information can be retained when processing high-dimensional and complex velocity signals, thereby enhancing the robustness and computational accuracy of subsequent models. Next, the BP neural network model is called to predict the encoded feature vector after normalization processing to obtain the predicted feature vector, and the final velocity signal is obtained. Thus, by leveraging the powerful computational ability of the neural network for velocity synthesis, not only is the computational resource consumption during training and signal processing in traditional methods reduced, but also the effectiveness in velocity vector encoding and summation tasks is improved.
[0039] In some embodiments, the sine function is called to encode the magnitude and angle in each velocity vector to obtain the encoded feature vector. The specific process of the encoding process is described below.
[0040] First, within the angular range from 0 to , N equally spaced sampling points are determined. For example, N can be taken as 360. Thus, the angle of each sampling point is: (2) In the above formula (2), represents the angle of the sampling point, and i represents the i-th sampling point among the N sampling points.
[0041] Next, within each sampling point, the encoded value of each sampling point is calculated according to the following formula; (3) In the above formula (3), e represents the encoded value of each sampling point, represents the angle of the sampling point, represents the angle in the velocity vector, represents the magnitude in the velocity vector.
[0042] Finally, the encoded values of each sampling point are combined to obtain the encoded vector corresponding to the velocity vector, denoted as .
[0043] Since the velocity synthesis calculation involves at least two velocity vectors, the encoded vectors corresponding to each velocity signal need to be concatenated to obtain the encoded feature vector X, denoted as , and respectively represent the encoded vectors corresponding to the two velocity signals. For example, if the sampling points during encoding are 360, then the combined encoded feature vector X has 720 nodes, and each encoded vector corresponding to a velocity signal has 360 sampling points.
[0044] In the embodiments of the present invention, after obtaining two initial velocity values, instead of directly performing a linear summation calculation on the two velocity signals according to the traditional linear calculation method, the velocity vectors corresponding to the initial velocity values are respectively encoded through the sine function. Due to the periodic characteristics of the sine, information loss during the signal processing can be reduced, ensuring that more key information can be retained when processing high-dimensional and complex velocity signals, thereby improving the robustness and calculation accuracy of the subsequent model.
[0045] In some embodiments, when calling the BP neural network model for prediction processing, it is also necessary to perform normalization processing on the encoded feature vector. Here, Z-Score normalization processing is adopted. The following specifically introduces the normalization processing process of the encoded feature vector.
[0046] First, the mean and standard deviation of the vector values in the encoded feature vector are respectively determined. The mean is calculated as follows: (4) In the above formula (4), n represents the number of vector values in the encoded feature vector X, represents the i-th vector value in the encoded feature vector X.
[0047] The standard deviation s is calculated as follows: (5) In the above formula (5), is the mean calculated in formula (4), represents the i-th vector value in the encoded feature vector X.
[0048] For each vector value, the difference between the vector value and the mean is determined, and the ratio of the difference to the standard deviation s is used as the normalized value of the vector value, denoted as , and the formula is as follows: (6) Finally, the normalized values of each vector value are concatenated to obtain the normalized encoded feature vector Y, which is used for input to the called BP neural network model for prediction.
[0049] In the embodiments of the present invention, normalizing the encoded feature vector encoded by the sine function can make the mean of the vector values in the encoded feature vector be 0 and the variance be 1, thereby eliminating the dimensional difference between different feature vectors and making the vector values within a similar numerical range, facilitating the subsequent BP neural network model to converge faster.
[0050] In some embodiments, after the encoded feature vector is normalized, the BP neural network model is called to perform prediction processing on the normalized encoded feature vector to obtain a predicted feature vector. The process of prediction processing is specifically described below.
[0051] First, the normalized encoded feature vector is input into the hidden network layer of the BP neural network model. The BP neural network model includes two consecutive hidden network layers. The number of neurons in the first hidden network layer is 256, and the number of neurons in the second hidden network layer is 128. The activation function of both hidden network layers is the Leaky ReLU activation function, which is expressed as follows: (7) In the above formula (7), x represents the calculation result of the hidden network layer, and a is a constant greater than 0. In the embodiments of the present invention, a takes the value of 0.01.
[0052] After the encoded feature vector is input into the hidden network layer of the BP neural network model, the corresponding calculation result is obtained through the neurons therein, and then the calculation result of the hidden network layer is mapped through the Leaky ReLU activation function to obtain the predicted feature vector, which can be specifically denoted as 。
[0053] The predicted feature vector can then be inverse-normalized to restore it to the form of modulus and angle. The inverse-normalization process can be calculated using the mean or standard deviation calculated during the normalization process. For example, each vector value in the predicted feature vector is substituted into the above formula (6) to calculate the corresponding inverse-normalized vector value, and then the modulus and angle are calculated through the sine function in formula (3), which can be determined as the actual speed value of the dynamic system during the movement process for completing the scenario task of the dynamic system.
[0054] In the embodiments of the present invention, by leveraging the non-linear mapping ability of the neural network to perform non-linear speed vector calculation, the synthesis calculation of multiple non-linear speed vectors is achieved, overcoming the deficiencies of traditional linear model calculation methods. Setting the Leaky ReLU activation function in the BP neural network model helps to balance the calculation efficiency and model performance, can accelerate the training and convergence speed of the model during training, reduces the computational resource consumption in the training and signal processing processes of traditional methods, and improves the effectiveness in the speed vector encoding and summation tasks.
[0055] The training process of the BP neural network model is introduced below.
[0056] First, it is necessary to obtain speed signal samples. Each speed signal sample includes at least two initial speed vector samples and the corresponding true speed vector. This can maintain the diversity of the data, so that the BP neural network model can perform accurate speed calculation when facing multiple speed vectors. The true speed vector is the actual speed calculated based on the synthesis of at least two initial speed vector samples as the sample label.
[0057] Taking drone cruising as an example, during the flight of the drone, the drone's built-in sensors, such as the positioning system GPS, inertial measurement unit IMU and meteorological sensors, measure the flight speed vector and wind speed vector as two initial speed vector samples to construct a speed signal sample, and then use other speed calculation methods or models to synthesize the flight speed vector and wind speed vector to obtain the actual speed of the drone flight as the corresponding true speed vector. In this way, the initial speed vector samples are constructed, and the number of samples can be 10,000.
[0058] The speed signal samples need to be preprocessed, and the initial speed vector samples included therein are calculated and converted into polar coordinate vectors to obtain the corresponding modulus and angle. Next, the sine function is called to encode the modulus and angle in each initial speed vector sample to obtain the encoded feature vector sample, and then the encoded feature vector sample is input into the BP neural network model for forward propagation to obtain the predicted speed vector. The predicted speed vector also needs to be denormalized and converted into polar coordinates to facilitate the calculation of the training loss function with the actual predicted speed vector.
[0059] Since there are multiple initial velocity vector samples, there are also multiple coded feature vector samples. Before the BP neural network model is processed, these coded feature vector samples need to be spliced and then input into the BP neural network model. Before starting training, the weights and bias parameters in the BP neural network model are randomly initialized.
[0060] During training iterations, a training loss function of the BP neural network model is constructed based on the true speed vector and the predicted speed vector. The training loss function may be a mean square error or a mean absolute error. The mean square error or the mean absolute error is calculated based on the true speed vector and the predicted speed vector. Back propagation is performed in the BP neural network model through the training loss function to update the parameters of the BP neural network model.
[0061] Here, in each iteration process, when the training loss function backpropagates in the BP neural network model, the error term of each layer is calculated layer by layer from the output layer to the input layer. This process is used to update the weights and biases, helping the network gradually approach the optimal solution. Using the calculated error terms, the weights and biases are updated through gradient descent or other gradient optimization algorithms. The learning rate (which can be set to 0.001) is used to control the update step, preventing overly large adjustments from causing model instability.
[0062] After training the BP neural network model through multiple iterations, when in a certain iteration process, the training loss function starts to converge or reaches the maximum number of iterations, the iteration is stopped and the training process ends.
[0063] In the embodiments of the present invention, by collecting diverse initial velocity vector samples, the BP neural network model can perform accurate velocity calculations even when facing multiple velocity vectors, having good generalization performance. And by using the true velocity vector as the sample label to constrain the BP neural network model, it ensures that the model has accurate velocity vector calculation capabilities and is reliable.
[0064] In some embodiments, the training loss function of the BP neural network model includes the mean square error loss function or the mean absolute error loss function. The construction process of the training loss function is introduced below.
[0065] When the training loss function is the mean square error loss function, the construction process of the mean square error loss function can be to first calculate the mean square error loss value of the modulus length based on the predicted modulus length in the predicted velocity vector and the true modulus length in the true velocity vector, expressed as , and the calculation formula is as follows: (8) In the above formula (8), represents the i-th modulus length in the predicted velocity vector, represents the i-th modulus length in the true velocity vector, and n represents the number of modulus lengths in the predicted velocity vector and the true velocity vector.
[0066] Then, based on the predicted angle in the predicted velocity vector and the true angle in the true velocity vector, calculate the mean square error loss value of the angle, expressed as , and the calculation formula is as follows: (9) In the above formula (9), represents the i-th angle in the predicted velocity vector, represents the i-th angle in the true velocity vector, and n represents the number of angles in the predicted velocity vector and the true velocity vector.
[0067] Since the velocity vector includes a magnitude and an angle, it is also necessary to calculate both the angle and the magnitude simultaneously after the prediction by the BP neural network model. In order to enable the BP neural network model to predict accurate magnitude and angle simultaneously, here, after calculating the mean error values of the magnitude and the angle respectively through the above formulas (8) and (9), the two are combined, that is, the sum of the mean square error loss value of the magnitude and the mean square error loss value of the angle is used as the mean square error loss function.
[0068] When the training loss function is the mean absolute error loss function, the construction process of the mean absolute error loss function is similar to the construction process of the above mean square error loss function. First, the mean absolute error loss value of the magnitude can be calculated based on the predicted magnitude in the predicted velocity vector and the true magnitude in the true velocity vector, which is expressed as , and the calculation formula is as follows: (10) In the above formula (10), represents the i-th magnitude in the predicted velocity vector, represents the i-th magnitude in the true velocity vector, and n represents the number of magnitudes in the predicted velocity vector and the true velocity vector.
[0069] Then, based on the predicted angle in the predicted velocity vector and the true angle in the true velocity vector, the mean absolute error loss value of the angle is calculated, which is expressed as , and the calculation formula is as follows: (9) In the above formula (9), represents the i-th angle in the predicted velocity vector, represents the i-th angle in the true velocity vector, and n represents the number of angles in the predicted velocity vector and the true velocity vector.
[0070] Finally, similar to the mean square error loss function, the sum of the mean absolute error loss value of the magnitude and the mean absolute error loss value of the angle is used as the mean absolute error loss function.
[0071] In the embodiments of the present invention, the loss function of the BP neural network model is constructed by calculating the mean absolute error or the mean square error between the true velocity vector and the predicted velocity vector, so as to improve the accuracy and reliability of the BP neural network model in velocity vector calculation.
[0072] Next, the velocity calculation device of the dynamic system provided by the present invention will be described. The velocity calculation device of the dynamic system described below can be correspondingly referred to the velocity synthesis method of the dynamic system described above.
[0073] As Figure 3As shown in the figure, the speed calculation device of the dynamic system provided by the present invention specifically includes: an acquisition module 301, an encoding module 302, a prediction module 303, and a processing module 304. Specifically, the acquisition module 301 is configured to acquire at least two initial speed values in the dynamic system, where the initial speed values include speed vectors of the dynamic system during the movement process; the encoding module 302 is configured to call the sine function to perform encoding processing on the magnitude and angle in each of the speed vectors to obtain encoded feature vectors; the prediction module 303 is configured to perform normalization processing on the encoded feature vectors, and call the BP neural network model to perform prediction processing on the normalized encoded feature vectors to obtain predicted feature vectors; the processing module 304 is configured to perform inverse normalization processing on the predicted feature vectors to obtain the actual speed values of the dynamic system during the movement process.
[0074] It should be noted that the beneficial effects of the speed calculation device of the dynamic system here can correspond to those of the speed synthesis method of the dynamic system in the above text. Therefore, the beneficial effects of the speed calculation device of the dynamic system will not be elaborated here.
[0075] Figure 4 An example of the physical structure diagram of an electronic device is shown in Figure 4 As shown in the figure, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440. Among them, the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call the logical instructions in the memory 430 to execute the speed synthesis method of the dynamic system, and the method includes: acquiring at least two initial speed values in the dynamic system, where the initial speed values include speed vectors of the dynamic system during the movement process; calling the sine function to perform encoding processing on the magnitude and angle in each of the speed vectors to obtain encoded feature vectors; performing normalization processing on the encoded feature vectors, and calling the BP neural network model to perform prediction processing on the normalized encoded feature vectors to obtain predicted feature vectors; performing inverse normalization processing on the predicted feature vectors to obtain the actual speed values of the dynamic system during the movement process.
[0076] In addition, when the logical instructions in the above-mentioned memory 430 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0077] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the speed synthesis method of the dynamic system provided by the above-mentioned various methods. The method includes: obtaining at least two initial speed values in the dynamic system, where the initial speed values include speed vectors of the dynamic system during the movement process; calling a sine function to encode the magnitude and angle in each of the speed vectors to obtain an encoded feature vector; performing a normalization process on the encoded feature vector, and calling a BP neural network model to perform a prediction process on the normalized encoded feature vector to obtain a predicted feature vector; performing an inverse normalization process on the predicted feature vector to obtain the actual speed value of the dynamic system during the movement process.
[0078] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the speed synthesis method of the dynamic system provided by the above-mentioned various methods. The method includes: obtaining at least two initial speed values in the dynamic system, where the initial speed values include speed vectors of the dynamic system during the movement process; calling a sine function to encode the magnitude and angle in each of the speed vectors to obtain an encoded feature vector; performing a normalization process on the encoded feature vector, and calling a BP neural network model to perform a prediction process on the normalized encoded feature vector to obtain a predicted feature vector; performing an inverse normalization process on the predicted feature vector to obtain the actual speed value of the dynamic system during the movement process.
[0079] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.
[0080] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A velocity synthesis method for a dynamic system, characterized in that: include: Acquire at least two initial velocity values in the dynamic system, wherein the initial velocity value includes a velocity vector of the dynamic system during motion; Calling a sine function to encode the modulus and angle in each velocity vector to obtain an encoded feature vector; The coding feature vector is standardized, and a BP neural network model is used to predict the standardized coding feature vector to obtain a predicted feature vector; The predicted feature vector is denormalized to obtain the actual speed value of the dynamic system during the motion process.
2. The velocity synthesis method of a dynamic system according to claim 1, characterized in that: The calling of the sine function to encode the modulus and angle in each velocity vector to obtain an encoded feature vector includes: In the angle range of 0 to 2π, determine N equally spaced sampling points; At each sampling point, the encoding value of each sampling point is calculated according to the following formula; Among them, e represents the encoding value of each sampling point, represents the sampling point, represents the angle in the velocity vector, represents the modulus length of the velocity vector; The encoding value of each sampling point is combined to obtain the encoding vector corresponding to the velocity vector; The encoding vectors corresponding to each speed signal are concatenated to obtain the encoding feature vector.
3. The velocity synthesis method of a dynamic system according to claim 1, characterized in that: The standardization process of the encoded feature vector includes: Determining the mean and standard deviation of the vector values in the encoded feature vector respectively; For each vector value, determining a difference between the vector value and the mean, and taking a ratio of the difference to the standard deviation as a normalized value of the vector value; The standard values of each vector value are concatenated to obtain a standardized encoding feature vector.
4. The velocity synthesis method of a dynamic system according to claim 1, characterized in that: The calling of the BP neural network model to perform prediction processing on the coded feature vector after the standardization processing to obtain the predicted feature vector includes: Inputting the standardized encoded feature vector into the hidden network layer of the BP neural network model, wherein the BP neural network model includes two consecutive hidden network layers, and the activation function of the hidden network layer is the LeakyReLU activation function; The calculation result of the hidden network layer is mapped by the Leaky ReLU activation function to obtain a predicted feature vector.
5. The velocity synthesis method of a dynamic system according to claim 1, characterized in that: The training process of the BP neural network model includes: Acquire velocity signal samples, each of the velocity signal samples comprising at least two initial velocity vector samples and a corresponding true velocity vector; Calling a sine function to encode the modulus and angle in each of the initial velocity vector samples to obtain an encoded feature vector sample; Inputting the encoded feature vector sample into the BP neural network model for forward propagation to obtain a predicted speed vector; Constructing a training loss function of the BP neural network model based on the true speed vector and the predicted speed vector; Back propagation is performed in the BP neural network model through the training loss function to update the parameters of the BP neural network model.
6. The velocity synthesis method of a dynamic system according to claim 5, characterized in that: The training loss function of the BP neural network model includes a mean square error loss function or a mean absolute error loss function; The construction process of the mean square error loss function includes: Calculating a modulus length mean square error loss value according to the predicted modulus length in the predicted velocity vector and the true modulus length in the true velocity vector; Calculating an angle mean square error loss value according to the predicted angle in the predicted speed vector and the real angle in the real speed vector; The sum of the modulus mean square error loss value and the angle mean square error loss value is used as a mean square error loss function; The construction process of the mean absolute error loss function includes: Calculating a modulus mean absolute error loss value according to the predicted modulus in the predicted velocity vector and the true modulus in the true velocity vector; Calculating an angle mean absolute error loss value according to the predicted angle in the predicted speed vector and the true angle in the true speed vector; The sum of the modulus mean absolute error loss value and the angle mean absolute error loss value is used as the mean absolute error loss function.
7. A speed calculation device for a dynamic system, characterized in that: include: An acquisition module, used for acquiring at least two initial velocity values in a dynamic system, wherein the initial velocity value comprises a velocity vector of the dynamic system during motion; An encoding module, used for calling a sine function to encode the modulus and angle in each velocity vector to obtain an encoding feature vector; A prediction module is used to perform standardization processing on the coding feature vector and call a BP neural network model to perform prediction processing on the standardized coding feature vector to obtain a prediction feature vector; The processing module is used to perform denormalization processing on the predicted feature vector to obtain the actual speed value of the dynamic system during the movement process.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the velocity synthesis method for a dynamic system according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the velocity synthesis method for a dynamic system as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the velocity synthesis method for a dynamic system as claimed in any one of claims 1 to 6 is implemented.