A control method, device and equipment of a linear motor and a storage medium
By using a pre-calibrated compensation table to adjust the control value in the linear motor, the problem of achieving constant force output without additional sensors is solved, simplifying the system and reducing costs.
Patent Information
- Application Number
- CN202110138428.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-01
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2041-02-01
AI Technical Summary
Existing linear motors find it difficult to achieve constant force output in the Z-axis direction without additional sensors, which increases system complexity and cost.
Through the pre-calibrated compensation table, the compensation value is calculated according to the relationship between the motor position and the boundary value, and the control value is adjusted to ensure constant force output, avoiding dependence on the force sensor.
The constant force output is achieved within the constant force range, the system structure is simplified and the cost is reduced.
Smart Images

Figure CN112968652B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor control, and in particular to a control method for a linear motor with constant force output. BACKGROUND
[0002] A linear motor is a kind of transmission device that directly converts electrical energy into linear mechanical energy without any intermediate conversion mechanism. It can be regarded as a radial section of a rotary motor and is unfolded into a plane. The linear motor directly generates linear motion without going through an intermediate conversion mechanism, greatly simplifying the structure, reducing the motion inertia, greatly improving the dynamic response performance and positioning accuracy; at the same time, it also improves the reliability, saves the cost, and makes the manufacturing and maintenance more simple. In addition, the linear motor can output a constant force, especially in a short stroke, it can output a larger force, so in some application scenarios in the precision manufacturing field, the linear motor can be integrated into the production line by using this characteristic of the linear motor.
[0003] However, at present, when the linear motor with spring is applied in the Z-axis direction, to control the motor to maintain constant force output in a stroke, a force sensor needs to be set in the system as a feedback input to feedback the current input force to the controller, and the controller adjusts the output of the driver in real time according to the feedback, so as to maintain the uniform output of the motor. Therefore, the complexity of the system is increased, and the cost is also increased, so a control method for a linear motor with constant force output without additional sensors is needed. SUMMARY
[0004] The present application provides a control method for a linear motor with constant force output, which provides a control method for a linear motor with constant force output without additional sensors, to solve the technical problem that in the conventional linear motor, a force sensor needs to be set in the system as a feedback input to feedback the current input force to the controller, thereby increasing the complexity of the system and increasing the cost.
[0005] In the first aspect of the present application, a control method for a linear motor is provided, comprising the following steps:
[0006] obtaining a preset upper boundary value, a lower boundary value and a first control value of a constant force interval;
[0007] obtaining the position of the motor, and determining whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value;
[0008] if the motor position is in the constant force interval, calculating a first difference value between the position of the motor and the upper boundary value;
[0009] According to a corresponding relationship between the first difference value and a compensation value, a corresponding compensation value is found from a compensation table;
[0010] The first control value is added to the compensation value to obtain a second control value;
[0011] The second control value is input to a motor controller.
[0012] In a possible implementation of the first aspect of the present application, before the step of obtaining the upper boundary value, the lower boundary value and the first control value of the preset constant force interval, the following steps are further included:
[0013] The upper boundary value and the lower boundary value of the constant force interval input by a user are received;
[0014] The motor is controlled to move to a position corresponding to the upper boundary value, and a calibration control value input to the motor controller at this time is recorded;
[0015] The control value input to the motor controller is gradually increased, so that the motor moves in a lower boundary direction by a preset unit distance in turn, until the motor moves to the lower boundary value;
[0016] The control value corresponding to each unit distance in the lower boundary direction of the motor is obtained;
[0017] A second difference value between each control value and the calibration control value is calculated, and the second difference value corresponds to each unit distance one by one;
[0018] The second difference value is saved in the compensation table as a compensation value corresponding to each unit distance.
[0019] In a possible implementation of the first aspect of the present application, the motor controller controls the motor in a force mode, in which the input control value corresponds to the force output by the motor.
[0020] In a possible implementation of the first aspect of the present application, the step of determining whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value includes:
[0021] It is determined whether the position of the motor exceeds the lower boundary value;
[0022] If the position of the motor does not exceed the lower boundary value, it is determined whether the position of the motor exceeds the upper boundary value;
[0023] If the position of the motor does not exceed the upper boundary value, it is determined that the position of the motor is in the constant force interval.
[0024] In a possible implementation of the first aspect of the present application, after the step of determining whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value, the method further comprises:
[0025] If the position of the motor exceeds the upper boundary value, input the first control value into the motor controller.
[0026] In a possible implementation of the first aspect of the present application, after the step of determining whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value, the method further comprises:
[0027] If the position of the motor exceeds the lower boundary value, input the first control value into the motor controller.
[0028] In the second aspect of the present application, a control device of a linear motor is provided, and the device comprises:
[0029] A preset value acquisition module is configured to acquire an upper boundary value and a lower boundary value of a preset constant force interval and a first control value.
[0030] A constant force interval determination module is configured to acquire a position of the motor and determine whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value.
[0031] A first difference calculation module is configured to calculate a first difference between the position of the motor and the upper boundary value if the position of the motor is in the constant force interval.
[0032] A compensation value searching module is configured to search for a corresponding compensation value from a compensation table according to the corresponding relationship between the first difference and the compensation value.
[0033] A second control value acquisition module is configured to add the first control value and the compensation value to obtain a second control value.
[0034] A second control value input module is configured to input the second control value into a motor controller.
[0035] In a possible implementation of the second aspect of the present application, the device further comprises:
[0036] A constant force interval input module is configured to receive the upper boundary value and the lower boundary value of the constant force interval input by a user.
[0037] A motor motion control module is configured to control the motor to move to a position corresponding to the upper boundary value and record a calibration control value input into the motor controller at this time.
[0038] a step-by-step motion control module, configured to gradually increase the control value input to the motor controller, so that the motor moves in the lower boundary direction by a preset unit distance at a time, until the motor moves to the lower boundary value;
[0039] a control value acquisition module, configured to acquire the control value corresponding to each unit distance in the lower boundary direction of the motor;
[0040] a second difference calculation module, configured to calculate a second difference between each control value and the calibration control value, the second difference corresponding to each unit distance one by one;
[0041] a compensation table setting module, configured to save the second difference as a compensation value corresponding to each unit distance in the compensation table.
[0042] In a third aspect of the present application, a linear motor is provided, comprising a motor, a motor controller, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the control method of the linear motor when executing the computer program.
[0043] In a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, wherein the computer program implements the steps of the control method of the linear motor when executed by a processor.
[0044] The linear motor control method, device, equipment and storage medium provided by the present application have the following beneficial technical effects: the input control value is compensated by a pre-calibrated compensation table to ensure that the linear motor outputs a constant force in the constant force interval, without the need to set a force sensor as a feedback input as required in a conventional linear motor, thereby reducing the complexity of the system and reducing the cost. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0046] Figure 1 is a flowchart of the control method of the linear motor in one embodiment of the present application;
[0047] Figure 2 is a flowchart of the control method of the linear motor in another embodiment of the present application;
[0048] Figure 3 is a flow chart of a control method of a linear motor in another embodiment of the present application;
[0049] Figure 4 is a flow chart of a control method of a linear motor in another embodiment of the present application;
[0050] Figure 5 is a structural schematic diagram of a control device of a linear motor in an embodiment of the present application;
[0051] Figure 6 is a schematic diagram of a linear motor device in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0053] In a specific embodiment, the present application provides a control method of a linear motor, the linear motor comprising a motor and a guide rail, the guide rail being provided with a spring, the spring playing a buffering role on the motor. As shown in Figure 1 、 Figure 3 the control method comprises the following steps:
[0054] S101: obtaining an upper boundary value, a lower boundary value and a first control value of a preset constant force interval.
[0055] The constant force interval refers to that the force output by the motor in a certain fixed interval is constant. Specifically, the constant force interval is within the elastic limit range of the spring, that is, in the constant force interval, the force applied by the motor and the elastic deformation of the spring are in a linear relationship. Within the range of the constant force interval, the motor and the spring work together to output a constant force to the object.
[0056] Further, the constant force interval includes an upper boundary value and a lower boundary value for determining the range of the constant force interval. Generally, the constant force interval is a part of the total stroke of the linear motor, for example, the stroke of the linear motor is 25 mm, the motor moves along the Z direction (a direction perpendicular to the ground), and the stroke of the constant force interval is 5-10 mm. In an example, when the stroke of the constant force interval is 5 mm, the upper boundary value of the constant force interval can be calibrated as 5 mm, and the lower boundary is 10 mm.
[0057] In one specific embodiment, the motor controller controls the motor using a force mode in which the input control value corresponds to the force output by the motor.
[0058] Specifically, the linear motor realizes force output by controlling its acceleration, i.e. F=ma, and the input first control value corresponds to the value of controlling the acceleration of the motor movement.
[0059] S102: Obtain the position of the motor, and determine whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value.
[0060] Specifically, it is determined whether the position of the motor is in the constant force interval according to the relative relationship between the current position of the motor and the upper boundary value and the lower boundary value of the constant force interval.
[0061] In one specific embodiment, step S102 specifically includes:
[0062] determining whether the motor position exceeds the lower boundary value;
[0063] If the motor position does not exceed the lower boundary value, it is determined whether the motor position exceeds the upper boundary value;
[0064] If the motor position does not exceed the upper boundary value, it is determined that the motor position is in the constant force interval.
[0065] Specifically, still using the example of the upper boundary value of the constant force interval being 5mm and the lower boundary value being 10mm, it is first detected whether the position of the motor is greater than the distance of motor origin+10mm, if not, it is further detected whether the position of the motor is less than the distance of motor origin+5mm, if not, it is indicated that the position of the motor is in the constant force interval.
[0066] In one specific embodiment, step S102 further includes:
[0067] If the motor position exceeds the upper boundary value, the first control value is input to the motor controller.
[0068] In one specific embodiment, step S102 further includes:
[0069] If the motor position exceeds the lower boundary value, the first control value is input to the motor controller.
[0070] Specifically, if the motor position exceeds the upper boundary value or the lower boundary value, it is indicated that the motor position is not in the above constant force interval, at this time the first control value can be directly input to the motor controller, which is generally used to move the motor to a specified position and does not output force externally.
[0071] S103: If the motor position is in the constant force interval, calculate a first difference between the motor position and the upper boundary value.
[0072] Here, we will still use the example of a constant force interval with an upper boundary of 5mm and a lower boundary of 10mm. In the above steps, if it is confirmed that the motor position is within the constant force interval, the first difference between the motor position and the upper boundary is calculated. Specifically, assuming the motor position is at the motor origin + 7mm, the first difference is 7mm-5mm=2mm, that is, the first difference is obtained by subtracting the upper boundary from the motor position.
[0073] S104: searching for a corresponding compensation value from a compensation table according to the correspondence between the first difference and the compensation value.
[0074] Specifically, according to the first difference obtained above, the corresponding compensation value is searched from the pre-established compensation table, and the compensation value is also the control value input to the motor controller. The compensation value is based on the distance representing the first difference, and the corresponding control value is searched in the pre-established compensation table. For example, when the first difference is 2mm, the corresponding compensation value can be found in the compensation table. The purpose of establishing the compensation table is to enable the linear motor to output a constant force within the constant force range by finding the compensation value corresponding to the first difference (i.e., the position of the motor) in the compensation table and compensating the input control value according to the compensation value. Further, in the following content of the specification, it will be explained how to establish the compensation table.
[0075] S105: Add the first control value and the compensation value to obtain a second control value.
[0076] Specifically, the first control value obtained in step S101 is added to the compensation value to obtain a second control value. As described above, the compensation value is also a control value input to the motor controller. The compensation value is found in the compensation table based on the first difference obtained in the above step and is added to the first control value to obtain the second control value.
[0077] S106: Input the second control value to the motor controller.
[0078] By inputting the second control value into the motor controller, the motor movement is controlled and a constant force is output.
[0079] In a specific embodiment, before the step of obtaining the upper boundary value, the lower boundary value and the first control value of the preset constant force interval, a compensation table is also pre-established. Figure 2 、 Figure 4 As shown, the method for establishing a compensation table includes the following steps:
[0080] S201: receiving the upper boundary value and the lower boundary value of the constant force interval input by the user.
[0081] Specifically, different linear motors are different due to their own properties, and the range of their constant force interval also needs to be defined according to the properties of their springs and guide rails. Further, after defining the constant force interval, the system receives the upper boundary value and the lower boundary value of the set constant force interval.
[0082] S202: controlling the motor to move to the position corresponding to the upper boundary value and recording the calibration control value input to the motor controller at this time.
[0083] Here, still taking the example of the upper boundary value of the constant force interval being 5mm and the lower boundary value being 10mm, first, the motor is moved to the position corresponding to the upper boundary value, i.e. the motor is moved to the position of the motor origin + 5mm, and the upper boundary is preferably the position at which the motor just receives the stress of the spring. The control value input to the motor controller at this time is recorded as the calibration control value, and the calibration control value M0 is taken as the control value corresponding to the boundary of the motor entering the constant force interval.
[0084] S203: gradually increasing the control value input to the motor controller, so that the motor moves in the direction of the lower boundary in sequence by a preset unit distance, until the motor moves to the lower boundary value.
[0085] S204: obtaining the control value corresponding to each unit distance in the direction of the lower boundary of the motor.
[0086] Specifically, in order to gradually move the motor in the direction of the lower boundary, it is necessary to gradually increase the control value M input to the motor controller. Here, in order to correspond the motor position to the control value, it is selected to record the control value corresponding to each unit distance after the motor moves by a preset unit distance. In a specific example, the unit distance is 1mm, i.e. the motor moves in the direction of the lower boundary by 1mm, and the corresponding control value is recorded once. This unit distance is only used as an example for illustration and does not constitute a limitation on the present application. In some other preferred examples, the unit distance can be set according to the properties of the motor itself and the actual use scenario, for example, in some more precise use scenarios, the unit distance can be set to 0.1mm or even smaller.
[0087] S205: calculating a second difference value of each control value and the calibration control value, the second difference value corresponding to each unit distance.
[0088] S206: saving the second difference value as the compensation value corresponding to each unit distance in the compensation table.
[0089] The second difference value Δ iare recorded in steps S203-S204 i The second difference value Δ1 is the value of M1-M0, and the corresponding motor position is the position of the motor origin +5mm+1mm. Similarly, the motor moves 1mm in the lower boundary direction, and the control value is recorded as M2. The second difference value Δ2 is the value of M2-M0, and the corresponding motor position is the position of the motor origin +5mm+2mm. This is repeated until the motor moves to the lower boundary value. In this example, since the lower boundary is 10mm, the corresponding position is the position of the motor origin +5mm+5mm. Finally, the second difference values Δ1-Δ5 are obtained. i The corresponding motor position is saved in the compensation table, and the second difference value is used as the compensation value.
[0090] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0091] In an embodiment, a linear motor control device is provided, which corresponds to the linear motor control method in the above embodiment. As shown in the figure, the linear motor control device includes a preset value acquisition module 101, a constant force interval judgment module 102, a first difference value calculation module 103, a compensation value lookup module 104, a second control value acquisition module 105, and a second control value input module 106. The functions of each module are described in detail as follows: Figure 5
[0092] The preset value acquisition module 101 is used to acquire the upper boundary value and the lower boundary value of the preset constant force interval and the first control value.
[0093] The constant force interval judgment module 102 is used to acquire the position of the motor and determine whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value.
[0094] The first difference value calculation module 103 is used to calculate the first difference value between the position of the motor and the upper boundary value if the motor position is in the constant force interval.
[0095] The compensation value lookup module 104 is used to look up the corresponding compensation value from the compensation table according to the correspondence between the first difference value and the compensation value.
[0096] The second control value obtaining module 105 is configured to add the first control value and the compensation value to obtain a second control value.
[0097] The second control value input module 106 is configured to input the second control value to the motor controller.
[0098] In one specific embodiment, the device further comprises:
[0099] The constant force interval input module is configured to receive the upper boundary value and the lower boundary value of the constant force interval input by a user.
[0100] The motor motion control module is configured to control the motor to move to a position corresponding to the upper boundary value and record a calibration control value input to the motor controller at this time.
[0101] The step motion control module is configured to gradually increase the control value input to the motor controller, so that the motor moves a preset unit distance in the lower boundary direction in sequence until the motor moves to the lower boundary value.
[0102] The control value obtaining module is configured to obtain a control value corresponding to each unit distance when the motor moves in the lower boundary direction.
[0103] The second difference calculation module is configured to calculate a second difference between each control value and the calibration control value, and the second difference corresponds to each unit distance.
[0104] The compensation table setting module is configured to save the second difference as a compensation value corresponding to each unit distance in the compensation table.
[0105] In one specific embodiment, the motor controller in the control device of the linear motor uses a force mode to control the motor, in which the input control value corresponds to the force output by the motor.
[0106] In one specific embodiment, the constant force interval judgment module 102 further comprises:
[0107] The lower boundary value judgment unit is configured to judge whether the motor position exceeds the lower boundary value.
[0108] The upper boundary value judgment unit is configured to judge whether the motor position exceeds the upper boundary value if the motor position does not exceed the lower boundary value.
[0109] The constant force interval judgment unit is configured to judge that the motor position is in the constant force interval if the motor position does not exceed the upper boundary value.
[0110] In one embodiment, the control device of the linear motor further comprises:
[0111] The first control value second input unit is configured to input the first control value to the motor controller if the motor position exceeds the lower boundary value.
[0112] In one embodiment, the control device of the linear motor further comprises:
[0113] The first control value second input unit is configured to input the first control value to the motor controller if the motor position exceeds the lower boundary value.
[0114] The "first" and "second" in the above modules / units are only used to distinguish different modules / units, and are not used to limit the priority of which module / unit is higher or other limiting meanings. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or modules does not have to be limited to the clearly listed steps or modules, but can include other steps or modules that are not clearly listed or inherent to the process, method, product or device. The division of modules in this application is only a logical division, and in actual application, there can be another division method.
[0115] The specific limitations of the control device of the linear motor can be referred to the limitations of the control method of the linear motor in the above, which will not be repeated here. Each module in the control device of the linear motor can be realized by software, hardware and their combination, in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0116] In one embodiment, as shown in Figure 6 , a linear motor device is provided, which comprises a motor controller, a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the motor controller is connected to the motor, and the motor is loaded on a guide rail with a spring. The processor executes the computer program to realize the steps of the control method of the linear motor in the above embodiments, such as Figure 2 , steps S101 to S106 and other extensions and related steps of the method. Alternatively, the processor executes the computer program to realize the functions of each module / unit of the control device of the linear motor in the above embodiments, such as Figure 5 , the functions of modules 101 to 106. To avoid repetition, they will not be repeated here.
[0117] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The processor is a control center of the computer device, and connects various parts of the computer device through various interfaces and lines.
[0118] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the computer device by running or executing the computer program and / or modules stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program required by a function.
[0119] The memory can be integrated in the processor, or can be arranged separately from the processor.
[0120] In one embodiment, a computer readable storage medium is provided, and the computer program is stored on the computer readable storage medium. The computer program is executed by the processor to realize the steps of the control method of the linear motor in the above embodiment, for example Figure 2 The steps S101 to S106 and the extension of other extensions and related steps of the method. Alternatively, the computer program is executed by the processor to realize the functions of the modules / units of the control device of the linear motor in the above embodiment, for example Figure 5 The functions of the modules 101 to 106. To avoid repetition, it will not be repeated here.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0122] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0123] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features. The modification or replacement does not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A control method of a linear motor, characterized by, The following steps are involved: Obtaining an upper boundary value, a lower boundary value, and a first control value of a preset constant force interval; Obtaining a position of the motor, and determining whether the motor is within the constant force range based on a relative positional relationship between the position of the motor and the upper boundary value and the lower boundary value; If the motor position is in the constant force interval, calculating a first difference between the motor position and the upper boundary value; searching a corresponding compensation value from a compensation table according to a correspondence between the first difference value and the compensation value; Adding the first control value and the compensation value to obtain a second control value; inputting the second control value into a motor controller; Before the step of obtaining the upper boundary value, the lower boundary value and the first control value of the preset constant force interval, the following steps are also included: receiving the upper boundary value and the lower boundary value of the constant force interval input by a user; Controlling the motor to move to a position corresponding to the upper boundary value, and recording the calibration control value input to the motor controller at this time; gradually increasing the control value input to the motor controller so that the motor moves in sequence toward the lower boundary by a preset unit distance until the motor moves to the lower boundary value; Obtaining a control value corresponding to each unit distance of the motor moving toward the lower boundary; Calculating a second difference between each of the control values and the calibrated control value, wherein the second difference corresponds one-to-one to each of the unit distances; The second difference is stored in the compensation table as a compensation value corresponding to each unit distance.
2. The control method according to claim 1, wherein: The motor controller controls the motor using a force mode, where the input control value corresponds to the force output by the motor.
3. The control method according to claim 1, characterized by, The step of determining whether the motor is within the constant force range according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value comprises: Determining whether the motor position exceeds the lower limit value; If the motor position does not exceed the lower limit value, determining whether the motor position exceeds the upper limit value; If the motor position does not exceed the upper limit value, it is determined that the motor position is within the constant force range.
4. The control method according to claim 3, characterized by, After the step of determining whether the motor is within the constant force range based on the relative positional relationship between the position of the motor and the upper boundary value and the lower boundary value, the method further includes: If the motor position exceeds the upper limit value, the first control value is input into the motor controller.
5. The control method according to claim 3, characterized by, After the step of determining whether the motor is within the constant force range based on the relative positional relationship between the position of the motor and the upper boundary value and the lower boundary value, the method further includes: If the motor position exceeds the lower limit value, the first control value is input into the motor controller.
6. A control device for a linear motor, characterized by comprising: The device comprises: A preset value acquisition module, used to obtain an upper boundary value, a lower boundary value and a first control value of a preset constant force interval; The constant force interval judgment module is configured to acquire the position of the motor and determine whether the motor is in the constant force interval according to the relative position relationship between the position of the motor and the upper boundary value and the lower boundary value. The first difference calculation module is configured to calculate a first difference between the position of the motor and the upper boundary value if the position of the motor is in the constant force interval. The compensation value lookup module is configured to look up a corresponding compensation value from a compensation table according to the corresponding relationship between the first difference and the compensation value. The second control value acquisition module is configured to add the first control value and the compensation value to obtain a second control value. The second control value input module is configured to input the second control value to the motor controller. The device further comprises: The constant force interval input module is configured to receive the upper boundary value and the lower boundary value of the constant force interval input by a user. The motor motion control module is configured to control the motor to move to the position corresponding to the upper boundary value and record the calibration control value input to the motor controller at this time. The step-by-step motion control module is configured to gradually increase the control value input to the motor controller so that the motor moves a preset unit distance in the lower boundary direction in sequence until the motor moves to the lower boundary value. The control value acquisition module is configured to acquire the control value corresponding to each unit distance in the lower boundary direction of the motor. The second difference calculation module is configured to calculate a second difference between each control value and the calibration control value, and the second difference corresponds to each unit distance in a one-to-one manner. The compensation table setting module is configured to save the second difference as a compensation value corresponding to each unit distance in the compensation table.
7. A linear motor apparatus comprising a motor, a motor controller, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the steps of the control method of the linear motor according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the steps of the control method of the linear motor according to any one of claims 1 to 5.
Citation Information
Patent Citations
Motor position disturbance force calibration method
CN103901904A