Motor control methods, devices, computer equipment, readable storage media and program products
By inputting excitation signals to the linear motor, updating the mathematical model, and optimizing the control parameters, the problem that the control effect of the stator follower linear motor depends on debugging experience is solved, achieving higher response speed and positioning accuracy, and improving the control performance of the air-bearing platform.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MAXWELL TECH (ZHUHAI) CO LTD
- Filing Date
- 2024-12-16
- Publication Date
- 2026-06-30
AI Technical Summary
In the existing technology, the control effect of stator follower linear motors depends on the experience of the commissioning engineer, which makes it difficult to adjust to the optimal level, resulting in poor response speed, positioning accuracy and steady-state error.
By inputting an excitation signal to the linear motor, updating the mathematical model, and optimizing the control parameters of the proportional-integral-derivative controller based on an intelligent optimization algorithm, the control parameters are iteratively adjusted using a particle swarm optimization algorithm until the preset evaluation conditions are met, thus achieving optimal control.
This significantly reduces the reliance on the parameter tuning experience of commissioning engineers, improves the response speed and positioning accuracy of the stator follower linear motor, reduces steady-state error, and enhances the control accuracy of the air-bearing platform.
Smart Images

Figure CN119743065B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of air-float platform drive technology, and in particular to a motor control method, device, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] An air-floating platform is a device that utilizes the principle of gas static pressure to achieve stable floating and high-precision positioning. It is widely used in precision manufacturing, semiconductor processing, and optical instruments. The stator follower linear motor can serve as the driving component of the air-floating platform, and its performance directly affects the platform's motion accuracy and stability.
[0003] In related technologies, the stator in a stator-follower linear motor is limited by damping on both sides to shorten its settling time. However, core performance indicators such as response speed, positioning accuracy, and steady-state error are still mainly determined by the control algorithm. However, in the process of controlling a stator-follower linear motor using a Proportional-Integral-Differentiary (PID) control algorithm, the adjustment of control parameters relies heavily on the experience of the commissioning engineer. Even repeated trial and error may not yield optimal results, leading to poor control performance of the stator-follower linear motor. Summary of the Invention
[0004] Therefore, it is necessary to provide a motor control method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the control effect of the stator follower linear motor in an air-floating platform, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a motor control method, including:
[0006] An excitation signal is input to the linear motor, and the mathematical model of the linear motor is updated based on the excitation signal and the response position data of the mover in the linear motor.
[0007] The target position data of the mover is input to the proportional-integral-derivative (PID) controller, and the first control signal output by the PID controller is input to the mathematical model to obtain simulated position data. The output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback. The control parameters of the PID controller are determined based on an intelligent optimization algorithm.
[0008] When the simulated position data meets the preset evaluation conditions, the deviation data between the target position data and the actual position data of the mover is obtained, the deviation data is input to the proportional-integral-derivative controller, and the linear motor is controlled based on the second control signal output by the proportional-integral-derivative controller.
[0009] In one embodiment, after inputting the target position data of the mover to the proportional-integral-derivative controller to obtain the simulated position data output by the mathematical model, the process includes:
[0010] If the simulated position data does not meet the preset evaluation conditions, the control parameters of the proportional-integral-derivative controller are updated based on the particle swarm optimization algorithm.
[0011] In one embodiment, updating the control parameters of the proportional-integral-derivative controller based on the particle swarm optimization algorithm includes:
[0012] Iteratively update the position and velocity of multiple particles in the swarm; each of the multiple particles is associated with a set of parameters.
[0013] In each iteration, the fitness of each particle is calculated, and the individual optimal solution of each particle and the global optimal solution of the population in the target search space are updated based on the fitness, until a preset termination condition is met.
[0014] The control parameters of the proportional-integral-derivative controller are updated based on the global optimal solution.
[0015] In one embodiment, updating the mathematical model of the linear motor based on the excitation signal and the response position data of the mover in the linear motor includes:
[0016] The response position data of the mover in the linear motor are collected according to a preset sampling period;
[0017] The difference equation model of the linear motor is updated based on the excitation signal and the response position data.
[0018] In one embodiment, updating the difference equation model of the linear motor based on the excitation signal and the response position data includes:
[0019] Obtain the initial difference equation model for the linear motor; the initial difference equation model includes parameters to be identified;
[0020] Based on the excitation signal and the response position data, the parameters to be identified in the initial difference equation model are updated using the least squares method to obtain the difference equation model of the linear motor.
[0021] In one embodiment, the evaluation criteria include a weighted sum of multiple evaluation index values, which include at least one or more of overshoot, follow-up error, and settling time.
[0022] Secondly, this application also provides a motor control device, comprising:
[0023] The mathematical model update module is used to input an excitation signal to the linear motor and update the mathematical model of the linear motor based on the excitation signal and the response position data of the mover in the linear motor.
[0024] The dynamic response simulation module is used to input the target position data of the mover to the proportional-integral-derivative (PID) controller, and input the first control signal output by the PID controller to the mathematical model to obtain simulated position data; the output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback, and the control parameters of the PID controller are determined based on an intelligent optimization algorithm;
[0025] The control module is used to acquire the deviation data between the target position data and the actual position data of the mover when the simulated position data meets the preset evaluation conditions, input the deviation data to the proportional-integral-derivative controller, and control the linear motor based on the second control signal output by the proportional-integral-derivative controller.
[0026] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the above-mentioned embodiments.
[0027] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the preceding claims.
[0028] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above claims.
[0029] The aforementioned motor control method, device, computer equipment, computer-readable storage medium, and computer program product, by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and its response, and then using the updated mathematical model and a proportional-integral-derivative (PID) controller that optimizes control parameters through an intelligent optimization algorithm, can simulate the linear motor control system under the current operating conditions. By controlling the linear motor based on the current PID controller when the simulation output meets preset evaluation conditions, it is possible to achieve control based on the optimal control parameters under the current operating conditions. This significantly reduces the reliance on the parameter tuning experience of the commissioning engineer and the adjustment time, improves the response speed and positioning accuracy of the stator follower linear motor, reduces steady-state errors, and thus improves the control accuracy of the air-bearing platform. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating a motor control method in one embodiment;
[0032] Figure 2 This is a block diagram of a linear motor control system in one embodiment;
[0033] Figure 3 This is a flowchart illustrating the motor control method in another embodiment;
[0034] Figure 4 This is a flowchart illustrating the steps of updating the control parameters of a proportional-integral-derivative controller based on a particle swarm optimization algorithm in one embodiment.
[0035] Figure 5 This is a flowchart illustrating the steps of updating the difference equation model of a linear motor based on excitation signals and response position data in one embodiment.
[0036] Figure 6 This is a flowchart illustrating the process of determining the optimal PID control parameters under the current operating conditions in one embodiment.
[0037] Figure 7 This is a flowchart illustrating step B2 in one embodiment;
[0038] Figure 8 This is a structural block diagram of the motor control device in one embodiment;
[0039] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0041] In one embodiment, such as Figure 1As shown, a motor control method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0042] Step S102: Input an excitation signal to the linear motor, and update the mathematical model of the linear motor based on the excitation signal and the response position data of the mover in the linear motor.
[0043] The mover's response position data represents its response to the excitation signal input to the linear motor. The mathematical model of the linear motor includes its input and output. For example, a frequency sweep function module within the servo custom algorithm module of the CK3M motion control card (Power PMAC (Programmable Multi-Axis Controller) series) can be used to input a frequency sweep excitation to the linear motor, ensuring that the frequency of the frequency sweep excitation covers the operating frequency of the linear motor. Simultaneously, the response position data output by the linear motor is collected, and the mathematical model of the linear motor is updated based on the excitation signal and the response position data. Here, the mathematical model of the linear motor may include a transfer function. For example, the order and structure of the transfer function can be pre-evaluated based on the dynamic analysis of the linear motor. The transfer function of the linear motor may include a first expression:
[0044] ;
[0045] in, Let S be the transfer function, and S be a complex variable in the Laplace transform domain. , , , , These are the model parameters. It is understandable that a linear motor can be represented using a second-order transfer function.
[0046] In one possible implementation, the current loop of the linear motor can be controlled using PI (Proportional-Integral). Therefore, a current loop can be added to the first expression above to obtain the second expression:
[0047] ;
[0048] in, The transfer function of the system after adding the current loop. and These are the proportional gain and integral gain, respectively.
[0049] It should be noted that under different operating conditions (e.g., different operating conditions of the equipment itself such as load, stroke position, motor trajectory, etc., or different environmental conditions such as the presence of vibration interference), the response to the same excitation signal input to the linear motor is different. Consequently, after updating the mathematical model of the linear motor based on the excitation signal and response position data, the model parameters are different.
[0050] Step S104: The target position data of the mover is input to the proportional-integral-derivative (PID) controller, and the first control signal output by the PID controller is input to the mathematical model to obtain the simulated position data. The output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback. The control parameters of the PID controller are determined based on the intelligent optimization algorithm.
[0051] For example, after updating the mathematical model of the linear motor based on the excitation signal and response position data, the control parameters of the proportional-integral-derivative (PID) controller can be optimized offline using an intelligent optimization algorithm to obtain a set of control parameters. Then, after updating the PID controller based on this set of control parameters, simulation position data is generated based on the updated PID controller and the updated mathematical model. The intelligent optimization algorithm can include, but is not limited to, particle swarm optimization (PSO) and genetic algorithms. In one possible implementation, a positional PID or incremental PID controller can be added to the mathematical model to obtain the mathematical model of the linear motor control system, which is then used to generate the simulation position data.
[0052] Step S106: If the simulated position data meets the preset evaluation conditions, obtain the deviation data between the target position data and the actual position data of the mover, input the deviation data to the proportional-integral-derivative controller, and control the linear motor based on the second control signal output by the proportional-integral-derivative controller.
[0053] For example, the preset evaluation conditions can be determined based on process requirements. For instance, preset evaluation conditions may include position accuracy requirements, response time requirements, steady-state performance requirements, etc. Simulated position data meeting the preset evaluation conditions can be used to characterize the current proportional-integral-derivative (PID) controller's control parameters as the optimal PID control parameters under the current operating conditions. In this case, the target position data of the mover can be input to the PID controller, and the actual position data of the mover can be superimposed on the PID controller's input in the form of negative feedback. Then, the linear motor is controlled based on the second control signal output by the PID controller. Here, the second control signal can be a current signal. Please refer to [reference needed]. Figure 2 , Figure 2 This is a block diagram of a linear motor control system in one embodiment. Wherein, For the actual position data of the mover, For the actual position data of the mover, This refers to the deviation between the target location data and the actual location data. This is the second control signal output by the PID controller.
[0054] The aforementioned motor control method, by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and its response, and then using the updated mathematical model and a proportional-integral-derivative (PID) controller with optimized control parameters through an intelligent optimization algorithm, can simulate the linear motor control system under the current operating conditions. By controlling the linear motor based on the current PID controller when the simulation output meets preset evaluation conditions, it can achieve control based on the optimal control parameters under the current operating conditions. This significantly reduces the reliance on the parameter tuning experience of the commissioning engineer and the adjustment time, improves the response speed and positioning accuracy of the stator follower linear motor, reduces steady-state errors, and thus improves the control accuracy of the air-bearing platform.
[0055] In one exemplary embodiment, such as Figure 3 As shown, the above-mentioned motor control method may further include:
[0056] Step S107: If the simulation position data does not meet the preset evaluation conditions, update the control parameters of the proportional-integral-derivative controller based on the particle swarm optimization algorithm.
[0057] Among them, the Particle Swarm Optimization (PSO) algorithm is swarm-based. PSO treats each individual in the swarm as a volumeless particle moving at a certain velocity within the search space. Initially, particles in the swarm have random positions and velocities. During multiple iterations, individuals in the swarm are moved to better regions based on their fitness to the environment. In one possible implementation, the preset evaluation criteria may include an objective function value, and the particle fitness can be calculated based on the objective function.
[0058] For example, the swarm size can be initialized to 200, and each particle in the swarm can be associated with a parameter set. The control parameters of the proportional-integral-derivative (PID) controller are updated based on the particle swarm optimization algorithm, and simulation position data is generated based on the updated PID controller and mathematical model. If the simulation position data does not meet the preset evaluation conditions, the control parameters of the PID controller are updated again based on the particle swarm optimization algorithm, and simulation position data is generated again based on the updated PID controller and mathematical model, until the simulation position data meets the preset evaluation conditions. This enables iterative adjustment of the PID control parameters.
[0059] Furthermore, such as Figure 4As shown, the steps for updating the control parameters of the proportional-integral-derivative controller based on the particle swarm optimization algorithm may include:
[0060] Step A1: Iteratively update the position and velocity of multiple particles in the swarm; each particle is associated with a set of parameters.
[0061] Step A2: In each iteration, calculate the fitness of each particle, and update the individual optimal solution of each particle and the global optimal solution of the group in the target search space based on the fitness, until the preset termination condition is met.
[0062] Step A3: Update the control parameters of the proportional-integral-derivative controller based on the global optimal solution.
[0063] For example, the positions and velocities of multiple particles in the swarm can be initialized; the fitness of each particle can be evaluated; the fitness can be compared with the fitness of the historical best position, and if better, it can be taken as the current best position; the fitness can be compared with the fitness of the best position in the swarm, and if better, the best position can be updated; the velocity and position of each particle can be updated according to the velocity update formula and the position update formula; it can be determined whether the termination condition is met (e.g., reaching the maximum number of iterations or meeting a predetermined minimum fitness threshold, i.e., the objective function value); if the condition is met, the process ends and the optimal solution is output; if the condition is not met, the step of evaluating the fitness of each particle is executed again.
[0064] The particle velocity update formula may include:
[0065] ;
[0066] in, , Let be the velocities of the particles in generation t+1 and generation t; , , where are learning factors, representing the weights of the particle learning from its own historical best position and global best position, respectively; , A random number between [0,1] is used to increase the randomness of the search; This indicates the particle's best position in its own history; This indicates the globally optimal position.
[0067] The particle velocity update formula may include:
[0068] ;
[0069] in, , Let t be the position of the particle in generation t+1 and generation t.
[0070] In this embodiment, when the simulation output does not meet the preset evaluation conditions, the proportional-integral-derivative controller is optimized again based on the particle swarm optimization algorithm until the preset evaluation conditions are met before outputting a signal to control the linear motor, thus ensuring the response performance of the linear motor.
[0071] In one exemplary embodiment, such as Figure 5 As shown, the steps for updating the difference equation model of the linear motor based on the excitation signal and response position data may include:
[0072] Step B1: Collect the response position data of the mover in the linear motor according to the preset sampling period.
[0073] Step B2: Update the differential equation model of the linear motor based on the excitation signal and response position data.
[0074] For example, the second expression described above can be discretized using a bilinear transform that does not cause a phase shift. The bilinear transform can be implemented based on a third expression, which may include:
[0075] ;
[0076] Where S is a complex variable in the Laplace transform domain, T is the sampling period, and Z is a complex variable in the Z-transform domain. Substituting the third expression into the second expression yields the fourth expression:
[0077] ;
[0078] in, This represents the output of the linear motor at the nth sampling point. , , , These represent the inputs of the linear motor at the current and three past sampling points, respectively. , , , , , These are the model parameters. Furthermore, by substituting the excitation signal and response position data into the fourth expression above, the model parameters of the difference equation model of the linear motor can be determined, resulting in the updated difference equation model.
[0079] Understandably, when using a difference equation model to represent a linear motor, since the model parameters are determined in real time, the fourth expression mentioned above can be obtained directly without the need for the derivation and parameter definition of the first, second, and third expressions mentioned above.
[0080] Furthermore, a discretized positional PID controller can be added to the difference equation model to obtain the mathematical model of the linear motor control system. The positional PID controller can be implemented based on the fifth expression, which may include:
[0081] ;
[0082] in, The control quantity output by the PID controller in the kth iteration; , , These are the control coefficients for the proportional, integral, and derivative components of the PID controller, respectively. , These are the k-th and (k-1)-th errors of the linear motor control system (the difference between the command and the output).
[0083] In one possible implementation, please refer to Figure 6 , Figure 6 This is a flowchart illustrating the process of determining the optimal PID control parameters under the current operating conditions in one embodiment.
[0084] Optionally, such as Figure 7 As shown, step B2 above may include:
[0085] Step B21: Obtain the initial difference equation model for the linear motor; the initial difference equation model contains the parameters to be identified.
[0086] Step B22: Based on the excitation signal and response position data, the parameters to be identified in the initial difference equation model are updated using the least squares method to obtain the difference equation model of the linear motor.
[0087] For example, the least squares method can be implemented based on a sixth expression, which may include:
[0088] ;
[0089] in, , which is the obtained model parameter matrix; The input data matrix; Output the data matrix.
[0090] In this embodiment, the linear motor is represented using difference equations, which facilitates programming implementation. Furthermore, by employing the least squares method to identify model parameters, the consumption of computational resources can be reduced while ensuring the reliability of the difference equation model.
[0091] In one possible implementation, the above evaluation conditions include a weighted sum of multiple evaluation index values, which include at least one or more of overshoot, follow-up error, and settling time.
[0092] For example, the evaluation criteria may include an objective function, which may be implemented based on the seventh expression:
[0093] ;
[0094] in, The objective function value, This is the overshoot weighting coefficient. The weighting coefficients are for the sum of following errors. To adjust the time weighting coefficient, For overshoot, To track error, To adjust the timing, the weights of the coefficients in the objective function can be adjusted according to process requirements. For example, if a smaller overshoot is desired, the overshoot weight coefficient can be increased.
[0095] In summary, the above-described motor control method, by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and its response, and then using the updated mathematical model and a proportional-integral-derivative (PID) controller with optimized control parameters through an intelligent optimization algorithm, can simulate the linear motor control system under the current operating conditions. By controlling the linear motor based on the current PID controller when the simulation output meets preset evaluation conditions, it is possible to achieve control based on the optimal control parameters under the current operating conditions. This significantly reduces the reliance on the parameter tuning experience of the commissioning engineer and the adjustment time, improves the response speed and positioning accuracy of the stator follower linear motor, reduces steady-state errors, and thus improves the control accuracy of the air-bearing platform.
[0096] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0097] Based on the same inventive concept, this application also provides a motor control device for implementing the motor control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more motor control device embodiments provided below can be found in the limitations of the motor control method described above, and will not be repeated here.
[0098] In one exemplary embodiment, such as Figure 8 As shown, a motor control device 300 is provided, including: a mathematical model update module 301, a dynamic response simulation module 302, and a control module 303, wherein:
[0099] The mathematical model update module 301 is used to input an excitation signal to the linear motor and update the mathematical model of the linear motor based on the excitation signal and the response position data of the mover in the linear motor.
[0100] The dynamic response simulation module 302 is used to input the target position data of the mover to the proportional-integral-derivative (PID) controller, and input the first control signal output by the PID controller to the mathematical model to obtain the simulated position data. The output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback. The control parameters of the PID controller are determined based on an intelligent optimization algorithm.
[0101] The control module 303 is used to acquire the deviation data between the target position data and the actual position data of the mover when the simulated position data meets the preset evaluation conditions, input the deviation data to the proportional-integral-derivative controller, and control the linear motor based on the second control signal output by the proportional-integral-derivative controller.
[0102] In one exemplary embodiment, the motor control device 300 further includes:
[0103] The control parameter optimization module is used to update the control parameters of the proportional-integral-derivative controller based on the particle swarm optimization algorithm when the simulation position data does not meet the preset evaluation conditions.
[0104] In an exemplary embodiment, the parameter optimization module described above is further configured to:
[0105] Iteratively update the position and velocity of multiple particles in the swarm; each particle is associated with a set of parameters.
[0106] In each iteration, the fitness of each particle is calculated, and the individual optimal solution of each particle and the global optimal solution of the swarm in the target search space are updated based on the fitness, until the preset termination condition is met.
[0107] The control parameters of the proportional-integral-derivative controller are updated based on the global optimal solution.
[0108] In an exemplary embodiment, the mathematical model update module 301 described above includes:
[0109] The data acquisition submodule is used to acquire the response position data of the mover in the linear motor according to a preset sampling period.
[0110] The model update submodule is used to update the difference equation model of the linear motor based on the excitation signal and response position data.
[0111] In one exemplary embodiment, the above-described model update submodule includes:
[0112] The initial model acquisition unit is used to acquire the initial difference equation model for the linear motor; the initial difference equation model contains parameters to be identified.
[0113] The model parameter update unit is used to update the parameters to be identified in the initial difference equation model based on the excitation signal and response position data using the least squares method, so as to obtain the difference equation model of the linear motor.
[0114] In an exemplary embodiment, the evaluation criteria described above include a weighted sum of multiple evaluation index values, which include at least one or more of overshoot, follow-up error, and settling time.
[0115] Each module in the aforementioned motor control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0116] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements a motor control method.
[0117] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0118] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0119] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0120] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0121] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0122] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the 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 application.
[0123] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A motor control method, characterized in that, The method includes: An excitation signal is input to the linear motor, and the response position data of the mover in the linear motor is collected according to a preset sampling period; Based on the excitation signal and the response position data, the difference equation model of the linear motor is updated to obtain the mathematical model of the linear motor under the current operating condition. The target position data of the mover is input to the proportional-integral-derivative (PID) controller, and the first control signal output by the PID controller is input to the mathematical model to obtain simulated position data. The output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback. The control parameters of the PID controller are determined based on an intelligent optimization algorithm. When the simulated position data meets the preset evaluation conditions, the deviation data between the target position data and the actual position data of the mover is obtained, the deviation data is input to the proportional-integral-derivative controller, and the linear motor is controlled based on the second control signal output by the proportional-integral-derivative controller.
2. The method according to claim 1, characterized in that, After inputting the target position data of the mover into the proportional-integral-derivative controller to obtain the simulated position data output by the mathematical model, the process includes: If the simulated position data does not meet the preset evaluation conditions, the control parameters of the proportional-integral-derivative controller are updated based on the particle swarm optimization algorithm.
3. The method according to claim 2, characterized in that, The updating of the control parameters of the proportional-integral-derivative controller based on the particle swarm optimization algorithm includes: Iteratively update the position and velocity of multiple particles in the swarm; each of the multiple particles is associated with a set of parameters. In each iteration, the fitness of each particle is calculated, and the individual optimal solution of each particle and the global optimal solution of the population in the target search space are updated based on the fitness, until a preset termination condition is met. The control parameters of the proportional-integral-derivative controller are updated based on the global optimal solution.
4. The method according to claim 1, characterized in that, The step of updating the difference equation model of the linear motor based on the excitation signal and the response position data includes: Obtain an initial difference equation model for the linear motor; the initial difference equation model includes parameters to be identified; Based on the excitation signal and the response position data, the parameters to be identified in the initial difference equation model are updated using the least squares method to obtain the difference equation model of the linear motor.
5. The method according to claim 1, characterized in that, The evaluation criteria include a weighted sum of multiple evaluation index values, and the multiple evaluation index values include at least one of overshoot, following error, and settling time.
6. A motor control device, characterized in that, The device includes: The mathematical model update module is used to input excitation signals to the linear motor and collect the response position data of the mover in the linear motor according to a preset sampling period; The mathematical model update module is also used to update the difference equation model of the linear motor based on the excitation signal and the response position data, so as to obtain the mathematical model of the linear motor under the current working condition. The dynamic response simulation module is used to input the target position data of the mover to the proportional-integral-derivative (PID) controller, and input the first control signal output by the PID controller to the mathematical model to obtain simulated position data; the output of the mathematical model is used to superimpose the input of the PID controller in the form of negative feedback, and the control parameters of the PID controller are determined based on an intelligent optimization algorithm; The control module is used to acquire the deviation data between the target position data and the actual position data of the mover when the simulated position data meets the preset evaluation conditions, input the deviation data to the proportional-integral-derivative controller, and control the linear motor based on the second control signal output by the proportional-integral-derivative controller.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.