Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
The embodiment of the invention obtains an action instruction sent by a main control unit; acquiring command control parameters of the steering engine corresponding to the action commands, and determining a plurality of working periods corresponding to the command control parameters; acquiring the current operating time of the steering engine; and determining the working time period of the running time, and executing the response to the action command based on the command control parameter corresponding to the working time period. In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 shows an implementation process of a control response method of a steering engine according to an embodiment of the present invention, which is detailed as follows:
in S101, an action instruction issued by the main control unit is acquired.
When the steering engine is to enter the running state, the steering engine needs to receive a corresponding action command to plan an action path of the steering engine except for working under a proper power supply voltage and other necessary conditions. The action command is sent by a main control unit connected with the steering engine. In the field of robots, an action command can be a pulse width modulation signal, is generated by a controller connected with a control line of a steering engine, is transmitted to the steering engine through an electric signal, is demodulated by the steering engine, and is transmitted to a specific driving circuit to be executed. In this step, the steering engine obtains the action command sent by the main control unit, and determines the action response path in a period of time later.
In S102, command control parameters of the steering engine corresponding to the action commands are obtained, and a plurality of working periods corresponding to the command control parameters are determined.
The motion process of the steering engine needs to be limited by command control parameters, and the quantized parameters can be determined by a control method and a control strategy and are not limited to a certain data format. The device is characterized in that the response rate of the steering engine to the instruction changes when the steering engine moves, and the parameters have adjustability and can be suitable for most action conditions of the motion of the steering engine. Due to the complexity of the steering engine in the instruction executing process, the steering engine may have a plurality of instruction control parameters, and after the plurality of instruction control parameters are obtained, a plurality of working periods of the steering engine from front to back can be determined according to a specific rule. The specific rule is a rule for distinguishing the working period, and may be an order in which the instruction control parameters are acquired or a portion contained in the instruction control parameters that can be used for determining the working period.
In an actual project situation, the command control parameters may have the same values, for example, the operating process of the steering engine takes the middle time point of the whole process as a separation point, and the command control parameters of the first half and the second half correspond in a mirror image manner. Because the command control parameters are obtained according to the specific rule, different working periods are distinguished, and a plurality of correct working periods can be determined although the values of some command control parameters are the same.
In S103, the current operating time of the steering engine is acquired.
The whole working process of the steering engine is a response process to the action command, and the response process takes time as a control factor, so that after a plurality of working periods existing in the whole working process of the steering engine are determined, the current running time of the steering engine needs to be obtained to determine which command control parameter is applied to make action response to the action command. Generally, the current operation time of the steering engine is to start timing after the steering engine receives a new work instruction. In some special working conditions, the current running time of the steering engine can also be the time after the steering engine receives the action command, which is obtained by numerical processing after the steering engine is powered on.
Preferably, the optimization of step S103 can result in the following steps:
and after the action command is received, a timer of the steering engine starts to time, and the current timing time is obtained as the running time.
The main control unit transmits the action command to the steering engine through an electric signal, and when the steering engine is ready to execute the action command, the steering engine can immediately inform a timer to start timing, wherein the timer can be a clock carried by a steering engine system or a device which is externally connected with a port of the steering engine and can perform timing. In the timing process, the steering engine can acquire the current timing time at any time and the current timing time can be used as the operation time of the steering engine for executing the action command.
In S104, the working period in which the running time is located is determined, and a response to the action command is executed based on the command control parameter corresponding to the working period.
After a plurality of working periods of the steering engine are determined, the working periods are under the running time of one instruction received by the steering engine and are distinguished by instruction control parameters, so that the condition of time period overlapping does not exist. After the real-time operation time of the steering engine is obtained, the working time period to which the steering engine belongs can be judged through the time point, the instruction control parameters corresponding to the working time period are called, and the steering engine responds to the working instruction under the intervention control of the corresponding instruction control parameters.
As can be seen from the embodiment shown in fig. 1, in the first embodiment of the present invention, by obtaining an action instruction sent by a main control unit, obtaining an instruction control parameter of a steering engine corresponding to the action instruction, determining a plurality of working periods corresponding to the instruction control parameter, obtaining a current operating time of the steering engine, determining the working period in which the operating time is located, and executing a response to the action instruction based on the instruction control parameter corresponding to the working period, the steering engine realizes a multi-stage action instruction response, and can adapt to action requirements at different periods in a response process when the steering engine executes the action instruction response, thereby improving usability.
Fig. 2 is a flowchart of a control response method for a steering engine according to a second embodiment of the present invention, where the control response method is applicable to a robot steering engine, and as shown in the figure, the control response method may include the following steps:
in S201, an action instruction issued by the main control unit is acquired.
When the steering engine is to enter the running state, the steering engine needs to receive a corresponding action command to plan an action path of the steering engine except for working under a proper power supply voltage and other necessary conditions. The action command is sent by a main control unit connected with the steering engine, and in the field of robots, the action command can be a pulse width modulation signal, is generated by a controller connected with a steering engine control line, is transmitted to the steering engine through an electric signal, and is transmitted to a specific driving circuit to be executed after being demodulated by the steering engine. In this step, the steering engine obtains the action command sent by the main control unit, and determines the action response path in a period of time later.
In S202, an instruction control parameter set corresponding to the action instruction is obtained, where the instruction control parameter set includes one or more instruction control parameters, and a plurality of working periods having a corresponding relationship with the instruction control parameters are determined.
In some specific project situations, the command control parameter corresponding to the motion command for instructing the steering engine to perform motion may not be only one numerical value or factor, but may be a set of multiple command control parameters. For example, in a control response method of a steering engine, a PID (proportional-integral-derivative) control method is often used for control. When the PID control method is applied, three command control parameters are required to be adjusted, including a proportional coefficient, an integral time constant and a differential time constant.
Generally, increasing the proportionality coefficient can increase the response speed of the system, but if the proportionality coefficient is too large, the system can generate overshoot and generate oscillation or increase the oscillation frequency, the adjustment time is prolonged, the stability of the system is deteriorated or the system becomes unstable, and if the proportionality coefficient is too small, the action of the system is retarded; for the integral time constant, increasing the integral time constant is beneficial to reducing overshoot and oscillation, so that the system is more stable, but the time for eliminating the static error of the system is prolonged, and if the integral time constant is too small, the stability of the system is reduced, and the oscillation frequency of the system is increased; the dynamic characteristics of the system can be improved by adjusting the differential control constant, such as reducing overshoot and shortening adjustment time, after the proportional control is increased, the steady-state error can be reduced, and the control precision is improved.
The action of the three instruction control parameters of the PID control method can be seen that the change of the three instruction control parameters can directly influence the action instruction response effect of the steering engine, so that in the embodiment of the invention, the instruction control parameter set corresponding to the action instruction is obtained, and the actual control response process of the steering engine can be better met.
In S203, the current operating time of the steering engine is acquired.
The whole working process of the steering engine is a response process to the action command, and the response process takes time as a control factor, so that after a plurality of working periods existing in the whole working process of the steering engine are determined, the current running time of the steering engine needs to be obtained to determine which command control parameter is applied to make action response to the action command. Generally, the current operation time of the steering engine is to start timing after the steering engine receives a new work instruction. In some special working conditions, the current running time of the steering engine can also be the time after the steering engine receives the action command, which is obtained by numerical processing after the steering engine is powered on.
In S204, the working time period in which the running time is located is determined, and a response to the action instruction is executed based on the instruction control parameter corresponding to the working time period.
After a plurality of working periods of the steering engine are determined, the working periods are under the running time of one instruction received by the steering engine and are distinguished by instruction control parameters, so that the condition of time period overlapping does not exist. After the real-time operation time of the steering engine is obtained, the working time period to which the steering engine belongs can be judged through the time point, the instruction control parameters corresponding to the working time period are called, and the steering engine responds to the working instruction under the influence control of the corresponding instruction control parameters.
In the second embodiment of the invention, the command control parameter set corresponding to the action command is obtained, so that the control response process of the steering engine is more consistent with the actual application situation, and the applicability of the control response method of the steering engine is improved; meanwhile, after the action command is received, a timer of the steering engine starts timing as the running time of the command, and the accuracy of time acquisition is improved.
As described above, obtaining the instruction control parameter corresponding to the action instruction and determining the plurality of working periods corresponding to the instruction control parameter, as shown in fig. 3, may be further optimized as another embodiment three of the present invention, where the scheme is implemented as follows:
in S301, a first instruction control parameter, a second instruction control parameter, and a third instruction control parameter corresponding to the action instruction are obtained, and a start-up working period, an operation working period, and a stop working period, in which there is a correspondence relationship with the first instruction control parameter, the second instruction control parameter, and the third instruction control parameter, respectively, are determined.
In a common practical application, the operation period of the steering engine can be divided into three segments. After receiving an action instruction transmitted by a main control unit, the steering engine acquires a first instruction control parameter and enters a starting working period, and a driving circuit of the steering engine rapidly generates enough driving force during the starting working period; then the steering engine acquires a second instruction control parameter and enters an operation working period, and the time of the period is usually longest; and finally, the steering engine acquires a third instruction control parameter, enters a stop working period and is required to stop acting without shaking.
In S302, if the running time is in the start-up working period, executing a first response based on the first command control parameter; if the running time is in the running working period, executing a second response based on the second instruction control parameter; if the running time is in the work stopping period, executing a third response based on the third instruction control parameter; wherein a response rate of the first response is greater than a response rate of the second response, and a response rate of the second response is greater than a response rate of the third response.
And when the steering engine runs to a corresponding working period, executing response to the action command based on the corresponding command control parameter. Particularly, the steering engine is required to be started quickly in the starting working period and can act in a short time, so that the corresponding response rate of the first response to the action command is highest; the steering engine is required to act stably in the operating working period, so that the response rate of the corresponding second response to the action command is smaller than that of the first response; and in the final work stopping period, the steering engine is required to have no jitter and overshoot when being stopped, so that the response rate of the corresponding third response to the action command is smaller than that of the second response. In the third embodiment of the invention, the working time periods of the steering engine are determined to be the starting working time period, the running working time period and the stopping working time period respectively through the three instruction control parameters, so that the determining process of the working time periods of the steering engine is simplified, and a user can control the steering engine more conveniently.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Corresponding to the control response method of the steering engine in the above embodiment, fig. 4 shows a structural block diagram of a control response device of the steering engine provided by the fourth embodiment of the present invention, where the control response device of the steering engine may be applied to a steering engine of a robot, and a command control parameter corresponding to a motion command is obtained through the motion command, so as to determine a plurality of working periods corresponding to the command control parameter, and determine the working periods according to the current running time of the steering engine, and execute a response to the motion command based on the command control parameter corresponding to the working period, so as to effectively ensure fast response when the steering engine is started, smooth running, and no jitter and no overshoot when the steering engine is stopped, and improve the control response effect of the steering engine.
Referring to fig. 4, the apparatus includes:
a first obtaining unit 41, configured to obtain an action instruction sent by the main control unit;
the second obtaining unit 42 is configured to obtain instruction control parameters of the steering engine corresponding to the action instruction, and determine a plurality of working periods corresponding to the instruction control parameters;
a third obtaining unit 43, configured to obtain a current operation time of the steering engine;
a response unit 44, configured to determine the working period in which the running time is located, and execute a response to the action instruction based on the instruction control parameter corresponding to the working period.
Optionally, the third obtaining unit 43 specifically includes:
and after the action command is received, a timer of the steering engine starts timing, and the current timing time is acquired and recorded to be used as the running time.
Optionally, the second obtaining unit 42 further includes:
and the acquisition subunit is used for acquiring a first instruction control parameter, a second instruction control parameter and a third instruction control parameter of the steering engine corresponding to the action instruction, and determining a starting working period, an operating working period and a stopping working period which respectively have corresponding relations with the first instruction control parameter, the second instruction control parameter and the third instruction control parameter.
Optionally, the obtaining subunit specifically includes:
if the running time is in the starting working period, executing a first response based on the first instruction control parameter; if the running time is in the running working period, executing a second response based on the second instruction control parameter; if the running time is in the work stopping period, executing a third response based on the third instruction control parameter; wherein a response rate of the first response is greater than a response rate of the second response, and a response rate of the second response is greater than a response rate of the third response.
Corresponding to the control response method of the steering engine described in the above embodiments, another embodiment of the present invention discloses a steering engine that adopts the control response method of the steering engine of the first embodiment, the second embodiment, or the third embodiment. The steering engine comprises a control circuit, wherein the control circuit executes the control response method of the steering engine in the first embodiment, the second embodiment or the third embodiment to generate a driving signal and then outputs the driving signal. The steering engine using the control response method of the steering engine is simple and flexible in control mode, and can meet the demand of steering engine subsection command response more easily.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed method, device and steering engine may be implemented in other ways. For example, the above-described embodiments of the device and steering engine are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.