Motor rotation angle control method, device and system

By using the second-order derivative function of jerk to plan the motor rotation trajectory, the impact problem during the motor rotation process is solved, the motor can be rotated smoothly and accurately, and the current noise is reduced.

CN116208061BActive Publication Date: 2025-09-09UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310289534.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-21
Publication Date
2025-09-09
Estimated Expiration
2043-03-21

AI Technical Summary

Technical Problem

In the prior art, there is an obvious impact problem during the rotation of the motor, especially during acceleration switching, which causes the motor to run unsteadily and increase the current noise.

Method used

The second-order derivative function of jerk is used to plan the motor rotation trajectory. The target angular displacement of each angular displacement control period is configured through a piecewise step function. The integration result of the second-order derivative function of jerk is used to obtain a smooth acceleration curve to achieve smooth rotation of the motor.

Benefits of technology

The impact degree during the motor rotation process is reduced, the smoothness of the motor rotation is improved and the current noise is reduced, so that the motor can accurately stop at the target angle within the preset time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208061B_ABST
    Figure CN116208061B_ABST
Patent Text Reader

Abstract

The present application discloses a motor rotation angle control method, device and system. First, according to a preset second-order derivative function of jerkiness, the target angular displacement of each angular displacement control period is configured. Then, with the angular displacement control period as a period, the rotation angle of the target motor is periodically controlled according to each target angular displacement until the actual angular displacement of the target motor reaches the preset target angle. The second-order derivative function of jerkiness is a piecewise step function, so it can be integrated over its domain to obtain a first-order derivative function of jerkiness without a mutation point, and then integrated to obtain a smooth jerkiness curve. Integrating the smooth jerkiness curve can obtain a smooth acceleration curve. Since there is no acceleration mutation, a smoother angular displacement curve can be determined using a smooth acceleration curve compared to a piecewise step acceleration curve, thereby reducing the degree of impact during the motor rotation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motion control technology, and more specifically, to a method, device, and system for controlling the rotation angle of a motor. Background Art

[0002] In practical applications, there are numerous tasks involving controlling the motor's rotation angle. This involves controlling the motor's start, rotation, and stop processes so that the motor rotates to a preset target angle and stops. For example, in a scenario where a motor drives an elevator up and down, controlling the motor's rotation angle within a preset timeframe allows the elevator to stop at the target position at the desired time.

[0003] By planning the motor's angular displacement curve, that is, the curve that characterizes the change of the motor's rotation angle over time, the control target of each control cycle can be obtained. By controlling the motor's rotation process with each control target, the control task of the motor's rotation angle can be achieved.

[0004] According to the segmented step acceleration curve, a trapezoidal angular velocity curve can be integrated to obtain an angular displacement curve that is smoother than a linear function. However, due to the presence of acceleration mutation points in the acceleration curve, if the control target of each cycle is determined based on the angular displacement curve planned by the segmented step acceleration curve, and each control target is used to control the motor rotation angle, a significant impact will be generated during the motor rotation process, especially when the acceleration is switched. Summary of the Invention

[0005] In view of the above problems, the present application is proposed to provide a motor rotation angle control method, device and system to reduce the impact level during motor rotation and achieve the motor rotation angle control task.

[0006] The specific plan is as follows:

[0007] In a first aspect, a method for controlling a motor rotation angle is provided, the method comprising:

[0008] According to the preset second-order derivative function of jerk, the target angular displacement of each angular displacement control cycle is configured;

[0009] Performing periodic angular displacement control on the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle;

[0010] Among them, the second-order derivative function of jerkiness is a piecewise step function set according to the target angle and the preset time required for the target motor to rotate to the target angle. The domain of the second-order derivative function of jerkiness is a closed interval from 0 to the preset time. The initial angular velocity and the terminal angular velocity of the angular velocity function corresponding to the second-order derivative function of jerkiness are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle.

[0011] In a second aspect, a motor rotation angle control device is provided, the device comprising:

[0012] a target angular displacement configuration unit, configured to configure a target angular displacement for each angular displacement control period based on a preset second-order derivative function of jerk, wherein the second-order derivative function of jerk is a piecewise step function configured based on the target angle and a preset time required for the target motor to rotate to the target angle, the domain of the second-order derivative function of jerk being a closed interval from 0 to the preset time, the initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of jerk being zero, and the integral value of the angular velocity function over its domain being equal to the target angle;

[0013] The angular displacement control unit is used to periodically control the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle.

[0014] In a third aspect, a motor rotation angle control system is provided, comprising a target motor, an angle observation device, and the motor rotation angle control device connected to each other;

[0015] The motor rotation angle control device includes: a memory and a processor, wherein the memory is used to store a program, and the processor is used to execute the program to implement each step of the above-mentioned motor rotation angle control method;

[0016] The angle observation device is used to observe and output the actual angular displacement of the target motor to the motor rotation angle control device during the process in which the motor rotation angle control device performs angle control on the target motor.

[0017] By means of the above technical solution, the present application adopts a periodic control method in the process of achieving the control task of the rotation angle of the target motor, controlling the target motor to rotate according to the target angular displacement of each cycle until the actual angular displacement reaches the target angle. Specifically, the target angular displacement of each cycle is configured according to a preset second-order derivative of jerk. Since the second-order derivative of jerk is a piecewise step function with a domain of definition of a closed interval from 0 to the preset time, by integrating the second-order derivative of jerk over its domain, a first-order derivative of jerk without a mutation point can be obtained. Integrating the first-order derivative of jerk over the corresponding domain can obtain a smooth jerk curve. Integrating the smooth jerk curve can obtain a smooth acceleration curve. Since there is no acceleration mutation, a smoother angular displacement curve can be determined using the smooth acceleration curve compared to the piecewise step acceleration curve, thereby reducing the degree of impact during the motor rotation process.

[0018] In addition, the initial angular velocity and the terminal angular velocity of the angular velocity function corresponding to the second-order derivative function of the jerk are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle, so that the rotation angle of the target motor is controlled according to the target angular displacement of each angular displacement control cycle planned by the second-order derivative function of the jerk, and the motor rotation angle control task of rotating to the target angle at a preset time and stopping after rotating to the target angle can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0020] Figure 1 1 is a flow chart of a method for controlling a motor rotation angle according to an embodiment of the present application;

[0021] Figure 2 The schematic diagram of the process of configuring the target angular displacement of the angular displacement control cycle is shown as an example;

[0022] Figure 3 A schematic diagram illustrating the process of calculating the target value of angular displacement is shown;

[0023] Figure 4 An example of a function curve of the second-order derivative function of jerkiness is given;

[0024] Figure 5 This is a schematic structural diagram of a motor rotation angle control device disclosed in an embodiment of the present application;

[0025] Figure 6 1 is a schematic structural diagram of a motor rotation angle control system according to an embodiment of the present application;

[0026] Figure 7 A schematic structural diagram of a motor rotation angle control device is shown;

[0027] Figure 8 Another function curve of the second-order derivative function of jerk is shown as an example;

[0028] Figure 9 Example with Figure 8 The function curve of the first-order derivative function of jerk corresponding to the second-order derivative function of jerk in the example;

[0029] Figure 10 The jerk curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown;

[0030] Figure 11 The acceleration curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown;

[0031] Figure 12 The angular velocity curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown;

[0032] Figure 13 Angular displacement curves of each of the trapezoidal velocity curve, the trapezoidal acceleration curve, and the trapezoidal J' curve are shown. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] The present application provides a motor rotation angle control method, device and system, which can reduce the impact degree during motor rotation and achieve the task of controlling the motor rotation angle.

[0035] In the process of controlling the rotation angle of the motor, the rotation trajectory curve of the motor is an important control basis. By pre-planning the rotation trajectory curve of the motor and controlling the motor to rotate according to the planned rotation trajectory curve, the control task of the motor rotation angle can be achieved.

[0036] Research has found that trapezoidal curves are widely used in control systems or servo systems that require the controlled object to accelerate or decelerate. Examples include trapezoidal velocity curves and trapezoidal acceleration curves. The following describes the two trapezoidal curves using the rotation angle of a motor as an example.

[0037] The trapezoidal speed curve refers to a curve in which the rotational angular velocity curve of the motor is trapezoidal. The corresponding acceleration curve is a segmented step curve with obvious acceleration mutation points. When the motor rotates, it will cause obvious flexible impact, which is not conducive to the smooth operation of the motor and the suppression of current noise.

[0038] The trapezoidal acceleration curve refers to replacing the step part of the acceleration curve corresponding to the above-mentioned trapezoidal velocity curve with a trapezoidal curve, which can be divided into acceleration section, uniform acceleration section, deceleration section, uniform velocity section, acceleration and deceleration section, uniform deceleration section and deceleration section, a total of seven sections. The velocity curve corresponding to the trapezoidal acceleration curve is S-shaped and can be called an S-shaped velocity curve. The jerk curve corresponding to the trapezoidal acceleration curve is a segmented step curve, and in the uniform acceleration section and the uniform deceleration section, the jerk is a non-zero constant, and the maximum jerk can reflect the flexibility of the mechanical system. Although the flexibility impact of the trapezoidal acceleration curve is improved compared to the step acceleration curve, the existence of the jerk mutation point makes the flexibility impact still large.

[0039] Based on the above, if the jerk curve is made smooth and continuous, a smoother acceleration curve can be obtained, and the speed switching will also be smoother, thereby reducing the impact caused by speed switching, making the starting, rotation and stopping of the motor smoother and reducing the impact during the motor rotation process.

[0040] In order to make the jerk curve change smoothly and avoid a large amount of calculation, when planning the rotation trajectory curve of the motor, it is possible to plan based on the trapezoidal first-order derivative function curve of the jerk, that is, the piecewise step second-order derivative function curve of the jerk.

[0041] Figure 1 This is a flow chart of a motor rotation angle control method according to an embodiment of the present application, combined with Figure 1 As shown, the method may include:

[0042] Step S101: configuring the target angular displacement of each angular displacement control period according to a preset second-order derivative function of jerk.

[0043] The second-order derivative function of jerk is a function set according to the target angle to which the target motor is to rotate and the preset time required for the target motor to rotate to the target angle. The second-order derivative function of jerk has the following four characteristics:

[0044] Feature 1: The second-order derivative function of the jerk is a piecewise step function.

[0045] Specifically, the second-order derivative function of jerk includes several function segments with positive constant values, several function segments with zero function values, and several function segments with negative constant values.

[0046] Feature 2: The domain of the second-order derivative function of jerkiness is a closed interval from 0 to the preset time.

[0047] It should be noted that the domains of the first-order derivative function of jerk, jerk function, acceleration function, angular velocity function and angular displacement function corresponding to the second-order derivative function of jerk are all closed intervals from 0 to the preset time, and the functions corresponding to the second-order derivative function of jerk are all obtained by integrating the second-order derivative function of jerk, and the function values ​​of each function at time zero are all zero.

[0048] Feature 3: The initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of the jerk are both zero.

[0049] The initial angular velocity and the final angular velocity of the angular velocity function are both zero, which indicates that the initial state and the final state of the target motor are both stationary.

[0050] Feature 4: The integral value of the angular velocity function over its domain is equal to the target angle.

[0051] The integral value is a function value at the preset time on the angular displacement function corresponding to the second-order derivative function of the jerk.

[0052] Step S102 : performing periodic angular displacement control on the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle.

[0053] It should be noted that each angular displacement control cycle is continuous, that is, the end time of the previous angular displacement control cycle is the start time of the next angular displacement control cycle. The duration of the angular displacement control cycle, or in other words, the control frequency of the motor angular displacement, can be set by comprehensively considering factors such as the computing performance of the microcontroller unit (MCU) and the application scenario of the target motor, and is usually in the microsecond range. In addition, the preset time may or may not be evenly divisible by the duration of the angular displacement control cycle, and the preset time is usually in the second range.

[0054] Optionally, the task of periodic angular displacement control of the rotation angle of the target motor can be achieved through a position feedback link. The position feedback link, which can also be called the position loop of the motor, adopts a closed-loop position control method based on error elimination to drive the motor to rotate. It can include a target angular displacement, an actual angular displacement and a controller, wherein the controller can be a controller of various forms, and exemplarily, it can be a PID controller based on error feedback control. The control process of one cycle can include: calculating the deviation between the target angular displacement of this cycle and the actual angular displacement at the beginning of this cycle, inputting the deviation into a preconfigured controller, and the controller outputting a control instruction based on the deviation to drive the target motor to rotate, so that the actual angular displacement of the target motor approaches the target angular displacement. By adjusting the parameters of the controller, it can be achieved that the actual angular displacement of the target motor follows the movement of each target angular displacement until it rotates to the target angle.

[0055] The above-mentioned motor rotation angle control method, in the process of achieving the control task of the rotation angle of the target motor, adopts a periodic control method to control the target motor to rotate according to the target angular displacement of each cycle until it rotates to the target angle. Specifically, the target angular displacement of each cycle is configured according to a preset second-order derivative of jerk. Since the second-order derivative of jerk is a piecewise step function with a domain of definition of a closed interval from 0 to the preset time, by integrating the second-order derivative of jerk over its domain, a first-order derivative of jerk without a sudden change point can be obtained. Integrating the first-order derivative of jerk over the corresponding domain can obtain a smooth jerk curve. Integrating the smooth jerk curve can obtain a smooth acceleration curve. Since there is no sudden change in acceleration, the smooth acceleration curve can be used to determine a smoother angular displacement curve compared to a piecewise step acceleration curve, thereby reducing the degree of impact during the motor rotation process.

[0056] In addition, the initial angular velocity and the terminal angular velocity of the angular velocity function corresponding to the second-order derivative function of the jerk are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle, so that the rotation angle of the target motor is controlled according to the target angular displacement of each angular displacement control cycle planned by the second-order derivative function of the jerk, and the motor rotation angle control task of rotating to the target angle at a preset time and stopping after rotating to the target angle can be achieved.

[0057] Optionally, the target angular displacement of each angular displacement control cycle can be configured before starting the angular displacement control of the target motor. For example, before controlling the target motor, a terminal with data processing capabilities, such as a computer, can be used to calculate each target angular displacement, and then each target angular displacement is compiled into the storage space of the MCU, so that the MCU can obtain the corresponding target angular displacement from the storage space when performing the angular displacement control of each cycle.

[0058] Optionally, the target angular displacement of each angular displacement control period may also be performed before the angular displacement control of the current angular displacement control period is performed. Specifically, in some embodiments provided herein, the above-mentioned step S101, configuring the target angular displacement of each angular displacement control period according to a preset second-order derivative function of jerk, may include:

[0059] For each angular displacement control period in the angular displacement control process, before the start time of the angular displacement control period, a target angular displacement of the angular displacement control period is configured according to a preset second-order derivative function of jerk.

[0060] It should be noted that, under normal circumstances, MCU is generally used to implement the control task of the motor rotation angle. Due to the limitations of the MCU's computing power and storage capacity, it is difficult to calculate and store the target angular displacement of each angular displacement control cycle at one time. For example, assuming that the duration of the angular displacement control cycle is 10us and the preset time is 14s, it is necessary to generate 1400000 target angular displacements. Assuming that each target angular displacement is stored in 24-bit (i.e. 3-byte) single-precision floating-point type, 4200KByte is required to store the target angular displacement of all angular displacement control cycles. Usually, the FLASH size of a single-chip microcomputer is only tens to hundreds of KBytes. For example, the FLASH size of an STM32 single-chip microcomputer is 128KByte. Therefore, before the start time of each angular displacement control cycle, the solution of configuring the target angular displacement of this angular displacement control cycle according to the pre-set second-order derivative function of the jerk is more practical.

[0061] The following describes in detail the process of configuring the target angular displacement for an angular displacement control cycle.

[0062] In some embodiments provided herein, configuring the target angular displacement of the angular displacement control period according to a preset second-order derivative function of jerk may include:

[0063] On the angular displacement function, a parameter value corresponding to the end time of the angular displacement control period is extracted, and the parameter value is configured as the target angular displacement of the angular displacement control period.

[0064] The angular displacement function is a function determined based on the result of the fifth integration of a preset second-order derivative function of jerk on its definition domain.

[0065] Specifically, in the corresponding domain of definition, integrating the second-order derivative of jerk can obtain the first-order derivative of jerk, integrating the first-order derivative of jerk can obtain the jerk function, integrating the jerk function can obtain the acceleration function, integrating the acceleration function can obtain the angular velocity function, and integrating the angular velocity function can obtain the angular displacement function. In other words, the angular displacement function is the fifth-order integral result of the second-order derivative of jerk.

[0066] It should be noted that the above-mentioned target angular displacement configuration method can accurately configure the target angular displacement. However, as the number of integrations increases, the computational complexity increases significantly. Furthermore, the second-order derivative of jerk is a piecewise function, and therefore the angular displacement function is also a piecewise function. That is, different function segments in the angular displacement function have different functional expressions, and the storage space required for the angular displacement function is also relatively large.

[0067] To solve the above problem, an embodiment of the present application provides an algorithm for approximating the target angular displacement, based on the fact that when the duration of the angular displacement control period is much shorter than the preset time, the function curve within one angular displacement control period can be regarded as a linear curve.

[0068] Specifically, Figure 2 The process diagram of configuring the target angular displacement of the angular displacement control cycle is shown in the following example. Figure 2 As shown, the process of configuring the target angular displacement of the angular displacement control period according to the preset second-order derivative function of jerk may include the following steps:

[0069] Step S01: extracting the jerk second-order derivative value corresponding to the start time of the angular displacement control period from a preset jerk second-order derivative function.

[0070] Step S02: Calculate the target value of the angular displacement corresponding to the end time of the angular displacement control period by using a local linearization method.

[0071] Figure 3 This diagram illustrates the process of calculating the target value of angular displacement. Figure 3The parameters shown are: the duration Δt of the angular displacement control cycle, the second-order derivative value J' of the jerk extracted by the above step S01, the initial value J'0 of the first-order derivative of the jerk and its target value J', the initial value J0 of the jerk and its target value J, the initial value a0 of the acceleration and its target value a, the initial value ω0 of the angular velocity and its target value ω, the initial value θ0 of the angular displacement and its target value θ. It should be noted that the initial value of each parameter refers to the parameter value at the start time of the angular displacement control cycle, and the initial value of each parameter corresponding to time zero, that is, the start time of the initial angular displacement control cycle, is zero. The target value of each parameter refers to are parameter values ​​at the end time of the angular displacement control period, wherein the parameters include the first-order derivative of jerk, jerk, acceleration, angular velocity, and angular displacement. Based on the second-order derivative of jerk and the initial values ​​of the parameters corresponding to the start time of the angular displacement control period, a local linearization method is used to integrate each parameter sequentially within the angular displacement control period to calculate the target angular displacement value. Specifically, the target angular displacement value θ is calculated from J'=J'0+J"·△t, J=J0+J'·△t, a=a0+J·△t, ω=ω0+a·△t, and θ=θ0+ω·△t.

[0072] Step S03: determine whether the end time of the angular displacement control period is less than or equal to the preset time; if so, execute step S04; if not, execute step S05.

[0073] Step S04: configuring the smaller value between the target value of the angular displacement and the target angle as the target angular displacement of the angular displacement control period.

[0074] That is, when the end time of the angular displacement control period is less than or equal to the preset time, the maximum value of the target angular displacement of the angular displacement control period is the target angle.

[0075] Step S05: Determine whether the absolute value of the difference between the target value of the angular displacement and the target angle is less than or equal to a preset difference threshold; if so, execute step S06.

[0076] Among them, the difference threshold is greater than zero. The difference threshold can be set according to the actual response speed and application scenario, and is usually based on not causing sufficient impact to the system. For example, if the motor responds faster, a smaller difference threshold can be set. The reason is that the faster the motor responds, the more obvious the impact. Reducing the value of the difference threshold can weaken the impact of the impact.

[0077] It should be noted that if the end time of the angular displacement control cycle is greater than the preset time, it corresponds to the situation where the actual angular displacement of the target motor cannot reach the target angle at the preset time. Therefore, it is necessary to stop calculating the target angular displacement for the next angular displacement control cycle in this situation to indicate that there is no target angular displacement for the next angular displacement control cycle. In addition, if the absolute value of the difference between the target angular displacement value and the target angle is greater than the difference threshold, it corresponds to the situation where the target angular displacement for the angular displacement control cycle does not exist.

[0078] Step S06: configuring the target angle as the target angular displacement of the angular displacement control period.

[0079] It should be noted that if the target angular displacement of an angular displacement control cycle is a target angle, then if the controller parameter configuration is reasonable, it can be characterized that at the end time of the angular displacement control cycle, the actual angular displacement of the target motor can reach the target angle.

[0080] If there is no corresponding target angular displacement for an angular displacement control cycle, it indicates that the target motor cannot be controlled to rotate to the target angle. However, at the end of this control, the actual angular displacement of the target motor is close to the target angle.

[0081] The reason why the target motor cannot be controlled to rotate to the target angle may be due to the pre-set variable type, such as a fixed-point variable or a floating-point variable.

[0082] In some embodiments provided in the present application, the second-order derivative value of the jerk and the initial values ​​of the parameters are all floating-point variables.

[0083] It should be noted that, in the entire process of controlling the motor rotation angle, the parameter values ​​of the various types of parameters used in the calculation are all floating-point variables, specifically, they can be single-precision floating-point variables or double-precision floating-point variables. In the storage and calculation process of the MCU, since floating-point variables can only retain a limited number of decimal places, floating-point storage and calculations will cause cumulative errors. For example, when the target angle is large, the floating-point variable requires more bits to store integer bits, and the number of bits used to store decimal places gradually decreases. That is to say, as the value of the angular displacement increases, the calculation error caused by rounding of the decimal places also increases. As the calculation process proceeds, the accumulated calculation error may cause an impact that cannot be ignored, so that the target value of the last angular displacement calculated may be greater than the target angle, or it may be less than the target angle.

[0084] The reason for the inability to control the target motor to rotate to the target angle may also be that when controlling the motor, a position-current dual closed-loop control method is adopted, and due to hardware resource limitations, the control frequency of the current loop is greater than that of the position loop. For example, after the position loop is activated once, the current loop will act for 10 cycles with the current position loop output. The hysteresis of the position loop control means that by the 8th or 9th cycle of the current loop, the motor's rotation angle may have exceeded the target angular displacement given by the position loop. If the current loop and the position loop operate at the same frequency, that is, the above-mentioned position loop control hysteresis does not exist, then the accumulated calculation error is the main reason for the inability to control the target motor to rotate to the target angle.

[0085] To solve the problem of being unable to control the target motor to rotate to the target angle, the motor rotation angle can be controlled again.

[0086] Specifically, in some embodiments provided in the present application, when there is no target angular displacement of the angular displacement control period, the method may further include the following steps XZ:

[0087] Step X: Obtain the actual angular displacement corresponding to the start time of the angular displacement control period.

[0088] Step Y: Determine a new target angle based on the difference between the target angle and the actual angular displacement, and set a new preset time.

[0089] Step Z: Return to the step of configuring the target angular displacement of each angular displacement control period according to the preset second-order derivative function of jerk.

[0090] It should be noted that at the end of the last control of the motor rotation angle, the motor rotation speed is small and close to zero, and the change in the actual angular displacement of an angular displacement control cycle is small and can be ignored. In other words, it can be considered that at the end of the last control, the motor speed is zero. Therefore, based on the difference between the current actual angular displacement and the target angle, a new target angle can be determined and a new preset time can be set. The new preset time and the new target angle can be used as the control targets to control the next motor rotation angle.

[0091] In some embodiments provided in the present application, the preset time may be a time determined according to the target angle and the time taken for the angular displacement of the preset angle to be rotated.

[0092] For example, assuming that it takes 1 second to rotate 360 ​​degrees, when the target angle is 540 degrees, the corresponding preset time can be set to 1.5 seconds. Based on the above, if the new target angle is 90 degrees, the new preset time can be set to 0.25 seconds.

[0093] It should be noted that the method of configuring each target angular displacement is not affected by the timing of the configuration. Any of the above methods can be applied to configure the target angular displacement of each angular displacement control cycle before controlling the target motor, or any of the above methods can be applied to configure the target angular displacement of this angular displacement control cycle before the start time of this angular displacement control cycle.

[0094] Next, the characteristics of the second-order derivative function of jerk provided in the embodiment of the present application are described.

[0095] Figure 4 An example of a function curve of the second-order derivative function of jerk, combined with Figure 4 As shown, in some embodiments provided in the present application, the second-order derivative function of jerkiness may include continuous A function segment, B function segment and C function segment, the lengths of the domains of the A function segment and the C function segment are equal, the domain length of the B function segment is at least zero, the function value of the B function segment is zero, and the A function segment and the C function segment are axially symmetric about the vertical axis where the midpoint of the domain of the second-order derivative function of jerkiness is located.

[0096] Function segment A corresponds to the acceleration segment, function segment B corresponds to the uniform velocity segment, and function segment C corresponds to the deceleration segment. The acceleration and deceleration segments are symmetrical. Research has found that shortening the uniform velocity segment can reduce the jerk peak and the rate of change of the jerk. Optionally, the domain length of function segment B can be 0.

[0097] The A function segment includes a continuous A1 function segment, an A2 function segment and an A3 function segment, the lengths of the domains of the A1 function segment and the A3 function segment are equal, the length of the domain of the A2 function segment is at least zero, the function value of the A2 function segment is zero, and the A1 function segment and the A3 function segment are centrally symmetric about the midpoint of the domain of the A function segment.

[0098] The A1 function segment corresponds to the acceleration segment with increasing acceleration, the A2 function segment corresponds to the acceleration segment with constant acceleration, and the A3 function segment corresponds to the acceleration segment with decreasing acceleration. Research has found that reducing the uniform acceleration segment can reduce the jerk peak and the rate of change of the jerk. Optionally, the domain length of the A2 function segment can be 0.

[0099] The A1 function segment includes a continuous A11 function segment, an A12 function segment and an A13 function segment, the lengths of the domains of the A11 function segment and the A13 function segment are equal, the length of the domain of the A12 function segment is at least zero, the function value of the A12 function segment is zero, and the A11 function segment and the A13 function segment are axially symmetrical about the longitudinal axis where the midpoint of the domain of the A1 function segment is located.

[0100] Among them, function segment A11 corresponds to the jerk segment with increasing jerk, function segment A12 corresponds to the jerk segment with constant jerk, and function segment A13 corresponds to the jerk segment with decreasing jerk. Research has found that increasing the proportion of jerk segments with constant jerk can reduce the peak jerk but accelerates the rate of change of jerk. Based on this, function segment A1 is made to approximate a standard isosceles trapezoid in the corresponding jerk function. The standard isosceles trapezoid has a ratio of 1:3 between the upper base and the lower base. The upper base refers to the shorter of the two bases of the trapezoid. The upper base of the trapezoid is the jerk segment with constant jerk, which can avoid rapid changes in jerk.

[0101] The A11 function segment includes an A111 function segment, an A112 function segment and an A113 function segment with equal and continuous domain lengths. The function value of the A111 function segment is a preset value, the function value of the A112 function segment is 0, and the function value of the A113 function segment is the opposite of the preset value.

[0102] Among them, the A111 function segment corresponds to a function segment in which the first-order derivative of jerk increases linearly, the A112 function segment corresponds to a function segment in which the first-order derivative of jerk is constant, and the A113 corresponds to a function segment in which the first-order derivative of jerk decreases linearly. The preset value is greater than zero and can be calculated based on the target angle and the preset time.

[0103] The following describes a motor rotation angle control device provided in an embodiment of the present application. The motor rotation angle control device described below and the motor rotation angle control method described above can refer to each other.

[0104] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a motor rotation angle control device disclosed in an embodiment of the present application. Figure 5 As shown, the device may include:

[0105] a target angular displacement configuration unit 11, configured to configure a target angular displacement for each angular displacement control period based on a preset second-order derivative function of jerk, wherein the second-order derivative function of jerk is a piecewise step function configured based on the target angle and a preset time required for the target motor to rotate to the target angle; the domain of the second-order derivative function of jerk is a closed interval from 0 to the preset time; the initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of jerk are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle;

[0106] The angular displacement control unit 12 is configured to periodically control the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle.

[0107] Optionally, the process of the target angular displacement configuration unit 11 configuring the target angular displacement of each angular displacement control period according to a preset second-order derivative function of jerk may include:

[0108] For each angular displacement control period in the angular displacement control process, before the start time of the angular displacement control period, a target angular displacement of the angular displacement control period is configured according to a preset second-order derivative function of jerk.

[0109] Optionally, the process of the target angular displacement configuration unit 11 configuring the target angular displacement of the angular displacement control period according to a preset second-order derivative function of jerk may include:

[0110] On the angular displacement function, a parameter value corresponding to the end time of the angular displacement control period is extracted, and the parameter value is configured as the target angular displacement of the angular displacement control period, wherein the angular displacement function is a function determined based on the result of the fifth integration of a preset second-order derivative function of jerkiness on its domain of definition.

[0111] Optionally, the process of the target angular displacement configuration unit 11 configuring the target angular displacement of the angular displacement control period according to a preset second-order derivative function of jerk may include:

[0112] Extracting the jerk second-order derivative value corresponding to the start time of the angular displacement control period from a preset jerk second-order derivative function;

[0113] integrating the parameters sequentially within the angular displacement control period using a local linearization method based on the second-order derivative value of the jerk and the initial values ​​of the parameters corresponding to the start time of the angular displacement control period to obtain target values ​​of the parameters corresponding to the end time of the angular displacement control period, wherein the parameters include the first-order derivative of jerk, jerk, acceleration, angular velocity, and angular displacement, and the initial values ​​of the parameters corresponding to the start time of the initial angular displacement control period are all zero;

[0114] Determining whether the end time of the angular displacement control period is less than or equal to the preset time;

[0115] If yes, configuring the smaller value between the target value of the angular displacement and the target angle as the target angular displacement of the angular displacement control period;

[0116] If not, stop calculating the target angular displacement of the next angular displacement control cycle to indicate that there is no target angular displacement for the next angular displacement control cycle, and determine whether the absolute value of the difference between the target value of the angular displacement and the target angle is less than or equal to a preset difference threshold. If so, configure the target angle as the target angular displacement of the angular displacement control cycle. If not, it indicates that there is no target angular displacement for the angular displacement control cycle, wherein the difference threshold is greater than zero.

[0117] Optionally, the second-order derivative value of the jerk and the initial values ​​of the parameters are all floating-point variables.

[0118] Optionally, the device may also include a re-planning unit for obtaining an actual angular displacement corresponding to the start time of the angular displacement control period in the absence of a target angular displacement of the angular displacement control period; determining a new target angle based on the difference between the target angle and the actual angular displacement, and setting a new preset time; and returning to execute the step of configuring the target angular displacement of each angular displacement control period based on a preset second-order derivative function of jerkiness.

[0119] Optionally, the preset time may be a time determined according to the target angle and the time taken to rotate the angular displacement of the preset angle.

[0120] Optionally, the second-order derivative function of jerk may include a continuous function segment A, a function segment B, and a function segment C, the lengths of the domains of the function segment A and the function segment C are equal, the length of the domain of the function segment B is at least zero, the function value of the function segment B is zero, and the function segment A and the function segment C are axially symmetric about the longitudinal axis where the midpoint of the domain of the second-order derivative function of jerk is located;

[0121] The A function segment includes a continuous A1 function segment, an A2 function segment, and an A3 function segment. The lengths of the domains of the A1 function segment and the A3 function segment are equal. The length of the domain of the A2 function segment is at least zero. The function value of the A2 function segment is zero. The A1 function segment and the A3 function segment are centrally symmetric about the midpoint of the domain of the A function segment.

[0122] The A1 function segment includes a continuous A11 function segment, an A12 function segment, and an A13 function segment. The lengths of the domains of the A11 function segment and the A13 function segment are equal. The length of the domain of the A12 function segment is at least zero. The function value of the A12 function segment is zero. The A11 function segment and the A13 function segment are axially symmetric about the longitudinal axis where the midpoint of the domain of the A1 function segment is located.

[0123] The A11 function segment includes an A111 function segment, an A112 function segment and an A113 function segment with equal and continuous domain lengths. The function value of the A111 function segment is a preset value, the function value of the A112 function segment is 0, and the function value of the A113 function segment is the opposite of the preset value. The preset value is greater than zero and can be calculated based on the target angle and the preset time.

[0124] Figure 6 1 is a schematic diagram of a motor rotation angle control system according to an embodiment of the present application. Figure 6 As shown, the system may include a target motor 01 , an angle observation device 02 , and a motor rotation angle control device 03 that are connected to each other.

[0125] The angle observation device is used to observe and output the actual angular displacement of the target motor to the motor rotation angle control device during the process in which the motor rotation angle control device performs angle control on the target motor.

[0126] Exemplarily, the angle observation device can be a sensory feedback device, such as a rotary transformer, an optical encoder or a magnetic encoder, or it can be an angle observation device using a sensorless observation method, which can include a carrier injection method based on a motor salient pole model, a motor flux observation method or a back electromotive force model method.

[0127] Figure 7 The hardware structure block diagram of the motor rotation angle control device is shown, and its hardware structure may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0128] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0129] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0130] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0131] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0132] configuring a target angular displacement for each angular displacement control period according to a preset second-order derivative function of jerk, wherein the second-order derivative function of jerk is a piecewise step function set according to the target angle and a preset time required for the target motor to rotate to the target angle, the domain of the second-order derivative function of jerk is a closed interval from 0 to the preset time, the initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of jerk are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle;

[0133] The angular displacement control period is used as a period, and the rotation angle of the target motor is periodically controlled according to each target angular displacement, until the actual angular displacement of the target motor reaches a preset target angle.

[0134] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0135] For example, the main control chip of the target motor can be connected to the host computer through the serial port, and the actual angular displacement of the target motor can be obtained through the magnetic encoder installed at the end of the motor shaft. The controller that outputs the control instruction for the target motor according to the deviation between the target angular displacement and the actual angular displacement in each cycle is a preconfigured PID controller. The target angle is θ0, the preset time is t0, and the duration of the angular displacement control cycle is Δt. The expression of the preconfigured second-order derivative function of the jerk is as follows:

[0136]

[0137] Figure 8 The function curve of the second-order derivative function of jerk mentioned above is shown as follows: Figure 9 Shown with Figure 8 The function curve of the first-order derivative function of jerk corresponding to the second-order derivative function of jerk shown in the figure can be called a trapezoidal J' curve. On the basis of the above expression, according to the same target angle and preset time, the corresponding trapezoidal velocity curve, trapezoidal acceleration curve and trapezoidal J' curve are planned respectively, wherein the ratio of the upper and lower bases of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve is 1:3. The motion curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown as follows: Figure 10-13 As shown, Figure 10 The jerk curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown. Figure 11 The acceleration curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown. Figure 12 The angular velocity curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown. Figure 13The angular displacement curves of the trapezoidal velocity curve, the trapezoidal acceleration curve and the trapezoidal J' curve are shown. Figure 13 As shown, the angular displacement function calculated based on the second-order derivative function of the jerk based on the piecewise step changes more smoothly over time and has a lower angular velocity during the startup phase. Since the angular velocity curve of the trapezoidal J' curve is axisymmetric about the vertical axis at the midpoint of its definition domain, it also has a lower angular velocity during the stop phase, which can ensure smoother and more reliable start-up and stop phases of the motor. In addition, compared to curves with uniform speed and uniform acceleration segments, the above-mentioned trapezoidal J' curve does not have uniform acceleration and uniform speed segments, thereby reducing the peak value and rate of change of the jerk, making the system more flexible and more suitable for position loop control systems that are sensitive to jerk.

[0138] Let time t start at 0 and increase in increments of Δt. According to the above steps S01-S06, the target angular displacement of each angular displacement control cycle is sequentially configured. This method does not require a complex calculation process. After defining the six variables J", J', J, a, ω, and θ, the target value of each angular displacement can be generated by continuous accumulation. It only requires a small amount of MCU resources and is suitable for single-chip microcomputer systems. For each angular displacement control cycle, the corresponding target angular displacement is subtracted from the current actual angular displacement to obtain an angular displacement deviation Δθ. Based on the angular displacement deviation Δθ, the PID controller outputs a corresponding control signal to the target motor to achieve the control effect of adjusting and eliminating errors. Ultimately, the actual angular displacement of the target motor is controlled to follow the target angular displacement changes of each angular displacement control cycle. In other words, the rotation angle of the control motor changes according to the pre-planned angular displacement curve.

[0139] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0140] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.

[0141] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A motor rotation angle control method, characterized in that: The method includes: According to the preset second-order derivative function of jerk, the target angular displacement of each angular displacement control cycle is configured; Performing periodic angular displacement control on the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle; The second-order derivative function of the jerk is a piecewise step function set according to the target angle and the preset time required for the target motor to rotate to the target angle. The domain of the second-order derivative function of the jerk is a closed interval from 0 to the preset time. The initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of the jerk are both zero, and the integral value of the angular velocity function over its domain is equal to the target angle. The step of configuring the target angular displacement of each angular displacement control period according to the preset jerk second-order derivative function includes: For each angular displacement control period in the angular displacement control process, before the start time of the angular displacement control period, configuring the target angular displacement of the angular displacement control period according to a preset second-order derivative function of jerk; The configuring the target angular displacement of the angular displacement control period according to the preset jerk second-order derivative function includes: extracting a parameter value corresponding to the end time of the angular displacement control period from an angular displacement function, and configuring the parameter value as a target angular displacement of the angular displacement control period, wherein the angular displacement function is a function determined by a result of a fifth integration of a preset second-order derivative function of jerk over its domain; or In a preset second-order derivative function of jerkiness, the second-order derivative value of jerkiness corresponding to the start time of the angular displacement control period is extracted; according to the second-order derivative value of jerkiness and the initial values ​​of the parameters corresponding to the start time of the angular displacement control period, a local linearization method is adopted to sequentially integrate the parameters within the angular displacement control period to obtain the target values ​​of the parameters corresponding to the end time of the angular displacement control period, wherein the parameters include the first-order derivative of jerkiness, jerkiness, acceleration, angular velocity and angular displacement, and the initial values ​​of the parameters corresponding to the start time of the initial angular displacement control period are all zero; the angular displacement control period is judged. whether the end time of the period is less than or equal to the preset time; if so, the smaller value of the target value of the angular displacement and the target angle is configured as the target angular displacement of the angular displacement control period; if not, the calculation of the target angular displacement of the next angular displacement control period is stopped to indicate that there is no target angular displacement of the next angular displacement control period, and whether the absolute value of the difference between the target value of the angular displacement and the target angle is less than or equal to a preset difference threshold value is determined; if so, the target angle is configured as the target angular displacement of the angular displacement control period; if not, it is indicated that there is no target angular displacement of the angular displacement control period, wherein the difference threshold value is greater than zero.

2. The method according to claim 1, characterized in that The second-order derivative value of the jerk and the initial values ​​of the parameters are all floating-point variables.

3. The method according to claim 2, characterized in that In the absence of the target angular displacement of the angular displacement control period, the method further includes: Acquiring an actual angular displacement corresponding to a start time of the angular displacement control period; Determining a new target angle and setting a new preset time based on the difference between the target angle and the actual angular displacement; Return to the step of configuring the target angular displacement of each angular displacement control cycle according to the preset second-order derivative function of jerk.

4. The method according to any one of claims 1 to 3, characterized in that The preset time is a time determined based on the target angle and the time taken for the angular displacement of the preset angle to rotate.

5. The method according to any one of claims 1 to 3, characterized in that The second-order derivative function of jerk includes a continuous function segment A, a function segment B, and a function segment C. The lengths of the domains of the function segment A and the function segment C are equal, the length of the domain of the function segment B is at least zero, the function value of the function segment B is 0, and the function segment A and the function segment C are axially symmetric about the longitudinal axis where the midpoint of the domain of the second-order derivative function of jerk is located. The A function segment includes a continuous A1 function segment, an A2 function segment, and an A3 function segment. The lengths of the domains of the A1 function segment and the A3 function segment are equal. The length of the domain of the A2 function segment is at least zero. The function value of the A2 function segment is zero. The A1 function segment and the A3 function segment are centrally symmetric about the midpoint of the domain of the A function segment. The A1 function segment includes a continuous A11 function segment, an A12 function segment, and an A13 function segment. The lengths of the domains of the A11 function segment and the A13 function segment are equal. The length of the domain of the A12 function segment is at least zero. The function value of the A12 function segment is zero. The A11 function segment and the A13 function segment are axially symmetric about the longitudinal axis where the midpoint of the domain of the A1 function segment is located. The A11 function segment includes an A111 function segment, an A112 function segment and an A113 function segment with equal and continuous domain lengths. The function value of the A111 function segment is a preset value, the function value of the A112 function segment is 0, and the function value of the A113 function segment is the opposite of the preset value. The preset value is greater than zero and can be calculated based on the target angle and the preset time.

6. A motor rotation angle control device, characterized in that: The device includes: a target angular displacement configuration unit, configured to configure a target angular displacement for each angular displacement control period based on a preset second-order derivative function of jerk, wherein the second-order derivative function of jerk is a piecewise step function configured based on the target angle and a preset time required for the target motor to rotate to the target angle, the domain of the second-order derivative function of jerk being a closed interval from 0 to the preset time, the initial angular velocity and the final angular velocity of the angular velocity function corresponding to the second-order derivative function of jerk being zero, and the integral value of the angular velocity function over its domain being equal to the target angle; an angular displacement control unit, configured to periodically control the rotation angle of the target motor according to each target angular displacement, with the angular displacement control period as a period, until the actual angular displacement of the target motor reaches a preset target angle; The target angular displacement configuration unit configures the target angular displacement of each angular displacement control period according to a preset jerk second-order derivative function, including: For each angular displacement control period in the angular displacement control process, before the start time of the angular displacement control period, configuring the target angular displacement of the angular displacement control period according to a preset second-order derivative function of jerk; The process of configuring the target angular displacement of the angular displacement control period by the target angular displacement configuration unit according to a preset jerk second-order derivative function includes: extracting a parameter value corresponding to the end time of the angular displacement control period from an angular displacement function, and configuring the parameter value as a target angular displacement of the angular displacement control period, wherein the angular displacement function is a function determined by a result of a fifth integration of a preset second-order derivative function of jerk over its domain; or In a preset second-order derivative function of jerkiness, the second-order derivative value of jerkiness corresponding to the start time of the angular displacement control period is extracted; according to the second-order derivative value of jerkiness and the initial values ​​of the parameters corresponding to the start time of the angular displacement control period, a local linearization method is adopted to sequentially integrate the parameters within the angular displacement control period to obtain the target values ​​of the parameters corresponding to the end time of the angular displacement control period, wherein the parameters include the first-order derivative of jerkiness, jerkiness, acceleration, angular velocity and angular displacement, and the initial values ​​of the parameters corresponding to the start time of the initial angular displacement control period are all zero; the angular displacement control period is judged. whether the end time of the period is less than or equal to the preset time; if so, the smaller value of the target value of the angular displacement and the target angle is configured as the target angular displacement of the angular displacement control period; if not, the calculation of the target angular displacement of the next angular displacement control period is stopped to indicate that there is no target angular displacement of the next angular displacement control period, and whether the absolute value of the difference between the target value of the angular displacement and the target angle is less than or equal to a preset difference threshold value is determined; if so, the target angle is configured as the target angular displacement of the angular displacement control period; if not, it is indicated that there is no target angular displacement of the angular displacement control period, wherein the difference threshold value is greater than zero.

7. A motor rotation angle control system, characterized in that: including a target motor, an angle observation device, and a motor rotation angle control device connected to each other; The motor rotation angle control device comprises: a memory and a processor, wherein the memory is used to store a program, and the processor is used to execute the program to implement the various steps of the motor rotation angle control method according to any one of claims 1 to 5; The angle observation device is used to observe and output the actual angular displacement of the target motor to the motor rotation angle control device during the process in which the motor rotation angle control device performs angle control on the target motor.

Citation Information

Patent Citations

  • Method and system for planning trigonometric function expression curve with continuous jerk and chip mounter

    CN114879609A

  • Asymmetric S-shaped displacement curve design method suitable for high-speed mechanism

    CN115146467A