Iterative learning control method, system and equipment of permanent magnet motor network and medium
Through the iterative learning control method of the permanent magnet motor network, homomorphic encryption and quantization technology are used to optimize the encrypted signal, the problems of random data loss and privacy security in networked control are solved, and high-precision and efficient permanent magnet motor control are achieved.
Patent Information
- Application Number
- CN202510499863.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-08
AI Technical Summary
The existing permanent magnet motor network control method is difficult to cope with the dual needs of random packet loss and privacy security in networked control scenarios, resulting in the impact of control accuracy and security.
The iterative learning control method of the permanent magnet motor network is adopted to encrypt the actual control input signal and output sequence through homomorphic encryption technology, and iterative learning is performed on the controller side. Combining quantization and mapping functions, the encrypted signal is optimized to ensure data privacy protection while improving control accuracy.
High-precision control in random data loss scenarios is realized, the computational complexity is reduced, the convergence efficiency of iterative learning is improved, and the balance between data privacy protection and computing efficiency is ensured.
Smart Images

Figure CN120449178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of permanent magnet motor network control, and in particular to an iterative learning control method, system, device and medium for a permanent magnet motor network. Background Art
[0002] Permanent magnet motors are currently widely used in the design and control of robot joints. With the development of wireless network technology, the collaborative operation between permanent magnet motors and controllers has transcended geographical limitations, enabling remote, real-time control via the network. However, existing permanent magnet motor control still has some challenges in networked control scenarios.
[0003] On the one hand, wireless signals are easily affected by factors such as transmission distance, obstacles, and weather during propagation, resulting in random data packet loss and delays, which in turn affect control accuracy and even cause instability in the motor system. On the other hand, in a network environment, data transmission is vulnerable to malicious attacks and there is a risk of eavesdropping or tampering, which affects the safety and stability of the motor system.
[0004] Existing permanent magnet motor network control methods usually rely on complete data packets and accurate system models, which makes it difficult to simultaneously meet the dual needs of coping with random packet loss and ensuring privacy and security. In addition, existing permanent magnet motor network control methods have computational overhead and functional limitations in achieving data encryption transmission in the scenario of random packet loss. Summary of the Invention
[0005] In order to solve the above technical problems, the present invention provides an iterative learning control method, system, device and medium for a permanent magnet motor network, so as to solve the random packet loss and privacy protection problems existing in the existing permanent magnet motor network control, and achieve the technical effect of improving the security of transmitted data and the control accuracy of the permanent magnet motor.
[0006] In a first aspect, the present invention provides an iterative learning control method for a permanent magnet motor network, wherein the permanent magnet motor network includes a permanent magnet motor end and a controller end, and the method includes:
[0007] The permanent magnet motor end obtains the actual control input signal and the corresponding actual output sequence of the permanent magnet motor, performs homomorphic encryption on the actual control input signal and the actual output sequence, and sends the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end;
[0008] The controller side calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor side, and the encrypted expected output sequence from the external platform through an iterative learning law to obtain an encrypted calculation control input signal, and sends the encrypted calculation control input signal to the permanent magnet motor side;
[0009] The permanent magnet motor end decrypts the received encrypted calculation control input signal, and inputs the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence;
[0010] The permanent magnet motor end calculates a tracking error based on the updated actual output sequence and the expected output sequence, and determines whether the tracking error reaches a convergence condition. If so, the updated actual control input signal is used as the optimal control input signal to control the permanent magnet motor;
[0011] If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
[0012] Furthermore, the step of homomorphically encrypting the actual control input signal and the actual output sequence includes:
[0013] Using the actual control input signal and the actual output sequence as signals to be encrypted;
[0014] quantizing the signal to be encrypted using a quantization function to obtain a quantized value of the signal to be encrypted;
[0015] Mapping the quantized value of the signal to be encrypted using a mapping function to obtain a mapped value of the signal to be encrypted;
[0016] The mapping value of the signal to be encrypted is homomorphically encrypted using a homomorphic encryption function to obtain an encrypted actual control input signal and an encrypted actual output sequence.
[0017] Furthermore, the following formula is used to express the encrypted actual control input signal, the encrypted actual output sequence, and the encrypted expected output sequence:
[0018]
[0019] In the formula, Enc(*) represents the homomorphic encryption function, r represents the random number, c and d both represent the quantization parameters, S (c,d) (*) indicates the mapping function, represents the i-th component of the actual control input signal at the k-th iteration n time, y d,j (n) represents the jth component of the expected output sequence at time n, Represents the jth component of the actual output sequence quantization value at the kth iteration n time, represents the jth component of the actual output sequence encrypted at the kth iteration n time, represents the jth component of the expected output sequence encrypted at time n, It represents the i-th component of the actual control input signal encrypted at time n in the k-th iteration.
[0020] Furthermore, the controller side calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor side, and the encrypted expected output sequence from the external platform through an iterative learning law to obtain the encrypted calculated control input signal, which includes:
[0021] A mapping function is used to map the control gain parameters of the iterative learning law to obtain a mapping value of the control gain parameters;
[0022] Determining an encrypted control input signal based on a transmission state of a sending network, the encrypted actual control input signal, and an encrypted calculated control input signal of a previous iteration;
[0023] The encrypted calculation control input signal of the current iteration is calculated according to the transmission state of the sending network, the control gain parameter mapping value, the encrypted control input signal, the encrypted actual output sequence and the encrypted expected output sequence.
[0024] Furthermore, the iterative learning law is expressed by the following formula:
[0025]
[0026]
[0027] Where w represents the signal dimension, represents the jth component of the actual output sequence encrypted at the kth iteration n+1, represents the jth component of the expected output sequence encrypted at the kth iteration n+1, represents the i-th component of the encrypted control input signal at time n of the k-th iteration, represents the i-th component of the encrypted calculation control input signal at the k-th iteration n time, represents the i-th component of the actual control input signal encrypted at time n of the k-th iteration, represents the sending network transmission status at the k+1th iteration n, K represents the encryption public key, L i,j represents the ijth component of the control gain parameter, c and d both represent quantization parameters, S (c,d) (*) indicates the mapping function, Represents the ijth component of the control gain parameter mapping value.
[0028] Furthermore, the following formula is used to express the constraints of the iterative learning law:
[0029] ||I-LCB|| ∞ <1
[0030] Where I represents the identity matrix, L represents the control gain parameter, and C and B are system parameters.
[0031] Furthermore, before the step of decrypting the received encrypted calculation control input signal at the permanent magnet motor end, the method further includes:
[0032] The permanent magnet motor end determines the receiving network transmission status. If the transmission is successful, the received encrypted calculation control input signal is decrypted. Otherwise, the actual control input signal of the previous iteration is used as the actual control input signal of the current iteration.
[0033] In a second aspect, the present invention provides an iterative learning control system for a permanent magnet motor network, wherein the permanent magnet motor network includes a permanent magnet motor end and a controller end, and the system includes:
[0034] A homomorphic encryption module is applied to the permanent magnet motor end, and is used to obtain an actual output sequence corresponding to an actual control input signal of the permanent magnet motor, homomorphically encrypt the actual control input signal and the actual output sequence, and send the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end;
[0035] an iterative learning module, applied to the controller end, for calculating the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor end and the encrypted expected output sequence from the external platform using an iterative learning law to obtain an encrypted calculation control input signal, and sending the encrypted calculation control input signal to the permanent magnet motor end;
[0036] A homomorphic decryption module is applied to the permanent magnet motor end, and is used to decrypt the received encrypted calculation control input signal, and input the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence;
[0037] a motor control module, applied to the permanent magnet motor end, for calculating a tracking error based on the updated actual output sequence and the expected output sequence, and determining whether the tracking error has reached a convergence condition; if so, using the updated actual control input signal as the optimal control input signal to control the permanent magnet motor;
[0038] If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
[0039] In a third aspect, an embodiment of the present invention further provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0040] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0041] The present invention provides an iterative learning control method, system, device, and medium for a permanent magnet motor network. By using an iterative learning control algorithm that takes network transmission status into consideration, the present invention can achieve direct learning and optimization of encrypted signals, thereby avoiding the security risks of plaintext transmission and ensuring comprehensive data privacy protection. Furthermore, the present invention can overcome the impact of network transmission data loss or delay on the accuracy of control signals, thereby achieving high-precision control of permanent magnet motors. Simultaneously, in combination with a quantitative encryption algorithm, it can reduce computational complexity and improve the convergence efficiency of iterative learning. The control method provided by the present invention can effectively improve computational efficiency while protecting the privacy of transmitted data, thereby achieving efficient real-time control of permanent magnet motors. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 1 is a flow chart of an iterative learning control method for a permanent magnet motor network according to an embodiment of the present invention;
[0043] Figure 2 is a flowchart of an iterative learning control method for a permanent magnet motor network in an embodiment of the present invention;
[0044] Figure 3 1 is a schematic structural diagram of an iterative learning control system of a permanent magnet motor network according to an embodiment of the present invention;
[0045] Figure 4 1 is a diagram showing the internal structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments 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 shall fall within the scope of protection of the present invention.
[0047] See also Figure 1A first embodiment of the present invention provides an iterative learning control method for a permanent magnet motor network. The method is used to control a permanent magnet motor network, wherein the permanent magnet motor network includes a permanent magnet motor end and a controller end connected via a network, and includes steps S10 to S40:
[0048] Step S10: The permanent magnet motor end obtains an actual control input signal and a corresponding actual output sequence of the permanent magnet motor, performs homomorphic encryption on the actual control input signal and the actual output sequence, and sends the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end;
[0049] Step S20: The controller calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor end, and the encrypted expected output sequence from the external platform through an iterative learning law to obtain an encrypted calculation control input signal, and sends the encrypted calculation control input signal to the permanent magnet motor end;
[0050] Step S30, the permanent magnet motor end decrypts the received encrypted calculation control input signal, and inputs the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence;
[0051] Step S40: the permanent magnet motor end calculates a tracking error based on the updated actual output sequence and the expected output sequence, and determines whether the tracking error reaches a convergence condition. If so, the updated actual control input signal is used as the optimal control input signal to control the permanent magnet motor;
[0052] If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
[0053] The present invention is used to control a permanent magnet motor network, which includes a permanent magnet motor and a controller, and the two communicate through a network. Since network communication is adopted, there will inevitably be problems such as random packet loss, delay, and privacy security of transmitted data. In order to ensure privacy security, the transmitted data can be encrypted by an encryption algorithm. Conventional encryption algorithms include fully homomorphic encryption, partially homomorphic encryption, and encryption based on elliptic curves. Although fully homomorphic encryption is powerful, its high complexity increases the computational burden. Partial homomorphic encryption will cause precision loss and additional computational overhead in the encryption process of floating-point numbers and negative numbers, thereby affecting computational efficiency. The encryption algorithm based on elliptic curves does not support addition operations and is inefficient when processing linear operations, and is not suitable for scenarios with random packet loss. Therefore, in order to simultaneously meet the dual needs of random packet loss and privacy security, the present invention provides an iterative learning control method for a permanent magnet motor network for privacy protection.
[0054] The permanent magnet motor model can be regarded as a continuous linear dynamic system, and its model can be expressed as:
[0055]
[0056] Among them, t represents the time point, k represents the number of iterations, T d is the motor running time, v k (t) represents the angular velocity of the motor at the kth iteration time t, represents the first-order derivative of the motor rotor angular position at the kth iteration t, It represents the first derivative of the motor angular velocity at the kth iteration t; E represents the viscous friction coefficient, F is the moment of inertia, i q is the q-axis stator current, m k is the number of motor pole pairs, ψ l Indicates magnetic flux, N J Indicates the load torque; for the convenience of subsequent controller design, i q =u k (t),u k (t) represents the control input signal at the kth iteration time t, and y k (t) = v k (t), y k (t) represents the output sequence at time t of the kth iteration.
[0057] By discretizing the motor model, we can get the following discrete model:
[0058]
[0059] Among them, T pis the sampling period of the permanent magnet motor, v(t) represents the motor angular velocity at time t, and z(t) represents the motor rotor angular position at time t.
[0060] Set the sampling period of the permanent magnet motor to T p , then the discrete sequence of sampling time n can be expressed as:
[0061]
[0062] The corresponding discrete time series is:
[0063]
[0064] Based on the above discrete model, the motor system is modeled and the following discrete system is obtained:
[0065]
[0066] Where A, B and C are system parameters, y k (n) represents the actual output sequence discretized at time n of the k-th iteration;
[0067] in:
[0068] y k (n) = y k (n·T p ),
[0069] x k (n)=[z k (n),v k (n)] T , C=[0 1],
[0070] Where z k (n) represents the motor rotor angular position at the kth iteration n, v k (n) represents the angular velocity of the motor at the kth iteration n.
[0071] Assume that the expected output sequence of the permanent magnet motor at time t is y d (t), according to the sampling period T p Sample the expected output sequence and get the expected output sequence y d (n·T p ), define the sequence as y d (n), that is, the expected output sequence discretized at time n.
[0072] At this time, the tracking error of the permanent magnet motor system can be expressed as:
[0073] e k (n) = y d (n)-y k (n)
[0074] Where, e k (n) represents the tracking error at time n of the kth iteration.
[0075] Set the continuous input signal of the permanent magnet motor system to u k (t), which satisfies:
[0076]
[0077] The continuous input signal u k (t) Input the permanent magnet motor, and the actual output sequence y can be obtained k (t), the continuous input signal and the actual output sequence are sampled to obtain the discrete control input signal and the discretized actual output signal For the convenience of description, in the following description, the discretized control input signal Represented as u k (n), and the discretized actual output signal Represented as y k (n), that is, in the subsequent steps, the parameters t and n in the brackets are used to distinguish whether the value is continuous data or discrete data.
[0078] After obtaining the discrete actual control input signal and corresponding actual output sequence of the permanent magnet motor through the above steps, this data will be encrypted by a device with quantization technology and homomorphic encryption mechanism, and sent to the controller side for iterative learning through a network with random data loss characteristics.
[0079] See also Figure 2 The permanent magnet motor end includes a permanent magnet motor system, a device E1 with quantization technology and homomorphic encryption mechanism, a device E2 with homomorphic decryption mechanism, and a memory for storing actual control input signals. The controller end includes an iterative learning controller and a memory for storing iteratively calculated encrypted control input signals. Figure 2 The permanent magnet motor network is shown in FIG. 1 . The following is a detailed description of the iterative learning steps of the permanent magnet motor.
[0080] Taking the kth iteration as an example, the actual control input signal Applied to the permanent magnet motor system, the actual output sequence y can be obtained k (t), where represents the actual control input signal at the kth iteration t, y k(t) represents the actual output sequence at the kth iteration t, converting the continuous actual output sequence and the continuous actual control input signal into a discretized actual output sequence y k (n) and the discretized actual control input signal The obtained discrete data is then encrypted and processed iteratively.
[0081] First, the actual control input signal and the corresponding actual output sequence are encrypted by the encryption device E1. The specific encryption steps include:
[0082] Using the actual control input signal and the actual output sequence as signals to be encrypted;
[0083] quantizing the signal to be encrypted using a quantization function to obtain a quantized value of the signal to be encrypted;
[0084] Mapping the quantized value of the signal to be encrypted using a mapping function to obtain a mapped value of the signal to be encrypted;
[0085] The mapping value of the signal to be encrypted is homomorphically encrypted using a homomorphic encryption function to obtain an encrypted actual control input signal and an encrypted actual output sequence.
[0086] In this embodiment, a device E1 with quantization, mapping, and homomorphic encryption mechanisms is used for encryption. First, a quantization function is used to quantize the signal to be encrypted, where the quantization function is expressed as:
[0087]
[0088] Where Q(*) represents the quantization function, g∈R is the signal to be encrypted, R represents the set of real numbers, b∈Q is the quantized value of the signal to be encrypted, Q represents the set of rational numbers, and argmin|*| represents the function that finds the set of independent variable values that minimizes the objective function.
[0089] H( c,d ) represents a set, which is defined as:
[0090]
[0091] Where c and d are both quantization parameters, c and d are positive integers, and c>d, b c and b u They are all 0-1 variables, and u represents an element in the set {1,2,…,c-1}.
[0092] Then, a mapping function based on the quantization parameter is used to map the quantized value of the encrypted signal. The mapping function is:
[0093] S( c,d )(b)=2d b mod 2 c
[0094] Among them, S (c,d) (*) represents the mapping function, and b is the quantized value of the signal to be encrypted.
[0095] Finally, the output signal mapping value is encrypted using homomorphic encryption technology. In this embodiment, the partially homomorphic encryption algorithm Paillier is used, and its encryption function is expressed as:
[0096] Enc(m)=(K+1) m r K modK 2
[0097] Wherein, Enc(*) represents a homomorphic encryption function, m represents an input parameter of the homomorphic encryption function, in this embodiment, m is the signal to be encrypted after quantization and mapping, K represents the encryption public key, wherein K=pq, p and q are both prime numbers and satisfy gcd(pq,(p-1)(q-1))=1, gcd(*) is the greatest common divisor function, r represents a random number, and 0<r<K, gcd(r,K)=1.
[0098] The encrypted signal after homomorphic encryption can be expressed as:
[0099]
[0100] In the formula, c and d are quantization parameters, S (c,d) (*) indicates the mapping function, represents the i-th component of the actual control input signal at the k-th iteration n time, Represents the jth component of the actual output sequence quantization value at the kth iteration n time, represents the jth component of the actual output sequence encrypted at the kth iteration n time, It represents the i-th component of the actual control input signal encrypted at time n in the k-th iteration.
[0101] The encrypted actual control input signal and the encrypted actual output sequence are transmitted to the controller through the network. At the same time, the controller also receives the encrypted expected output sequence from the external platform. The encrypted expected output sequence uses the same steps as the above algorithm to encrypt the expected output sequence. Its expression is:
[0102]
[0103] Where y d,j (n) represents the jth component of the expected output sequence at time t, Represents the jth component of the encrypted expected output sequence at time t.
[0104] An iterative learning law controller is preset on the controller side for iteratively learning the actual control input signal of the permanent magnet motor. The calculation steps of the iterative learning law include:
[0105] A mapping function is used to map the control gain parameters of the iterative learning law to obtain a mapping value of the control gain parameters;
[0106] Determining an encrypted control input signal based on a transmission state of a sending network, the encrypted actual control input signal, and an encrypted calculated control input signal of a previous iteration;
[0107] The encrypted calculation control input signal of the current iteration is calculated according to the transmission state of the sending network, the control gain parameter mapping value, the encrypted control input signal, the encrypted actual output sequence and the encrypted expected output sequence.
[0108] In this embodiment, a mapping function is first used to map the control gain parameters of the iterative learning law:
[0109]
[0110] Among them, L i,j represents the ijth component of the control gain parameter, c and d both represent quantization parameters, S (c,d) (*) indicates the mapping function, Represents the mapping value of the ijth component of the control gain parameter.
[0111] The control gain parameter L needs to meet the following convergence conditions:
[0112] ||I-LCB|| ∞ <1
[0113] Where I is the identity matrix, B and C are the system parameters in the discrete system, ||*|| ∞ Represents the maximum norm.
[0114] Because this embodiment is applied in a network scenario with random data loss, the network transmission status directly affects the integrity and timeliness of the encrypted data received by the controller. Any data loss or data delay affects the accuracy of the control input signal calculated in subsequent iterations. In other words, the accuracy of the control input signal is related to the network transmission status of the controller during iterative learning. To mitigate the impact of random data loss on the accuracy of the control input signal, this embodiment designs different iterative learning laws for different network transmission conditions.
[0115] Assume that the state of network transmission without packet loss and delay is considered successful transmission. If there is packet loss or delay, it is considered a transmission failure. In other words, the network transmission status includes two states: successful transmission and failed transmission, represented by 1 and 0 respectively. If the transmission is successful, the controller side calculates the encrypted calculation control input signal of the current iteration based on the control gain parameter mapping value, the encrypted actual control input signal, the encrypted actual output sequence and the encrypted expected output sequence; if the transmission fails, that is, once data packet loss occurs, the controller side will no longer use the currently received incomplete encrypted data for iterative calculation, but will use the encrypted calculation control input signal calculated in the previous iteration for iterative calculation. Its iterative learning law can be expressed as:
[0116]
[0117] Where w represents the signal dimension, represents the jth component of the actual output sequence encrypted at the kth iteration n+1, represents the jth component of the expected output sequence encrypted at the kth iteration n+1, represents the i-th component of the encrypted control input signal at time n of the k-th iteration, represents the i-th component of the encrypted calculation control input signal at the k-th iteration n time, represents the i-th component of the actual control input signal encrypted at time n of the k-th iteration, represents the sending network transmission status at the k+1th iteration n, K represents the encryption public key, L i,j represents the ijth component of the control gain parameter, c and d both represent quantization parameters, S (c,d) (*) indicates the mapping function, Represents the ijth component of the control gain parameter mapping value.
[0118] In the above iterative learning law, Indicates the transmission status of the sending network at the time of the k+1th iteration n. If the transmission is successful, then On the contrary, As can be seen from the above formula, the value of the encrypted control input signal in the expression for the encrypted calculated control input signal is related to the network transmission status. If the network transmission status is successful, the encrypted control input signal is actually the encrypted actual control input signal. If the network transmission status fails, the encrypted control input signal is actually the encrypted control input signal calculated in the previous iteration and stored in the controller's memory. The iterative learning law provided in this embodiment can overcome the impact of incomplete encrypted data on control accuracy and the impact of data delay on control efficiency, thereby ensuring high precision of the control input signal and real-time control of the permanent magnet motor.
[0119] The encrypted control input signal of the current iteration calculated by the controller through the iterative learning law will be sent to the permanent magnet motor end through the network and decrypted using the decryption device E2 to obtain the latest actual control input signal. In fact, when the controller end sends data, the network also has the problem of random data loss. Random data loss will cause the data received by the permanent magnet motor end to be incomplete and affect the accuracy of the actual control input signal after decryption. To this end, before decrypting the received encrypted control input signal, the permanent magnet motor end needs to judge the status of the network transmission to determine whether decryption is required. The specific steps include:
[0120] The permanent magnet motor end determines the receiving network transmission status. If the transmission is successful, the received encrypted calculation control input signal is decrypted. Otherwise, the actual control input signal of the previous iteration is used as the actual control input signal of the current iteration.
[0121] In this embodiment, the permanent magnet motor end will determine the transmission state of the receiving network. Assume that the transmission state of the receiving network at the k+1th iteration n is γ k+1 (n), if the transmission is successful, then γ k+1 (n)=1, otherwise, γ k+1 (n)=0.
[0122] In the case of successful transmission, the encrypted control input signal is directly decrypted to obtain the actual control input signal of the current iteration. If the transmission fails, that is, there is data loss or data delay, the permanent magnet motor end will use the actual control input signal obtained by decryption of the previous iteration as the actual control input signal of the current iteration, thereby ensuring that the actual control input signal input to the permanent magnet motor each time has high accuracy. The formula is expressed as follows:
[0123]
[0124] In the formula, Dec(*) represents the homomorphic decryption function, represents the i-th classification of the actual control input signal at the k+1th iteration n, γ k+1 (n) represents the receiving network transmission status at the k+1th iteration n, S -1 (c,d) (*) represents the inverse mapping function, and c and d represent quantization parameters.
[0125] In this embodiment, when the network transmission is successful, the permanent magnet motor end uses the device E2 with homomorphic decryption and inverse mapping mechanism to decrypt the encrypted calculation control input signal. The specific decryption steps include:
[0126] For the ciphertext M, the decryption formula is:
[0127] Dec(M)=((M (p-1)(q-1) modK 2 )-1) / K(p-1)(q-1)modK
[0128] In the formula, p and q are prime numbers selected during encryption, and K represents the public key.
[0129] Then perform inverse mapping on the decrypted signal:
[0130]
[0131] Where a represents the decrypted mapping value.
[0132] Therefore, the actual control input signal after decryption can be expressed as:
[0133]
[0134] In the formula, Dec(*) represents the homomorphic decryption function, represents the i-th classification of the actual control input signal at the k+1th iteration n, γ k+1 (n) represents the receiving network transmission status at the k+1th iteration n, S -1 (c,d) (*) represents the inverse mapping function, and c and d represent quantization parameters.
[0135] The decrypted actual control input signal is a discrete control input signal. Before being input into the permanent magnet motor, it needs to be converted into a continuous control input signal and input into the permanent magnet motor to obtain the latest actual output sequence. The permanent magnet motor end will judge whether the convergence condition is met based on the tracking error between the discretized latest actual output sequence and the discretized expected output sequence. The tracking error here refers to the difference between the expected output sequence and the actual output sequence. The convergence condition means that the tracking error is less than the preset error threshold.
[0136] When convergence conditions are met, the actual control input signal corresponding to the actual output sequence is the optimal control input signal for the permanent magnet motor. In other words, under this optimal control input signal, the actual output sequence of the permanent magnet motor approximates the desired output sequence. If convergence conditions are not met, the next iteration is performed until convergence conditions are met.
[0137] This embodiment provides an iterative learning control method for a permanent magnet motor network. By utilizing an iterative learning control algorithm that considers network transmission status, the present invention enables direct learning and optimization of encrypted signals, avoiding the security risks of plaintext transmission, ensuring comprehensive data privacy protection, and overcoming the impact of network transmission data loss or delay on the accuracy of control signals, thereby achieving high-precision control of the permanent magnet motor. Simultaneously, the method, combined with a quantitative encryption algorithm, reduces computational complexity and improves the convergence efficiency of iterative learning. The control method provided by the present invention effectively improves computational efficiency while protecting the privacy of transmitted data, enabling efficient real-time control of the permanent magnet motor.
[0138] See also Figure 3 Based on the same inventive concept, a second embodiment of the present invention proposes an iterative learning control system for a permanent magnet motor network, wherein the permanent magnet motor network includes a permanent magnet motor end and a controller end, including:
[0139] A homomorphic encryption module 10 is applied to the permanent magnet motor end, and is used to obtain an actual output sequence corresponding to an actual control input signal of the permanent magnet motor, homomorphically encrypt the actual control input signal and the actual output sequence, and send the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end;
[0140] an iterative learning module 20, applied to the controller end, for calculating the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor end, and the encrypted expected output sequence from the external platform using an iterative learning law, to obtain an encrypted calculation control input signal, and sending the encrypted calculation control input signal to the permanent magnet motor end;
[0141] A homomorphic decryption module 30 is applied to the permanent magnet motor end, and is used to decrypt the received encrypted calculation control input signal, and input the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence;
[0142] a motor control module 40, applied to the permanent magnet motor end, for calculating a tracking error based on the updated actual output sequence and the expected output sequence, and determining whether the tracking error has reached a convergence condition; if so, using the updated actual control input signal as the optimal control input signal to control the permanent magnet motor;
[0143] If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
[0144] The technical features and effects of the iterative learning control system for a permanent magnet motor network proposed in the embodiments of the present invention are the same as those of the method proposed in the embodiments of the present invention and are not further described here. Each module in the iterative learning control system for a permanent magnet motor network described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the modules described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in the computer device in software form, so that the processor can call and execute the corresponding operations of each of the modules described above.
[0145] In addition, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0146] See also Figure 4 , an internal structure diagram of a computer device in one embodiment, the computer device can specifically be a terminal or a server. The computer device includes a processor, a memory, a network interface, a display and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it realizes an iterative learning control method for a permanent magnet motor network. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0147] It can be understood by those skilled in the art that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have the same component arrangement.
[0148] In addition, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when the computer program is executed by a processor.
[0149] In summary, an iterative learning control method, system, device and medium for a permanent magnet motor network proposed in an embodiment of the present invention include the following steps: the permanent magnet motor end obtains the actual control input signal and the corresponding actual output sequence of the permanent magnet motor, homomorphically encrypts the actual control input signal and the actual output sequence, and sends the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end; the controller end calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor end and the encrypted expected output sequence from the external platform through an iterative learning law to obtain an encrypted calculation control input signal, and sends the encrypted calculation control input signal to the permanent magnet motor. end; the permanent magnet motor end decrypts the received encrypted calculation control input signal and inputs the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence; the permanent magnet motor end calculates the tracking error based on the updated actual output sequence and the expected output sequence, and determines whether the tracking error reaches the convergence condition. If so, the updated actual control input signal is used as the optimal control input signal to control the permanent magnet motor; if not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until the convergence condition is reached. The present invention uses an iterative learning control algorithm that takes into account the network transmission state. In the scenario where random data loss exists in the transmission network, it can maintain high control accuracy, and by directly running the encrypted signal, it reduces the computing efficiency, avoids the security risks of plaintext transmission, ensures comprehensive data privacy protection, and achieves a balance between random packet loss, privacy protection and computing efficiency, thereby ensuring efficient real-time control of the permanent magnet motor.
[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts of each embodiment can be directly referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. It should be noted that the various technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above-described embodiments merely represent several preferred implementations of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art could make several improvements and substitutions without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be based on the scope of protection of the claims.
Claims
1. An iterative learning control method for a permanent magnet motor network, characterized in that: The permanent magnet motor network includes a permanent magnet motor end and a controller end, and the method includes: The permanent magnet motor end obtains the actual control input signal and the corresponding actual output sequence of the permanent magnet motor, performs homomorphic encryption on the actual control input signal and the actual output sequence, and sends the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end; The controller side calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor side, and the encrypted expected output sequence from the external platform through an iterative learning law to obtain an encrypted calculation control input signal, and sends the encrypted calculation control input signal to the permanent magnet motor side; The permanent magnet motor end decrypts the received encrypted calculation control input signal, and inputs the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence; The permanent magnet motor end calculates a tracking error based on the updated actual output sequence and the expected output sequence, and determines whether the tracking error reaches a convergence condition. If so, the updated actual control input signal is used as the optimal control input signal to control the permanent magnet motor; If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
2. The iterative learning control method for a permanent magnet motor network according to claim 1, characterized in that: The step of homomorphically encrypting the actual control input signal and the actual output sequence comprises: Using the actual control input signal and the actual output sequence as signals to be encrypted; quantizing the signal to be encrypted using a quantization function to obtain a quantized value of the signal to be encrypted; Mapping the quantized value of the signal to be encrypted using a mapping function to obtain a mapped value of the signal to be encrypted; The mapping value of the signal to be encrypted is homomorphically encrypted using a homomorphic encryption function to obtain an encrypted actual control input signal and an encrypted actual output sequence.
3. The iterative learning control method for a permanent magnet motor network according to claim 1, characterized in that: The following formula is used to express the encryption of the actual control input signal, the encryption of the actual output sequence, and the encryption of the expected output sequence: In the formula, Enc(*) represents the homomorphic encryption function, r represents the random number, c and d represent the quantization parameters, S (c,d) (*) indicates the mapping function, represents the i-th component of the actual control input signal at the k-th iteration n time, y d,j (n) represents the jth component of the expected output sequence at time n, Represents the jth component of the actual output sequence quantization value at the kth iteration n time, represents the jth component of the actual output sequence encrypted at the kth iteration n time, represents the jth component of the expected output sequence encrypted at time n, It represents the i-th component of the actual control input signal encrypted at time n in the k-th iteration.
4. The iterative learning control method for a permanent magnet motor network according to claim 2, characterized in that: The controller side calculates the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor side and the encrypted expected output sequence from the external platform through an iterative learning law to obtain the encrypted calculated control input signal, which includes: A mapping function is used to map the control gain parameters of the iterative learning law to obtain a mapping value of the control gain parameters; Determining an encrypted control input signal based on a transmission state of a sending network, the encrypted actual control input signal, and an encrypted calculated control input signal of a previous iteration; The encrypted calculation control input signal of the current iteration is calculated according to the transmission state of the sending network, the control gain parameter mapping value, the encrypted control input signal, the encrypted actual output sequence and the encrypted expected output sequence.
5. The iterative learning control method for a permanent magnet motor network according to claim 4, characterized in that: The iterative learning law is expressed by the following formula: Where w represents the signal dimension, represents the jth component of the actual output sequence encrypted at the kth iteration n+1, represents the jth component of the expected output sequence encrypted at the kth iteration n+1, represents the i-th component of the encrypted control input signal at time n of the k-th iteration, represents the i-th component of the encrypted calculation control input signal at the k-th iteration n time, represents the i-th component of the actual control input signal encrypted at time n of the k-th iteration, represents the sending network transmission status at the k+1th iteration n, K represents the encryption public key, L i,j represents the ijth component of the control gain parameter, c and d both represent quantization parameters, S (c,d) (*) indicates the mapping function, Represents the ijth component of the control gain parameter mapping value.
6. The iterative learning control method for a permanent magnet motor network according to claim 5, characterized in that: The constraints of the iterative learning law are expressed in the following formula: ||I-LCB|| ∞ <1 Where I represents the identity matrix, L represents the control gain parameter, and C and B are system parameters.
7. The iterative learning control method for a permanent magnet motor network according to claim 1, characterized in that: Before the step of decrypting the received encrypted calculation control input signal at the permanent magnet motor end, the method further includes: The permanent magnet motor end determines the receiving network transmission status. If the transmission is successful, the received encrypted calculation control input signal is decrypted. Otherwise, the actual control input signal of the previous iteration is used as the actual control input signal of the current iteration.
8. An iterative learning control system for a permanent magnet motor network, characterized in that: The permanent magnet motor network includes a permanent magnet motor end and a controller end, and the system includes: A homomorphic encryption module is applied to the permanent magnet motor end, and is used to obtain an actual output sequence corresponding to an actual control input signal of the permanent magnet motor, homomorphically encrypt the actual control input signal and the actual output sequence, and send the obtained encrypted actual control input signal and encrypted actual output sequence to the controller end; an iterative learning module, applied to the controller end, for calculating the encrypted actual control input signal and the encrypted actual output sequence from the permanent magnet motor end and the encrypted expected output sequence from the external platform using an iterative learning law to obtain an encrypted calculation control input signal, and sending the encrypted calculation control input signal to the permanent magnet motor end; A homomorphic decryption module is applied to the permanent magnet motor end, and is used to decrypt the received encrypted calculation control input signal, and input the obtained calculation control input signal as an updated actual control input signal into the permanent magnet motor to obtain an updated actual output sequence; a motor control module, applied to the permanent magnet motor end, for calculating a tracking error based on the updated actual output sequence and the expected output sequence, and determining whether the tracking error has reached a convergence condition; if so, using the updated actual control input signal as the optimal control input signal to control the permanent magnet motor; If not, the updated actual control input signal and the updated actual output sequence are homomorphically encrypted and sent to the controller end, so that the controller end performs iterative learning until a convergence condition is reached.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.