CN106842927B - Control parameter adjusting method and device and double-wheel self-balancing robot - Google Patents

Control parameter adjusting method and device and double-wheel self-balancing robot Download PDF

Info

Publication number
CN106842927B
CN106842927B CN201710069206.3A CN201710069206A CN106842927B CN 106842927 B CN106842927 B CN 106842927B CN 201710069206 A CN201710069206 A CN 201710069206A CN 106842927 B CN106842927 B CN 106842927B
Authority
CN
China
Prior art keywords
differential time
swinging
balancing robot
double
absolute value
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
CN201710069206.3A
Other languages
Chinese (zh)
Other versions
CN106842927A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201710069206.3A priority Critical patent/CN106842927B/en
Publication of CN106842927A publication Critical patent/CN106842927A/en
Application granted granted Critical
Publication of CN106842927B publication Critical patent/CN106842927B/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
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
    • G05B13/042Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • G05D1/0891Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for land vehicles

Abstract

The invention discloses a control parameter adjusting method, a control parameter adjusting device and a double-wheel self-balancing robot, wherein the method comprises the following steps: monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-going direction; monitoring the swinging angle of the double-wheel self-balancing robot swinging relative to the vertical direction; monitoring the swinging frequency of the double-wheel self-balancing robot swinging relative to the vertical direction; adjusting the proportional coefficient according to the relationship that the proportional coefficient of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency; the differential time is adjusted according to the relationship that the differential time of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency.

Description

Control parameter adjusting method and device and double-wheel self-balancing robot
Technical Field
The invention relates to the technical field of double-wheel self-balancing robots, in particular to a control parameter adjusting method for a double-wheel self-balancing robot, a control parameter adjusting device for the double-wheel self-balancing robot and the double-wheel self-balancing robot.
Background
With the continuous development of the robot technology, the double-wheel self-balancing robot gains attention in the field of domestic and foreign robots by virtue of the advantages of simple structure, flexible movement and the like. The double-wheel self-balancing robot as a special inverted pendulum type wheel robot has the characteristics of incompleteness, nonlinearity, underactuation, instability and the like, so that the adoption of a proper balance control strategy is the key for keeping balance of the double-wheel robot.
The existing double-wheel self-balancing robot generally adopts a PID control strategy with fixed control parameters, and the anti-interference performance of the control strategy is poor. In addition, at present, some researches are carried out on applying PID fuzzy control, neural network control and the like to the double-wheel self-balancing robot, although the anti-interference capability of the double-wheel self-balancing robot can be improved by applying the intelligent control scheme, the problems of slow response speed, high requirement on hardware configuration and cost increase exist due to the large calculated amount of the intelligent control scheme.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a new technical solution for adjusting PD control parameters of a two-wheeled self-balancing robot, so as to implement online adjustment of PD control parameters in a simpler manner.
According to a first aspect of the present invention, there is provided a control parameter adjustment method for a two-wheeled self-balancing robot, comprising:
monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-going direction;
monitoring the swinging angle of the double-wheel self-balancing robot swinging relative to the vertical direction;
monitoring the swinging frequency of the double-wheel self-balancing robot swinging relative to the vertical direction;
adjusting the proportional coefficient according to the relationship that the proportional coefficient of a PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency;
and adjusting the differential time according to the relationship that the differential time of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency.
Optionally, the adjusting the proportionality coefficient according to the relation that the proportionality coefficient of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle, and in negative correlation with the swinging frequency includes:
acquiring a preset initial value of the proportionality coefficient;
determining the correction quantity of the proportional coefficient according to the positive correlation between the proportional coefficient of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the proportional coefficient and the swinging frequency;
and adjusting the proportionality coefficient to be equal to the sum of a preset initial value of the proportionality coefficient and the correction quantity of the proportionality coefficient.
Optionally, the adjusting the differential time according to the relationship that the differential time of the PD controller is in positive correlation with the absolute value of the wobble amplitude and the absolute value of the wobble angle, and in negative correlation with the wobble frequency includes:
acquiring a preset initial value of the differential time;
determining the correction amount of the differential time according to the positive correlation between the differential time of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the differential time and the swinging frequency;
and adjusting the differential time to be equal to the sum of a preset initial value of the differential time and the correction quantity of the differential time.
Optionally, the monitoring of the shaking amplitude of the double-wheel self-balancing robot shaking in the straight direction includes:
acquiring pulses output by a photoelectric encoder, wherein the photoelectric encoder is arranged on a motor output shaft of the double-wheel self-balancing robot;
calculating the movement speed of the double-wheel self-balancing robot in the straight-going direction according to the pulse;
performing integral operation on the movement speed until the movement direction is determined to be changed according to the pulse;
and determining that the shaking amplitude is equal to the product of the result of the integral operation and a set constant.
Optionally, the monitoring the oscillation frequency of the double-wheel self-balancing robot oscillating relative to the vertical direction includes:
and determining the number of times of changing the swing direction within a set time as the swing frequency according to the direction symbol of the swing angle.
According to a second aspect of the present invention, there is provided a control parameter adjusting apparatus for a two-wheeled self-balancing robot, comprising:
the shaking amplitude monitoring module is used for monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-moving direction;
the swing angle monitoring module is used for monitoring the swing angle of the double-wheel self-balancing robot swinging relative to the vertical direction;
the swing frequency monitoring module is used for monitoring the swing frequency of the double-wheel self-balancing robot swinging relative to the vertical direction;
the proportional coefficient adjusting module is used for adjusting the proportional coefficient according to the relationship that the proportional coefficient of a PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency; and the number of the first and second groups,
and the differential time adjusting module is used for adjusting the differential time according to the positive correlation between the differential time of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the differential time of the PD controller and the swinging frequency.
Optionally, the scaling factor adjusting module includes:
a proportion initial value obtaining unit, configured to obtain a preset initial value of the proportion coefficient;
a proportional correction amount calculation unit for determining a correction amount of a proportional coefficient according to a relationship in which the proportional coefficient of the PD controller is positively correlated with the absolute value of the wobbling amplitude and the absolute value of the wobbling angle, and is negatively correlated with the wobbling frequency; and the number of the first and second groups,
and the scaling factor adjusting unit is used for adjusting the scaling factor to be equal to the sum of the preset initial value of the scaling factor and the correction quantity of the scaling factor.
Optionally, the differential time adjustment module includes:
a differential initial value obtaining unit, configured to obtain a preset initial value of the differential time;
a differential correction amount calculation unit for determining a correction amount of the differential time based on a relationship in which the differential time of the PD controller is positively correlated with an absolute value of the wobbling amplitude and an absolute value of the wobbling angle and negatively correlated with the wobbling frequency; and the number of the first and second groups,
and a differential time adjusting unit for adjusting the differential time to be equal to the sum of a preset initial value of the differential time and a correction amount of the differential time.
Optionally, the shaking amplitude monitoring module includes:
the pulse acquisition module is used for acquiring pulses output by a photoelectric encoder, wherein the photoelectric encoder is installed on a motor output shaft of the double-wheel self-balancing robot;
the speed calculation unit is used for calculating the movement speed of the double-wheel self-balancing robot in the straight-moving direction according to the pulse;
the integration unit is used for carrying out integration operation on the movement speed until the movement direction is determined to change according to the pulse; and the number of the first and second groups,
and the shaking amplitude determining unit is used for determining that the shaking amplitude is equal to the product of the result of the integral operation and a set constant.
Optionally, the swing frequency monitoring module is specifically configured to determine, as the swing frequency, a number of times that the swing direction changes within a set time according to the direction symbol of the swing angle.
According to a third aspect of the present invention, there is provided a control parameter adjustment device for a two-wheeled self-balancing robot, comprising a memory and a processor, the memory being used for storing instructions for controlling the processor to operate so as to execute the control parameter adjustment method according to the first aspect of the present invention.
According to a fourth aspect of the present invention, there is also provided a two-wheeled self-balancing robot, wherein at least one control loop of a control system comprises a PD controller and a control parameter adjusting device according to the second aspect of the present invention or according to the third aspect of the present invention, the control parameter adjusting device is configured to adjust a proportionality coefficient and a differential time of the PD controller online.
The method and the device have the advantages that the proportional coefficient and the differential time of the PD controller are adjusted on line by the shaking amplitude, the swinging angle and the swinging frequency which can reflect the unstable state of the double-wheel self-balancing robot, so that the double-wheel self-balancing robot can keep stable, and can keep stable after loading, and the adaptability of the double-wheel self-balancing robot is improved. In addition, the method and the device directly adjust the corresponding control parameters through the functional relation between the shaking amplitude, the shaking angle, the shaking frequency and the control parameters, so the method and the device have smaller calculated amount and can carry out quick response of balance control.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flowchart illustrating a control parameter adjustment method according to an embodiment of the present invention;
FIG. 2 is a block schematic diagram of one embodiment of a control parameter adjustment apparatus according to the present invention;
FIG. 3 is a block diagram of one embodiment of the scaling parameter adjustment module of FIG. 2;
FIG. 4 is a block schematic diagram of one embodiment of the differential time adjustment module of FIG. 2;
FIG. 5 is a block diagram of one embodiment of the oscillation amplitude monitoring module of FIG. 2;
FIG. 6 is a block diagram illustrating a hardware configuration of a control parameter adjustment apparatus according to the present invention;
fig. 7 is a schematic view of a control system of a two-wheeled self-balancing robot according to the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a flow chart of an embodiment of a control parameter adjusting method according to the present invention during an adjusting period.
According to fig. 1, the method of the invention may comprise the following steps:
and step S110, monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-moving direction.
The double-wheel self-balancing robot comprises a vehicle body, a left driving wheel and a right driving wheel, wherein the axes of the two driving wheels are positioned on the same straight line and are independently driven by respective motors.
If the double-wheel self-balancing robot shakes in the straight-going direction when the double-wheel self-balancing robot keeps balance, the double-wheel self-balancing robot is in an unstable state, therefore, the unstable degree of the double-wheel self-balancing robot can be determined by monitoring the shaking amplitude, and then the proportionality coefficient KP and the differential time KD of the PD controller can be adjusted according to the shaking amplitude.
Specifically, the larger the shake amplitude is, the larger the values of the proportionality coefficient KP and the derivative time KD should be, i.e., the relationship in which both the proportionality coefficient KP and the derivative time KD have a positive correlation with the shake amplitude.
Since the double-wheel self-balancing robot can detect the rotation speed of the motor by installing the photoelectric encoder on the output shaft of the motor, in this step S110, the shaking amplitude of the double-wheel self-balancing robot shaking in the straight direction can be determined by using the pulses output by the photoelectric encoder.
Thus, the step S110 may further include the steps of:
in step S111, a pulse output by the photoelectric encoder is acquired.
And step S112, calculating the movement speed of the double-wheel self-balancing robot in the straight-moving direction according to the acquired pulses.
In step S112, the movement speed may be represented by the motor rotation speed, or the linear velocity may be further calculated from the motor rotation speed.
In step S113, the movement velocity is integrated until the movement direction is determined to be changed according to the acquired pulse.
In step S113, the displacement in the straight direction is obtained by integrating the movement velocity.
The displacement corresponds to an angular displacement when the movement velocity is an angular velocity and a linear displacement when the movement velocity is a linear velocity.
Since the photoelectric encoder outputs A, B two pulses, and the phase difference between the two pulses is 90 degrees, in step S113, the rotation direction of the motor can be determined according to the phase advance of the a pulse or the phase advance of the B pulse in the A, B two pulses, so as to determine the movement direction of the two-wheel self-balancing robot.
Step S114, determining that the shaking amplitude is equal to the product of the result of the integral operation and a set constant.
The result of this integration operation is the displacement in the direction of execution.
The set constant may be equal to 1 or may be equal to other positive numbers, such as 1/2.
And step S120, monitoring the swing angle of the double-wheel self-balancing robot swinging relative to the vertical direction.
The swinging angle swinging relative to the vertical direction is specifically an included angle between the double-wheel self-balancing robot and the vertical direction when swinging in the pitching direction.
If the double-wheel self-balancing robot swings in the pitching direction when the double-wheel self-balancing robot keeps balance, the double-wheel self-balancing robot is in an unstable state, therefore, the unstable degree of the double-wheel self-balancing robot can be determined by monitoring the swinging angle, and further the proportionality coefficient KP and the differential time KD of the PD controller can be adjusted according to the swinging angle.
Specifically, the larger the swing angle, the larger the values of the proportionality coefficient KP and the derivative time KD should have, i.e., the relationship in which both the proportionality coefficient KP and the derivative time KD have a positive correlation with the swing angle.
The swing angle can be determined according to data acquired by an Inertial Measurement Unit (IMU) arranged in the double-wheel self-balancing robot.
The inertia measurement unit is, for example, an MPU 6050.
And step S130, monitoring the swinging frequency of the double-wheel self-balancing robot swinging relative to the vertical direction.
The swinging frequency of the swinging relative to the vertical direction is specifically the swinging frequency of the double-wheel self-balancing robot when swinging in the pitching direction.
If the double-wheel self-balancing robot swings in the pitching direction when the double-wheel self-balancing robot keeps balance, the double-wheel self-balancing robot is in an unstable state, therefore, the unstable degree of the double-wheel self-balancing robot can be determined by monitoring the swinging frequency, and further the proportionality coefficient KP and the differential time KD of the PD controller can be adjusted according to the swinging frequency.
Specifically, the larger the wobble frequency is, the smaller the value of the proportionality coefficient K and the derivative time D should be, i.e., the relationship in which both the proportionality coefficient KP and the derivative time KD are inversely related to the wobble frequency.
The wobble frequency may be determined according to the number of times the wobble direction is changed within a set time.
Therefore, the step S130 may determine the number of times the swing direction is changed within the set time as the swing frequency, specifically according to the direction sign of the swing angle.
The set time is, for example, less than or equal to 500ms, and in one embodiment of the invention, the set time is equal to 100 ms.
Step S140, adjusting the proportional coefficient according to the relationship that the proportional coefficient of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency.
The proportional coefficient is a function with the shaking amplitude, the swinging angle and the swinging frequency as independent variables, and the proportional coefficient adjusted according to the current monitoring result can be obtained through calculation by setting the respective coefficients of the shaking amplitude, the swinging angle and the swinging frequency.
The step S140 may further include:
step S141, obtaining a preset initial value KP of the proportionality coefficient0
The preset initial value KP0May be a parameter determined without external interference.
In step S142, a correction amount Δ KP of the proportional coefficient is determined based on a relationship in which the proportional coefficient KP of the PD controller is positively correlated with the absolute value L of the sway width and the absolute value θ of the sway angle, and is negatively correlated with the sway frequency F.
I.e. Δ KP ═ k1×L+k2×θ-k3× F, wherein k1、k2、k3Are all set constants, k1、k2、k3The method can be determined by carrying out engineering tests on a double-wheel self-balancing robot model.
Step S143, adjusting the proportionality coefficient KP to be equal to the preset initial value KP of the proportionality coefficient0And the sum of the correction amount Δ KP of the proportional coefficient, i.e., KP ═ Δ KP + KP0
And step S150, adjusting the differential time according to the positive correlation between the differential time of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the differential time and the swinging frequency.
The differential time is a function with the shaking amplitude, the swinging angle and the swinging frequency as independent variables, and the differential time adjusted according to the current monitoring result can be obtained through calculation by setting respective coefficients of the shaking amplitude, the swinging angle and the swinging frequency.
The step S150 may further include:
step S151, obtaining a preset initial value KD of the differential time0
The preset initial value KD0May be a parameter determined without external interference.
In step S152, a correction amount Δ KD of the differential time is determined based on a positive correlation between the differential time KD of the PD controller and the absolute value L of the wobbling amplitude and the absolute value θ of the wobbling angle, and a negative correlation between the differential time KD and the wobbling frequency F.
I.e. Δ KD ═ d1×L+d2×θ-d3× F, wherein d1、d2、d3Are all set constants, d1、d2、d3The method can be determined by carrying out engineering tests on a double-wheel self-balancing robot model.
Step S153, adjusting the differential time KD to be equal to the preset initial value KD of the differential time0And the sum of the correction amount Δ KD of the differential time, that is, KD ═ Δ KD + KD0
Therefore, the control system of the double-wheel self-balancing robot can output PWM waves to the motor through the adjusted PD controller, and the motion control of the double-wheel self-balancing robot is realized.
The method can adjust the proportional parameter and the differential time of the PD controller according to the set adjustment period. The adjustment period may be the same as or longer than the setting time for calculating the wobble frequency.
The smaller the setting of the adjustment period, the more accurate the control, but since the PD control itself has a larger redundancy, a set of control parameters can be applied to a certain range of loads, and therefore, the adjustment period may be, for example, greater than or equal to 50ms, or less than or equal to 500ms, in consideration of reducing resource occupation as much as possible while satisfying the control requirement.
Fig. 2 is a block schematic diagram of an embodiment of a control parameter adjustment apparatus according to the present invention.
According to fig. 2, the control parameter adjusting apparatus may include a wobble amplitude monitoring module 210, a wobble angle monitoring module 220, a wobble frequency monitoring module 230, a proportionality coefficient adjusting module 240, and a differential time adjusting module 250.
The shaking amplitude monitoring module 210 is configured to monitor the shaking amplitude of the two-wheeled self-balancing robot in the straight direction.
The swing angle monitoring module 220 is configured to monitor a swing angle of the two-wheeled self-balancing robot swinging in a vertical direction.
The swing frequency monitoring module 230 is configured to monitor a swing frequency of the two-wheeled self-balancing robot swinging relative to a vertical direction.
The scaling factor adjusting module 240 is configured to adjust the scaling factor according to a positive correlation between the scaling factor of the PD controller and the absolute value of the wobble amplitude and the absolute value of the wobble angle, and a negative correlation between the scaling factor of the PD controller and the wobble frequency.
The differential time adjustment module 250 is configured to adjust the differential time according to a relationship that the differential time of the PD controller is in positive correlation with the absolute value of the wobble amplitude and the absolute value of the wobble angle, and in negative correlation with the wobble frequency.
FIG. 3 is a block schematic diagram of one embodiment of the scaling factor adjustment module 240 described above.
As shown in fig. 3, the scaling factor adjustment module 240 may further include a scaling initial value obtaining unit 241, a scaling correction amount calculating unit 242, and a scaling factor adjusting unit 243.
The scale initial value obtaining unit 241 is configured to obtain a preset initial value of the scale factor.
The proportional correction amount calculating unit 242 is configured to determine a correction amount of the proportional coefficient according to a relationship in which the proportional coefficient of the PD controller is positively correlated with the absolute value of the wobbling amplitude and the absolute value of the wobbling angle, and negatively correlated with the wobbling frequency.
The scaling factor adjusting unit 243 is used to adjust the scaling factor equal to the sum of the preset initial value of the scaling factor and the correction amount of the scaling factor.
Fig. 4 is a block schematic diagram of one embodiment of the differential time adjustment module 250 described above.
As shown in fig. 4, the differential time adjustment module 250 may further include a differential initial value obtaining unit 251, a differential correction amount calculating unit 252, and a differential time adjustment unit 253.
The differentiation initial value acquisition unit 251 is configured to acquire a preset initial value of a differentiation time.
The differential correction amount calculation unit 252 is configured to determine a correction amount of the differential time based on a relationship in which the differential time of the PD controller is positively correlated with the wobbling amplitude and the wobbling angle and negatively correlated with the wobbling frequency.
The differential time adjusting unit 253 is configured to adjust the differential time to be equal to the sum of a preset initial value of the differential time and a correction amount of the differential time.
FIG. 5 is a block schematic diagram of one embodiment of the wobble amplitude monitoring module 210 described above.
As shown in fig. 5, the wobble amplitude monitoring module 210 may further include a pulse acquisition module 211, a speed calculation unit 212, an integration unit 213, and a wobble amplitude determination unit 214.
The pulse acquisition module 211 is configured to acquire pulses output by a photoelectric encoder, where the photoelectric encoder is installed on an output shaft of a motor of the dual-wheel self-balancing robot.
The speed calculating unit 212 is used for calculating the moving speed of the double-wheel self-balancing robot in the straight-moving direction according to the pulse.
The integration unit 213 is configured to integrate the movement speed until the movement direction is determined to change according to the pulse.
The wobble amplitude determination unit 214 is configured to determine that the wobble amplitude is equal to a product of a result of the integration operation and a set constant.
The wobble frequency monitoring module 230 may be specifically configured to determine, as the wobble frequency, the number of times that the wobble direction changes within a set time according to the direction sign of the wobble angle.
Fig. 6 is a block schematic diagram of a hardware configuration of the control parameter adjustment apparatus according to the present invention.
According to fig. 6, the control parameter adjustment apparatus 600 comprises a memory 601 and a processor 602, wherein the memory 601 is used for storing instructions for controlling the processor 602 to operate so as to execute any control parameter adjustment method according to the present invention.
The control parameter adjusting device 600 may further include a communication device (not shown in the figure) to send the adjusted proportionality coefficient and the adjusted differential time to the PD controller through the communication device, so as to implement online adjustment of the proportionality coefficient and the differential time of the PD controller.
Fig. 7 is a schematic diagram of one control loop of the control system of the two-wheeled self-balancing robot according to the present invention.
As shown in fig. 7, the control system includes a PD controller 710, any of the control parameter adjusting means (labeled 720) according to the present invention, a motor driver 730, and a motor 740.
The INPUT signal INPUT is determined by the main control unit according to the data provided by the inertial measurement unit and the pulses output by the photoelectric encoder.
The INPUT signal INPUT gets a control signal via the PD controller 710.
The control signal is input to the motor driver 730, and the motor driver outputs a corresponding PWM wave to act on the motor 740.
The control parameter adjusting device 720 performs online adjustment of the proportionality coefficient and the differential time of the PD controller according to the data provided by the inertial measurement unit and the pulse output by the photoelectric encoder, so as to improve the anti-interference capability of the two-wheeled self-balancing robot.
The control loop may be an angle control loop or a speed control loop.
The embodiments in the present disclosure are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments, but it should be clear to those skilled in the art that the embodiments described above can be used alone or in combination with each other as needed. In addition, for the device embodiment, since it corresponds to the method embodiment, the description is relatively simple, and for relevant points, refer to the description of the corresponding parts of the method embodiment. The above-described apparatus embodiments are merely illustrative, in that modules illustrated as separate components may or may not be physically separate.
The present invention may be an apparatus, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including AN object oriented programming language such as Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" language or similar programming languages.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A control parameter adjustment method for a double-wheel self-balancing robot is characterized by comprising the following steps:
monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-going direction;
monitoring the swinging angle of the double-wheel self-balancing robot swinging relative to the vertical direction;
monitoring the swinging frequency of the double-wheel self-balancing robot swinging relative to the vertical direction;
adjusting the proportionality coefficient according to the relationship that the proportionality coefficient of a PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency, and the method comprises the following steps: acquiring a preset initial value of the proportionality coefficient; determining the correction quantity of the proportional coefficient according to the positive correlation between the proportional coefficient of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the proportional coefficient and the swinging frequency; adjusting the proportionality coefficient to be equal to the sum of a preset initial value of the proportionality coefficient and a correction quantity of the proportionality coefficient;
and adjusting the differential time according to the relationship that the differential time of the PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency.
2. The control parameter adjustment method according to claim 1, wherein adjusting the differential time of the PD controller according to a relationship in which the differential time is positively correlated with the absolute value of the wobbling amplitude and the absolute value of the wobbling angle and negatively correlated with the wobbling frequency comprises:
acquiring a preset initial value of the differential time;
determining the correction amount of the differential time according to the positive correlation between the differential time of the PD controller and the absolute value of the shaking amplitude and the absolute value of the swinging angle and the negative correlation between the differential time and the swinging frequency;
and adjusting the differential time to be equal to the sum of a preset initial value of the differential time and the correction quantity of the differential time.
3. The control parameter adjustment method according to claim 1, wherein the monitoring of the shake amplitude of the two-wheeled self-balancing robot in a straight-ahead direction includes:
acquiring pulses output by a photoelectric encoder, wherein the photoelectric encoder is arranged on a motor output shaft of the double-wheel self-balancing robot;
calculating the movement speed of the double-wheel self-balancing robot in the straight-going direction according to the pulse;
performing integral operation on the movement speed until the movement direction is determined to be changed according to the pulse;
and determining that the shaking amplitude is equal to the product of the result of the integral operation and a set constant.
4. The method of claim 1, wherein the monitoring the oscillation frequency of the two-wheeled self-balancing robot with respect to the vertical direction comprises:
and determining the number of times of changing the swing direction within a set time as the swing frequency according to the direction symbol of the swing angle.
5. A control parameter adjustment device for a two-wheeled self-balancing robot, comprising:
the shaking amplitude monitoring module is used for monitoring the shaking amplitude of the double-wheel self-balancing robot in the straight-moving direction;
the swing angle monitoring module is used for monitoring the swing angle of the double-wheel self-balancing robot swinging relative to the vertical direction;
the swing frequency monitoring module is used for monitoring the swing frequency of the double-wheel self-balancing robot swinging relative to the vertical direction;
the proportional coefficient adjusting module is used for adjusting the proportional coefficient according to the relationship that the proportional coefficient of a PD controller is in positive correlation with the absolute value of the shaking amplitude and the absolute value of the swinging angle and in negative correlation with the swinging frequency; and the number of the first and second groups,
a differential time adjusting module, configured to adjust the differential time according to a relationship that the differential time of the PD controller is in positive correlation with the wobble amplitude and the wobble angle, and in negative correlation with the wobble frequency;
the scaling factor adjustment module comprises:
a proportion initial value obtaining unit, configured to obtain a preset initial value of the proportion coefficient;
a proportional correction amount calculation unit for determining a correction amount of a proportional coefficient according to a relationship in which the proportional coefficient of the PD controller is positively correlated with the absolute value of the wobbling amplitude and the absolute value of the wobbling angle, and is negatively correlated with the wobbling frequency; and the number of the first and second groups,
and the scaling factor adjusting unit is used for adjusting the scaling factor to be equal to the sum of the preset initial value of the scaling factor and the correction quantity of the scaling factor.
6. The control parameter adjustment apparatus of claim 5, wherein the differential time adjustment module comprises:
a differential initial value obtaining unit, configured to obtain a preset initial value of the differential time;
a differential correction amount calculation unit for determining a correction amount of the differential time based on a relationship in which the differential time of the PD controller is positively correlated with an absolute value of the wobbling amplitude and an absolute value of the wobbling angle and negatively correlated with the wobbling frequency; and the number of the first and second groups,
and a differential time adjusting unit for adjusting the differential time to be equal to the sum of a preset initial value of the differential time and a correction amount of the differential time.
7. The control parameter adjustment device of claim 5, wherein the wobble amplitude monitoring module comprises:
the pulse acquisition module is used for acquiring pulses output by a photoelectric encoder, wherein the photoelectric encoder is installed on a motor output shaft of the double-wheel self-balancing robot;
the speed calculation unit is used for calculating the movement speed of the double-wheel self-balancing robot in the straight-moving direction according to the pulse;
the integration unit is used for carrying out integration operation on the movement speed until the movement direction is determined to change according to the pulse; and the number of the first and second groups,
and the shaking amplitude determining unit is used for determining that the shaking amplitude is equal to the product of the result of the integral operation and a set constant.
8. The apparatus according to claim 5, wherein the oscillation frequency monitoring module is configured to determine, as the oscillation frequency, a number of times that the oscillation direction changes within a set time according to a direction symbol of the oscillation angle.
9. A control parameter adjustment device for a two-wheeled self-balancing robot, comprising a memory and a processor, wherein the memory is used for storing instructions for controlling the processor to operate so as to execute the control parameter adjustment method according to any one of claims 1 to 4.
10. A two-wheeled self-balancing robot, characterized in that at least one control loop of its control system comprises a PD controller and a control parameter adjusting device according to any of claims 5 to 9 for online adjustment of the proportionality coefficient and the derivative time of the PD controller.
CN201710069206.3A 2017-02-08 2017-02-08 Control parameter adjusting method and device and double-wheel self-balancing robot Active CN106842927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710069206.3A CN106842927B (en) 2017-02-08 2017-02-08 Control parameter adjusting method and device and double-wheel self-balancing robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710069206.3A CN106842927B (en) 2017-02-08 2017-02-08 Control parameter adjusting method and device and double-wheel self-balancing robot

Publications (2)

Publication Number Publication Date
CN106842927A CN106842927A (en) 2017-06-13
CN106842927B true CN106842927B (en) 2020-07-24

Family

ID=59122938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710069206.3A Active CN106842927B (en) 2017-02-08 2017-02-08 Control parameter adjusting method and device and double-wheel self-balancing robot

Country Status (1)

Country Link
CN (1) CN106842927B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111665838B (en) * 2020-05-21 2023-08-29 浙江工业大学 Gesture control method for self-balancing robot to resist continuous external force action

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984351A (en) * 2014-05-30 2014-08-13 联想(北京)有限公司 Balance control method and device of self-walking device
CN105807689A (en) * 2016-04-29 2016-07-27 上海海洋大学 Two-wheel self-balance car control system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1632428A4 (en) * 2003-06-12 2010-08-25 Toyota Motor Co Ltd Coaxial motorcycle
JP2005162104A (en) * 2003-12-04 2005-06-23 Sony Corp Conveying body, accelerator of conveying body, decelerator of conveying body, conveying method of conveying body, accelerating method of conveying body, and decelerating method of conveying body

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984351A (en) * 2014-05-30 2014-08-13 联想(北京)有限公司 Balance control method and device of self-walking device
CN105807689A (en) * 2016-04-29 2016-07-27 上海海洋大学 Two-wheel self-balance car control system

Also Published As

Publication number Publication date
CN106842927A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
KR102516007B1 (en) Controlling apparatus and speed reducer system
EP3175306B1 (en) Optimized parameterization of active disturbance rejection control
CN109240305B (en) Two-wheeled robot motion control system and method based on complementary filtering
CN108189036B (en) Torque control method and device, robot and storage medium
CN109116811B (en) Machine learning device and method, servo control device, and servo control system
CN102530058B (en) Strengthen the electric power steering of road feel
CN106020124B (en) Servo motor control device and collision detection method
CN108880399B (en) machine learning device, servo control system, and machine learning method
CN111098335B (en) Method and device for calibrating odometer of double-wheel differential drive robot
CN109343539A (en) Motion control method, device, robot and storage medium
WO2018156683A1 (en) System parameter identification method based on rate-limited relay with hysteresis and sinusoidal injection
CN113128018A (en) Friction force calculation method and device, robot and readable storage medium
CN113291294B (en) Vehicle lateral control method and device and vehicle
CN106842927B (en) Control parameter adjusting method and device and double-wheel self-balancing robot
US11077552B2 (en) Control system, machine learning apparatus, maintenance assistance apparatus, data generating method, and maintenance assisting method
Ivoilov et al. The tilt angle estimation in the inverted pendulum stabilization task
CN107776436B (en) The control method and device of double-wheel self-balancing equipment
Chang et al. Using reinforcement learning to achieve two wheeled self balancing control
Kralev et al. Design and experimental evaluation of robust controllers for a two-wheeled robot
CN109947116B (en) Positioning method and device for unmanned vehicle
CN111015661A (en) Active vibration control method and system for flexible load of robot
WO2022030346A1 (en) Control assistance device, control system, and control assistance method
CN114454150A (en) Arm type robot control method based on composite learning and robot system
Chang et al. Reinforcement Learning-Based Two-Wheel Robot Control
Chowdhary et al. Design of two wheel self balancing robot using PID controller

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