Linear motor control method based on parameter identification and storage medium
By using the least squares algorithm and gradient descent feedforward adaptive algorithm to update the inertia and damping parameters of the linear motor in real time, the control accuracy and stability problems caused by dynamic disturbances in inertia and damping are solved, and high-precision and stable linear motor control is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUZHI TECHNOLOGY (ZHUHAI) CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-01
AI Technical Summary
In existing linear motor control methods, the inertia and damping are deflected due to dynamic disturbances, causing the feedforward gain to fail. Under dynamic disturbances, the tracking error increases significantly, affecting control accuracy and stability.
The least squares algorithm is used to sense changes in inertia and damping coefficient in real time and update feedforward control parameters in real time. By using the least squares recursive formula and gradient descent feedforward adaptive algorithm, the inertia and damping coefficient are accurately identified. The total control quantity is synthesized by combining feedforward and feedback control quantities to achieve parameter drift compensation under dynamic disturbances.
It improves the control accuracy and stability of linear motors, avoids the disconnect between feedforward parameters and actual needs, ensures the effectiveness of feedforward gain, forms a dual guarantee of advance compensation and real-time correction, and weakens the impact of parameter drift on control accuracy.
Smart Images

Figure CN121966376A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control technology, and in particular to a linear motor control method and storage medium based on parameter identification. Background Technology
[0002] In the field of ultra-precision motion control, suspension guidance systems based on the principle of gas lubrication have become the core motion carriers for high-precision equipment such as high-end lithography wafer stages and spacecraft inertial component testing platforms, thanks to their nanometer-level motion resolution, near-zero frictional damping characteristics, and excellent vibration suppression capabilities. Permanent magnet synchronous direct drive linear motors (PMSMs), as the power execution units of such systems, directly determine the positioning accuracy and trajectory tracking performance of the entire motion system through their dynamic response characteristics and servo control quality.
[0003] In existing technologies, linear motors employ a composite control architecture combining feedforward and PID feedback. The feedforward stage relies on offline calibrated fixed inertia and damping parameters to compensate for phase lag, while the PID feedback stage suppresses steady-state errors. However, in actual operation, the inertia and damping can shift due to various dynamic disturbances, leading to feedforward gain failure and a significant increase in tracking error under dynamic disturbances, thus affecting the control accuracy and stability of the linear motor. Summary of the Invention
[0004] This application provides a linear motor control method and storage medium based on parameter identification, which uses a least squares algorithm to sense changes in the inertia and damping coefficient of the linear motor in real time, updates the feedforward control parameters in real time, and compensates for the drift of inertia and damping coefficient caused by dynamic disturbances. This solves the problem of significantly increased tracking error under dynamic disturbances in the prior art, and improves the control accuracy and stability of the linear motor.
[0005] In a first aspect, this application provides a linear motor control method based on parameter identification, comprising: The feedforward parameters of the second control cycle are determined based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor. The first control cycle is the cycle preceding the second control cycle. The position error is determined based on the actual position of the linear motor and the preset reference position. The feedforward parameters of the current control cycle are determined based on the feedforward parameters of the second control cycle, the position error, the preset reference acceleration, and the reference velocity. The second control cycle is the cycle preceding the current control cycle. The feedforward control quantity of the current control cycle is determined based on the feedforward parameters of the current control cycle, the reference acceleration, and the reference velocity; the feedback control quantity of the current control cycle is determined based on the position error; and the total control quantity of the current control cycle is determined based on the feedforward control quantity and the feedback control quantity of the current control cycle. The linear motor is driven to move according to the total control quantity of the current control cycle. Secondly, this application provides a linear motor control device based on parameter identification, comprising: The first parameter determination module is configured to determine the feedforward parameters of the second control cycle based on a preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor. The first control cycle is the cycle preceding the second control cycle. The second parameter determination module is configured to determine the position error based on the actual position of the linear motor and the preset reference position, and to determine the feedforward parameter of the current control cycle according to the feedforward parameter of the second control cycle, the position error, the preset reference acceleration and reference speed, wherein the second control cycle is the previous cycle of the current control cycle; The control quantity determination module is configured to determine the feedforward control quantity of the current control cycle based on the feedforward parameters of the current control cycle, the reference acceleration, and the reference velocity; determine the feedback control quantity of the current control cycle based on the position error; and determine the total control quantity of the current control cycle based on the feedforward control quantity and the feedback control quantity of the current control cycle. The motor drive control module is configured to drive the linear motor to move according to the total control quantity of the current control cycle.
[0006] Thirdly, this application provides a linear motor control device based on parameter identification, comprising: One or more processors; A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the parameter identification-based linear motor control method as described in the first aspect.
[0007] Fourthly, this application provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the parameter identification-based linear motor control method as described in the first aspect.
[0008] In this application, a least squares recursive algorithm is used to process the feedforward parameters of the previous two control cycles, the total control quantity of the previous control cycle, and the actual motor motion parameters of the current control cycle. This allows for the reverse estimation of the true inertia and damping coefficient of the previous control cycle using historical control data and the operating state of the previous control cycle, thus accurately identifying the true inertia and damping of the previous control cycle. Based on the identified true inertia and damping coefficient of the previous control cycle, as well as the position error, reference acceleration, and reference velocity of the current control cycle, the inertia and damping coefficient of the current control cycle are predicted. This ensures that the predicted inertia and damping coefficient accurately match the current operating state, avoiding a disconnect between the feedforward parameters and actual control requirements. The feedforward control quantity is determined based on the inertia and damping coefficient of the current control cycle, combined with the reference velocity and reference acceleration. The feedback control quantity is determined based on the position error. The combined total control quantity drives the motor motion. Feedforward control can adapt to the actual inertia and damping state under the current dynamic disturbance in advance, achieving predictive compensation for parameter drift of inertia and damping, reducing the impact of parameter drift on control accuracy, avoiding compensation phase lag, and ensuring the effectiveness of feedforward gain. Feedback control can correct the remaining dynamic error after feedforward compensation, forming a dual guarantee of advance compensation and real-time correction. Feedforward compensation and feedback compensation work together to solve the problem of significantly increased tracking error under dynamic disturbance in the existing technology, improving the control accuracy and stability of the linear motor. Attached Figure Description
[0009] Figure 1 This is a flowchart of a linear motor control method based on parameter identification provided in an embodiment of this application; Figure 2 This is a flowchart of determining the feedforward parameters of the second control cycle provided in an embodiment of this application; Figure 3 This is a flowchart illustrating the determination of feedforward parameters for the current control cycle, provided in an embodiment of this application. Figure 4 This is a schematic diagram of the closed-loop control architecture of the control system provided in the embodiments of this application; Figure 5 A schematic diagram of the structure of a linear motor control device based on parameter identification provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a linear motor control device based on parameter identification provided in an embodiment of this application. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. A process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0011] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0012] In common existing implementations, linear motors employ a composite control architecture of feedforward and PID feedback. The feedforward stage relies on offline calibrated fixed inertia and damping parameters to compensate for phase lag, while the PID feedback stage suppresses steady-state error. However, in actual operation, inertia and damping can shift due to various dynamic disturbances, leading to feedforward gain failure and a significant increase in tracking error under dynamic disturbances, thus affecting the control accuracy and stability of the linear motor.
[0013] To address the aforementioned issues, this embodiment provides a linear motor control method based on parameter identification. This method uses a least squares algorithm to perceive changes in the linear motor's inertia and damping coefficient in real time, updates the feedforward control parameters in real time, compensates for drift in inertia and damping coefficient caused by dynamic disturbances, and improves the control accuracy and stability of the linear motor.
[0014] The parameter identification-based linear motor control method provided in this embodiment can be executed by a parameter identification-based linear motor control device. This device can be implemented through software and / or hardware, and can consist of two or more physical entities, or a single physical entity. For example, the feedforward adaptive linear motor control device can be an air-bearing platform for a linear motor with high-precision control, or it can be the central controller of the air-bearing platform, with the air-bearing platform controlling the linear motor through the central controller. Alternatively, the linear motor control device can also be a control system consisting of a central controller, a linear motor, and sensors for observing the motion parameters of the linear motor.
[0015] It should be noted that the linear motor in this embodiment can be a linear motor in which the stator moves with the mover, or a linear motor in which the stator is fixed.
[0016] The parameter identification-based linear motor control device is equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. The device can install at least one application program on top of this operating system. This application program can be a built-in application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the parameter identification-based linear motor control device has at least one application program capable of executing the parameter identification-based linear motor control method.
[0017] For ease of understanding, this embodiment uses the control system as the main body for implementing the parameter identification-based linear motor control method as an example.
[0018] Figure 1 A flowchart of a linear motor control method based on parameter identification, provided in an embodiment of this application, is given. (Reference) Figure 1 The parameter identification-based linear motor control method specifically includes: S110. Based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor, the feedforward parameters of the second control cycle are determined, and the first control cycle is the previous cycle of the second control cycle.
[0019] In this embodiment, the second control cycle is the previous control cycle of the current control cycle, and the first control cycle is the previous control cycle of the second control cycle. The control system controls the linear motor according to a preset control cycle. Each time a control cycle arrives, the control system executes steps S110-S140 to output a total control quantity to the linear motor. The mover of the linear motor moves linearly under the action of the total control quantity. The total control quantity output by the control system can be understood as the input voltage of the linear motor.
[0020] Optionally, the control frequency corresponding to the control cycle can be set to 16KHz. In conjunction with the EtherCAT bus for communication, the feedforward control parameters can be updated in real time, thereby improving the dynamic response speed of the system.
[0021] The actual speed is the moving speed of the linear motor actuator at the arrival of the current control cycle. It can be directly measured by a speed sensor or calculated from the position collected by position sensors such as grating rulers. The actual acceleration is the moving acceleration of the linear motor actuator at the arrival of the current control cycle. It can be directly measured by an acceleration sensor or calculated from the position collected by position sensors such as grating rulers. For example, at the arrival of the current control cycle, the control system acquires the actual position X0 collected by the position sensor, as well as the position X1 collected by the position sensor in the previous acquisition cycle and the position X2 collected by the position sensor two acquisition cycles ago. Based on the position distance between the actual position X0 and position X1 and the acquisition cycle of the position sensor, the actual speed V0 of the actuator is determined. Based on the position distance between position X1 and position X2 and the acquisition cycle of the position sensor, the speed V1 of the actuator is determined. Based on the speed difference between the actual speed V0 and speed V1 and the acquisition cycle of the position sensor, the actual acceleration a0 of the actuator is determined.
[0022] Feedforward parameters are used to calculate the feedforward control input, including the online identified moment of inertia. (kg·m²) and the online identified viscous damping coefficient The feedforward control equation is:
[0023] in, This is the reference speed for the linear motor. This is the reference acceleration for the linear motor. This is the feedforward control variable. and It can be obtained based on the reference trajectory pre-planned by the linear motor.
[0024] The dynamic model of the linear motor is as follows:
[0025] in, B is the true moment of inertia, and B is the true viscous damping coefficient. Let u be the total disturbance, and u be the ideal control variable for the linear motor. This is the reference speed for the linear motor. This is the reference acceleration for the linear motor. and It can be obtained based on the reference trajectory pre-planned by the linear motor. It can be regarded as the inertial resistance of the moving part. The inertial drag, viscous damping resistance, and total disturbance can be considered as the motion of the mover. When the ideal control quantity can counteract the inertial drag, viscous damping resistance, and total disturbance, the motor mover can achieve the expected motion. From the dynamic model and feedforward control equations, it is known that the closer the moment of inertia and viscous damping coefficient used in the feedforward control equations to the true values for calculating the online identification of the feedforward control quantity, the closer the total control quantity of the linear motor is to the ideal control quantity. The error between the total control quantity and the ideal control quantity can be characterized by the error between the actual motion trajectory and the reference trajectory. Furthermore, after outputting the total control quantity for a certain control cycle, the moment of inertia and viscous damping coefficient for that control cycle can be inferred from the motion parameters after the control quantity acts on the linear motor, achieving accurate identification of the moment of inertia and viscous damping coefficient. In this embodiment, after outputting the total control quantity of the control cycle, the motion parameters of the motor under the action of the total control quantity are monitored. The least squares recursive formula is used to accurately identify the moment of inertia and viscous damping coefficient of the control cycle, so as to accurately predict the moment of inertia and viscous damping coefficient of the next control cycle. This realizes real-time sensing and adaptive updating of the moment of inertia and viscous damping coefficient, ensuring the effectiveness of feedforward compensation.
[0026] Therefore, the online identification of the feedforward parameters for a given control cycle lags behind the control output of the corresponding control cycle. That is, after the control system outputs the control quantity for the k-th control cycle, it waits for the linear motor to move under the control quantity of the k-th control cycle. Then, when the (k+1)-th control cycle arrives, the online identification of the moment of inertia and viscous damping coefficient for the k-th control cycle is performed. The motion parameters for the (k+1)-th control cycle are the actual motion parameters collected when the (k+1)-th control cycle arrives, such as actual position, actual velocity, and actual acceleration. These motion parameters are obtained under the action of the total control quantity of the k-th control cycle and reflect the error between the total control quantity and the ideal control quantity of the k-th control cycle. The control quantity of the kth control cycle is determined based on the feedforward parameters of the (k-1)th control cycle. The motion parameters of the (k+1)th control cycle reflect the error between the total control quantity and the ideal control quantity of the kth control cycle. The moment of inertia and viscous damping coefficient of the kth control cycle can be identified online based on the feedforward parameters of the (k-1)th control cycle, the control quantity of the kth control cycle, and the motion parameters of the (k+1)th control cycle, so that the identified moment of inertia and viscous damping coefficient approximate the true moment of inertia and viscous damping coefficient.
[0027] In one embodiment, Figure 2 This is a flowchart illustrating the determination of feedforward parameters for the second control cycle, provided in an embodiment of this application. For example... Figure 2 As shown, the steps for determining the feedforward parameters of the second control cycle specifically include S1101-S1102: S1101. Based on the actual speed and acceleration of the linear motor and the covariance matrix of the first control cycle, determine the gain matrix of the second control cycle. The covariance matrix of the first control cycle is determined based on the motor position, motor speed and gain matrix of the first control cycle.
[0028] For example, for the dynamic model Discretize the equation to transform it into a difference equation form, and we get:
[0029] in, This is the total control quantity output in the second control cycle. For actual speed, For actual acceleration, This represents the positional error between the actual position and the reference position.
[0030] The above difference equation can be rearranged into a linear regression model:
[0031] in, , , , This is the noise term.
[0032] Based on the recursive principle of least squares, the above linear regression model can be transformed into:
[0033] in, This is the recursive formula for the least squares method. The formula for the gain matrix is as follows: The formula for the covariance matrix.
[0034] These are the feedforward parameters for the second control cycle. These are the feedforward parameters for the first control cycle. This is the gain matrix for the second control cycle. This represents the total control quantity for the second control cycle. = , For actual acceleration, This refers to the actual speed. This is the gain matrix for the second control cycle. The covariance matrix for the first control cycle. Forgetting factor, , For actual acceleration, This refers to the actual speed.
[0035] As shown in the above gain matrix formula, substituting the preset forgetting factor, the actual speed and acceleration of the linear motor, and the covariance matrix of the first control cycle into the preset gain matrix formula yields the gain matrix of the second control cycle. For example, assuming the second control cycle is the k-th control cycle and the first control cycle is k-1 control cycles, the actual acceleration can be collected when the k+1 control cycle is reached. and actual speed Obtain the feedforward parameters for the (k-1)th control cycle. Covariance Matrix And obtain the total control quantity for the k-th control cycle. The gain matrix for the k-th control cycle is calculated using the gain matrix formula. .
[0036] Calculate the gain matrix for the kth control cycle. Then, the gain matrix can be... Actual acceleration and actual speed and covariance matrix Substituting into the covariance matrix formula, we can calculate the covariance matrix of the feedforward parameters in the k-th control cycle. So that the covariance matrix Online identification of feedforward parameters for the next control cycle.
[0037] The covariance matrix is used to record the uncertainty of the feedforward parameters in online identification. The smaller, the better. The closer the data is to the true value, the greater the weighting of the new data in updating the feedforward parameters. If the feedforward parameter estimation from the previous control period was inaccurate (i.e., the covariance matrix is large), the larger the gain matrix, allowing for more correction with the new data. Conversely, if the feedforward parameter estimation from the previous control period was accurate (i.e., the covariance matrix is small), the smaller the gain matrix, maintaining the stability of the feedforward parameters. Furthermore, the forgetting factor can be used to handle abrupt changes in the feedforward parameters. When the error is large, the forgetting factor can be reduced to quickly forget the old feedforward parameters and update them rapidly with new data. When the error is small, the forgetting factor can be increased to maintain the stability of the feedforward parameters and avoid frequent fluctuations.
[0038] S1102. Based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor, determine the feedforward parameters of the second control cycle.
[0039] As can be seen from the above least squares recursive formula, substituting the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and acceleration of the linear motor into the preset least squares recursive formula yields the feedforward parameters of the second control cycle. For example, after calculating the gain matrix of the k-th control cycle... Then, based on the gain matrix of the kth control cycle and total control quantity The feedforward parameters of the (k-1)th control cycle and actual acceleration and actual speed The feedforward parameters for the k-th control cycle are calculated using the least squares recursive formula. .
[0040] The new feedforward parameters equal the old feedforward parameters plus a correction term, which is composed of the gain matrix and the prediction error (total control quantity). - Control quantity calculated using old feedforward parameters The decision is made based on the following: If the control quantity calculated using the old feedforward parameters is less than the actual control quantity used, it indicates that the old feedforward parameters are too small, and the feedforward parameters need to be increased; conversely, if the old feedforward parameters are too large, the feedforward parameters need to be decreased.
[0041] This embodiment calculates the parameter correction amount using the gain matrix and recursively updates the feedforward cues using the old parameters and the parameter correction amount, ensuring the smoothness of online identification of the feedforward parameters and avoiding identification bias caused by sudden changes in the preceding parameters. Furthermore, the prediction error in the correction term reflects the deviation between the old parameters and the control quantity and operating state, allowing the adjustment of the gain matrix to accurately target deviation compensation, improving the targeting of the true parameter identification, ensuring the identification results are closer to the true parameters, improving the accuracy of feedforward parameter identification, and thus reducing tracking error.
[0042] S120. Determine the position error based on the actual position of the linear motor and the preset reference position. Determine the feedforward parameters of the current control cycle based on the feedforward parameters of the second control cycle, the position error, the preset reference acceleration, and the reference velocity. The second control cycle is the cycle preceding the current control cycle.
[0043] The reference position is the expected position of the linear motor's mover at the arrival of the current control cycle. The reference speed is the expected moving speed of the linear motor's mover at the arrival of the current control cycle. The reference acceleration is the expected moving acceleration of the linear motor's mover at the arrival of the current control cycle. The reference position, reference speed, and reference acceleration can be obtained from a preset reference trajectory of the linear motor. The reference trajectory is a pre-planned movement path of the linear motor's mover throughout the entire control process, including the time, position, speed, and acceleration corresponding to multiple trajectory points. Subtracting the reference position from the actual position yields the position error.
[0044] After determining the feedforward parameters for the second control cycle, the feedforward parameters for the current control cycle can be calculated using the gradient descent feedforward adaptive algorithm. Specifically, the gradient descent feedforward adaptive algorithm constructs a gradient descent optimizer using the feedforward parameters as the optimization modifier and the tracking error as the loss function, thereby dynamically compensating for parameter drift due to inertia and damping in the feedforward control input.
[0045] The feedforward parameters include moment of inertia and viscous damping coefficient. The moment of inertia for the current control cycle can be determined based on the moment of inertia from the second control cycle, combined with position error, preset reference acceleration, and reference velocity. Similarly, the viscous damping coefficient for the current control cycle can be determined based on the viscous damping coefficient from the second control cycle, combined with position error, preset reference acceleration, and reference velocity. Specifically, Figure 3 This is a flowchart illustrating the determination of feedforward parameters for the current control cycle, provided in an embodiment of this application. For example... Figure 3 As shown, the steps for determining the feedforward parameters of the current control cycle specifically include S1201-S1202: S1201. Based on the moment of inertia of the second control cycle, the preset inertia learning rate, the position error, and the preset reference acceleration, determine the moment of inertia of the current control cycle.
[0046] S1202. Based on the viscous damping coefficient of the second control cycle, the preset damping learning rate, the position error, and the preset reference speed, determine the viscous damping coefficient of the current control cycle.
[0047] In the gradient descent feedforward adaptive algorithm, the feedforward parameter error is first defined as:
[0048] in, and For online identification of rotational inertia and viscous damping coefficient, and For the actual moment of inertia and viscous damping coefficient, For rotational inertia error, This represents the damping coefficient error.
[0049] The loss function with regularization is constructed as follows:
[0050] in, For reference position, For actual location, This represents the positional error.
[0051] Based on the definition of feedforward parameter error and the loss function, the gradient descent update formula can be derived as follows:
[0052] in, , , The moment of inertia for the second control cycle. The viscous damping coefficient for the second control cycle. The moment of inertia for the current control cycle. The viscous damping coefficient for the current control cycle. For inertia learning rate, The damped learning rate.
[0053] The reference acceleration, position error, preset inertia learning rate, and rotational inertia of the second control cycle can be substituted into the gradient descent update formula above to calculate the rotational inertia of the current control cycle. Similarly, the reference acceleration, position error, preset damping learning rate, and viscous damping coefficient of the second control cycle can be substituted into the gradient descent update formula above to calculate the viscous damping coefficient of the current control cycle.
[0054] Furthermore, based on the momentum acceleration algorithm, the above gradient descent update formula can be transformed into:
[0055] in, For the inertia update formula, This is the damping update formula. This represents the inertia error during the second control cycle. This represents the inertia error during the first control cycle. This is the momentum factor, typically set between 0.9 and 0.99. This represents the damping error during the second control cycle. This represents the damping error during the first control cycle.
[0056] As shown in the inertia update formula, substituting the preset momentum factor, preset inertia learning rate, preset reference acceleration, position error, and the inertia error of the first control cycle into the preset inertia update formula yields the inertia error of the second control cycle. The sum of the inertia error of the second control cycle and the moment of inertia is then determined as the moment of inertia of the current control cycle. For example, obtaining the inertia error of the (k-1)th cycle... Obtain reference acceleration The system obtains the preset momentum factor and inertia learning rate, and calculates the inertia error of the k-th cycle using the inertia update formula. Then, it adds the inertia error of the k-th cycle to the rotational inertia of the k-th cycle to obtain the rotational inertia of the (k+1)-th cycle.
[0057] As shown in the damping update formula, substituting the preset momentum factor, preset damping learning rate, preset reference velocity, position error, and damping error of the first control cycle into the preset damping update formula yields the damping error of the second control cycle. The sum of the damping error of the second control cycle and the viscous damping coefficient is determined as the viscous damping coefficient of the current control cycle. For example, to obtain the damping error of the (k-1)th cycle... Obtain reference speed The preset momentum factor and damping learning rate are obtained, and the damping error of the k-th cycle is calculated using the damping update formula. Then, the damping error of the k-th cycle is added to the viscous damping coefficient of the k-th cycle to obtain the viscous damping coefficient of the (k+1)-th cycle.
[0058] This embodiment introduces momentum factor control parameter update weights to improve the smoothness of feedforward parameter updates.
[0059] To prove that the feedforward control quantity and the joint feedback control quantity obtained by the above feedforward adaptive optimization algorithm can guarantee the global asymptotic stability of the system, a Lyapunov function can be constructed:
[0060] in, , .
[0061] Differentiating the Lyapunov function yields:
[0062] Substituting into the gradient descent update formula, we get:
[0063] and A value less than or equal to zero proves that the system is globally asymptotically stable.
[0064] S130. Determine the feedforward control quantity for the current control cycle based on the feedforward parameters, reference acceleration, and reference velocity. Determine the feedback control quantity for the current control cycle based on the position error. Determine the total control quantity for the current control cycle based on the feedforward control quantity and the feedback control quantity for the current control cycle.
[0065] For example, referring to the feedforward control equations described above The process for determining the feedforward control quantity is as follows: multiply the reference acceleration by the moment of inertia of the current control cycle to obtain the first product; multiply the reference velocity by the viscous damping coefficient of the current control cycle to obtain the second product; add the first product and the second product to obtain the feedforward control quantity. Alternatively, the reference velocity, reference acceleration, viscous damping coefficient of the current control cycle, and moment of inertia can be directly substituted into the above adaptive feedforward equation to calculate the feedforward control quantity.
[0066] The differential error and integral error can be determined based on the position error. Substituting the position error, differential error, and integral error into... The feedback control quantity can be calculated.
[0067] The total control quantity is obtained by adding the feedback control quantity and the feedforward control quantity.
[0068] S140: Drive the linear motor to move according to the total control quantity of the current control cycle.
[0069] For example, a corresponding voltage is input to the linear motor according to the total control quantity, so that the linear motor moves in a straight line under the action of the corresponding voltage to track the reference trajectory. When the next control cycle arrives, the control system can execute steps S110-S140 again to cyclically control the linear motor to move according to the reference trajectory until an end command is received or a preset end condition is met.
[0070] To better illustrate the cyclic control flow of the control system in this embodiment, this embodiment uses... Figure 4 The closed-loop control architecture of the control system shown is used as an example for description. Figure 4 As shown, when the current control cycle is reached, the grating ruler pushes the acquired actual position to the central controller. The central controller obtains the reference position, reference velocity, and reference acceleration through the reference trajectory, and determines the actual velocity and actual acceleration based on the actual position. The rotational inertia and viscous damping coefficient of the previous control cycle are determined using the RLS identification algorithm (least square recursive formula). The rotational inertia and viscous damping coefficient of the current control cycle are determined using the gradient optimization algorithm and the rotational inertia and viscous damping coefficient of the previous control cycle. The feedforward control quantity is determined using the feedforward control equation and the rotational inertia and viscous damping coefficient of the current control cycle. And the feedback control quantity is determined by the position error and the PID feedback equation. feedforward control quantity and feedback control quantity The total control quantity u is obtained by summing the values. The total control quantity u is then output to the linear motor. Under the action of the total control quantity u, the linear motor moves the mover in a straight line, while the grating ruler continues to collect the position of the mover.
[0071] In summary, the parameter identification-based linear motor control method provided in this application processes the feedforward parameters of the previous two control cycles, the total control quantity of the previous control cycle, and the actual motor motion parameters of the current control cycle using a least-squares recursive algorithm. This allows for the back-calculation of the true inertia and damping coefficient of the previous control cycle using historical control data and the operating state of the previous control cycle, thus accurately identifying the true inertia and damping of the previous control cycle. Based on the identified true inertia and damping coefficient of the previous control cycle, along with the position error, reference acceleration, and reference velocity of the current control cycle, the inertia and damping coefficient of the current control cycle are predicted. This ensures that the predicted inertia and damping coefficient accurately match the current operating state, avoiding a disconnect between the feedforward parameters and actual control requirements. The feedforward control quantity is determined based on the inertia and damping coefficient of the current control cycle, combined with the reference velocity and reference acceleration. The feedback control quantity is determined based on the position error. The combined total control quantity drives the motor motion. Feedforward control can adapt to the actual inertia and damping state under the current dynamic disturbance in advance, achieving predictive compensation for parameter drift of inertia and damping, reducing the impact of parameter drift on control accuracy, avoiding compensation phase lag, and ensuring the effectiveness of feedforward gain. Feedback control can correct the remaining dynamic error after feedforward compensation, forming a dual guarantee of advance compensation and real-time correction. Feedforward compensation and feedback compensation work together to solve the problem of significantly increased tracking error under dynamic disturbance in the existing technology, improving the control accuracy and stability of the linear motor.
[0072] Based on the above embodiments, Figure 5 This is a schematic diagram of a linear motor control device based on parameter identification, provided as an embodiment of this application. (Reference) Figure 5 The linear motor control device based on parameter identification provided in this embodiment specifically includes: a first parameter determination module 21, a second parameter determination module 22, a control quantity determination module 23, and a motor drive control module 24.
[0073] The first parameter determination module 21 is configured to determine the feedforward parameters of the second control cycle based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor. The first control cycle is the cycle preceding the second control cycle. The second parameter determination module 22 is configured to determine the position error based on the actual position of the linear motor and the preset reference position, and to determine the feedforward parameters of the current control cycle based on the feedforward parameters of the second control cycle, the position error, the preset reference acceleration and reference speed, wherein the second control cycle is the previous cycle of the current control cycle; The control quantity determination module 23 is configured to determine the feedforward control quantity of the current control cycle based on the feedforward parameters of the current control cycle, as well as the reference acceleration and reference velocity; determine the feedback control quantity of the current control cycle based on the position error; and determine the total control quantity of the current control cycle based on the feedforward control quantity and the feedback control quantity of the current control cycle. The motor drive control module 24 is configured to drive the linear motor to move according to the total control quantity of the current control cycle.
[0074] Based on the above embodiments, the first parameter determination module 21 includes: a gain matrix determination unit, configured to determine the gain matrix of the second control cycle based on the actual speed and actual acceleration of the linear motor and the covariance matrix of the first control cycle, wherein the covariance matrix of the first control cycle is determined based on the motor position, motor speed and gain matrix of the first control cycle; and a feedforward parameter determination unit, configured to determine the feedforward parameters of the second control cycle based on a preset least squares recursive formula, the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle and the actual speed and actual acceleration of the linear motor.
[0075] Based on the above embodiments, the gain matrix determination unit includes: a gain matrix determination subunit, configured to substitute a preset forgetting factor, the actual speed and actual acceleration of the linear motor, and the covariance matrix of the first control cycle into a preset gain matrix formula to obtain the gain matrix of the second control cycle; wherein, the gain matrix formula is:
[0076] in, This is the gain matrix for the second control cycle. The covariance matrix for the first control cycle. Forgetting factor, , For actual acceleration, This refers to the actual speed.
[0077] Based on the above embodiments, the feedforward parameter determination unit includes: a feedforward parameter determination subunit, configured to substitute the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor into a preset least squares recursive formula to obtain the feedforward parameters of the second control cycle; wherein, the least squares recursive formula is:
[0078] in, These are the feedforward parameters for the second control cycle. These are the feedforward parameters for the first control cycle. This is the gain matrix for the second control cycle. This represents the total control quantity for the second control cycle. = , For actual acceleration, This refers to the actual speed.
[0079] Based on the above embodiments, the feedforward parameters include the moment of inertia and the viscous damping coefficient; correspondingly, the second parameter determination module 22 includes: a moment of inertia determination unit, configured to determine the moment of inertia of the current control cycle based on the moment of inertia of the second control cycle, a preset inertia learning rate, position error, and a preset reference acceleration; and a damping coefficient determination unit, configured to determine the viscous damping coefficient of the current control cycle based on the viscous damping coefficient of the second control cycle, a preset damping learning rate, position error, and a preset reference velocity.
[0080] Based on the above embodiments, the moment of inertia determination unit includes: an inertia error determination subunit, configured to substitute a preset momentum factor, a preset inertia learning rate, a preset reference acceleration, a position error, and the inertia error of the first control cycle into a preset inertia update formula to obtain the inertia error of the second control cycle; and a moment of inertia determination subunit, configured to determine the sum of the inertia error of the second control cycle and the moment of inertia as the moment of inertia of the current control cycle. The inertia update formula is as follows:
[0081] This represents the inertia error during the second control cycle. This represents the inertia error during the first control cycle. Momentum factor For inertia learning rate, For positional error, For reference acceleration.
[0082] Based on the above embodiments, the damping coefficient determination unit includes: a damping error determination subunit, configured to substitute a preset momentum factor, a preset damping learning rate, a preset reference velocity, a position error, and the damping error of the first control cycle into a preset damping update formula to obtain the damping error of the second control cycle; and a damping coefficient determination subunit, configured to determine the sum of the damping error of the second control cycle and the viscous damping coefficient as the viscous damping coefficient of the current control cycle. The damping update formula is as follows:
[0083] This represents the damping error during the second control cycle. The damping error for the first control cycle. Momentum factor For damped learning rate, For positional error, For reference speed.
[0084] The linear motor control device based on parameter identification provided in this application uses a least squares recursive algorithm to process the feedforward parameters of the previous two control cycles, the total control quantity of the previous control cycle, and the actual motion parameters of the motor in the current control cycle. This allows for the reverse calculation of the true inertia and damping coefficient of the previous control cycle using historical control data and the operating state of the previous control cycle, thus accurately identifying the true inertia and damping of the previous control cycle. Based on the identified true inertia and damping coefficient of the previous control cycle, as well as the position error, reference acceleration, and reference velocity of the current control cycle, the inertia and damping coefficient of the current control cycle are predicted. This ensures that the predicted inertia and damping coefficient accurately match the current operating state, avoiding a disconnect between the feedforward parameters and actual control requirements. The feedforward control quantity is determined based on the inertia and damping coefficient of the current control cycle, combined with the reference velocity and reference acceleration. The feedback control quantity is determined based on the position error. The combined total control quantity drives the motor motion. Feedforward control can adapt to the actual inertia and damping state under the current dynamic disturbance in advance, achieving predictive compensation for parameter drift of inertia and damping, reducing the impact of parameter drift on control accuracy, avoiding compensation phase lag, and ensuring the effectiveness of feedforward gain. Feedback control can correct the remaining dynamic error after feedforward compensation, forming a dual guarantee of advance compensation and real-time correction. Feedforward compensation and feedback compensation work together to solve the problem of significantly increased tracking error under dynamic disturbance in the existing technology, improving the control accuracy and stability of the linear motor.
[0085] The parameter identification-based linear motor control device provided in this application embodiment can be used to execute the parameter identification-based linear motor control method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0086] Figure 6 This is a schematic diagram of the structure of a linear motor control device based on parameter identification provided in an embodiment of this application. (Refer to...) Figure 6The parameter-based linear motor control device includes a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 and the number of memories 32 in the parameter-based linear motor control device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the parameter-based linear motor control device can be connected via a bus or other means.
[0087] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the parameter identification-based linear motor control method in any embodiment of this application (e.g., the first parameter determination module 21, the second parameter determination module 22, the control quantity determination module 23, and the motor drive control module 24 in the parameter identification-based linear motor control device). The memory 32 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 32 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0088] The communication device 33 is used for data transmission.
[0089] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby realizing the above-mentioned linear motor control method based on parameter identification.
[0090] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.
[0091] The parameter identification-based linear motor control device provided above can be used to execute the parameter identification-based linear motor control method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0092] This application also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute a parameter identification-based linear motor control method. This parameter identification-based linear motor control method includes: determining the feedforward parameters for the second control cycle based on a least-squares recursive formula, feedforward parameters for the first control cycle, the total control quantity for the second control cycle, and the actual speed and actual acceleration of the linear motor; determining the position error based on the actual position and reference position of the linear motor; determining the feedforward parameters for the current control cycle based on the feedforward parameters of the second control cycle, the position error, the reference acceleration, and the reference speed; determining the feedforward control quantity for the current control cycle based on the feedforward parameters, the reference acceleration, and the reference speed; determining the feedback control quantity for the current control cycle based on the position error; determining the total control quantity for the current control cycle based on the feedforward control quantity and the feedback control quantity; and driving the linear motor to move according to the total control quantity for the current control cycle.
[0093] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0094] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the parameter identification-based linear motor control method described above, but can also execute related operations in the parameter identification-based linear motor control method provided in any embodiment of this application.
[0095] The parameter identification-based linear motor control device, storage medium, and parameter identification-based linear motor control equipment provided in the above embodiments can execute the parameter identification-based linear motor control method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the parameter identification-based linear motor control method provided in any embodiment of this application.
[0096] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.
Claims
1. A linear motor control method based on parameter identification, characterized in that, include: The feedforward parameters of the second control cycle are determined based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor. The first control cycle is the cycle preceding the second control cycle. The position error is determined based on the actual position of the linear motor and the preset reference position. The feedforward parameters of the current control cycle are determined based on the feedforward parameters of the second control cycle, the position error, the preset reference acceleration, and the reference velocity. The second control cycle is the cycle preceding the current control cycle. The feedforward control quantity of the current control cycle is determined based on the feedforward parameters of the current control cycle, the reference acceleration, and the reference velocity; the feedback control quantity of the current control cycle is determined based on the position error; and the total control quantity of the current control cycle is determined based on the feedforward control quantity and the feedback control quantity of the current control cycle. The linear motor is driven to move according to the total control quantity of the current control cycle.
2. The linear motor control method based on parameter identification according to claim 1, characterized in that, The determination of the feedforward parameters for the second control cycle based on the preset least squares recursive formula, the feedforward parameters for the first control cycle, the total control quantity for the second control cycle, and the actual speed and acceleration of the linear motor includes: The gain matrix of the second control cycle is determined based on the actual speed and acceleration of the linear motor and the covariance matrix of the first control cycle. The covariance matrix of the first control cycle is determined based on the motor position, motor speed and gain matrix of the first control cycle. Based on the preset least squares recursive formula, the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor, the feedforward parameters of the second control cycle are determined.
3. The linear motor control method based on parameter identification according to claim 2, characterized in that, The step of determining the gain matrix of the second control cycle based on the actual speed and acceleration of the linear motor and the covariance matrix of the first control cycle includes: Substituting the preset forgetting factor, the actual speed and acceleration of the linear motor, and the covariance matrix of the first control cycle into the preset gain matrix formula, the gain matrix of the second control cycle is obtained; wherein, the gain matrix formula is: in, This is the gain matrix for the second control cycle. The covariance matrix for the first control cycle. Forgetting factor, , For actual acceleration, This refers to the actual speed.
4. The linear motor control method based on parameter identification according to claim 2, characterized in that, The method of determining the feedforward parameters for the second control cycle based on a preset least squares recursive formula, the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor includes: Substituting the feedforward parameters of the first control cycle, the gain matrix and total control quantity of the second control cycle, and the actual speed and acceleration of the linear motor into a preset least squares recursive formula, the feedforward parameters of the second control cycle are obtained; wherein, the least squares recursive formula is: in, These are the feedforward parameters for the second control cycle. These are the feedforward parameters for the first control cycle. This is the gain matrix for the second control cycle. This represents the total control quantity for the second control cycle. = , For actual acceleration, This refers to the actual speed.
5. The linear motor control method based on parameter identification according to claim 1, characterized in that, The feedforward parameters include the moment of inertia and the viscous damping coefficient; Accordingly, determining the feedforward parameters for the current control cycle based on the feedforward parameters of the second control cycle, the position error, and the preset reference acceleration and reference velocity includes: The moment of inertia of the current control cycle is determined based on the moment of inertia of the second control cycle, the preset inertia learning rate, the position error, and the preset reference acceleration. Based on the viscous damping coefficient of the second control cycle, the preset damping learning rate, the position error, and the preset reference speed, the viscous damping coefficient of the current control cycle is determined.
6. The linear motor control method based on parameter identification according to claim 5, characterized in that, Determining the moment of inertia of the current control cycle based on the moment of inertia of the second control cycle, a preset inertia learning rate, the position error, and a preset reference acceleration includes: Substituting the preset momentum factor, preset inertia learning rate, preset reference acceleration, the position error, and the inertia error of the first control cycle into the preset inertia update formula, the inertia error of the second control cycle is obtained. The sum of the inertia error and the moment of inertia of the second control cycle is determined as the moment of inertia of the current control cycle. The inertia update formula is as follows: This represents the inertia error during the second control cycle. This represents the inertia error during the first control cycle. Momentum factor For inertia learning rate, For positional error, For reference acceleration.
7. The linear motor control method based on parameter identification according to claim 5, characterized in that, The determination of the viscous damping coefficient for the current control cycle based on the viscous damping coefficient of the second control cycle, a preset damping learning rate, the position error, and a preset reference velocity includes: Substituting the preset momentum factor, preset damping learning rate, preset reference velocity, the position error, and the damping error of the first control cycle into the preset damping update formula, the damping error of the second control cycle is obtained. The sum of the damping error and the viscous damping coefficient of the second control cycle is determined as the viscous damping coefficient of the current control cycle. The damping update formula is as follows: This represents the damping error during the second control cycle. The damping error for the first control cycle. Momentum factor For damped learning rate, For positional error, For reference speed.
8. A linear motor control device based on parameter identification, characterized in that, include: The first parameter determination module is configured to determine the feedforward parameters of the second control cycle based on a preset least squares recursive formula, the feedforward parameters of the first control cycle, the total control quantity of the second control cycle, and the actual speed and actual acceleration of the linear motor. The first control cycle is the cycle preceding the second control cycle. The second parameter determination module is configured to determine the position error based on the actual position of the linear motor and the preset reference position, and to determine the feedforward parameter of the current control cycle according to the feedforward parameter of the second control cycle, the position error, the preset reference acceleration and reference speed, wherein the second control cycle is the previous cycle of the current control cycle; The control quantity determination module is configured to determine the feedforward control quantity of the current control cycle based on the feedforward parameters of the current control cycle, the reference acceleration, and the reference velocity; determine the feedback control quantity of the current control cycle based on the position error; and determine the total control quantity of the current control cycle based on the feedforward control quantity and the feedback control quantity of the current control cycle. The motor drive control module is configured to drive the linear motor to move according to the total control quantity of the current control cycle.
9. A linear motor control device based on parameter identification, characterized in that, include: One or more processors; A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the parameter identification-based linear motor control method as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the parameter identification-based linear motor control method as described in any one of claims 1-7.