A control method for a unicycle programming robot
By adopting a PID control-based method in a single-wheel programming robot, the rotation direction and rotation acceleration of the momentum wheel are monitored and adjusted in real time, the problems of robot attitude deviation and driving system failure are solved, and the stable adjustment of the robot attitude and the reliability of the driving system are achieved.
Patent Information
- Application Number
- CN202411166282.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing one-wheel programming robot control system cannot eliminate steady-state errors when the robot's attitude deviation occurs, resulting in small attitude deviations for a long time for the robot, and may lead to system oscillation and driving system failure when external disturbances are frequent.
The control method based on PID control idea is adopted to generate a state index by monitoring the operating data of the drive system in real time, and the tilt angle of the robot is obtained by combining a gyroscope and accelerometer, and the correction torque is calculated and the rotation direction and rotation acceleration of the momentum wheel are determined to ensure the reliability of the drive system.
The rapid and stable adjustment of the attitude of the single-wheeled robot is achieved, the reliability of the drive system is ensured, and the stability of the robot's operation is improved.
Smart Images

Figure CN118789554B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot control, and particularly relates to a control method for a unicycle programming robot. Background Art
[0002] A unicycle programming robot usually has only one wheel and maintains balance through a gyroscope and sensors. Its structure is compact and suitable for moving in a narrow space. The development of unicycle programming robots benefits from the improvement of robot technology, sensor technology, and computing power. From the initial simple model to the current highly intelligent and autonomous robots, unicycle programming robots have made significant progress in both hardware and software;
[0003] The existing technology has the following defects:
[0004] 1. When the attitude of the existing unicycle programming robot control system deviates, it cannot eliminate the steady-state error, resulting in small attitude deviations of the robot for a long time and being unable to fully recover to the vertical state. Especially when external disturbances are frequent, overly simple or imperfect control methods may cause system oscillation and unable to maintain the balance of the unicycle programming robot smoothly;
[0005] 2. The existing control methods usually control the rotational acceleration of the momentum wheel in combination with the tilt state of the unicycle coding robot, that is, the greater the tilt angle of the unicycle coding robot, the greater the rotational acceleration of the momentum wheel (to enable the unicycle coding robot to quickly recover to the vertical state). However, in practical applications, if there is an abnormality in the drive system of the momentum wheel and still a large output power is adopted (the greater the output power, the greater the rotational acceleration of the momentum wheel), it may cause the drive system to fail, thus causing the unicycle coding robot to completely lose balance and fall over;
[0006] Based on this, the present invention proposes a control method for a unicycle programming robot. Based on the PID control idea, the rotational direction and rotational acceleration of the momentum wheel are confirmed, and then the rotational acceleration of the momentum wheel is adjusted in combination with the operating state of the drive system, which can not only quickly and stably adjust the attitude of the unicycle robot, but also ensure the reliability of the drive system, thereby improving the operating stability of the unicycle coding robot. Summary of the Invention
[0007] The purpose of the present invention is to provide a control method for a unicycle programming robot to solve the deficiencies in the background art.
[0008] To achieve the above purpose, the present invention provides the following technical solution: A control method for a unicycle programming robot, the control method includes the following steps:
[0009] The control system monitors the operation data of the unicycle coding robot's drive system in real time, generates a status index for the drive system based on the operation data, and determines whether the drive system supports operation according to the comparison result between the status index and the index threshold;
[0010] If it is determined that the operation is supported, the current tilt angle of the unicycle coding robot is obtained through the gyroscope and accelerometer, and the error between the target tilt angle and the current tilt angle is calculated;
[0011] Calculate the control output of the proportional part according to the proportional gain and the error, calculate the control output of the integral part according to the integral term of the error and the integral time constant, calculate the control output of the derivative part according to the derivative term of the error and the differential time constant, and add the control outputs of the proportional part, integral part and derivative part to obtain the correction torque;
[0012] Determine the rotation direction of the drive system driving the momentum wheel according to the positive or negative result of the correction torque value;
[0013] Take the absolute value of the correction torque as the torque index, generate an adjustment coefficient in combination with the torque index and the status index, and adjust the rotational acceleration of the momentum wheel according to the adjustment coefficient.
[0014] In a preferred embodiment, generating a status index for the drive system in combination with the operation data includes the following steps:
[0015] The control system monitors the operation data of the unicycle coding robot's drive system in real time. The operation data includes the temperature rise rate of the motor, the current deviation, and the efficiency ratio;
[0016] Normalize the temperature rise rate, current deviation, and efficiency ratio so that the value ranges of the temperature rise rate, current deviation, and efficiency ratio are mapped to between [0, 1], obtain the normalized value of the temperature rise rate, the normalized value of the current deviation, and the normalized value of the efficiency ratio, and calculate the status index by weighting the normalized value of the temperature rise rate, the normalized value of the current deviation, and the normalized value of the efficiency ratio according to the positive and negative proportional relationships with the status index.
[0017] In a preferred embodiment, determining whether the drive system supports operation according to the comparison result between the status index and the index threshold includes the following steps:
[0018] Compare the obtained status index with the index threshold. The index threshold is used to determine whether the drive system supports operation. If the status index is greater than the index threshold, it is determined that the overall performance of the drive system is poor and does not support operation.
[0019] In a preferred embodiment, the error between the target tilt angle and the current tilt angle is calculated, and the expression is:
[0020] error = target_angle - current_angle, where target_angl is the target tilt angle, current_angle is the current tilt angle, and error is the error.
[0021] In a preferred embodiment, adding the control outputs of the proportional part, integral part, and derivative part to obtain the correction torque includes the following steps:
[0022] The calculation expression of the correction torque is: T = P + I out + D, where T is the correction torque, P is the proportional control output, I out represents the integral control output, and D is the derivative control output.
[0023] In a preferred embodiment, confirming the rotation direction of the drive system driving the momentum wheel according to the positive or negative result of the correction torque value includes the following steps:
[0024] After obtaining the correction torque, compare the correction torque with the value 0;
[0025] If T > 0, it means that the unicycle robot is currently in a right-tilt state and a leftward torque needs to be applied to suppress the right tilt. Taking the rear of the unicycle programming robot as the reference, the drive system drives the momentum wheel to rotate counterclockwise;
[0026] If T < 0, it means that the unicycle robot is currently in a left-tilt state and a rightward torque needs to be applied to suppress the left tilt. Taking the rear of the unicycle programming robot as the reference, the drive system drives the momentum wheel to rotate clockwise.
[0027] In a preferred embodiment, taking the absolute value of the correction torque as the torque index and generating an adjustment coefficient in combination with the torque index and the state index includes the following steps:
[0028] Taking the absolute value of the correction torque as the torque index, the expression is: Z moment = |T|, where T is the correction torque and Z moment is the torque index;
[0029] Generating an adjustment coefficient in combination with the torque index and the state index, the expression is:
[0030] TJ x = α * Z moment - β * Z state where TJ x is the adjustment coefficient, Z moment is the torque index, Z state is the state index, and α and β are the proportional coefficients of the torque index and the state index respectively, and both α and β are greater than 0.
[0031] In a preferred embodiment, adjusting the rotational acceleration of the momentum wheel according to the adjustment coefficient includes the following steps:
[0032] After obtaining the adjustment coefficient, compare the adjustment coefficient with a preset coefficient threshold to determine whether to increase or decrease the current rotational acceleration of the momentum wheel. The adjustment algorithm is:
[0033] In the formula, SD new is the adjusted rotational acceleration, SD old is the rotational acceleration before adjustment, TJ x is the adjustment coefficient, TJ z is the coefficient threshold.
[0034] In a preferred embodiment, calculating the control output of the proportional part according to the proportional gain and the error includes the following steps:
[0035] Substitute the calculated error into the proportional control formula to obtain the proportional control output. The expression is:
[0036] P = K p * error, where P is the proportional control output, K p is the proportional gain, and error is the error;
[0037] Calculating the control output of the integral part according to the integral term of the error and the integral time constant includes the following steps:
[0038] Perform an integral operation on the calculated error. The integral operation needs to accumulate historical errors. The expression is: In the formula, I is the integral term, t represents the current time, represents the error at time ;
[0039] Calculate the integral control output using the integral gain and the integral term. The expression is: I out = K i * I, where I is the integral term, K i is the integral gain, and I out represents the integral control output;
[0040] Calculating the control output of the differential part according to the derivative term of the error and the differential time constant includes the following steps:
[0041] Calculate the error change rate as the derivative term of the error by using the current error and the previous error. The expression is: In the formula, error_derivative is the derivative term of the error, error k is the current error, errork-1 where \(e_{last}\) is the previous error, \(\Delta t\) is the sampling time interval, and the differential control output is calculated based on the differential gain and the error derivative term, with the expression:
[0042] \(D = K\) d *error_derivative, where \(D\) is the differential control output, \(K\) d is the differential gain, and error_derivative is the error derivative term.
[0043] In a preferred embodiment, the acquisition logic for the temperature rise rate is as follows: obtain the temperature value of the motor at the current moment and the temperature value at the previous moment, obtain the temperature difference by subtracting the temperature value at the previous moment from the temperature value at the current moment, obtain the monitoring duration by subtracting the previous moment from the current moment, and obtain the temperature rise rate by dividing the temperature difference by the monitoring duration;
[0044] The acquisition logic for the current deviation is as follows: obtain the real-time current value of the motor, and obtain the current deviation by subtracting the standard current value from the real-time current value:
[0045] The acquisition logic for the efficiency ratio is as follows: obtain the output power and input power of the motor, and obtain the efficiency ratio by dividing the output power by the input power.
[0046] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0047] 1. By adding the control outputs of the proportional part, integral part, and differential part to obtain the correction torque, the present invention determines the rotation direction of the driving system driving the momentum wheel according to the positive or negative result of the correction torque value, takes the absolute value of the correction torque as the torque index, generates the adjustment coefficient in combination with the torque index and the state index, and adjusts the rotational acceleration of the momentum wheel according to the adjustment coefficient. This control system determines the rotation direction and rotational acceleration of the momentum wheel based on the PID control idea, and then adjusts the rotational acceleration of the momentum wheel in combination with the operating state of the driving system, which can not only quickly and stably adjust the posture of the unicycle robot, but also ensure the reliability of the driving system, thereby improving the running stability of the unicycle coding robot;
[0048] 2. By real-time monitoring the operating data of the driving system of the unicycle coding robot, generating the state index for the driving system in combination with the operating data, and judging whether the driving system supports operation according to the comparison result between the state index and the index threshold, the control system can comprehensively analyze the operating state of the driving system, thereby judging whether the driving system can support the operation of the unicycle coding robot, further ensuring the running stability of the unicycle coding robot;
[0049] 3. The driving system of the unicycle coding robot of the present invention adopts a preset rotational acceleration of the momentum wheel, which is usually input manually according to experience. The rotational acceleration of the momentum wheel can be increased or decreased. For example, when the torque index is large and the state index is small, it indicates that the unicycle coding robot is currently tilted greatly and the performance of the driving system is good. Therefore, it is necessary to increase the rotational acceleration of the momentum wheel to make the unicycle coding robot return to the vertical state more quickly. When the torque index is small and the state index is large, it indicates that the unicycle coding robot is currently tilted slightly and the performance of the driving system is poor. Therefore, it is necessary to slow down the rotational acceleration of the momentum wheel to make the unicycle coding robot return to the vertical state to avoid faults caused by excessive output power of the driving system. Brief Description of the Drawings
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0051] Figure 1 It is a flowchart of the method of the present invention. Detailed Embodiments
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0053] Embodiment 1: Please refer to Figure 1 As shown, a control method for a unicycle programming robot in this embodiment includes the following steps:
[0054] The control system monitors the operation data of the unicycle-encoded robot's drive system in real time, generates a state index for the drive system based on the operation data, and determines whether the drive system supports operation according to the comparison result between the state index and the index threshold. If it is determined that the operation is supported, the current tilt angle of the unicycle-encoded robot is obtained through a gyroscope and an accelerometer, and the error between the target tilt angle and the current tilt angle is calculated. The control output of the proportional part is calculated based on the proportional gain and the error. The proportional part mainly generates a control output according to the current error magnitude and is used for rapid response. The control output of the integral part is calculated based on the integral term of the error and the integral time constant. The integral part is used to eliminate the steady-state error and handle long-term deviations. The control output of the differential part is calculated based on the derivative term of the error and the differential time constant. The differential part is used to predict the future error change trend and suppress oscillations. The control outputs of the proportional part, the integral part, and the differential part are added together to obtain a correction torque. The rotation direction of the drive system driving the momentum wheel is confirmed according to the positive or negative result of the correction torque value. The absolute value of the correction torque is taken as the torque index, and an adjustment coefficient is generated by combining the torque index and the state index. The rotational acceleration of the momentum wheel is adjusted according to the adjustment coefficient.
[0055] In this application, the control outputs of the proportional part, the integral part, and the differential part are added together to obtain a correction torque. The rotation direction of the drive system driving the momentum wheel is confirmed according to the positive or negative result of the correction torque value. The absolute value of the correction torque is taken as the torque index, and an adjustment coefficient is generated by combining the torque index and the state index. The rotational acceleration of the momentum wheel is adjusted according to the adjustment coefficient. This control system determines the rotation direction and rotational acceleration of the momentum wheel based on the PID control idea, and then adjusts the rotational acceleration of the momentum wheel in combination with the operation state of the drive system. It can not only quickly and stably adjust the posture of the unicycle robot, but also ensure the reliability of the drive system, thereby improving the stability of the unicycle-encoded robot's operation.
[0056] In this application, the operation data of the unicycle-encoded robot's drive system is monitored in real time, a state index is generated for the drive system based on the operation data, and it is determined whether the drive system supports operation according to the comparison result between the state index and the index threshold. The control system can comprehensively analyze the operation state of the drive system, thereby judging whether the drive system can support the operation of the unicycle-encoded robot, and further ensuring the stability of the unicycle-encoded robot's operation.
[0057] The control system includes a drive system monitoring module, an attitude error generation module, an output calculation module, a direction confirmation module, and a rotational speed adjustment module;
[0058] Drive system monitoring module: It monitors the operation data of the unicycle encoding robot's drive system in real time, generates a status index for the drive system based on the operation data, determines whether the drive system supports operation according to the comparison result between the status index and the index threshold, sends the judgment result to the attitude error generation module, and sends the status index to the speed adjustment module;
[0059] Attitude error generation module: If it is judged that the operation is supported, it obtains the current tilt angle of the unicycle encoding robot through the gyroscope and accelerometer, and calculates the error between the target tilt angle and the current tilt angle, and sends the error to the output calculation module;
[0060] Output calculation module: Calculate the control output of the proportional part according to the proportional gain and the error. The proportional part mainly generates the control output according to the current error size for fast response. Calculate the control output of the integral part according to the integral term of the error and the integral time constant. The integral part is used to eliminate the steady-state error and process the long-term deviation. Calculate the control output of the differential part according to the derivative term of the error and the differential time constant. The differential part is used to predict the future error change trend and suppress oscillation. Add the control outputs of the proportional part, integral part, and differential part to obtain the correction torque, and send the correction torque to the direction confirmation module and the speed adjustment module;
[0061] Direction confirmation module: Confirm the rotation direction of the drive system driving the momentum wheel according to the positive and negative results of the correction torque value;
[0062] Speed adjustment module: Take the absolute value of the correction torque as the torque index, generate an adjustment coefficient in combination with the torque index and the status index, and adjust the rotational acceleration of the momentum wheel according to the adjustment coefficient.
[0063] Embodiment 2: The control system monitors the operation data of the unicycle encoding robot's drive system in real time, generates a status index for the drive system based on the operation data, including the following steps:
[0064] The control system monitors the operation data of the unicycle encoding robot's drive system in real time. The operation data includes the temperature rise rate of the motor, the current deviation, and the power efficiency ratio;
[0065] Normalize the temperature rise rate, current deviation, and power efficiency ratio so that the value ranges of the temperature rise rate, current deviation, and power efficiency ratio are mapped to between [0,1], obtain the normalized value of the temperature rise rate, the normalized value of the current deviation, and the normalized value of the power efficiency ratio, and calculate the status index by weighting the normalized value of the temperature rise rate, the normalized value of the current deviation, and the normalized value of the power efficiency ratio according to the positive and inverse ratio relationship with the status index. The expression is:
[0066] In the formula, Zstate is the state index, μ is the normalized value of the temperature rising rate, τ is the normalized value of the current deviation, σ is the normalized value of the power efficiency ratio, ω 1 , ω 2 , ω 3 are the weight coefficients of the normalized value of the temperature rising rate, the normalized value of the current deviation, and the normalized value of the power efficiency ratio respectively, and ω 1 +ω 2 +ω 3 = 1.
[0067] The acquisition logic of the temperature rising rate is as follows: Obtain the temperature value of the motor at the current moment and the temperature value at the previous moment. Obtain the temperature difference by subtracting the temperature value at the previous moment from the temperature value at the current moment. Obtain the monitoring duration by subtracting the previous moment from the current moment. Obtain the temperature rising rate by dividing the temperature difference by the monitoring duration. The greater the temperature rising rate, it indicates that the motor of the drive system may have the following abnormalities that may lead to faults:
[0068] The motor works under overload for a long time, resulting in excessive internal current, increased heat generation, and overheating of the motor, which may cause aging of the insulation layer, burning of the motor, or performance degradation. The cooling system (such as a fan or heat sink) fails or has a poor design, resulting in ineffective heat dissipation, and the accumulated heat cannot be dissipated in time, leading to a rapid rise in the motor temperature, damaging the motor and the drive system. The insulation of the motor winding is damaged or other internal faults occur, resulting in a short - circuit phenomenon. The short - circuit causes a sharp increase in current, a large increase in heat generation, and a rapid temperature rise, which may cause the motor to burn out;
[0069] The lubrication of the motor bearing is poor or the wear is serious, resulting in increased friction and heat generation due to friction, leading to an increase in the motor temperature. Long - term operation may cause the bearing to jam or the motor to be damaged. The insulation layer of the motor coil ages or is damaged due to long - term operation, the coil is short - circuited or leaks electricity, increasing heat generation and causing a rapid temperature rise, shortening the motor life. The power supply voltage fluctuates too much or is unstable, resulting in abnormal operation of the motor, fluctuations in the motor current, increased heat generation, and a rapid temperature rise, affecting the motor performance and life. The load mechanical components are stuck or worn, resulting in an increase in the motor load. The motor needs to output more power to overcome the mechanical resistance, resulting in increased heat generation and a rapid temperature rise.
[0070] The acquisition logic of the current deviation is as follows: Obtain the real - time current value of the motor, and obtain the current deviation by subtracting the standard current value from the real - time current value. The greater the current deviation, it indicates that the motor may have an over - current phenomenon and is prone to the following faults:
[0071] Overcurrent may cause damage to the insulation layer in the motor winding, leading to winding short - circuit. The short - circuit will further increase the current, causing more serious overheating and motor damage, which may lead to motor failure. Continuous overcurrent causes the coil to overheat, the coil insulation material to decompose and burn out. The burning out of the coil will cause the motor to completely fail and requires replacement or repair. Overcurrent causes the current density between the brush and the commutator to be too high, resulting in increased wear. The wear of the brush and the commutator will affect the normal operation of the motor, generating sparks and arcs, further damaging the motor.
[0072] Overcurrent causes the motor to run unevenly, with increased vibration, uneven load, and increased bearing wear, which may lead to bearing failure and affect the running smoothness of the motor. Overcurrent may exceed the design range of the motor controller, causing the controller to be overloaded, the electronic components in the controller to overheat or burn out, and the control system to fail. Overcurrent causes an increase in the internal losses of the motor, a decrease in the motor efficiency, and a decrease in the energy conversion efficiency, resulting in more energy being lost as heat and affecting the overall system performance. Overcurrent increases the resistance losses of the cable and connector. The overheating of the cable and connector may cause damage to the insulation layer, resulting in electrical faults and safety hazards.
[0073] The acquisition logic of the efficiency ratio is as follows: Obtain the output power and input power of the motor, and divide the output power by the input power to obtain the efficiency ratio. The smaller the efficiency ratio, the more likely the motor may have the following faults:
[0074] The damage to the insulation layer of the motor winding leads to winding short - circuit, partial winding failure, increased current loss, and reduced output power and efficiency of the motor. The long - term use of the motor winding causes insulation aging, increased winding resistance, increased energy loss, and decreased motor efficiency. Poor bearing lubrication or severe wear increases mechanical friction loss and reduces the mechanical efficiency of the motor. Poor contact or severe wear between the brush and the commutator increases the contact resistance between the brush and the commutator, generating more electrical energy loss and reducing the motor efficiency.
[0075] The motor operates under conditions exceeding the design load for a long time. Overload causes an increase in current, an increase in heat generation, and a decrease in the electrical energy conversion efficiency. The failure of the heat dissipation system or too high ambient temperature causes poor heat dissipation of the motor, an increase in the internal temperature of the motor, the conversion of electrical energy into heat loss, and a decrease in efficiency. Unstable power supply voltage or large frequency fluctuations cause the motor to be unable to work properly, with a decrease in efficiency and even possible damage to the motor. Abnormal mechanical load or transmission system failure increases additional mechanical losses and reduces the overall efficiency.
[0076] Judge whether the drive system supports operation according to the comparison result of the status index and the index threshold, including the following steps:
[0077] After obtaining the status index, the larger the status index is, the worse the overall performance of the drive system is, and the more likely it is to malfunction during continued operation. Therefore, the obtained status index is compared with the index threshold, and the index threshold is used to determine whether the drive system supports operation. If the status index is greater than the index threshold, it is determined that the overall performance of the drive system is poor and it does not support operation.
[0078] If it is determined that operation is supported, obtain the current tilt angle of the unicycle-coded robot through the gyroscope and accelerometer, and calculate the error between the target tilt angle and the current tilt angle, including the following steps:
[0079] Calculate the error between the target tilt angle and the current tilt angle. The expression is:
[0080] error = target_angl - current_angle, where target_angl is the target tilt angle, current_angle is the current tilt angle, and error is the error.
[0081] Embodiment 3: Calculate the control output of the proportional part according to the proportional gain and the error. The proportional part mainly generates a control output according to the current error magnitude and is used for rapid response, including the following steps:
[0082] Substitute the calculated error into the proportional control formula to obtain the proportional control output. The expression is:
[0083] P = K p *error, where P is the proportional control output, K p is the proportional gain, and error is the error.
[0084] Calculate the control output of the integral part according to the integral term of the error and the integral time constant. The integral part is used to eliminate the steady-state error and process long-term deviations, including the following steps:
[0085] Perform an integral operation on the calculated error. The integral operation needs to accumulate historical errors. The expression is: where I is the integral term, t represents the current time, represents the error at time ;
[0086] Calculate the integral control output using the integral gain and the integral term. The expression is: I out = K i *I, where I is the integral term, K i is the integral gain, and I out represents the integral control output.
[0087] Calculate the control output of the differential part based on the derivative term of the error and the differential time constant. The differential part is used to predict the future error change trend and suppress oscillations, including the following steps:
[0088] Calculate the error change rate as the derivative term of the error through the current error and the previous error. The expression is: In the formula, error_derivative is the derivative term of the error, error k is the current error, error k-1 is the previous error, and Δt is the sampling time interval. Calculate the differential control output based on the differential gain and the derivative term of the error. The expression is:
[0089] D = K d *error_derivative. In the formula, D is the differential control output, K d is the differential gain, and error_derivative is the derivative term of the error.
[0090] Add the control outputs of the proportional part, the integral part, and the differential part to obtain the correction torque, including the following steps:
[0091] The calculation expression of the correction torque is:
[0092] T = P + I out + D
[0093] , where T is the correction torque, P is the proportional control output, I out represents the integral control output, and D is the differential control output.
[0094] Confirm the rotation direction of the driving system driving the momentum wheel according to the positive or negative result of the correction torque value, including the following steps:
[0095] After obtaining the correction torque, compare the correction torque with the value 0. If T > 0, it means that the unicycle robot is currently in a right-tilting state and a leftward torque needs to be applied to suppress the right tilt. Taking the rear of the unicycle programming robot as the reference, the driving system drives the momentum wheel to rotate counterclockwise. If T < 0, it means that the unicycle robot is currently in a left-tilting state and a rightward torque needs to be applied to suppress the left tilt. Taking the rear of the unicycle programming robot as the reference, the driving system drives the momentum wheel to rotate clockwise.
[0096] Take the absolute value of the correction torque as the torque index, generate an adjustment coefficient in combination with the torque index and the state index, and adjust the rotational acceleration of the momentum wheel according to the adjustment coefficient, including the following steps:
[0097] Take the absolute value of the correction torque as the torque index. The expression is: Z moment = |T|. In the formula, T is the correction torque, Z moment为Moment index;
[0098] Generate an adjustment coefficient by combining the moment index and the state index. The expression is:
[0099] TJ x = α * Z moment - β * Z state , where TJ x is the adjustment coefficient, Z moment is the moment index, Z state is the state index, α and β are the proportionality coefficients of the moment index and the state index respectively, and both α and β are greater than 0.
[0100] In this application, the driving system of the unicycle coding robot adopts a preset rotational acceleration of the momentum wheel, which is usually input manually according to experience. The rotational acceleration of the momentum wheel can be increased or decreased. For example, when the moment index is large and the state index is small, it indicates that the unicycle coding robot is currently tilted greatly and the performance of the driving system is good. Therefore, it is necessary to increase the rotational acceleration of the momentum wheel to make the unicycle coding robot return to the vertical state more quickly. When the moment index is small and the state index is large, it indicates that the unicycle coding robot is currently tilted less and the performance of the driving system is poor. Therefore, it is necessary to slow down the rotational acceleration of the momentum wheel to make the unicycle coding robot return to the vertical state to avoid failures caused by excessive output power of the driving system;
[0101] Based on this, after obtaining the adjustment coefficient, compare the adjustment coefficient with a preset coefficient threshold to determine whether to increase or decrease the current rotational acceleration of the momentum wheel. The adjustment algorithm is as follows: where SD new is the adjusted rotational acceleration, SD old is the rotational acceleration before adjustment, TJ x is the adjustment coefficient, TJ z is the coefficient threshold;
[0102] It can be seen from the adjustment algorithm that based on the comparison result of the adjustment coefficient and the coefficient threshold, the current overall situation of the unicycle coding robot is judged, so as to select whether to increase or decrease the rotational acceleration of the momentum wheel.
[0103] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain a formula that is closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0104] In the description of this specification, the descriptions referring to the terms "one embodiment", "example", "specific example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0105] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to only the specific implementation manners. Obviously, according to the content of this specification, many modifications and changes can be made. These embodiments are selected and specifically described in this specification in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can well understand and utilize the present invention. The present invention is only limited by the claims and their full scope and equivalents.
Claims
1. A control method for a one-wheeled programming robot, characterized in that: The control method comprises the following steps: The control system monitors the operating data of the unicycle encoder robot drive system in real time, and generates a state index for the drive system based on the operating data. The expression is: , where is the state index, is the normalized value of the temperature rise rate, is the normalized value of current deviation, is the normalized value of the efficacy ratio, , , is the weight coefficient, and , judging whether the drive system supports operation according to the comparison result between the state index and the index threshold; If it is determined that the operation is supported, the current tilt angle of the unicycle encoder robot is obtained through the gyroscope and accelerometer, and the error between the target tilt angle and the current tilt angle is calculated; The control output of the proportional part is calculated according to the proportional gain and the error, the control output of the integral part is calculated according to the integral term of the error and the integral time constant, the control output of the differential part is calculated according to the derivative term of the error and the differential time constant, and the control outputs of the proportional part, the integral part and the differential part are added to obtain the correction torque; Determine the rotation direction of the driving system driving the momentum wheel according to the positive and negative results of the correction torque value; The absolute value of the correction torque is taken as the torque index, and the adjustment coefficient is generated by combining the torque index and the state index. The rotation acceleration of the momentum wheel is adjusted according to the adjustment coefficient.
2. The control method of a one-wheeled programming robot according to claim 1, characterized in that: Generating a status index for the drive system in combination with the operating data includes the following steps: The control system monitors the operating data of the unicycle encoder robot drive system in real time, including the temperature rise rate, current deviation and power efficiency ratio of the motor; The temperature rise rate, current deviation and power efficiency ratio are normalized so that their value ranges are mapped to [0,1], and the normalized value of the temperature rise rate, the normalized value of the current deviation and the normalized value of the power efficiency ratio are obtained. According to the positive and negative proportional relationship between the normalized value of the temperature rise rate, the normalized value of the current deviation and the normalized value of the power efficiency ratio and the state index, the normalized value of the temperature rise rate, the normalized value of the current deviation and the normalized value of the power efficiency ratio are weighted to obtain the state index.
3. The control method of a one-wheeled programming robot according to claim 2, characterized in that: Judging whether the drive system supports operation according to the comparison result between the state index and the index threshold includes the following steps: The obtained state index is compared with the index threshold. The index threshold is used to determine whether the drive system supports operation. If the state index is greater than the index threshold, it is determined that the overall performance of the drive system is poor and does not support operation.
4. The control method of a one-wheeled programming robot according to claim 3, characterized in that: Calculate the error between the target tilt angle and the current tilt angle. The expression is: , where is the target tilt angle, is the current tilt angle, For error.
5. The control method of a one-wheeled programming robot according to claim 4, characterized in that: The control outputs of the proportional part, the integral part and the differential part are added to obtain the correction torque, including the following steps: The calculation expression of the correction torque is: , where To correct the torque, For proportional control output, represents the integral control output, It is the differential control output.
6. The control method of a one-wheeled programmable robot according to claim 5, characterized in that: The rotation direction of the driving system driving the momentum wheel is confirmed according to the positive and negative results of the correction torque value, including the following steps: After obtaining the correction torque, compare the correction torque with the value 0; like , indicating that the unicycle robot is currently tilting to the right and needs to apply a left torque to suppress the right tilt. Taking the rear of the unicycle programming robot as the reference, the drive system drives the momentum wheel to rotate counterclockwise; like , indicating that the unicycle robot is currently in a state of tilting to the left, and a rightward torque needs to be applied to suppress the left tilt. Taking the rear of the unicycle programming robot as a reference, the drive system drives the momentum wheel to rotate clockwise.
7. The control method of a one-wheeled programmable robot according to claim 6, characterized in that: The absolute value of the correction torque is taken as the torque index, and the adjustment coefficient is generated by combining the torque index and the state index, including the following steps: The absolute value of the correction torque is taken as the torque index, and the expression is: , where To correct the torque, is the torque index; The adjustment coefficient is generated by combining the torque index and the state index. The expression is: , where is the adjustment coefficient, is the torque index, is the state index, , are the proportionality coefficients of the torque index and the state index, respectively, and , Both are greater than 0.
8. The control method of a one-wheeled programming robot according to claim 7, characterized in that: Adjusting the rotational acceleration of the momentum wheel according to the adjustment coefficient includes the following steps: After obtaining the adjustment coefficient, the adjustment coefficient is compared with the preset coefficient threshold to determine whether the current rotation acceleration of the momentum wheel needs to be increased or decreased. The adjustment algorithm is: , where is the adjusted rotational acceleration, is the rotation acceleration before adjustment, is the adjustment coefficient, is the coefficient threshold.
9. The control method of a one-wheeled programmable robot according to claim 5, characterized in that: The control output of the proportional part is calculated based on the proportional gain and the error, including the following steps: Substitute the calculated error into the proportional control formula to obtain the proportional control output, the expression is: , where For proportional control output, is the proportional gain, is the error; The control output of the integral part is calculated according to the integral term of the error and the integral time constant, including the following steps: Perform an integral operation on the calculated error. The integral operation requires the accumulation of historical errors. The expression is: , where is the integral term, Indicates the current time. Indicates at time The error of time; The integral control output is calculated using the integral gain and the integral term, and the expression is: , where is the integral term, is the integral gain, Indicates the integral control output; The control output of the differential part is calculated according to the derivative term of the error and the differential time constant, including the following steps: The error change rate is calculated by the current error and the previous error as the error derivative, and the expression is: , where is the error derivative term, is the current error, is the last error, is the sampling time interval, and the derivative control output is calculated based on the derivative gain and the error derivative term, and the expression is: , where is the differential control output, is the differential gain, is the error derivative term.
10. The control method of a one-wheeled programmable robot according to claim 2, characterized in that: The acquisition logic of the temperature rise rate is as follows: obtain the temperature value of the motor at the current moment and the temperature value at the previous moment, obtain the temperature difference by subtracting the temperature value at the previous moment from the temperature value at the current moment, obtain the monitoring time by subtracting the current moment from the previous moment, and obtain the temperature rise rate by dividing the temperature difference by the monitoring time; The logic for obtaining the current deviation is: obtaining the real-time current value of the motor, and subtracting the standard current value from the real-time current value to obtain the current deviation; The logic for obtaining the power efficiency ratio is: obtaining the output power and input power of the motor, and obtaining the power efficiency ratio by dividing the output power by the input power.
Citation Information
Patent Citations
Single-wheel robot system and control method thereof
CN101590323A
Motor drive control method and device
CN117559354A