Closed-loop control method and device for Mecanum wheel
By employing a closed-loop control method using an inertial sensor array and a three-segment ramp algorithm, the heading deviation problem of the Mecanum wheel under complex working conditions was solved, achieving high-precision and stable motion control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-10
AI Technical Summary
Existing Mecanum wheel control systems suffer from nonlinear errors, weak anti-interference capabilities, difficulty in achieving precise positioning, and do not fully utilize inertial measurement units for real-time correction, leading to easy heading deviations under complex operating conditions.
The heading angle is acquired in real time using an inertial sensor array. The speed of the stepper motor is adjusted by calculating the effective pulse interval and a three-segment ramp algorithm. Closed-loop control is achieved by combining an inertial measurement unit and a data transfer circuit.
It improves the positioning accuracy and motion stability of the Mecanum wheel, solves the yaw problem caused by the difference in response of multiple motors, and optimizes the smoothness of motion.
Smart Images

Figure CN121841173A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor control, in particular to a closed-loop control method and device for Mecanum wheels. BACKGROUND
[0002] As a kind of omni-directional mobile mechanism, Mecanum wheel is widely used in industrial robots, automatic guided vehicles (AGV), special engineering vehicles and other fields due to its characteristics of realizing lateral movement and rotation without steering. In the prior art, the Mecanum wheel control system mostly uses DC motor combined with PID control strategy. DC motor relies on voltage or PWM signal to control speed, and its output has nonlinear error, making it difficult to realize accurate positioning of step level. In addition, the anti-interference ability of traditional PID control to environmental disturbance (such as change of ground friction and load fluctuation) is weak, which leads to easy deviation of the moving platform in complex working conditions. The existing system mostly relies on open-loop control or simple angle feedback (such as encoder), and does not fully combine the heading angle data of inertial measurement unit (IMU) for real-time correction. Moreover, the traditional control method often uses fixed step or simple acceleration and deceleration strategy, without considering the influence of motor load change on motion smoothness, so the speed regulation effect is poor. SUMMARY
[0003] To solve at least one technical problem in the prior art, the embodiments of the present application provide a closed-loop control method and device for Mecanum wheels.
[0004] To achieve the above purpose, the embodiments of the present application provide the following technical solutions: The present application provides a closed-loop control method for Mecanum wheels, which comprises: Real-time acquisition of the current heading angle of the moving platform based on a pre-constructed inertial sensor array; Calculation of the effective pulse interval according to the current heading angle; Adjustment of the speed of the stepping motor based on the effective pulse interval and a preset three-section slope algorithm.
[0005] In some embodiments, the construction of the inertial sensor array specifically comprises: Placing 1 to N inertial measurement units at the target points of the stepping motors connected to the Mecanum wheels of the moving platform; Wherein, the inertial measurement units adopt a consistent coordinate system when deployed, N is a positive integer greater than or equal to 2, and the inertial measurement unit includes an accelerometer for acquiring the current acceleration of the moving platform, a gyroscope for acquiring the current angular velocity of the moving platform, and a magnetometer for acquiring the current magnetic heading angle of the moving platform.
[0006] In some embodiments, the effective pulse interval is calculated according to the current heading angle, specifically comprising: The difference between the target heading angle and the current heading angle is taken as a deviation, to calculate a heading angle deviation value; According to the heading angle deviation value, a pulse interval adjustment coefficient is calculated; The pulse interval adjustment coefficient is combined with a basic pulse interval to generate a dynamic pulse interval; The dynamic pulse interval is corrected by a pre-stored calibration coefficient to obtain an effective pulse interval; The pulse interval of the stepper motor driver is updated according to the effective pulse interval.
[0007] In some embodiments, the inertial measurement unit connects the input and output interfaces of the sensor to the interfaces of the processor through a data relay circuit.
[0008] In some embodiments, the three-stage ramp algorithm specifically comprises: In the initial stage of movement, the pulse interval is dynamically adjusted by an acceleration segment pulse interval formula, which is:
[0009] Wherein, represents the current pulse interval of the acceleration segment, is a preset length of the number of steps in the acceleration segment, represents the initial pulse interval time at the beginning of the acceleration segment, represents the number of steps already performed in the acceleration segment.
[0010] In some embodiments, the three-stage ramp algorithm further comprises: When the mobile platform enters the stable running stage, a constant pulse interval is maintained to run at a target speed.
[0011] In some embodiments, the three-stage ramp algorithm further comprises: In the deceleration segment, the pulse interval is adjusted by a deceleration segment pulse interval formula, which is:
[0012] Wherein, represents the current pulse interval value, represents the basic pulse interval, represents the total number of steps in the deceleration segment, represents the number of steps already completed.
[0013] The present application also provides a closed-loop control device for Mecanum wheels, which comprises: a data acquisition unit configured to acquire a current heading angle of the mobile platform in real time based on a pre-constructed inertial sensor array; a pulse calculation unit configured to calculate an effective pulse interval according to the current heading angle; a speed adjustment unit configured to adjust a speed of the stepper motor based on the effective pulse interval and a preset three-stage ramp algorithm.
[0014] The application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method when executing the program.
[0015] The application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the steps of the method.
[0016] The closed-loop control method and device for Mecanum wheels provided by the application acquire a current heading angle of the mobile platform in real time based on a pre-constructed inertial sensor array, calculate an effective pulse interval according to the current heading angle, and adjust the speed of the stepper motor based on the effective pulse interval and a preset three-stage ramp algorithm. Thus, the method and device, aiming at the monitoring needs of the stepper motor for the closed-loop control of the Mecanum wheels, design a corresponding heading angle monitoring scheme based on multiple IMU sensors (inertial measurement unit) and form a software and hardware system, realize real-time measurement and calculation of the moving direction of the mobile platform, dynamically adjust the pulse interval of the stepper motor based on the heading angle to solve the yaw problem caused by the response difference of multiple motors, realize acceleration and deceleration control, and optimize the motion smoothness. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0018] The structures, proportions, sizes, etc. shown in the specification are only used to cooperate with the content disclosed in the specification, to be understood and read by those skilled in the art, and do not define the limiting conditions for the implementation of the application, so they do not have technical significance. Any modification of the structure, change of the proportion relationship or adjustment of the size, without affecting the effects and purposes that can be achieved by the application, should still fall within the scope of the technical content disclosed by the application.
[0019] Figure 1One of the flowcharts of the closed-loop control method for Mecanum wheels provided by the present application; Figure 2 A schematic diagram of a mobile platform heading angle monitoring sensor deployment scheme; Figure 3 A sensor and processor connection circuit diagram; Figure 4 A Bluetooth wireless transmission module circuit diagram; Figure 5 The second flowchart of the closed-loop control method for Mecanum wheels provided by the present application; Figure 6 The third flowchart of the closed-loop control method for Mecanum wheels provided by the present application; Figure 7 The structural block diagram of the closed-loop control device for Mecanum wheels provided by the present application; Figure 8 The structural block diagram of a computer device provided by the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application are described below by specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. Obviously, the described embodiments are part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0021] In order to solve the above technical problems, the present application relates to a step motor Mecanum wheel closed-loop control method based on IMU feedback, specifically including: ① a sensor measurement scheme based on IMU array to obtain heading angle; ② a pulse interval algorithm based on dynamic adjustment of the heading angle of the stepping motor; and ③ a three-stage slope algorithm for controlling the acceleration and deceleration of the stepping motor. Among them, ① based on the monitoring requirements and characteristics of the mobile platform needing to obtain the moving direction and motion trajectory, a corresponding sensor array is designed based on the IMU inertial sensor, and a data acquisition, centralized power supply and data transmission integrated circuit is designed to form a data collection prototype; ② then on the basis of the scheme in ①, the collected data is analyzed, and a related pulse interval algorithm for adjusting the stepping motor is designed. ③ then for the adjustment data in ②, a corresponding three-stage slope algorithm is designed to control the acceleration and deceleration of the stepping motor. Based on the technical method formed in the present application, the closed-loop control of the Mecanum wheel can be effectively realized, and the positioning accuracy is improved; through the synchronous calibration of the stepping motor, the yaw problem caused by the response difference of multiple motors is solved; the acceleration and deceleration control is realized, and the motion smoothness is optimized.
[0022] In a specific embodiment, please refer to Figure 1The application provides a closed-loop control method for a Mecanum wheel, which comprises the following steps: S110: Real-time collection of a current heading angle of the mobile platform based on a pre-constructed inertial sensor array; S120: Calculation of an effective pulse interval according to the current heading angle; S130: Adjustment of the speed of the stepping motor based on the effective pulse interval and a preset three-section slope algorithm.
[0023] The closed-loop control method can realize real-time feedback of the heading angle through the inertial sensor array, construct a closed-loop control link of the motion state of the Mecanum wheel, solve the heading drift problem caused by load changes and ground friction differences under open-loop control, adjust the speed of the stepping motor in combination with the effective pulse interval and the three-section slope algorithm, realize smooth start and stop and precise speed regulation of the motor, avoid impact and vibration during the start and stop of the motor, and improve the motion stability and trajectory tracking accuracy of the mobile platform.
[0024] In step S110, the construction of the inertial sensor array specifically comprises: One to N inertial measurement units are placed at target points of the stepping motor connected with the Mecanum wheel of the mobile platform; wherein the inertial measurement units adopt a consistent coordinate system during deployment, N is a positive integer greater than or equal to 2, and the inertial measurement unit comprises an accelerometer for collecting the current acceleration of the mobile platform, a gyroscope for collecting the current angular velocity of the mobile platform, and a magnetometer for collecting the current magnetic heading angle of the mobile platform.
[0025] The deployment of multiple groups of inertial measurement units at the target points of the stepping motor and the adoption of a unified coordinate system can realize redundant collection and cross verification of multi-dimensional motion data and reduce the measurement error of a single sensor; through the multi-sensor fusion of the accelerometer, the gyroscope and the magnetometer, the acceleration, the angular velocity and the magnetic heading angle data of the mobile platform can be obtained at the same time, multi-source data support is provided for the accurate calculation of the heading angle, measurement failure of a single sensor caused by environmental interference (such as electromagnetic interference of the magnetometer and integral drift of the gyroscope) is avoided, and the measurement reliability and anti-interference ability of the sensor array are improved; wherein the accelerometer converts the inertial force generated by the internal mass block under the action of acceleration into an electric signal output based on Newton's second law, realizes the measurement of the three-dimensional linear acceleration of the mobile platform, the gyroscope calculates the angular velocity of the mobile platform around the three-dimensional coordinate axes based on the Coriolis effect by detecting the Coriolis force generated by the vibrating mass block in the rotating motion, and the magnetometer detects the direction and strength of the earth's magnetic field based on the Hall effect or the magnetoresistance effect and outputs the magnetic heading angle data of the mobile platform relative to the geomagnetic north pole.
[0026] Specifically, the control method provided by the application involves a sensing measurement scheme for acquiring a heading angle based on an IMU array. The heading angle of a mobile platform is measured in real time by means of a plurality of IMU inertial sensors forming a measurement array. The IMU inertial sensor is composed of an accelerometer, a gyroscope, and a magnetometer. By complementing the measurement results of the three, the IMU inertial sensor can provide measurement of all-around motion states such as acceleration, angular velocity, and magnetic heading angle. The application mainly utilizes the magnetic heading angle measurement function of the IMU sensor. The sensing measurement system is composed of a measurement array of four IMU inertial sensors. In this embodiment, the sensor deployment is performed according to the scheme shown in Figure 2 It can be understood that the number of sensors is not limited, and the more the better, but the effect of four sensors is not much improved. On the premise of ensuring the effect, the minimum is two, and four is a relatively good number under the premise of ensuring the effect in the case of a small number.
[0027] As shown in the arrangement shown in Figure 1 The first to fourth IMU sensors are placed at the mark points at the top four corners of the stepping motor chassis connected with the Mecanum wheels of the mobile platform. The square plane formed by the four mark points can effectively reflect the heading angle of the mobile platform, and the mark points are all at the top positions of the Mecanum wheels. Placing the IMU sensors at the mark points can effectively reflect the heading angle of the Mecanum wheels during movement.
[0028] The four IMU sensors are deployed in a consistent coordinate system. For the top view shown in Figure 1 The z-axis of each IMU sensor is upward, the y-axis is leftward, and the x-axis is forward. This makes it possible to process the angles measured by the four IMU sensors in the same coordinate system without complex coordinate transformation.
[0029] Each IMU sensor measures the angle in the form of a quaternion. To reduce the influence of the angle error and the measurement error of the IMU sensor during deployment, the average value of the angle measurements of the first to fourth IMU sensors is taken as the measurement value of the heading angle of the mobile platform.
[0030] In some embodiments, the inertial measurement unit connects the input and output interfaces of the sensors to the interfaces of the processor respectively through a data relay circuit. The standardized interface connection between the inertial measurement unit and the processor is realized through the data relay circuit, the data transmission protocols and level standards of multiple groups of sensors are unified, and problems such as interface conflict and data transmission confusion caused by the direct connection of different sensors to the processor are avoided; the data relay circuit can preliminarily filter and format convert the raw data collected by the sensors, reduce the computational load of the processor, improve the data transmission efficiency and processing real-time performance, and at the same time, play an electrical isolation role to protect the processor interface from voltage fluctuation impact from the sensor side; in addition, the standardized interface facilitates the expansion and maintenance of the subsequent sensor array, and improves the compatibility and scalability of the system.
[0031] The sensor data relay circuit is shown in Figure 3 The input and output interfaces of the sensors are connected to the interfaces of the processor in the sensor data relay circuit, TX8 is the input end of the sensor 8 data, RX8 is the output end of the sensor 8 data, and after connection, data transmission between the sensor and the processor can be realized. The other sensor circuits are the same.
[0032] The circuit of the Bluetooth wireless data transmission module is shown in Figure 4 The input and output interfaces of the Bluetooth module are connected to the interfaces of the processor, TX is the input end of the Bluetooth module data, RX is the output end of the Bluetooth module data, and after connection, bidirectional data transmission between the Bluetooth module and the processor can be realized. Then, the communication between the hardware and the PC end can be realized by connecting the PC end with the Bluetooth.
[0033] In step S120, the effective pulse interval is calculated according to the current heading angle, specifically including: The difference between the target heading angle and the current heading angle is taken as a deviation, to calculate the heading angle deviation value; According to the heading angle deviation value, the pulse interval adjustment coefficient is calculated; The pulse interval adjustment coefficient is combined with the basic pulse interval to generate a dynamic pulse interval; The dynamic pulse interval is corrected by using the pre-stored calibration coefficient to obtain the effective pulse interval; The pulse interval of the step motor driver is updated according to the effective pulse interval.
[0034] In this way, by calculating the deviation value of the target heading angle and the current heading angle, the quantitative evaluation of the heading deviation of the mobile platform is realized; the pulse interval adjustment coefficient generated based on the deviation value can dynamically adjust the driving pulse interval of the stepping motor, realize real-time compensation of the heading deviation; the introduction of the calibration coefficient can offset the inherent step angle error of the stepping motor, the response delay of the driver and other system errors, generate high-precision effective pulse interval, ensure the accuracy of the stepping motor speed regulation instruction, and finally realize the rapid deviation correction and accurate control of the heading of the mobile platform; at the same time, the heading angle calculated by the multi-sensor fusion combines the acceleration integration of the accelerometer, the angular velocity integration of the gyroscope and the geomagnetic calibration data of the magnetometer, which can effectively suppress the cumulative error of a single sensor and improve the measurement accuracy of the heading angle.
[0035] Specifically, the control method provided by the application further includes a pulse interval adjustment algorithm for dynamically adjusting the stepping motor, that is, the application designs an algorithm for dynamically adjusting the pulse interval of the stepping motor based on the heading angle data obtained by the IMU, to solve the yaw problem caused by the response difference of the multi-motor. As shown in the figure, the specific algorithm flow is as follows: Figure 5 (1) Real-time acquisition of mobile platform heading angle data: reading the current heading angle (current_angle) from the IMU sensor; (2) Heading angle deviation calculation: taking the difference between the target heading angle (target_angle) and the current_angle as the deviation (angle_error), and calculating the heading angle deviation value:
[0036] (3) Motor pulse interval adjustment coefficient calculation: according to the heading angle deviation value, the pulse interval adjustment coefficient is calculated, wherein Kp is a preset proportional coefficient:
[0037] (4) Dynamic pulse interval calculation: combining the adjustment coefficient with the base pulse interval (base_interval) to generate the dynamic pulse interval (dynamic_interval):
[0038] (5) Motor synchronization calibration: to solve the individual difference problem of the motor, the application introduces a calibration coefficient, which is stored in EEPROM and used to compensate the response difference of the motor in different directions. According to the current motion direction (forward / backward / left / right), the calibration coefficient (kF / kB / kSL / kSR) is read from the EEPROM to further modify the pulse interval:
[0039] (6) Pulse interval updating: update the calculated effective pulse interval to the stepper motor driver, realizing accurate control of each motor pulse output.
[0040] (7) Real-time feedback mechanism: after each pulse operation, the system immediately updates the heading angle measurement value, forming a closed-loop feedback, continuously adjusting the pulse interval, ensuring that the trolley moves according to the target heading.
[0041] The core advantage of this algorithm is that it dynamically adjusts the pulse interval by real-time monitoring of the heading angle deviation, enabling the mobile platform to automatically correct the yaw caused by motor response differences without the need for additional sensors or complex control strategies.
[0042] Attached Figure 5 The invention shows the closed-loop control process of dynamically adjusting the pulse interval of the stepper motor, the system dynamically adjusts the pulse interval by real-time monitoring of the heading angle deviation, and combines the calibration coefficient stored in the EEPROM to compensate for motor individual differences, ultimately achieving centimeter-level high-precision positioning.
[0043] In step S130, the three-stage ramp algorithm specifically includes three continuous and independent motion control stages: acceleration stage, stable stage, and deceleration stage, which realizes smooth speed regulation of the stepper motor by dynamically adjusting the pulse interval in stages. Specifically, the following operations are performed in the acceleration stage at the initial stage of motion: The pulse interval is dynamically adjusted by the acceleration stage pulse interval formula, which is:
[0044] Wherein, represents the real-time pulse interval of the acceleration stage, is the preset step length of the acceleration stage, represents the motor basic pulse interval, represents the number of completed acceleration steps of the motor; in the acceleration stage, the value of increases from 0 to , the value of smoothly decreases from to the preset minimum value, corresponding to the smooth increase of the rotation speed of the stepper motor from 0 to the target rotation speed.
[0045] In the acceleration stage, the pulse interval is dynamically reduced by the above formula, realizing smooth acceleration of the stepper motor, avoiding the problems of motor stall and step loss caused by sudden changes in pulse interval; by presetting the step length of the acceleration stageThe length and acceleration of the acceleration process can be accurately controlled to adapt to the acceleration demand under different load conditions, ensure the stability of the mobile platform in the starting stage, and prevent mechanical structure wear or load slip caused by excessive acceleration. At the same time, based on the real-time motion data fed back by the sensor array, the acceleration parameters can be dynamically adjusted to further improve the stability and adaptability of the acceleration process.
[0046] The three-stage ramp algorithm further includes control logic of a stable running stage: when the mobile platform enters the stable running stage, the judgment condition is that the total number of steps completed by the motor reaches the length of the acceleration segment , and the real-time speed reaches the target speed. At this time, a constant pulse interval is maintained, that is, the pulse interval value is maintained as the minimum value at the end of the acceleration segment, and the target speed is run. The duration of the stable running stage is determined by the preset motion stroke of the mobile platform, and the deceleration signal is triggered until the end.
[0047] The constant pulse interval in the stable running stage ensures that the stepper motor drives the Mecanum wheel at a stable speed, ensuring uniform motion of the mobile platform and avoiding trajectory deviation caused by speed fluctuations. The constant pulse interval can reduce the adjustment frequency of the motor driver, reduce system energy consumption, and at the same time improve the positioning accuracy of the mobile platform during motion, meeting the uniform motion demand in high-precision inspection, material handling and other scenes. Combined with real-time heading angle monitoring of the sensor array, small heading deviations can be discovered and compensated in time in the stable running stage, further ensuring the accuracy of the motion trajectory.
[0048] The three-stage ramp algorithm further includes control logic of a deceleration segment: in the deceleration segment, the trigger condition is that the total number of steps completed by the motor reaches the difference between the preset motion stroke and the length of the deceleration segment. The pulse interval is adjusted by the deceleration segment pulse interval formula:
[0049] wherein, represents the real-time pulse interval in the deceleration segment, represents the basic pulse interval of the motor, represents the total number of steps in the deceleration segment of the motor, represents the number of steps completed by the motor; in the deceleration segment, the value of , the value of smoothly increases from the minimum value at the end of the acceleration segment to , and the speed of the stepper motor smoothly decreases from the target speed to 0.
[0050] The pulse interval is dynamically increased in the deceleration stage by the above formula to achieve smooth deceleration of the stepper motor, avoiding reverse impact of the motor and mechanical structure vibration caused by sudden deceleration. The total number of steps in the deceleration segment The number of steps completed The rate of the deceleration process can be controlled to ensure that the mobile platform stops smoothly, prevent positioning errors caused by inertia sliding, and improve the parking accuracy and operation safety of the mobile platform; meanwhile, based on the real-time speed and position data fed back by the sensor array, the deceleration parameters can be dynamically adjusted to adapt to the deceleration requirements under different loads and operating environments, and the deceleration effect is further optimized.
[0051] The control method provided by the application also includes a three-stage ramp algorithm control method for accelerating and decelerating the stepping motor, which divides the acceleration and deceleration process into three stages: an acceleration stage, a constant speed stage and a deceleration stage. In the acceleration stage, the pulse interval gradually increases with the increase of the number of steps to achieve smooth acceleration. In the constant speed stage, a constant pulse interval is maintained to run at a stable speed. In the deceleration stage, the pulse interval gradually increases with the increase of the number of steps to achieve smooth deceleration. The length of the acceleration and deceleration stage is dynamically adjusted according to the movement distance to optimize the movement smoothness. In the movement process, the heading angle data fed back by the IMU is used to adjust the acceleration and deceleration curve in real time to ensure the accuracy of the heading.
[0052] Specifically, the application designs a three-stage ramp algorithm for controlling the acceleration and deceleration process of the stepping motor to optimize the movement smoothness and reduce mechanical impact and vibration. The three-stage ramp algorithm divides the acceleration and deceleration process into three stages: an acceleration stage, a constant speed stage and a deceleration stage.
[0053] (1) Acceleration stage: In the initial stage of movement, the system starts the motor with a small pulse interval (high frequency) and gradually increases the pulse interval to achieve smooth acceleration. In this stage, the pulse interval is dynamically adjusted by the acceleration stage pulse interval formula, where n is the preset number of steps in the acceleration stage.
[0054]
[0055] (2) Constant speed stage: When the mobile platform enters the stable running stage, a constant pulse interval V is maintained to run at the target speed. In this stage, the fixed pulse interval ensures the stability of the movement.
[0056] (3) Deceleration stage: When approaching the target position, the system gradually increases the pulse interval (reduces the frequency) to achieve smooth deceleration. In this stage, the pulse interval is adjusted by the deceleration stage pulse interval formula to ensure that the mobile platform stops smoothly.
[0057]
[0058] (4) Dynamic adjustment of the length of the acceleration and deceleration stage: According to the actual movement distance and the characteristics of the motor, the system dynamically adjusts n. In short distance movement, Set to a small value; in long distance movement, Increase to optimize smoothness.
[0059] (5) Real-time adjustment: During the movement process, the system continuously monitors the heading angle data fed back by the IMU. If it is found that the heading deviation is too large, the acceleration-deceleration curve is adjusted in priority, the acceleration section is shortened or the deceleration section is lengthened to ensure the accuracy of the heading.
[0060] The three-section ramp algorithm not only optimizes the movement smoothness, but also reduces the mechanical impact caused by sudden acceleration or stopping, prolonging the service life of the motor and mechanical structure. At the same time, the algorithm can be seamlessly combined with the IMU feedback closed-loop control to realize high-precision path tracking.
[0061] Figure 6 The control flow of the three-section ramp acceleration-deceleration algorithm of the application is shown. The system dynamically determines whether it is in the acceleration section, constant speed section or deceleration section according to the current step number, and adjusts the pulse interval in real time. At the same time, the length of the acceleration-deceleration section (Tacc+Tdec) ) can be dynamically adjusted according to the movement distance to optimize the movement smoothness.
[0062] In the above specific embodiments, the closed-loop control method and device for Mecanum wheels provided by the application, by constructing an inertial sensor array in advance, real-time acquisition of the current heading angle of the mobile platform, calculation of the effective pulse interval according to the current heading angle, and adjustment of the speed of the stepping motor based on the effective pulse interval and the preset three-section ramp algorithm. In this way, the method and device, in view of the monitoring needs of the stepping motor for the closed-loop control of the Mecanum wheel, design a corresponding heading angle monitoring scheme based on multiple IMU sensors (inertial measurement unit) and form a software and hardware system, realize real-time measurement and calculation of the moving direction of the mobile platform, dynamically adjust the pulse interval of the stepping motor based on the heading angle to solve the yaw problem caused by the response difference of multiple motors, realize acceleration-deceleration control, and optimize the movement smoothness.
[0063] In addition to the above method, the application also provides a closed-loop control device for Mecanum wheels, as shown in Figure 7 , the device comprises: A data acquisition unit 710 is configured to acquire the current heading angle of the mobile platform in real time based on a pre-constructed inertial sensor array. A pulse calculation unit 720 is configured to calculate an effective pulse interval according to the current heading angle. A speed adjustment unit 730 is configured to adjust the speed of the stepping motor based on the effective pulse interval and a preset three-section ramp algorithm.
[0064] In some embodiments, constructing the inertial sensor array specifically comprises: 1 to N inertial measurement units are placed at target positions of stepping motors connected with Mecanum wheels of the mobile platform; The inertial measurement units adopt a consistent coordinate system when deployed, N is a positive integer greater than or equal to 2, and the inertial measurement unit includes an accelerometer for collecting the current acceleration of the mobile platform, a gyroscope for collecting the current angular velocity of the mobile platform, and a magnetometer for collecting the current magnetic heading angle of the mobile platform.
[0065] In some embodiments, the effective pulse interval is calculated according to the current heading angle, specifically including: The difference between the target heading angle and the current heading angle is taken as a deviation to calculate a heading angle deviation value; According to the heading angle deviation value, a pulse interval adjustment coefficient is calculated; The pulse interval adjustment coefficient is combined with a basic pulse interval to generate a dynamic pulse interval; The dynamic pulse interval is corrected by using a pre-stored calibration coefficient to obtain an effective pulse interval; The pulse interval of the stepping motor driver is updated according to the effective pulse interval.
[0066] In some embodiments, the inertial measurement unit connects the input and output interfaces of the sensor to the interfaces of the processor through a data relay circuit.
[0067] In some embodiments, the three-stage ramp algorithm specifically includes: In the initial stage of movement, the pulse interval is dynamically adjusted by an acceleration stage pulse interval formula, and the acceleration stage pulse interval formula is:
[0068] wherein, represents the pulse interval of the current acceleration stage, is the preset length of the number of steps in the acceleration stage, represents the initial pulse interval time at the beginning of the acceleration stage, represents the number of steps that have been executed in the acceleration stage.
[0069] In some embodiments, the three-stage ramp algorithm further includes: When the mobile platform enters the stable running stage, a constant pulse interval is maintained to run at a target speed.
[0070] In some embodiments, the three-stage ramp algorithm further includes: In the deceleration stage, the pulse interval is adjusted by a deceleration stage pulse interval formula, and the deceleration stage pulse interval formula is:
[0071] wherein, represents a current pulse interval value, represents a basic pulse interval, represents a total number of steps of a deceleration section, represents a number of steps that have been completed.
[0072] The closed-loop control device for the Mecanum wheel provided by the application, by collecting the current heading angle of the mobile platform in real time based on the pre-constructed inertial sensor array, calculating the effective pulse interval according to the current heading angle, and adjusting the speed of the stepping motor based on the effective pulse interval and the preset three-section slope algorithm, thus, the method and device, aiming at the monitoring needs of the Mecanum wheel closed-loop control of the stepping motor, design the corresponding heading angle monitoring scheme based on the multi-IMU sensor (inertial measurement unit) and form the software and hardware system, realize the real-time measurement and calculation of the moving direction of the mobile platform, dynamically adjust the pulse interval of the stepping motor based on the heading angle to solve the yaw problem caused by the response difference of the multi-motor, realize the acceleration and deceleration control, and optimize the motion smoothness.
[0073] In one embodiment, a computer device, which can be a server, can have an internal structure diagram as shown in Figure 8 The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a model prediction. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The model prediction of the computer device is configured to store static information and dynamic information data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the steps in the above method embodiments.
[0074] Those skilled in the art can understand, Figure 8 the structure shown in the figure, only a block diagram of part of the structure related to the application scheme, and does not constitute a limitation on the computer device to which the application scheme is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0075] Corresponding to the above-mentioned embodiments, the application also provides a computer storage medium containing one or more program instructions. Wherein, the one or more program instructions are used to execute the method as described above.
[0076] The application further provides a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer readable storage medium, and the computer program being capable of executing the above method when executed by a processor.
[0077] In the embodiments of the application, the processor can be an integrated circuit chip with a processing capability of signals. The processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0078] The disclosed methods, steps and logic block diagrams in the embodiments of the application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The processor reads the information in the storage medium and combines the hardware to complete the steps of the above method.
[0079] The storage medium can be a memory, for example, can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
[0080] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory.
[0081] The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The below-described subject matter can be implemented with computers operating in stand-alone, multi-user buses and other architectures.
[0082] The storage media described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.
[0083] Those skilled in the art should be aware that the functions described in the embodiments of the present application can be implemented in combination of hardware and software in one or more of the above examples. When the software is applied, the corresponding functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on the computer readable medium. The computer readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0084] The above detailed description of the embodiments of the present application is further detailed for the purpose of the object, technical solutions and beneficial effects of the present application. It should be understood that the above is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.
Claims
1. A closed-loop control method for a Mecanum wheel, characterized in that, The method includes: Based on a pre-built array of inertial sensors, the current heading angle of the mobile platform is collected in real time; The effective pulse interval is calculated based on the current heading angle; The speed of the stepper motor is adjusted based on the effective pulse interval and the preset three-segment ramp algorithm.
2. The closed-loop control method for a Mecanum wheel according to claim 1, characterized in that, Constructing an inertial sensor array specifically includes: Inertial measurement units 1 to N are placed at the target points of the stepper motors connected to the Mechram wheels on the mobile platform. The inertial measurement units are deployed using a consistent coordinate system, where N is a positive integer greater than or equal to 2. Each inertial measurement unit includes an accelerometer for acquiring the current acceleration of the mobile platform, a gyroscope for acquiring the current angular velocity of the mobile platform, and a magnetometer for acquiring the current magnetic flight angle of the mobile platform.
3. The closed-loop control method for a Mecanum wheel according to claim 2, characterized in that, The effective pulse interval is calculated based on the current heading angle, specifically including: The difference between the target heading angle and the current heading angle is used as the deviation to calculate the heading angle deviation value; Calculate the pulse interval adjustment coefficient based on the heading angle deviation value; The pulse interval adjustment coefficient is combined with the basic pulse interval to generate a dynamic pulse interval; The dynamic pulse interval is corrected using pre-stored calibration coefficients to obtain an effective pulse interval; The pulse interval of the stepper motor driver is updated based on the effective pulse interval.
4. The closed-loop control method for a Mecanum wheel according to claim 2, characterized in that, The inertial measurement unit connects the sensor's input and output interfaces to the processor's interface via a data relay circuit.
5. The closed-loop control method for a Mecanum wheel according to claim 1, characterized in that, The three-segment ramp algorithm specifically includes: In the initial stage of motion, the pulse interval is dynamically adjusted using the acceleration phase pulse interval formula, which is: in, This indicates the pulse interval of the current acceleration phase. The preset acceleration phase step length, This indicates the initial pulse interval time at the start of the acceleration phase. This indicates the number of steps that have been executed in the acceleration phase.
6. The closed-loop control method for a Mecanum wheel according to claim 5, characterized in that, The three-segment ramp algorithm also includes: Once the mobile platform enters a stable operating phase, it maintains a constant pulse interval and operates at the target speed.
7. The closed-loop control method for a Mecanum wheel according to claim 6, characterized in that, The three-segment ramp algorithm also includes: During the deceleration phase, the pulse interval is adjusted using a deceleration phase pulse interval formula, which is: in, This indicates the current pulse interval value. Indicates the basic pulse interval. This indicates the total number of steps in the deceleration phase. This indicates the number of steps that have been completed.
8. A closed-loop control device for a Mecanum wheel, characterized in that, The device includes: The data acquisition unit is used to acquire the current heading angle of the mobile platform in real time based on a pre-built array of inertial sensors. A pulse calculation unit is used to calculate the effective pulse interval based on the current heading angle; The speed adjustment unit is used to adjust the speed of the stepper motor based on the effective pulse interval and the preset three-segment ramp algorithm.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.