A neural network-based flexible robot arm controller design method and system

By constructing a neural network with a 12-48-36-6 structure and combining it with model predictive control, the nonlinearity and strong coupling problems of the flexible robotic arm were solved, achieving more precise control and wider adaptability, while ensuring the interpretability and safety of the model.

CN117921738BActive Publication Date: 2025-12-30SHANGHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311629349.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-12-30
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately model and control the nonlinear and strongly coupled characteristics of flexible robotic arms. Traditional methods cannot meet the demands of precision operation and high-speed motion, and traditional neural network models have weak interpretability. The Lure system, on the other hand, has high requirements for neural network structures.

Method used

Data is collected by sensors, and a neural network with a 12-48-36-6 structure is constructed. This network is then split into two subnets for offline and online training. Combined with model predictive control, a highly interpretable update algorithm is used to ensure the convergence and performance of the neural network model.

Benefits of technology

It improves the accuracy and robustness of flexible robotic arm control, achieves more precise control effects, and ensures the interpretability and safety of the model, adapting to various environments and tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117921738B_ABST
    Figure CN117921738B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of flexible robot arm controller design method and system based on neural network.The design method includes the following steps: data is collected by sensor, and is stored in server;The data is preprocessed in server, and is stored in database;Data in database is extracted, neural network is constructed in neural network construction module;In neural network training module, the constructed neural network is split into two subnets, and the two split subnets are trained offline and online;In controller design module, the trained neural network is combined with model predictive control, and the design of controller control strategy is executed.The design system includes data collection module, data preprocessing module, neural network construction module, neural network training module, controller design module.The method provided by the present application can guarantee the convergence of algorithm while improving accuracy, improve the adaptability and robustness of robot arm control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robotic arm design technology, and in particular to a design method and system for a flexible robotic arm controller based on neural networks. Background Technology

[0002] With the rapid development of fields such as communications, computers, and networks, the topic of flexible robotic arms has become a new research direction in the field of automatic control. Because flexible robotic arms can efficiently complete tasks in various complex environments, their role in industrial production and social life is gradually increasing.

[0003] Flexible robotic arms are complex systems with multiple inputs and outputs, high nonlinearity, and strong coupling, exhibiting uncertainties such as parameter perturbations, external disturbances, and unmodeled dynamics. Therefore, the modeling of flexible robotic arms also contains uncertainties. Traditional modeling methods lack accuracy, so model-free closed-loop control PID algorithms are typically employed. However, with the increasing demands for precise control and safety in modern industries, finding a more accurate control method has become crucial.

[0004] In recent years, the development of neural networks (NNs) has been booming, and NNs have been widely used in the field of robotic arm control. Compared with traditional linear models, neural networks can better model and capture nonlinear relationships. The multi-layered activation functions and connection weights between neurons can simulate complex nonlinear functions, making them particularly suitable for handling coupled problems, since coupled systems typically involve multiple variables that continuously influence each other.

[0005] The problems and shortcomings of the existing technology are as follows:

[0006] 1. For flexible robotic arms, their inherent high degree of nonlinearity and strong coupling characteristics pose the main challenge to their precise control. Simply using traditional modeling methods, such as linearization techniques, to construct the kinematic model of a flexible robotic arm cannot accurately reflect the system's true dynamic characteristics, making it difficult to meet the practical requirements for precise position control. Moreover, these traditional methods often cannot predict and control the actual motion path of the flexible robotic arm based on the input control signal, thus failing to meet the needs of complex tasks such as precision manipulation or high-speed motion.

[0007] 2. Using traditional model-free PID algorithms to control flexible robotic arms cannot fully account for the strong coupling characteristics of these arms. This makes it difficult to achieve ideal control results in practical applications. To obtain a relatively good control outcome, operators often need to manually intervene to further correct the control parameters.

[0008] 3. Models built using traditional neural networks have relatively weak interpretability. Considering that the tasks performed by flexible robotic arms usually have high safety requirements, relying solely on traditional neural network construction and training methods cannot fully guarantee the convergence of the model.

[0009] 4. When designing controllers based on neural networks, Lure systems are often used to describe neural networks. However, this system generally has certain requirements on the structure of the neural network and does not have wide applicability. Summary of the Invention

[0010] To address some or all of the problems in the existing technology, this invention provides a design method for a flexible robotic arm controller based on a neural network, the method comprising the following steps:

[0011] Data is collected through sensors and stored on a server;

[0012] The data is preprocessed on the server and the preprocessed data is stored in the database;

[0013] Extract data from the database and build a neural network in the neural network building module to approximate the motion model of the flexible robotic arm;

[0014] In the neural network training module, the constructed neural network is split into two subnets, the two subnets are trained offline, and online training is performed after the offline training is completed; and

[0015] In the controller design module, the trained neural network is combined with model predictive control to execute the controller control strategy design.

[0016] Furthermore, the data collection via sensors includes the following steps:

[0017] The air pressure is manually adjusted to move the end effector of the flexible robotic arm along a specified trajectory, and data is collected during this process. This data includes...

[0018] p S1 ,p S2 ,p B1 ,p B2 ,p B3 ,p B4 , x f ,y f ,z f ,

[0019] Where, p S1 ,p S2 ,p B1 ,pB2 ,p B3 ,p B4 These are the pressure values ​​in each chamber.

[0020] The pressure change rate values ​​in each chamber are...

[0021] x f ,y f ,z f , Let represent the position and velocity of the ball.

[0022] Furthermore, the preprocessing of the data in the server includes the following steps:

[0023] Python is used to preprocess the data, remove outliers and noise, extract effective feature information, and divide the preprocessed data into training set data and test set data.

[0024] Furthermore, the construction of the neural network in the neural network building module includes the following steps:

[0025] Construct a neural network with a 12-48-36-6 structure, where 12 is the number of input nodes, 48 ​​is the number of nodes in the first hidden layer, 36 is the number of nodes in the second hidden layer, and 6 is the number of output nodes.

[0026] Where, p S1 ,p S2 ,p B1 ,p B2 ,p B3 ,p B4 , p is the input node, x f ,y f ,z f , This refers to the output node.

[0027] The activation function of the hidden layer is the softplus function f(x) = log(1 + e^x). x );

[0028] The activation function of the output layer is a linear function f(x) = x.

[0029] Furthermore, splitting the constructed neural network into two subnetworks includes the following steps:

[0030] The neural network with the 12-48-36-6 structure is split into a first subnet and a second subnet.

[0031] The first subnet has a structure of 12-48-36, and the second subnet has a structure of 48-36-6.

[0032] The training order of the first subnet and the second subnet is as follows: train the first subnet offline, train the first subnet online, train the second subnet offline, and train the second subnet online.

[0033] Furthermore, the offline training includes a pre-training phase and a fine-tuning phase.

[0034] The pre-training phase of the first subnet includes the following steps:

[0035] Initialize the weight matrix W1, These are the initial values ​​of these weight matrices;

[0036] The update formula for the inverse hierarchical learning algorithm is:

[0037]

[0038] in, The weight matrix L(k) is the output estimate of the first subnet updated at step K+1. It is the output of the first hidden layer calculated based on the initialized weight values, and e(k) is the output estimation error at the Kth step.

[0039] The design principles of L(k) follow the following formula:

[0040]

[0041] in, The definition is It is the output of the i-th neuron in the first hidden layer, calculated based on the initialized weights. When the activation function σ of the output layer is a monotonically increasing function vector, its derivative is expressed as f. σ As a boundary.

[0042] The goal of pre-training is to obtain a sufficiently small estimation error, such that the output estimation error e(k) at step K satisfies the following equation:

[0043]

[0044] in, This is the actual output. It is the output simulated based on the estimated weight matrix.

[0045] After the first subnet completes pre-training, fine-tuning of the first subnet is performed.

[0046] The fine-tuning phase of the first subnet includes the following steps:

[0047] The first subnet is fine-tuned using a two-layer update theorem.

[0048] The two-layer update law is as follows:

[0049]

[0050]

[0051] Where α0 and α1 are positive scalars, which can be set according to actual needs; L(k) is a diagonal matrix; and These are the input and output estimation weight matrices of the first subnet in the Kth learning step, respectively; e(k) is the output estimation error. z1(k) is the output of the hidden layer of the first subnet; z1(k) is the input of the first subnet; Φ′1(k) is a diagonal matrix.

[0052] The definition of Φ′1(k) is as follows:

[0053]

[0054] The design principles of L(k) follow the following formula:

[0055]

[0056] in, It is the output of the i-th neuron in the first hidden layer, calculated based on the initialized weights. When the activation function σ of the output layer is a monotonically increasing function vector, its derivative is expressed as f. σ As a boundary; The definition is The defining equation for ρ1(k) is:

[0057] The offline training neural network also includes moving to the next training sample and repeating the fine-tuning phase until all samples in the training set have been used; one cycle is completed when all data samples in the training set have been used, and the number of cycles is determined according to actual needs.

[0058] After the first subnet completes offline training, online training of the first subnet is then performed.

[0059] The two-layer update law in the online training is as follows:

[0060]

[0061]

[0062] Where α0 and α1 are positive scalars, which can be set according to actual needs; L(k) is a diagonal matrix; and These are the input and output estimated weight matrices of the first subnet in the Kth step of learning, respectively; ε(k) is the online feedback error; z1(k) is the output of the hidden layer of the first subnet; z1(k) is the input of the first subnet; Φ′1(k) is a diagonal matrix.

[0063] The online feedback error ε(k) is defined as follows:

[0064]

[0065] Where α is a positive scalar. It is the first derivative of Δx(k). It is the difference between the expected rate of change of the ball and the actual rate of change, and Δx(k) is the difference between the expected position and the actual position of the ball.

[0066] Furthermore, after completing the online training of the first subnet, the input weight matrix W1 of the first subnet is retained as the input of the second subnet; the training process of the second subnet is similar to that of the first subnet; the training dataset of the second subnet consists of half of the original training set and half of the new data generated during the online training of the first subnet.

[0067] Furthermore, the design of the control strategy for the execution controller includes the following steps:

[0068] At time K, the new system state is estimated using the trained neural network, and the optimal control input is calculated for the new system state.

[0069] At time K+1, the new system state is estimated using the trained neural network, and the optimal control input is calculated for the new system state; the steps at time K+1 are the same as those at time K.

[0070] The optimal control input at each moment is applied to the system to continuously optimize it, gradually making it more stable and closer to the ideal state.

[0071] At time K, the steps for estimating the new system state using a neural network and calculating the optimal control input for the new system state include:

[0072] The trained neural network is used to estimate the state of the system at time K;

[0073] Based on the given control quantity u k ,u k+1 ,...,u k+N The optimization is performed by minimizing the design's loss function J.

[0074] After optimization, the optimal control input at time K is obtained. But at time K, only select It acts on the system.

[0075] The loss function J is defined as follows.

[0076]

[0077] Among them, E k E represents the error at step K; N This represents the error at step N, which is the error at the last step within the control range; u k Q is the control input at step K; Q, R, and F are the adjustment matrices.

[0078] This invention also provides a design system for a flexible robotic arm controller based on a neural network, the system comprising the following modules:

[0079] The data collection module is configured to collect data via sensors and store the data in a database;

[0080] The data preprocessing module is configured to preprocess the data in the server and store the preprocessed data in the database;

[0081] A neural network building module is configured to extract data from a database and build a neural network within the neural network building module.

[0082] A neural network training module is configured to split the constructed neural network into two subnetworks, perform offline training on the two subnetworks, and perform online training after the offline training is completed; and

[0083] The controller design module is configured to combine the trained neural network with model predictive control to execute the design of the controller control strategy.

[0084] The present invention also provides a computer system comprising:

[0085] A processor, configured to execute machine-readable instructions;

[0086] Graphics cards with artificial intelligence chips are configured to train neural networks; and

[0087] A memory configured to store machine-readable instructions that, when executed by a processor and / or graphics card, perform the steps of the neural network-based flexible robotic arm controller design method.

[0088] Compared with the prior art, the present invention has the following advantages:

[0089] 1. Utilizing neural networks to address the strong coupling and high nonlinearity of flexible robotic arms can effectively improve control accuracy. Traditional control methods often struggle to accurately model the nonlinear characteristics and coupling effects of robotic arms, while neural networks can learn from vast amounts of data to capture complex nonlinear mapping relationships, thus enabling more accurate control. By training neural network models, the adaptability and robustness of the robotic arm control system can be improved, achieving more precise control results.

[0090] 2. Employing convergence-guaranteed update algorithms can ensure both the interpretability and performance of neural network models. In the field of control, interpretability is crucial because it allows engineers and users to understand the decision-making process and strategies of neural network control systems, ensuring their safety in practical applications. To improve algorithm performance and guarantee model interpretability, convergence-guaranteed update algorithms, such as stable policy optimization methods, can be used to ensure that the system converges to the optimal or near-optimal solution during algorithm iteration.

[0091] 3. Utilizing a combination of model predictive control (MMC) and neural networks for control implementation has broad application value and relatively low requirements for the neural network structure. Model predictive control optimizes control strategies by predicting the future state of the system, and combining it with neural networks fully leverages the learning and approximation capabilities of neural networks. In this combined approach, neural networks can be used to approximate the dynamic model of the system, thereby predicting future states and generating optimized control strategies. Due to the powerful fitting ability of neural networks, the combination of MMC and neural networks can adapt to various environments and tasks, and has wider application value. Furthermore, compared to traditional MMC methods, this combined approach has lower requirements for the neural network structure, making it easier to develop and implement. Attached Figure Description

[0092] To further illustrate the above and other advantages and features of the various embodiments of the present invention, a more specific description of the various embodiments of the present invention will be presented with reference to the accompanying drawings. It is to be understood that these drawings depict only typical embodiments of the invention and are therefore not intended to limit its scope. In the drawings, identical or corresponding parts will be indicated by identical or similar reference numerals for clarity.

[0093] Figure 1 This is a schematic diagram of the overall framework of a neural network-based flexible robotic arm controller design method according to an embodiment of the present invention.

[0094] Figure 2 This is a flowchart illustrating a design method for a neural network-based flexible robotic arm controller according to an embodiment of the present invention.

[0095] Figure 3This is a schematic diagram of a single hidden layer neural network structure according to an embodiment of the present invention;

[0096] Figure 4 This is a schematic diagram illustrating the accuracy of the controller design method of the present invention on the training and test sets according to an embodiment of the present invention.

[0097] Figure 5 This is a schematic diagram of a neural network-based flexible robotic arm controller design system according to an embodiment of the present invention. Detailed Implementation

[0098] In the following description, the invention is described with reference to various embodiments. However, those skilled in the art will recognize that the embodiments may be practiced without one or more specific details or in conjunction with other alternatives and / or additional methods or components. In other instances, well-known structures or operations are not shown or described in detail so as not to obscure the inventive points of the invention. Similarly, for illustrative purposes, specific numbers and configurations are set forth to provide a comprehensive understanding of embodiments of the invention. However, the invention is not limited to these specific details.

[0099] In this specification, references to "an embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment of the invention. The phrase "in one embodiment" appearing throughout this specification does not necessarily refer to the same embodiment in all instances.

[0100] It should be noted that the embodiments of the present invention describe the method steps in a specific order; however, this is only for illustrating the specific embodiment and not for limiting the order of the steps. On the contrary, in different embodiments of the present invention, the order of the steps can be adjusted according to actual needs.

[0101] In this invention, the modules of the system according to the invention can be implemented using software, hardware, firmware, or a combination thereof. When a module is implemented using software, its function can be implemented through computer program flow. For example, the module can be implemented using code segments (such as code segments in languages ​​like C and C++) stored in a storage device (such as a hard disk, memory, etc.), wherein the corresponding function of the module can be implemented when the code segment is executed by a processor. When a module is implemented using hardware, its function can be implemented by setting a corresponding hardware structure. For example, the module's function can be implemented by hardware programming a programmable device such as a field-programmable gate array (FPGA), or by designing an application-specific integrated circuit (ASIC) that includes multiple transistors, resistors, capacitors, and other electronic devices. When a module is implemented using firmware, the module's function can be written into a read-only memory such as an EPROM or EEPROM in the form of program code, and the corresponding function of the module can be implemented when the program code is executed by a processor. In addition, some functions of the module may need to be implemented by separate hardware or by working in cooperation with the hardware. For example, the detection function is implemented by the corresponding sensor (such as a proximity sensor, accelerometer, gyroscope, etc.), the signal transmission function is implemented by the corresponding communication device (such as a Bluetooth device, infrared communication device, baseband communication device, Wi-Fi communication device, etc.), the output function is implemented by the corresponding output device (such as a display, speaker, etc.), and so on.

[0102] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0103] Figure 1 This is a schematic diagram of the overall framework of a neural network-based flexible robotic arm controller design method according to an embodiment of the present invention. As shown in the figure, the flexible robotic arm is used as the controlled object. Data from the flexible robotic arm is collected through sensors. The collected data is preprocessed and used to construct a neural network. The neural network establishes a system model of the controlled object, i.e., the flexible robotic arm. The established system model is used in conjunction with MPC (Model Predictive Control) for control, and the optimal control quantity of the flexible robotic arm is calculated.

[0104] Utilizing neural networks to address the strong coupling and high nonlinearity of flexible robotic arms can effectively improve control accuracy. Traditional control methods often struggle to accurately model the nonlinear characteristics and coupling effects of robotic arms, while neural networks can learn from vast amounts of data to capture complex nonlinear mapping relationships, thus enabling more accurate control. By training neural network models, the adaptability and robustness of robotic arm control systems can be enhanced, achieving more precise control results.

[0105] The following is combined Figure 2 This document details the design process for a flexible robotic arm controller. Figure 2 This is a flowchart illustrating a design method for a neural network-based flexible robotic arm controller according to an embodiment of the present invention. Figure 2 As shown, the design method includes the following steps:

[0106] First, data is collected via sensors and stored in a server. This collected data is primarily used for offline training of the neural network. The data collection via sensors includes the following steps:

[0107] The flexible robotic arm is equipped with two longitudinally extending extension devices, also known as extension arms. Between the two extension arms is a joint-like device consisting of four circularly arranged pneumatic actuators, allowing the flexible robotic arm to bend in multiple directions. Pressure sensors are installed in each of the two extension arms and four pneumatic actuators to detect the pressure values ​​within their respective chambers. The pressure values ​​within the chambers of the two extension arms and four pneumatic actuators are recorded as follows:

[0108] p S1 ,p S2 ,p B1 ,p B2 ,p B3 ,p B4

[0109] A small ball is installed at the end effector position of the flexible robotic arm, and its position is located using an external vision sensor system. By manually adjusting the air pressure, the end effector of the flexible robotic arm can be moved along a predetermined trajectory, and data is collected during the process. With an appropriate sampling frequency set, at sampling point K, the pressure sensor obtains the pressure values ​​in each chamber as follows:

[0110] p S1 (k),p S2 (k),p B1 (k),p B2 (k),p B3 (k),p B4 (k)

[0111] At sampling point K+1, the pressure sensor obtains the following air pressure values ​​in each chamber:

[0112] p S1 (k+1),p S2 (k+1),p B1 (k+1),p B2 (k+1),p B3 (k+1),p B4 (k+1)

[0113] Using the data collected at time K and time K+1, the pressure change rate at time K+1 can be calculated as follows:

[0114]

[0115] At time K, a visual image of the ball's position is captured by a camera, and the ball's position and velocity are estimated using a computer vision algorithm as follows:

[0116]

[0117] Next, the data is preprocessed on the server, and the preprocessed data is stored in the database. The preprocessing of the data on the server includes the following steps:

[0118] First, the collected data is imported and loaded using Python data processing libraries such as Pandas and NumPy. These libraries greatly facilitate data analysis and processing within the Python environment.

[0119] Secondly, the preprocessing of the collected data mainly involves addressing outliers and noise, and extracting effective feature information. Outliers and noise can interfere with model training and testing, causing prediction results to deviate from reality.

[0120] To identify outliers, one or more statistical methods can be used, such as numerical descriptive statistics (e.g., minimum, maximum, mean, median, and standard deviation), box plots, Z-scores, or IQR. Once outliers are identified, they can be either directly deleted or replaced using interpolation or averaging methods.

[0121] For noisy data, filters (such as Gaussian filters, median filters, etc.) or smoothing methods (such as moving averages, exponentially weighted moving averages) can be used to process the data, thereby reducing the interference of the data during the training process while preserving the data structure.

[0122] After preprocessing, the processed dataset is divided into training and test sets. This can be done using the `train_test_split` function from the Scikit-learn library in Python. By adjusting the split ratio, most of the data is reserved for the training set to train the model, while the remaining portion serves as the test set to evaluate the model's performance. This ensures that the model learns as many potential patterns as possible from the data during training, resulting in higher predictive accuracy and generalization ability in real-world applications.

[0123] Next, data is extracted from the database, and a neural network is constructed in the neural network building module to approximate the motion model of the flexible robotic arm. The construction of the neural network in the neural network building module includes the following steps:

[0124] Construct a neural network with a 12-48-36-6 structure, where 12 represents the number of input nodes, 48 ​​represents the number of nodes in the first hidden layer, 36 represents the number of nodes in the second hidden layer, and 6 represents the number of output nodes.

[0125] Where, p S1 ,p S2 ,p B1 ,p B2 ,p B3 ,p B4 , p is the input node, x f ,y f ,z f , This refers to the output node. The input node and the output node are the same as the data collected by the sensors described above.

[0126] The activation function of the hidden layer is the softplus function f(x) = log(1 + e^x). x ).

[0127] The activation function of the output layer is a linear function f(x) = x.

[0128] At sampling point K, the air pressure value p(k) and the rate of change of air pressure in each chamber are... The relationship is related to the rate of change of the position and posture of the ball in sensory space, as shown in the following formula:

[0129]

[0130] Where c(k) is the rate of change of the ball's position and attitude at time K. f is the overall transformation matrix of the system from the driving space to the sensory task space.

[0131] The f in equation c(k) can be approximated by the constructed neural network as follows:

[0132]

[0133] Next, in the neural network training module, the constructed neural network is split into two subnets, and the two subnets are trained offline. After offline training is completed, online training is performed. Splitting the constructed neural network into two subnets includes the following steps:

[0134] The neural network with the 12-48-36-6 structure is split into a first subnet and a second subnet.

[0135] The first subnet has a structure of 12-48-36, and the second subnet has a structure of 48-36-6.

[0136] To ensure the convergence and performance of the neural network, an inverse hierarchical algorithm is used to pre-train the subnets. After pre-training, a two-layer update algorithm is used to fine-tune the subnets. Offline and online training are combined. The training of the two subnets is performed sequentially. That is, the first subnet completes online training before the second subnet is trained. The training order of the first and second subnets is: offline training of the first subnet, online training of the first subnet, offline training of the second subnet, and online training of the second subnet.

[0137] Employing convergent update algorithms can ensure both the interpretability and performance of neural network models. In the field of control, interpretability is crucial because it allows engineers and users to understand the decision-making processes and strategies of neural network control systems, ensuring their safety in practical applications. To improve algorithm performance while maintaining model interpretability, convergent update algorithms, such as stable policy optimization methods, can be used to ensure that the system converges to the optimal or near-optimal solution during algorithm iteration.

[0138] The offline training includes a pre-training phase and a fine-tuning phase.

[0139] The pre-training phase of the first subnet includes the following steps:

[0140] Initialize the weight matrix W1, These are the initial values ​​of these weight matrices;

[0141] The update formula for the inverse hierarchical learning algorithm is:

[0142]

[0143] in, The weight matrix L(k) is the output estimate of the first subnet updated at step K+1. It is the output of the first hidden layer calculated based on the initialized weight values, and e(k) is the output estimation error at the Kth step.

[0144] Figure 3 This is a schematic diagram of a single hidden layer neural network structure according to an embodiment of the present invention. Figure 3 As shown, X1,...X n Φ1 is the input node of a single hidden layer network. The size of n depends on the set size of the input node. W1 is the weight matrix connecting the input to the hidden layer in the single hidden layer network. b is the bias matrix and Φ1 is the activation function. Φ is the weight matrix that directly connects the hidden layer to the output layer in a single hidden layer network, b is the bias matrix, and Φ is the activation function.

[0145] The design principles of L(k) follow the following formula:

[0146]

[0147] in, The definition is It is the output of the i-th neuron in the first hidden layer, calculated based on the initialized weights. When the activation function σ of the output layer is a monotonically increasing function vector, its derivative is expressed as f. σ As a boundary.

[0148] The goal of pre-training is to obtain a sufficiently small estimation error, such that the output estimation error e(k) at step K satisfies the following equation:

[0149]

[0150] in, This is the actual output. It is the output simulated based on the estimated weight matrix.

[0151] After the first subnet completes pre-training, fine-tuning of the first subnet is performed.

[0152] The fine-tuning phase of the first subnet includes the following steps:

[0153] The first subnet is fine-tuned using a two-layer update theorem.

[0154] The two-layer update law is as follows:

[0155]

[0156]

[0157] Where α0 and α1 are positive scalars, which can be set according to actual needs; L(k) is a diagonal matrix; and These are the input and output estimation weight matrices of the first subnet in the Kth learning step, respectively; e(k) is the output estimation error. z1(k) is the output of the hidden layer of the first subnet; z1(k) is the input of the first subnet; Φ′1(k) is a diagonal matrix.

[0158] The definition of Φ′1(k) is as follows:

[0159]

[0160] The design principles of L(k) follow the following formula:

[0161]

[0162] in, It is the output of the i-th neuron in the first hidden layer, calculated based on the initialized weights. When the activation function σ of the output layer is a monotonically increasing function vector, its derivative is expressed as f. σ As a boundary; The definition is The defining equation for ρ1(k) is:

[0163] The offline training neural network also includes moving to the next training sample and repeating the fine-tuning phase until all samples in the training set have been used; one cycle is completed when all data samples in the training set have been used, and the number of cycles is determined according to actual needs.

[0164] After the first subnet completes offline training, online training of the first subnet is then performed.

[0165] The two-layer update law in the online training is as follows:

[0166]

[0167]

[0168] Where α0 and α1 are positive scalars, which can be set according to actual needs; L(k) is a diagonal matrix; and These are the input and output estimated weight matrices of the first subnet in the Kth step of learning, respectively; ε(k) is the online feedback error; z1(k) is the output of the hidden layer of the first subnet; z1(k) is the input of the first subnet; Φ′1(k) is a diagonal matrix.

[0169] The online feedback error ε(k) is defined as follows:

[0170]

[0171] Where α is a positive scalar. It is the first derivative of Δx(k). It is the difference between the expected rate of change of the ball and the actual rate of change, and Δx(k) is the difference between the expected position and the actual position of the ball.

[0172] After completing online training of the first subnet, the input weight matrix W1 of the first subnet is retained as the input of the second subnet, and the output weight matrix of the first subnet... The first subnet is completed, and training of the second subnet begins. The training process for the second subnet is similar to that of the first subnet. The dataset for training the second subnet consists of half of the original training set and half of the new data generated during the online training of the first subnet.

[0173] Next, in the controller design module, the trained neural network is combined with model predictive control to design the controller control strategy. The design of the controller control strategy includes the following steps:

[0174] At time K, the new system state is estimated using the trained neural network, and the optimal control input is calculated for the new system state. The steps include:

[0175] The trained neural network is used to estimate the system's state at time K. Then, a suitable control interval N is set, representing the change in the system state over the predicted N steps. Based on the control interval N, a control variable is calculated. This control variable reflects the relationship between the adjustments taken and the system state; that is, how to guide the system towards the desired state under given conditions.

[0176] To achieve an ideal system state, a loss function J needs to be designed. The loss function J describes the difference between the reference system state and the predicted state. The definition of the loss function J is as follows:

[0177]

[0178] Among them, E k E represents the error at step K; N This represents the error at step N, which is the error at the last step within the control range; u k Q is the control input at step K; Q, R, and F are the adjustment matrices.

[0179] During neural network training, the goal is to minimize the loss function J, thereby making the predicted result as close as possible to the system's reference state. To achieve this, we can base the training on the given control variable u. k ,u k+1 ,...,u k+N Perform optimization to minimize the loss function J.

[0180] After optimization, the optimal control input at time K is obtained. But at time K, only select It acts on the system to achieve real-time adjustment of the system state. In practical applications, every step of the control variable will affect the system, and a smooth and simplified control variable output is desired to balance system performance.

[0181] At time K+1, repeat the above process to estimate the new system state using the trained neural network and calculate the optimal control input for the new system state. The steps at time K+1 are the same as those at time K.

[0182] This cycle allows for continuous optimization of the system, gradually bringing it closer to a stable and ideal state. Throughout the process, simply applying the optimal control value at each moment to the system enables continuous optimization.

[0183] Combining model predictive control (MMC) with neural networks offers broad application value and places relatively low demands on the neural network's structure. MMC optimizes control strategies by predicting future system states, and combining it with neural networks fully leverages the learning and approximation capabilities of these networks. In this approach, the neural network approximates the system's dynamic model, enabling prediction of future states and the generation of optimized control strategies. Due to the powerful fitting capabilities of neural networks, the combination of MMC and neural networks can adapt to various environments and tasks, offering wider application value. Furthermore, compared to traditional MMC methods, this combination places lower demands on the neural network structure, making it easier to develop and implement.

[0184] The effectiveness of this invention can be further illustrated by the accuracy results of the following dataset.

[0185] Figure 4 This is a schematic diagram illustrating the accuracy of the controller design method of this invention on the training and test sets according to an embodiment of the invention. Figure 4 As shown, by applying the controller design method (i.e., the control variable update strategy) adopted in this invention to the CIFAR-10 dataset, it is demonstrated that superior training results can be achieved, while maintaining convergence and high accuracy. The network complexity of Model 1 to Model 10 gradually increases. Choosing a suitable model can reduce computational complexity while ensuring training effectiveness.

[0186] The present invention also provides a design system for a flexible robotic arm controller based on a neural network. Figure 5 This is a schematic diagram of a neural network-based flexible robotic arm controller design system according to an embodiment of the present invention. Figure 5 As shown, the system includes the following modules:

[0187] The data collection module is configured to collect data via sensors and store the data in a database;

[0188] The data preprocessing module is configured to preprocess the data in the server and store the preprocessed data in the database;

[0189] A neural network building module is configured to extract data from a database and build a neural network within the neural network building module.

[0190] A neural network training module is configured to split the constructed neural network into two subnetworks, perform offline training on the two subnetworks, and perform online training after the offline training is completed; and

[0191] The controller design module is configured to combine the trained neural network with model predictive control to execute the design of the controller control strategy.

[0192] In one embodiment of the present invention, a computer system is also provided, comprising a processor, a graphics card, and a memory. The memory is configured to store machine-readable instructions, the graphics card is configured to train a neural network, and the processor is configured to execute the machine-readable instructions. When the processor and / or the graphics card executes the machine-readable instructions, the following processing steps are implemented: collecting data through sensors and storing the data in a server; preprocessing the data in the server and storing the preprocessed data in a database; extracting data from the database and constructing a neural network in a neural network construction module to approximate the motion model of a flexible robotic arm; in a neural network training module, splitting the constructed neural network into two subnets, performing offline training on the two subnets, and performing online training after offline training is completed; and in a controller design module, combining the trained neural network with model predictive control to execute the design of a controller control strategy.

[0193] The graphics card used can preferably be a model with a GPU computing power higher than 5.0. Since the amount of data to be trained is large, providing a graphics card configuration can significantly improve the training speed.

[0194] The memory includes various media capable of storing machine-readable instructions, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0195] It is understood that, in addition to the memory and processor mentioned above, the computer system described above also includes other hardware and software components not listed in this specification. The specific components can be determined according to the model of the specific data processing equipment in different application scenarios, and will not be listed and described in detail in this specification.

[0196] Although various embodiments of the invention have been described above, it should be understood that they are presented by way of example only and not as limitations. It will be apparent to those skilled in the art that various combinations, modifications, and alterations can be made without departing from the spirit and scope of the invention. Therefore, the breadth and scope of the invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should be defined solely by the appended claims and their equivalents.

Claims

1. A neural network-based flexible manipulator controller design method, characterized by, The method comprises the following steps: collecting data through a sensor and storing the data in a server; preprocessing the data in the server and storing the preprocessed data in a database; extracting the data in the database, constructing a neural network in a neural network construction module to approximate a motion model of a flexible robot arm; in a neural network training module, splitting the constructed neural network into two sub-networks, offline training the two split sub-networks, and performing online training after the offline training is completed; and in a controller design module, combining the trained neural network with model predictive control to perform design of a controller control strategy; splitting the constructed neural network into two sub-networks comprises the following steps: splitting a neural network with a 12-48-36-6 structure into a first sub-network and a second sub-network; wherein the structure of the first sub-network is 12-48-36, and the structure of the second sub-network is 48-36-6; the training sequence of the first sub-network and the second sub-network is: offline training of the first sub-network, online training of the first sub-network, offline training of the second sub-network, and online training of the second sub-network; the offline training comprises a pre-training phase and a fine-tuning phase; and the pre-training phase of the first sub-network comprises the following steps: initialized weight matrices , are the values of these weight matrices after initialization, respectively; the inverse hierarchical learning algorithm update formula is wherein, is the first output estimation weight matrix of the first subnetwork updated at the step, is a positive diagonal matrix, is the output of the first hidden layer calculated according to the initialized weight values, is the output estimation error at the step, is the output estimation error at the step. The design principle follows the equation, in, The definition is ; It is the first hidden layer's weight value calculated based on the initialized weight values. The output of each neuron, when the activation function of the output layer... When it is a monotonically increasing function vector, its derivative is... As a boundary; The goal of pre-training is to achieve an estimated error small enough that the output estimated error of the step satisfies the following equation, wherein is the actual output, is the output simulated from the estimated weight matrix; after the pre-training of the first sub-network is completed, fine-tuning of the first sub-network is performed; the fine-tuning phase of the first sub-network comprises the following steps: fine-tuning of the first sub-network is performed using a two-layer update law, the two-layer update law is in, It is a positive scalar and can be set according to actual needs; It is a diagonal matrix; and They are the first The input and output estimation weight matrices of the first subnet in the step learning process; It is the output estimation error; It is the output of the hidden layer of the first subnet; It is the input to the first subnet; It is a diagonal matrix; is defined as follows, , The design principle follows the equation, wherein, is the output of the 1st neuron of the 1st hidden layer calculated from the initialized weight value, and when the activation function of the output layer is a monotonically increasing function vector, the derivative thereof is bounded by The definition of is , The definition of is ;​​​ the offline training of the neural network further comprises moving to the next training sample, repeating the fine-tuning phase until all samples in the training set are used; all data samples in the training set are used, which is one cycle, and the number of cycles is determined according to actual needs; after the offline training of the first sub-network is completed, online training of the first sub-network is performed; the two-layer update law in the online training is wherein, is a positive scalar, which can be set according to actual needs; is a positive diagonal matrix; and are the input and output estimation weight matrices of the first subnetwork in the i-th step learning, respectively; is a positive diagonal matrix; is an online feedback error; is the output of the first subnetwork hidden layer; is the input of the first subnetwork; is a diagonal matrix; Online feedback error is defined as follows, wherein is a positive scalar, is a first derivative of is a difference between the expected rate of change of the pellet and the actual rate of change of the pellet, is a difference between the expected position of the pellet and the actual position of the pellet.

2. The method of claim 1, wherein, the data collection through the sensor comprises the following steps: manually adjusting the air pressure value to make the end effector of the flexible robot arm move along a specified trajectory and collect data in the process, the data comprising, wherein P is the pressure value in each chamber, for each chamber, the rate of change of pressure within the chamber, are the position and velocity of the pellet.

3. The method of claim 1, wherein, the preprocessing of the data in the server comprises the following steps: Use The pre-processing data, eliminating outliers and noise, extracting effective feature information, and dividing the pre-processed data into training set data and test set data.

4. The method of claim 1, wherein, the construction of the neural network in the neural network construction module comprises the following steps: a neural network with a 12-48-36-6 structure is constructed, wherein 12 is the number of input nodes, 48 is the number of nodes in the first layer of hidden network, 36 is the number of nodes in the second layer of hidden network, and 6 is the number of output nodes; wherein is the input node, is the output node; The activation function of the hidden layer is function ; The activation function of the output layer is a linear function .

5. The method of claim 1, wherein, Upon completion of online training of the first subnetwork, the input weight matrix of the first subnetwork is retained as the input to the second subnetwork ​ the training process of the second sub-network is similar to that of the first sub-network; the data set for training of the second sub-network is composed of half of the original training set and half of the new data generated during online training of the first sub-network.

6. The method of claim 1, wherein, the design of the controller control strategy comprises the following steps: At time, the trained neural network is used to estimate the new system state and to calculate the optimal control amount for the new system state. At +1, the new system state is estimated using the trained neural network, and the optimal control amount is calculated for the new system state; The step at +1 is the same as the step at +1. applying the optimal control amount at each time to the system to continuously optimize the system so that it gradually tends to be stable and approaches an ideal state; At the time instant, the step of estimating a new system state using the neural network and calculating an optimal control amount for the new system state comprises: Using a trained neural network to estimate the system's performance The state at any given moment; based on the given control quantity optimization is performed, the optimization being in the form of minimizing a design loss function J; After optimization, the optimal control amount at K moment is obtained But only at K moment, the optimal control amount is selected Acting on the system; the loss function J is defined as follows, wherein, denotes the error of the Kth step; denotes the error of the Nth step, that is, the error of the last step in the control range; is the control quantity of the Kth step; , , is the adjustment matrix.

7. A neural network based flexible manipulator controller design system for implementing the method of any one of claims 1-6, characterized by, The method comprises the following modules: a data collection module configured to collect data through a sensor and store the data in a database; a data preprocessing module configured to preprocess the data in a server and store the preprocessed data in a database; a neural network construction module configured to extract data from the database and construct a neural network in the neural network construction module; a neural network training module configured to split the constructed neural network into two sub-networks, train the two split sub-networks offline, and perform online training after the offline training is completed; and a controller design module configured to combine the trained neural network with model predictive control to perform design of a controller control strategy. comprise:

8. A computer system, characterized by a processor configured to execute machine readable instructions; a graphics card with an artificial intelligence chip configured to train a neural network; and a memory configured to store machine readable instructions that, when executed by the processor and / or the graphics card, perform the steps of the method according to any one of claims 1-6. ​

Citation Information

Patent Citations

  • Underwater positioning method based on ranging and neural network algorithm

    CN106093849A

  • Flexible mechanical arm composite control method based on intelligent learning evaluation

    CN106773684A