An Adaptive Following Control Method and System for a Luggage Based on Attitude Sensing
By combining multi-source data acquisition and model predictive control algorithms with terrain recognition, the smart suitcase can adaptively follow in complex terrain, solving the problems of response lag and poor terrain adaptability, and improving following stability and user experience.
Patent Information
- Application Number
- CN202610972578.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-11-17
AI Technical Summary
Existing smart suitcases exhibit lag in response, trajectory deviation, and posture oscillation when the user's posture and speed change, and have limited terrain adaptability, making it difficult to achieve adaptive control in complex terrain.
By acquiring multi-source attitude and motion state data, combined with extended Kalman filtering and model predictive control algorithms, the system can identify user motion patterns and predict trajectories in real time, adaptively adjust drive wheel speed and torque, and switch drive modes based on road surface and terrain recognition to achieve smooth following and dynamic correction.
It enables smooth adaptive following in dynamic scenarios such as sudden stops and rapid changes of direction, improving following stability and safety, and expanding the product's usage scenarios and user experience.
Smart Images

Figure CN123113308A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent following control technology, and in particular to an adaptive following control method and system for a suitcase based on attitude sensing. Background Technology
[0002] With the rapid development of smart travel equipment, smart suitcases with automatic following functions have gradually become a hot product in the consumer electronics field. Existing smart suitcases are usually equipped with UWB positioning modules, ultrasonic sensors or vision sensors to achieve the following function by detecting the positioning tag carried by the user or recognizing the user's image. Some products have tried to introduce attitude sensors into the suitcase control to assist in driving adjustment by collecting the attitude information of the suitcase.
[0003] Existing intelligent suitcase following control systems have the following drawbacks during use: 1. Difficulty in coping with real-time changes in user posture and speed: The control logic of existing systems is relatively simple, mostly using fixed-parameter PID control or simple distance feedback control, lacking the ability to dynamically perceive and predict the user's motion state; when the user turns quickly, stops suddenly, or changes speed while walking, the suitcase is prone to response lag, trajectory deviation, and posture oscillation problems, leading to following failure or even collision. 2. Limited terrain adaptability and limited functionality: There is a lack of effective adaptive control strategies in complex terrains such as ramps, slopes, speed bumps, and bumpy roads. Although some existing products have attempted to configure ramp assist or parking brake functions, they generally lack a dynamic adjustment mechanism based on real-time terrain perception. It is difficult to automatically adjust the driving force distribution and braking strategy according to changes in road slope, friction coefficient, etc., which greatly limits the actual use scenarios and user experience of the products. In summary, this application proposes an adaptive following control method and system for a suitcase based on attitude sensing. Summary of the Invention
[0004] Based on the technical problems existing in the background technology, the present invention proposes an adaptive following control method and system for a suitcase based on attitude sensing.
[0005] This invention proposes an adaptive following control method for a suitcase based on attitude sensing, comprising the following steps: S1: Multi-source attitude and motion state data acquisition: Collect attitude data of the suitcase body, pulling force data applied by the user to the handle, positioning data of the user relative to the suitcase body, and wheel speed data of the left and right drive wheels to construct a multi-source attitude and motion state perception dataset; S2: User motion state recognition and trajectory prediction: Based on the tension data and box posture change data, the user's current motion mode is identified, and combined with the user's historical motion trajectory, the user's position trajectory and speed change trend are predicted within a future preset time window. S3: Adaptive following control strategy generation: Based on the predicted user trajectory and speed change trend, the model predictive control algorithm is used to generate the desired speed command of the left and right drive wheels, so that the suitcase can smoothly follow the user's movement along the predicted trajectory; among them, when the user turns or changes speed, the differential ratio adjustment or drive torque adjustment is performed in advance. S4: Road surface terrain recognition and adaptive switching of driving mode: Based on the box attitude data, the pitch angle change rate and vibration spectrum characteristics are extracted to identify the current road surface terrain type and automatically switch the corresponding driving mode according to the terrain type; S5: Online monitoring and dynamic correction of following deviation: Real-time monitoring of the deviation between the actual position of the suitcase and the expected following trajectory. When the deviation exceeds the preset threshold, dynamic correction is performed by adjusting the speed difference between the left and right drive wheels and the drive torque, and the correction amount is fed back to the reference trajectory of the model predictive controller to achieve closed-loop dynamic optimization. S6: Multi-mode switching and abnormal status safety protection: Supports smooth switching between multiple working modes and monitors abnormal device status in real time, automatically triggering a safety protection mechanism when an abnormality is detected.
[0006] Preferably, in S1, the attitude data includes the three-axis acceleration, three-axis angular velocity, and attitude angle data of the box; the pulling force data includes the magnitude and direction of the pulling force applied by the user to the pull rod; the positioning data includes the distance and orientation information of the user relative to the box; and the wheel speed data includes the real-time rotational speed of the left drive wheel and the right drive wheel.
[0007] Preferably, the specific logical steps of S2 are as follows: S201: Calculation of tension direction angle and housing attitude angle: Based on the tension sensor data collected by S1, calculate the horizontal direction angle of the tension force applied by the user to the pull rod. The calculation formula is as follows: ; in , These represent the horizontal x-axis and y-axis components of the tension, respectively; simultaneously, based on the attitude angle data collected by the inertial measurement unit of the housing, the yaw angle of the housing is extracted. and its rate of change ; S202: Real-time recognition of user motion patterns: incorporating the rate of change of tension direction angle Yaw angular velocity of the housing The system comprehensively determines the user's movement pattern, which includes straight walking, constant speed walking, accelerating walking, decelerating walking, turning walking, and stationary state. When the rate of change of the direction angle of the tension Continuously exceeding the preset steering threshold And the yaw rate of the box When synchronous changes occur, the user is determined to be in a turning state, and the turning determination condition is as follows: ; The acceleration / deceleration state is determined based on the positive / negative relationship between the pulling force Fpull and the box acceleration abox: when the pulling force continuously increases and the box acceleration is positive, the user is determined to be in an acceleration state; when the pulling force continuously decreases and the box acceleration is negative, the user is determined to be in a deceleration state; otherwise, the user is determined to be in a constant speed or stationary state. S203: Extended Kalman Filter State Initialization: Based on the user's historical location sequence, the system state vector of the extended Kalman filter is defined as follows: ; in , For the user's two-dimensional location coordinates, , For velocity components, , For acceleration components; initialize the state covariance matrix. With process noise covariance matrix Q; S204: Extended Kalman Filter Prediction and Update: Performs the prediction and update phases of the EKF, with the following state prediction equation: ; in It is a nonlinear state transition function. To control the input; the covariance prediction equation is: ; Entering the update phase, based on the observation location provided by the user positioning module. Calculate the Kalman gain: ; Update state estimates and covariance matrix: ; ; S205: Predicted trajectory and velocity sequence output: Based on the state estimate updated by EKF, extrapolate the future preset time window. By default, it takes the user's location trajectory sequence within 1-2 seconds. The system takes the user's historical position sequence and current motion pattern as input and outputs the predicted position sequence and velocity sequence within a preset time window to S3.
[0008] Preferably, the specific logical steps of S3 are as follows: S301: Construction of the Prediction Time-Domain State Space Model: Based on the current motion state of the housing and the rotational speeds of the left and right drive wheels, a motion state space model of the housing within the MPC prediction time domain is established, defining the prediction time domain length as... The control time domain length is Within each prediction step, the state prediction equation for the box is as follows: ; in For the first The predicted box state vector; For the first The control input vector of the step, Here is the state transition matrix. To control the input matrix, the state sequence in the prediction time domain is obtained by iterating the prediction equation. ; S302: Construction of Reference Trajectory and Expected State Sequence: Using the user's future trajectory sequence predicted in S2 as the reference trajectory, the box is set to maintain a preset following distance from the user at the desired following position. Generate the expected state sequence of the box in the prediction time domain. Simultaneously, based on the user speed change trend predicted by S2, the expected speed sequence is calculated. , as a speed tracking target; S303: Construction and Optimization of MPC Cost Function: Based on the predicted state sequence and the desired state sequence, a cost function is constructed that includes trajectory tracking error and the rate of change of control quantity, as defined below: ; in The output is the predicted box state. For reference trajectory status, To control the rate of change of quantity; and The weight matrix is used; simultaneously, control magnitude constraints and rate of change constraints are added to ensure that the drive command does not exceed the physical limits of the motor; the optimal control sequence is solved by minimizing the cost function through a quadratic programming solver. ; S304: Feedforward Compensation for Predictive Steering and Gear Shifting: Feedforward compensation logic is embedded in the MPC optimization framework. When S2 predicts that the user is about to turn, a steering compensation term is added to the cost function. The differential ratio of the left and right wheels is pre-adjusted, and the steering differential ratio compensation calculation is as follows: ; in This is the differential compensation amount for the left and right wheels. To compensate for the gain during steering, The cost function is used to predict the user's steering angular velocity; when it is predicted that the user will accelerate or decelerate, an acceleration compensation term is added to the cost function. The drive torque is pre-adjusted, and its drive torque compensation calculation is as follows: ; in This is the amount of driving torque compensation. To compensate for acceleration gain, For the predicted user acceleration; the above compensation amount is incorporated into the reference trajectory in the form of the desired state offset during the MPC optimization solution process, realizing differential pre-adjustment before steering and torque pre-adjustment before gear change, ensuring smooth transition of wheel speed change, and avoiding box oscillation or instability caused by sudden turns and stops. S305: Rolling time-domain control execution: Take the first control variable from the optimal control sequence obtained from the optimization solution. The output is sent to the hub drive module for execution; at the next sampling moment, the current actual box state is used as the initial state, and S301 to S304 are repeated to complete the rolling time domain optimization control, so as to realize the real-time adaptive and smooth following of the trolley case to the user along the predicted trajectory.
[0009] Preferably, the specific logical steps of S4 are as follows: S401: Calculation of the rate of change of the box's pitch angle: Based on the box's attitude angle data collected by S1, the box's pitch angle is extracted. And calculate its rate of change over time. This is used to determine the direction and trend of road slope, and its calculation formula is as follows: ; when A value >0 indicates that the front of the box is raised, corresponding to an uphill road surface; when... <0 indicates that the front of the box body has sunk, corresponding to a downhill road surface; when A value approximately equal to 0 indicates that the road surface is basically flat. S402: Vibration Acceleration Spectrum Feature Extraction: Based on the triaxial acceleration data of the box body collected by S1, extract the vertical acceleration signal. The time-domain acceleration signal is converted to the frequency domain using a fast Fourier transform, and the energy proportion of the high-frequency components is calculated. The calculation formula is as follows: ; in The amplitude of the vertical acceleration spectrum. To analyze the upper limit of frequency, the default value is set to... =100Hz, The higher the proportion of high-frequency components, the more bumpy the road surface, reflecting the smoothness and bumpiness of the road surface. S403: Road Topography Classification Identification: Based on Pitch Angle Change Rate The proportion of high-frequency vibration energy The current road surface terrain type is determined using a hierarchical identification logic: when If the increase continues, it is determined to be an uphill road surface; when Furthermore, if the slope continues to decrease, it is determined to be a downhill road surface; and When the road surface exhibits periodic and rapid fluctuations, it is identified as a bumpy road surface. when And vertical acceleration When a single large pulse occurs, it is determined to be a speed bump road surface; and At that time, it was determined to be a smooth road surface; Its classification rules can be uniformly expressed as: ; S404: Adaptive Drive Mode Switching: Automatically switches to the corresponding drive mode and adjusts control parameters based on the road surface type identified by S403. Uphill road surface: Increase driving torque to compensate for gravity component, activate hill start assist to prevent rollback, and adaptively adjust torque increment according to slope. ,in This is the uphill torque compensation coefficient; Downhill road surface: Activate energy recovery braking function, provide braking torque through motor reverse drag, and apply speed limit. To prevent speeding downhill; Speed bumps and bumpy roads: Reduce driving speed to It also enables active suspension adjustment, adjusting the suspension damping coefficient. The damping adjustment rule for absorbing road impact is as follows: The more severe the bumps, the greater the damping. Smooth road surface: Restore the normal driving mode, use the normal speed command generated by S3, and turn off special functions such as hill start assist, energy recovery braking and active suspension adjustment; S405: Terrain Recognition Results and Drive Mode Status Output: Outputs the current road surface terrain type. The driving mode state and adjustment parameters are encapsulated in a structured manner and synchronously output to the S3 adaptive follow control strategy module. This allows the MPC controller to introduce terrain adaptive weights into the cost function and constraints. At the same time, the terrain recognition results and mode switching records are written to the system log, providing terrain perception information support for subsequent S5 follow deviation correction and S6 safety protection, thus realizing the collaborative optimization of the entire perception-decision-execution chain.
[0010] Preferably, the specific logical steps of S5 are as follows: S501: Lateral and Longitudinal Deviation Calculation: Based on the desired following trajectory generated by S3 and the actual positioning data of the suitcase, calculate the lateral deviation between the current position and the desired position of the suitcase. Longitudinal deviation The calculation formula is as follows: ; ; in This refers to the actual location of the container. For the desired position, This is the actual yaw angle of the enclosure. The desired yaw angle; This is the lateral deviation. This is the longitudinal deviation; S502: Cascaded Outer Loop Position Deviation Control: An outer loop position deviation controller employing a cascaded control structure to control lateral deviation. and longitudinal deviation Using the input as the input, calculate the lateral velocity correction. and longitudinal velocity correction The calculation formula is as follows: ; ; in , These are the proportional gain coefficients for the lateral and longitudinal position deviation controllers, respectively. The unit of the speed correction is m / s. When the deviation is zero, the correction is zero, and the box moves at the original desired speed. S503: Cascaded Inner Loop Speed Control and Wheel Speed Command Generation: Superimposes the speed correction amount onto the original desired speed generated by S3. The corrected expected speed is obtained above. Then, the inner loop speed controller outputs the left and right drive wheel speed commands. and The calculation method is as follows: longitudinal distance correction is achieved through dual-wheel unidirectional speed regulation, and lateral correction is achieved through differential speed between the left and right wheels, while simultaneously satisfying the average speed of the left and right wheels and... Consistent requirements; the core speed regulation and differential speed command calculation formulas involved in this step are as follows: ; ; ; ; in For the corrected expected speed, The original desired speed output by S3. This is the longitudinal velocity correction amount; The radius of the drive wheel, The wheel speed corresponding to the base speed; The track width is the distance between the left and right drive wheels. This is the lateral velocity correction amount; , These are the desired speed commands for the left and right drive wheels, respectively; when there is a lateral deviation hour, The box body turns to the right to correct its deviation; when hour, The box body turns to the left; S504: Deviation correction amount is fed back to the MPC reference trajectory: the lateral deviation at the current moment is... Longitudinal deviation and the corresponding speed correction amount , Structured encapsulation is performed to form a deviation feedback vector. The data is synchronously transmitted back to the MPC controller in S3; when the MPC controller generates the reference trajectory in the next control cycle, it uses... As a correction input to the reference trajectory, the desired state sequence Online correction is performed: When historical correction data shows a persistent same-direction deviation in the system, the MPC reference trajectory will shift accordingly to eliminate steady-state error, causing subsequent following trajectories to actively adjust in the direction of eliminating the deviation. This achieves a three-level cascaded closed-loop dynamic optimization of "outer loop correction + inner loop tracking + MPC trajectory feedforward correction". ; in For feedback correction gain matrix, For the original reference trajectory, This is the new reference trajectory after correction; S505: Deviation Correction Execution and Status Update: Calculate the desired speed commands for the left and right drive wheels. The output is sent to the wheel hub drive module for execution. The drive housing adjusts its motion state according to the corrected wheel speed command, gradually eliminating lateral and longitudinal deviations. At the same time, the actual correction result at the current moment is recorded to the system log, completing the deviation monitoring and dynamic correction closed loop of this control cycle, and repeating S501 to S504 at the next sampling moment.
[0011] Preferably, the specific logical steps of S6 are as follows: S601: Operating Mode Recognition and Switching Determination: The system detects user-issued mode switching commands via physical buttons, touch, or voice in real time and identifies the target operating mode; simultaneously, it monitors the current movement status of the enclosure to determine whether the switching conditions are met. The switching determination rules are as follows: Manual Follow Mode → Automatic Follow Mode: Switching is only allowed when the box is stationary or moving at a constant speed in a straight line and the user is within the effective follow range; Automatic Follow Mode → Assist Mode: Only when the box is stationary or the speed is below the safety threshold. Switching is allowed at any time; Other switching: Allows switching in any direction, but automatically performs a safe deceleration to the initial speed of the target mode after switching; S602: Multi-mode switching execution: When the switching conditions are met, the system performs a working mode switch and synchronously adjusts the control parameters. Manual Follow Mode: With automatic follow and assist functions off, the motor is in free gliding or power-off braking state. The user manually pushes or pulls the box to move, and the box does not follow actively. Automatic Follow Mode: Activates all follow control logics from S2 to S5, and the box automatically follows the user's movement, achieving autonomous following and walking; Assisted mode: Turn off lateral follow control and only retain longitudinal assist drive. The box moves forward at a fixed low speed or a user-set speed. The user controls the direction of travel by pulling the lever. It is suitable for use in scenarios where automatic follow is not suitable. S603: Real-time monitoring of abnormal equipment status: The system monitors abnormal equipment status at fixed intervals. Collect battery power Motor temperature and box tilt angle And compare them with preset safety thresholds respectively: Low battery This indicates that the battery life is insufficient to support normal following. Motor overheating: This indicates that the motor is at risk of overheating and damage. Box tilt exceeds limit: This indicates that the container may tip over. S604: Triggering of Level 3 Security Protection Mechanism: When S603 detects any abnormal state, it automatically triggers the corresponding security protection action based on the type and severity of the abnormality. The protection decision and execution logic is as follows: Level 1 protection deceleration stop: Triggered when motor overheating or battery power falls below a safety threshold, the system decelerates at a preset speed. Perform smooth deceleration to a complete stop to avoid the box tipping over or user discomfort caused by sudden stops; Level 2 protection audible and visual alarm: When any abnormal state is triggered, the audible and visual alarm will be activated simultaneously. The built-in buzzer will emit a continuous and rapid buzzing sound, and the LED indicator will flash to remind the user to pay attention to the equipment status. Three-level protection braking and locking: When the tilt angle of the box exceeds the safety limit or after deceleration and stopping, the system activates the electromagnetic brake to lock the drive wheel to prevent the box from sliding freely in dangerous situations on slopes. S605: Abnormal Recovery and Mode Reset: After the abnormal state is eliminated, the user can release the brake lock and alarm state by pressing and holding the reset button. The system will automatically switch back to the working mode before the abnormality occurred and resume normal operation. If the abnormal state continues for more than the preset time without being handled, the system will automatically send fault information to the user terminal and maintain the brake lock state until manual intervention confirms safety before resetting, ensuring that the use process is safe and controllable.
[0012] This invention also proposes an adaptive following control system for a suitcase based on attitude sensing, including an attitude sensing module, a user motion sensing module, a positioning and following module, a master control decision module, a wheel hub drive module, and a terrain sensing module; The attitude sensing module is used to collect the three-axis acceleration, three-axis angular velocity and attitude angle data of the box in real time; The user motion sensing module is used to collect the magnitude and direction of the pulling force applied by the user to the lever; The positioning and following module is used to obtain the user's distance and orientation information relative to the box; The terrain perception module is used to identify road surface terrain types based on box attitude data and drive feedback data; The main control decision module is used to perform user motion state recognition, trajectory prediction, adaptive following control strategy generation, terrain adaptive drive mode switching, and dynamic correction of following deviation. The main control decision module has a built-in model prediction controller, which takes the user trajectory prediction result and the current box state as input and the expected speed of the left and right drive wheels as output to realize the rolling time domain optimization of following control. At the same time, it has a built-in cascaded deviation corrector to correct the lateral and longitudinal deviations in the following process in real time. The hub drive module is used to independently control the speed and torque of the left and right drive wheels according to the drive commands output by the main control decision module.
[0013] Compared with existing technologies, the beneficial effects of this invention are: 1. This invention constructs a comprehensive motion perception system by integrating box posture data, lever tension data, and user positioning data. It adopts a method that combines the rate of change of tension direction angle with the box yaw rate to identify user turning, acceleration, deceleration, and other motion patterns in real time. Combined with extended Kalman filtering, it predicts the user's future motion trajectory and speed change trend, achieving forward-looking prediction of user dynamic behavior. At the same time, it uses a model predictive control algorithm to pre-adjust the differential ratio of the left and right wheels and the drive torque when the user turns or changes speed, achieving a smooth transition of wheel speed commands. Compared to traditional fixed parameter control, it can achieve smooth adaptive following in dynamic scenarios such as sudden stops and rapid changes of direction, effectively avoiding response lag, trajectory deviation and attitude oscillation, and significantly improving following stability and safety; 2. This invention uses a hierarchical identification method based on the pitch angle change rate and vibration acceleration spectrum characteristics of the box to automatically identify five types of terrain: flat, uphill, downhill, speed bump, and bumpy. Based on the identification results, it adaptively switches the drive mode: when going uphill, it increases the torque and activates the ramp assist to prevent slippage; when going downhill, it activates energy recovery braking and speed limiting; and when encountering bumpy or speed bump surfaces, it actively reduces the speed and activates the suspension adjustment, thus achieving dynamic adjustment based on real-time terrain perception. Meanwhile, it supports smooth switching between three modes: manual following, automatic following, and assist. In abnormal conditions such as low battery voltage, motor overheating, and box tilt, it automatically triggers three levels of protection: deceleration and stop, audible and visual alarms, and brake locking. It achieves adaptive driving and all-scenario safety protection for the suitcase under various terrain conditions, fundamentally solving the problems of poor terrain adaptability and limited functionality of traditional solutions, and significantly expanding the actual use scenarios and user experience of the product.
[0014] This invention constructs a comprehensive motion perception system by integrating data on the suitcase's posture, lever pulling force, and user positioning. It combines the rate of change of the pulling force direction angle with the yaw rate to determine and identify the user's steering and acceleration / deceleration modes in real time. It also uses an extended Kalman filter to predict the user's motion trajectory and, in conjunction with a model predictive control algorithm, pre-adjusts the differential ratio and drive torque before steering or changing speed to achieve smooth wheel speed transitions and effectively avoid response lag and attitude oscillations. Simultaneously, based on the pitch angle change rate and vibration spectrum characteristics, it classifies and identifies five types of terrain: flat, uphill, downhill, speed bumps, and bumpy. It adaptively switches drive modes and, in conjunction with a three-level safety protection mechanism, achieves adaptive following and all-scenario safety protection for the suitcase under various terrain conditions, significantly improving following stability, terrain adaptability, and user experience. Attached Figure Description
[0015] Figure 1This is a flowchart of an adaptive following control method for a suitcase based on attitude sensing proposed in this invention; Figure 2 This is a block diagram of an adaptive following control system for a suitcase based on attitude sensing proposed in this invention. Detailed Implementation
[0016] The present invention will be further explained below with reference to specific embodiments. Example
[0017] Reference Figure 1 This embodiment proposes an adaptive following control method for a suitcase based on attitude sensing, including the following steps: S1: Multi-source attitude and motion state data acquisition: Collect attitude data of the suitcase body, pulling force data applied by the user to the handle, positioning data of the user relative to the suitcase body, and wheel speed data of the left and right drive wheels to construct a multi-source attitude and motion state perception dataset; S2: User motion state recognition and trajectory prediction: Based on the tension data and box posture change data, the user's current motion mode is identified, and combined with the user's historical motion trajectory, the user's position trajectory and speed change trend are predicted within a future preset time window. S3: Adaptive following control strategy generation: Based on the predicted user trajectory and speed change trend, the model predictive control algorithm is used to generate the desired speed command of the left and right drive wheels, so that the suitcase can smoothly follow the user's movement along the predicted trajectory; among them, when the user turns or changes speed, the differential ratio adjustment or drive torque adjustment is performed in advance. S4: Road surface terrain recognition and adaptive switching of driving mode: Based on the box attitude data, the pitch angle change rate and vibration spectrum characteristics are extracted to identify the current road surface terrain type and automatically switch the corresponding driving mode according to the terrain type; S5: Online monitoring and dynamic correction of following deviation: Real-time monitoring of the deviation between the actual position of the suitcase and the expected following trajectory. When the deviation exceeds the preset threshold, dynamic correction is performed by adjusting the speed difference between the left and right drive wheels and the drive torque, and the correction amount is fed back to the reference trajectory of the model predictive controller to achieve closed-loop dynamic optimization. S6: Multi-mode switching and abnormal status safety protection: Supports smooth switching between multiple working modes and monitors abnormal device status in real time, automatically triggering a safety protection mechanism when an abnormality is detected.
[0018] In this implementation scheme S1, the attitude data includes the three-axis acceleration, three-axis angular velocity and attitude angle data of the box; the pulling force data includes the magnitude and direction of the pulling force applied by the user to the pull rod; the positioning data includes the distance and orientation information of the user relative to the box; and the wheel speed data includes the real-time rotational speed of the left drive wheel and the right drive wheel.
[0019] In this implementation scheme, the specific logical steps of S2 are as follows: S201: Calculation of tension direction angle and housing attitude angle: Based on the tension sensor data collected by S1, calculate the horizontal direction angle of the tension force applied by the user to the pull rod. The calculation formula is as follows: ; in , These represent the horizontal x-axis and y-axis components of the tension, respectively; simultaneously, based on the attitude angle data collected by the inertial measurement unit of the housing, the yaw angle of the housing is extracted. and its rate of change Used to determine the user's redirection intention; S202: Real-time recognition of user motion patterns: incorporating the rate of change of tension direction angle Yaw angular velocity of the housing The system comprehensively determines the user's movement pattern, which includes straight walking, constant speed walking, accelerating walking, decelerating walking, turning walking, and stationary state. When the rate of change of the direction angle of the tension Continuously exceeding the preset steering threshold And the yaw rate of the box When synchronous changes occur, the user is determined to be in a turning state, and the turning determination condition is as follows: ; The acceleration / deceleration state is determined based on the positive / negative relationship between the pulling force Fpull and the box acceleration abox: when the pulling force continuously increases and the box acceleration is positive, the user is determined to be in an acceleration state; when the pulling force continuously decreases and the box acceleration is negative, the user is determined to be in a deceleration state; otherwise, the user is determined to be in a constant speed or stationary state. S203: Extended Kalman Filter State Initialization: Based on the user's historical location sequence, the system state vector of the extended Kalman filter is defined as follows: ; in , For the user's two-dimensional location coordinates, , For velocity components, , For acceleration components; initialize the state covariance matrix. The process noise covariance matrix Q is used as the input for the prediction stage; S204: Extended Kalman Filter Prediction and Update: Performs the prediction and update phases of the EKF, with the following state prediction equation: ; in It is a nonlinear state transition function. To control the input; the covariance prediction equation is: ; Entering the update phase, based on the observation location provided by the user positioning module. Calculate the Kalman gain: ; Update state estimates and covariance matrix: ; ; S205: Predicted trajectory and velocity sequence output: Based on the state estimate updated by EKF, extrapolate the future preset time window. By default, it takes the user's location trajectory sequence within 1-2 seconds. The system takes the user's historical position sequence and current motion pattern as input and outputs the predicted position sequence and velocity sequence within a preset time window to S3.
[0020] In this implementation scheme, the specific logical steps of S3 are as follows: S301: Construction of the Prediction Time-Domain State Space Model: Based on the current motion state of the housing and the rotational speeds of the left and right drive wheels, a motion state space model of the housing within the MPC prediction time domain is established, defining the prediction time domain length as... The control time domain length is Within each prediction step, the state prediction equation for the box is as follows: ; in For the first The predicted box state vector includes position, yaw angle, velocity, and yaw rate; For the first The control input vector for the step includes the desired rotational speeds of the left and right drive wheels; Here is the state transition matrix. To control the input matrix, the state sequence in the prediction time domain is obtained by iterating the prediction equation. ; S302: Construction of Reference Trajectory and Expected State Sequence: Using the user's future trajectory sequence predicted in S2 as the reference trajectory, the box is set to maintain a preset following distance from the user at the desired following position. Generate the expected state sequence of the box in the prediction time domain. Simultaneously, based on the user speed change trend predicted by S2, the expected speed sequence is calculated. , as a speed tracking target; S303: Construction and Optimization of MPC Cost Function: Based on the predicted state sequence and the desired state sequence, a cost function is constructed that includes trajectory tracking error and the rate of change of control quantity, as defined below: ; in The output is the predicted box state. For reference trajectory status, To control the rate of change of the quantity, specifically the rate of change of the rotational speed of the left and right drive wheels; and The weight matrix is used; simultaneously, control magnitude constraints and rate of change constraints are added to ensure that the drive command does not exceed the physical limits of the motor; the optimal control sequence is solved by minimizing the cost function through a quadratic programming solver. ; S304: Feedforward Compensation for Predictive Steering and Gear Shifting: Feedforward compensation logic is embedded in the MPC optimization framework. When S2 predicts that the user is about to turn, a steering compensation term is added to the cost function. The differential ratio of the left and right wheels is pre-adjusted, and the steering differential ratio compensation calculation is as follows: ; in This is the differential compensation amount for the left and right wheels. To compensate for the gain during steering, The cost function is used to predict the user's steering angular velocity; when it is predicted that the user will accelerate or decelerate, an acceleration compensation term is added to the cost function. The drive torque is pre-adjusted, and its drive torque compensation calculation is as follows: ; in This is the amount of driving torque compensation. To compensate for acceleration gain, For the predicted user acceleration; the above compensation amount is incorporated into the reference trajectory in the form of the desired state offset during the MPC optimization solution process, realizing differential pre-adjustment before steering and torque pre-adjustment before gear change, ensuring smooth transition of wheel speed change, and avoiding box oscillation or instability caused by sudden turns and stops. S305: Rolling time-domain control execution: Take the first control variable from the optimal control sequence obtained from the optimization solution. This means that the desired rotational speed command of the left and right drive wheels at the current moment is output to the wheel hub drive module for execution. At the next sampling moment, the current actual box state is used as the initial state, and S301 to S304 are repeated to complete the rolling time domain optimization control, so as to realize the real-time adaptive and smooth following of the trolley case to the user along the predicted trajectory.
[0021] In this implementation scheme, the specific logical steps of S4 are as follows: S401: Calculation of the rate of change of the box's pitch angle: Based on the box's attitude angle data collected by S1, the box's pitch angle is extracted. And calculate its rate of change over time. This is used to determine the direction and trend of road slope, and its calculation formula is as follows: ; when A value >0 indicates that the front of the box is raised, corresponding to an uphill road surface; when... <0 indicates that the front of the box body has sunk, corresponding to a downhill road surface; when A value approximately equal to 0 indicates that the road surface is basically flat. S402: Vibration Acceleration Spectrum Feature Extraction: Based on the triaxial acceleration data of the box body collected by S1, extract the vertical acceleration signal. The time-domain acceleration signal is converted to the frequency domain using a fast Fourier transform, and the energy proportion of the high-frequency components is calculated. The calculation formula is as follows: ; in The amplitude of the vertical acceleration spectrum. To analyze the upper limit of frequency, the default value is set to... =100Hz, The higher the proportion of high-frequency components, the more bumpy the road surface, reflecting the smoothness and bumpiness of the road surface. S403: Road Topography Classification Identification: Based on Pitch Angle Change Rate The proportion of high-frequency vibration energy The current road surface terrain type is determined using a hierarchical identification logic: when Furthermore, if the slope continues to increase, it is determined to be an uphill road surface, and the default value is taken. ; when Furthermore, if the slope continues to decrease, it is determined to be a downhill road surface, and the default value is taken. ; and When the road surface exhibits periodic and rapid fluctuations, it is identified as a bumpy road surface, and the default value is [not specified]. ; when And vertical acceleration When a single large pulse occurs, it is determined to be a speed bump road surface; and At that time, it was determined to be a smooth road surface; Its classification rules can be uniformly expressed as: ; S404: Adaptive Drive Mode Switching: Automatically switches to the corresponding drive mode and adjusts control parameters based on the road surface type identified by S403. Uphill road surface: Increase driving torque to compensate for gravity component, activate hill start assist to prevent rollback, and adaptively adjust torque increment according to slope. ,in This is the uphill torque compensation coefficient; Downhill road surface: Activate energy recovery braking function, provide braking torque through motor reverse drag, and apply speed limit. To prevent speeding downhill; Speed bumps and bumpy roads: Reduce driving speed to Default value It also enables active suspension adjustment, adjusting the suspension damping coefficient. The damping adjustment rule for absorbing road impact is as follows: The more severe the bumps, the greater the damping. Smooth road surface: Restore the normal driving mode, use the normal speed command generated by S3, and turn off special functions such as hill start assist, energy recovery braking and active suspension adjustment; S405: Terrain Recognition Results and Drive Mode Status Output: Outputs the current road surface terrain type. The driving mode status and adjustment parameters are encapsulated in a structured manner, including torque compensation, speed limit, and damping coefficient. The output is synchronously sent to the S3 adaptive following control strategy module, which allows the MPC controller to introduce terrain adaptive weights into the cost function and constraints. This includes increasing the acceleration tracking weight when going uphill and using the speed limit as a hard constraint when going downhill. At the same time, the terrain recognition results and mode switching records are written to the system log, providing terrain perception information support for subsequent S5 following deviation correction and S6 safety protection, thus achieving collaborative optimization of the entire perception-decision-execution chain.
[0022] In this implementation scheme, the specific logical steps of S5 are as follows: S501: Lateral and Longitudinal Deviation Calculation: Based on the desired following trajectory generated by S3 and the actual positioning data of the suitcase, calculate the lateral deviation between the current position and the desired position of the suitcase. Longitudinal deviation The calculation formula is as follows: ; ; in This refers to the actual location of the container. For the desired position, This is the actual yaw angle of the enclosure. The desired yaw angle; This is the lateral deviation. This is the longitudinal deviation; S502: Cascaded Outer Loop Position Deviation Control: An outer loop position deviation controller employing a cascaded control structure to control lateral deviation. and longitudinal deviation Using the input as the input, calculate the lateral velocity correction. and longitudinal velocity correction The calculation formula is as follows: ; ; in , These are the proportional gain coefficients for the lateral and longitudinal position deviation controllers, respectively. The unit of the speed correction is m / s. When the deviation is zero, the correction is zero, and the box moves at the original desired speed. S503: Cascaded Inner Loop Speed Control and Wheel Speed Command Generation: Superimposes the speed correction amount onto the original desired speed generated by S3. The corrected expected speed is obtained above. Then, the inner loop speed controller outputs the left and right drive wheel speed commands. and The calculation method is as follows: longitudinal distance correction is achieved through dual-wheel unidirectional speed regulation, and lateral correction is achieved through differential speed between the left and right wheels, while simultaneously satisfying the average speed of the left and right wheels and... Consistent requirements; the core speed regulation and differential speed command calculation formulas involved in this step are as follows: ; ; ; ; in For the corrected expected speed, The original desired speed output by S3. This is the longitudinal velocity correction amount; The radius of the drive wheel, The wheel speed corresponding to the base speed; The track width is the distance between the left and right drive wheels. This is the lateral velocity correction amount; , These are the desired speed commands for the left and right drive wheels, respectively; when there is a lateral deviation hour, The box body turns to the right to correct its deviation; when hour, The box body turns to the left; S504: Deviation correction amount is fed back to the MPC reference trajectory: the lateral deviation at the current moment is... Longitudinal deviation and the corresponding speed correction amount , Structured encapsulation is performed to form a deviation feedback vector. The data is synchronously transmitted back to the MPC controller in S3; when the MPC controller generates the reference trajectory in the next control cycle, it uses... As a correction input to the reference trajectory, the desired state sequence Online correction is performed: When historical correction data shows a persistent same-direction deviation in the system, the MPC reference trajectory will shift accordingly to eliminate steady-state error, causing subsequent following trajectories to actively adjust in the direction of eliminating the deviation. This achieves a three-level cascaded closed-loop dynamic optimization of "outer loop correction + inner loop tracking + MPC trajectory feedforward correction". ; in For feedback correction gain matrix, For the original reference trajectory, This is the new reference trajectory after correction; S505: Deviation Correction Execution and Status Update: Calculate the desired speed commands for the left and right drive wheels. The output is sent to the wheel hub drive module for execution. The drive housing adjusts its motion state according to the corrected wheel speed command, gradually eliminating lateral and longitudinal deviations. At the same time, the actual correction result at the current moment is recorded to the system log, completing the deviation monitoring and dynamic correction closed loop of this control cycle. S501 to S504 are repeated at the next sampling moment. The correction result includes the deviation value before and after correction, the actual execution speed, and the deviation elimination rate.
[0023] In this implementation scheme, the specific logical steps of S6 are as follows: S601: Operating Mode Recognition and Switching Determination: The system detects user-issued mode switching commands via physical buttons, touch, or voice in real time and identifies the target operating mode; simultaneously, it monitors the current movement status of the enclosure to determine whether the switching conditions are met. The switching determination rules are as follows: Manual Follow Mode → Automatic Follow Mode: Switching is only allowed when the box is stationary or moving at a constant speed in a straight line and the user is within the effective follow range; Automatic Follow Mode → Assist Mode: Only when the box is stationary or the speed is below the safety threshold. Switching is allowed at any time; the default value is [not specified]. =0.3m / s; Other switching: Allows switching in any direction, but automatically performs a safe deceleration to the initial speed of the target mode after switching; S602: Multi-mode switching execution: When the switching conditions are met, the system performs a working mode switch and synchronously adjusts the control parameters. Manual Follow Mode: With automatic follow and assist functions off, the motor is in free gliding or power-off braking state. The user manually pushes or pulls the box to move, and the box does not follow actively. Automatic Follow Mode: Activates all follow control logics from S2 to S5, and the box automatically follows the user's movement, achieving autonomous following and walking; Assisted mode: Turn off lateral follow control and only retain longitudinal assist drive. The box moves forward at a fixed low speed or a user-set speed. The user controls the direction of travel by pulling the lever. It is suitable for use in scenarios where automatic follow is not suitable. S603: Real-time monitoring of abnormal equipment status: The system monitors abnormal equipment status at fixed intervals. Collect battery power Motor temperature and box tilt angle And compare them with preset safety thresholds respectively: Low battery Default value =10%, indicating that the battery life is insufficient to support normal following; Motor overheating: Default value =75°C indicates that the motor is at risk of overheating and damage. Box tilt exceeds limit: Default value =35∘ indicates that the container may tip over; S604: Triggering of Level 3 Security Protection Mechanism: When S603 detects any abnormal state, it automatically triggers the corresponding security protection action based on the type and severity of the abnormality. The protection decision and execution logic is as follows: Level 1 protection deceleration stop: Triggered when motor overheating or battery power falls below a safety threshold, the system decelerates at a preset speed. Perform smooth deceleration to a complete stop to avoid sudden stopping that could cause the container to tip over or cause user discomfort. (Default setting) =0.5m / s²; Level 2 protection audible and visual alarm: When any abnormal state is triggered, the audible and visual alarm will be activated simultaneously. The built-in buzzer will emit a continuous and rapid buzzing sound, and the LED indicator will flash to remind the user to pay attention to the equipment status. Three-level protection braking and locking: When the tilt angle of the box exceeds the safety limit or after deceleration and stopping, the system activates the electromagnetic brake to lock the drive wheel to prevent the box from sliding freely in dangerous situations on slopes. S605: Abnormal Recovery and Mode Reset: After the abnormal state is eliminated, the user can release the brake lock and alarm state by pressing and holding the reset button. The system will automatically switch back to the working mode before the abnormality occurred and resume normal operation. If the abnormal state continues for more than the preset time without being handled, the system will automatically send fault information to the user terminal and maintain the brake lock state until manual intervention confirms safety before resetting, ensuring that the use process is safe and controllable.
[0024] Reference Figure 2 This embodiment also proposes an adaptive following control system for a suitcase based on attitude sensing, including an attitude sensing module, a user motion sensing module, a positioning and following module, a master control decision module, a wheel hub drive module, and a terrain sensing module; The attitude perception module is used to collect the three-axis acceleration, three-axis angular velocity and attitude angle data of the box in real time; the user motion perception module is used to collect the magnitude and direction of the pulling force applied by the user to the lever; the positioning and following module is used to obtain the distance and orientation information of the user relative to the box; the terrain perception module is used to identify the road terrain type based on the box attitude data and drive feedback data. The main control decision module is used to perform user motion state recognition, trajectory prediction, adaptive following control strategy generation, terrain adaptive drive mode switching, and dynamic correction of following deviation. The main control decision module has a built-in model prediction controller, which takes the user trajectory prediction result and the current box state as input and the expected speed of the left and right drive wheels as output to realize the rolling time domain optimization of following control. At the same time, it has a built-in cascaded deviation corrector to correct the lateral and longitudinal deviations in the following process in real time. The hub drive module is used to independently control the speed and torque of the left and right drive wheels according to the drive commands output by the main control decision module.
[0025] This embodiment constructs a comprehensive motion perception system by integrating data on the suitcase's posture, the pull rod's pulling force, and the user's positioning. It combines the rate of change of the pulling force's direction angle with the yaw rate to determine the user's steering and acceleration / deceleration modes in real time. It also uses an extended Kalman filter to predict the user's trajectory and, in conjunction with a model predictive control algorithm, pre-adjusts the differential ratio and drive torque before steering or changing speed to achieve smooth wheel speed transitions and effectively avoid response lag and attitude oscillations. Simultaneously, based on the pitch angle change rate and vibration spectrum characteristics, it classifies and identifies five types of terrain: flat, uphill, downhill, speed bumps, and bumpy terrain. It adaptively switches drive modes and, in conjunction with a three-level safety protection mechanism, achieves adaptive following and all-scenario safety protection for the suitcase under various terrain conditions, significantly improving following stability, terrain adaptability, and user experience.
[0026] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for adaptive following control of a suitcase based on attitude sensing, characterized in that, Includes the following steps: S1: Multi-source attitude and motion state data acquisition: Collect attitude data of the suitcase body, pulling force data applied by the user to the handle, positioning data of the user relative to the suitcase body, and wheel speed data of the left and right drive wheels to construct a multi-source attitude and motion state perception dataset; S2: User motion state recognition and trajectory prediction: Based on the tension data and box posture change data, the user's current motion mode is identified, and combined with the user's historical motion trajectory, the user's position trajectory and speed change trend are predicted within a future preset time window. S3: Adaptive Follow Control Strategy Generation: Based on the predicted user trajectory and speed change trend, the model predictive control algorithm is used to generate the desired speed commands for the left and right drive wheels, so that the suitcase can smoothly follow the user's movement along the predicted trajectory; among them, when the user turns or changes speed, differential ratio adjustment or drive torque adjustment is performed in advance. S4: Road surface terrain recognition and adaptive switching of driving mode: Based on the box attitude data, the pitch angle change rate and vibration spectrum characteristics are extracted to identify the current road surface terrain type and automatically switch the corresponding driving mode according to the terrain type; S5: Online monitoring and dynamic correction of following deviation: Real-time monitoring of the deviation between the actual position of the suitcase and the expected following trajectory. When the deviation exceeds the preset threshold, dynamic correction is performed by adjusting the speed difference between the left and right drive wheels and the drive torque, and the correction amount is fed back to the reference trajectory of the model predictive controller to achieve closed-loop dynamic optimization. S6: Multi-mode switching and abnormal status safety protection: Supports smooth switching between multiple working modes and monitors abnormal device status in real time, automatically triggering a safety protection mechanism when an abnormality is detected.
2. The adaptive following control method for a suitcase based on attitude sensing according to claim 1, characterized in that, In S1, the attitude data includes the three-axis acceleration, three-axis angular velocity, and attitude angle data of the box; the pulling force data includes the magnitude and direction of the pulling force applied by the user to the pull rod; the positioning data includes the distance and orientation information of the user relative to the box; and the wheel speed data includes the real-time rotational speed of the left and right drive wheels.
3. The adaptive following control method for a suitcase based on attitude sensing according to claim 1, characterized in that, The specific logical steps of S2 are as follows: S201: Calculation of tension direction angle and housing attitude angle: Based on the tension sensor data collected by S1, calculate the horizontal direction angle of the tension force applied by the user to the pull rod. The calculation formula is as follows: ; in , These represent the horizontal x-axis and y-axis components of the tension, respectively; simultaneously, based on the attitude angle data collected by the inertial measurement unit of the housing, the yaw angle of the housing is extracted. and its rate of change ; S202: Real-time recognition of user motion patterns: incorporating the rate of change of tension direction angle Yaw angular velocity of the housing The system comprehensively determines the user's movement pattern, which includes straight walking, constant speed walking, accelerating walking, decelerating walking, turning walking, and stationary state. When the rate of change of the direction angle of the tension Continuously exceeding the preset steering threshold And the yaw rate of the box When synchronous changes occur, the user is determined to be in a turning state, and the turning determination condition is as follows: ; The acceleration / deceleration state is determined based on the positive / negative relationship between the pulling force Fpull and the box acceleration abox: when the pulling force continuously increases and the box acceleration is positive, the user is determined to be in an acceleration state; when the pulling force continuously decreases and the box acceleration is negative, the user is determined to be in a deceleration state; otherwise, the user is determined to be in a constant speed or stationary state. S203: Extended Kalman Filter State Initialization: Based on the user's historical location sequence, the system state vector of the extended Kalman filter is defined as follows: ; in , For the user's two-dimensional location coordinates, , For velocity components, , For acceleration components; initialize the state covariance matrix. With process noise covariance matrix Q; S204: Extended Kalman Filter Prediction and Update: Performs the prediction and update phases of the EKF, with the following state prediction equation: ; in It is a nonlinear state transition function. To control the input; the covariance prediction equation is: ; Entering the update phase, based on the observation location provided by the user positioning module. Calculate the Kalman gain: ; Update state estimates and covariance matrix: ; ; S205: Predicted trajectory and velocity sequence output: Based on the state estimate updated by EKF, extrapolate the future preset time window. By default, it takes the user's location trajectory sequence within 1-2 seconds. The system takes the user's historical position sequence and current motion pattern as input and outputs the predicted position sequence and velocity sequence within a preset time window to S3.
4. The adaptive following control method for a suitcase based on attitude sensing according to claim 3, characterized in that, The specific logical steps of S3 are as follows: S301: Construction of the Prediction Time-Domain State Space Model: Based on the current motion state of the housing and the rotational speeds of the left and right drive wheels, a motion state space model of the housing within the MPC prediction time domain is established, defining the prediction time domain length as... The control time domain length is Within each prediction step, the state prediction equation for the box is as follows: ; in For the first The predicted box state vector; For the first The control input vector of the step, Here is the state transition matrix. To control the input matrix, the state sequence in the prediction time domain is obtained by iterating the prediction equation. ; S302: Construction of Reference Trajectory and Expected State Sequence: Using the user's future trajectory sequence predicted in S2 as the reference trajectory, the box is set to maintain a preset following distance from the user at the desired following position. Generate the expected state sequence of the box in the prediction time domain. Simultaneously, based on the user speed change trend predicted by S2, the expected speed sequence is calculated. , as a speed tracking target; S303: Construction and Optimization of MPC Cost Function: Based on the predicted state sequence and the desired state sequence, a cost function is constructed that includes trajectory tracking error and the rate of change of control quantity, as defined below: ; in The output is the predicted box state. For reference trajectory status, To control the rate of change of quantity; and The weight matrix is used; simultaneously, control magnitude constraints and rate of change constraints are added to ensure that the drive command does not exceed the physical limits of the motor; the optimal control sequence is solved by minimizing the cost function through a quadratic programming solver. ; S304: Feedforward Compensation for Predictive Steering and Gear Shifting: Feedforward compensation logic is embedded in the MPC optimization framework. When S2 predicts that the user is about to turn, a steering compensation term is added to the cost function. The differential ratio of the left and right wheels is pre-adjusted, and the steering differential ratio compensation calculation is as follows: ; in This is the differential compensation amount for the left and right wheels. To compensate for the gain during steering, The cost function is used to predict the user's steering angular velocity; when it is predicted that the user will accelerate or decelerate, an acceleration compensation term is added to the cost function. The drive torque is pre-adjusted, and its drive torque compensation calculation is as follows: ; in This is the amount of driving torque compensation. To compensate for acceleration gain, For the predicted user acceleration; the above compensation amount is incorporated into the reference trajectory in the form of the desired state offset during the MPC optimization solution process, realizing differential pre-adjustment before steering and torque pre-adjustment before gear change, ensuring smooth transition of wheel speed change, and avoiding box oscillation or instability caused by sudden turns and stops. S305: Rolling time-domain control execution: Take the first control variable from the optimal control sequence obtained from the optimization solution. The output is then sent to the wheel hub drive module for execution. At the next sampling moment, using the current actual state of the suitcase as the initial state, repeat steps S301 to S304 to complete the rolling time-domain optimization control, so as to realize the real-time adaptive and smooth following of the suitcase to the user along the predicted trajectory.
5. The adaptive following control method for a suitcase based on attitude sensing according to claim 4, characterized in that, The specific logical steps of S4 are as follows: S401: Calculation of the rate of change of the box's pitch angle: Based on the box's attitude angle data collected by S1, the box's pitch angle is extracted. And calculate its rate of change over time. This is used to determine the direction and trend of road slope, and its calculation formula is as follows: ; when A value >0 indicates that the front of the box is raised, corresponding to an uphill road surface; when... <0 indicates that the front of the box body has sunk, corresponding to a downhill road surface; when A value approximately equal to 0 indicates that the road surface is basically flat. S402: Vibration Acceleration Spectrum Feature Extraction: Based on the triaxial acceleration data of the box body collected by S1, extract the vertical acceleration signal. The time-domain acceleration signal is converted to the frequency domain using a fast Fourier transform, and the energy proportion of the high-frequency components is calculated. The calculation formula is as follows: ; in The amplitude of the vertical acceleration spectrum. To analyze the upper limit of frequency, the default value is set to... =100Hz, The higher the proportion of high-frequency components, the more bumpy the road surface, reflecting the smoothness and bumpiness of the road surface. S403: Road Topography Classification Identification: Based on Pitch Angle Change Rate The proportion of high-frequency vibration energy The current road surface terrain type is determined using a hierarchical identification logic: when If the increase continues, it is determined to be an uphill road surface; when If the slope continues to decrease, it is determined to be a downhill road surface; and When the road surface exhibits periodic and rapid fluctuations, it is identified as a bumpy road surface. when And vertical acceleration When a single large pulse occurs, it is determined to be a speed bump road surface; and At that time, it was determined to be a smooth road surface; Its classification rules can be uniformly expressed as: ; S404: Adaptive Drive Mode Switching: Automatically switches to the corresponding drive mode and adjusts control parameters based on the road surface type identified by S403. Uphill road surface: Increase driving torque to compensate for gravity component, activate hill start assist to prevent rollback, and adaptively adjust torque increment according to slope. ,in This is the uphill torque compensation coefficient; Downhill road surface: Activate energy recovery braking function, provide braking torque through motor reverse drag, and apply speed limit. To prevent speeding downhill; Speed bumps and bumpy roads: Reduce driving speed to It also enables active suspension adjustment, adjusting the suspension damping coefficient. The damping adjustment rule for absorbing road impact is as follows: The more severe the bumps, the greater the damping. Smooth road surface: Restore the normal driving mode, use the normal speed command generated by S3, and turn off special functions such as hill start assist, energy recovery braking and active suspension adjustment; S405: Terrain Recognition Results and Drive Mode Status Output: Outputs the current road surface terrain type. The driving mode state and adjustment parameters are encapsulated in a structured manner and synchronously output to the S3 adaptive follow control strategy module. This allows the MPC controller to introduce terrain adaptive weights into the cost function and constraints. At the same time, the terrain recognition results and mode switching records are written to the system log, providing terrain perception information support for subsequent S5 follow deviation correction and S6 safety protection, thus realizing the collaborative optimization of the entire perception-decision-execution chain.
6. The adaptive following control method for a suitcase based on attitude sensing according to claim 5, characterized in that, The specific logical steps of S5 are as follows: S501: Lateral and Longitudinal Deviation Calculation: Based on the desired following trajectory generated by S3 and the actual positioning data of the suitcase, calculate the lateral deviation between the current position and the desired position of the suitcase. longitudinal deviation The calculation formula is as follows: ; ; in This refers to the actual location of the box. For the desired position, This is the actual yaw angle of the housing. The desired yaw angle; This is the lateral deviation. This is the longitudinal deviation; S502: Cascaded Outer Loop Position Deviation Control: An outer loop position deviation controller employing a cascaded control structure to control lateral deviation. and longitudinal deviation Using the input as the input, calculate the lateral velocity correction. and longitudinal velocity correction The calculation formula is as follows: ; ; in , These are the proportional gain coefficients for the lateral and longitudinal position deviation controllers, respectively, and the unit of the speed correction is m / s; When the deviation is zero, the correction amount is zero, and the box moves at the originally expected speed; S503: Cascaded Inner Loop Speed Control and Wheel Speed Command Generation: Superimposes the speed correction amount onto the original desired speed generated by S3. The corrected expected speed is obtained above. Then, the inner loop speed controller outputs the left and right drive wheel speed commands. and The calculation method is as follows: longitudinal distance correction is achieved through dual-wheel unidirectional speed regulation, and lateral correction is achieved through differential speed between the left and right wheels, while simultaneously satisfying the average speed of the left and right wheels and... Consistent requirements; the core speed regulation and differential speed command calculation formulas involved in this step are as follows: ; ; ; ; in For the corrected expected speed, The original desired speed output by S3. This is the longitudinal velocity correction amount; The radius of the drive wheel, This refers to the wheel speed corresponding to the base speed. The track width is the distance between the left and right drive wheels. This is the lateral velocity correction amount; , These are the desired speed commands for the left and right drive wheels, respectively; when the lateral deviation... hour, The box body turns to the right to correct its deviation; when hour, The box body turns to the left; S504: Deviation correction amount is fed back to the MPC reference trajectory: the lateral deviation at the current moment is... Longitudinal deviation and the corresponding speed correction amount , Perform structured encapsulation to form a deviation feedback vector. The data is synchronously transmitted back to the MPC controller in S3; when the MPC controller generates the reference trajectory in the next control cycle, it uses... As a correction input to the reference trajectory, the desired state sequence Online correction is performed: When historical correction data shows a continuous deviation in the same direction, the MPC reference trajectory will shift accordingly to eliminate steady-state error, causing subsequent following trajectories to actively adjust in the direction of eliminating the deviation. This achieves a three-level cascaded closed-loop dynamic optimization of "outer loop correction + inner loop tracking + MPC trajectory feedforward correction". ; in For feedback correction gain matrix, For the original reference trajectory, This is the new reference trajectory after correction; S505: Deviation Correction Execution and Status Update: Calculate the desired speed commands for the left and right drive wheels. The output is sent to the wheel hub drive module for execution. The drive housing adjusts its motion state according to the corrected wheel speed command, gradually eliminating lateral and longitudinal deviations. At the same time, the actual correction result at the current moment is recorded to the system log, completing the deviation monitoring and dynamic correction closed loop of this control cycle, and repeating S501 to S504 at the next sampling moment.
7. The adaptive following control method for a suitcase based on attitude sensing according to claim 6, characterized in that, The specific logical steps of S6 are as follows: S601: Operating Mode Recognition and Switching Determination: The system detects user-issued mode switching commands via physical buttons, touch, or voice in real time and identifies the target operating mode; simultaneously, it monitors the current movement status of the enclosure to determine whether the switching conditions are met. The switching determination rules are as follows: Manual Follow Mode → Automatic Follow Mode: Switching is only allowed when the box is stationary or moving at a constant speed in a straight line and the user is within the effective follow range; Automatic Follow Mode → Assist Mode: Only when the box is stationary or the speed is below the safety threshold. Switching is allowed at any time; Other switching: Allows switching in any direction, but automatically performs a safe deceleration to the initial speed of the target mode after switching; S602: Multi-mode switching execution: When the switching conditions are met, the system performs a working mode switch and synchronously adjusts the control parameters. Manual Follow Mode: With automatic follow and assist functions off, the motor is in free gliding or power-off braking state. The user manually pushes or pulls the box to move, and the box does not follow actively. Automatic Follow Mode: Activates all follow control logics from S2 to S5, and the box automatically follows the user's movement, achieving autonomous following and walking; Assisted mode: Turn off lateral follow control and only retain longitudinal assist drive. The box moves forward at a fixed low speed or a user-set speed. The user controls the direction of travel by pulling the lever. It is suitable for use in scenarios where automatic follow is not suitable. S603: Real-time monitoring of abnormal equipment status: The system monitors abnormal equipment status at fixed intervals. Collect battery power Motor temperature and the tilt angle of the box body And compare them with preset safety thresholds respectively: Low battery This indicates that the battery life is insufficient to support normal following. Motor overheating: This indicates that the motor is at risk of overheating and damage. Box tilt exceeds limit: This indicates that the container may tip over. S604: Level 3 security protection mechanism trigger: When S603 detects any abnormal state, it automatically triggers the corresponding security protection action according to the type and severity of the abnormality. Its protection decision and execution logic is as follows: Level 1 protection deceleration stop: Triggered when motor overheating or battery power falls below a safety threshold, the system decelerates at a preset speed. Perform smooth deceleration to a complete stop to avoid the box tipping over or user discomfort caused by sudden stops; Level 2 protection audible and visual alarm: When any abnormal state is triggered, the audible and visual alarm will be activated simultaneously. The built-in buzzer will emit a continuous and rapid buzzing sound, and the LED indicator will flash to remind the user to pay attention to the equipment status. Three-level protection braking and locking: When the tilt angle of the box exceeds the safety limit or after deceleration and stopping, the system activates the electromagnetic brake to lock the drive wheel to prevent the box from sliding freely in dangerous situations on slopes. S605: Abnormal Recovery and Mode Reset: After the abnormal state is eliminated, the user can release the brake lock and alarm state by pressing and holding the reset button. The system will automatically switch back to the working mode before the abnormality occurred and resume normal operation. If the abnormal state continues for more than the preset time without being handled, the system will automatically send fault information to the user terminal and maintain the brake lock state until manual intervention confirms safety before resetting, ensuring that the use process is safe and controllable.
8. A suitcase adaptive following control system based on attitude sensing, used to implement the method described in any one of claims 1-7, characterized in that, It includes an attitude perception module, a user motion perception module, a positioning and following module, a master control decision module, a wheel hub drive module, and a terrain perception module; The attitude sensing module is used to collect the three-axis acceleration, three-axis angular velocity and attitude angle data of the box in real time; The user motion sensing module is used to collect the magnitude and direction of the pulling force applied by the user to the lever; The positioning and following module is used to obtain the user's distance and orientation information relative to the box; The terrain perception module is used to identify road surface terrain types based on box attitude data and drive feedback data; The main control decision module is used to perform user motion state recognition, trajectory prediction, adaptive following control strategy generation, terrain adaptive drive mode switching, and dynamic correction of following deviation. The main control decision module has a built-in model prediction controller, which takes the user trajectory prediction result and the current box state as input and the expected speed of the left and right drive wheels as output to realize the rolling time domain optimization of following control. At the same time, it has a built-in cascaded deviation corrector to correct the lateral and longitudinal deviations in the following process in real time. The hub drive module is used to independently control the speed and torque of the left and right drive wheels according to the drive commands output by the main control decision module.
