Control method and device and storage medium
By using the initial liquid neural network in the industrial control system, combining the error parameters, control parameters and hidden layer node states to determine the loss function, and updating the network, the problem of poor neural network performance is solved and the equipment stability and generalization ability are improved.
Patent Information
- Application Number
- CN202510754836.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-05
AI Technical Summary
In the existing technology, the performance of neural networks in industrial control systems is poor, resulting in poor stability of the controlled equipment.
By obtaining the output parameters of the controlled equipment, the initial liquid neural network is used to determine the loss function in combination with the error parameters, control parameters and hidden layer node states of the current cycle, and the initial liquid neural network is updated, and training is performed considering multiple factors.
The performance of the initial liquid neural network and the stability of the controlled equipment are improved, which enables rapid tracking of expected parameters and suppresses redundant node activation, thus enhancing generalization capabilities.
Smart Images

Figure CN120595565A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control technology, and in particular to a control method, device and storage medium. Background Art
[0002] With the development of big data technology, industrial control can be achieved through neural networks.
[0003] In related technologies, neural networks can be integrated into industrial control systems. The control process is as follows: the neural network can output control parameters to control the output parameters of the controlled devices in the industrial control system. If the output parameters of the controlled devices do not meet the requirements, a loss function can be determined based on the error between the output parameters and the expected parameters. The neural network is then updated based on the loss function to obtain the updated neural network. The process then returns to the first step and continues until the output parameters of the controlled devices meet the requirements, at which point the neural network updates cease.
[0004] However, in the above process, since the loss function takes into account relatively single factors, the performance of the neural network is poor, which leads to poor stability of the controlled device. Summary of the Invention
[0005] The present invention provides a control method, device and storage medium to solve the technical problem that the performance of a neural network in the control method of the related art is poor, resulting in poor stability of the controlled device.
[0006] According to one aspect of the present invention, there is provided a control method, the method comprising:
[0007] Obtaining output parameters of a controlled device in a current cycle; wherein the controlled device is connected to an initial liquid neural network, the controlled device is configured to obtain output parameters of the current cycle based on control parameters of the current cycle input by the initial liquid neural network, and the initial liquid neural network is configured to determine the control parameters of the current cycle based on expected parameters of a previous cycle and the output parameters of the controlled device in the previous cycle;
[0008] Determining an error parameter of the current cycle according to the output parameter of the current cycle and the expected parameter of the current cycle;
[0009] If the error parameter of the current cycle does not meet the iteration termination condition, then determine the loss function according to the error parameter of the current cycle, the control parameter of the current cycle and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, and update the initial liquid neural network according to the loss function, use the updated initial liquid neural network as the new initial liquid neural network, and return to the step of "obtaining the output parameter of the controlled device in the current cycle";
[0010] If the error parameter of the current cycle meets the iteration termination condition, the initial liquid neural network is determined as the target liquid neural network.
[0011] According to another aspect of the present invention, there is provided a control device, the device comprising:
[0012] an acquisition module, configured to acquire output parameters of a controlled device in a current cycle; wherein the controlled device is connected to an initial liquid neural network, and the controlled device is configured to obtain output parameters of the current cycle based on control parameters of the current cycle input by the initial liquid neural network, and the initial liquid neural network is configured to determine the control parameters of the current cycle based on expected parameters of a previous cycle and the output parameters of the controlled device in the previous cycle;
[0013] A first determining module is configured to determine an error parameter of the current cycle based on the output parameter of the current cycle and the expected parameter of the current cycle;
[0014] an updating module, configured to determine a loss function based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle if the error parameter of the current cycle does not meet the iteration termination condition, and update the initial liquid neural network according to the loss function, using the updated initial liquid neural network as a new initial liquid neural network, and returning to execute the steps performed by the acquisition module;
[0015] The second determining module is configured to determine the initial liquid neural network as the target liquid neural network if the error parameter of the current cycle satisfies an iteration termination condition.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the control method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is configured to enable a processor to implement the control method according to any embodiment of the present invention when executed.
[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the control method according to any embodiment of the present invention is implemented.
[0022] The technical solution of the embodiment of the present invention uses an initial liquid neural network to control the controlled device. When updating the initial liquid neural network, it is updated according to the loss function determined by the error parameter of the current cycle, the control parameter of the current cycle and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle. By taking the above three factors into consideration when determining the loss function, the following technical effects are achieved: on the one hand, when the error parameter is large, the change of the control parameter of the current cycle will also be large. Therefore, when updating the initial liquid neural network according to the loss function, the updated initial liquid network can control the controlled device to quickly track the expected parameters, thereby improving the performance of the initial liquid neural network and, in turn, improving the stability of the controlled device; on the other hand, when the error parameter is small, the change of the control parameter of the current cycle will also be small. Due to the existence of the state of the nodes of the hidden layer of the initial liquid neural network in the loss function in the current cycle, when updating the initial liquid neural network, the state of the nodes in the current cycle will be taken into consideration, thereby suppressing redundant activation of the nodes, improving the generalization ability of the initial liquid neural network and, in turn, improving the stability of the controlled device.
[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of a control method provided by an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a control system provided by an embodiment of the present invention;
[0027] Figure 3 is a flow chart of another control method provided by an embodiment of the present invention;
[0028] Figure 4 2 is a schematic diagram of the structure of the initial liquid neural network in an embodiment of the present invention;
[0029] Figure 5 is a schematic diagram of another control system provided by an embodiment of the present invention;
[0030] Figure 6 is a flow chart of another control method provided by an embodiment of the present invention;
[0031] Figure 7 is a schematic diagram of a system response curve provided by an embodiment of the present invention;
[0032] Figure 8 is a structural diagram of a control device provided by an embodiment of the present invention;
[0033] Figure 9 It is a structural diagram of an electronic device for implementing the control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "initial", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the embodiments of the present invention comply with the relevant provisions of national laws and regulations.
[0036] Figure 1 This is a flow chart of a control method provided by an embodiment of the present invention. This embodiment is applicable to the scenario of controlling a controlled device. The method can be executed by a control device, which can be implemented in the form of hardware and / or software. The control device can be configured in an electronic device, for example, a computer device. Figure 1 As shown, the method includes the following steps 101 to 104.
[0037] Step 101: Obtain output parameters of the controlled device in the current cycle.
[0038] The controlled device is connected to the initial liquid neural network. The controlled device is configured to obtain output parameters for the current cycle based on the control parameters of the current cycle input by the initial liquid neural network. The initial liquid neural network is configured to determine the control parameters for the current cycle based on the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle.
[0039] Figure 2 Schematic diagram of a control system provided by an embodiment of the present invention. Figure 2 As shown, the controlled device 22 is connected to the initial liquid neural network 21. The initial liquid neural network 21 determines the control parameters for the current cycle based on the expected parameters of the previous cycle and the output parameters of the controlled device 22 in the previous cycle. The controlled device 22 obtains the output parameters of the current cycle based on the control parameters of the current cycle. It can be understood that the controlled device 22 and the initial liquid neural network 21 form a feedback control system.
[0040] The controlled device in this embodiment can be any device in the field of industrial control that can be controlled by a liquid neural network, or a system composed of various devices. Alternatively, the controlled device in this embodiment can be a controller. For another example, the controlled device in this embodiment can include a controller and an execution device.
[0041] In this embodiment, controlled devices are controlled using liquid neural networks (LNNs). Liquid neural networks, also known as liquid neural networks, are inspired by the dynamic adaptability of biological neural systems. Traditional neural networks (such as convolutional neural networks and recurrent neural networks) typically have fixed connection structures or limited dynamics. LNNs, by introducing real-time adjustable neuronal connections and a time-dependent activation mechanism, enable the network to flexibly adjust its structure based on changes in input signals, thereby better capturing temporal characteristics and nonlinear relationships. Controlling controlled devices using liquid neural networks eliminates the need for specific mathematical modeling of the controlled devices, establishing a specific relationship between input and output. These systems exhibit adaptive and self-learning properties, creating a dynamic system that continuously adjusts output control parameters through learning and training. When changes in the internal and external environment cause changes in the structure and parameters of the control system, the initial liquid neural network can adaptively adjust the control parameters to maintain the stability of the control system.
[0042] Optionally, the initial liquid neural network in this embodiment adopts a two-layer architecture, including an input layer and a hidden layer. The input layer includes several nodes, and the hidden layer includes several nodes. The nodes in this embodiment can also be called neurons. The hidden layer in this embodiment can also be called a liquid layer.
[0043] In this embodiment, the current cycle and the previous cycle can be time points or time periods. When the current cycle and the previous cycle are time periods: the initial liquid neural network can determine the control parameters of the current cycle based on the expected parameters at the time point closest to the current cycle in the previous cycle and the output parameters of the controlled device at the time point closest to the current cycle in the previous cycle; or the initial liquid neural network can determine the control parameters of the current cycle based on the expected parameters at any time point in the previous cycle and the output parameters of the controlled device at any time point in the previous cycle.
[0044] Based on the different controlled devices, the output parameters in this embodiment are different. For example, the output parameter in this embodiment can be a power value.
[0045] It should be noted that if the current cycle is the first cycle in the control process, the expected parameters of the previous cycle are the initialized expected parameters, the control parameters output by the initial liquid neural network are the initialized control parameters, and the output parameters of the controlled device in the previous cycle are the initialized output parameters.
[0046] In a specific implementation, the initial liquid neural network is used to determine the control parameters of the current cycle based on the error parameters of the previous cycle determined by the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle, the integral of the error parameters, and the rate of change of the expected parameters of the previous cycle.
[0047] Among them, the error parameter e of the previous cycle is t-1 =r t-1 -y t-1 , e t-1 Represents the error parameter of the previous cycle, r t-1 represents the expected parameter of the previous period, y t-1 This represents the output parameter of the controlled device in the previous cycle. The error parameter from the previous cycle directly reflects the instantaneous deviation between the controlled device's output parameter and the expected parameter and serves as the core feedback signal. The initial liquid neural network uses the error parameter from the previous cycle to adjust the control parameters in real time, rapidly correcting the error parameter.
[0048] The integral of the error parameter refers to the accumulation of existing error parameters: integral_e = ∑e × Δt, where integral_e represents the integral of the error parameter and e represents the existing error parameter. In this implementation, the integral of the error parameter refers to the sum of the error parameter of the previous cycle and all error parameters before the previous cycle. The integral of the error parameter can help the initial liquid neural network learn the long-term accumulation characteristics of the error parameter, thereby adjusting the control parameters and eliminating steady-state errors.
[0049] The rate of change of the expected parameter of the previous cycle is determined based on the difference between the expected parameter of the previous cycle and the expected parameter of the cycle before the previous cycle and the time interval between adjacent cycles. t>0, where △r t-1 Indicates the rate of change of the expected parameters of the previous period, r t-1 represents the expected parameter of the previous period, r t-2 It represents the expected parameter of the previous cycle, and △t represents the time interval between adjacent cycles.
[0050] The rate of change of the expected parameters provides future trend information of the expected parameters (similar to feedforward control). The initial liquid neural network can adjust the control parameters in advance based on the rate of change of the expected parameters, reducing the delay in tracking the dynamic expected parameters.
[0051] In this implementation, the error parameter and its integral from the previous cycle are equivalent to the temporal characteristics, and the rate of change of the expected parameter from the previous cycle is equivalent to the spatial characteristics. Therefore, in this implementation, the initial liquid neural network can simultaneously perceive the past, present, and future states of the controlled device based on the spatiotemporal fusion characteristics, thereby accurately determining the control parameters and improving the convergence speed of the initial liquid neural network.
[0052] Step 102: Determine the error parameter of the current cycle according to the output parameter of the current cycle and the expected parameter of the current cycle.
[0053] The expected parameters in this embodiment may change over time or remain unchanged, and this embodiment is not limited thereto. When the expected parameters remain unchanged, the expected parameters of the current cycle are the same as the expected parameters of the previous cycle.
[0054] In step 102, the difference between the expected parameter of the current cycle and the output parameter of the current cycle can be determined as the error parameter of the current cycle. Alternatively, the difference between the output parameter of the current cycle and the expected parameter of the current cycle can be determined as the error parameter of the current cycle.
[0055] Step 103: If the error parameter of the current cycle does not meet the iteration termination condition, the loss function is determined based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, and the initial liquid neural network is updated according to the loss function. The updated initial liquid neural network is used as the new initial liquid neural network, and the process returns to execute step 101.
[0056] The iteration termination conditions in this embodiment may include at least one of the following: the number of iterations corresponding to the error parameter of the current cycle is greater than or equal to the maximum iteration number threshold, the error parameter of the current cycle is less than the error parameter threshold, and the number of iterations in which the error parameter of the current cycle remains unchanged is greater than the iteration number threshold.
[0057] If the error parameter of the current cycle does not meet the iteration termination condition, it means that the initial liquid neural network has not been trained yet and the initial liquid neural network needs to be updated according to the loss function.
[0058] To improve the performance of the liquid neural network, in this embodiment, a loss function is determined based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes in the hidden layer of the initial liquid neural network in the current cycle. The state of the node in this embodiment refers to the value of the node.
[0059] This embodiment takes the above three factors into consideration when determining the loss function, and can achieve the following effects: on the one hand, when the error parameter is large, the change in the control parameter of the current cycle will also be large. Therefore, when the initial liquid neural network is updated according to the loss function, the updated initial liquid network can control the controlled device to quickly track the expected parameters, thereby improving the performance of the initial liquid neural network and, in turn, improving the stability of the controlled device; on the other hand, when the error parameter is small, the change in the control parameter of the current cycle will also be small. Due to the existence of the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle in the loss function, the states of the nodes in the current cycle will be taken into account when updating the initial liquid neural network, thereby suppressing redundant activation of the nodes, avoiding overfitting, improving the generalization ability of the initial liquid neural network, and, in turn, improving the stability of the controlled device.
[0060] In one implementation, the loss function may be determined as a weighted sum of the error parameter of the current cycle, the control parameter of the current cycle, and the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle.
[0061] In another implementation, the loss function may be determined as a weighted sum of the power of the error parameter of the current cycle, the control parameter of the current cycle, and the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle.
[0062] In updating the initial liquid neural network according to the loss function, a stochastic gradient descent algorithm may be used for updating. After obtaining the updated initial liquid neural network, it is used as a new initial liquid neural network, the next cycle is used as a new current cycle, and the process returns to step 101.
[0063] Step 104: If the error parameter of the current cycle meets the iteration termination condition, the initial liquid neural network is determined as the target liquid neural network.
[0064] If the error parameter of the current cycle meets the iteration termination condition, it means that the initial liquid neural network can meet the control requirements and the training of the initial liquid neural network is completed. The initial liquid neural network at this time is determined as the target liquid neural network.
[0065] Furthermore, feedback control is subsequently performed on the controlled device based on the target liquid neural network. It should be noted that after obtaining the target liquid neural network, steps 101 to 104 can be restarted during the feedback control process under the instruction of a retraining instruction or when the error parameter meets the set conditions.
[0066] The control method provided in this embodiment includes: obtaining output parameters of a controlled device in a current cycle, wherein the controlled device is connected to an initial liquid neural network, the controlled device is used to obtain output parameters of the current cycle based on the control parameters of the current cycle input by the initial liquid neural network, and the initial liquid neural network is used to determine the control parameters of the current cycle based on the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle; determining an error parameter of the current cycle based on the output parameters of the current cycle and the expected parameters of the current cycle; if the error parameter of the current cycle does not meet the iteration termination condition, determining a loss function based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, and updating the initial liquid neural network based on the loss function, using the updated initial liquid neural network as the new initial liquid neural network, and returning to execute the step of "obtaining the output parameters of the controlled device in the current cycle"; if the error parameter of the current cycle meets the iteration termination condition, determining the initial liquid neural network as the target liquid neural network. The method uses an initial liquid neural network to control a controlled device. When updating the initial liquid neural network, the update is performed according to a loss function determined by the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle. By taking the above three factors into consideration when determining the loss function, the following technical effects are achieved: on the one hand, when the error parameter is large, the change in the control parameter of the current cycle will also be large. Therefore, when updating the initial liquid neural network according to the loss function, the updated initial liquid network can control the controlled device to quickly track the expected parameter, thereby improving the performance of the initial liquid neural network and, in turn, improving the stability of the controlled device; on the other hand, when the error parameter is small, the change in the control parameter of the current cycle will also be small. Due to the existence of the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle in the loss function, when updating the initial liquid neural network, the state of the nodes in the current cycle will be taken into consideration, thereby suppressing redundant activation of the nodes, improving the generalization ability of the initial liquid neural network and, in turn, improving the stability of the controlled device.
[0067] Figure 3 This is a flow chart of another control method provided by an embodiment of the present invention. Figure 1Based on the illustrated embodiment and various optional implementations, a detailed description is given of how to obtain the control parameters of the current cycle through the initial liquid neural network. In this embodiment, the initial liquid neural network is used to determine the control parameters of the current cycle based on the error parameters of the previous cycle determined by the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle, the integral of the error parameters, and the rate of change of the expected parameters of the previous cycle. The control parameters of the current cycle include the first parameter and the second parameter. For simplicity, only the step of determining the control parameters is shown in this embodiment. Other steps not shown are similar to those in the previous embodiment. Figure 1 The embodiments shown are similar and will not be described in detail. Figure 3 As shown, in the control method provided by this embodiment, the initial liquid neural network obtains the control parameters of the current cycle through the following steps 301 to 304.
[0068] Step 301: Determine the current activation value based on the error parameter of the previous cycle, the integral of the error parameter, the rate of change of the expected parameter of the previous cycle, the current weight matrix of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle.
[0069] For example, Figure 4 Schematic diagram of the structure of the initial liquid neural network in the embodiment of the present invention. Figure 4 As shown, the initial liquid neural network provided in this embodiment is a two-layer network structure: the number of nodes in the input layer is, for example, 3, and the number of nodes in the hidden layer is, for example, 50.
[0070] To simplify the design and meet real-time requirements, the liquid neural network in this embodiment does not have an output layer. The reasons for removing the independent output layer are: 1. The control parameters in this embodiment include the first parameter and the second parameter, and only two parameters need to be output, without the need for complex transformations; 2. The state of the hidden layer itself encodes temporal dynamic information, and direct mapping can retain physical meaning; 3. It simplifies online learning, avoids additional weight updates, reduces the amount of computation, and is suitable for real-time control scenarios; 4. The mapping from the hidden layer to the output layer parameters is a deterministic function (softplus) and does not require learning; 5. It reduces the number of parameters. In traditional network structures, setting an output layer also requires training a weight matrix of dimensions hidden_dim×output_dim, where hidden_dim represents the number of nodes in the hidden layer and output_dim represents the number of nodes in the output layer. In short, in this embodiment, not setting an output layer in the initial liquid neural network can improve training efficiency without reducing the performance of the initial liquid neural network.
[0071] In step 301, construct the 3D vector x of the previous cycle t-1 =[e t-1 ,∫e t-1dt,△r t-1 ], where ∫e t-1 dt represents the integral of the error parameter.
[0072] Furthermore, since the integral of the error parameter will become very large as time accumulates (especially in the steady-state error), the integral of the error parameter in the 3D vector can be normalized, for example, multiplied by a scaling factor less than 1. For example, the scaling factor can be 0.1. That is, the 3D vector constructed in the previous cycle can be x t-1 =[e t-1 ,0.1∫e t-1 dt,△r t-1 This implementation method can scale the integral of the error parameter to a magnitude close to the error parameter of the previous cycle through the scaling factor, avoiding training instability caused by excessive differences in the size of the input features of the liquid neural network.
[0073] The intermediate value of the current activation value is determined by the following formula (1):
[0074] Z t =Wx t-1 +Uh t-1 (1);
[0075] Among them, Z t represents the intermediate value of the current activation value, W and U represent the current weight matrix of the initial liquid neural network. Specifically, W represents the weight matrix from the input layer to the hidden layer, and U represents the weight matrix of the hidden layer self-loop. t-1 Indicates the state of the nodes in the hidden layer of the initial liquid neural network in the previous cycle. Figure 4 In the scenario, W is a 3*50 matrix, U is a 50*50 matrix, and h t-1 is a 50-dimensional vector.
[0076] The current activation value a is obtained by performing nonlinear activation through the following formula (2): t :
[0077] a t =tanh(Z t ) (2).
[0078] Step 302: Determine the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle based on the current activation values, the time constants of the nodes of the initial liquid neural network, and the states of the nodes of the hidden layer of the initial liquid neural network in the previous cycle.
[0079] Optionally, after obtaining the current activation value, the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle is determined by the following differential equation formula (3) and Euler discretization formula (4):
[0080]
[0081] Where τ represents the time constant of the nodes in the hidden layer. t Indicates the state of the nodes in the hidden layer in the current cycle.
[0082] Step 303: Determine a first parameter based on the states of the first a nodes and the last b nodes in the hidden layer of the initial liquid neural network in the current cycle.
[0083] For example, the value of a may be 3, and the value of b may be 2.
[0084] Optionally, step 303 may include the following steps 3031 and 3032 .
[0085] Step 3031: According to the state of the 0th node in the current cycle, the state of the 1st node in the current cycle, the state of the 2nd node in the current cycle, the state of the Nth node h -2 nodes in the current cycle and the status of the Nth h -1 The state of the node in the current cycle determines the first parameter intermediate quantity.
[0086] In step 3031, assume that N h If is 50, the intermediate value of the first parameter can be determined according to formula (5):
[0087] f_k p =[h0,h1,h2,h 48 ,h 49 ] (5);
[0088] Among them, h i Indicates the state of the node of the i-th hidden layer in the current cycle. In step 3031, the values of i are 0, 1, 2, 48 and 49.
[0089] Step 3032: Determine the first parameter according to the first parameter intermediate quantity, the first coefficient, and the second coefficient.
[0090] In step 3032, the first parameter may be determined according to formula (7):
[0091]
[0092] Among them, k p represents the first parameter, α represents the first coefficient, β represents the second coefficient, Indicates h i The mean of (i is 0, 1, 2, 48 and 49).
[0093] Step 304: Determine the second parameter according to the states of the first c nodes and the last d nodes in the hidden layer of the initial liquid neural network in the current cycle.
[0094] Among them, at least one of the first a nodes is different from the first c nodes, and / or, at least one of the last b nodes is different from the last d nodes. a, b, c, and d are all integers greater than 0, and the sum of a and b and the sum of c and d are both less than the total number of nodes N in the hidden layer. h .
[0095] For example, the value of c may be 3, and the value of d may be 2.
[0096] Optionally, step 304 may include the following steps 3041 and 3042 .
[0097] Step 3041: Based on the status of the third node in the current cycle, the status of the fourth node in the current cycle, the status of the fifth node in the current cycle, the status of the Nth node in the current cycle, h -2 nodes in the current cycle and the status of the Nth h -1 The state of the node in the current cycle determines the second parameter intermediate quantity.
[0098] In step 3041, assume that N h If is 50, the intermediate value of the second parameter can be determined according to formula (6):
[0099] f_k i =[h3,h4,h5,h 48 ,h 49 ] (6);
[0100] Among them, h i In step 3041, the values of i are 3, 4, 5, 48 and 49.
[0101] Step 3042: Determine the second parameter according to the second parameter intermediate value, the third coefficient, and the fourth coefficient.
[0102] In step 3042, the second parameter may be determined according to formula (8):
[0103]
[0104] Among them, k i represents the second parameter, α' represents the third coefficient, β' represents the fourth coefficient, Indicates h i The average of (the values of i are 3, 4, 5, 48 and 49).
[0105] It should be noted that the nodes of the hidden layer of the initial liquid neural network in this embodiment are numbered in a certain order. In steps 303 and 304, the first a nodes, the last b nodes, the first c nodes, and the last d nodes can be determined according to the node numbers.
[0106] Optionally, the controlled device in this embodiment includes a controller, a power source for outputting a radio frequency signal, and a radio frequency signal receiving device connected in sequence. The control parameters of the current cycle are parameters input to the controller, and the output parameters of the current cycle are parameters output by the radio frequency signal receiving device.
[0107] The control method provided by this embodiment determines the current activation value based on the error parameter of the previous cycle, the integral of the error parameter, the rate of change of the expected parameter of the previous cycle, the current weight matrix of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle; determines the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle based on the current activation value, the time constant of the nodes of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle; determines the first parameter based on the state of the first a nodes in the hidden layer of the initial liquid neural network in the current cycle and the state of the last b nodes in the hidden layer of the initial liquid neural network in the current cycle; The second parameter is determined based on the states of the first c nodes in the layer in the current cycle and the states of the last d nodes in the current cycle, thereby determining the first parameter and the second parameter according to the states of the nodes in the head and tail regions of the initial liquid neural network in the current cycle. This has the following technical effects: on the one hand, the number of nodes in the hidden layer that need to be considered when determining the first parameter and the second parameter is reduced, the complexity of determining the first parameter and the second parameter is reduced, and the control efficiency is improved; on the other hand, when determining the first parameter and the second parameter, the states of the nodes in the head and tail regions in the current cycle are taken into account at the same time, thereby improving the utilization rate of the nodes in the hidden layer of the initial liquid neural network and ensuring the accuracy of the determined control parameters. Therefore, this embodiment is equivalent to achieving a balance between local gradient and global optimization.
[0108] A specific implementation of the control system provided in this embodiment is introduced below. Figure 5 FIG. 1 is a schematic diagram of another control system provided by an embodiment of the present invention. Figure 5 As shown, the controlled device includes: a proportional-integral controller, a power source for outputting a radio frequency signal, and an accelerator connected in sequence. The control parameters of the current cycle are the parameters input to the proportional-integral controller, and the output parameters of the current cycle are the parameters output by the accelerator.
[0109] The parameters input to the proportional-integral controller include not only the control parameters but also the error parameters of the previous cycle.
[0110] In this scenario, the first parameter is a proportional parameter and the second parameter is an integral parameter.
[0111] like Figure 5 As shown, the parameters input into the initial liquid neural network include: the error parameter of the previous cycle determined based on the expected parameter of the previous cycle and the output parameter of the controlled device in the previous cycle, the integral of the error parameter, and the rate of change of the expected parameter of the previous cycle.
[0112] The mathematical description of the proportional-integral controller is: out =K p ×error+K i ×∑error, where K p represents the scale parameter, K i represents the integral parameter, error represents the error parameter, Y out Represents the output of the proportional-integral controller.
[0113] An accelerator is a device that uses electromagnetic fields to impart high energy to charged particles, accelerating them to speeds approaching the speed of light. It is used for accelerating, manipulating, and studying particles. In basic scientific research, it is used to explore the fundamental structure and interactions of matter, such as discovering new particles and physical phenomena. In medicine, it is used for radiotherapy of tumors, production of radiopharmaceuticals, and medical imaging. In industry, it is used for irradiation modification of materials and semiconductor manufacturing. In nuclear physics, it is used to study the properties of atomic nuclei.
[0114] In order to better accelerate particles, it is necessary to control the amplitude and phase of the radio frequency signal input into the accelerator cavity. The proportional-integral controller in this embodiment is a low-level control system, which is responsible for the precise control of the radio frequency signal input into the accelerator cavity, ensuring the stability of the amplitude, phase and frequency of the electric field in the cavity, thereby achieving efficient acceleration and stable transmission of the particle beam. With the development of science and technology, the control accuracy requirements of accelerator systems have increased, and the anti-disturbance capability requirements have been improved, which also puts higher demands on low-level control systems. In this embodiment, the control parameters of the proportional-integral controller are calculated by a self-learning algorithm to obtain the target liquid neural network, thereby achieving optimal control of the low-level control system.
[0115] In the scenario where the RF signal receiving device is an accelerator, the expected parameter in this embodiment is the set cavity pressure signal, and the output parameter is the cavity pressure signal actually coupled from the accelerator cavity. The actually coupled cavity pressure signal can also be called a sampled cavity pressure signal (pick-up cavity pressure signal). The error parameter is the difference between the set cavity pressure signal and the actually coupled cavity pressure signal. This control method can generate the optimal integral parameter and proportional parameter of the control proportional integral controller through the online self-learning mode of the initial liquid neural network.
[0116] In this embodiment, an adaptive proportional-integral algorithm based on a liquid neural network is developed based on an initial liquid neural network and a proportional-integral controller. The essence of this algorithm is to use the liquid neural network to establish a system parameter model. This model translates the parameter variation patterns of a time-varying parameter system into a liquid neural network parameter model, reflecting the state-dependent parameter variation patterns. Application in a low-level accelerator control system demonstrates the effectiveness of this adaptive proportional-integral control algorithm.
[0117] Figure 6 This is a flow chart of another control method provided by an embodiment of the present invention. Figure 1 、 Figure 3 Based on the embodiment shown and various optional implementations, the implementation method of how to determine the loss function is described in detail. For simplicity, this embodiment only shows the steps involved in determining the loss function based on the error parameters of the current cycle, the control parameters of the current cycle, and the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle. Figure 6 As shown, in the control method provided by this embodiment, determining the loss function includes the following steps 601 to 604.
[0118] Step 601: Determine the square of the error parameter of the current cycle as the first loss term.
[0119] In this embodiment, the error parameter e of the current cycle is t =r t -y t , r t Represents the expected parameter of the current period, y t Indicates the output parameters of the controlled device in the current cycle.
[0120] Step 602: Determine a second loss term based on the control parameter of the current cycle, the error parameter of the current cycle, and the integral of the error parameter.
[0121] Alternatively, according to the formula u=k p e t +∫k i edt, determine the second loss term. Where u represents the second loss term, k p and k i Indicates the control parameters of the current cycle, e t represents the error parameter of the current cycle, and ∫edt represents the integral of the error parameter. More specifically, k p represents the scale parameter, k i represents the integration parameter.
[0122] Step 603: Determine a third loss term based on the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle.
[0123] Optionally, according to the formula Determine the third loss term. Where, N h represents the total number of nodes in the hidden layer, h j Represents the state of the j-th node in the hidden layer in the current cycle.
[0124] Step 604: Determine a loss function based on the first loss term, the second loss term, and the third loss term.
[0125] Optionally, the loss function is determined according to formula (9):
[0126]
[0127] Where L represents the loss function. The values 0.001 and 0.005 in the loss function can be flexibly selected according to the actual situation, or other values can be used.
[0128] In this embodiment, the first loss term in the loss function is the tracking error term, the second loss term is the control amount penalty term, and the third loss term is the state regularization of the node.
[0129] This loss function can achieve the following effects: 1. Fast tracking stage: the first loss term increases, and the second loss term temporarily increases (the loss function is affected by 0.001u 2 If constrained), at this time, priority is given to reducing the tracking error to achieve fast tracking; 2. Steady-state maintenance stage: the first loss term is small, and the second loss term is also small. At this time, the third loss term, that is, the state regularization of the node plays a dominant role. When updating the initial liquid neural network, it can suppress the redundant activation of nodes and improve the generalization ability of the liquid neural network.
[0130] Furthermore, the initial liquid neural network in this embodiment includes the current first weight matrix from the input layer to the hidden layer and the current second weight matrix of the hidden layer self-loop. Figure 1 、 Figure 3 Based on the embodiment shown and various optional implementations, a detailed description is given of how to implement the reverse dynamic gradient update based on the loss function. Figure 6 Only the steps of updating the initial liquid neural network according to the loss function are shown. The control parameters in this embodiment include the scale parameter k p and the integral parameter k i .like Figure 6 As shown, in the control method provided by this embodiment, updating the initial liquid neural network includes the following steps 605 to 607.
[0131] Step 605: According to formula W t+1 =W t-η(ΔW t +μΔW t-1 ), determine the updated first weight matrix.
[0132] Among them, W t+1 Represents the updated first weight matrix, W t represents the current first weight matrix, η represents the learning rate, μ represents the momentum factor, △W t is the change of the first weight matrix in the current cycle determined by the loss function, △W t-1 Indicates the change in the first weight matrix in the previous period.
[0133] Step 606: According to formula U t+1 =U t -η(ΔU t +μΔU t-1 ), determine the updated second weight matrix.
[0134] Among them, U t+1 Represents the updated second weight matrix, U t represents the current second weight matrix, η represents the learning rate, μ represents the momentum factor, △U t is the change of the second weight matrix in the current period determined by the loss function, △U t-1 Indicates the change in the second weight matrix in the previous period.
[0135] Step 607: Update the initial liquid neural network according to the updated first weight matrix and the updated second weight matrix.
[0136] In step 607, when updating the initial liquid neural network, the current first weight matrix in the initial liquid neural network is updated to the updated first weight matrix, and the current second weight matrix in the initial liquid neural network is updated to the updated second weight matrix to obtain an updated initial liquid neural network.
[0137] The following details the implementation of gradient propagation of the initial liquid neural network based on the loss function using the chain conduction rule.
[0138] Chain conduction calculations are performed according to the following formulas (10) to (21).
[0139] First, calculate L for the control parameter k p and k i Gradient:
[0140]
[0141] It should be noted that the e in formula (10) and the e in formula (9) are tBoth represent the error parameters of the current cycle.
[0142] In practice, e is directly affected by k p The impact of , simplified to:
[0143]
[0144] in,
[0145]
[0146] Similarly simplified:
[0147]
[0148] Secondly, calculate the control parameter k p and k i The gradient of the state h of the hidden layer node in the current cycle.
[0149]
[0150] Among them, k p Obtained by formula (7). x in formula (14) represents f_k p =[h0,h1,h2,h 48 ,h 49 ]. σ(x) is the sigmoid function. N p Indicates the determination of k p The number of nodes in the hidden layer used when . Based on formula (7), N p Equal to 5. In formula (14), j refers to the determination of k p The number of the hidden layer node used when .
[0151]
[0152] Among them, k i Obtained by formula (8). x in formula (15) represents f_k i =[h3,h4,h5,h 48 ,h 49 ]. i Indicates the determination of k i The number of nodes in the hidden layer used when . Based on formula (8), N i Equal to 5. In formula (15), j refers to the determination of k i The number of the hidden layer node used when .
[0153] After that, the total gradient of the loss function L with respect to h is calculated. Combining all contributions, it is determined by the following formula (16):
[0154]
[0155] Gradient back propagation is performed according to the state equations of formula (1) and formula (4):
[0156]
[0157] According to formula (18), the gradient (a) of the activation value a to the pre-activation value z (i.e., the intermediate value of the activation value) is calculated. j =tanh(z j )):
[0158]
[0159] Therefore, the following formula (19) is obtained:
[0160]
[0161] Next, calculate the gradient of the pre-activation value z with respect to the weight W,U:
[0162]
[0163] Among them, x i is the i-th dimension of the input, in matrix form
[0164]
[0165] Among them, h t-1,k is the state of the kth node in the previous cycle. Matrix form
[0166] Based on the above process, we can obtain the following formulas (22) and (23):
[0167] W t+1 =W t -η(ΔW t +μΔW t-1 ) (twenty two);
[0168] U t+1 =U t -η(ΔU t +μΔU t-1 ) (twenty three).
[0169] in,
[0170] In steps 605 to 607, by introducing the momentum factor, when updating the first weight matrix and the second weight matrix, the change in the weight matrix in the previous cycle is also taken into account, which is equivalent to achieving a soft update of the initial liquid neural network, that is, achieving a slow update of the initial liquid neural network, avoiding instability of the controlled device due to too fast update of the initial liquid neural network, improving the convergence stability of the initial liquid neural network, and thus improving the stability of the controlled device.
[0171] Figure 7 It is a schematic diagram of a system response curve provided by an embodiment of the present invention. Figure 7 The horizontal axis in is time, in seconds. The vertical axis from top to bottom is output parameters, control parameters, node status and loss parameters. Figure 7 As shown in the figure, in the output parameter diagram, the red dotted line represents the expected parameter, and the blue solid line represents the output parameter. In the node status diagram, based on the diagram, lines of different colors represent the status of different nodes.
[0172] pass Figure 7 It can be seen that the error parameters converge in a very short time. Based on the loss function provided in this embodiment, the output parameters are updated without overshoot relative to the step response. In this embodiment, the controlled device is controlled using an improved liquid neural network, which can quickly update weights through self-learning and find the optimal control parameters using the gradient descent method.
[0173] In this embodiment, combined with the method of determining the loss function and the soft update process of the initial liquid neural network, the second loss term in the loss function can respond quickly when there is a sudden interference, that is, when the error parameter suddenly increases. At this time, based on the soft update process, the state of the nodes of the hidden layer of the initial liquid neural network can be prevented from changing drastically, thereby avoiding overshoot oscillation and improving the anti-interference ability of the control method.
[0174] Figure 8 1 is a schematic diagram of a control device provided by an embodiment of the present invention. The device is provided in an electronic device, for example, a computer device. Figure 8 As shown, the control device provided by this embodiment includes the following modules: an acquisition module 81 , a first determination module 82 , an update module 83 and a second determination module 84 .
[0175] The acquisition module 81 is used to acquire the output parameters of the controlled device in the current cycle.
[0176] The controlled device is connected to an initial liquid neural network. The controlled device is configured to obtain output parameters for the current cycle based on control parameters for the current cycle input by the initial liquid neural network. The initial liquid neural network is configured to determine control parameters for the current cycle based on expected parameters for the previous cycle and the output parameters of the controlled device in the previous cycle.
[0177] The first determining module 82 is configured to determine the error parameter of the current cycle according to the output parameter of the current cycle and the expected parameter of the current cycle.
[0178] The updating module 83 is used to determine the loss function according to the error parameter of the current cycle, the control parameter of the current cycle and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle if the error parameter of the current cycle does not meet the iteration termination condition, and update the initial liquid neural network according to the loss function, use the updated initial liquid neural network as the new initial liquid neural network, and return to execute the steps executed by the acquisition module 81.
[0179] The second determining module 84 is configured to determine the initial liquid neural network as the target liquid neural network if the error parameter of the current cycle satisfies an iteration termination condition.
[0180] In one embodiment, the initial liquid neural network is used to determine the control parameters of the current cycle based on the error parameters of the previous cycle determined by the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle, the integral of the error parameters, and the rate of change of the expected parameters of the previous cycle.
[0181] In one embodiment, the control parameters of the current cycle include a first parameter and a second parameter. The device also includes a third determination module. The third determination module is specifically used to obtain the control parameters of the current cycle in the following manner: determining the current activation value based on the error parameter of the previous cycle, the integral of the error parameter, the rate of change of the expected parameter of the previous cycle, the current weight matrix of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle; determining the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle based on the current activation value, the time constant of the nodes of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle; determining the first parameter based on the state of the first a nodes in the hidden layer of the initial liquid neural network in the current cycle and the state of the last b nodes in the current cycle; determining the second parameter based on the state of the first c nodes in the hidden layer of the initial liquid neural network in the current cycle and the state of the last d nodes in the hidden layer of the initial liquid neural network in the current cycle. The first a nodes are different from at least one of the first c nodes, and / or the last b nodes are different from at least one of the last d nodes, a, b, c, and d are all integers greater than 0, and the sum of a and b and the sum of c and d are both less than the total number of nodes N in the hidden layer. h .
[0182] In one embodiment, in the aspect of determining the first parameter according to the states of the first a nodes in the hidden layer of the initial liquid neural network in the current cycle and the states of the last b nodes in the current cycle, the third determining module is specifically configured to: determine the first parameter according to the states of the 0th node in the current cycle, the 1st node in the current cycle, the 2nd node in the current cycle, the Nth ... h -2 nodes in the current cycle and the status of the Nth h -1 node in the current cycle, determine the first parameter intermediate quantity; determine the first parameter according to the first parameter intermediate quantity, the first coefficient and the second coefficient.
[0183] In one embodiment, in the aspect of determining the second parameter according to the states of the first c nodes in the hidden layer of the initial liquid neural network in the current cycle and the states of the last d nodes in the current cycle, the third determining module is specifically configured to: determine the second parameter according to the states of the third node in the current cycle, the fourth node in the current cycle, the fifth node in the current cycle, the Nth ... h -2 nodes in the current cycle and the status of the Nth h -1 node in the current cycle, determine the second parameter intermediate quantity; determine the second parameter according to the second parameter intermediate quantity, the third coefficient and the fourth coefficient.
[0184] In one embodiment, in terms of determining the loss function based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, the update module 83 is specifically used to: determine the square of the error parameter of the current cycle as the first loss term; determine the second loss term based on the control parameter of the current cycle, the error parameter of the current cycle, and the integral of the error parameter; determine the third loss term based on the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle; and determine the loss function based on the first loss term, the second loss term, and the third loss term.
[0185] In one embodiment, in determining the second loss term based on the control parameter of the current cycle, the error parameter of the current cycle, and the integral of the error parameter, the updating module 83 is specifically configured to: update the second loss term based on the formula u=k p e t +∫k i edt, determine the second loss term. Wherein, u represents the second loss term, k p and k i represents the control parameter of the current cycle, e t represents the error parameter of the current cycle, and ∫edt represents the integral of the error parameter.
[0186] In one embodiment, in determining the third loss term according to the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, the updating module 83 is specifically configured to: Determine the third loss term. Wherein, N h represents the total number of nodes in the hidden layer, h j Represents the state of the j-th node in the hidden layer in the current cycle.
[0187] In one embodiment, in determining the loss function according to the first loss term, the second loss term, and the third loss term, the updating module 83 is specifically configured to: according to the formula: Determine the loss function, where L represents the loss function.
[0188] In one embodiment, the initial liquid neural network includes a current first weight matrix from the input layer to the hidden layer and a current second weight matrix of the hidden layer self-loop. In the aspect of updating the initial liquid neural network according to the loss function, the updating module 83 is specifically configured to: according to formula W t+1 =W t -η(ΔW t +μΔW t-1 ), determine the updated first weight matrix, where W t+1Represents the updated first weight matrix, W t represents the current first weight matrix, η represents the learning rate, μ represents the momentum factor, △W t is the change of the first weight matrix in the current period determined according to the loss function, ΔW t-1 Indicates the change of the first weight matrix in the previous period; according to the formula U t+1 =U t -η(ΔU t +μΔU t-1 ), determine the updated second weight matrix, where U t+ 1 represents the updated second weight matrix, U t represents the current second weight matrix, η represents the learning rate, μ represents the momentum factor, △U t is the change of the second weight matrix of the current cycle determined according to the loss function, △U t-1 Represents the change of the second weight matrix in the previous cycle; and updates the initial liquid neural network according to the updated first weight matrix and the updated second weight matrix.
[0189] In one embodiment, the controlled device includes: a proportional-integral controller, a power source for outputting a radio frequency signal, and an accelerator, connected in sequence. The control parameters of the current cycle are parameters input to the proportional-integral controller, and the output parameters of the current cycle are parameters output by the accelerator. The parameters input to the proportional-integral controller also include an error parameter from the previous cycle. The first parameter is a proportional parameter, and the second parameter is an integral parameter.
[0190] The control device provided in the embodiment of the present invention can execute the control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0191] Figure 9 1 is a block diagram of an electronic device that implements the control method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided for example only and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0192] like Figure 9As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0193] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0194] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the control method.
[0195] In some embodiments, the control method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the control method in any other appropriate manner (e.g., by means of firmware).
[0196] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0197] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0198] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0199] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0200] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0201] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0202] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the control method provided by any embodiment of the present invention when executed by a processor.
[0203] The computer program product may be implemented in a computer program code for performing the operations of the present invention written in one or more programming languages, or a combination thereof, including object-oriented programming languages and conventional procedural programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0204] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0205] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A control method, characterized in that: The method comprises: Obtaining output parameters of a controlled device in a current cycle; wherein the controlled device is connected to an initial liquid neural network, the controlled device is configured to obtain output parameters of the current cycle based on control parameters of the current cycle input by the initial liquid neural network, and the initial liquid neural network is configured to determine the control parameters of the current cycle based on expected parameters of a previous cycle and the output parameters of the controlled device in the previous cycle; Determining an error parameter of the current cycle according to the output parameter of the current cycle and the expected parameter of the current cycle; If the error parameter of the current cycle does not meet the iteration termination condition, then determine a loss function based on the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle, and update the initial liquid neural network according to the loss function. Use the updated initial liquid neural network as the new initial liquid neural network, and return to the step of "obtaining the output parameter of the controlled device in the current cycle"; If the error parameter of the current cycle meets the iteration termination condition, the initial liquid neural network is determined as the target liquid neural network.
2. The method according to claim 1, characterized in that The initial liquid neural network is used to determine the control parameters of the current cycle based on the error parameters of the previous cycle determined by the expected parameters of the previous cycle and the output parameters of the controlled device in the previous cycle, the integral of the error parameters, and the rate of change of the expected parameters of the previous cycle.
3. The method according to claim 2, characterized in that The control parameters of the current cycle include a first parameter and a second parameter; The initial liquid neural network obtains the control parameters of the current cycle in the following manner: Determining a current activation value based on the error parameter of the previous cycle, the integral of the error parameter, the rate of change of the expected parameter of the previous cycle, the current weight matrix of the initial liquid neural network, and the state of the nodes of the hidden layer of the initial liquid neural network in the previous cycle; determining the states of the nodes of the hidden layer of the initial liquid neural network in a current cycle according to the current activation value, the time constant of the nodes of the initial liquid neural network, and the states of the nodes of the hidden layer of the initial liquid neural network in a previous cycle; Determining the first parameter according to the states of the first a nodes in the hidden layer of the initial liquid neural network in the current cycle and the states of the last b nodes in the current cycle; Determining the second parameter according to the states of the first c nodes and the last d nodes in the hidden layer of the initial liquid neural network in the current cycle; The first a nodes are different from at least one of the first c nodes, and / or the last b nodes are different from at least one of the last d nodes, a, b, c, and d are all integers greater than 0, and the sum of a and b and the sum of c and d are both less than the total number of nodes N in the hidden layer. h .
4. The method according to claim 3, characterized in that The determining of the first parameter according to the states of the first a nodes in the hidden layer of the initial liquid neural network in the current cycle and the states of the last b nodes in the current cycle includes: According to the state of the 0th node in the current cycle, the state of the 1st node in the current cycle, the state of the 2nd node in the current cycle, the state of the Nth node in the current cycle, h -2 nodes in the current cycle and the status of the Nth h -1 node status in the current cycle, determining the intermediate value of the first parameter; Determining the first parameter according to the first parameter intermediate amount, the first coefficient, and the second coefficient; The determining of the second parameter according to the states of the first c nodes in the hidden layer of the initial liquid neural network in the current cycle and the states of the last d nodes in the current cycle includes: According to the status of the 3rd node in the current cycle, the status of the 4th node in the current cycle, the status of the 5th node in the current cycle, the status of the Nth node in the current cycle, h -2 nodes in the current cycle and the status of the Nth h -1 The state of the node in the current cycle determines the intermediate value of the second parameter; The second parameter is determined according to the second parameter intermediate amount, the third coefficient and the fourth coefficient.
5. The method according to any one of claims 1 to 4, characterized in that The determining of the loss function according to the error parameter of the current cycle, the control parameter of the current cycle, and the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle includes: Determining the square of the error parameter of the current cycle as a first loss term; determining a second loss term according to the control parameter of the current cycle, the error parameter of the current cycle, and an integral of the error parameter; determining a third loss term according to the states of the nodes of the hidden layer of the initial liquid neural network in the current cycle; The loss function is determined according to the first loss term, the second loss term, and the third loss term.
6. The method according to claim 5, characterized in that The determining the second loss term according to the control parameter of the current cycle, the error parameter of the current cycle, and the integral of the error parameter includes: According to the formula u=k p e t +∫k i edt, determine the second loss term; where u represents the second loss term, k p and k i represents the control parameter of the current cycle, e t represents the error parameter of the current cycle, and ∫edt represents the integral of the error parameter; The determining of the third loss term according to the state of the nodes of the hidden layer of the initial liquid neural network in the current cycle includes: According to the formula Determine the third loss term; wherein, N h represents the total number of nodes in the hidden layer, h j Indicates the state of the j-th node in the hidden layer in the current cycle; The determining the loss function according to the first loss term, the second loss term, and the third loss term includes: According to the formula: Determine the loss function; wherein L represents the loss function.
7. The method according to any one of claims 1 to 4, characterized in that The initial liquid neural network includes a current first weight matrix from the input layer to the hidden layer and a current second weight matrix of the hidden layer self-loop; The updating of the initial liquid neural network according to the loss function includes: According to the formula W t+1 =W t -η(ΔW t +μΔW t-1 ), determine the updated first weight matrix; where W t+1 Represents the updated first weight matrix, W t represents the current first weight matrix, η represents the learning rate, μ represents the momentum factor, △W t is the change of the first weight matrix in the current period determined according to the loss function, ΔW t-1 Indicates the change of the first weight matrix in the previous period; According to the formula U t+1 =U t -η(ΔU t +μΔU t-1 ), determine the updated second weight matrix; where U t+1 Represents the updated second weight matrix, U t represents the current second weight matrix, η represents the learning rate, μ represents the momentum factor, △U t is the change of the second weight matrix of the current cycle determined according to the loss function, △U t-1 Indicates the change of the second weight matrix in the previous cycle; The initial liquid neural network is updated according to the updated first weight matrix and the updated second weight matrix.
8. The method according to any one of claims 2 to 4, characterized in that The controlled device includes: a proportional-integral controller, a power source for outputting a radio frequency signal, and an accelerator connected in sequence; The control parameters of the current cycle are the parameters input to the proportional-integral controller, and the output parameters of the current cycle are the parameters output by the accelerator; The parameters input into the proportional-integral controller also include the error parameter of the previous cycle; The first parameter is a proportional parameter, and the second parameter is an integral parameter.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is configured to enable a processor to implement the control method according to any one of claims 1 to 8 when the computer program is executed.