Servo control device and servo control method

Through real-time acquisition and machine learning, the environment model is established, the servo control device parameters are automatically adjusted, and the control algorithm is optimized, which solves the problems of slow response speed and insufficient adaptability of the servo system, and achieves rapid response and stability improvement.

CN120370702APending Publication Date: 2025-07-25JIAXING DEALOUR ELECTRIC TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510509226.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When facing rapidly changing loads or instructions, the existing servo control systems have slow response speed, are greatly affected by the external environment, lack adaptability and robustness, and are difficult to adapt to dynamic changes under different working conditions. Traditional control methods cannot be adjusted in time and effectively, resulting in a degradation of system performance.

Method used

By collecting external environmental parameters in real time, pre-processing and storage using sensors, establishing environmental models based on machine learning, conducting future trend analysis, automatically adjusting control device parameters, and optimizing control algorithms to quickly respond to external interference.

Benefits of technology

It realizes the rapid response of the servo system to external interference, improves the stability and reliability of the system, enhances the anti-interference ability, improves the response speed and accuracy, expands the system application range, and adapts to dynamic changes under different working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120370702A_ABST
    Figure CN120370702A_ABST
Patent Text Reader

Abstract

The invention discloses a servo control method, and relates to the technical field of industrial automation, and the control method comprises the steps: S1, obtaining external environment parameters in real time based on a sensor, and carrying out the preprocessing and storage of the collected parameters; s2, establishing an environment model for learning based on a machine learning technology according to the preprocessed external environment parameters; s3, analyzing and predicting an external environment change trend in a future time period through environment model analysis and prediction, and automatically adjusting parameters of a control device based on an output result; and S4, optimizing a control algorithm, and realizing rapid response of the servo system to external interference. The invention further discloses a servo control device. According to the method, the control effect can be optimized, the stability and reliability of the system can be improved, the control algorithm is optimized, so that the servo system quickly responds to external interference, the interference resistance is enhanced, the response speed and precision are improved, the system application range is expanded, dynamic changes under different working conditions can be adapted, adjustment is timely and effectively carried out, and the system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial automation, and specifically relates to a servo control device and a servo control method. Background Art

[0002] With the rapid development of industrial automation and robotics technology, higher and higher requirements are put forward for the accuracy, speed and stability of motion control systems, which are widely used in multiple fields such as numerical control machine tools, automated production lines, robots, aerospace, and medical equipment. As the core component of the servo system, the performance of the servo control device directly affects the operation effect of the entire system. In the existing servo control systems, when facing rapidly changing loads or instructions, the response speed is slow, and it is greatly affected by external environmental factors, requiring manual intervention. When facing some complex control tasks, there are certain limitations. Most control algorithms are based on fixed parameter settings, making it difficult to adapt to dynamic changes under different working conditions, lacking self-adaptability and robustness. Moreover, when the system is affected by external interference or internal parameters change, traditional control methods often cannot adjust in a timely and effective manner, resulting in a decline in system performance. In view of this, we propose a servo control device and a servo control method. Summary of the Invention

[0003] To solve the above technical problems, a servo control device and a servo control method are provided, and the present technical solution solves the above problems.

[0004] To achieve the above object, the technical solution adopted by the present invention is: a servo control method, and the control method includes:

[0005] S1. Based on sensors, obtain external environmental parameters in real time, and preprocess and store the collected parameters;

[0006] S2. Based on the preprocessed external environmental parameters, establish an environmental model based on machine learning technology for learning;

[0007] S3. Through analysis and prediction of the environmental model, analyze and predict the change trend of the external environment in the future time period, and automatically adjust the parameters of the control device based on the output result;

[0008] S4. Optimize the control algorithm to achieve a rapid response of the servo system to external interference.

[0009] Preferably, in step S1, the sensors include a temperature sensor, a humidity sensor, a pressure sensor and a vibration sensor to monitor the control device in real time, and the monitored parameters include temperature, humidity, pressure and vibration; preprocess the data collected in real time, including data cleaning and denoising; store the preprocessed data.

[0010] Preferably, in step S2, feature extraction is performed on the preprocessed data, the correlation analysis is used to determine the association between parameters, the data after feature extraction is divided into a training set, a validation set and a test set, and the constructed model is learned and adjusted respectively to select the optimal model hyperparameters; the model is constructed using a neural network algorithm, and the connection weights and biases between neurons are randomly initialized.

[0011] Preferably, the preprocessed data matrix is \(X\in R\) n×d , where \(n\) is the number of samples and \(d\) is the number of original features. After feature extraction, a new feature matrix \(X'\in R\) n×d′ is obtained, and \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f\): \(X' = f(X)\); the correlation analysis is based on the Pearson correlation coefficient formula. Let two feature vectors \(x'\) i and \(x'\) j be selected from \(X'\), where \(i\) and \(j\) are \(1, 2, \cdots, d'\), and their Pearson correlation coefficient \(\rho\) ij is:

[0012]

[0013] where and are the means of \(x'\) i and \(x'\) j respectively;

[0014] The data division is achieved by dividing the data \(X'\) after feature extraction and its corresponding label \(y\in R\) n into a training set \((X'\) train , \(y\) train ), a validation set \((X'\) val , \(y\) val ), and a test set \((X'\) test , \(y\) test ). Assume that the proportion of the training set is \(p\) train , the proportion of the validation set is \(p\) val , and the proportion of the test set is \(p\) test , and \(p\) train + \(p\) val + \(p\) test = 1;

[0015] According to random division, during random division, it is divided by a random index \(idx\), and the expression is:

[0016] \(X'\) train = \(X'[idx\) train , :], \(y\) train = \(y[idx\) train

[0017] \(X'\)​val = X'[idx val , :], y val = y[idx val

[0018] X' test = X'[idx test , :], y test = y[idx test

[0019] where idx train , idx val and idx test are a set of randomly generated indices;

[0020] Model learning and adjustment are achieved by setting the loss function as J(θ), where θ is the set of parameters including all weights W l and biases b l . The formula for updating parameters using gradient descent is:

[0021]

[0022] where α is the learning rate, is the gradient of the loss function at θ t .

[0023] Preferably, by evaluating the performance of the model under different combinations of hyperparameters on the validation set, the combination of hyperparameters with the optimal performance is selected. Let the set of hyperparameters be λ, and the performance metric on the validation set be P(λ). The optimal hyperparameter λ is: The test model is evaluated on the test set (X' test , y test ) using the optimal hyperparameters and the trained model to obtain the final performance metric; which represents the entire process from feature extraction to model construction, training, and evaluation.

[0024] ​​Preferably, in step S3, the environmental analysis model predicts by inputting real-time acquired data. The model, based on the learned patterns and rules, generates predicted values of environmental parameters within a future time period through autoregressive calculation, evaluates the uncertainty of the prediction results, generates multiple prediction results through Monte Carlo simulation, analyzes their distribution to determine the prediction uncertainty, formulates control rules according to the specific application scenario and the relationship between environmental parameters and control parameters, automatically adjusts the control parameters according to the prediction results and the formulated control rules, conducts control based on an automated control system, monitors and feeds back the adjusted control effect in real time, and collects new data to evaluate the effect of control parameter adjustment; when the temperature rises, predicts the decrease in humidity and adjusts the power of the humidifying equipment according to the control rules; when the humidity increases, the model predicts the change in equipment operation efficiency and adjusts the equipment operation parameters; when the light intensity changes, the model determines the prediction uncertainty through Monte Carlo simulation, monitors and feeds back the control effect in real time, and collects new data to evaluate the effect of control parameter adjustment.

[0025] Preferably, the autoregressive model assumes that there is a linear relationship between the current value and several past values. The p-order autoregressive model (AR(p)) is expressed as:

[0026]

[0027] where, y t is the environmental parameter value at time t, is the autoregressive coefficient, y t-i is the environmental parameter value at the past time t - i, ∈ t is a white noise sequence with a mean of 0. When making a prediction, if predicting the value h steps into the future, for h = 1:

[0028]

[0029] For h > 1, iterative prediction is required. When predicting h = 2, then:

[0030]

[0031] where, when t - i + 2 ≤ t, actual observed values are used, otherwise the previously predicted values are used; predicted values are generated through calculation, and the parameters of the control device are adjusted according to the prediction results.

[0032] Preferably, in step S4, the control algorithm optimization uses a genetic algorithm to search for the optimal combination of controller parameters. The specific operation steps are encoded in binary, mapping each parameter into a binary string, and obtaining the parameter value from the binary string through calculation; then the population is initialized, a random number of individuals are generated, and each individual represents a set of controller parameters.

[0033] Preferably, the fitness function is calculated, and a fitness function is defined to judge the quality of individuals. Different weights are assigned to different performance indicators based on actual requirements. The smaller the fitness function value, the better the individual. Selection and crossover operations are performed, and finally, the mutation operation is carried out. Some genes of the individual are mutated with a certain mutation probability. The selection, crossover, and mutation operations are continuously repeated. After multiple iterations, the individual with the optimal fitness is obtained, and the parameter group corresponding to this individual is the optimized controller parameter group.

[0034] A servo control device is applied to the above-mentioned servo control method, and includes: a controller, a servo driver, a servo motor, a feedback device, a power supply module, and an operation panel; wherein the controller is connected to the servo driver through a signal line, the controller is connected to the operation panel through a data line, the controller is connected to the feedback device through a feedback line, the servo driver is connected to the servo motor through a power line, the servo driver is connected to the power supply module through a power cord, and the servo motor is electrically connected to the feedback device.

[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0036] The present invention preprocesses and stores environmental parameters by real-time acquisition, improves the accuracy and reliability of data, is conducive to data traceability, multi-source integration, and law mining, and lays a foundation for subsequent analysis and decision-making. The environmental model is built by using machine learning, which can accurately capture the complex relationships of environmental parameters, has adaptability and generalization ability, can provide intelligent decision support, predicts environmental changes with the help of the model, responds in advance and automatically adjusts the parameters of the control device, optimizes the control effect, improves the stability and reliability of the system, optimizes the control algorithm to make the servo system quickly respond to external interference, enhances the anti-interference ability, improves the response speed and accuracy, expands the application range of the system, can adapt to the dynamic changes under different working conditions, and makes timely and effective adjustments to improve the system performance. Description of the Drawings

[0037] Figure 1 It is a flowchart of the control method of the present invention. Detailed Embodiments

[0038] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations.

[0039] Refer to Figure 1 As shown, a servo control method includes:

[0040] S1. Based on sensors, obtain external environmental parameters in real time, and preprocess and store the collected parameters;

[0041] S2. Based on the pre-processed external environmental parameters, establish an environmental model using machine learning technology for learning;

[0042] S3. Through the analysis and prediction of the environmental model, analyze and predict the change trend of the external environment in the future time period, and automatically adjust the parameters of the control device based on the output results;

[0043] S4. Optimize the control algorithm to achieve the fast response of the servo system to external interference.

[0044] This application can collect the external environmental parameters in real time through sensors, obtain the most real and timely data. The pre-processing operation further improves the data quality, ensuring that subsequent analysis and decision-making are based on accurate and reliable information. The collected data is stored, which is convenient for subsequent query and analysis of historical data, and the change rules and periodic characteristics of environmental parameters can be mined from it, providing strong support for long-term environmental monitoring and management;

[0045] Machine learning technology can automatically learn complex patterns and rules from a large amount of environmental data, establish accurate environmental models. These models can capture the non-linear relationships between environmental parameters and can describe environmental changes more accurately than traditional models based on experience or simple statistics. Automatically adjusting the parameters of the control device according to the prediction results realizes the intelligent control of the system, enables the control device to adapt to environmental changes more precisely, improves the efficiency and effect of control, and reduces energy consumption and resource waste.

[0046] In step S1, a variety of sensors are deployed at the key parts of the control device. Among them, the temperature sensor is installed near the heating component to monitor the temperature of the key part; the humidity sensor is placed in the internal space to monitor the environmental humidity; the pressure sensor is installed at the fluid pipeline and pressure vessel to monitor the pressure; the vibration sensor is installed on the shell or key mechanical components to monitor the vibration situation, and the temperature, humidity, pressure and vibration parameters are collected in real time according to a specific sampling frequency;

[0047] Pre-process the collected data, perform data cleaning. For the missing values caused by sensor failures and communication interference, if there are few, delete the records containing missing values, and if there are many, fill them with the interpolation method; identify and correct or delete the outliers based on statistical methods, and denoise through filtering methods;

[0048] For the pre-processed data, select a database for storage according to its characteristics and application requirements. If the data is structured and requires complex query and analysis, choose a relational database; if the data has strong real-time performance, large volume and time series characteristics, a non-relational database, InfluxDB which is suitable for storing time series data, is more appropriate. When storing, sort by the collection time and add a timestamp to provide high-quality data support for subsequent analysis;

[0049] The temperature sensor, humidity sensor, pressure sensor, and vibration sensor each perform their own functions, and respectively monitor the temperature, humidity, pressure, and vibration conditions of the control device in real time. This multi-dimensional monitoring method enables operators to comprehensively and meticulously understand the operating state of the control device; data cleaning and denoising are important links in the preprocessing process. In the actual data collection process, the sensors may be affected by various interference factors, resulting in noise, missing values, or incorrect values in the collected data. Through data cleaning, these invalid or incorrect data can be removed to improve the accuracy and integrity of the data.

[0050] In step S2, first, feature extraction is carried out on the data that has undergone preliminary cleaning and normalization preprocessing operations. Representative features are mined from the complex data, and feature extraction is performed. The Pearson correlation coefficient is used to explore the internal relationships between various parameters and determine the correlation between the parameters.

[0051] The data with extracted features is divided into a training set, a validation set, and a test set. The training set is used to allow the constructed model to perform preliminary learning, enabling it to continuously adjust its internal parameters to fit the data features; the validation set, during the model training process, evaluates the performance of the model in real time, providing a basis for adjusting the model's hyperparameters to prevent the model from overfitting or underfitting; the test set is used to finally test the generalization ability of the model after the model training and adjustment are completed.

[0052] The neural network algorithm is selected for model construction. Before construction, the connection weights and biases between neurons are randomly initialized. The weights determine the strength of signal transmission between neurons, and the biases provide a reference value for neuron activation. By randomly initializing these parameters, the symmetry of the model is broken, enabling different neurons to learn different features. During the model training process, the backpropagation algorithm is used to continuously adjust the weights and biases according to the error between the model prediction results and the true labels, thereby gradually improving the performance of the model; the optimal model hyperparameters are selected from among numerous model hyperparameter combinations.

[0053] The preprocessed data may contain a large number of original features. Some of these features may have no practical significance for model learning and prediction or there may be redundant information. Through feature extraction, the most representative and discriminative features can be selected from the original data, reducing the dimension and complexity of the data; dividing the data with extracted features into a training set, a validation set, and a test set is a common and effective model evaluation method. The training set is used for model learning and parameter adjustment, the validation set is used to evaluate the performance of the model during training and select the optimal model hyperparameters, and the test set is used to finally evaluate the generalization ability of the model, that is, the performance of the model on unseen data.

[0054] The preprocessed data matrix is \(X\in\mathbb{R}^{n\times d}\), where \(n\) is the number of samples and \(d\) is the number of original features. After feature extraction, a new feature matrix \(X'\in\mathbb{R}^{n\times d'}\) is obtained, and \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f: X' = f(X)\); The correlation analysis is based on the Pearson correlation coefficient. Suppose two feature vectors \(x'_i\) and \(x'_j\) are selected from \(X'\), where \(i\) and \(j\) range from \(1\) to \(d'\). Their Pearson correlation coefficient \(\rho\) is: n×d where \(n\) is the number of samples, \(d\) is the number of original features. After feature extraction, a new feature matrix \(X'\in\mathbb{R}^{n\times d'}\) is obtained, and \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f: X' = f(X)\); The correlation analysis is based on the Pearson correlation coefficient. Suppose two feature vectors \(x'_i\) and \(x'_j\) are selected from \(X'\), where \(i\) and \(j\) range from \(1\) to \(d'\). Their Pearson correlation coefficient \(\rho\) is: n×d′ , \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f: X' = f(X)\); The correlation analysis is based on the Pearson correlation coefficient. Suppose two feature vectors \(x'_i\) and \(x'_j\) are selected from \(X'\), where \(i\) and \(j\) range from \(1\) to \(d'\). Their Pearson correlation coefficient \(\rho\) is: i and \(x'_j\) j , where \(i\) and \(j\) range from \(1\) to \(d'\). Their Pearson correlation coefficient \(\rho\) is: ij is:

[0055]

[0056] where and are the means of \(x'_i\) i and \(x'_j\) j respectively;

[0057] The data is partitioned by dividing the feature - extracted data \(X'\) and its corresponding labels \(y\in\mathbb{R}^{n}\) n into a training set \((X'_{train},y_{train})\), a validation set \((X'_{val},y_{val})\) and a test set \((X'_{test},y_{test})\). Suppose the proportion of the training set is \(p_{train}\), train , \(y_{train}\) train ), a validation set \((X'_{val},y_{val})\) and a test set \((X'_{test},y_{test})\). Suppose the proportion of the training set is \(p_{train}\), val , \(y_{val}\) val ), and a test set \((X'_{test},y_{test})\). Suppose the proportion of the training set is \(p_{train}\), test , \(y_{test}\) test ), and assume that the proportion of the training set is \(p_{train}\), train the proportion of the validation set is \(p_{val}\), val the proportion of the test set is \(p_{test}\), test and \(p_{train}+p_{val}+p_{test}=1\); train + \(p_{val}\) val + \(p_{test}\) test = 1;

[0058] According to the random partition, during the random partition, it is partitioned through a random index \(idx\). The expression is:

[0059] X'_{train}=X'[idx_{train},:], y_{train}=y[idx_{train}] train = X'[idx_{train},:], y_{train}=y[idx_{train}] train train = y[idx_{train}] train

[0060] X'_{val}=X'[idx_{val},:], y_{val}=y[idx_{val}] val = X'[idx_{val},:], y_{val}=y[idx_{val}] val val = y[idx_{val}] val

[0061] X'_{test}=X'[idx_{test},:], y_{test}=y[idx_{test}] test = X'[idx_{test},:], y_{test}=y[idx_{test}] test test = y[idx_{test}] test ​​​​​​

[0062] where idx train 、idx val and idx test are a set of randomly generated indices;

[0063] Model learning and adjustment are achieved by setting the loss function as J(θ), where θ is a set of parameters containing all weights W l and biases b l . The formula for updating parameters using gradient descent is:

[0064]

[0065] where α is the learning rate, is the gradient of the loss function at θ t ;

[0066] By evaluating the performance of the model under different combinations of hyperparameters on the validation set, the combination of hyperparameters with the optimal performance is selected. Let the set of hyperparameters be λ, and the performance metric on the validation set be P(λ). The optimal hyperparameter λ is: The test model uses the optimal hyperparameters and the trained model to evaluate on the test set (X′ test , y test ) to obtain the final performance metric; which represents the entire process from feature extraction to model construction, training, and evaluation.

[0067] The preprocessed data is represented by a matrix. The number of rows of the matrix is the number of samples, and the number of columns is the number of original features. After feature extraction, a new matrix is obtained. The number of rows of the new matrix is still the number of samples, but the number of columns becomes the number of extracted features. The process of feature extraction is represented by a mapping function;

[0068] Correlation analysis uses the method of Pearson correlation coefficient. Two feature vectors are randomly selected from the matrix after feature extraction, and their Pearson correlation coefficients are calculated;

[0069] The matrix after feature extraction and the corresponding label data are divided into three parts: the training set, the validation set, and the test set. The sum of the proportions of these three parts in the overall data is equal to 1. The division is done randomly, and the randomly generated index set is used to determine which data belongs to the training set, which belongs to the validation set, and which belongs to the test set;

[0070] Define the loss function. The loss function depends on a set of parameters containing all weights and biases. The gradient descent method is used to update the parameters. The update method is to subtract the product of the learning rate and the gradient of the current loss function from the parameters of the previous moment;

[0071] In model-related work, when evaluating the performance of the model for different combinations of additional parameters in the validation data section, then select from the combinations the set of additional parameters that can optimize the model's performance;

[0072] After determining the optimal additional parameters, use these parameters with the trained model to evaluate in the test data section, so as to obtain the metrics that can reflect the final performance of the model. This process fully covers the entire process from extracting data features, to building the model, training the model, and then evaluating the model;

[0073] Screen the most representative and discriminatory features from a large amount of raw data, removing redundant and irrelevant information. This not only reduces the data dimension and the computational complexity of the model, but also enables the model to focus more on key information, improving the training efficiency and accuracy.

[0074] In step S3, first, input the real-time collected data into the model. The model, relying on the patterns and rules learned previously, uses the autoregressive calculation method to obtain the predicted values of environmental parameters for a period of time in the future, evaluate the uncertainty of the prediction results, generate a series of prediction results through Monte Carlo simulation, and then analyze the distribution of these results to clarify the degree of prediction uncertainty; according to the specific application scenario and the relationship between environmental parameters and control parameters, formulate corresponding control rules. Based on the prediction results and the established control rules, with the help of an automated control system, automatically adjust the control parameters. After the adjustment, monitor and feedback the control effect in real time, collect new data to evaluate whether the adjustment of the control parameters has achieved the expected effect;

[0075] Temperature parameter: When the temperature rises, the analysis model will make predictions based on the correlation patterns between temperature and other environmental parameters in historical data. If historical data shows that an increase in temperature will lead to a decrease in humidity, and humidity has an important impact on the control result in the current application scenario, the model will predict the decrease in humidity and automatically adjust the control parameters related to humidity regulation according to the control rules, such as increasing the operating power of the humidifying equipment;

[0076] Humidity parameter: If the humidity increases, the model, based on the learned rules, such as an increase in humidity may lead to a decrease in the operating efficiency of certain equipment, will predict the change trend of the equipment operating efficiency, and then adjust the operating parameters of the equipment according to the control rules, such as reducing the operating speed of the equipment, to ensure the stable operation of the equipment;

[0077] Light intensity parameter: When the light intensity changes, for some light-dependent production processes, the model will make predictions based on the relationship pattern between light intensity and production efficiency. If the light intensity weakens, the model predicts that the production efficiency will decrease. According to the control rules, the parameters of the supplementary lighting equipment are automatically adjusted, such as increasing the supplementary lighting time or intensity; Wind speed parameter: When the wind speed increases, the model will consider the impact of wind speed on aspects such as heat dissipation and pollutant diffusion. For example, in industrial production, wind speed affects the heat dissipation efficiency. The model predicts the heat dissipation situation based on the relationship between wind speed and heat dissipation efficiency, and then adjusts the control parameters of the cooling system, such as increasing the flow rate of the coolant;

[0078] Throughout the process, the model continuously generates multiple prediction results through Monte Carlo simulation, analyzes their distribution to determine the uncertainty of the prediction. At the same time, it monitors and feedbacks the control effect after adjustment in real time, collects new data to evaluate the effect of the control parameter adjustment, so as to continuously optimize the control strategy.

[0079] Based on autoregressive calculation, the model can utilize the learned patterns and rules, combined with the real-time obtained data to predict future environmental parameters. This enables relevant personnel to understand the environmental change trend in advance, provides a forward-looking basis for decision-making, formulates control rules according to specific application scenarios, and automatically adjusts control parameters based on the prediction results, enabling the system to adapt to environmental changes in real time.

[0080] The autoregressive model assumes that there is a linear relationship between the current value and several past values. The p-order autoregressive model (AR(p)) is expressed as:

[0081]

[0082] where, y t is the environmental parameter value at time t, is the autoregressive coefficient, y t-i is the environmental parameter value at the past time t - i, ∈ t is a white noise sequence with a mean of 0. When making predictions, if we want to predict the value h steps in the future, for h = 1:

[0083]

[0084] For h > 1, we need to iteratively predict step by step. When predicting h = 2, then:

[0085]

[0086] where, when t - i + 2 ≤ t, the actual observed value is used, otherwise the previously predicted value is used; the predicted value is generated through calculation, and the parameters of the control device are adjusted according to the prediction result;

[0087] The autoregressive model assumes that there is a linear correlation between the current environmental parameter values and several past environmental parameter values. There is an autoregressive model of a specific order. The environmental parameter value at the current moment is obtained by adding the products of the environmental parameter values at several past moments multiplied by their corresponding coefficients, and then adding a white noise with a mean of 0.

[0088] When making predictions, to predict the value one step ahead in the future, use the environmental parameter values and corresponding coefficients at past moments for calculation. To predict the values for multiple steps ahead in the future, iterative calculations need to be carried out step by step. During the calculation process, if the moments involved are at or before the current moment, use the actually observed environmental parameter values; otherwise, use the previously predicted values. Through such operations, the predicted values are obtained, and then the relevant parameters of the control device are adjusted based on the prediction results.

[0089] In the process of optimizing the control algorithm in step S4, a genetic algorithm is used to search for the optimal combination of controller parameters. The specific operations are as follows: First, perform binary coding, convert each controller parameter into a corresponding binary string, and then calculate the actual parameter values restored from this binary string in subsequent calculations. Carry out population initialization, randomly generate a certain number of individuals, and each individual here corresponds to a different set of controller parameters.

[0090] The binary coding in this application is a general coding method that can be applied to various types of controller parameters. Whether the parameters are continuous or discrete, they can be conveniently encoded. Under binary coding, the crossover operation becomes intuitive and easy to implement. By randomly selecting crossover points and exchanging part of the binary strings of two parent individuals, new offspring individuals can be generated. Randomly generating a certain number of individuals as the initial population can make the algorithm widely distributed in the search space. Each individual represents a different set of controller parameters, which can ensure that the algorithm starts searching for the optimal solution from multiple different starting points, increasing the probability of finding the global optimal solution.

[0091] In this application, by defining a fitness function and assigning different weights to different performance indicators, multiple performance indicators related to actual requirements can be comprehensively considered, and the quality of each individual can be accurately judged. The selection operation determines the probability of an individual being selected based on the value of its fitness function. Individuals with smaller fitness values have a greater chance of being selected to enter the next generation. This is equivalent to screening the population, retaining the individuals with excellent performance, and gradually improving the overall quality of the population.

[0092] A servo control device is applied to the servo control method described in any one of the above-mentioned claims 1 to 9, and includes: a controller, a servo driver, a servo motor, a feedback device, a power supply module, and an operation panel; wherein the controller is connected to the servo driver through a signal line, the controller is connected to the operation panel through a data line, the controller is connected to the feedback device through a feedback line, the servo driver is connected to the servo motor through a power line, the servo driver is connected to the power supply module through a power supply line, and the servo motor is electrically connected to the feedback device.

[0093] Each component of this application is connected through specific lines, forming a complete and efficient information interaction network. The controller can quickly and accurately transmit control instructions to the servo driver through the signal line, and the driver drives the servo motor to operate according to the instructions; at the same time, the feedback device monitors the motor state in real time and transmits the information back to the controller through the feedback line, enabling the controller to adjust the control strategy in a timely manner. This efficient information interaction ensures that the entire servo control system can respond to external changes in real time and achieve precise control.

[0094] Embodiment 1

[0095] In a scenario of an automated production workshop, the servo control method and device of the present invention are applied;

[0096] In step S1, a variety of sensors are deployed at key parts of the control device. A temperature sensor is installed near the heating components, a humidity sensor is placed in the internal space, pressure sensors are installed at fluid pipelines and pressure vessels, and vibration sensors are installed on the shell and key mechanical components. Temperature, humidity, pressure, and vibration parameters are collected in real time at a sampling frequency of 10 times per second. There are some missing values and outliers in the collected data. For a small number of missing values, the records containing the missing values are directly deleted; when there are more missing values, linear interpolation is used for filling. The 3σ principle is used to identify outliers and correct or delete them, and then the median filtering method is used to remove noise. Since the preprocessed data has strong time series characteristics, InfluxDB is selected for storage, and the data is sorted by the collection time and a timestamp is added during storage;

[0097] In step S2, feature extraction is performed on the preprocessed data. The original data includes multiple parameters such as temperature, humidity, pressure, and vibration. After feature extraction, features closely related to the operating state of the control device are selected, such as the temperature change rate and the humidity fluctuation range. The Pearson correlation coefficient is used to analyze the correlation between feature vectors, and it is determined that there is a significant correlation between some parameters. The data after feature extraction is divided into a training set, a validation set, and a test set in the ratio of 70%, 15%, and 15%. The model is constructed using the multi-layer perceptron neural network algorithm. The neuron connection weights and biases are randomly initialized. During the training process, the cross-entropy loss function is defined, and the gradient descent method is used to update the parameters. The learning rate is set to 0.01. The performance of the model under different hyperparameter combinations is evaluated on the validation set. For example, the number of neurons in the hidden layer is set to 50, 100, and 150 respectively, and the number of iterations is set to combinations of 50, 100, and 150. Finally, the optimal hyperparameter combination is determined, so that the accuracy of the model on the test set reaches 90%.

[0098] In step S3, the real-time collected data is input into the trained environment model. Taking the temperature parameter as an example, when the temperature sensor detects that the temperature rises rapidly in a short time, the model predicts that the humidity may decrease according to the learned pattern. Assume that in this production scenario, humidity has an important impact on product quality. The control rule is set as when the predicted humidity decrease exceeds a certain threshold, increase the power of the humidifying equipment. The model generates 100 humidity prediction results through Monte Carlo simulation, analyzes their distribution to determine the uncertainty of the prediction. If the predicted humidity decrease is obvious, the automatic control system automatically adjusts the power of the humidifying equipment, and at the same time, the humidifying effect is monitored in real time, and new humidity data is collected to evaluate the effect of the control parameter adjustment;

[0099] For the light intensity parameter, when the light intensity sensor detects that the light intensity weakens, in this production process that depends on light, the model predicts that the production efficiency will decrease. The control rule is to automatically increase the light supplement time and intensity of the light supplement equipment. After the model evaluates the prediction uncertainty through Monte Carlo simulation, the automatic control system performs the adjustment operation and monitors the change of production efficiency in real time, and collects new data to evaluate the control effect;

[0100] In step S4, the genetic algorithm is used to optimize the control algorithm. The proportional coefficient, integral time, and derivative time parameters of the controller are binary encoded. The initial population size is set to 50 individuals, and each individual represents a set of controller parameters. The fitness function is defined to comprehensively consider the system response time, overshoot, and steady-state error performance indicators. Different weights are assigned to each indicator according to actual requirements. The weight of the response time is set to 0.4, the weight of the overshoot is set to 0.3, and the weight of the steady-state error is set to 0.3. The roulette wheel selection method is used for the selection operation, the crossover probability is set to 0.8, and the mutation probability is set to 0.01. After 50 iterations, the individual with the optimal fitness is obtained, and the corresponding parameter set is the optimized controller parameter set. Using this optimized parameter set, the system response time is shortened by 20%, the overshoot is reduced by 15%, and the steady-state error is reduced by 10%.

[0101] In this automated production workshop, the servo control device of the present invention is applied. Each component works in cooperation. The controller generates control instructions according to the environmental model prediction results and the optimized control algorithm, and sends them to the servo driver through the signal line. The servo driver drives the servo motor to operate, driving the production equipment to work. The feedback device monitors the state information such as the rotation speed and position of the servo motor in real time, and transmits the data back to the controller through the feedback line. The operation panel facilitates the staff to monitor the system operation status in real time and adjust the control parameters. The power supply module provides stable power support for the entire device. During the entire operation process, the system can quickly respond to changes in the external environment, effectively improving production efficiency and product quality, reducing equipment failure rates, and fully verifying the effectiveness and practicality of the servo control method and device of the present invention.

[0102] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed.

Claims

1. A servo control method, characterized in that, The control method includes: S1. Obtain the external environment parameters in real time based on sensors, and preprocess and store the collected parameters. S2. Based on the preprocessed external environment parameters, establish an environment model using machine learning technology for learning. S3. Through the analysis and prediction of the environment model, analyze and predict the change trend of the external environment in the future time period. Based on the output results, automatically adjust the parameters of the control device. S4. Optimize the control algorithm to achieve the rapid response of the servo system to external interference.

2. The servo control method according to claim 1, wherein In step S1, the sensors include a temperature sensor, a humidity sensor, a pressure sensor, and a vibration sensor, which are used to monitor the control device in real time. The monitored parameters include temperature, humidity, pressure, and vibration. The real-time collected data is preprocessed, including data cleaning and denoising. Store the preprocessed data.

3. A servo control method according to claim 1, wherein, In step S2, feature extraction is performed on the preprocessed data. Based on the correlation analysis, it is determined that there is a correlation between the parameters. The data after feature extraction is divided into a training set, a validation set, and a test set, and the constructed model is learned and adjusted respectively to select the optimal model hyperparameters. The model is constructed using a neural network algorithm, and the connection weights and biases between neurons are randomly initialized.

4. A servo control method according to claim 3, characterized in that, The preprocessed data matrix is \(X\in\mathbb{R}^{n\times d}\), where \(n\) is the number of samples and \(d\) is the number of original features. After feature extraction, a new feature matrix \(X'\in\mathbb{R}^{n\times d'}\) is obtained, where \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f: X' = f(X)\). The correlation analysis is based on the Pearson correlation coefficient. Suppose two feature vectors \(x'_i\) and \(x'_j\) are selected from \(X'\), where \(i\) and \(j\) range from \(1\) to \(d'\). Their Pearson correlation coefficient \(\rho\) is given by: n ×d , where \(n\) is the number of samples, \(d\) is the number of original features, and after feature extraction, a new feature matrix \(X'\in\mathbb{R}^{n\times d'}\) is obtained, where \(d'\) is the number of extracted features. The feature extraction process is represented by the mapping function \(f\): \(X' = f(X)\); The correlation analysis is based on the Pearson correlation coefficient. Let two feature vectors \(x' n×d′ \) and \(d'\) be the number of extracted features. The feature extraction process is represented by the mapping function \(f\): \(X' = f(X)\); The correlation analysis is based on the Pearson correlation coefficient. Let two feature vectors \(x' i \) and \(x' j \) be selected from \(X'\), where \(i\) and \(j\) are \(1, 2, \ldots, d'\). Their Pearson correlation coefficient \(\rho ij \) is given by: wherein and are the means of x′ i and x′ j respectively; Data partitioning divides the data X' after feature extraction and its corresponding label y ∈ R n into a training set (X' train , y train ), a validation set (X' val , y val ), and a test set (X' test , y test ). Assuming the proportion of the training set is p train , the proportion of the validation set is p val , and the proportion of the test set is p test , and p train + p val + p test = 1; According to the random division, when randomly dividing, it is divided through the random index idx, and the expression is: X′ train = X[idx train ,:], y train = y[idx train ​ X′ val = X[idx val ,:], y val = y[idx val ​ X′ test = X′[idx test ,:], y test = y[idx test ​ where idx train , idx val and idx test are a set of randomly generated indices; Model learning and adjustment are achieved by setting the loss function as J(θ), where θ is the set of parameters that includes all weights W l and biases b l The formula for updating the parameters using gradient descent is as follows: where α is the learning rate, is the gradient of the loss function at θ t at this point.

5. A servo control method according to claim 4, characterized in that, By evaluating the performance of the model under different hyperparameter combinations on the validation set, the hyperparameter combination with the optimal performance is selected. Let the hyperparameter set be λ, and the performance metric on the validation set be P(λ). The optimal hyperparameter λ is: The test model uses the optimal hyperparameters and the trained model to evaluate on the test set (X′ test , y test ), and the final performance metric is obtained; it represents the entire process from feature extraction to model construction, training, and evaluation.

6. A servo control method according to claim 1, wherein In step S3, the environmental analysis model predicts by inputting the real-time obtained data. The model generates the predicted values of the environmental parameters in the future time period based on the learned patterns and rules through autoregressive calculation, evaluates the uncertainty of the prediction results, generates multiple prediction results through Monte Carlo simulation, analyzes their distribution to determine the prediction uncertainty, formulates control rules according to the relationship between the specific application scenario, environmental parameters, and control parameters, automatically adjusts the control parameters according to the prediction results and the formulated control rules, performs control based on the automatic control system, monitors and feeds back the control effect after adjustment in real time, and collects new data to evaluate the effect of the control parameter adjustment. When the temperature rises, predict the decrease in humidity and adjust the power of the humidifying equipment according to the control rules. When the humidity increases, the model predicts the change in the operation efficiency of the equipment and adjusts the operation parameters of the equipment. When the light intensity changes, the model determines the prediction uncertainty through Monte Carlo simulation, monitors and feeds back the control effect in real time, and collects new data to evaluate the effect of the control parameter adjustment.

7. A servo control method according to claim 6, wherein, The autoregressive model assumes that there is a linear relationship between the current value and several past values. The p-order autoregressive model (AR(p)) is expressed as: where y t is the environmental parameter value at time t, is the autoregressive coefficient, y t-i is the environmental parameter value at the past time t - i, ∈ t is a white noise sequence with a mean of 0. When making a prediction, if we want to predict the value h steps into the future, for h = 1: For h>1, iterative prediction is required step by step. When predicting h = 2, then: Among them, when t - i + 2 ≤ t, the actual observed value is used, otherwise the value predicted previously is used. The predicted value is generated through calculation, and the parameters of the control device are adjusted according to the prediction results.

8. A servo control method according to claim 1, characterized in that In step S4, the control algorithm is optimized by using a genetic algorithm to search for the optimal combination of controller parameters. The specific operation steps are encoded in binary, mapping each parameter into a binary string, and obtaining the parameter value from the binary string through calculation. Then initialize the population and randomly generate a certain number of individuals, and each individual represents a set of controller parameters.

9. A servo control method according to claim 8, characterized in that, Calculate the fitness function, define a fitness function to judge the quality of individuals, assign different weights to different performance indicators based on actual needs, the smaller the fitness function value, the better the individual. Perform selection and crossover operations, and finally the mutation operation, mutate some genes of the individual with a certain mutation probability, continuously repeat the selection, crossover, and mutation operations, and after multiple iterations, obtain the individual with the optimal fitness. The parameter group corresponding to this individual is the optimized controller parameter group.

10. A servo control device, characterized in that, Applied to a servo control method described in any one of the above items 1 to 9, including: a controller, a servo driver, a servo motor, a feedback device, a power supply module, and an operation panel; wherein the controller is connected to the servo driver through a signal line, the controller is connected to the operation panel through a data line, the controller is connected to the feedback device through a feedback line, the servo driver is connected to the servo motor through a power line, the servo driver is connected to the power supply module through a power cord, and the servo motor is electrically connected to the feedback device.

Citation Information

Patent Citations

  • Traffic signal lamp control method suitable for real-time traffic condition

    CN117746652A

  • Control method and system for motor controller

    CN118739948A

  • Automatic control method and system for outdoor shutter awning

    CN118963099A

  • Valve leakage diagnosis method and system based on improved Hereum algorithm optimized SVM (Support Vector Machine)

    CN119441998A

  • Construction method of cigarette brand analysis model

    CN119831641A