A neural network-based rudder model construction method and system

By constructing a servo motor simulation model based on a neural network method, the problem of complex servo motor simulation modeling and inability to accurately reproduce nonlinear characteristics in existing technologies is solved. This enables fast and accurate servo motor modeling and supports cross-platform applications.

CN116027681BActive Publication Date: 2026-02-10BEIJING RESEARCH INSTITUTE OF MECHANICAL & ELECTRICAL TECHNOLOGY CO LTD CAM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211592955.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2026-02-10
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing servo motor simulation modeling processes are complex and cannot accurately reproduce the nonlinear characteristics of servos.

Method used

A neural network-based approach is adopted. By determining the upper limit of the servo motor's frequency and the sampling frequency, control signals are generated and feedback signals are collected. After preprocessing, a sample dataset is constructed, and a neural network model is used to train the simulation model of the servo motor.

Benefits of technology

It improves the speed and accuracy of servo modeling, can cover the effective operating frequency of servos, reflect their nonlinear characteristics, and supports cross-platform and cross-code embedding, making it suitable for engineering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116027681B_ABST
    Figure CN116027681B_ABST
Patent Text Reader

Abstract

The application relates to a rudder motor model construction method and system based on a neural network, and relates to the technical field of semi-physical simulation, and solves the problems that the existing rudder motor simulation modeling process is complex and cannot accurately restore the characteristics of the rudder motor. The method comprises the following steps: determining the upper limit of the frequency of the rudder motor and the sampling frequency; generating a control signal according to the upper limit of the frequency and the sampling frequency, collecting a feedback signal output by the rudder motor according to the control signal; pre-processing the control signal and the corresponding feedback signal to obtain a sample data set; constructing a neural network model, training the neural network model based on the sample data set, and taking the trained neural network model as a simulation model of the rudder motor. Therefore, the simulation model of the rudder motor is quickly and accurately constructed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of semi-physical simulation, in particular to a rudder system model construction method and system based on a neural network. BACKGROUND

[0002] In the process of aircraft semi-physical simulation, the rudder system as an important actuator usually needs to be controlled, so as to establish a complete control loop. The mode of rudder system control can be physical participation and model participation. The advantage of physical participation is that it can best represent the mechanical and electrical characteristics of the rudder system, but physical participation also has limitations, which are limited by environmental conditions and equipment status. Especially in the condition of rapid short-term control system verification, organizing the rudder system and its supporting equipment will affect the test progress, so using the rudder system model to replace the rudder system will be a better solution.

[0003] The rudder system is an angular position servo system. The rudder system signal includes a control signal for driving the rudder surface deflection and a feedback signal representing the controlled deflection angle of the rudder surface. The main task of rudder system modeling is to find the relationship between the rudder system control signal a and the rudder system feedback signal b, i.e. b = F(a). Usually, F() is largely nonlinear.

[0004] There are many ways to simulate modeling. The commonly used ones are principle mechanism modeling method and data driven modeling method. Principle mechanism modeling is based on the composition of the rudder system. By abstracting the electrical circuit, mechanical circuit and control circuit, etc., the transfer function of the rudder system is established based on Laplace transform, and the complex frequency domain modeling of the rudder system is completed. This modeling method requires a very good understanding of the system composition and working principle of the rudder system, so as to establish a model with more reasonable characteristics and higher restoration. Therefore, there are the following problems. When there are nonlinear links or links beyond cognition in the model, such as dead zone nonlinear links introduced by tooth gap, the system is difficult to represent in the conventional analytical form, and the established model cannot well restore the characteristics of the rudder system.

[0005] The data driven modeling method can well cope with the above situation. The rudder system model is regarded as a black box. Based on the control data (input) and the measured data (output), regression, fitting or likelihood, etc. are used to abstract and approximate the rudder system model. Although the data driven modeling method avoids the difficulty of giving a complete model, it still needs to give the correct link mode in the modeling process. The main role of data driven is to complete the model parameter identification of each link.

[0006] It can be seen that the existing rudder system simulation modeling process is complex and cannot accurately restore the characteristics of the rudder system. SUMMARY

[0007] Based on the above analysis, the embodiments of the present invention aim to provide a simulation modeling method and system for servo motors based on neural networks, in order to solve the problems of existing servo motor simulation modeling processes being complex and unable to accurately reproduce the characteristics of servo motors.

[0008] On one hand, embodiments of the present invention provide a method for constructing a servo model based on a neural network, including the following steps:

[0009] Determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency, and collect the feedback signal output by the servo motor according to the control signal;

[0010] The control signal and the corresponding feedback signal are preprocessed to obtain a sample dataset;

[0011] A neural network model is constructed, and the neural network model is trained based on the sample dataset. The trained neural network model is then used as the simulation model of the servo motor.

[0012] Based on further improvements to the above technical solution, the upper frequency limit and sampling frequency of the servo motor are determined using the following method:

[0013] S101, Use the initial frequency as the current test frequency;

[0014] S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor.

[0015] S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step;

[0016] S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102.

[0017] The sampling frequency is a frequency value that is more than twice the upper limit of the frequency.

[0018] Further, generating a control signal based on the upper frequency limit and the sampling frequency includes:

[0019] S111, Use the initial frequency as the current frequency;

[0020] S112. Generate a sinusoidal signal with an integer cycle corresponding to the current frequency based on the current frequency and the sampling frequency, which serves as the control signal corresponding to the current frequency, wherein the number of cycles is greater than the third threshold.

[0021] S113. If the current frequency equals the upper frequency limit, then the generation ends;

[0022] S114. Otherwise, add the second step size to the current frequency and use the result as the current frequency, then return to step S112.

[0023] Furthermore, the control signals include control signals of different frequencies, and the control signals and corresponding feedback signals are preprocessed to obtain a sample dataset, including:

[0024] Noise reduction is performed on the control signal and corresponding feedback signal for each frequency.

[0025] Based on the maximum signal delay, the dimensions of the control signal and the corresponding feedback signal at each frequency are expanded to construct a sample dataset.

[0026] Furthermore, noise reduction is performed on the control signal and the corresponding feedback signal for each frequency, including:

[0027] Wavelet denoising is used to denoise the control signal and the corresponding feedback signal at each frequency.

[0028] Furthermore, the wavelet basis for wavelet denoising is either the Bior 3.3 or Bior 5.5 wavelet basis.

[0029] Furthermore, the maximum system delay p is determined according to the formula... The calculation yields, where t s Indicates the sampling period, t d This represents the maximum delay time between the feedback signal and the corresponding input signal, and floor(·) represents rounding down.

[0030] Furthermore, based on the maximum signal delay, the control signal and corresponding feedback signal at each frequency are augmented to construct sample data, including:

[0031] S231, Let k = 1;

[0032] S232. Extract the kth to k+p-1th data from the control signal at the i-th frequency as input data for a sample data, and extract the kth to k+p-1th data from the feedback signal at the i-th frequency as label data for the sample data, thus obtaining a complete sample data.

[0033] S233, If k = l i -p+1, then the sample data corresponding to the i-th frequency is constructed; where, li Let p represent the length of the control signal corresponding to the i-th frequency, and p represent the maximum signal delay.

[0034] S234. Otherwise, k = k + 1, return to step S232.

[0035] On the other hand, embodiments of the present invention provide a servo motor model construction system based on neural networks, including the following modules:

[0036] The signal generation and acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency; and acquire the feedback signal output by the servo motor according to the control signal.

[0037] A sample dataset construction module is used to preprocess the control signals and corresponding feedback signals to obtain a sample dataset;

[0038] The simulation model training module is used to construct a neural network model, train the neural network model based on the sample dataset, and use the trained neural network model as the simulation model of the servo motor.

[0039] Furthermore, the signal acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor in the following manner:

[0040] S101, Use the initial frequency as the current test frequency;

[0041] S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor.

[0042] S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step;

[0043] S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102.

[0044] The sampling frequency is a frequency value that is more than twice the upper limit of the frequency.

[0045] Compared with existing technologies, this invention uses a neural network method to significantly reduce the time required for in-depth servo modeling, avoids the difficulties of building detailed servo models, and increases the speed and accuracy of servo modeling. By generating control signals based on the servo's frequency upper limit and operating frequency, and generating sample data based on the control signals and corresponding feedback signals, the servo model is built and verified using measured data. This method can cover the effective operating frequency of the servo and effectively reflect the nonlinear characteristics of the servo. Furthermore, the artificial neural network, expressed in parametric form, can be easily embedded across platforms and codebases, making it highly suitable for engineering applications.

[0046] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0047] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0048] Figure 1 This is a flowchart of a servo motor model construction method based on neural networks according to an embodiment of the present invention;

[0049] Figure 2 This is a block diagram of the servo motor model construction system based on neural networks according to an embodiment of the present invention. Detailed Implementation

[0050] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0051] In hardware-in-the-loop simulation of aircraft, servo motors, as crucial actuators, typically require parameter control to establish a complete control loop. Servo motor parameter control can be achieved through physical parameter testing or model parameter testing. Physical parameter testing offers the advantage of maximizing the representation of the servo motor's mechanical and electrical characteristics. However, it also has limitations, being constrained by environmental conditions and equipment status. Especially in rapid, short-term control system verification, ensuring the availability of servo motors and their associated equipment can impact the test schedule. Therefore, utilizing servo motor models instead of physical servo motors is a better solution.

[0052] A servo motor is an angular position servo system. The servo motor signal includes the control signal that drives the servo motor control surface to deflect and the feedback signal that represents the controlled deflection angle of the control surface. The main task of servo motor modeling is to find the relationship between the servo motor control signal a and the servo motor feedback signal b, b = F(a). Usually, F(·) is largely nonlinear.

[0053] There are many methods for simulation modeling, with principle-based modeling and data-driven modeling being among the most commonly used. Principle-based modeling, based on the components of a servo motor, abstracts electrical, mechanical, and control circuits to establish the servo motor's transfer function using Laplace transform, thus completing the complex frequency domain modeling. This method requires a thorough understanding of the servo motor's system composition and operating principles to create a more accurate and realistic model. However, it also has drawbacks: when the model contains nonlinear elements or elements beyond our understanding, such as dead-zone nonlinearities introduced by gear backlash, the system is difficult to represent using conventional analytical forms, and the resulting model cannot accurately reproduce the servo motor's characteristics.

[0054] Data-driven modeling can effectively address the above situations. It treats the servo motor model as a black box, using control data (input) and measurement data (output) to abstract and approximate the model through regression, fitting, or likelihood estimation. While data-driven modeling avoids the challenge of providing a complete model, it still requires defining the correct component patterns during the modeling process. The main role of data-driven modeling is to identify the model parameters for each component.

[0055] Existing servo motor simulation modeling processes are complex and cannot accurately reproduce the characteristics of servos.

[0056] Thanks to the rapid development of machine learning, artificial neural network modeling has become a better solution. Also operating in a black-box manner, artificial neural networks completely remove the constraints of given components and structures by simulating the work of neurons, using hidden layers containing multiple neurons to abstract and approximate the system model. This is achieved using weighted factors w. ij and offset factor b ij Multiple hidden layers establish connections between inputs and outputs. By learning from pairs of input and output data, the optimal values ​​of various factors are determined, ultimately achieving the digitization of the model.

[0057] The implementation of artificial neural networks also relies heavily on data, therefore the quality of the training data significantly impacts the results. Artificial neural networks have limited redundancy to withstand noise and interference; non-model signal components in the data also contribute to the training process. Introducing too many non-model signal components can lead to abnormal training results or even failure. Non-model signals mainly fall into two categories: measurement noise or outliers introduced by system measurements and external interference, and patterning tendencies introduced by human factors. Regardless of the type of non-model signal, repeated reinforcement training can generate unnecessary interest in the neural network, causing problems such as convergence failure, pattern overfitting, or local optima.

[0058] The simulation modeling method based on artificial neural networks does not require in-depth understanding of the model. It only needs to ensure that non-signal noise in the measurement data is suppressed as much as possible. When the measurement data is accurate enough, the modeling speed is faster and the restoration accuracy is higher.

[0059] Based on this, and to address the remaining issues, there is an urgent need to propose a servo motor simulation modeling method based on BP neural networks that can fully reproduce the nonlinear characteristics of the servo motor.

[0060] A specific embodiment of the present invention discloses a method for constructing a servo motor model based on a neural network, such as... Figure 1 As shown, it includes the following steps:

[0061] S1. Determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency, and collect the feedback signal output by the servo motor according to the control signal;

[0062] S2. Preprocess the control signal and the corresponding feedback signal to obtain a sample dataset; construct a neural network model, train the neural network model based on the sample dataset, and use the trained neural network model as the simulation model of the servo motor.

[0063] It should be noted that the upper limit of the servo frequency is the upper limit of the servo frequency or the upper limit of the operating frequency. The feedback signal output by the servo based on the control signal is the feedback signal output by the servo based on the control signal.

[0064] Employing neural network methods significantly reduces the time required for in-depth servo modeling, avoids the challenges of building detailed servo models, and increases the speed and accuracy of servo modeling. By generating control signals based on the servo's frequency upper limit and operating frequency, and generating sample data based on the control signals and corresponding feedback signals, the servo model was built and verified using measured data. This method can cover the effective operating frequency of the servo and effectively reflects its nonlinear characteristics. Furthermore, the parametric artificial neural network can be easily embedded across platforms and codebases, making it highly suitable for engineering applications.

[0065] Specifically, in step S1, the upper frequency limit and sampling frequency of the servo are determined using the following method:

[0066] S101, Use the initial frequency as the current test frequency;

[0067] S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor.

[0068] S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step;

[0069] S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102.

[0070] The sampling frequency is a frequency value that is more than twice the upper limit of the frequency.

[0071] It should be noted that steps S101 to S104 involve performing a frequency sweep test on the actual servo motor under its rated load conditions. For example, the initial frequency is 1Hz, and 1Hz is used as the first step length (i.e., f). b1 =1), input signals of different frequencies into the servo motor and collect the feedback signals from the servo motor. Gradually increase the frequency of the input signal until the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, or the phase difference between the phase of the input signal and the phase of the feedback signal is greater than the first threshold. Stop the frequency sweep and record the current frequency f. c and at frequency f up =f c -f b1 The upper limit of the servo motor model, that is, the effective operating frequency of the servo motor is 1 to f. upHz.

[0072] According to control theory, signal tracking requires an amplitude of at least √2 / 2 and a phase of no more than 90 degrees. Therefore, the first threshold is set to 90°, and the second threshold is set to 0.707. That is, if the phase lag of the feedback acquisition signal behind the control output signal is greater than 90°, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than 0.707, then frequency sweeping is stopped and the current frequency f is recorded. c .

[0073] According to the Nyquist sampling theorem, the sampling frequency should satisfy f s >2f up That is, if the sampling frequency is greater than twice the upper limit of the frequency, then the sampling period is...

[0074] Based on the obtained upper frequency limit and sampling frequency of the servo motor, a control signal can be generated. To obtain a more accurate simulation model, the control signal should cover the effective operating frequency of the servo motor as much as possible. Specifically, step S1, generating the control signal based on the upper frequency limit and sampling frequency, includes:

[0075] S111, Use the initial frequency as the current frequency;

[0076] S112. Generate a sinusoidal signal with an integer cycle corresponding to the current frequency based on the current frequency and the sampling frequency, which serves as the control signal corresponding to the current frequency, wherein the number of cycles is greater than the third threshold.

[0077] S113. If the current frequency equals the upper frequency limit, then the generation ends;

[0078] S114. Otherwise, add the second step size to the current frequency and use the result as the current frequency, then return to step S112.

[0079] For example, if the initial frequency is 1Hz, a full-cycle sine wave signal with a frequency of 1Hz is first generated. To fully reflect the characteristics of the current frequency and ensure sufficient data for subsequent processing, the number of cycles should be greater than or equal to 10, i.e., n1≥10, representing the number of cycles of the signal corresponding to the first frequency. In practice, the number of cycles for each frequency may be different.

[0080] The initial frequency plus the second step size is used as the second frequency to generate a sinusoidal signal with an entire cycle corresponding to the second frequency. Similarly, n2≥10.

[0081] This process continues until the upper limit of the generation frequency f is reached. up The corresponding full-cycle sine wave signal.

[0082] During implementation, the second step length should be less than or equal to the first step length, so as to cover as many different operating frequencies of the servo as possible.

[0083] The control signal corresponding to each frequency is a sub-control signal.

[0084] In implementation, to facilitate the differentiation of feedback signals corresponding to input signals of different frequencies, control signals of different frequencies (i.e., each sub-control signal) are spliced ​​together after adding a certain interval signal between them to obtain a complete control signal. The interval can be a 0 signal, that is, a state without signal.

[0085] After generating a complete control signal, the control signal is input into the servo system, and simultaneously sampled at a frequency f. s The feedback signals from the servo motor are collected to obtain feedback signals that correspond one-to-one with the control signals.

[0086] The feedback signal is divided according to the interval signal to obtain the feedback signal corresponding to the control signal of different frequencies. The feedback signal corresponding to each frequency is a sub-feedback signal.

[0087] After obtaining the control signal and the feedback signal, the control signal and the corresponding feedback signal are preprocessed to obtain the sample dataset. Specifically, step S2 includes:

[0088] S21. Noise reduction is performed on the control signal and the corresponding feedback signal for each frequency;

[0089] Wavelet denoising preserves signal characteristics while removing noise, making it suitable for both control and feedback signals.

[0090] Specifically, noise reduction is performed on the control signal and the corresponding feedback signal for each frequency, including:

[0091] Wavelet denoising is used to denoise the control signal and the corresponding feedback signal at each frequency.

[0092] In implementation, firstly, wavelet functions are used to perform k-level wavelet decomposition on the control signal and the corresponding feedback signal, obtaining wavelet coefficients for each level. Each wavelet coefficient is then judged based on a pre-set threshold; if the amplitude of a wavelet coefficient is lower than the threshold, it is considered to be caused by noise and discarded; otherwise, the wavelet coefficient is retained. Based on the low-frequency coefficients of the k-th level of wavelet decomposition and the high-frequency coefficients of levels 1 to k after threshold filtering, wavelet reconstruction of the signal is performed, thus obtaining the denoised control signal and the corresponding feedback signal. In implementation, the threshold can be estimated using the Stein unbiased likelihood estimation method. The specific wavelet denoising process is existing technology and will not be elaborated here.

[0093] It should be noted that wavelet decomposition requires the signal length to be a power of 2. Therefore, before decomposition, signals that do not meet the length requirement need to be extended to make them powers of 2. For example, then according to the formula... Extract signal 1 to c i Each signal is appended to the original signal, making its length a power of 2, and then subjected to wavelet decomposition. Here, ceil(·) represents rounding up, l i This represents the length of the control signal at the i-th frequency.

[0094] It should be noted that the length of the denoised signal is the same as the length of the original signal.

[0095] The Bior wavelet basis is a biorthogonal wavelet. Since the control signal is a sinusoidal signal, using the Bior wavelet basis for noise reduction results in minimal damage to the signal.

[0096] In practice, the wavelet basis for wavelet denoising is either the Bior 3.3 or Bior 5.5 wavelet basis, thereby significantly reducing the contribution of high-frequency signals to the overall signal, minimizing the interference of noise carried by ineffective information on future training, and preventing training from failing to converge.

[0097] It should be noted that noise reduction is performed separately for the control signal and the corresponding feedback signal. For example, for a frequency f... i The sub-control signals and corresponding sub-feedback signals are subjected to wavelet denoising to obtain the denoised sub-control signals and sub-feedback signals. In practice, to prevent the influence of artificial patterns in the network's initial frequency composition during training, after signal denoising and before sample augmentation, the following steps are also included:

[0098] S22. Reconstruct the noise-reduced control signal and the corresponding feedback signal;

[0099] During implementation, control signals and corresponding feedback signals of different frequencies can be recombined in different sequences to make the signals of different frequencies randomly distributed, thereby preventing the neural network from being affected by artificial patterns of frequency composition during training.

[0100] For example, the original signal frequency arrangement is 123456789. Sub-control signals of different frequencies are recombined, for example, recombined into 651294378. The corresponding sub-feedback signals are also recombined in the same order.

[0101] S23. Expand the dimensions of the control signal and the corresponding feedback signal at each frequency according to the maximum signal delay to construct a sample dataset.

[0102] To enhance the sensitivity of artificial networks to inertial and integral characteristics, the signal is augmented based on its maximum delay. Specifically, the reconstructed control signal and its corresponding feedback signal are augmented based on their maximum delay to construct sample data, including:

[0103] S231, Let k = 1;

[0104] S232. Extract the kth to k+p-1th data from the control signal at the i-th frequency as input data for a sample data, and extract the kth to k+p-1th data from the feedback signal at the i-th frequency as label data for the sample data, thus obtaining a complete sample data.

[0105] S233, If k = l i -p+1, then the sample data corresponding to the i-th frequency is constructed; where, l i Let p represent the length of the control signal corresponding to the i-th frequency, and p represent the maximum signal delay.

[0106] S234. Otherwise, k = k + 1, return to step S232.

[0107] For example, the control signal for the i-th frequency is The corresponding feedback signal is Among them, l i This represents the length of the control signal corresponding to the i-th frequency.

[0108] Based on the maximum signal delay p, the control signal dimension is expanded using steps S231 to S234, resulting in the following control signal:

[0109] Similarly, the corresponding feedback signal is:

[0110] Using the corresponding row of data in the above matrix as the input data and label data of a sample, respectively, we obtain the sample dataset.

[0111] Wherein, the maximum signal delay p is according to the formula The calculation yields, where t s Indicates the sampling period, t d This represents the maximum delay time between the feedback signal and the corresponding input signal, and floor(·) represents rounding down.

[0112] That is, calculate the maximum delay time between the input servo control signal and the corresponding feedback signal at each frequency, and take the maximum value as the maximum delay time between the feedback signal and the corresponding input signal.

[0113] To further eliminate the influence of the model input order on training, step S22 can also be performed in the following way:

[0114] S221. Sort the control signals according to their frequency to generate the original control signal sequence; assume that the recombined control signal sequence is empty and the recombined feedback signal sequence is empty.

[0115] S222, Generate 1-f up A random number s between f; up Indicates the upper limit of frequency;

[0116] S223. If there is a control signal with frequency s in the original control signal sequence, extract the signal subsequence of the first period of the control signal with frequency s and add it to the reconstructed control signal sequence; delete the signal subsequence of the first period of the control signal with frequency s in the original control signal sequence; add the feedback signal corresponding to the signal subsequence to the reconstructed feedback signal sequence.

[0117] S224. If the original control signal sequence is empty, the recombination ends, and the recombined control signal sequence and the recombined control signal sequence are obtained.

[0118] S225. Otherwise, return to step S222.

[0119] For example, the original control signal sequence is 111122223334445555. The control signal with a frequency of 1Hz has 4 cycles, the control signal with a frequency of 2Hz has 4 cycles, the control signal with a frequency of 3Hz has 3 cycles, the control signal with a frequency of 4Hz has 3 cycles, and the control signal with a frequency of 5Hz has 4 cycles.

[0120] If the random number s is 2, then the first period of the control signal subsequence with a frequency of 2Hz is extracted and added to the reconstructed control signal sequence, resulting in a reconstructed control signal sequence of 2. The first period of the control signal subsequence with a frequency of 2Hz is then deleted from the original control signal sequence, resulting in the original control signal sequence being 11112223334445555. Simultaneously, the feedback signal corresponding to the first period of the control signal subsequence with a frequency of 2Hz is added to the reconstructed feedback signal sequence.

[0121] Since the original control signal sequence is not empty, random numbers s are generated continuously until the original control signal sequence is empty. That is, all signals in the original control signal sequence are moved to the reconstructed control signal sequence, and the reconstruction ends.

[0122] At this point, step S23 expands the dimensions of the recombined control signal and the corresponding feedback signal based on the maximum signal delay to construct a sample dataset, which can be done in the following way:

[0123] The recombined control signal and the corresponding feedback signal are divided into multiple signal segments according to the frequency of the signal;

[0124] During implementation, the signal is divided into multiple signal segments according to its frequency. Each signal segment has the same frequency. For example, if the frequency distribution of the recombined signal is 122646331457, then the signal segments it is divided into are {1,22,6,4,6,33,1,4,5,7}.

[0125] For each signal segment:

[0126] S2301, Let k = 1;

[0127] S2302. Extract the k-th to k+p-1-th data from the control signal of the i-th signal segment as input data for a sample data, and extract the k-th to k+p-1-th data from the feedback signal of the i-th signal segment as label data for the sample data, to obtain a complete sample data.

[0128] S2303, If k = l' i -p+1, then the sample data corresponding to the i-th signal segment is constructed; where, l' i Let p represent the length of the i-th signal segment and p represent the maximum signal delay.

[0129] S2304. Otherwise, k = k + 1, return to step S2302.

[0130] For example, the control signal for the i-th signal segment is The corresponding feedback signal is Among them, l' i This represents the length of the control signal corresponding to the i-th signal segment.

[0131] Based on the maximum signal delay p, the control signal dimension is expanded using steps S2301 to S2304, resulting in the following control signal:

[0132] Similarly, the corresponding feedback signal is:

[0133] In implementation, the neural network model can be a backpropagation (BP) neural network model, which includes a two-layer hidden layer structure, with the first hidden layer having p nodes. 2 The first layer has 2p hidden layers, the second layer has 2p hidden layers, the activation function for the hidden layers is hyperbolic sine (Tanh), the number of epochs is set to 1000, and the learning rate is set to 0.01. When the model converges, the weight factors and bias factors of the neural network model are determined, thus obtaining the simulation model of the servo motor.

[0134] During implementation, the model loss is calculated using the following formula, and backpropagation is performed to update the model parameters:

[0135] Among them, y' ij y represents the value of the j-th element in the model output corresponding to the i-th sample. ij Let represent the value of the j-th element of the label corresponding to the i-th sample, and p represent the maximum system latency. The loss is the loss for the i-th sample.

[0136] During the training of the network model, each Epoch can reorganize the control signals and corresponding feedback signals of different frequencies in accordance with step S22, thereby avoiding the influence of artificial patterns of frequency composition on the neural network during the training process.

[0137] When the model's loss reaches the required level or the required number of iterations is met, the model training ends, and the trained neural network model is used as the simulation model for the servo motor.

[0138] The simulation modeling method for servo motors based on neural networks of the present invention uses measured data to establish and verify the servo motor model. The simulation results of the constructed model are more accurate and can cover the effective operating frequency of the servo motor. It also well reflects the nonlinear characteristics of the servo motor. At the same time, the artificial neural network represented in the form of parameters can be easily embedded across platforms and code, which is very suitable for engineering applications.

[0139] One specific embodiment of the present invention discloses a servo motor model construction system based on neural networks, such as... Figure 2 As shown, it includes the following modules:

[0140] The signal generation and acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency; and acquire the feedback signal output by the servo motor according to the control signal.

[0141] A sample dataset construction module is used to preprocess the control signals and corresponding feedback signals to obtain a sample dataset;

[0142] The simulation model training module is used to construct a neural network model, train the neural network model based on the sample dataset, and use the trained neural network model as the simulation model of the servo motor.

[0143] Preferably, the signal acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor in the following manner:

[0144] S101, Use the initial frequency as the current test frequency;

[0145] S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor.

[0146] S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step;

[0147] S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102.

[0148] The sampling frequency is a frequency value that is more than twice the upper limit of the frequency.

[0149] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.

[0150] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0151] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for constructing a servo motor model based on a neural network, characterized in that, Includes the following steps: Determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency, and collect the feedback signal output by the servo motor according to the control signal; The control signal and the corresponding feedback signal are preprocessed to obtain a sample dataset; Construct a neural network model, train the neural network model based on the sample dataset, and use the trained neural network model as the simulation model of the servo motor; The upper frequency limit and sampling frequency of the servo motor are determined using the following method: Under the rated load conditions of the servo motor, a frequency sweep test was performed on the actual servo motor. S101, Use the initial frequency as the current test frequency; S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor. S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step; S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102. Wherein, the sampling frequency is a frequency value that is more than twice the upper limit of the frequency; Generate a control signal based on the upper frequency limit and the sampling frequency, including: S111, Use the initial frequency as the current frequency; S112. Generate a sinusoidal signal with an integer cycle corresponding to the current frequency based on the current frequency and the sampling frequency, which serves as the control signal corresponding to the current frequency, wherein the number of cycles is greater than the third threshold. S113. If the current frequency equals the upper frequency limit, then the generation ends; S114. Otherwise, add the second step size to the current frequency and use the result as the current frequency, then return to step S112.

2. The method for constructing a servo motor model based on a neural network according to claim 1, characterized in that, The control signals include control signals of different frequencies. Preprocessing the control signals and corresponding feedback signals yields a sample dataset, including: Noise reduction is performed on the control signal and corresponding feedback signal for each frequency. Based on the maximum signal delay, the dimensions of the control signal and the corresponding feedback signal at each frequency are expanded to construct a sample dataset.

3. The method for constructing a servo motor model based on a neural network according to claim 2, characterized in that, Noise reduction is performed on the control signal and corresponding feedback signal for each frequency, including: Wavelet denoising is used to denoise the control signal and the corresponding feedback signal at each frequency.

4. The method for constructing a servo motor model based on a neural network according to claim 3, characterized in that, The wavelet basis for wavelet denoising is either the Bior 3.3 or Bior 5.5 wavelet basis.

5. The method for constructing a servo motor model based on a neural network according to claim 2, characterized in that, The maximum signal delay p is based on the formula The calculation yields, where t s Indicates the sampling period, t d This represents the maximum delay time between the feedback signal and the corresponding input signal, and floor(g) represents rounding down.

6. The method for constructing a servo motor model based on a neural network according to claim 2, characterized in that, Based on the maximum signal delay, the control signal and corresponding feedback signal at each frequency are augmented to construct sample data, including: S231, Let k = 1; S232. Extract the kth to k+p-1th data from the control signal at the i-th frequency as input data for a sample data, and extract the kth to k+p-1th data from the feedback signal at the i-th frequency as label data for the sample data, thus obtaining a complete sample data. S233, If k = l i -p+1, then the sample data corresponding to the i-th frequency is constructed; where, l i Let p represent the length of the control signal corresponding to the i-th frequency, and p represent the maximum signal delay. S234. Otherwise, k = k + 1, return to step S232.

7. A servo motor model construction system based on neural networks, characterized in that, Includes the following modules: The signal generation and acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor; generate a control signal based on the upper frequency limit and sampling frequency; and acquire the feedback signal output by the servo motor according to the control signal. A sample dataset construction module is used to preprocess the control signals and corresponding feedback signals to obtain a sample dataset; The simulation model training module is used to construct a neural network model, train the neural network model based on the sample dataset, and use the trained neural network model as the simulation model of the servo motor. The signal acquisition module is used to determine the upper frequency limit and sampling frequency of the servo motor in the following manner: Under the rated load conditions of the servo motor, a frequency sweep test was performed on the actual servo motor. S101, Use the initial frequency as the current test frequency; S102. Input the signal corresponding to the current test frequency into the servo motor and collect the feedback signal from the servo motor. S103. If the phase difference between the input signal and the feedback signal is greater than the first threshold, or the ratio of the maximum amplitude of the feedback signal to the maximum amplitude of the input signal is less than the second threshold, then stop the test and set f... up =f c -f b1 As the upper limit of the servo motor's frequency; where, f c f represents the current frequency. up f represents the upper limit of frequency. b1 Indicates the length of the first step; S104. Otherwise, add the current frequency to the result obtained in the first step and use it as the current frequency, then return to step S102. Wherein, the sampling frequency is a frequency value that is more than twice the upper limit of the frequency; Generate a control signal based on the upper frequency limit and the sampling frequency, including: S111, Use the initial frequency as the current frequency; S112. Generate a sinusoidal signal with an integer cycle corresponding to the current frequency based on the current frequency and the sampling frequency, which serves as the control signal corresponding to the current frequency, wherein the number of cycles is greater than the third threshold. S113. If the current frequency equals the upper frequency limit, then the generation ends; S114. Otherwise, add the second step size to the current frequency and use the result as the current frequency, then return to step S112.

Citation Information

Patent Citations

  • Radio frequency filter modeling method

    CN112231985A

  • Feature extraction method based on artificial feature and convolutional feature fusion of deep neural network

    CN113536683A