CN110968045B - Speed control method and device for moving target and readable storage medium - Google Patents

Speed control method and device for moving target and readable storage medium Download PDF

Info

Publication number
CN110968045B
CN110968045B CN201811161089.4A CN201811161089A CN110968045B CN 110968045 B CN110968045 B CN 110968045B CN 201811161089 A CN201811161089 A CN 201811161089A CN 110968045 B CN110968045 B CN 110968045B
Authority
CN
China
Prior art keywords
speed
target
velocity
curve
moving target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811161089.4A
Other languages
Chinese (zh)
Other versions
CN110968045A (en
Inventor
张剑青
杨嘉伟
全晓臣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN201811161089.4A priority Critical patent/CN110968045B/en
Publication of CN110968045A publication Critical patent/CN110968045A/en
Application granted granted Critical
Publication of CN110968045B publication Critical patent/CN110968045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/416Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control of velocity, acceleration or deceleration
    • G05B19/4163Adaptive control of feed or cutting velocity
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36521Select by combination of detected force, acceleration, speed, work rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

The application discloses a speed control method and device of a moving target and a readable storage medium, and belongs to the field of automatic control. According to the method and the device, the speed curve of the moving target is obtained according to the capacity parameter of the moving target, the target parameter and the state parameter of the moving target obtained when the set updating time interval is reached, and the speed of the moving target is controlled according to the obtained speed curve in each updating time interval, so that the closed-loop control of the speed of the moving target is realized, and the control precision of the moving target is improved. In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is improved.

Description

Speed control method and device for moving target and readable storage medium
Technical Field
The present disclosure relates to the field of automatic control, and in particular, to a method and an apparatus for controlling a speed of a moving object, and a readable storage medium.
Background
In automated production or automated control of machines, it is necessary to automatically control the movement of a moving object, for example, a robot arm, a robot, or the like of a numerically controlled machine tool. Since the moving object needs to perform frequent acceleration and deceleration movements, the control unit needs to pre-process the moving speed of the moving object and control the moving speed of the moving object according to the pre-processed result.
Disclosure of Invention
The present disclosure provides a speed control method, apparatus and readable storage medium for a moving object, so as to overcome the problem of lack of control precision for the moving object in the related art. The technical scheme is as follows:
in one aspect, a method for controlling a speed of a moving object is provided, the method including: acquiring a capability parameter of a moving target; when a set updating time interval is reached, acquiring a state parameter of the moving target at the starting moment of the set updating time interval and a target parameter of the moving target; the state parameters at least comprise an initial speed of the moving target, and the target parameters at least comprise a target speed of the moving target and a remaining target distance of the moving target; obtaining a speed curve of the moving target based on sinusoidal speed fitting according to the capacity parameter, the target parameter and the state parameter; the velocity profile is modeling a smooth change in velocity as a function of time from the initial velocity, over the remaining target distance, and until the moving target reaches the target velocity at the start time; and controlling the speed of the moving target in the updating time interval according to the speed curve of the moving target.
In a possible implementation manner, the obtaining a speed curve of the moving target based on a sinusoidal speed fitting according to the capability parameter, the target parameter, and the state parameter includes: determining the composition of a speed curve of the moving target according to the capacity parameter, the target parameter and the state parameter, wherein the composition of the speed curve is one or more of an acceleration curve, a deceleration curve and a uniform speed curve; and according to the composition of the speed curve of the moving target, obtaining the speed curve of the moving target based on the speed fitting of the sine curve.
In one possible implementation, the capability parameter includes a speed threshold, an acceleration threshold, and a deceleration threshold of the moving object; the determining the composition of the velocity profile of the moving target according to the capability parameter, the target parameter and the state parameter includes: according to the speed threshold, the acceleration threshold, the deceleration threshold, the initial speed and the target speed, a first sinusoidal speed curve is obtained based on sinusoidal speed fitting, and a first fitting distance is obtained according to the first sinusoidal speed curve; if the first fitting distance is not smaller than the remaining target distance, the composition of the speed curve of the moving target does not include a uniform speed curve; or if the first fitting distance is smaller than the remaining target distance, the speed curve of the moving target comprises a uniform speed curve; wherein the first sinusoidal velocity profile is accelerated from the initial velocity to the velocity threshold at an acceleration no greater than the acceleration threshold and decelerated from the velocity threshold to the target velocity at an acceleration no greater than the deceleration threshold; the first fitted distance is a distance through which the moving target moves according to the first sinusoidal velocity profile.
In a possible implementation manner, the obtaining the speed curve of the moving target based on sinusoidal speed fitting according to the composition of the speed curve of the moving target includes: if the speed curve of the moving target comprises an acceleration curve, a constant speed curve and a deceleration curve, obtaining the speed curve of the moving target according to the first sinusoidal speed curve, the remaining target distance and the speed threshold value and based on sinusoidal speed fitting, wherein the speed curve of the moving target is a curve which is accelerated from the initial speed to the speed threshold value at an acceleration not greater than the acceleration threshold value, is at a constant speed at the speed threshold value and is decelerated from the speed threshold value to the target speed at an acceleration not greater than the deceleration threshold value; alternatively, if the velocity profile of the moving object comprises an acceleration profile and/or a deceleration profile, obtaining a peak speed and a speed curve of the moving target according to the acceleration threshold, the deceleration threshold and the remaining target distance and based on a sinusoidal speed fitting, the velocity profile of the moving object over the update time interval is accelerated from the initial velocity to the peak velocity with an acceleration no greater than the acceleration threshold, and decelerating from the peak speed to the target speed with an acceleration no greater than the deceleration threshold, or the velocity profile of the moving target is a profile decelerating from the initial velocity to the target velocity with an acceleration not greater than the deceleration threshold, or the velocity profile of the moving target is a profile accelerated from the initial velocity to the target velocity with an acceleration not greater than the acceleration threshold; wherein the peak velocity is not greater than the velocity threshold.
Optionally, the sinusoidal velocity fit is based on a sinusoid and is fitted by newton iterations, the iteration termination condition of the newton iterations including at least one of an initial velocity error, a target velocity error and a distance error being no greater than an error threshold; wherein the initial velocity error is an error between an initial velocity of a velocity profile obtained from the sinusoidal fitting and the initial velocity; the target speed error is an error between a target speed of a speed curve obtained by fitting the sine curve and the target speed; the distance error is an error between a fitted distance of a velocity curve obtained from the sinusoidal fitting and the remaining target distance.
In another aspect, there is provided a speed control apparatus of a moving object, the apparatus including: the first acquisition module is used for acquiring the capability parameter of the moving target; the second acquisition module is used for acquiring the state parameter of the moving target at the starting moment of the set updating time interval and the target parameter of the moving target when the set updating time interval is reached; the state parameters at least comprise an initial speed of the moving target, and the target parameters at least comprise a target speed of the moving target and a remaining target distance of the moving target; the speed curve acquisition module is used for obtaining a speed curve of the moving target based on sinusoidal speed fitting according to the capacity parameter, the target parameter and the state parameter; the velocity profile is modeling a smooth change in velocity as a function of time from the initial velocity, over the remaining target distance, and until the moving target reaches the target velocity at the start time; and the control module is used for controlling the speed of the moving target in the updating time interval according to the speed curve of the moving target.
In one possible implementation, the speed profile obtaining module includes: the determining submodule is used for determining the composition of a speed curve of the moving target according to the capacity parameter, the target parameter and the state parameter, wherein the composition of the speed curve is one or more of an acceleration curve, a deceleration curve and a constant speed curve; and the obtaining submodule is used for obtaining the speed curve of the moving target based on the speed fitting of the sine curve according to the composition of the speed curve of the moving target.
In a possible implementation manner, the capability parameter includes a speed threshold, an acceleration threshold, and a deceleration threshold of the moving target, and the determination submodule is configured to obtain a first sinusoidal speed curve based on sinusoidal speed fitting according to the speed threshold, the acceleration threshold, the deceleration threshold, the initial speed, and the target speed, and obtain a first fitting distance according to the first sinusoidal speed curve; if the first fitting distance is not smaller than the remaining target distance, the velocity curve of the moving target is composed of a non-uniform velocity curve; or if the first fitting distance is smaller than the remaining target distance, the speed curve of the moving target comprises a uniform speed curve; wherein the first sinusoidal velocity profile is accelerated from the initial velocity to the velocity threshold at an acceleration no greater than the acceleration threshold and decelerated from the velocity threshold to the target velocity at an acceleration no greater than the deceleration threshold; the first fitted distance is a distance through which the moving target moves according to the first sinusoidal velocity profile.
In a possible implementation manner, the obtaining sub-module is configured to, if a speed curve of the moving target includes an acceleration curve, a constant speed curve and a deceleration curve, obtain the speed curve of the moving target according to the first sinusoidal speed curve, the remaining target distance and the speed threshold, and based on a sinusoidal speed fitting, where the speed curve of the moving target is a curve that is accelerated from the initial speed to the speed threshold at an acceleration not greater than the acceleration threshold, is at a constant speed at the speed threshold, and is decelerated from the speed threshold to the target speed at an acceleration not greater than the deceleration threshold; alternatively, if the velocity profile of the moving object comprises an acceleration profile and/or a deceleration profile, obtaining a peak speed and a speed curve of the moving target according to the acceleration threshold, the deceleration threshold and the remaining target distance and based on a sinusoidal speed fitting, the velocity profile of the moving object over the update time interval is accelerated from the initial velocity to the peak velocity with an acceleration no greater than the acceleration threshold, and decelerating from the peak speed to the target speed with an acceleration no greater than the deceleration threshold, or the velocity profile of the moving target is a profile decelerating from the initial velocity to the target velocity with an acceleration not greater than the deceleration threshold, or the velocity profile of the moving target is a profile accelerated from the initial velocity to the target velocity with an acceleration not greater than the acceleration threshold; wherein the peak velocity is not greater than the velocity threshold.
In one possible implementation, the sinusoidal velocity fit is based on a sinusoid and is fitted by newton iterations, the iteration end conditions of the newton iterations including at least one of an initial velocity error, a target velocity error, and a distance error being no greater than an error threshold; wherein the initial velocity error is an error between an initial velocity of a velocity profile obtained from the sinusoidal fitting and the initial velocity; the target speed error is an error between a target speed of a speed curve obtained by fitting the sine curve and the target speed; the distance error is an error between a fitted distance of a velocity curve obtained from the sinusoidal fitting and the remaining target distance.
In another aspect, there is provided a speed control device for a moving object, the device including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to implement the speed control method for a moving object according to the first aspect.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, the instruction being loaded and executed by a processor to implement the method for controlling the speed of a moving object according to the first aspect.
The technical scheme provided by the disclosure at least comprises the following beneficial effects:
according to the method and the device, the speed curve of the moving target is obtained according to the capacity parameter of the moving target, the target parameter and the state parameter of the moving target obtained when the set updating time interval is reached, and the speed of the moving target is controlled according to the obtained speed curve in each updating time interval, so that the closed-loop control of the speed of the moving target is realized, and the control precision of the moving target is improved. In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 illustrates an architecture diagram of an automation control system to which embodiments of the present disclosure relate;
FIG. 2 is a schematic diagram illustrating a fitted velocity profile provided by embodiments of the present disclosure;
FIG. 3 illustrates a schematic diagram of a velocity profile of a moving target provided by embodiments of the present disclosure;
FIG. 4 illustrates a schematic diagram of a velocity profile of a moving target provided by embodiments of the present disclosure;
FIG. 5 is a schematic diagram illustrating a velocity profile of a moving target provided by embodiments of the present disclosure;
FIG. 6 is a schematic diagram illustrating a velocity profile of a moving target provided by embodiments of the present disclosure;
FIG. 7 is a flow chart illustrating a method for controlling the speed of a moving object according to an embodiment of the present disclosure;
FIG. 8 is a flow chart illustrating a method for controlling the speed of a moving object provided by an embodiment of the present disclosure;
FIG. 9 illustrates a schematic diagram of a velocity profile of a moving target provided by embodiments of the present disclosure;
fig. 10 is a block diagram illustrating a structure of a speed control apparatus of a moving object according to an embodiment of the present disclosure;
fig. 11 is a block diagram illustrating a structure of a speed control apparatus of a moving object according to an embodiment of the present disclosure;
fig. 12 is a block diagram illustrating a structure of a speed control device for a moving object according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Before explaining the present disclosure in detail, an application scenario and related technologies related to the present disclosure will be described.
In Automated production and research, it is required to automatically control the moving speed of a moving object, for example, an Automated Guided Vehicle (AGV), a robot arm of a numerical control machine, a robot, and the like. The moving target needs to be subjected to frequent acceleration and deceleration movement, the movement speed is preprocessed, a speed curve is obtained, and accurate control over the moving speed of the moving target is facilitated.
Generally, the preprocessing of the moving speed of the moving object is open-loop, that is, after a speed curve is obtained by preprocessing the moving of the moving object, the moving object is controlled to move according to the speed of the speed curve until the target position. Because the moving target has a motion error in the motion, for example, an error exists between the actual moving speed of the mechanical arm of the numerical control machine and the speed of the speed curve, so that the error is enlarged in the process of moving the moving target according to the speed of the speed curve, and the problem of lacking of control precision of the moving target is caused. The speed control method provided by the embodiment of the disclosure can update the speed curve according to the state parameter of the moving target obtained at the starting time of the update time interval, and control the movement of the moving target according to the updated speed curve, so as to solve the problem of error expansion in the movement process of the moving target.
Referring to fig. 1, an architecture diagram of an automated control system according to a speed control method provided by an embodiment of the present disclosure is shown. In the automated control system 100, at least one speed control unit 110, a sensor unit 120, and a moving object 130 are included.
The speed control unit 110 is configured to obtain a speed profile of the moving target 130 and control a moving speed of the moving target 130 according to the speed profile of the moving target 130;
alternatively, the speed control unit 110 may be a control component of an AGV, a numerical control device of a numerical control machine tool, or a calculation control component in a robot controller of a robot.
The sensor unit 120 is used to obtain the moving state of the moving object 130. The movement state includes, but is not limited to, one or more of the following: the position at which moving object 130 is located, the velocity of moving object 130, and the acceleration of moving object 130. The acceleration of the moving object 130 includes an acceleration in an acceleration motion and an acceleration in a deceleration motion. In the implementation of the present disclosure, in both the acceleration motion and the deceleration motion, the value of the acceleration may be a non-negative number, which indicates how fast the speed changes in the acceleration motion or the deceleration motion, and the larger the value of the acceleration, the faster the speed changes, and the smaller the value of the acceleration, the slower the speed changes.
Alternatively, the sensor unit 120 may be a sensor in an AGV, a numerical control machine, or a robot, including but not limited to one or more of the following sensors: proximity switches, pressure sensors, rotary transformers, induction synchronizers, and speed sensors.
The moving target 130 is a target for the speed control unit 110 to perform speed control. Alternatively, the moving target 130 may be a vehicle body in an AGV, a robot arm of a numerical control machine tool, an arm or leg of a robot, or the like.
Moving target 130 has capability parameters for identifying the moving capabilities of moving target 130, including but not limited to one or more of the following parameters:
a speed threshold value representing a maximum speed value set for the moving target 130;
an acceleration threshold value representing a maximum value of acceleration in an acceleration motion set for the moving object 130;
the deceleration threshold value is used to indicate the maximum value of the acceleration in the deceleration motion set for the moving object 130. Illustratively, the absolute value of the derivative of the velocity of the moving target 130 over time at any time during the deceleration process is not greater than the deceleration threshold.
Moving target 130 also has target parameters for identifying the moving state to which moving target 130 is to move according to the speed of the speed profile, including but not limited to one or more of the following parameters:
target speed, which represents the speed to which the moving target 130 is to be brought:
a target position representing a position to be reached by moving target 130;
moving target 130 also has state parameters for identifying the moving state in which moving target 130 is currently located, including but not limited to one or more of the following parameters:
an initial velocity representing the velocity of the moving target 130 at the starting time;
the initial position is used to indicate the position of the moving object 130 at the starting time.
Referring to fig. 2, a fitted velocity profile based on a sinusoidal velocity fit is shown, which includes a fitted acceleration profile and a fitted deceleration profile.
As shown in fig. 2, the abscissa is time t and the ordinate is velocity v; the acceleration curve is fitted with amplitude as peak velocity vmaxThe monotone decreasing part of the cosine curve with the maximum slope of acc is obtained by turning and translating; the fitted deceleration curve is amplitude as peak velocity vmaxThe monotone decreasing part of the cosine curve with the maximum slope of dec is obtained by translation; the start coordinate of the fitted acceleration curve is (0,0), and the end coordinate thereof is the intersection coordinate (t) of the fitted acceleration curve and the fitted deceleration curve1,vmax) The starting coordinate of the fitted deceleration curve is (t)1,vmax) The end coordinate thereof is (t)2,0). The moving target 130 moves from time 0 to time t according to the velocity of the fitted velocity profile2The value of the fitted distance passed by the time is the area of a graph formed by the fitted velocity curve and the time axis.
In the fitted velocity curve, the fitted acceleration curve is a non-uniform acceleration curve; the fitted deceleration curve is a non-uniform deceleration curve. In addition, the above is one example of obtaining a fitted velocity profile based on a sine curve velocity fit, and the present disclosure is not limited to methods based on other types of velocity fits based on sine and/or cosine curves.
The velocity profile obtained by the present disclosure based on a sinusoidal velocity fit is part or all of the fitted velocity profile described above, e.g., the velocity profile of the moving target 130 is the fitted velocity profile from t0Time tfThe curve between the moments. Note that t is0The time is the starting time of the moving target 130, which is used to identify the starting time of the velocity profile of the moving target 130 on the time axis and does not represent the actual time. t is tfThe time is an end time of the moving object, which is used to identify an end time of the velocity profile of the moving object 130 on the time axis and does not represent an actual time. For example, t of the velocity profile of the moving object 130 obtained from the fitted velocity profile described above0The time of day is 10 seconds, the actual time may be 10:25: 10; t is tfThe time of day is 20 seconds and in practice the time may be 10:25: 20.
Deriving a velocity profile based on a sinusoidal velocity fit based on the capability parameters and state parameters of the moving target 130 may include the following.
Case 1, the velocity profile comprises two curves, one curve being part or all of a fitted acceleration profile and the other curve being part or all of a fitted deceleration profile, the peak velocity in the velocity profile being vmax,vmaxNot greater than a speed threshold va
Taking the speed curve shown in fig. 3 as an example, the speed curve is part of the speed fit curve shown in fig. 2, t0Is the starting time of the moving target 130 according to the velocity profile;
tfis the end time of the moving target 130 according to the velocity profile;
t1is the time at which the moving target 130 transitions from acceleration to deceleration according to the velocity profile;
v0is that the velocity curve is at t0The speed of the moment;
vfis that the velocity curve is at tfThe speed of the moment;
vmaxis the peak velocity in the velocity profile, is the velocity profile at t1The speed of the moment;
the starting point is a coordinate point on the speed curve at the starting moment;
the end point is a coordinate point on the speed curve at the end time;
the intersection point is the switching point of acceleration and deceleration.
Wherein t is more than or equal to 00<t1<tf
Moving object 130 is driven from v according to the velocity profile shown in FIG. 30Accelerate to vmaxAnd from vmaxIs decelerated to vfDuring this period (t)0Time tfTime of day), the distance traveled by the moving object 130 is the area of the shaded portion in fig. 3.
In case 2, the velocity curve includes three curves, one curve is a part or all of the fitted acceleration curve, one curve is a constant velocity curve, and the other curve is a part or all of the fitted deceleration curve, and the peak velocity in the fitted velocity curve is vmax,vmaxIs not more than va
Taking the speed curve shown in FIG. 4 as an example, the speed curve is formed by a portion of the speed fit curve shown in FIG. 2 and has a speed vmaxIs formed by the constant velocity curve of moving object 130 from v0Accelerate to vmaxAnd in vmaxAt a constant speed and from vmaxIs decelerated to vfDuring this period (t)0Time tfTime of day), the distance traveled by the moving object 130 is the area of the shaded portion in fig. 4. The parameters in fig. 4 refer to the parameter description related to fig. 3, and are not described herein again.
Case 3, the speed profile includes part or all of the fitted deceleration profile.
Taking the velocity profile shown in FIG. 5, which is part of the fitted deceleration curve of the velocity-fitted curve shown in FIG. 2, for example, moving target 130 is moved from v0Is decelerated to vfDuring this period (t)0Time tfTime of day), the distance traveled by the moving object 130 is the area of the shaded portion in fig. 5. Wherein, t1≤t0<tf. The parameters in fig. 5 refer to the parameter description related to fig. 3, and are not described in detail here.
Case 4, the speed curve includes part or all of the fitted acceleration curve.
Using the velocity profile shown in FIG. 6, which is part of the velocity fit curve shown in FIG. 2, as an example, moving object 130 is moving from v0Accelerate to vfDuring this period (t)0Time tfTime of day), the distance traveled by the moving object 130 is the area of the shaded portion in fig. 6. Wherein t is more than or equal to 00<tf≤t1. The parameters in fig. 6 refer to the parameter description related to fig. 3, and are not described herein again.
It should be noted that the speed in the embodiment of the present disclosure may be a linear speed or an angular speed, etc.; the acceleration may be linear acceleration or angular acceleration, etc.; the distance may be a straight line distance or a curved line distance, etc., and the present disclosure is not limited thereto.
Referring to fig. 7, which shows a flowchart of a method for controlling the speed of a moving object according to an embodiment of the present disclosure, taking an example of the method applied to the automatic control system shown in fig. 1 as an example, the method includes:
and 701, acquiring the capability parameter of the moving target.
Wherein the capability parameter is used to identify a mobility capability of the moving object. Optionally, the capability parameters of the moving target include, but are not limited to, one or more of the following parameters: a velocity threshold, an acceleration threshold, and a deceleration threshold of the moving object.
In a possible implementation manner, the speed control unit may be configured to obtain a capability parameter of the moving target, and exemplarily, step 701 includes: the speed control unit obtains the capability parameters of the moving target through the user interaction interface, for example, the capability parameters of the moving target input by the user, such as a speed threshold, an acceleration threshold, a deceleration threshold and the like, are obtained through the user interaction interface and are output to the speed control unit.
Alternatively, the user interface may be included in any component of the automation control system shown in fig. 1, and may also be included in other devices besides the automation control system shown in fig. 1, such as a user intelligent terminal.
In another possible implementation manner, the speed control unit obtains the capability parameter of the moving object from a storage unit further included in the automatic control system shown in fig. 1, where the capability parameter may be preset in the storage unit, or may be a setting behavior received from a user and stored in the storage unit.
Step 702, when the set update time interval is reached, acquiring the state parameter of the moving target at the starting time of the set update time interval and the target parameter of the moving target.
The state parameters at least comprise the initial speed of the moving target, and the target parameters at least comprise the target speed of the moving target and the remaining target distance of the moving target. The remaining target distance of the moving target is used to represent the distance between the current position of the moving target and the target position to which the moving target is controlled to arrive.
In the embodiment of the present disclosure, the update time interval is used to identify a time period for updating the speed profile, and at the start time of the update time interval, the speed profile of the moving object is calculated, and the movement of the moving object is controlled according to the calculated speed profile. Alternatively, the set update time interval may be a preset update time interval for performing speed curve update, for example, if speed curve update is performed every 5 seconds, every 5 seconds is the set update time interval; the set update time interval may also be a specified time obtained through the human-computer interaction interface, for example, the set update time interval is 10:31-10: 36.
The start time is a start time of the speed control of the moving object, that is, a start time of the update time interval. The time when the moving target reaches the target speed after the remaining target distance is an end time when the speed control of the moving target is performed, and the end time may be the end time of the update time interval or a time after the update time interval. Optionally, one or more update time intervals may be included in the speed control of the moving object.
One possible implementation of the speed control unit to obtain the target parameter includes: the speed control unit obtains the target parameters of the moving target in the update time interval through the user interaction interface, see the implementation manner of obtaining the capability parameters in step 701, which is not described herein again.
In another possible implementation, the speed control unit obtains the target parameter from other components in the automated control system shown in fig. 1, such as a sensor component.
In yet another possible implementation manner, the speed control unit obtains a speed curve of another moving object obtained by the speed control unit or another speed control unit in the automation control system shown in fig. 1, and obtains the target parameter of the moving object according to the speed curve of the other moving object.
Illustratively, the moving object is a right leg of the robot, the other moving object is a left leg of the robot, the speed control unit obtains a speed curve of the left leg of the robot, thereby obtaining a speed, an acceleration, a moving distance, and/or the like of the left leg of the robot, and obtains the target parameter of the right leg of the robot based on the speed curve of the left leg of the robot.
In one possible implementation, the speed control unit acquires the state parameter of the moving object from the sensor unit within the update time interval, the state parameter of the moving object being the state parameter of the moving object at the start time of the update time interval.
The target parameters of the moving target in the plurality of update time intervals may be the same or different. Illustratively, the user can reset the target speed and/or the remaining target distance in the current updating time interval through the human-computer interaction interface.
Similarly, the capability parameters of the mobile object in the plurality of update time intervals may be the same or different.
And 703, obtaining a speed curve of the moving target based on the speed fitting of the sine curve according to the capacity parameter, the target parameter and the state parameter.
The velocity profile models a smooth change in velocity as a function of time from the start time of the moving object starting at an initial velocity, passing through the remaining object distance, and reaching the target velocity.
The method based on the velocity fitting of the sinusoidal curve is described with reference to fig. 2, and will not be described herein.
In one possible implementation, step 703 includes performing the following steps:
the method comprises the following steps: and judging the composition of the speed curve of the moving target in the updating time interval according to the capacity parameter, the target parameter and the state parameter.
Step one is used for judging the composition of the speed curve of the moving target in the updating time interval, namely, one or more of the following curves are included but not limited: an acceleration curve, a uniform velocity curve, and a deceleration curve.
It should be noted that, if the velocity profile of the moving object is composed of two or more than two velocity profiles, for any two adjacent profiles, the two adjacent profiles are connected on the time axis and the velocity axis, that is, the terminal velocity of the relatively earlier profile on the time axis is equal to the initial velocity of the relatively later profile on the time axis.
One possible implementation of the first step is as follows: and judging whether the speed curve of the moving target comprises a uniform speed curve or not according to the capacity parameter, the target parameter and the state parameter.
Further, the first step comprises:
obtaining a first sinusoidal speed curve based on sinusoidal speed fitting according to a speed threshold, an acceleration threshold, a deceleration threshold, an initial speed and a target speed of a moving target, and obtaining a first fitting distance according to the first sinusoidal speed curve, wherein the first sinusoidal speed curve is accelerated from the first initial speed to the speed threshold at an acceleration not greater than the acceleration threshold, and is decelerated from the speed threshold to the first target speed at an acceleration not greater than the deceleration threshold, and the first fitting distance is a distance through which the moving target moves according to the first sinusoidal speed curve;
if the first fitting distance is not less than (greater than or equal to) the remaining target distance of the moving target, the composition of the speed curve of the moving target does not include a constant speed curve; alternatively, the first and second electrodes may be,
and if the first fitting distance is smaller than the remaining target distance of the moving target, the speed curve of the moving target comprises a constant speed curve.
The first sinusoidal speed curve is a fitted speed curve obtained based on the fitting of the speed of the sinusoidal curve under the condition that only a fitted acceleration curve and a fitted deceleration curve are included, in the first sinusoidal speed curve, the part of the fitted acceleration curve reaches an acceleration threshold, the part of the fitted deceleration curve reaches a deceleration threshold, and the intersection point of the fitted acceleration curve and the fitted deceleration curve is a speed threshold, and the curve is the fastest curve (namely, the shortest consumed time) from the initial speed of the moving target to the target speed based on the fitting of the speed of the sinusoidal curve; if the first fitting distance is greater than or equal to the remaining target distance of the moving target, the moving speed of the moving target can be controlled according to the fastest curve, so that the moving target reaches the target position, and the consumed time is the shortest consumed time based on the speed fitting of the sinusoidal curve; if the first fitting distance is smaller than the remaining target distance of the moving target, the moving speed of the moving target is controlled according to the steepest curve, when the moving target reaches the target speed, the remaining target distance is not reached, and the speed curve of the moving target also needs to include a constant speed curve.
In a possible implementation, an ideal first sinusoidal velocity profile may be obtained, i.e. the first initial velocity is equal to the initial velocity of the moving object at the beginning of the update time interval, and the first target velocity is equal to the target velocity of the moving object.
In another possible implementation, an ideal first sinusoidal velocity profile cannot be obtained, that is, the first initial velocity is not equal to the initial velocity, and the difference is an initial velocity error; the first target speed is not equal to the target speed, and the difference is the target speed error.
Step two: and obtaining the speed curve of the moving target based on the speed fitting of the sine curve according to the composition of the speed curve of the moving target.
Further, the second step comprises:
if the composition of the speed curve of the moving target comprises an acceleration curve, a uniform speed curve and a deceleration curve, obtaining the speed curve of the moving target according to the first sinusoidal speed curve, the remaining target distance and the speed threshold value and based on the speed fitting of the sinusoidal curve, wherein the speed curve of the moving target is a curve which accelerates from a second initial speed to the speed threshold value at an acceleration not greater than the acceleration threshold value, and is uniform at the speed threshold value, and decelerates from the speed threshold value to a second target speed at an acceleration not greater than the deceleration threshold value, for example, see the related description of case 2 shown in fig. 4;
or if the composition of the speed curve of the moving target comprises an acceleration curve and a deceleration curve, obtaining a peak speed and the speed curve of the moving target according to an acceleration threshold, a deceleration threshold and a remaining target distance in the updating time interval and based on a sinusoidal speed fitting, wherein the speed curve of the moving target is a curve that is accelerated from a third initial speed to the peak speed at an acceleration no greater than the acceleration threshold and is decelerated from the peak speed to the third target speed at an acceleration no greater than the deceleration threshold, for example, see the related description of case 1 shown in fig. 3;
or, if the composition of the speed curve of the moving target includes a deceleration curve, obtaining a peak speed and a speed curve of the moving target according to the acceleration threshold, the deceleration threshold and the remaining target distance of the moving target within the update time interval and based on a sinusoidal speed fitting, where the speed curve of the moving target is a curve decelerating from a third initial speed to a third target speed with an acceleration not greater than the deceleration threshold, for example, see the related description of case 3 shown in fig. 5;
or, if the composition of the velocity profile of the moving target includes an acceleration profile, obtaining a peak velocity profile and a velocity profile of the moving target based on an acceleration threshold, a deceleration threshold and a remaining target distance of the moving target within the update time interval and based on a sinusoidal velocity fit, where the velocity profile of the moving target is a profile accelerated from a third initial velocity to a third target velocity with an acceleration no greater than the acceleration threshold, for example, see the description related to case 4 shown in fig. 6.
Wherein the peak velocity is not greater than the velocity threshold.
In one possible implementation, an ideal second sinusoidal velocity profile may be obtained, i.e. the second initial velocity is equal to the initial velocity and the second target velocity is equal to the target velocity; an ideal third sinusoidal speed profile may be obtained, i.e. the third initial speed equals the initial speed and the third target speed equals the target speed.
In another possible implementation, an ideal second sinusoidal velocity profile cannot be obtained, that is, the second initial velocity is not equal to the initial velocity, and the difference is the initial velocity error; the second target speed is not equal to the target speed, and the difference value is a target speed error; an ideal third sinusoidal speed curve cannot be obtained, namely the third initial speed is not equal to the initial speed, and the difference value is an initial speed error; the third target speed is not equal to the target speed, and the difference is the target speed error.
Optionally, if the speed curve of the moving target includes a constant speed curve, the acceleration curve of the speed curve of the moving target is the same as the acceleration curve of the first sinusoidal speed curve, the speed of the constant speed curve of the moving target is a speed threshold, the duration of the constant speed curve is a value obtained by dividing the difference between the first fitted distance and the remaining target distance by the speed threshold, the deceleration curve of the speed curve of the moving target is obtained by translating the deceleration curve of the first sinusoidal speed curve backward on the time axis, and the time of the translation on the time axis is the duration of the constant speed curve.
In the ideal fitting state, the speed of the speed curve of the moving target obtained according to step 703 at the starting time is equal to the initial speed of the moving target, the speed at the ending time is equal to the target speed of the moving target, and the distance traveled by the moving target from the starting time to the moving ending time according to the speed curve of the moving target is equal to the remaining target distance of the moving target. However, due to the limitations of the calculation capability and the calculation time of the speed control unit, the actually obtained speed curve of the moving target generally has an error with the speed curve of the moving target in an ideal fitting state, and the error is acceptable within a certain error threshold value range. Optionally, the error threshold is settable. Illustratively, the error threshold is 0.001.
This error may manifest as one or more of the following errors:
initial speed error: is the error between the initial velocity of the velocity profile obtained from the sinusoidal fitting and the initial velocity of the moving target;
target speed error: is the error between the target speed of the velocity profile obtained from the sinusoidal fitting and the target speed of the moving target;
distance error: is the error between the fitted distance of the velocity profile from the sinusoidal fitting and the remaining target distance of the moving target.
In one possible implementation, the sinusoidal velocity fit employed by embodiments of the present disclosure is based on sinusoids and is fitted by newton iterations whose iteration termination condition is that one or more of the following errors are not greater than an error threshold: initial velocity error, target velocity error, and range error.
Optionally, in the fitting process through newton iteration, the speed curve of the moving object obtained in the previous update time interval and/or the related parameters of the speed curve may be used as the pre-knowledge condition for the process of obtaining the speed curve of the moving object in the current update time interval, so as to reduce the calculation amount and the processing time for obtaining the speed curve of the moving object in the current update time interval. Alternatively, the relevant parameter of the velocity profile may be a solution obtained in one newton iteration, e.g. f ═ f1, f2, f3 in steps B1, B4 or C1; the solution f ═ f1, f2, f3 of one newton iteration obtained in the previous update time interval may be taken as the initial value of the first one of the newton iterations in the current update time interval where the velocity profile of the moving target was obtained.
Illustratively, step 703 is described below by taking the method of curve fitting based on the sinusoidal velocity illustrated in fig. 2 as an example, and in this embodiment, step 703 includes:
step A: obtaining a first fitted speed curve based on the speed fitting of the sine curve; judging whether the speed curve of the moving target comprises a uniform speed curve or not according to the first fitting speed curve; and if the constant speed curve is included, obtaining a speed curve of the moving target according to the first fitting speed curve.
Wherein the first fitted speed curve is a curve with a peak speed as a speed threshold of the moving target.
Alternatively, the determination may be made based on a first fitted distance that the moving object moves from t according to the first fitted velocity curve0To tfThe distance traveled.
In one possible embodiment, step A comprises steps A1-A3.
Step A1: a first fitted velocity profile is derived based on a sinusoidal velocity fit, which may be represented as a function of velocity with respect to time, and illustratively, may be represented by equation 1, where t1Is to obtain the peak velocity vmaxTime of (t)1=π·vmax/(2·acc),vmaxIs equal to va
Figure BDA0001820052900000151
According to the first fitted velocity curve, v0And vfObtaining t0And tfWherein t is not less than 00<t1<tf≤t2And according to the first fitted velocity curve, t0And tfObtaining a first sinusoidal velocity profile which is t e [ t ] in a first fitted velocity profile0,tf]And (4) partial.
Step A2: obtaining a first fitting distance from the first sinusoidal velocity profile, the first fitting distance being St | t ═ tf-St|t=t0Where St may be a function of distance of the first sinusoidal velocity profile with respect to timeThis is expressed, for example, by equation 2.
Figure BDA0001820052900000152
If the first fitting distance is smaller than the remaining target distance, executing step A3; if the first fitting distance is equal to the remaining target distance, performing step a 4; and if the first fitting distance is greater than the remaining target distance, executing the step B.
Step A3: if the first fitted distance is smaller than the remaining target distance, obtaining a speed curve of the moving target according to the first sinusoidal speed curve, wherein the acceleration curve of the speed curve of the moving target is the same as the acceleration curve of the first sinusoidal speed curve, the speed of the constant speed curve of the moving target is a speed threshold, the duration of the constant speed curve is a value obtained by dividing the difference value between the first fitted distance and the remaining target distance by the speed threshold, the deceleration curve of the speed curve of the moving target is obtained by translating the deceleration curve of the first sinusoidal speed curve backwards on a time axis, the time of translating on the time axis is the duration of the constant speed curve, and the acceleration curve, the constant speed curve and the deceleration curve of the speed curve of the moving target are sequentially connected.
Step A4: and if the first fitting distance is equal to the remaining target distance, taking the first sinusoidal speed curve as the speed curve of the moving target, wherein the curve is an acceleration-first and deceleration curve, and ending the process of obtaining the speed curve of the moving target in the updating time interval.
And B: if the first fitting distance is greater than the remaining target distance, the speed curve of the moving target does not comprise a constant speed curve, and the first fitting speed curve cannot meet the target parameters of the moving target, and whether the speed curve of the moving target is a simple acceleration curve or a simple deceleration curve is continuously judged according to the initial speed of the moving target, the target speed and the remaining target distance; if the speed curve of the moving target is a simple acceleration curve or a simple deceleration curve, obtaining the simple acceleration curve or the simple deceleration curve as the speed curve of the moving target according to the capability parameter, the target parameter and the state parameter of the moving target.
In one possible implementation, step B includes one or more of steps B1-B6; if v is0<vfThen go to step B1; otherwise, step B4 is performed.
Step B1: if v is0<vfThen according to the formula 3, v0、vfAnd the remaining target distance sresObtaining t0And vmaxWherein v ismaxLess than va
Figure BDA0001820052900000161
Wherein v is known0、vfAnd sresThe process of solving equation 3 is as follows:
solving by adopting a Newton iteration method:
let f1 be v0-vinit,f2=vf-vfinal,f3=st-sres,f=[f1,f2,f3],x=[t0,tf,vmax]。
Wherein v isinitIs the initial velocity, v, of the moving objectfinalIs the target velocity, s, of the moving objectresIs the remaining target distance of the moving target.
Solving t by the following Jacobian matrix, namely formulas 4-60、tfAnd vmax
Figure BDA0001820052900000171
Figure BDA0001820052900000172
Figure BDA0001820052900000173
The process of solving equations 4-6 is as follows:
and obtaining the solutions of the formulas 7-8 by a Newton iteration method based on the formulas 7-8, so that the f ═ f1, f2 and f3 of the solution of the next Newton iteration is smaller than the f ═ f1, f2 and f3 of the solution of the previous Newton iteration. Where k is the convergence coefficient.
Order to
Figure BDA0001820052900000174
x(k+1)=x(k)-k·F′(x(k))-1F(x(k)) (8)
Step B2: according to equations 3 and vmaxObtaining a second fitted velocity curve, which can be expressed by equation 3, where t1=π·vmax/(2·acc)。
Step B3: from t e [ t ] of the second fitted curve0,tf]Partially obtaining a second fitting distance, wherein 0 ≦ t0<tf≤t1The second fitting distance may be obtained according to the second fitting curve and equation 3.
If the second fitted distance is equal to the remaining target distance, then let t e [ t ] of the second fitted curve0,tf]And part of the speed curve is taken as the speed curve of the moving target, the speed curve is taken as the acceleration curve, and the process of obtaining the speed curve of the moving target in the updating time interval is ended.
And C, if the second fitting distance is smaller than the residual target distance, executing the step C.
Step B4: if v is0>vfThen according to the formula 9, v0、vfAnd the remaining target distance sresObtaining t0And vmaxWherein v ismaxLess than va
Figure BDA0001820052900000181
Wherein v is known0、vfAnd sresThe process of solving equation 9 is as follows:
solving by adopting a Newton iteration method:
let f1 be v0-vinit,f2=vf-vfinal,f3=st-sres,f=[f1,f2,f3],x=[t0,tf,vmax]。
Solving t by the following Jacobian matrix, namely equations 10-120、tfAnd vmax
Figure BDA0001820052900000182
Figure BDA0001820052900000183
Figure BDA0001820052900000184
The process of solving equations 10-12 is as follows:
and obtaining the solutions of the formulas 7-8 by a Newton iteration method based on the formulas 7-8, so that the f ═ f1, f2 and f3 of the solution of the next Newton iteration is smaller than the f ═ f1, f2 and f3 of the solution of the previous Newton iteration. Where k is the convergence coefficient.
Note that t in step B4 may not be performed in order to reduce the amount of calculation0And vmaxInstead, v obtained in step B1 is usedmaxAs v in step B5max. Therefore, step B4 is optional.
Step B5: according to equations 9 and vmaxObtaining a third fitted velocity curve, which can be expressed by equation 9, wherein t1=π·vmax/(2·acc)。
Step B6: t e [ t ] from the third fitted curve0,tf]Obtaining a third fitting distance in part, wherein t1≤t0<tf≤t2The third fitting distance may be obtained according to the third fitting curve and equation 9.
If the third fitting distance is not less than the remaining target distance, the t epsilon [ t ] of the third fitting curve is determined0,tf]And part of the speed curve is taken as the speed curve of the moving target, the speed curve is a deceleration curve, and the process of obtaining the speed curve of the moving target in the updating time interval is ended.
And if the second fitting distance obtained in the step B3 or the third fitting distance obtained in the step B6 is smaller than the remaining target distance, executing the step C.
And C: if the speed curve of the moving target does not comprise a constant speed curve, the speed curve of the moving target cannot be obtained according to the first fitted speed curve, and the speed curve of the moving target is judged not to be an acceleration curve or a deceleration curve, an acceleration-before-deceleration curve is obtained as the speed curve of the moving target according to the capacity parameters, the target parameters and the state parameters of the moving target.
In one possible implementation, step C includes steps C1-C3.
Step C1: according to the formula 13, v0、vfAnd the remaining target distance sresObtaining t0、tfAnd vmaxWherein v ismaxLess than va
Figure BDA0001820052900000191
Wherein v is known0、vfAnd sresThe process of solving equation 3 is as follows:
solving by adopting a Newton iteration method:
let f1 be v0-vinit,f2=vf-vfinal,f3=st-sres,f=[f1,f2,f3],x=[t0,tf,vmax]。
Wherein v isinitIs the initial velocity, v, of the moving objectfinalIs the target velocity, s, of the moving objectresIs a moving objectThe remaining target distance.
Solving t by the following Jacobian matrix, namely equations 14-160、tfAnd vmax
Figure BDA0001820052900000192
Figure BDA0001820052900000201
Figure BDA0001820052900000202
The process of solving equations 14-16 is as follows:
and obtaining the solutions of the formulas 7-8 by a Newton iteration method based on the formulas 7-8, so that the f ═ f1, f2 and f3 of the solution of the next Newton iteration is smaller than the f ═ f1, f2 and f3 of the solution of the previous Newton iteration. Where k is the convergence coefficient.
Step C2: according to equations 13 and vmaxA fourth fitted velocity curve is obtained, which can be represented by equation 13, where t1=π·vmaxV (2. acc), t e [ t ] from the fourth fitted curve0,tf]A portion of the obtained fourth fitted distance is equal to the remaining target distance, which can be obtained from the fourth fitted curve and equation 13.
Step C3: let t e [ t ] of second fitting curve0,tf]And part of the speed curve is taken as the speed curve of the moving target, the speed curve is an acceleration curve and a deceleration curve, and the process of obtaining the speed curve of the moving target in the updating time interval is finished.
It should be noted that, the parameters in equations 1 to 16 are referred to the foregoing description, and are not described herein again.
And step 704, controlling the speed of the moving target in the updating time interval according to the speed curve of the moving target.
In one possible implementation form of the method,according to t e [ t ] of the velocity curve of the moving object obtained in step 7030,t0+T]The speed of the segment controls the moving target from t0Time t0Speed at time + T, where T is the value of the update interval.
The control can be realized by an electric control unit in a numerical control machine tool or a robot.
Optionally, if a plurality of update time intervals are included in the moving process of the moving object, in each of the update time intervals, steps 702 to 704 are repeated to obtain a speed profile of the moving object in the update time interval, and the moving object is controlled to move to the target position according to the obtained speed profile in the update time interval until the moving object moves to the target position through the remaining target distance.
According to the method and the device, the speed curve of the moving target is obtained according to the capacity parameter of the moving target, the target parameter and the state parameter of the moving target obtained when the set updating time interval is reached, and the speed of the moving target is controlled according to the obtained speed curve in each updating time interval, so that the closed-loop control of the speed of the moving target is realized, and the control precision of the moving target is improved. In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is improved.
In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is further improved.
Referring to fig. 8, which shows a flowchart of a method for controlling the speed of a moving object according to an embodiment of the present disclosure, taking an example of the method applied to the automatic control system shown in fig. 1 as an example, the method includes:
step 801, obtaining an acceleration threshold, a deceleration threshold and a speed threshold of a moving target.
For example, the acceleration threshold is 1000mm/s2The deceleration threshold is 1000mm/s2The speed threshold is 1000 mm/s.
Step 802, when the first update time interval arrives, acquiring a first initial speed, a first target speed and a first remaining target distance of the moving target at the starting time of the first update time interval.
For example, the first initial speed is 0mm/s, the first target speed is 0mm/s, and the first remaining target distance is 1000 mm.
Wherein, the first update time interval is t 0-1 s.
And 803, fitting based on the speed of the sine curve according to the acceleration threshold, the deceleration threshold, the speed threshold, the first initial speed, the first target speed and the first remaining target distance of the moving target to obtain a first speed curve of the moving target.
Referring to fig. 9, a graph of velocity (v) versus time (t) for a first velocity profile and a second velocity profile in an embodiment of the present disclosure is shown. As shown in fig. 9, the first speed profile is an acceleration-followed-by-deceleration profile with a peak speed less than the speed threshold.
And step 804, controlling the speed of the moving target according to the first speed curve in the first updating time interval.
And step 805, when the second updating time interval is reached, acquiring a second initial speed, a second target speed and a second remaining target distance of the moving target at the starting time of the second updating time interval.
Assuming that the speed of the moving object is controlled according to the first speed curve in the first updating time interval and no error exists, when t is equal to 1s, the distance traveled by the moving object is 300 mm; due to errors in the control process, when t is 1s, the distance actually covered by the moving target is 400mm, which is 100mm more than the ideal value, and the second remaining target distance is 1000mm-400mm, which is 600mm, the speed curve of the moving target needs to be recalculated according to the actual state parameters of the moving target.
Assume that the second initial speed is 728mm/s, the second target speed is 0, and the second remaining target distance is 600 mm. Wherein, the starting time of the second updating time interval is t ═ 1 s.
And 806, fitting a second speed curve of the moving target based on the speed of the sine curve according to the acceleration threshold, the deceleration threshold, the speed threshold, the second initial speed, the speed of the second target and the distance of the second remaining target of the moving target.
As shown in fig. 9, the second speed profile is an acceleration-followed-by-deceleration profile, with a peak speed less than the speed threshold and less than the peak speed of the first speed profile.
And step 807, controlling the speed of the moving object according to the second speed curve in the second updating time interval.
It should be noted that the embodiment of the present disclosure is not limited to updating the speed curve twice in the first updating time interval and the second updating time interval, and the speed curve may also be updated in other multiple updating time intervals before the ending time and the moving target may be controlled according to the updated speed curve, which is not limited in this disclosure.
According to the method and the device, the speed curve of the moving target is obtained according to the capacity parameter of the moving target, the target parameter and the state parameter of the moving target obtained when the set updating time interval is reached, and the speed of the moving target is controlled according to the obtained speed curve in each updating time interval, so that the closed-loop control of the speed of the moving target is realized, and the control precision of the moving target is improved. In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is improved.
In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is further improved.
The following are embodiments of the disclosed apparatus and reference may be made to the above-described method embodiments for details not described in detail in the apparatus embodiments.
Referring to fig. 10, a block diagram of a speed control device 1000 for a moving object according to an embodiment of the present disclosure is shown. The device includes: a first acquisition module 1010, a second acquisition module 1020, a speed profile acquisition module 1030, and a control module 1040.
A first obtaining module 1010, configured to obtain a capability parameter of the moving object.
A second obtaining module 1020, configured to obtain, when the set update time interval is reached, a state parameter of the moving target at a start time of the set update time interval and a target parameter of the moving target; the state parameters include at least an initial velocity of the moving object, and the object parameters include at least an object velocity of the moving object and a remaining object distance of the moving object.
A speed curve obtaining module 1030, configured to obtain a speed curve of the moving target based on sinusoidal speed fitting according to the capability parameter, the target parameter, and the state parameter; the velocity profile models a smooth change in velocity as a function of time from the start time of the moving object starting at an initial velocity, passing the remaining object distance, and reaching the target velocity.
And the control module 1040 is configured to control the speed of the moving object within the update time interval according to the speed profile of the moving object.
According to the method and the device, the speed curve of the moving target is obtained according to the capacity parameter of the moving target, the target parameter and the state parameter of the moving target obtained when the set updating time interval is reached, and the speed of the moving target is controlled according to the obtained speed curve in each updating time interval, so that the closed-loop control of the speed of the moving target is realized, and the control precision of the moving target is improved. In addition, the speed curve of the moving target is obtained based on the speed fitting of the sine curve, so that a smoother speed curve can be obtained, and the stability of the moving target is improved.
In one possible implementation, as shown in fig. 11, the speed profile obtaining module 1030 includes:
and a determining submodule 1031, configured to determine a composition of a speed curve of the moving target according to the capability parameter, the target parameter, and the state parameter, where the composition of the speed curve is one or more of an acceleration curve, a deceleration curve, and a uniform speed curve.
And the obtaining submodule 1032 is used for obtaining the speed curve of the moving target according to the composition of the speed curve of the moving target and based on the speed fitting of the sine curve.
Optionally, the capability parameters include a speed threshold, an acceleration threshold, and a deceleration threshold of the moving object.
In a possible implementation manner, the determining sub-module 1031 is configured to obtain a first sinusoidal speed curve based on a sinusoidal speed fitting according to a speed threshold, an acceleration threshold, a deceleration threshold, an initial speed, and a target speed, and obtain a first fitting distance according to the first sinusoidal speed curve; if the first fitting distance is not smaller than the remaining target distance, the composition of the speed curve of the moving target does not include a uniform speed curve; or if the first fitting distance is smaller than the remaining target distance, the speed curve of the moving target comprises a uniform speed curve; wherein the first sinusoidal velocity profile is accelerated from an initial velocity to a velocity threshold at an acceleration no greater than an acceleration threshold and decelerated from the velocity threshold to a target velocity at an acceleration no greater than a deceleration threshold; the first fitted distance is the distance over which the moving object moves according to the first sinusoidal velocity profile.
In another possible implementation, the obtaining sub-module 1032 is configured to, if the speed curve of the moving target includes an acceleration curve, a constant speed curve and a deceleration curve, obtain the speed curve of the moving target according to the first sinusoidal speed curve, the remaining target distance and the speed threshold, and based on a sinusoidal speed fitting, where the speed curve of the moving target is a curve that is accelerated from an initial speed to the speed threshold at an acceleration not greater than the acceleration threshold, is uniform at the speed threshold, and is decelerated from the speed threshold to the target speed at an acceleration not greater than the deceleration threshold; or if the composition of the speed curve of the moving target comprises an acceleration curve and/or a deceleration curve, obtaining a peak speed and a speed curve of the moving target according to an acceleration threshold, a deceleration threshold and a residual target distance and based on a sine curve speed fitting, wherein the speed curve of the moving target is a curve which is accelerated from an initial speed to the peak speed at an acceleration which is not greater than the acceleration threshold and is decelerated from the peak speed to a target speed at an acceleration which is not greater than the deceleration threshold, or the speed curve of the moving target is a curve which is decelerated from the initial speed to the target speed at an acceleration which is not greater than the deceleration threshold, or the speed curve of the moving target is a curve which is accelerated from the initial speed to the target speed at an acceleration which is not greater than the acceleration threshold; wherein the peak velocity is not greater than the velocity threshold.
Optionally, the sinusoidal velocity fitting employed by embodiments of the present disclosure is based on a sinusoid and is fitted by newton iterations, the iteration termination condition of which is that one or more of the following errors are not greater than an error threshold: initial velocity error, target velocity error, and range error.
Referring to fig. 12, a schematic structural diagram of a speed control apparatus 1200 for a moving object according to an embodiment of the present disclosure is shown. The device may be a server or a terminal, in particular:
the speed control device 1200 of a moving object includes a Central Processing Unit (CPU)1201, a system memory 1204 including a Random Access Memory (RAM)1202 and a Read Only Memory (ROM)1203, and a system bus 1205 connecting the system memory 1204 and the central processing unit 1201. The moving object's velocity control apparatus 1200 also includes a basic input/output system (I/O system) 1206, which facilitates the transfer of information between various devices within the computer, and a mass storage device 1207 for storing an operating system 1213, application programs 1214, and other program modules 1215.
The basic input/output system 1206 includes a display 1208 for displaying information and an input device 1209, such as a mouse, keyboard, etc., for user input of information. Wherein a display 1208 and an input device 1209 are connected to the central processing unit 1201 through an input-output controller 1210 coupled to the system bus 1205. The basic input/output system 1206 may also include an input/output controller 1210 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 1210 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1207 is connected to the central processing unit 1201 through a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer-readable media provide non-volatile storage for the moving object's speed control apparatus 1200. That is, the mass storage device 1207 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 1204 and mass storage device 1207 described above may be collectively referred to as memory.
According to various embodiments of the present disclosure, the speed control device 1200 of the moving object may also be operated by a remote computer connected to a network through a network such as the internet. I.e., the moving target, the speed control apparatus 1200 may be connected to the network 1212 through the network interface unit 1211 connected to the system bus 1205, or may be connected to another type of network or a remote computer system (not shown) using the network interface unit 1211.
The memory further includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the method of speed control of a moving object provided in any of figures 2-9.
The disclosed embodiments also provide a non-transitory computer-readable storage medium having instructions that, when executed by a processor of a computing system, enable the computing system to perform the method for controlling a speed of a moving object provided in any of fig. 2-9.
A computer program product containing instructions which, when run on a computer, cause the computer to perform the instructions to carry out the method of speed control of a moving object as provided in any of figures 2 to 9.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (12)

1. A method for controlling the speed of a moving object, the method comprising:
acquiring a capability parameter of a moving target;
when a set updating time interval is reached, acquiring a state parameter of the moving target at the starting moment of the set updating time interval and a target parameter of the moving target; the state parameters at least comprise an initial speed of the moving target, the target parameters at least comprise a target speed of the moving target and a remaining target distance of the moving target, the updating time interval is used for identifying a time period for updating a speed curve, and the remaining target distance is used for representing a distance between a current position of the moving target and a target position for controlling the moving target to reach;
determining whether the composition of the speed curve of the moving target comprises a constant speed curve or not according to the capacity parameter, the target parameter and the state parameter, and obtaining the speed curve of the moving target based on sinusoidal speed fitting according to the composition of the speed curve of the moving target; the velocity profile is modeling a smooth change in velocity as a function of time from the initial velocity, over the remaining target distance, and until the moving target reaches the target velocity at the start time;
and controlling the speed of the moving target in the updating time interval according to the speed curve of the moving target.
2. The method of claim 1, wherein the velocity profile consists of one or more of an acceleration profile, a deceleration profile, and a uniform velocity profile.
3. The method of claim 2, wherein the capability parameters include a speed threshold, an acceleration threshold, and a deceleration threshold of the moving object;
the determining the composition of the velocity profile of the moving target according to the capability parameter, the target parameter and the state parameter includes:
according to the speed threshold, the acceleration threshold, the deceleration threshold, the initial speed and the target speed, a first sinusoidal speed curve is obtained based on sinusoidal speed fitting, and a first fitting distance is obtained according to the first sinusoidal speed curve;
if the first fitting distance is not smaller than the remaining target distance, the composition of the speed curve of the moving target does not include a uniform speed curve; alternatively, the first and second electrodes may be,
if the first fitting distance is smaller than the remaining target distance, the speed curve of the moving target comprises a uniform speed curve;
wherein the first sinusoidal velocity profile is accelerated from the initial velocity to the velocity threshold at an acceleration no greater than the acceleration threshold and decelerated from the velocity threshold to the target velocity at an acceleration no greater than the deceleration threshold; the first fitted distance is a distance through which the moving target moves according to the first sinusoidal velocity profile.
4. The method of claim 2, wherein said deriving a velocity profile of said moving object based on a sinusoidal velocity fit according to a composition of said velocity profile of said moving object comprises:
if the speed curve of the moving target comprises an acceleration curve, a constant speed curve and a deceleration curve, obtaining the speed curve of the moving target according to a first sinusoidal speed curve, the remaining target distance and a speed threshold value and based on sinusoidal speed fitting, wherein the speed curve of the moving target is a curve which is accelerated from the initial speed to the speed threshold value at an acceleration not greater than the acceleration threshold value, is at a constant speed at the speed threshold value and is decelerated from the speed threshold value to the target speed at an acceleration not greater than the deceleration threshold value; alternatively, the first and second electrodes may be,
if the composition of the velocity profile of the moving object comprises an acceleration profile and/or a deceleration profile, obtaining a peak speed and a speed curve of the moving target according to the acceleration threshold, the deceleration threshold and the remaining target distance and based on a sinusoidal speed fitting, the velocity profile of the moving object over the update time interval is accelerated from the initial velocity to the peak velocity with an acceleration no greater than the acceleration threshold, and decelerating from the peak speed to the target speed with an acceleration no greater than the deceleration threshold, or the velocity profile of the moving target is a profile decelerating from the initial velocity to the target velocity with an acceleration not greater than the deceleration threshold, or the velocity profile of the moving target is a profile accelerated from the initial velocity to the target velocity with an acceleration not greater than the acceleration threshold;
wherein the peak velocity is not greater than the velocity threshold.
5. The method of any of claims 1-4, wherein the sinusoidal velocity fit is based on a sinusoid and is fitted by Newton iterations, the iteration termination conditions for the Newton iterations including at least one of an initial velocity error, a target velocity error, and a distance error being no greater than an error threshold;
wherein the initial velocity error is an error between an initial velocity of a velocity profile obtained from the sinusoidal fitting and the initial velocity;
the target speed error is an error between a target speed of a speed curve obtained by fitting the sine curve and the target speed;
the distance error is an error between a fitted distance of a velocity curve obtained from the sinusoidal fitting and the remaining target distance.
6. A speed control apparatus for a moving object, the apparatus comprising:
the first acquisition module is used for acquiring the capability parameter of the moving target;
the second acquisition module is used for acquiring the state parameter of the moving target at the starting moment of the set updating time interval and the target parameter of the moving target when the set updating time interval is reached; the state parameters at least comprise an initial speed of the moving target, the target parameters at least comprise a target speed of the moving target and a remaining target distance of the moving target, the updating time interval is used for identifying a time period for updating a speed curve, and the remaining target distance is used for representing a distance between a current position of the moving target and a target position for controlling the moving target to reach;
the speed curve acquisition module comprises a determination submodule and an acquisition submodule, the determination submodule is used for determining whether the composition of the speed curve of the moving target comprises a constant speed curve or not according to the capacity parameter, the target parameter and the state parameter, and the acquisition submodule is used for obtaining the speed curve of the moving target based on sinusoidal speed fitting according to the composition of the speed curve of the moving target; the velocity profile is modeling a smooth change in velocity as a function of time from the initial velocity, over the remaining target distance, and until the moving target reaches the target velocity at the start time;
and the control module is used for controlling the speed of the moving target in the updating time interval according to the speed curve of the moving target.
7. The apparatus of claim 6, wherein the velocity profile consists of one or more of an acceleration profile, a deceleration profile, and a constant velocity profile.
8. The apparatus of claim 7, wherein the capability parameters include a speed threshold, an acceleration threshold, and a deceleration threshold of the moving object, the determination submodule to,
according to the speed threshold, the acceleration threshold, the deceleration threshold, the initial speed and the target speed, a first sinusoidal speed curve is obtained based on sinusoidal speed fitting, and a first fitting distance is obtained according to the first sinusoidal speed curve;
if the first fitting distance is not smaller than the remaining target distance, the composition of the speed curve of the moving target does not include a uniform speed curve; alternatively, the first and second electrodes may be,
if the first fitting distance is smaller than the remaining target distance, the speed curve of the moving target comprises a uniform speed curve;
wherein the first sinusoidal velocity profile is accelerated from the initial velocity to the velocity threshold at an acceleration no greater than the acceleration threshold and decelerated from the velocity threshold to the target velocity at an acceleration no greater than the deceleration threshold; the first fitted distance is a distance through which the moving target moves according to the first sinusoidal velocity profile.
9. The apparatus of claim 7, wherein the acquisition submodule is configured to,
if the speed curve of the moving target comprises an acceleration curve, a constant speed curve and a deceleration curve, obtaining the speed curve of the moving target according to a first sinusoidal speed curve, the remaining target distance and a speed threshold value and based on sinusoidal speed fitting, wherein the speed curve of the moving target is a curve which is accelerated from the initial speed to the speed threshold value at an acceleration not greater than the acceleration threshold value, is at a constant speed at the speed threshold value and is decelerated from the speed threshold value to the target speed at an acceleration not greater than the deceleration threshold value; alternatively, the first and second electrodes may be,
if the composition of the velocity profile of the moving object comprises an acceleration profile and/or a deceleration profile, obtaining a peak speed and a speed curve of the moving target according to the acceleration threshold, the deceleration threshold and the remaining target distance and based on a sinusoidal speed fitting, the velocity profile of the moving object over the update time interval is accelerated from the initial velocity to the peak velocity with an acceleration no greater than the acceleration threshold, and decelerating from the peak speed to the target speed with an acceleration no greater than the deceleration threshold, or the velocity profile of the moving target is a profile decelerating from the initial velocity to the target velocity with an acceleration not greater than the deceleration threshold, or the velocity profile of the moving target is a profile accelerated from the initial velocity to the target velocity with an acceleration not greater than the acceleration threshold;
wherein the peak velocity is not greater than the velocity threshold.
10. The apparatus according to any one of claims 6 to 9,
the sinusoidal speed fitting is based on a sinusoidal curve and is performed through Newton iteration, and the iteration termination condition of the Newton iteration comprises that at least one error of an initial speed error, a target speed error and a distance error is not larger than an error threshold value;
wherein the initial velocity error is an error between an initial velocity of a velocity profile obtained from the sinusoidal fitting and the initial velocity;
the target speed error is an error between a target speed of a speed curve obtained by fitting the sine curve and the target speed;
the distance error is an error between a fitted distance of a velocity curve obtained from the sinusoidal fitting and the remaining target distance.
11. An apparatus for velocity control of a moving object, the apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement a method for velocity control of a moving object as claimed in any one of claims 1 to 5.
12. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to implement a method of velocity control of a moving object according to any one of claims 1-5.
CN201811161089.4A 2018-09-30 2018-09-30 Speed control method and device for moving target and readable storage medium Active CN110968045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811161089.4A CN110968045B (en) 2018-09-30 2018-09-30 Speed control method and device for moving target and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161089.4A CN110968045B (en) 2018-09-30 2018-09-30 Speed control method and device for moving target and readable storage medium

Publications (2)

Publication Number Publication Date
CN110968045A CN110968045A (en) 2020-04-07
CN110968045B true CN110968045B (en) 2021-03-26

Family

ID=70029163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161089.4A Active CN110968045B (en) 2018-09-30 2018-09-30 Speed control method and device for moving target and readable storage medium

Country Status (1)

Country Link
CN (1) CN110968045B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113091601B (en) * 2021-04-12 2023-03-24 上海大学 High-speed drive motor rotation angular displacement measurement error testing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103925929A (en) * 2013-01-14 2014-07-16 北京中交兴路信息科技有限公司 Method and device for statistics of movement distance of moving target
CN104062902A (en) * 2014-05-15 2014-09-24 江南大学 Delta robot time optimal trajectory planning method
CN106527436A (en) * 2016-11-11 2017-03-22 广东电网有限责任公司电力科学研究院 Robot attitude detection and work control method and device
CN108205318A (en) * 2017-11-30 2018-06-26 香港中文大学(深圳) Method for planning track of robot and device
CN108549328A (en) * 2018-03-22 2018-09-18 汇川技术(东莞)有限公司 Adaptive speed method and system for planning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103925929A (en) * 2013-01-14 2014-07-16 北京中交兴路信息科技有限公司 Method and device for statistics of movement distance of moving target
CN104062902A (en) * 2014-05-15 2014-09-24 江南大学 Delta robot time optimal trajectory planning method
CN106527436A (en) * 2016-11-11 2017-03-22 广东电网有限责任公司电力科学研究院 Robot attitude detection and work control method and device
CN108205318A (en) * 2017-11-30 2018-06-26 香港中文大学(深圳) Method for planning track of robot and device
CN108549328A (en) * 2018-03-22 2018-09-18 汇川技术(东莞)有限公司 Adaptive speed method and system for planning

Also Published As

Publication number Publication date
CN110968045A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN108674922B (en) Conveyor belt synchronous tracking method, device and system for robot
US10259118B2 (en) Robot system having function of simplifying teaching operation and improving operating performance by learning
CN107085428B (en) Intelligent moving method, device, robot and storage medium
US9108316B2 (en) Method and system for in-production optimization of the parameters of a robot used for assembly
CN111727411B (en) Equipment motion control method, equipment and storage device
CN108279674B (en) Intelligent moving method, device, robot and storage medium
JP2011192016A (en) Controller support device, simulation method of control program, support program of controller and computer-readable storage medium storing support program of controller
CN108435856B (en) Bender slider positioning compensation method, system, equipment and numerical control system
CN111993411A (en) Robot motion planning method and device, robot and storage medium
CN107561933B (en) Speed adjusting method and device, computer equipment and storage medium
CN110968045B (en) Speed control method and device for moving target and readable storage medium
CN110716551A (en) Mobile robot driving strategy determination method and device and mobile robot
CN111103792A (en) Robot control method, device, electronic equipment and readable storage medium
CN108472808B (en) Synchronization of multiple robots
CN109313429B (en) S-shaped speed planning method, device and system, robot and numerical control machine
CN112720492B (en) Complex track fairing method and device for multi-axis robot, medium and electronic equipment
CN113021329B (en) Robot motion control method and device, readable storage medium and robot
CN106826814B (en) Motion control method and motion control system of robot
CN115422787B (en) Engine simulation model balancing method and device, electronic equipment and storage medium
CN114800523B (en) Mechanical arm track correction method, system, computer and readable storage medium
CN108847807B (en) Method, device and equipment for planning motion trail of motor and storage medium
CN115847395A (en) Method and system for judging in-place movement of extractor, electronic equipment and storage medium
CN113467466A (en) Industrial robot control method and device and industrial robot
CN110450160B (en) Control method of open programming-free robot
JP2012198785A (en) Servo motor control device and servo motor control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310051 5th floor, building 1, building 2, no.700 Dongliu Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address