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 present application. It will be apparent, however, to one skilled in the art that the present application 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 application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The torque control method provided by the embodiment of the application can be applied to terminal devices such as robots, mechanical arms, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices and the like. The terminal device comprises a processor, a series elastic driver and a load, wherein the processor is used for controlling the series elastic driver to drive the load to move, and the embodiment of the application does not limit the specific type of the terminal device. The robot may be a service robot, an underwater robot, an entertainment robot, a military robot, an agricultural robot, and the like, and the embodiment of the present application does not limit the specific type of the robot. The type of load differs depending on the type of terminal equipment, for example, when the terminal equipment is a robot, the load may be a movable joint of the robot.
As shown in fig. 1, a torque control method provided in the embodiment of the present application includes the following steps S101 to S105:
and S101, establishing a nominal dynamic model of the series elastic driver.
In an application, the series elastic driver comprises a motor and an elastic element, and since the elastic element of the series elastic driver decouples the motor from the load, a nominal dynamic model of the series elastic driver consists of two parts, namely a dynamic model of the motor and a dynamic model of the load.
In one embodiment, step S101 includes:
and establishing a nominal dynamic model of the series elastic driver according to the dynamic model of the motor and the dynamic model of the load.
In one embodiment, the motor dynamics model is expressed as:
wherein, JmRepresenting the moment of inertia, theta, of the machinemRepresenting the angle of rotation of the motor, BmRepresenting the damping term, K, of the machinesRepresenting the stiffness, theta, of the elastic elementlRepresenting the angle of rotation, τ, of the loaddmAn uncertainty factor, τ, representing said motormRepresenting the output torque of the motor.
In application, the relation between the output torque of the motor and the input current of the motor is taumβ is an equivalent torque coefficient of the motor, and uncertainty factors of the motor include coulomb friction and a dynamic model of the motorError of (2), etc.
In one embodiment, the expression of the dynamic model of the load is:
wherein, JlRepresenting the moment of inertia of said load, BlA damping term, τ, representing said loadextRepresenting the moment from the outside environment to which the load is subjected.
In one embodiment, the nominal kinetic model is expressed as:
τs(s)=KsΔθ
Δθ=θm-θl
wherein, Pn(s) represents the nominal dynamics model, i(s) represents the current value of the motor input, τs(s) represents an output torque of the series elastic driver, β represents an equivalent torque coefficient of the motor, s represents a complex variable in laplace transform, and Δ θ represents a deformation amount of the elastic element.
In application, τs(s)=KsΔ θ is the elastic torque generated by the elastic element, i.e., the output torque of the series elastic driver. Considering the ideal situation, neglecting the disturbance quantity tau of the motordm(uncertain factor of motor) and external force tau borne by loadextWhen the load is fixed, the system open loop transfer function P of the series elastic driver with the current as the input of the series elastic driver and the elastic moment as the output of the series elastic driver can be obtained by the dynamic model of the motor and the dynamic model of the loadn(s) (i.e., the nominal kinetic model). All parameters for calculating and obtaining the nominal dynamic model can be identified and obtained through a motor manual or a parameter identification algorithm and belong to known parameters.
And S102, obtaining a real-time disturbance quantity through a disturbance observer according to the nominal dynamic model, the current value input by the motor at the current moment and the output torque of the series elastic driver at the current moment.
As shown in fig. 2, a diagram illustrating a mathematical model of a disturbance observer is exemplary; wherein, CffFor a feed-forward filter, τrefFor the desired output torque, PD represents a Proportional-differential controller (PD), i represents the current value of the motor input, d represents the disturbance to which the system is subjected, P represents the actual dynamic model of the system, SEA represents the series elastic drive, and P represents the actual dynamic model of the systemnFor a nominal kinetic model, Pn -1Is an inverse model of the nominal dynamics model, Q is a low-pass filter, DOB represents a Disturbance OBserver (DOB), τsRepresenting the output torque of the series elastic driver.
In application, the inverse model P due to the nominal kinetic modeln -1Physically, it is not possible to implement it, and therefore it is necessary to introduce a low-pass filter Q, which may be a second order Butterworth filter in particular.
In one embodiment, step S102 includes:
establishing a filter model of the low-pass filter through a nominal dynamic model;
obtaining an inverse model of the nominal dynamic model according to the nominal dynamic model through a disturbance observer;
and obtaining a real-time disturbance quantity according to the inverse model of the nominal dynamic model, the current value input by the motor at the current moment, the output torque of the series elastic driver at the current moment and the filter model.
In one embodiment, the filter model is expressed as:
wherein Q(s) represents the filter model and s represents in the Laplace transformComplex variable, ωqRepresenting the cut-off frequency of the low-pass filter.
In application, the filter model Q(s) is an equivalent mathematical model of the low-pass filter Q shown in fig. 2. Cut-off frequency omega of low-pass filterqShould be greater than the upper limit of the force control bandwidth of the series elastic driver, while avoiding too high a value to filter the high frequency noise as much as possible, thereby eliminating the effect of the high frequency noise, i.e., the cut-off frequency should be greater than the upper limit of the force control bandwidth of the series elastic driver and less than the frequency of the high frequency noise.
In one embodiment, the expression of the real-time disturbance amount is:
wherein the content of the first and second substances,
the disturbance variable represented, Q(s) represents the filter model, i
0(s) represents a current value input by the motor at the current moment,
an inverse model representing the nominal kinetic model,
representing the output torque of the series elastic driver at the present moment.
In application, the output torque tau of the series elastic driver
sCan pass through the rigidity K of the calibrated elastic element
sAnd detecting the deformation quantity delta theta of the elastic element, and combining the current value i input by the motor at the current moment and the output torque tau of the series elastic driver at the current moment according to the graph of fig. 2
sObtaining the estimated value of the real-time disturbance quantity
In application, the handleReal-time disturbance amount estimation value
Compensating the output torque tau of the equivalent series elastic driver to the input of the series elastic driver
s(s) can be expressed as:
as a real-time disturbance amount estimate
When the frequency of (a) is lower than the cutoff frequency of the low-pass filter q(s), q(s) is 1, the above equation can be simplified as follows:
τs(s)=Pn(s)i(s)
i.e. the model of the series elastic actuator is adjusted from the actual kinetic model P(s) to the nominal kinetic model Pn(s) the influence of the disturbance quantity d(s) is isolated.
And S103, obtaining a feedforward dynamic model through a feedforward compensator according to the nominal dynamic model and the scaling coefficient of the rotational inertia of the motor.
In application, in order to improve the dynamic performance of the series elastic driver, a feedforward compensator based on a nominal dynamic model is introduced, and the feedforward compensator is obtained by an inverse model P of the nominal dynamic modelff -1(s) and a second order Butterworth filter Q(s). And inverse model P in the disturbance observern -1In the difference thatff -1(s) comprises a scaling factor alpha of the rotational inertia of the motor, so that the rotational inertia in the nominal dynamic model for feedforward is alpha Jm. Alpha is 0<α<1, can be set according to actual needs, and the purpose of introducing alpha is to reduce overcompensation caused by feed-forward of a nominal dynamic model and simultaneously restrain resonance phenomena caused by elastic elements.
In one embodiment, the feed forward kinetic model is expressed as:
wherein, Pff(s) represents the feed forward dynamics model, α represents a scaling factor of the rotational inertia of the motor, β represents an equivalent moment factor of the motor, KsRepresenting the stiffness of the elastic element, JmRepresenting the rotational inertia of the motor, s representing a complex variable in the Laplace transform, BmRepresenting a damping term of the electrical machine.
And step S104, acquiring a feedforward compensation quantity according to the feedforward dynamic model and the expected output torque of the series elastic driver.
In one embodiment, step S104 includes:
and obtaining a feedforward compensation quantity according to the feedforward dynamic model, the expected output torque of the series elastic driver and the filter model.
In one embodiment, the feedforward compensation amount is expressed by:
wherein, C
ff(s) represents the amount of said feed forward compensation,
an inverse model representing the feedforward dynamics model, Q(s) the filter model, τ
ref(s) represents a desired output torque of the series elastic driver.
And S105, obtaining an expected current value according to the real-time disturbance quantity, the feedforward compensation quantity and the ideal current value obtained through the proportional differential controller, and outputting the expected current value to the motor.
In applications where a suitable feedback controller is required to stabilize a closed loop system in torque control of a series elastic actuator, a proportional-derivative controller as shown in fig. 2 may be employed. The ideal current value is the current value calculated by the proportional-derivative controller for output to the motor.
In one embodiment, the expression of the ideal current value is:
wherein i
PD(s) represents the ideal current value, K
PCoefficient, τ, representing a proportional element in said proportional-derivative controller
ref(s) represents a desired output torque of the series elastic driver,
representing the output torque, K, of the series elastic drive at the present moment
PCoefficient, tau, representing a differential element in said proportional-differential controller
ref'(s) denotes the derivative of the desired output torque of the series elastic drive,
representing the inverse of the output torque of the series elastic driver at the present moment.
In one embodiment, the desired current value is expressed as:
wherein i
1(s) represents a desired current value of the motor,
representing said real-time disturbance quantity, C
ff(s) represents the feedforward compensation amount, i
PD(s) represents the ideal current value.
According to the torque control method provided by the embodiment of the application, the closed loop system of the series elastic driver can be stabilized by adopting the proportional differential controller; because the series elastic driver system can be influenced by friction force and external disturbance, the series elastic driver is normalized by adopting a disturbance observer, so that the observation and compensation of the disturbance quantity can be realized; in order to improve the dynamic performance of a series elastic driver system, a feedforward compensator based on a nominal dynamic model is adopted, and in order to avoid feedforward overcompensation of the nominal dynamic model, a scaling coefficient of equivalent rotational inertia is introduced into a feedforward item; the control system composed of the proportional-derivative controller, the disturbance observer and the feedforward compensator can improve the dynamic response performance of the terminal equipment and ensure the control precision and the robustness to external disturbance, and the disturbance observer and the feedforward compensator are both positioned in the inner ring of the control framework of the terminal equipment, so that the control algorithm of the outer ring can achieve a better control effect on the basis of the control algorithm.
The embodiment of the application also provides a torque control device, which is used for executing the steps in the torque control method embodiment. The moment control device may be a virtual appliance (virtual application) in the terminal device, which is executed by a processor of the terminal device, or may be the terminal device itself.
As shown in fig. 3, a torque control device provided in an embodiment of the present application includes:
a model establishing unit 101 for establishing a nominal dynamic model of the series elastic driver;
the disturbance observation unit 102 is configured to obtain a real-time disturbance amount according to the nominal dynamic model, a current value input by the motor at the current moment, and an output torque of the series elastic driver at the current moment by using a disturbance observer;
a feedforward compensation unit 103, configured to obtain a feedforward dynamic model according to the nominal dynamic model and a scaling coefficient of the rotational inertia of the motor through a feedforward compensator; obtaining a feedforward compensation quantity according to the feedforward dynamic model and the expected output torque of the series elastic driver;
and a proportional derivative unit 104, configured to obtain a desired current value according to the real-time disturbance amount, the feedforward compensation amount, and an ideal current value obtained by a proportional derivative controller, and output the desired current value to the motor.
In application, each unit in the torque control device may be a software program unit, may be implemented by different logic circuits integrated in a processor, and may also be implemented by a plurality of distributed processors.
As shown in fig. 4, an embodiment of the present application further provides a terminal device 200, including: at least one processor 201 (only one processor is shown in fig. 4), a memory 202, and a computer program 203 stored in the memory 202 and operable on the at least one processor 201, further comprising a series elastic driver 204 and a load 205, the steps in the respective torque control method embodiments described above being implemented when the processor 201 executes the computer program 203.
In an application, the end devices may include, but are not limited to, a memory, a processor, a series elastic driver, and a load. Those skilled in the art will appreciate that fig. 4 is merely an example of a terminal device, and does not constitute a limitation of the terminal device, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, etc.
In an Application, the Processor may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In some embodiments, the storage may be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory may also be an external storage device of the terminal device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of computer programs. The memory may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units is merely illustrated, and in practical applications, the above function distribution may be performed by different functional units according to needs, that is, the internal structure of the device is divided into different functional units to perform all or part of the above described functions. Each functional unit in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application. The specific working process of the units in the system may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
The embodiment of the application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the moment control method of any one of the embodiments is realized.
The embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the moment control method of any of the above embodiments.
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 processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. 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 at least: any entity or apparatus capable of carrying computer program code to a terminal device, recording medium, computer Memory, Read-Only Memory (ROM), Random-Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc.
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 application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus, terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus and the terminal device are merely illustrative, and for example, the division of the unit is only one logical division, and there may be other divisions when the actual implementation is performed, for example, a plurality of units or components may be combined or may be 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 above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 application and are intended to be included within the scope of the present application.