Motor control method and device, computer equipment, readable storage medium and program product
By updating the mathematical model of linear motors and optimizing control parameters, the problem that the control effect of stator follow-up linear motors depends on experience, achieving higher response speed, positioning accuracy and smaller steady-state errors, and improving the control accuracy of the air float platform.
Patent Information
- Application Number
- CN202411849173.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-16
AI Technical Summary
In the prior art, the control effect of the stator follow-up linear motor depends on the experience of the debugging engineer, and it is difficult to adjust to the optimal level, resulting in poor response speed, positioning accuracy and steady-state errors.
By inputting excitation signals to the linear motor, updating its mathematical model, and optimizing the control parameters of the proportional integral differential controller based on the intelligent optimization algorithm, the optimal control under the current operating conditions is achieved.
This greatly reduces the dependence on debugging engineers' parameter adjustment experience, improves the response speed and positioning accuracy of the stator follow-up linear motor, reduces steady-state error, and thus improves the control accuracy of the air float platform.
Smart Images

Figure CN119743065A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of air floating platform driving technology, and in particular to a motor control method, device, computer equipment, computer readable storage medium and computer program product. Background Art
[0002] The air-floating platform is a device that uses the principle of gas static pressure to achieve stable floating and high-precision positioning. It is widely used in precision manufacturing, semiconductor processing, optical instruments and other fields. The stator follower linear motor can be used as the driving component of the air-floating platform, and its performance directly affects the motion accuracy and stability of the air-floating platform.
[0003] In related technologies, the stator in the stator follower linear motor is limited by damping on both sides to shorten its settling time, but the 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 using the proportional integral differential (PID) control algorithm to control the stator follower linear motor, the adjustment of the control parameters depends on the experience of the debugging engineer, and even repeated trial and error is difficult to adjust to the optimal level, resulting in poor control of the stator follower linear motor. Summary of the invention
[0004] Based on this, 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 the air floating platform to address the above technical problems.
[0005] In a first aspect, the present application provides a motor control method, comprising:
[0006] Inputting an excitation signal to the linear motor, and updating a mathematical model of the linear motor based on the excitation signal and response position data of a mover in the linear motor;
[0007] Inputting the target position data of the mover into a proportional-integral-differential controller, and inputting the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain simulation position data; the output of the mathematical model is used to be superimposed on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on an intelligent optimization algorithm;
[0008] When the simulation position data satisfies 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 into the proportional integral differential controller, and the linear motor is controlled based on a second control signal output by the proportional integral differential controller.
[0009] In one embodiment, after inputting the target position data of the mover into the proportional integral differential controller to obtain the simulated position data output by the mathematical model, the method further comprises:
[0010] When the simulation position data does not satisfy a preset evaluation condition, the control parameters of the proportional-integral-derivative controller are updated based on a particle swarm optimization algorithm.
[0011] In one embodiment, the updating of the control parameters of the proportional integral derivative controller based on the particle swarm optimization algorithm includes:
[0012] Iteratively updating positions and velocities of a plurality of particles in a population; each particle in the plurality of particles being associated with a parameter set;
[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 group 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] Collecting the response position data of the mover in the linear motor according to a preset sampling period;
[0017] A differential equation model of the linear motor is updated based on the excitation signal and the response position data.
[0018] In one embodiment, updating the differential equation model of the linear motor based on the excitation signal and the response position data includes:
[0019] Acquire an initial differential equation model for the linear motor; the initial differential equation model includes parameters to be identified;
[0020] Based on the excitation signal and the response position data, the least square method is used to update the parameters to be identified in the initial differential equation model to obtain the differential equation model of the linear motor.
[0021] In one embodiment, the evaluation condition includes a weighted sum of multiple evaluation index values, and the multiple evaluation index values include at least one or more of overshoot, following error, and adjustment time.
[0022] In a second aspect, the present application further provides a motor control device, comprising:
[0023] A mathematical model updating module, used for inputting an excitation signal to the linear motor, and 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;
[0024] A dynamic response simulation module, used for inputting the target position data of the mover into a proportional-integral-differential controller, and inputting the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain simulation position data; the output of the mathematical model is used for superimposing on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on an intelligent optimization algorithm;
[0025] A control module is used to obtain 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 into the proportional-integral-differential controller, and control the linear motor based on a second control signal output by the proportional-integral-differential controller.
[0026] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above-described methods when executing the computer program.
[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the methods described above when executed by a processor.
[0028] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0029] The above-mentioned motor control method, device, computer equipment, computer-readable storage medium and computer program product can realize the simulation of the linear motor control system under the current working conditions by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and the response to the excitation, and then based on the updated mathematical model and the proportional-integral-differential controller that optimizes the control parameters through the intelligent optimization algorithm; by controlling the linear motor based on the current proportional-integral-differential controller when the simulation output meets the preset evaluation conditions, it can realize control based on the optimal control parameters under the current working conditions, which can greatly reduce the dependence on the debugging engineer's adjustment experience and adjustment time, improve the response speed and positioning accuracy of the stator follower linear motor, reduce the steady-state error and other response performance, and thus improve the control accuracy of the air floating platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 is a flow chart of a motor control method in one embodiment;
[0032] Figure 2 is a schematic block diagram of a linear motor control system in one embodiment;
[0033] Figure 3 is a flow chart of a motor control method according to another embodiment;
[0034] Figure 4 A schematic flow chart of 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 A flowchart of the steps of updating a differential equation model of a linear motor based on an excitation signal and response position data in one embodiment;
[0036] Figure 6 A schematic diagram of a process for determining the optimal PID control parameters under the current working conditions in an embodiment
[0037] Figure 7 is a schematic flow chart of step B2 in one embodiment;
[0038] Figure 8 is a structural block diagram of a motor control device in one embodiment;
[0039] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] In one embodiment, Figure 1As shown, a motor control method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the 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 a mathematical model of the linear motor based on the excitation signal and response position data of a mover in the linear motor.
[0043] Among them, the response position data of the mover is the response to the excitation signal input to the linear motor. The mathematical model of the linear motor includes the input and output of the linear motor. For example, the encapsulated sweep frequency function module in the servo custom algorithm module in the CK3M motion control card of the Power PMAC (Programmable Multi-Axis Controller) series can be used to input the sweep frequency excitation to the linear motor, and ensure that the frequency of the sweep frequency excitation covers the working frequency of the linear motor. At the same time, 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, is the transfer function, S is a complex variable in the Laplace transform domain, , , , , is the model parameter. It can be understood that the linear motor can be represented by a second-order transfer function.
[0046] In a possible implementation, the current loop of the linear motor can be controlled by PI (Proportional-Integral). Therefore, the current loop can be added to the first expression to obtain the second expression:
[0047] ;
[0048] in, is the transfer function of the system after adding the current loop, and are proportional gain and integral gain respectively.
[0049] It should be noted that under different working conditions (for example, the working conditions of the equipment itself such as load, stroke position, motor trajectory, or different environmental conditions such as whether there is vibration interference), the response to the same excitation signal input to the linear motor is different. Therefore, after the mathematical model of the linear motor is updated based on the excitation signal and response position data, the model parameters are different.
[0050] Step S104, input the target position data of the mover into the proportional-integral-differential controller, and input the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain simulated position data; the output of the mathematical model is used to be superimposed on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on the intelligent optimization algorithm.
[0051] Exemplarily, after updating the mathematical model of the linear motor based on the excitation signal and the response position data, the control parameters of the proportional integral differential controller can be optimized offline based on the intelligent optimization algorithm to obtain a set of control parameters. Then, after updating the proportional integral differential controller based on the set of control parameters, the simulation position data is generated based on the updated proportional integral differential controller and the updated mathematical model. Among them, the intelligent optimization algorithm may include but is not limited to a particle swarm optimization algorithm, a genetic algorithm, etc. In a possible implementation, a position PID or an incremental PID can be added to the mathematical model to obtain a mathematical model of the linear motor control system for generating simulation position data.
[0052] Step S106, when the simulation 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 differential controller, and control the linear motor based on the second control signal output by the proportional integral differential controller.
[0053] Exemplarily, the preset evaluation conditions may be determined based on process requirements. For example, the preset evaluation conditions may include position accuracy requirements, response time requirements, steady-state performance requirements, etc. The simulated position data satisfying the preset evaluation conditions can be used to characterize that the control parameters of the current proportional-integral-differential controller are the optimal PID control parameters under the current working conditions. At this time, the target position data of the mover can be input into the proportional-integral-differential controller, and the actual position data of the mover can be superimposed on the input of the proportional-integral-differential controller in the form of negative feedback, and then the linear motor is controlled based on the second control signal output by the proportional-integral-differential controller. Here, the second control signal may be a current signal. Please refer to Figure 2 , Figure 2 FIG. 1 is a block diagram of a linear motor control system in an embodiment. is the actual position data of the mover, is the actual position data of the mover, is the deviation data between the target position data and the actual position data, It is the second control signal output by the PID controller.
[0054] The above-mentioned motor control method can realize the simulation of the linear motor control system under the current working condition by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and the response to the excitation, and then based on the updated mathematical model and the proportional-integral-differential controller that optimizes the control parameters through the intelligent optimization algorithm; by controlling the linear motor based on the current proportional-integral-differential controller when the simulation output meets the preset evaluation conditions, it can realize control based on the optimal control parameters under the current working condition, which can greatly reduce the dependence on the debugging engineer's adjustment experience and adjustment time, improve the response speed and positioning accuracy of the stator follow-up linear motor, reduce the steady-state error and other response performance, and thus improve the control accuracy of the air floating platform.
[0055] In an exemplary embodiment, Figure 3 As shown, the motor control method may further include:
[0056] Step S107: when the simulation position data does not satisfy the preset evaluation conditions, the control parameters of the proportional-integral-derivative controller are updated based on the particle swarm optimization algorithm.
[0057] Among them, the particle swarm optimization algorithm is based on the group. The particle swarm optimization algorithm regards each individual in the group as a particle without volume in the search space, moving at a certain speed in the search space. In the initialized group, the particles have random positions and speeds. In the process of multiple iterations, the individuals in the group are moved to a good area according to the fitness of the environment. In a possible implementation, the preset evaluation conditions may include an objective function value, and the fitness of the particles may be calculated based on the objective function.
[0058] For example, the swarm size can be initialized to 200, and a parameter group can be associated with each particle in the swarm; the control parameters of the proportional integral differential controller are updated based on the particle swarm optimization algorithm, and the simulation position data is generated based on the updated proportional integral differential controller and the mathematical model; when the simulation position data does not meet the preset evaluation conditions, the control parameters of the proportional integral differential controller are updated again based on the particle swarm optimization algorithm, and the simulation position data is generated based on the updated proportional integral differential controller and the mathematical model, until the simulation position data meets the preset evaluation conditions. In this way, iterative adjustment of PID control parameters can be achieved.
[0059] Furthermore, if Figure 4As shown, the above-mentioned step of updating the control parameters of the proportional integral derivative controller based on the particle swarm optimization algorithm may include:
[0060] Step A1, iteratively updating the positions and velocities of multiple particles in the group; each particle in the multiple particles is associated with a parameter group.
[0061] Step A2: during each iteration, the fitness of each particle is calculated, and based on the fitness, the individual optimal solution of each particle and the global optimal solution of the group in the target search space are updated until the preset termination condition is met.
[0062] Step A3: updating the control parameters of the proportional-integral-derivative controller based on the global optimal solution.
[0063] Exemplarily, the positions and speeds of multiple particles in a group can be initialized; the fitness of each particle can be evaluated; the fitness is compared with the fitness of the historical optimal position, and the better one is used as the current optimal position; the fitness is compared with the fitness of the optimal position in the group, and the optimal position is updated if the better one is; the speed and position of each particle are updated according to the speed update formula and the position update formula; it is determined whether the termination condition is met (for example, the maximum number of iterations is reached or the predetermined minimum fitness threshold, i.e., the objective function value); if it is met, the process ends and the optimal solution is output; if it is not met, the step of evaluating the fitness of each particle is executed again.
[0064] Among them, the particle velocity update formula may include:
[0065] ;
[0066] in, , is the velocity of the particles of the t+1th and tth generations; , are learning factors, which represent the weights of the particle learning from its own historical best position and the global best position; , is a random number between [0,1], used to increase the randomness of the search; Represents the particle's own best historical position; represents the global optimal position.
[0067] The particle velocity update formula can include:
[0068] ;
[0069] in, , are the positions of the particles of the t+1th and tth generations.
[0070] In this embodiment, when the simulation output does not meet the preset evaluation conditions, the proportional-integral-differential controller is optimized again based on the particle swarm optimization algorithm until the preset evaluation conditions are met and then a signal is output to control the linear motor, thereby ensuring the response performance of the linear motor.
[0071] In an exemplary embodiment, Figure 5 As shown, the above step of updating the differential equation model of the linear motor based on the excitation signal and the response position data may include:
[0072] Step B1, collecting response position data of the mover in the linear motor according to a preset sampling period.
[0073] Step B2, updating the differential equation model of the linear motor based on the excitation signal and the response position data.
[0074] Exemplarily, the second expression may be discretized using a bilinear transformation that does not cause a phase shift. The bilinear transformation may 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 a 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, is the output of the linear motor at the nth sampling point; , , , They are the inputs of the linear motor at the current and past three sampling points respectively; , , , , , Further, by substituting the excitation signal and the response position data into the fourth expression, the model parameters of the differential equation model of the linear motor can be determined to obtain an updated differential equation model.
[0079] It can be understood that when a differential equation model is used to represent a linear motor, since the model parameters are determined in real time, the fourth expression can be directly obtained without the need to derive and define parameters of the first expression, the second expression, and the third expression.
[0080] Furthermore, a discretized position PID can be added to the differential equation model to obtain a mathematical model of the linear motor control system. The position PID can be implemented based on the fifth expression, which can include:
[0081] ;
[0082] in, is the control quantity output by the kth PID controller; , , They are the control coefficients of the proportional link, integral link, and differential link of the PID controller respectively; , They are the k-th and k-1-th errors (the difference between command and output) of the linear motor control system respectively.
[0083] In one possible implementation, see Figure 6 , Figure 6 The figure is a flow chart of determining the optimal PID control parameters under the current working conditions in one embodiment.
[0084] Alternatively, if Figure 7 As shown, the above step B2 may include:
[0085] Step B21, obtaining an initial differential equation model for the linear motor; the initial differential equation model includes parameters to be identified.
[0086] Step B22, based on the excitation signal and the response position data, the least square method is used to update the parameters to be identified in the initial differential equation model to obtain the differential equation model of the linear motor.
[0087] Exemplarily, the least square method may be implemented based on a sixth expression, which may include:
[0088] ;
[0089] in, , is the obtained model parameter matrix; is the input data matrix; Output data matrix.
[0090] In this embodiment, by using a differential equation to represent the linear motor, programming can be facilitated. Furthermore, by using the least squares method to identify model parameters, the consumption of computing resources can be reduced and the reliability of the differential equation model can be ensured.
[0091] In a possible implementation, the evaluation condition includes a weighted sum of multiple evaluation index values, and the multiple evaluation index values include at least one or more of overshoot, following error, and adjustment time.
[0092] Exemplarily, the evaluation condition may include an objective function, and the objective function may be implemented based on the seventh expression:
[0093] ;
[0094] in, is the objective function value, is the overshoot weight coefficient, is the total weight coefficient of following error, To adjust the time weight coefficient, is the overshoot, is the following error, To adjust the time. The weights of each coefficient in the objective function can be adjusted according to the process requirements. For example, if the expected overshoot is small, the overshoot weight coefficient can be increased.
[0095] In summary, the above-mentioned motor control method, by inputting excitation to the linear motor and updating the mathematical model of the linear motor based on the excitation and the response to the excitation, and then based on the updated mathematical model and the proportional-integral-differential controller that optimizes the control parameters through the intelligent optimization algorithm, can realize the simulation of the linear motor control system under the current working conditions; by controlling the linear motor based on the current proportional-integral-differential controller when the simulation output meets the preset evaluation conditions, it can realize control based on the optimal control parameters under the current working conditions, which can greatly reduce the dependence on the debugging engineer's adjustment experience and adjustment time, improve the response speed and positioning accuracy of the stator follower linear motor, reduce the steady-state error and other response performance, and thus improve the control accuracy of the air floating platform.
[0096] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a motor control device for implementing the motor control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more motor control device embodiments provided below can refer to the limitations of the motor control method above, and will not be repeated here.
[0098] In an exemplary embodiment, Figure 8 As shown, a motor control device 300 is provided, comprising: a mathematical model updating module 301, a dynamic response simulation module 302 and a control module 303, wherein:
[0099] The mathematical model updating 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 into the proportional-integral-differential controller, and input the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain the simulated position data; the output of the mathematical model is used to be superimposed on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on the intelligent optimization algorithm.
[0101] The control module 303 is used to obtain the deviation data between the target position data and the actual position data of the mover when the simulation position data meets the preset evaluation conditions, input the deviation data to the proportional integral differential controller, and control the linear motor based on the second control signal output by the proportional integral differential controller.
[0102] In an 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 differential 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 is further used to:
[0105] Iteratively updating positions and velocities of a plurality of particles in a group; each particle in the plurality of particles is associated with a parameter group;
[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 group 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 updating module 301 includes:
[0109] The data acquisition submodule is used to collect the response position data of the mover in the linear motor according to a preset sampling period.
[0110] The model updating submodule is used to update the differential equation model of the linear motor based on the excitation signal and the response position data.
[0111] In an exemplary embodiment, the model updating submodule includes:
[0112] The initial model acquisition unit is used to acquire an initial differential equation model for the linear motor; the initial differential equation model includes parameters to be identified.
[0113] The model parameter updating unit is used to update the parameters to be identified in the initial differential equation model based on the excitation signal and the response position data by using the least square method to obtain the differential equation model of the linear motor.
[0114] In an exemplary embodiment, the evaluation condition includes a weighted sum of multiple evaluation index values, and the multiple evaluation index values include at least one or more of overshoot, following error, and adjustment time.
[0115] Each module in the above motor control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0116] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a motor control method is implemented.
[0117] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0118] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0120] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0121] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A motor control method, characterized in that: The method comprises: Inputting an excitation signal to the linear motor, and updating a mathematical model of the linear motor based on the excitation signal and response position data of a mover in the linear motor; Inputting the target position data of the mover into a proportional-integral-differential controller, and inputting the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain simulation position data; the output of the mathematical model is used to be superimposed on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on an intelligent optimization algorithm; When the simulation position data satisfies 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 into the proportional integral differential controller, and the linear motor is controlled based on a second control signal output by the proportional integral differential controller.
2. The method according to claim 1, characterized in that After inputting the target position data of the mover into the proportional-integral-differential controller to obtain the simulated position data output by the mathematical model, the method further comprises: When the simulation position data does not satisfy a preset evaluation condition, the control parameters of the proportional-integral-derivative controller are updated based on a 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 comprises: Iteratively updating positions and velocities of a plurality of particles in a population; each particle in the plurality of particles being associated with a parameter set; 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 group 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 updating of the mathematical model of the linear motor based on the excitation signal and the response position data of the mover in the linear motor comprises: Collecting the response position data of the mover in the linear motor according to a preset sampling period; A differential equation model of the linear motor is updated based on the excitation signal and the response position data.
5. The method according to claim 4, characterized in that The updating of the differential equation model of the linear motor based on the excitation signal and the response position data comprises: Acquire an initial differential equation model for the linear motor; the initial differential equation model includes parameters to be identified; Based on the excitation signal and the response position data, the least square method is used to update the parameters to be identified in the initial differential equation model to obtain the differential equation model of the linear motor.
6. The method according to claim 1, characterized in that The evaluation condition includes a weighted sum of multiple evaluation index values, and the multiple evaluation index values include at least one or more of overshoot, following error, and adjustment time.
7. A motor control device, characterized in that: The device comprises: A mathematical model updating module, used for inputting an excitation signal to the linear motor, and 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; A dynamic response simulation module, used for inputting the target position data of the mover into a proportional-integral-differential controller, and inputting the first control signal output by the proportional-integral-differential controller into the mathematical model to obtain simulation position data; the output of the mathematical model is used for superimposing on the input of the proportional-integral-differential controller in the form of negative feedback, and the control parameters of the proportional-integral-differential controller are determined based on an intelligent optimization algorithm; A control module is used to obtain 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 into the proportional-integral-differential controller, and control the linear motor based on a second control signal output by the proportional-integral-differential controller.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for controlling speeds of alternating-current motors
CN103684171A
Optimization method for intelligently setting parameters of PID controller of belt conveyor based on PSO
CN113759697A
Permanent magnet synchronous motor position control method based on particle swarm fuzzy PID and depth compensation
CN117254725A
Cylinder sleeve cooling water temperature control optimization method and system, control method and controller
CN117350139A
Digital Excitation Control System Utilizing Swarm Intelligence and An Associated Method of Use
US20090198386A1