Motor control method and device, computer equipment, readable storage medium and program product
By using a combination of sliding mode control algorithm and PID control in the stator follow-up linear motor, the reaction force and control accuracy of the stator on the mover are solved, and higher response performance and steady-state control accuracy are achieved.
Patent Information
- Application Number
- CN202411849183.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The high-frequency tiny displacement movement generated by the stator follow-up linear motor during the response process produces a reaction force on the mover, resulting in low control accuracy, especially when using the PID control algorithm.
The motor is controlled in the dynamic stage by using a sliding mode control algorithm, and the first control signal is output through the sliding mode controller to reduce the reaction force of the stator on the mover, and switch to PID control when the error data tends to stabilize to improve the steady-state control accuracy.
The response performance and control accuracy of the stator follow-up linear motor are improved, the robustness of the system is enhanced, the influence of nonlinear dampers is reduced, and the vibration caused by sliding mode control is avoided.
Smart Images

Figure CN119727505A_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] The stator in the stator follower linear motor is limited by damping on both sides, which can shorten the settling time of the linear motor under the same control parameters compared with the stator fixed method. However, during the response process of the stator follower linear motor, the high-frequency and small displacement movement generated by the stator will exert a reaction force on the mover. The currently commonly used proportional integral differential (PID) control algorithm has poor control effect, which in turn affects the overall control accuracy of the air floating platform. 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] Obtaining error data between target position data and actual position data of a mover in the linear motor at the last moment; dampers are provided on both sides of the stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the movement of the mover;
[0007] Inputting the error data at the previous moment into the sliding mode controller, and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment;
[0008] Calculating the error data between the target position data and the actual position data of the mover at the current moment;
[0009] When the maximum value of the error data in the historical time period is less than a preset threshold, the error data at the current moment 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.
[0010] In one embodiment, after calculating the error data between the target position data and the actual position data of the mover at the current moment, the method further comprises:
[0011] When the maximum value of the error data in the historical time period is greater than or equal to a preset threshold, the error data at the current moment is input into the sliding mode controller, and the linear motor is controlled based on a first control signal output by the sliding mode controller.
[0012] In one embodiment, before inputting the error data at the previous moment into the sliding mode controller, and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment, the method includes:
[0013] Based on the power reaching law and the exponential reaching law, the control law of the sliding mode controller is determined.
[0014] In one embodiment, when the maximum value of the error data in the historical time period is less than a preset threshold, the error data at the current moment is input into a proportional-integral-differential controller, and the linear motor is controlled based on a second control signal output by the proportional-integral-differential controller, which includes:
[0015] The limiting link is connected between the output end of the proportional-integral-differential controller and the input end of the integral link in the proportional-integral-differential controller; the limiting link is used to limit the output of the proportional-integral-differential controller and then introduce it into the input end of the integral link.
[0016] In one embodiment, after calculating the error data between the target position data and the actual position data of the mover at the current moment, the method further comprises:
[0017] The error data at the current moment is added to a determination array of a preset length to obtain the error data within a historical time period; the determination array stores data in a first-in-first-out manner.
[0018] In one embodiment, before adding the error data at the current moment to the determination array of a preset length to obtain the error data in the historical time period, the method includes:
[0019] The determination array is initialized so that at an initial moment, the data in the determination array are all greater than a preset threshold.
[0020] In a second aspect, the present application further provides a motor control device, comprising:
[0021] An acquisition module is used to acquire error data between target position data and actual position data of a mover in a linear motor at a previous moment; dampers are provided on both sides of a stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the mover;
[0022] A first control module, used for inputting the error data at the previous moment into the sliding mode controller, and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment;
[0023] A calculation module, used to calculate the error data between the target position data and the actual position data of the mover at the current moment;
[0024] The second control module is used to input the error data at the current moment into the proportional-integral-differential controller when the maximum value of the error data in the historical time period is less than a preset threshold, and control the linear motor based on a second control signal output by the proportional-integral-differential controller.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] The motor control method, device, computer equipment, computer-readable storage medium and computer program product mentioned above can realize easy adjustment of control parameters by first adopting a sliding mode control algorithm with stronger nonlinear control capability for control, and can reduce the influence of the reaction force generated by the stator on the mover and the force of the nonlinear damper in the stator follower motor, thereby improving the robustness of the control system, so that the output can be adjusted quickly and accurately in the dynamic stage; by switching to PID control with a shorter response time when the error data tends to be stable, it can improve the stability and accuracy of the output in the steady-state stage and avoid the vibration caused by the sliding mode control. Therefore, the overall response performance of the DC motor is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] 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.
[0030] Figure 1 is a flow chart of a motor control method in one embodiment;
[0031] Figure 2 is a schematic diagram of a state space of a DC motor control system in one embodiment;
[0032] Figure 3 is a flow chart of a motor control method according to another embodiment;
[0033] Figure 4 is a schematic block diagram of a motor control system in one embodiment;
[0034] Figure 5 A schematic flow chart of a motor control method in another embodiment;
[0035] Figure 6 is a schematic block diagram of a position PID in one embodiment;
[0036] Figure 7 is a flow chart of a motor control method in yet another embodiment;
[0037] Figure 8 is a structural block diagram of a motor control device in one embodiment;
[0038] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0039] 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.
[0040] In the related art, PID control algorithm is mainly used to control linear motors. However, PID controller is a linear controller, and the control accuracy for nonlinear systems is not high. In the process of the stator follower linear motor driving the air floating platform, the stator can follow the high-frequency and small displacement movement generated by the mover. Under the reaction force generated by the movement of the stator on the mover and the force of the nonlinear damper, the control ability of the PID controller is insufficient, resulting in poor response performance of the stator follower linear motor.
[0041] In one embodiment, Figure 1 As 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, obtaining the error data between the target position data and the actual position data of the mover in the linear motor at the last moment; dampers are arranged on both sides of the stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the mover.
[0043] Step S104: input the error data at the previous moment into the sliding mode controller, and control the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment.
[0044] For example, the target position data of the mover in the linear motor can be input into the sliding mode controller at the initial moment; the linear motor can be controlled based on the output of the sliding mode controller; and the output of the linear motor can be superimposed on the input of the sliding mode controller as negative feedback. Since the sliding mode control algorithm (SMC) has strong control capabilities for nonlinear systems, control parameters are easy to adjust, and overshoot is not easy to occur, the use of the sliding mode control algorithm in the rising stage of the system response can improve the control speed and anti-interference performance.
[0045] In a possible implementation, since the friction force in the air-floating platform can be ignored, the DC motor system can be simplified to a first expression, which may include:
[0046] ;
[0047] Where m is the equivalent mass of the mover and the load, x is the actual position of the mover, and u is the SMC control quantity. u can include the current.
[0048] Furthermore, since the first expression is a second-order system and is a position loop control, the sliding surface can be designed using the position error and the speed error as state quantities. The sliding surface can be designed as a second expression, and the second expression can include:
[0049] ;
[0050] Among them, c is the sliding mode state coefficient, s is the sliding surface, and e is the desired position x of the mover. d The difference with the actual position x of the mover.
[0051] Furthermore, a third expression may be obtained by derivation of the sliding surface, and the third expression may include:
[0052] ;
[0053] For example, see Figure 2 , Figure 2 Schematic diagram of the state space of a DC motor control system in one embodiment.
[0054] Step S106, calculating the error data between the target position data and the actual position data of the mover at the current moment.
[0055] Step S108, when the maximum value of the error data in the historical time period is less than the preset threshold, the error data at the current moment is input into the proportional integral differential controller, and the linear motor is controlled based on the second control signal output by the proportional integral differential controller.
[0056] For example, the maximum value of the error data in the historical time period is less than a preset threshold value, which can be used to indicate the entry into the jitter interval of the sliding mode control. The error data in the historical time period includes the error data at the current moment, and the error data at the current moment is the difference between the target position data of the mover at the current moment and the actual position data of the mover at the current moment.
[0057] Since the sliding mode control algorithm has chattering that cannot be eliminated, when the system response approaches the steady-state value (at this time, the effect of the stator movement on the mover can be ignored), switching to the PID control algorithm can improve the control speed and accuracy. In a possible implementation, the proportional integral differential controller can be designed as the fourth expression, which can include:
[0058] ;
[0059] in, is the kth PID output control quantity; , , They are the control coefficients of the proportional link, integral link, and differential link in the PID controller respectively; , They are the k-th and k-1-th errors of the DC motor control system respectively.
[0060] In the above motor control method, by first adopting a sliding mode control algorithm with stronger nonlinear control capability for control, it is possible to facilitate adjustment of control parameters, and to reduce the reaction force generated by the stator on the mover in the stator follower motor and the influence of the force of the nonlinear damper, thereby improving the robustness of the control system, so that the output can be adjusted quickly and accurately in the dynamic stage; by switching to PID control with a shorter response time when the error data tends to be stable, it is possible to improve the stability and accuracy of the output in the steady-state stage and avoid the vibration caused by the sliding mode control. Therefore, the overall response performance of the DC motor is improved.
[0061] In an exemplary embodiment, Figure 3 As shown, the motor control method may further include:
[0062] Step S109, when the maximum value of the error data in the historical time period is greater than or equal to the preset threshold, the error data at the current moment is input into the sliding mode controller, and the linear motor is controlled based on the first control signal output by the sliding mode controller.
[0063] For example, please refer to Figure 4 , Figure 4 It is a schematic block diagram of a motor control system in one embodiment. An algorithm switching judgment function can be used to control a DC motor controlled by the output of a sliding mode controller / PID controller. The algorithm switching judgment function can be used to output a first control signal output by a sliding mode controller when the maximum value of the error data in a historical time period is greater than or equal to a preset threshold value; and to output a second control signal output by a PID controller when the error data in a historical time period is less than a preset threshold value. Optionally, the preset threshold value can be adjusted based on the observed jitter interval to ensure a short response time. Optionally, during the execution of the algorithm switching judgment function, the output of the integral link in the PID controller can be assigned a value of 0 to prevent the output of the PID controller from being large during the switching algorithm.
[0064] In this embodiment, by using a sliding mode controller to perform control when the error fluctuation is large, that is, the rise time of the system response, it is possible to adjust to the target position as quickly as possible and reduce the rise time.
[0065] In an exemplary embodiment, an exponential and power double reaching law sliding mode variable structure control algorithm including nonlinear terms can be designed. Figure 5 As shown, the motor control method may further include:
[0066] Step S1011, determining the control law of the sliding mode controller based on the power reaching law and the exponential reaching law.
[0067] For example, the power reaching law is obtained by adjusting The value can achieve that when the system state is far away from the sliding mode s, it approaches the sliding mode at a higher speed; when the system state approaches the sliding mode s, it is smaller, and the control gain is smaller. Therefore, the vibration can be reduced. Furthermore, the exponential approaching law can achieve that during the approaching process, the approaching speed gradually decreases from large to zero, which can shorten the approaching time. Optionally, since the exponential approach cannot guarantee arrival within a finite time, a constant speed approaching term can be added.
[0068] In a possible implementation, the exponential and power double approaching law can be designed as a fifth expression, which may include:
[0069] ;
[0070] in, is the approach speed coefficient, ; is a symbolic function; is the exponential approach coefficient, ; is the power approximation coefficient, ; is the power coefficient, ;
[0071] Further, based on the first expression, the second expression, the third expression and the fourth expression, the control law of the sliding mode controller can be designed as a sixth expression, and the sixth expression can include:
[0072] ;
[0073] in, is the output of the sliding mode controller.
[0074] In this embodiment, by adopting the exponential and power double reaching laws to dynamically adjust the output during the control process, it is possible to better adapt to complex and changeable working environments and ensure reliable operation of the system under various working conditions.
[0075] In an exemplary embodiment, in order to prevent the error integral accumulation from being too large, causing the response to enter the steady-state error setting window, the integral link in the PID controller can be anti-saturated. Please continue to refer to Figure 5 , the motor control method may further include:
[0076] Step S1012, connecting the limiting link between the output end of the proportional-integral-differential controller and the input end of the integral link in the proportional-integral-differential controller; the limiting link is used to limit the output of the proportional-integral-differential controller and then introduce it into the input end of the integral link.
[0077] Exemplarily, the integral step may be designed as a seventh expression, which may include:
[0078] ;
[0079] in, is the input value of the kth integral term, is the k-th error of the DC motor control system, is the integral anti-saturation coefficient, is the k-1th output of the PID controller, is the limit amplitude.
[0080] For further information, please refer to Figure 6 , Figure 6 : is a schematic block diagram of a position PID in an embodiment. To prevent high-frequency interference from causing differential explosion, a low-pass filter can be added to the differential link. The low-pass filter can be designed as the eighth expression, which can include:
[0081] ;
[0082] in, is the output value of the kth differential link; is the filter coefficient, .
[0083] In this embodiment, the maximum value of the PID controller output is effectively limited by the limit link, which prevents the accumulation of errors from causing the integral amount to be too large, and avoids unnecessary steady-state errors.
[0084] In an exemplary embodiment, Figure 7 As shown, the motor control method may further include:
[0085] Step S1072, adding the error data at the current moment to a determination array of a preset length to obtain the error data within a historical time period; the determination array stores data in a first-in-first-out manner.
[0086] It is understandable that the historical time period may include errors of multiple servo cycles. For example, a set of decision arrays A with a length of L may be defined to receive the error of each servo cycle in a head-in-tail-out manner and define the window interval coefficients At this time, the algorithm switching judgment function for controlling the output of the sliding mode controller / PID controller to control the DC motor can be designed as a ninth expression, which may include:
[0087] ;
[0088] in, The output of the algorithm switching judgment function, is the output of the sliding mode controller, is the output of the PID controller, is the maximum value function.
[0089] For further information, please refer to Figure 7 , the motor control method may further include:
[0090] Step S1071 , initializing the determination array so that at the initial moment the data in the determination array are all greater than a preset threshold.
[0091] In one possible implementation, the initialization value of the data in the determination array can be much larger than Optionally, the length of the determination array can be adjusted according to the size of the servo cycle and the step. For example, when the servo cycle increases and the step increases, the length of the determination array can be increased.
[0092] In this embodiment, by introducing a determination array to record the error data in the historical time period, the error change trend can be effectively monitored and evaluated to avoid control instability caused by instantaneous error fluctuations. Furthermore, by setting a larger initial value when initializing the determination array, it can ensure that the control system automatically selects the sliding mode control algorithm during the startup phase, ensuring rapid response and effective control in various operating environments.
[0093] In summary, in the above motor control method, by first adopting a sliding mode control algorithm with stronger nonlinear control capability for control, it is possible to facilitate adjustment of control parameters, and to reduce the reaction force of the stator on the mover in the stator follower motor and the influence of the force of the nonlinear damper, thereby improving the robustness of the control system, so that the output can be adjusted quickly and accurately in the dynamic stage; by switching to PID control with a shorter response time when the error data tends to be stable, it is possible to improve the stability and accuracy of the output in the steady-state stage and avoid the vibration caused by the sliding mode control. Therefore, the overall response performance of the DC motor is improved.
[0094] 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.
[0095] 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.
[0096] In an exemplary embodiment, Figure 8 As shown, a motor control device 300 is provided, comprising: an acquisition module 301, a first control module 302, a calculation module 303 and a second control module 304, wherein:
[0097] The acquisition module 301 is used to obtain the error data between the target position data and the actual position data of the mover in the linear motor at the last moment; dampers are arranged on both sides of the stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the mover.
[0098] The first control module 302 is used to input the error data of the previous moment into the sliding mode controller, and control the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment.
[0099] The calculation module 303 is used to calculate the error data between the target position data and the actual position data of the mover at the current moment.
[0100] The second control module 304 is used to input the error data at the current moment into the proportional integral differential controller when the maximum value of the error data in the historical time period is less than a preset threshold, and control the linear motor based on the second control signal output by the proportional integral differential controller.
[0101] In an exemplary embodiment, the first control module 302 is further configured to:
[0102] When the maximum value of the error data in the historical time period is greater than or equal to the preset threshold, the error data at the current moment is input into the sliding mode controller, and the linear motor is controlled based on the first control signal output by the sliding mode controller.
[0103] In an exemplary embodiment, the motor control device 300 further includes:
[0104] The first initialization module is used to determine the control law of the sliding mode controller based on the power reaching law and the exponential reaching law.
[0105] In an exemplary embodiment, the motor control device 300 further includes:
[0106] The second initialization module is used to connect the limiting link between the output end of the proportional-integral-differential controller and the input end of the integral link in the proportional-integral-differential controller; the limiting link is used to introduce the output of the proportional-integral-differential controller into the input end of the integral link after limiting the output.
[0107] In an exemplary embodiment, the motor control device 300 further includes:
[0108] The storage module is used to add the error data at the current moment to a determination array of a preset length to obtain the error data within a historical time period; the determination array stores data in a first-in-first-out manner.
[0109] In an exemplary embodiment, the motor control device 300 further includes:
[0110] The third initialization module is used to initialize the determination array so that at the initial moment, the data in the determination array are all greater than a preset threshold.
[0111] 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.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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 method embodiments are implemented.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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: Obtaining error data between target position data and actual position data of a mover in the linear motor at the last moment; dampers are provided on both sides of the stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the movement of the mover; Inputting the error data at the previous moment into the sliding mode controller, and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment; Calculating the error data between the target position data and the actual position data of the mover at the current moment; When the maximum value of the error data in the historical time period is less than a preset threshold, the error data at the current moment 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 calculating the error data between the target position data and the actual position data of the mover at the current moment, the method further comprises: When the maximum value of the error data in the historical time period is greater than or equal to a preset threshold, the error data at the current moment is input into the sliding mode controller, and the linear motor is controlled based on a first control signal output by the sliding mode controller.
3. The method according to claim 1, characterized in that The step of inputting the error data at the previous moment into the sliding mode controller and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment comprises: Based on the power reaching law and the exponential reaching law, the control law of the sliding mode controller is determined.
4. The method according to claim 1, characterized in that: When the maximum value of the error data in the historical time period is less than a preset threshold, the error data at the current moment is input into a proportional-integral-differential controller, and the linear motor is controlled based on a second control signal output by the proportional-integral-differential controller, which includes: The limiting link is connected between the output end of the proportional-integral-differential controller and the input end of the integral link in the proportional-integral-differential controller; the limiting link is used to limit the output of the proportional-integral-differential controller and then introduce it into the input end of the integral link.
5. The method according to claim 1, characterized in that After calculating the error data between the target position data and the actual position data of the mover at the current moment, the method further comprises: The error data at the current moment is added to a determination array of a preset length to obtain the error data within a historical time period; the determination array stores data in a first-in-first-out manner.
6. The method according to claim 5, characterized in that The error data at the current moment is added to the determination array of the preset length to obtain the error data in the historical time period, which includes: The determination array is initialized so that at an initial moment, the data in the determination array are all greater than a preset threshold.
7. A motor control device, characterized in that: The device comprises: An acquisition module is used to acquire error data between target position data and actual position data of a mover in a linear motor at a previous moment; dampers are provided on both sides of a stator in the linear motor, and the dampers are used to perform damping and limiting when the stator follows the mover; A first control module, used for inputting the error data at the previous moment into the sliding mode controller, and controlling the linear motor based on the first control signal output by the sliding mode controller to obtain the actual position data of the mover at the current moment; A calculation module, used to calculate the error data between the target position data and the actual position data of the mover at the current moment; The second control module is used to input the error data at the current moment into the proportional-integral-differential controller when the maximum value of the error data in the historical time period is less than a preset threshold, 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
Control Device And Control Method
CN106873358A
Control method and system for propulsion motor of semi-submerged ship dynamic positioning system
CN108768232A
Multi-degree-of-freedom hydraulic mechanical arm real-time control system and method
CN114800517A