Omnibearing continuous automatic orientation system based on attitude sensor and control method thereof

By using an omnidirectional continuous automatic orientation system based on attitude sensors, and employing a nine-axis inertial/geomagnetic combined sensor and closed-loop control algorithm, the problems of mechanical limitation, cable entanglement and deviation correction in existing orientation devices are solved, and stable and accurate orientation control is achieved.

CN122018290AInactive Publication Date: 2026-05-12JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JILIN UNIVERSITY
Filing Date
2026-04-14
Publication Date
2026-05-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing orientation devices suffer from problems such as limited mechanical movement during long-term continuous operation, easy tangling of power and signal lines, difficulty in real-time correction of deviations by open-loop control, and insufficient resistance to vibration and environmental adaptability.

Method used

An omnidirectional continuous automatic orientation system based on attitude sensors is adopted, including a target direction setting module, attitude sensing unit, main control unit, closed-loop control unit, motor drive unit, and power supply and signal transmission unit. It utilizes components such as a nine-axis inertial/geomagnetic combined sensor, microcontroller, closed-loop control algorithm, and conductive slip ring to achieve real-time attitude feedback and stable orientation.

Benefits of technology

It significantly reduces the problem of traditional cable tangling, improves the stability and accuracy of orientation, reduces the risk of jitter and overshoot when approaching the target, adapts to different load requirements, and is feasible for engineering implementation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018290A_ABST
    Figure CN122018290A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of automatic control and mechatronics, and particularly relates to an all-dimensional continuous automatic orientation system based on an attitude sensor and a control method of the all-dimensional continuous automatic orientation system. Comprising a target direction setting module, an attitude sensing unit, a main control unit, a closed-loop control unit, a motor driving unit, an execution mechanism unit and a power supply and signal transmission unit, the main control unit is electrically connected with the target direction setting module, the attitude sensing unit, the closed-loop control unit and the motor driving unit; the executing mechanism unit comprises a stepping motor, a transmission structure and a rotating platform; the power supply and signal transmission unit comprises a rotary electric connection structure. According to the invention, the continuous orientation of the rotating platform can be realized while the traditional winding problem is avoided, and the method has the characteristics of clear structure, complete control closed loop and high expandability, and is suitable for scenes such as security monitoring holders, communication antenna pointing, automatic observation equipment, mobile robot platforms and intelligent agricultural machinery orientation devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of automatic control and mechatronics technology, specifically to an omnidirectional continuous automatic orientation system and its control method based on an attitude sensor. Background Technology

[0002] With the development of intelligent equipment and automated systems, orientation platforms are widely used in fields such as communications, security, surveying and mapping, agricultural equipment, and robotics. Typical applications include: using pan-tilt-zoom (PTZ) cameras for continuous inspection and target tracking; using rotating mechanisms to drive communication antennas for pointing adjustment; and using automatic observation platforms for azimuth maintenance and realignment.

[0003] Many existing orientation devices still employ mechanical limit switches combined with open-loop control. While this approach is structurally intuitive, it is prone to the following problems during long-term continuous operation: First, mechanical limit switches restrict the rotation angle range, making them unsuitable for scenarios requiring continuous rotation. Second, simply removing the limit switches can lead to tangling of power and signal lines, affecting device reliability. Third, open-loop control relies primarily on pulse count to estimate position, making it difficult to correct deviations caused by missed steps, hysteresis, load disturbances, and friction changes in real time. Fourth, when relying solely on single-direction detection, resistance to vibration, magnetic interference, and environmental adaptability is often insufficient.

[0004] In recent years, MEMS inertial devices and magnetic sensors have been widely used for attitude estimation. However, in specific system designs, if factors such as attitude fusion, error normalization, drive subdivision, acceleration / deceleration curves, slip ring arrangement, and installation magnetic environment are not fully considered, problems such as positioning jitter, overshoot when approaching the target, unstable dynamic tracking, and complex structural wiring may still occur. Therefore, it is necessary to propose an automatic orientation system that takes into account continuous rotation, closed-loop control, attitude feedback, and engineering feasibility. Summary of the Invention

[0005] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0006] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:

[0007] An omnidirectional continuous automatic orientation system based on attitude sensors includes a target direction setting module, an attitude sensing unit, a main control unit, a closed-loop control unit, a motor drive unit, an actuator unit, and a power supply and signal transmission unit. The target direction setting module is used to input the target heading angle or target direction parameters. The attitude sensing unit is used to collect raw attitude data of the rotating platform in real time. The main control unit is electrically connected to the target direction setting module, attitude sensing unit, closed-loop control unit, and motor drive unit, and is used to perform sensor data preprocessing, attitude calculation, logic scheduling, and control command output. The closed-loop control unit is used to calculate the shortest path error between the current heading angle and the target heading angle, and to generate control quantities for the actuator according to the control algorithm. The motor drive unit is used to receive direction signals and pulse signals output by the main control unit and drive the actuator to rotate. The actuator unit includes a stepper motor, a transmission structure, and a rotating platform, and is used to drive the load for continuous orientation adjustment. The power supply and signal transmission unit includes a rotating electrical connection structure, used to realize continuous power and signal transmission between the fixed and rotating parts.

[0008] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the attitude sensing unit adopts a nine-axis inertial / geomagnetic combined sensor. The sensor integrates a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer, and can communicate with the main control unit through a digital interface.

[0009] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the main control unit adopts a microcontroller with floating-point arithmetic capabilities to perform filtering, attitude fusion, error calculation, and closed-loop control; the main control unit is an STM32F407 microcontroller, which is based on an ARM Cortex-M4 core and has a hardware FPU.

[0010] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the closed-loop control unit includes a heading error normalization module. This module maps the difference between the target heading angle and the current heading angle to a range of -180° to 180° to ensure that the actuator completes the orientation adjustment along the shortest path. The error calculation relationship is expressed as follows:

[0011]

[0012] Where θtarget is the target heading angle, θcurrent is the current heading angle, and e is the normalized control error. After this processing, the error is always constrained within the range of greater than -180° and less than or equal to 180°, thereby avoiding unnecessary long-path rotations by the actuator.

[0013] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on an attitude sensor described in this invention, the closed-loop control unit employs a discrete PID control algorithm and includes integral limiting, anti-integral saturation, and error dead-zone handling; the control output satisfies:

[0014]

[0015] In the formula, Kp, Ki, and Kd are the proportional, integral, and derivative coefficients, respectively, and Ts is the sampling period. When using integral limiting or anti-integral saturation strategies, the integral state is made to satisfy:

[0016]

[0017] Where sat(·) represents the saturation function, and Imin and Imax are the lower limit and upper limit of integration, respectively.

[0018] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the motor drive unit adopts a microstepping stepper motor driver, which can receive STEP, DIR and EN control signals output by the main control unit and drive the stepper motor to rotate according to the direction and pulse frequency; the motor drive unit adopts a DRV8825 or a functionally equivalent stepper driver chip.

[0019] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the power supply and signal transmission unit is a through-hole type or cap type conductive slip ring. The number of channels, rated current, rated speed, contact resistance and insulation resistance of the conductive slip ring are selected and determined according to the power supply and communication requirements of the load carried by the rotating platform, so as to achieve stable power and signal transmission during the continuous rotation of the rotating platform.

[0020] As a preferred embodiment of the omnidirectional continuous automatic orientation system based on attitude sensors described in this invention, the actuator unit includes a two-phase stepper motor, a coupling, a rotation center shaft, and a rotation platform; the step angle, holding torque, microstepping, and whether a reduction mechanism is configured for the stepper motor are determined according to the load inertia, target positioning resolution, and dynamic response requirements; the stepper motor is a 42 series two-phase four-wire stepper motor with a full step angle of 1.8°.

[0021] An omnidirectional continuous automatic orientation control method based on an attitude sensor includes the following steps:

[0022] S1, System initialization, completes the initialization of the main control unit clock, interface, registers and sensors;

[0023] S2, Receive the target heading angle θtarget;

[0024] S3: Collect raw attitude data and perform filtering, zero bias correction and magnetic field compensation;

[0025] S4, perform attitude calculation to obtain the current heading angle θcurrent; S5, perform shortest path error normalization processing on the target heading angle and the current heading angle to obtain the control error e;

[0026] S6. Perform discrete PID calculation based on the control error e to obtain the control output u(k);

[0027] S7 generates direction control signals and pulse control signals based on the control output, and controls the stepper motor to drive the rotary platform to move.

[0028] S8: During the motion, continuously collect attitude data and repeat steps S3-S7 until the error enters the preset dead zone, at which point stop output or enter the hold state.

[0029] As a preferred embodiment of the omnidirectional continuous automatic orientation control method based on attitude sensors described in this invention, S3 includes zero-bias calibration of the accelerometer and gyroscope and calibration of the magnetometer; in S7, the main control unit converts the control quantity into the number of pulses according to the single-pulse equivalent rotation angle, subdivision number and transmission ratio, and adopts a stepped acceleration or S-shaped acceleration and deceleration method to reduce the motor start-stop impact and overshoot.

[0030] Compared with the prior art, the beneficial effects of the present invention are: 1. By introducing a conductive slip ring or a functionally equivalent rotating electrical connection structure between the fixed part and the rotating part, the limitations of traditional cable winding problems on continuous rotation applications can be significantly reduced.

[0031] 2. By using attitude sensors to provide real-time feedback on the platform's current orientation and employing error normalization and closed-loop control, the cumulative deviation can be suppressed more effectively compared to a simple open-loop drive scheme.

[0032] 3. By combining microstepping drive, discrete PID, integral limiting and acceleration / deceleration control, the risk of jitter, overshoot and step loss when approaching the target can be improved.

[0033] 4. This invention adopts a modular design, and the main controller, sensor, driver, slip ring and actuator can all be replaced and selected according to actual load requirements, which is suitable for engineering expansion.

[0034] 5. After the structural installation, attitude calibration and parameter tuning are completed, the system can obtain the orientation stability required for engineering applications; the specific accuracy, response time and steady-state error are affected by the load inertia, installation magnetic environment, sampling period, drive subdivision and overall debugging status. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0036] Figure 1 This is a flowchart of the control method of the present invention;

[0037] Figure 2 This is a hardware connection diagram in an embodiment of the present invention. Detailed Implementation

[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0039] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.

[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0041] An omnidirectional continuous automatic orientation system based on attitude sensors includes a target direction setting module, an attitude sensing unit, a main control unit, a closed-loop control unit, a motor drive unit, an actuator unit, and a power supply and signal transmission unit. The target direction setting module is used to input the target heading angle or target direction parameters. The attitude sensing unit is used to collect raw attitude data of the rotating platform in real time. The main control unit is electrically connected to the target direction setting module, attitude sensing unit, closed-loop control unit, and motor drive unit, and is used to perform sensor data preprocessing, attitude calculation, logic scheduling, and control command output. The closed-loop control unit is used to calculate the shortest path error between the current heading angle and the target heading angle, and to generate control quantities for the actuator according to the control algorithm. The motor drive unit is used to receive direction signals and pulse signals output by the main control unit and drive the actuator to rotate. The actuator unit includes a stepper motor, a transmission structure, and a rotating platform, and is used to drive the load for continuous orientation adjustment. The power supply and signal transmission unit includes a rotating electrical connection structure, used to realize continuous power and signal transmission between the fixed and rotating parts.

[0042] The attitude sensing unit employs a nine-axis inertial / geomagnetic combined sensor, which integrates a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. It can communicate with the main control unit via a digital interface. The attitude sensing unit is mounted on a rotating platform or a structural component rigidly connected to the rotating platform so that the measured attitude information can accurately reflect the current orientation of the load. For implementations where the magnetometer participates in heading calculation, strong magnetic devices should be avoided in the structural design, and hard and soft magnetic compensation can be performed after the entire machine is assembled.

[0043] The main control unit uses a microcontroller with floating-point arithmetic capabilities to perform filtering, attitude fusion, error calculation, and closed-loop control. The main control unit is an STM32F407 microcontroller, which is based on the ARM Cortex-M4 core and has a hardware FPU. This controller can communicate with the attitude sensor through I2C or SPI interface, control the stepper driver by outputting pulse signals through a timer, and exchange commands and status information with the host computer or external controller through serial port, CAN or other buses.

[0044] The closed-loop control unit includes a heading error normalization module, which maps the difference between the target heading angle and the current heading angle to a range of -180° to 180° to ensure that the actuator completes the orientation adjustment according to the shortest path; its error calculation relationship is expressed as:

[0045]

[0046] Where θtarget is the target heading angle, θcurrent is the current heading angle, and e is the normalized control error. After this processing, the error is always constrained within the range of greater than -180° and less than or equal to 180°, thereby avoiding unnecessary long-path rotations by the actuator.

[0047] The closed-loop control unit employs a discrete PID control algorithm and includes integral limiting, anti-integral saturation, and error dead-zone handling; the control output satisfies:

[0048]

[0049] In the formula, Kp, Ki, and Kd are the proportional, integral, and derivative coefficients, respectively, and Ts is the sampling period. When using integral limiting or anti-integral saturation strategies, the integral state is made to satisfy:

[0050]

[0051] Where sat(·) represents the saturation function, and Imin and Imax are the lower limit and upper limit of integration, respectively.

[0052] The motor drive unit uses a microstepping stepper motor driver such as the DRV8825. The driver receives at least a direction signal, a pulse signal, and an enable signal, and outputs two-phase current according to the set microstepping value to reduce low-speed vibration and improve angular resolution. The actual operating current, heat dissipation structure, and power supply voltage of the driver are determined according to the selected motor specifications and load conditions, and the stepper motor is driven to rotate according to the direction and pulse frequency. The motor drive unit uses a DRV8825 or a functionally equivalent stepper driver chip.

[0053] The power supply and signal transmission unit is a through-hole type or cap type conductive slip ring. The number of channels, rated current, rated speed, contact resistance, and insulation resistance of the conductive slip ring are selected and determined according to the power supply and communication requirements of the load carried by the rotating platform, so as to achieve stable power and signal transmission during the continuous rotation of the rotating platform. The conductive slip ring is used to solve the problem of cable entanglement when the rotating part rotates continuously. The number of slip ring channels is not limited to a single value, but is selected according to the number of power circuits required at the rotating end, the number of digital signals, the number of analog signals, and the shielding requirements. For implementations with high anti-interference requirements, shielded wires, differential communication, independent ground wire planning, and local voltage stabilization design at the rotating end can be adopted.

[0054] The actuator unit includes a two-phase stepper motor, a coupling, a rotating central shaft, and a rotating platform; the step angle, holding torque, microstepping, and whether a reduction mechanism is configured for the stepper motor are determined based on the load inertia, target positioning resolution, and dynamic response requirements; the stepper motor is a 42 series two-phase four-wire stepper motor with a full step angle of 1.8°.

[0055] Please see Figure 1 A method for omnidirectional continuous automatic orientation control based on attitude sensors includes the following steps:

[0056] S1, System initialization, completes the initialization of the main control unit clock, interface, registers and sensors;

[0057] S2, Receive the target heading angle θtarget;

[0058] S3 collects raw attitude data and performs filtering, zero bias correction and magnetic field compensation, including zero bias calibration of accelerometer and gyroscope and calibration of magnetometer.

[0059] S4, perform attitude calculation to obtain the current heading angle θcurrent; S5, perform shortest path error normalization processing on the target heading angle and the current heading angle to obtain the control error e;

[0060] S6. Perform discrete PID calculation based on the control error e to obtain the control output u(k);

[0061] S7 generates direction control signals and pulse control signals based on the control output, and controls the stepper motor to drive the rotary platform. The main control unit converts the control quantity into the number of pulses based on the single-pulse equivalent angle, microstepping, and transmission ratio, and uses stepped acceleration or S-shaped acceleration / deceleration to reduce motor start-stop shock and overshoot. When the controller converts the angle control quantity into the number of step pulses, the following relationship can be used:

[0062]

[0063] Where N is the required number of output pulses, Δθ is the angle to be compensated, θstep is the equivalent rotation angle of a single pulse, θm is the full step angle of the stepper motor, n is the microstepping value, and r is the transmission ratio or reduction ratio. When the system uses a 1.8° stepper motor with a microstepping value of 16 and a transmission ratio of 1:1, the equivalent rotation angle of a single pulse is 0.1125°.

[0064] S8: During the motion, continuously collect attitude data and repeat steps S3-S7 until the error enters the preset dead zone, then stop output or enter the hold state.

[0065] Example

[0066] This invention is used for automatic orientation of security monitoring pan-tilt units or lightweight communication antenna platforms. The fixed end houses the main control board, motor drive board, power supply board, and communication interface; the rotating end houses the attitude sensor board and the load to be oriented. A stepper motor is fixed to the base and connected to the central axis of rotation via a coupling. The central axis drives the rotating platform and its load to rotate continuously. Conductive slip rings are arranged near the rotating axis to shorten the length of power supply and signal wiring at the rotating end.

[0067] System hardware composition and connection relationship

[0068] See Figure 2 The target direction setting module can consist of a host computer, a serial port command interface, local buttons, or DIP switches, used to input the target heading angle. After receiving the target direction, the main control unit periodically reads the data from the rotating end sensors to complete attitude calculation and closed-loop control operations. The drive unit controls the stepper motor to rotate based on the STEP, DIR, and EN signals output by the main control unit, and the motor transmits the angular displacement to the rotating platform through a coupling.

[0069] During engineering implementation, attitude sensors should be installed as close as possible to the center of the controlled platform to reduce the impact of local platform vibration and assembly eccentricity on heading estimation. For loads such as cameras, antennas, or detectors mounted on the platform, their power supply and signal lines can also be led to the fixed end via conductive slip rings. If the slip ring only serves as a power supply, an auxiliary processor can also be arranged at the rotating end and connected to the attitude sensor via a short-distance bus.

[0070] Control software and algorithm implementation

[0071] In a specific software architecture, the system uses a fixed-period interrupt as the time base. If the underlying time base uses a 1ms timer interrupt, the attitude acquisition and control refresh task can be executed once every 10 time base cycles, corresponding to a 100Hz control frequency; alternatively, a 10ms control cycle can be used directly.

[0072] After attitude data acquisition, the main control unit first performs zero-bias correction, moving average, complementary filtering, extended Kalman filtering, or other equivalent processing on the acceleration, angular velocity, and magnetic field data. Then, it calculates the heading angle by combining the sensor's built-in DMP output or the main control unit's internal attitude fusion algorithm. For operating environments with strong magnetic interference, a post-installation whole-machine calibration process can be added, and magnetic field compensation parameters can be stored in the software.

[0073] Once the current heading angle is obtained, the controller calculates the shortest path error *e* and inputs the error into the discrete PID controller. After the error enters the preset dead zone, the controller stops outputting pulses and enters a hold state. When the platform deviates from the target direction due to external disturbances, the controller restarts the fine-tuning process. For applications with large loads or high platform rotational inertia, stepped acceleration or S-shaped acceleration / deceleration strategies can be used to reduce start-stop shock.

[0074] During pulse conversion, the main control unit calculates the equivalent rotation angle of a single pulse based on the motor's full-step step angle, drive microstepping, and transmission ratio, and then obtains the number of pulses based on the desired correction angle. It should be noted that the control quantity and the number of pulses do not necessarily have to correspond one-to-one to a single complete position command. In actual implementation, speed control, continuous pulse frequency modulation, or segmented pulse refresh methods can also be used.

[0075] Example 1 Working Process

[0076] After the system powers on, it first completes clock configuration, GPIO initialization, attitude sensor initialization, and communication interface initialization. If a sensor malfunction, driver failure, or power undervoltage is detected, it can enter fault protection mode and output a prompt message.

[0077] The user sends a target heading angle, such as 90°, to the system via a host computer. After confirming the target value is valid, the main control unit writes it into the target register and reads the raw data from the attitude sensor in each control cycle. After filtering and attitude calculation, if the current heading angle is 0°, the normalized control error is 90°.

[0078] When the actuator uses a 1.8° full-step stepper motor, 16 microstepping drive, and a 1:1 transmission ratio, the equivalent rotation angle per pulse is 0.1125°. If theoretically a 90° compensation is required, the corresponding number of pulses is approximately 800. The controller does not necessarily need to send all pulses at once; it can also modulate the output frequency in segments according to acceleration, constant speed, and deceleration phases to ensure the motor smoothly approaches the target direction.

[0079] During platform rotation, the attitude sensing unit continuously transmits the current heading angle. The controller corrects errors in real time and dynamically adjusts the pulse output; when the error drops to within the preset dead zone, it stops driving pulses and enters a hold state. If the target direction is subsequently updated or the platform deviates from the target range due to external disturbances, the controller restarts the orientation or fine-tuning process.

[0080] In addition to the preferred embodiments described above, the present invention may also employ the following alternatives: First, the attitude sensing unit may be replaced by other nine-axis IMUs, integrated navigation modules, or attitude modules with geomagnetic compensation functions; Second, the actuator may be replaced by a stepper motor with a servo motor, a brushless motor with an encoder, or other controllable angular displacement actuators; Third, the power supply and signal transmission unit may employ functionally equivalent solutions such as photoelectric slip rings, hollow shaft slip rings, and wireless power supply and wireless communication combination structures.

[0081] For applications with heavy loads, higher orientation accuracy, or stronger anti-interference capabilities, absolute encoders, dual closed-loop control, gearboxes, mechanical damping structures, or high-order attitude fusion algorithms can be added to the existing solutions. For cost-sensitive scenarios, the core closed-loop logic described in this invention can be retained, with only adjustments made to the device level and peripheral circuits.

[0082] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. An omnidirectional continuous automatic orientation system based on an attitude sensor, characterized in that, The system includes a target orientation setting module, an attitude sensing unit, a main control unit, a closed-loop control unit, a motor drive unit, an actuator unit, and a power and signal transmission unit. The target orientation setting module is used to input the target heading angle or target orientation parameters. The attitude sensing unit is used to collect raw attitude data of the rotating platform in real time. The main control unit is electrically connected to the target orientation setting module, attitude sensing unit, closed-loop control unit, and motor drive unit, and is used to perform sensor data preprocessing, attitude calculation, logic scheduling, and control command output. The closed-loop control unit is used to calculate the shortest path error between the current heading angle and the target heading angle, and to generate control quantities for the actuator based on the control algorithm. The motor drive unit is used to receive direction signals and pulse signals output by the main control unit and drive the actuator to rotate. The actuator unit includes a stepper motor, a transmission structure, and a rotating platform, and is used to drive the load for continuous orientation adjustment. The power and signal transmission unit includes a rotating electrical connection structure, used to achieve continuous power and signal transmission between the fixed and rotating parts.

2. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The attitude sensing unit uses a nine-axis inertial / geomagnetic combined sensor, which integrates a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer, and can communicate with the main control unit through a digital interface.

3. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The main control unit uses a microcontroller with floating-point operation capability to perform filtering, attitude fusion, error calculation and closed-loop control; the main control unit is an STM32F407 microcontroller, which is based on the ARM Cortex-M4 core and has a hardware FPU.

4. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The closed-loop control unit includes a heading error normalization module, which maps the difference between the target heading angle and the current heading angle to a range of -180° to 180° to ensure that the actuator completes the orientation adjustment along the shortest path. The error calculation relationship is expressed as follows: Where θtarget is the target heading angle, θcurrent is the current heading angle, and e is the normalized control error. After this processing, the error is always constrained within the range of greater than -180° and less than or equal to 180°, thereby avoiding unnecessary long-path rotations by the actuator.

5. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The closed-loop control unit employs a discrete PID control algorithm and includes integral limiting, anti-integral saturation, and error dead-zone handling; the control output satisfies: In the formula, Kp, Ki, and Kd are the proportional, integral, and derivative coefficients, respectively, and Ts is the sampling period. When using integral limiting or anti-integral saturation strategies, the integral state is made to satisfy: Where sat(·) represents the saturation function, and Imin and Imax are the lower limit and upper limit of integration, respectively.

6. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The motor drive unit adopts a microstepping motor driver, which can receive STEP, DIR and EN control signals output by the main control unit and drive the stepper motor to rotate according to the direction and pulse frequency; the motor drive unit adopts DRV8825 or a functionally equivalent stepper driver chip.

7. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The power supply and signal transmission unit is a through-hole type or cap type conductive slip ring. The number of channels, rated current, rated speed, contact resistance and insulation resistance of the conductive slip ring are selected and determined according to the power supply and communication requirements of the load carried by the rotating platform, so as to achieve stable power and signal transmission during the continuous rotation of the rotating platform.

8. The omnidirectional continuous automatic orientation system based on an attitude sensor according to claim 1, characterized in that, The actuator unit includes a two-phase stepper motor, a coupling, a rotating central shaft, and a rotating platform; the step angle, holding torque, microstepping, and whether a reduction mechanism is configured for the stepper motor are determined based on the load inertia, target positioning resolution, and dynamic response requirements; the stepper motor is a 42 series two-phase four-wire stepper motor with a full step angle of 1.8°.

9. A method for omnidirectional continuous automatic orientation control based on an attitude sensor, used to implement the omnidirectional continuous automatic orientation system based on an attitude sensor as described in any one of claims 1-7, characterized in that, Includes the following steps: S1, System initialization, completes the initialization of the main control unit clock, interface, registers and sensors; S2, Receive the target heading angle θtarget; S3: Collect raw attitude data and perform filtering, zero bias correction and magnetic field compensation; S4, perform attitude calculation to obtain the current heading angle θcurrent; S5, perform shortest path error normalization processing on the target heading angle and the current heading angle to obtain the control error e; S6. Perform discrete PID calculation based on the control error e to obtain the control output u(k); S7 generates direction control signals and pulse control signals based on the control output, and controls the stepper motor to drive the rotary platform to move. S8: During the motion, continuously collect attitude data and repeat steps S3-S7 until the error enters the preset dead zone, then stop output or enter the hold state.

10. The omnidirectional continuous automatic orientation control method based on an attitude sensor according to claim 9, characterized in that, S3 includes zero-bias calibration of the accelerometer and gyroscope, as well as calibration of the magnetometer; in S7, the main control unit converts the control quantity into the number of pulses based on the single-pulse equivalent rotation angle, subdivision number, and transmission ratio, and adopts a stepped acceleration or S-shaped acceleration / deceleration method to reduce the motor start-stop impact and overshoot.