Gyroscope-based attitude control system and method
By filtering and modeling the angular velocity, acceleration and azimuth data collected by the gyroscope, a three-dimensional attitude map is constructed and error calculation is performed, the problem of inaccurate attitude adjustment in the rapidly changing environment is solved, and high-precision and stable attitude control are achieved.
Patent Information
- Application Number
- CN202510448577.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In a complex environment with rapid changes, noise interference can easily lead to inaccurate or delayed gyroscope attitude adjustment instructions, and there are problems such as poor real-time performance and weak stability of attitude estimation.
By collecting the angular velocity, acceleration and azimuth data of the target object in three-dimensional space, adaptive median filtering and short-time Fourier transform are used to generate the filtered angular velocity value, combined with dynamic pose model and Bayesian filtering for pose estimation correction, construct a three-dimensional pose map and perform topological analysis, and calculate the pose error using the nonlinear least squares method to generate or correct the pose control signal.
It improves the accuracy and reliability of posture estimation, enhances the ability to identify the pose change patterns of the target object, ensures the system's real-time response and stability in complex dynamic environments, and improves the accuracy of posture adjustment instructions and the robustness of the system.
Smart Images

Figure CN120255585A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of gyroscopes, and in particular to an attitude control system and method based on gyroscopes. Background Art
[0002] With the rapid development of modern technology, attitude control technology has been widely applied in fields such as aerospace, robotics, intelligent vehicles, and virtual reality. As the core sensor, the gyroscope has become a key component of the attitude control system due to its advantages of high precision, small size, and strong real-time performance. Driven by industry demands, attitude control technology is developing towards higher precision, stronger stability, and lower energy consumption.
[0003] In related technical means, algorithms such as the Kalman filter are used to fuse the angular velocity data collected by the gyroscope with the linear acceleration data of the accelerometer to correct the cumulative error and obtain a more accurate attitude estimate value, realizing attitude tracking and adjustment, and effectively enhancing the adaptability of the system to the dynamic environment.
[0004] Regarding the above technical solution, although high-precision attitude control can be achieved in a dynamic scenario by combining the gyroscope and the accelerometer, in a rapidly changing complex environment, noise interference easily leads to inaccurate or delayed attitude adjustment commands, affecting the overall performance of the system, and there are problems of poor real-time performance and weak stability of attitude estimation. Summary of the Invention
[0005] In order to improve the problem that in a rapidly changing complex environment, noise interference easily leads to inaccurate or delayed attitude adjustment commands, and there are problems of poor real-time performance and weak stability of attitude estimation, this application provides an attitude control system and method based on gyroscopes.
[0006] The present invention provides an attitude control method based on a gyroscope, including: collecting angular velocity data, acceleration data, and azimuth data of a target object in three-dimensional space, filtering the collected angular velocity data to obtain a filtered angular velocity value; inputting the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value, and using the acceleration data and azimuth data to correct the initial attitude estimation value to obtain a corrected attitude estimation value; constructing a three-dimensional attitude map based on the corrected attitude estimation value, performing data sequence analysis on the three-dimensional attitude map, extracting key feature parameters in the attitude change of the object, classifying the key feature parameters to obtain an attitude change pattern, and generating an attitude adjustment instruction based on the attitude change pattern; calculating an attitude error for the attitude adjustment instruction to obtain an attitude error value, if the attitude error value does not exceed a preset threshold, generating an attitude control signal using the attitude adjustment instruction, if the attitude error value exceeds the preset threshold, correcting the attitude adjustment instruction, and generating an attitude control signal based on the corrected attitude adjustment instruction.
[0007] As a preferred solution, the step of collecting angular velocity data, acceleration data, and azimuth data of a target object in three-dimensional space, filtering the collected angular velocity data to obtain a filtered angular velocity value includes: using an inertial measurement unit to collect angular velocity data of a target object in three-dimensional space, using a triaxial accelerometer to collect acceleration data of a target object in three-dimensional space, using a triaxial magnetometer to collect azimuth data of a target object in three-dimensional space; applying an adaptive median filtering algorithm to filter the angular velocity data to obtain a filtered angular velocity value.
[0008] As a preferred solution, the step of inputting the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value, and using the acceleration data and azimuth data to correct the initial attitude estimation value to obtain a corrected attitude estimation value includes: constructing an angular velocity time series using the filtered angular velocity value, performing a short-time Fourier transform on the angular velocity time series to obtain an angular velocity frequency spectrum; calculating the main components of the angular velocity frequency spectrum, using the main components combined with the motion inertia parameters of the target object to construct an attitude change prediction vector, inputting the attitude change prediction vector into a preset dynamic attitude model, and in the dynamic attitude model, using a Bayesian filtering method to dynamically correct the attitude change prediction vector to obtain a preliminary attitude estimation value; calculating an attitude stability factor of the target object based on the acceleration data and the azimuth data, and using the attitude stability factor to perform weighted correction on the preliminary attitude estimation value to obtain a corrected attitude estimation value.
[0009] As a preferred solution, the calculation formula for the attitude stability factor of the target object based on the acceleration data and the azimuth data is as follows: Wherein, is the attitude stability factor, is the acceleration data at the -th time point, is the mean value of the acceleration data, is the azimuth data at the -th time point, is the mean value of the azimuth data, and are adaptive weight parameters, is the number of time steps in the calculation window.
[0010] As a preferred solution, the steps of constructing a three-dimensional attitude map based on the corrected attitude estimation value, performing data sequence analysis on the three-dimensional attitude map, extracting key feature parameters in the object attitude change, classifying the key feature parameters to obtain an attitude change pattern, and generating an attitude adjustment instruction based on the attitude change pattern include: constructing a three-dimensional attitude data point set of the target object by using the corrected attitude estimation value, and generating a three-dimensional attitude map based on the three-dimensional attitude data point set by a surface fitting method; performing topological analysis on the three-dimensional attitude map to calculate an attitude stability region, and extracting a feature vector of the attitude stability region, and performing time series clustering on the feature vector according to historical attitude data to obtain an attitude change trend model; wherein, the historical attitude data is the attitude estimation value and adjustment record in the previous N time windows; calculating the deviation degree of the current attitude data in the attitude change trend model, and determining key feature parameters according to the deviation degree, and classifying the key feature parameters by applying a fuzzy inference method to obtain an attitude change pattern; wherein, the current attitude data is the attitude estimation value, acceleration, and azimuth information at the current moment; calculating an attitude adjustment factor through the attitude change pattern, and constraining the attitude adjustment factor by using preset motion constraint conditions of the target object, and generating an attitude adjustment instruction based on the constrained attitude adjustment factor.
[0011] As a preferred solution, the step of constructing a three-dimensional pose data point set of the target object by using the corrected pose estimation value and generating a three-dimensional pose atlas based on the three-dimensional pose data point set through a surface fitting method includes: selecting a reference coordinate system in the three-dimensional space by using the corrected pose estimation value, and performing coordinate transformation on the pose data points of the target object based on the reference coordinate system to obtain a three-dimensional pose data point set and a coordinate transformation matrix; calculating a set of Euclidean distances between pose points based on the three-dimensional pose data point set, constructing a pose distribution matrix based on the set of Euclidean distances, and extracting the principal component information of the pose distribution matrix to obtain a pose principal direction component and a pose local deformation component; performing a principal axis alignment transformation on the three-dimensional pose data point set by using the pose principal direction component to obtain an aligned pose data point set, and performing surface fitting based on the aligned pose data point set to obtain a preliminary pose atlas and a surface residual matrix; calculating a pose residual distribution based on the surface residual matrix, performing statistical analysis on the pose residual distribution to obtain an outlier set, constructing a pose anomaly region distribution map by using the outlier set, calculating a pose change gradient field based on the pose anomaly region distribution map in combination with the pose local deformation component, and generating a pose change gradient distribution by using the pose change gradient field; calculating the pose change amplitude of the target object in different directions through the pose change gradient distribution, performing clustering analysis on the pose change amplitude to obtain corresponding pose stability factors, and adaptively adjusting the preliminary pose atlas by using the pose stability factors to obtain a three-dimensional pose atlas.
[0012] As a preferred solution, the step of performing topological analysis on the three-dimensional pose atlas to calculate the pose stability region, extracting the feature vectors of the pose stability region, and performing time series clustering on the feature vectors according to historical pose data to obtain a pose change trend model includes: analyzing the three-dimensional pose atlas by using a topological data analysis method to identify the regions in the atlas that exhibit small and regular pose changes, obtaining stable regions; calculating the pose angle change rate of the target object at each time point in the stable region, and performing standardization processing on the pose angle change rate to obtain an angle change feature; calculating the acceleration change amplitude of the target object in the stable region to obtain an acceleration change, and extracting an acceleration feature according to the trend of the acceleration change; based on the azimuth angle fluctuation of the target object in the stable region, and calculating the amplitude of the azimuth angle fluctuation to obtain an azimuth angle fluctuation feature; combining the angle change feature, the acceleration feature, and the azimuth angle fluctuation feature to generate a feature vector of the stable region, and applying the K-means clustering algorithm to perform time series clustering analysis on the feature vector based on the historical pose data to obtain a pose change trend model for each clustering category.
[0013] The present application also provides an attitude control system based on a gyroscope, including: a collection module, configured to collect angular velocity data, acceleration data, and azimuth data of a target object in a three-dimensional space, filter the collected angular velocity data to obtain a filtered angular velocity value; a correction module, configured to input the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value, and correct the initial attitude estimation value by using the acceleration data and the azimuth data to obtain a corrected attitude estimation value; a classification module, configured to construct a three-dimensional attitude map based on the corrected attitude estimation value, perform data sequence analysis on the three-dimensional attitude map, extract key feature parameters in the attitude change of the object, classify the key feature parameters to obtain an attitude change pattern, and generate an attitude adjustment instruction based on the attitude change pattern; a generation module, configured to calculate an attitude error for the attitude adjustment instruction to obtain an attitude error value. If the attitude error value does not exceed a preset threshold, an attitude control signal is generated by using the attitude adjustment instruction. If the attitude error value exceeds the preset threshold, the attitude adjustment instruction is corrected, and an attitude control signal is generated based on the corrected attitude adjustment instruction.
[0014] Compared with the prior art, the present application has the following beneficial effects: good real-time performance and strong stability. Through the multi-source fusion processing of angular velocity data, acceleration data, and azimuth data, combined with a dynamic attitude model and a real-time correction algorithm, not only the accuracy and reliability of the attitude estimation value are greatly improved, but also the recognition ability of the attitude change pattern of the target object is enhanced during the construction of the three-dimensional attitude map and the data analysis process. By using the nonlinear least squares method to calculate and correct the attitude error value, the accuracy of the attitude control signal is effectively improved, ensuring the real-time response and stability of the system in a complex dynamic environment, and improving the problem that in a rapidly changing complex environment, noise interference easily leads to inaccurate or delayed attitude adjustment instructions, resulting in poor real-time performance and weak stability of attitude estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] The structures, proportions, sizes, etc. shown in the accompanying drawings of this specification are only used to cooperate with the content disclosed in the specification for those skilled in this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope covered by the technical content disclosed in the present invention.
[0017] Figure 1 is a schematic flowchart of the attitude control method based on a gyroscope provided by an embodiment of the present invention; Figure 2 is a schematic block diagram of the structure of the attitude control system based on a gyroscope provided by an embodiment of the present invention.
[0018] Explanation of reference numerals: 10. Attitude control system based on a gyroscope; 11. Acquisition module; 12. Correction module; 13. Classification module; 14. Generation module. Detailed implementation manners
[0019] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0020] The flowchart shown in the accompanying drawings is only an example illustration, and does not necessarily include all the content and operations / steps, nor does it necessarily need to be executed in the described order. For example, some operations / steps can also be decomposed, combined, or partially merged. Therefore, the actual execution order may change according to the actual situation.
[0021] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0022] It should be further understood that the term " / and" as used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the related listed items, and includes these combinations.
[0023] Next, the technical solutions of the present invention will be further described in conjunction with the accompanying drawings and through specific implementation manners.
[0024] Embodiment 1: As Figure 1 shown, this application provides an attitude control method based on a gyroscope, including steps S100 to S400.
[0025] Step S100: Collect the angular velocity data, acceleration data, and azimuth data of the target object in three-dimensional space, and perform filtering processing on the collected angular velocity data to obtain the filtered angular velocity value.
[0026] In this step, the acquisition device uses high-precision sensors to respectively obtain the angular velocity data, acceleration data, and azimuth data of the target object in three-dimensional space. Specifically, the real-time angular velocity data of the target object is collected through a gyroscope, the linear acceleration data of the target object is obtained through an accelerometer at the same time, and the current azimuth data of the target object is recorded by using an electronic compass. In addition, a low-pass filtering algorithm is applied to the collected angular velocity data to effectively suppress noise interference, so as to obtain a stable and accurate filtered angular velocity value.
[0027] For example, in the attitude control of a certain unmanned aerial vehicle, a gyroscope is used to record the angular velocity change of the unmanned aerial vehicle in real time, the acceleration generated during flight is detected through an accelerometer, and its heading azimuth angle is tracked by using an electronic compass. Finally, the angular velocity data is filtered to enhance the reliability of the data.
[0028] Step S200: Input the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimate value, and use the acceleration data and azimuth data to correct the initial attitude estimate value to obtain the corrected attitude estimate value.
[0029] In this step, the filtered angular velocity value is input into a preset dynamic attitude model. The dynamic attitude model adopts an extended Kalman filtering algorithm based on state estimation, which is used to generate an initial attitude estimate value. Specifically, by updating the state variables of the filtering algorithm in real time, multi-sensor data fusion correction is performed on the initial attitude estimate value by combining the acceleration data and azimuth data, so as to obtain the corrected attitude estimate value.
[0030] For example, in the tilt correction of a handheld device, the dynamic attitude model will comprehensively consider the angular velocity, acceleration, and azimuth data to correct the initial tilt angle of the device, so as to ensure that the corrected attitude estimate value can accurately reflect the current attitude state of the handheld device.
[0031] Step S300: Construct a three-dimensional attitude map based on the corrected attitude estimate value, perform data sequence analysis on the three-dimensional attitude map, extract the key feature parameters in the object attitude change, classify the key feature parameters to obtain the attitude change pattern, and generate an attitude adjustment instruction based on the attitude change pattern.
[0032] In this step, a three-dimensional pose map of the target object is constructed based on the corrected pose estimation values. Specifically, by performing sequential analysis on the calibration data of each pose point of the target object in three-dimensional space, key feature parameters during the object pose change process are extracted, such as rotation angle, speed change rate, and position offset, etc. Then, a clustering algorithm is used to classify and analyze the key feature parameters to generate the object's pose change pattern, and a corresponding pose adjustment instruction is generated based on this change pattern.
[0033] For example, in an autonomous vehicle, key feature parameters (such as turning angle and tilt angle) during turning are extracted from the vehicle's three-dimensional pose map, and their change patterns are classified and analyzed to generate real-time pose adjustment instructions for complex road conditions.
[0034] Step S400: Use the non-linear least squares method to calculate the pose error of the pose adjustment instruction to obtain a pose error value. If the pose error value does not exceed the preset threshold, a pose control signal is generated using the pose adjustment instruction. If the pose error value exceeds the preset threshold, the pose adjustment instruction is corrected, and a pose control signal is generated based on the corrected pose adjustment instruction.
[0035] In this step, the non-linear least squares method is used to calculate the pose error of the pose adjustment instruction to obtain a pose error value. Specifically, by performing non-linear fitting calculation between the theoretical adjustment target and the actual estimated value, the error value during the adjustment process is analyzed. If the pose error value does not exceed the preset tolerance threshold, a corresponding pose control signal is directly generated using the pose adjustment instruction. If the pose error value exceeds the threshold, the pose adjustment instruction is further corrected for error, and a corrected pose control signal is generated through recalculation.
[0036] For example, in the pose adjustment of a robot's walking, by calculating the pose error value between the expected gait and the actual gait, when the error value does not exceed the threshold, a control signal is directly issued; when the error is large, the gait parameters are readjusted for correction to generate a more accurate control signal.
[0037] In this embodiment, angular velocity data, acceleration data, and azimuth data of the target object in a three-dimensional space are collected, and the collected angular velocity data is filtered to obtain a filtered angular velocity value. Then, the filtered angular velocity value is input into a preset dynamic attitude model to generate an initial attitude estimation value, and the initial attitude estimation value is corrected using the acceleration data and azimuth data to obtain a corrected attitude estimation value. Subsequently, a three-dimensional attitude map is constructed based on the corrected attitude estimation value, and data sequence analysis is performed on the three-dimensional attitude map to extract key feature parameters of the object's attitude change and classify the key feature parameters to obtain an attitude change pattern. Finally, an attitude adjustment instruction is generated based on the attitude change pattern, and the attitude error calculation is used to verify whether the attitude error value exceeds a preset threshold, and the attitude adjustment instruction is generated or corrected according to the situation of the error value, thereby generating an attitude control signal to achieve the attitude control of the target object.
[0038] By using the filtered angular velocity value, acceleration data, and azimuth data, combined with a dynamic attitude model and a real-time correction mechanism, the accuracy and reliability of attitude estimation are significantly improved. At the same time, based on the extraction and classification analysis of key feature parameters from the three-dimensional attitude map, the attitude change pattern of the target object can be effectively identified, and accurate attitude adjustment instructions can be generated. In addition, this solution ensures the accuracy of the attitude control signal through attitude error calculation and correction mechanism, and can still maintain the stability and real-time performance of the system in a rapidly changing complex environment, greatly improving the deficiencies of the existing technology in dynamic scenarios.
[0039] Embodiment 2: In step S100, an inertial measurement unit is used to collect angular velocity data of the target object in a three-dimensional space, a triaxial accelerometer is used to collect acceleration data of the target object in a three-dimensional space, and a triaxial magnetometer is used to collect azimuth data of the target object in a three-dimensional space.
[0040] By using the built-in triaxial gyroscope, triaxial accelerometer, and triaxial magnetometer in the inertial measurement unit, angular velocity data, acceleration data, and magnetic field information of the target object in the x, y, and z three orthogonal directions are collected in real time; specifically, the triaxial gyroscope is responsible for detecting the angular velocity change when the object rotates, the triaxial accelerometer captures the linear acceleration of the object in each axis direction, and the triaxial magnetometer converts the collected magnetic field data into a value reflecting the azimuth of the object, and all data is synchronously output under the same time reference.
[0041] Among them, each sensor module is equipped with a high-precision analog-to-digital converter and a low-noise amplification circuit to ensure that the data has sufficient accuracy and real-time performance. For example, in a robot navigation system, an inertial measurement unit can collect and output preliminarily calibrated angular velocity, acceleration, and azimuth data at the millisecond level, enabling the robot to judge its own position and attitude changes in real time.
[0042] Apply the adaptive median filtering algorithm to filter the angular velocity data to obtain the filtered angular velocity value.
[0043] By segmenting the collected original angular velocity data and using the median filtering method to remove abnormal discrete data within each data segment. Specifically, first, the angular velocity data is segmented according to a fixed time window, the median of the data within each window is calculated as the representative value, and the size of the filtering window is dynamically adjusted according to the data fluctuation amplitude. At the same time, prominent pulse noises are replaced to achieve smoothing processing.
[0044] Among them, the adaptive median filtering algorithm retains the true fluctuation characteristics of the data while filtering out instantaneous noises, and the filtering parameters (such as window size and step size) are automatically updated according to the statistical characteristics of the real-time collected data. For example, during the operation of a mobile robot, this method can effectively eliminate the transient noises generated by machine chatter, ensuring that subsequent attitude estimation is based on stable and real angular velocity data.
[0045] In step S200, use the filtered angular velocity value to construct an angular velocity time series, and perform a short-time Fourier transform on the angular velocity time series to obtain the angular velocity frequency spectrum.
[0046] By arranging the filtered angular velocity values in chronological order to form a continuous data sequence, and segmenting this sequence according to a fixed time window, applying the fast Fourier transform algorithm to convert the time-domain data within each time window into frequency-domain information, and then obtaining the complete angular velocity frequency spectrum. Specifically, the amplitude and phase information of each frequency component are calculated within each time window to form a spectrogram reflecting the frequency-domain energy distribution of the angular velocity data.
[0047] Among them, the length and overlap ratio of each time window are determined by the actual application scenario to ensure that the spectral characteristics are fully captured. For example, in vehicle dynamic detection, by setting a shorter time window, the weak vibration frequencies caused by road unevenness can be captured, while a long window is used to identify the overall rotation trend.
[0048] Calculate the main components of the angular velocity frequency spectrum, use the main components to combine with the motion inertia parameters of the target object to construct an attitude change prediction vector, input the attitude change prediction vector into a preset dynamic attitude model, and in the dynamic attitude model, use the Bayesian filtering method to dynamically correct the attitude change prediction vector to obtain a preliminary attitude estimation value.
[0049] By performing principal component analysis on the angular velocity frequency spectrum, frequency components with a cumulative energy proportion reaching a set threshold (such as 80%) are extracted; specifically, after selecting several main frequency components, they are weighted and combined according to the motion inertia parameters of the target object (such as mass, moment of inertia, etc.) to construct a posture change prediction vector that can reflect the dynamic behavior of the object. Subsequently, this prediction vector is input into a preset dynamic posture model, and the prediction result is dynamically corrected through Bayesian filtering to eliminate the influence of external interference on the prediction accuracy.
[0050] Among them, principal component analysis can effectively suppress noise data, and the Bayesian filtering method uses the principle of probability statistics to dynamically correct uncertainties; for example, in an autonomous driving system, by performing principal component extraction and Bayesian filtering correction on vehicle steering data, small changes in vehicle posture can be captured in advance, thereby achieving smooth steering transitions.
[0051] Calculate the posture stability factor of the target object based on acceleration data and azimuth data, and use the posture stability factor to perform weighted correction on the preliminary posture estimation value to obtain the corrected posture estimation value.
[0052] By comparing the acceleration data and azimuth data of the target object at each moment with their respective means, after calculating the degree of deviation, the deviation amount is weighted and normalized using a preset adaptive weight parameter, and then according to the formula: the posture stability factor is calculated, where is the posture stability factor, is the acceleration data at the th time point, is the mean of the acceleration data, is the azimuth data at the th time point, and are the adaptive weight parameters, is the number of time steps in the calculation window.
[0053] By calculating the absolute difference between the acceleration data and azimuth data collected at each time point and their global means respectively, and then multiplying by the preset adaptive weight parameter. Specifically, after accumulating and normalizing the differences within each time window, the stability factor is obtained. In this formula represents the number of time steps in the calculation window.
[0054] Among them, the smaller the value, the more stable the state of the target object during this time period, and and dynamically adjust according to external changes; for example, in a drone stable hovering system, by calculating the value in real time, the stability of the flight state can be determined in a timely manner, so that the control system can automatically correct the attitude deviation.
[0055] Adaptive weight parameter and can be dynamically adjusted based on historical data to better reflect the changes in the actual motion state; for example, in the running scenario of a mobile robot, by this method, the acceleration and azimuth fluctuations caused by terrain undulations can be effectively eliminated, making the corrected attitude estimation value more smooth and accurate.
[0056] In step S300, use the corrected attitude estimation value to construct a three-dimensional attitude data point set of the target object, and generate a three-dimensional attitude atlas based on the three-dimensional attitude data point set through a surface fitting method.
[0057] By projecting the corrected attitude estimation value into three-dimensional space, a discrete attitude data point set is formed; specifically, apply the least squares method to the data point set for polynomial surface fitting to eliminate the random noise between discrete points and construct a continuous three-dimensional attitude atlas.
[0058] For example, in a virtual reality scenario, by generating a three-dimensional attitude atlas of the user's actions in real time through surface fitting, complex motion details can be accurately restored in the game, enhancing the immersion.
[0059] Perform topological analysis on the three-dimensional attitude atlas to calculate the attitude stability region, extract the feature vectors of the attitude stability region, and perform time series clustering on the feature vectors according to historical attitude data to obtain an attitude change trend model; where the historical attitude data is the attitude estimation value and adjustment record within the previous N time windows.
[0060] By performing topological analysis on the three-dimensional attitude atlas, extract the regions with smaller change amplitudes as the attitude stability regions; specifically, use a connectivity detection algorithm and stability criteria to identify these regions, and extract feature vectors such as geometric morphology and motion characteristics from each stability region, and use a time series clustering algorithm to construct an attitude change trend model in combination with historical attitude data.
[0061] For example, in an augmented reality application, by clustering and analyzing the attitude stability regions of different users, the possible change trends of user actions can be predicted, thereby improving the response sensitivity of the system.
[0062] Calculate the deviation degree of the current attitude data in the attitude change trend model, determine the key feature parameters according to the deviation degree, and classify the key feature parameters using the fuzzy inference method to obtain the attitude change pattern; where the current attitude data is the attitude estimation value, acceleration, and azimuth information at the current moment.
[0063] By comparing the attitude estimation value, acceleration data, and azimuth data at the current moment with each cluster center vector in the historical attitude change trend model one by one; specifically, calculate the deviation degree between the current data and each cluster center using the Euclidean distance or Mahalanobis distance, identify the significant change features of the data based on the deviation degree size, summarize the significant features as key feature parameters, and then combine the fuzzy inference method. By setting the membership function and fuzzy rules, dynamically classify the key feature parameters into different attitude change patterns to obtain the current attitude pattern.
[0064] For example, in the monitoring of aircraft flight status, using the fuzzy inference method to analyze the deviation degree between the current aircraft attitude and the historical flight trend model can identify whether the aircraft is currently in a level flight, dive, or climb state, providing an accurate judgment basis for the autopilot system.
[0065] Calculate the attitude adjustment factor through the attitude change pattern, and use the preset motion constraint conditions of the target object to constrain the attitude adjustment factor, and generate an attitude adjustment instruction based on the constrained attitude adjustment factor.
[0066] By constructing an adjustment factor optimization model based on the classified attitude change pattern in combination with the motion constraint conditions of the target object (such as the maximum rotation angle, maximum acceleration, etc.); specifically, using linear programming or nonlinear optimization algorithms, taking the limit conditions of the current motion state of the target object as constraint variables, dynamically optimize and generate the optimal adjustment factor that satisfies the kinematic constraints, and generate specific attitude adjustment instructions according to the adjustment factor to adjust the motion state of the target object in real time.
[0067] For example, in an autonomous vehicle, the system calculates the adjustment factor according to the curvature of the road and the dynamic characteristics of the vehicle, in combination with constraint conditions such as the safe speed limit and turning radius, and generates an accurate direction adjustment instruction to enable the vehicle to pass through the curve smoothly.
[0068] Among them, the steps of constructing a three-dimensional attitude data point set of the target object using the corrected attitude estimation value and generating a three-dimensional attitude map through the surface fitting method based on the three-dimensional attitude data point set include: selecting a reference coordinate system in the three-dimensional space using the corrected attitude estimation value, and performing coordinate transformation on the attitude data points of the target object based on the reference coordinate system to obtain the three-dimensional attitude data point set and the coordinate transformation matrix.
[0069] By mapping the corrected attitude estimation values to a selected three-dimensional reference coordinate system; specifically, defining the reference coordinate axes according to the initial position and orientation of the target object, and performing coordinate transformation on the attitude data points using rotation matrices and translation matrices to generate a normalized set of three-dimensional attitude data points, while calculating and outputting a coordinate transformation matrix to reflect the transformation relationship.
[0070] For example, in satellite attitude trajectory calculation, by converting the trajectory points of the satellite into the Earth-centered reference system, it is possible to more intuitively analyze the changing trends and laws of the trajectory.
[0071] Calculate the set of Euclidean distances between attitude points based on the three-dimensional set of attitude data points, construct an attitude distribution matrix based on the set of Euclidean distances, and extract the principal component information of the attitude distribution matrix to obtain the attitude principal direction component and the attitude local deformation component.
[0072] Calculate the Euclidean distance pairwise for the three-dimensional attitude data points and summarize the results into a symmetric matrix; specifically, apply the principal component analysis method based on this matrix to extract the principal component information of the distribution matrix, and decompose it into the attitude principal direction component and the local deformation component. The principal direction reflects the overall motion trend, and the deformation component reveals the characteristics of the detailed changes in the attitude.
[0073] For example, in the multi-axis collaborative operation of industrial robots, the global path of the robotic arm can be optimized based on the principal direction component, while the grasping accuracy can be improved by using the local deformation component.
[0074] Use the attitude principal direction component to perform a principal axis alignment transformation on the three-dimensional set of attitude data points to obtain an aligned set of attitude data points, and perform surface fitting based on the aligned set of attitude data points to obtain a preliminary attitude atlas and a surface residual matrix.
[0075] By defining the principal direction component as the new principal axis direction, realign the coordinate system of the set of attitude data points; specifically, apply the least squares method based on the aligned set of points to perform surface fitting to generate a preliminary attitude atlas, and calculate the residuals for the deviation between the actual data points and the fitted surface to construct a surface residual matrix to reflect the fitting quality.
[0076] For example, in medical imaging equipment, by performing principal axis alignment and surface fitting on the point cloud data of the tissue surface, the three-dimensional structure of the tissue can be reconstructed to assist doctors in diagnosis and surgical planning.
[0077] Calculate the attitude residual distribution based on the surface residual matrix, perform statistical analysis on the attitude residual distribution to obtain a set of outlier points, use the set of outlier points to construct an attitude anomaly region distribution map, and combine the attitude local deformation component based on the attitude anomaly region distribution map to calculate the attitude change gradient field, and generate an attitude change gradient distribution using the attitude change gradient field.
[0078] By statistically analyzing the surface residual matrix, extract the outlier points beyond the set range in the distribution and aggregate them into an outlier set; specifically, use the outlier set to construct a distribution map of the posture anomaly region, further combine with the local deformation components of the posture, calculate the gradient field of the posture change, and perform spatial interpolation on the gradient intensity in the gradient field to generate the gradient distribution of the posture change of the target object.
[0079] For example, in the fault diagnosis of unmanned aerial vehicles, by identifying the anomaly region and the gradient change distribution, the key factors causing the abnormal flight posture can be quickly located, providing a reference for subsequent fault investigation and repair.
[0080] Calculate the amplitude of the posture change of the target object in different directions through the gradient distribution of the posture change, and perform clustering analysis on the amplitude of the posture change to obtain the corresponding posture stability factor. Use the posture stability factor to adaptively adjust the preliminary posture map to obtain the three-dimensional posture map.
[0081] By analyzing the gradient distribution of the posture change, project the gradient distribution onto multiple spatial directions of the target object, and calculate the amplitude of the posture change in different directions; specifically, perform integral calculation on the gradient values in each direction to obtain the corresponding set of amplitude of the posture change. Classify the amplitudes in the set using a clustering analysis method (such as the K-means clustering algorithm), identify the groups representing different stability levels, and define the posture stability factor for each group. Adjust the preliminary posture map according to the posture stability factor, and perform adaptive correction on the posture change within the region to obtain the final three-dimensional posture map.
[0082] For example, in the motion analysis of humanoid robots, calculate the amplitude of the posture change in each joint direction through the gradient distribution, and use the stability factor to adjust the motion map, effectively optimizing the motion smoothness and stability of the robot.
[0083] Among them, the steps of performing topological analysis on the three-dimensional posture map to calculate the posture stability region and extracting the feature vector of the posture stability region, and performing time series clustering on the feature vector according to the historical posture data to obtain the posture change trend model include: analyzing the three-dimensional posture map through the topological data analysis method, and identifying the regions in the map that show small and regular posture changes to obtain the stable regions.
[0084] By adopting the topological data analysis method, divide the three-dimensional posture map into multiple regions, and identify the regions with small and regular posture changes according to the change frequency and stability parameters of the data points within the regions, and label them as stable regions; specifically, use the connectivity detection algorithm and the stability scoring mechanism to automatically screen the regions that meet the conditions and accurately calibrate the region boundaries.
[0085] For example, in a motion capture device, the identification of the stable region helps to exclude false fluctuations caused by sensor jitter and improve the capture accuracy of the user's true motion trajectory.
[0086] Calculate the rate of change of the attitude angle of the target object at each time point within the stable region, and perform normalization processing on the rate of change of the attitude angle to obtain the angle change feature.
[0087] By performing time difference calculation on the change of the attitude angle within the stable region of the target object, the rate of change of the angle at each time point is obtained; specifically, the difference formula is used to calculate the attitude angles at consecutive sampling moments, and then all rate data is normalized to eliminate the influence caused by the difference in angle amplitudes, and finally a set of standardized angle change features is formed.
[0088] For example, in an unmanned aerial vehicle stable hovering system, by analyzing the rate of change of the angle, the stability of the hovering state can be evaluated in real time, providing an important reference for adjusting the flight attitude.
[0089] Calculate the amplitude of the acceleration change of the target object within the stable region to obtain the acceleration change, and extract the acceleration feature according to the trend of the acceleration change.
[0090] By calculating the absolute change of the acceleration data of the target object within the stable region over time, the amplitude of the acceleration change is obtained; specifically, after smoothing the acceleration data using the moving average method, the local change trend in its time series is calculated, and the characteristic component representing the main acceleration change is extracted.
[0091] For example, in an automotive power transmission system, by analyzing the amplitude of the acceleration change, the smoothness of the vehicle during acceleration or deceleration can be effectively identified, providing data support for optimizing engine control.
[0092] Based on the azimuth angle fluctuation of the target object within the stable region, and calculating the amplitude of the azimuth angle fluctuation, the fluctuation feature of the azimuth angle is obtained.
[0093] By calculating the amplitude of the fluctuation of the azimuth angle data within the stable region, its periodicity over time is analyzed; specifically, the fast Fourier transform is used to perform frequency domain analysis on the azimuth angle fluctuation signal, extract the main frequency and the corresponding amplitude, and use the amplitude value as the basic parameter of the fluctuation feature.
[0094] For example, in aircraft navigation, the azimuth angle fluctuation feature can help identify the course deviation caused by external disturbances and provide accurate data for navigation correction.
[0095] Combine the angular change feature, acceleration feature, and the fluctuation feature of the azimuth angle to generate the feature vector of the stable region. Apply the K-means clustering algorithm to perform time series clustering analysis on the feature vector based on historical attitude data, and obtain the attitude change trend model of each clustering category.
[0096] By combining the angular change feature, acceleration feature, and azimuth angle fluctuation feature into a high-dimensional feature vector, input all the feature vectors into the K-means clustering algorithm for grouping analysis; specifically, according to the central vector of each clustering category, construct the corresponding attitude change trend model in combination with the time series analysis method, and the model can describe the typical attitude change patterns of the target object at different time periods.
[0097] For example, in an intelligent wearable device, by analyzing the clustering results of historical motion data, the common motion patterns of users can be predicted, providing a basis for optimizing the action feedback design of the device.
[0098] In this embodiment, by using an inertial measurement unit to collect the angular velocity data, acceleration data, and azimuth angle data of the target object in three-dimensional space, and applying an adaptive median filtering algorithm to filter the angular velocity data to generate accurate filtered angular velocity values, laying a foundation for subsequent analysis. By constructing an angular velocity time series and performing a short-time Fourier transform, extract the main components in the frequency spectrum, and generate an attitude change prediction vector in combination with the motion inertia parameters of the target object. Use the Bayesian filtering method to dynamically correct the prediction vector, and calculate the attitude stability factor through the acceleration data and azimuth angle data to perform weighted correction on the preliminary attitude estimation value to obtain the corrected attitude estimation value. Based on the corrected attitude estimation value, use the reference coordinate system to generate the three-dimensional attitude data point set of the target object, use the least squares method and surface fitting method to generate the three-dimensional attitude map, and identify the attitude stable region through topological analysis. Combine the attitude gradient field and distribution matrix to extract key feature parameters, and use fuzzy inference and time series clustering to construct the attitude change trend model. Through the calculation of the attitude adjustment factor, optimize the matching between the attitude change pattern and the motion constraint conditions of the target object, generate accurate attitude adjustment instructions, and use the Kalman filtering method to dynamically correct the adjustment instructions when the error exceeds the threshold. This solution realizes the entire process from data acquisition to multi-dimensional attitude analysis and adjustment, significantly improving the attitude control accuracy and stability in complex dynamic environments.
[0099] Embodiment 3: As Figure 2 shown, the present application also provides an attitude control system 10 based on a gyroscope, including an acquisition module 11, a calibration module 12, a classification module 13, and a generation module 14.
[0100] The acquisition module 11 is mainly used to acquire the angular velocity data, acceleration data, and azimuth data of the target object in the three-dimensional space, filter the acquired angular velocity data, and obtain the filtered angular velocity value.
[0101] The calibration module 12 is mainly used to input the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value, and use the acceleration data and azimuth data to correct the initial attitude estimation value to obtain the corrected attitude estimation value.
[0102] The classification module 13 is mainly used to construct a three-dimensional attitude map based on the corrected attitude estimation value, perform data sequence analysis on the three-dimensional attitude map, extract the key feature parameters in the object attitude change, classify the key feature parameters to obtain the attitude change pattern, and generate an attitude adjustment instruction based on the attitude change pattern.
[0103] The generation module 14 is mainly used to calculate the attitude error of the attitude adjustment instruction to obtain the attitude error value. If the attitude error value does not exceed the preset threshold, the attitude control signal is generated using the attitude adjustment instruction. If the attitude error value exceeds the preset threshold, the attitude adjustment instruction is corrected, and the attitude control signal is generated based on the corrected attitude adjustment instruction.
[0104] In this embodiment, by using the acquisition module 11 to integrate the multi-sensor data in the three-dimensional space in real time and using the adaptive median filtering algorithm to ensure the data accuracy, the calibration module 12 inputs the filtered angular velocity data into the dynamic attitude model and performs precise calibration in combination with the acceleration data and azimuth data. The classification module 13 further constructs a three-dimensional attitude map and uses topology and clustering analysis to extract the key features of the motion. Finally, the generation module 14 corrects the attitude adjustment instruction in real time through error calculation and dynamic compensation mechanism to generate an accurate attitude control signal. The overall system realizes the full-link efficient processing from data acquisition, preprocessing, dynamic calibration to feature classification and generation of control instructions, greatly improving the capture accuracy of the motion state of the target object and the control response speed, and ensuring the high robustness and stability of the system in a complex dynamic environment.
[0105] It should be noted that those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described system and each module can refer to the corresponding processes in the foregoing Embodiment 1, and will not be elaborated herein.
[0106] The structures, proportions, sizes, etc. depicted in the accompanying drawings of this specification are only used to cooperate with the content disclosed in the specification for those skilled in this technology to understand and read, and are not used to limit the qualified conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope that can be covered by the technical content disclosed in the present invention.
[0107] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A gyroscope-based attitude control method, characterized in that, Including: Collect the angular velocity data, acceleration data, and azimuth angle data of the target object in three-dimensional space, filter the collected angular velocity data to obtain the filtered angular velocity value; Input the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value, and use the acceleration data and azimuth angle data to correct the initial attitude estimation value to obtain the corrected attitude estimation value; Construct a three-dimensional attitude map based on the corrected attitude estimation value, perform data sequence analysis on the three-dimensional attitude map, extract the key feature parameters in the object attitude change, classify the key feature parameters to obtain the attitude change pattern, and generate an attitude adjustment instruction based on the attitude change pattern; Calculate the attitude error of the attitude adjustment instruction to obtain the attitude error value. If the attitude error value does not exceed the preset threshold, generate an attitude control signal using the attitude adjustment instruction. If the attitude error value exceeds the preset threshold, correct the attitude adjustment instruction and generate an attitude control signal based on the corrected attitude adjustment instruction.
2. The attitude control method based on a gyroscope according to claim 1, characterized in that The step of collecting the angular velocity data, acceleration data, and azimuth angle data of the target object in three-dimensional space and filtering the collected angular velocity data to obtain the filtered angular velocity value includes: Use an inertial measurement unit to collect the angular velocity data of the target object in three-dimensional space, use a three-axis accelerometer to collect the acceleration data of the target object in three-dimensional space, and use a three-axis magnetometer to collect the azimuth angle data of the target object in three-dimensional space; Apply an adaptive median filtering algorithm to filter the angular velocity data to obtain the filtered angular velocity value.
3. The attitude control method based on a gyroscope according to claim 1, wherein The step of inputting the filtered angular velocity value into a preset dynamic attitude model to generate an initial attitude estimation value and using the acceleration data and azimuth angle data to correct the initial attitude estimation value to obtain the corrected attitude estimation value includes: Use the filtered angular velocity value to construct an angular velocity time series, perform a short-time Fourier transform on the angular velocity time series to obtain the angular velocity frequency spectrum; Calculate the main components of the angular velocity frequency spectrum, use the main components combined with the motion inertia parameters of the target object to construct an attitude change prediction vector, input the attitude change prediction vector into a preset dynamic attitude model, and use the Bayesian filtering method to dynamically correct the attitude change prediction vector in the dynamic attitude model to obtain a preliminary attitude estimation value; Calculate the attitude stability factor of the target object based on the acceleration data and the azimuth angle data, and use the attitude stability factor to perform weighted correction on the preliminary attitude estimation value to obtain the corrected attitude estimation value.
4. The attitude control method based on a gyroscope according to claim 3, wherein The calculation formula for calculating the attitude stability factor of the target object based on the acceleration data and the azimuth angle data is as follows: wherein, is the attitude stability factor, is the acceleration data at the -th time point, is the mean value of the acceleration data, is the azimuth data at the -th time point, is the mean value of the azimuth data, and are adaptive weight parameters, is the number of time steps of the calculation window.
5. The attitude control method based on a gyroscope according to claim 1, characterized in that The step of constructing a three-dimensional attitude map based on the corrected attitude estimation value, performing data sequence analysis on the three-dimensional attitude map, extracting the key feature parameters in the object attitude change, classifying the key feature parameters to obtain the attitude change pattern, and generating an attitude adjustment instruction based on the attitude change pattern includes: Construct a three-dimensional pose data point set of the target object using the corrected pose estimation value, and generate a three-dimensional pose atlas based on the three-dimensional pose data point set through a surface fitting method; Perform topological analysis on the three-dimensional pose atlas to calculate the pose stability region, extract the feature vectors of the pose stability region, and perform time series clustering on the feature vectors according to historical pose data to obtain a pose change trend model; wherein, the historical pose data is the pose estimation value and adjustment record within the previous N time windows; Calculate the deviation degree of the current pose data in the pose change trend model, determine the key feature parameters according to the deviation degree, and classify the key feature parameters using a fuzzy inference method to obtain a pose change pattern; wherein, the current pose data is the pose estimation value, acceleration, and azimuth information at the current moment; Calculate a pose adjustment factor through the pose change pattern, and use the preset motion constraint conditions of the target object to constrain the pose adjustment factor, and generate a pose adjustment instruction based on the constrained pose adjustment factor.
6. The gyroscope-based attitude control method according to claim 5, wherein The steps of constructing a three-dimensional pose data point set of the target object using the corrected pose estimation value and generating a three-dimensional pose atlas based on the three-dimensional pose data point set through a surface fitting method include: Select a reference coordinate system in three-dimensional space using the corrected pose estimation value, and perform coordinate transformation on the pose data points of the target object based on the reference coordinate system to obtain a three-dimensional pose data point set and a coordinate transformation matrix; Calculate the Euclidean distance set between pose points based on the three-dimensional pose data point set, construct a pose distribution matrix based on the Euclidean distance set, and extract the principal component information of the pose distribution matrix to obtain the pose principal direction component and the pose local deformation component; Perform a principal axis alignment transformation on the three-dimensional pose data point set using the pose principal direction component to obtain an aligned pose data point set, and perform surface fitting based on the aligned pose data point set to obtain a preliminary pose atlas and a surface residual matrix; Calculate the pose residual distribution based on the surface residual matrix, perform statistical analysis on the pose residual distribution to obtain an outlier set, construct a pose anomaly region distribution map using the outlier set, calculate a pose change gradient field based on the pose anomaly region distribution map in combination with the pose local deformation component, and generate a pose change gradient distribution using the pose change gradient field; Calculate the pose change amplitude of the target object in different directions through the pose change gradient distribution, perform clustering analysis on the pose change amplitude to obtain corresponding pose stability factor, and perform adaptive adjustment on the preliminary pose atlas using the pose stability factor to obtain a three-dimensional pose atlas.
7. The gyroscope-based attitude control method according to claim 5, characterized in that The steps of performing topological analysis on the three-dimensional pose atlas to calculate the pose stability region, extracting the feature vectors of the pose stability region, and performing time series clustering on the feature vectors according to historical pose data to obtain a pose change trend model include: Analyze the three-dimensional pose atlas through topological data analysis methods, identify the regions in the atlas that exhibit small and regular pose changes, and obtain stable regions; Calculate the pose angle change rate of the target object at each time point within the stable region, and perform normalization processing on the pose angle change rate to obtain the angle change feature; Calculate the acceleration change amplitude of the target object within the stable region to obtain the acceleration change, and extract the acceleration feature according to the trend of the acceleration change; Based on the azimuth angle fluctuation of the target object within the stable region, and calculate the amplitude of the azimuth angle fluctuation to obtain the fluctuation feature of the azimuth angle; Combine the angle change feature, acceleration feature, and azimuth angle fluctuation feature to generate a feature vector for the stable region, and apply the K-means clustering algorithm to perform time series clustering analysis on the feature vector based on the historical pose data to obtain the pose change trend model for each clustering category.
8. An attitude control system based on a gyroscope, characterized in that, Include: A collection module for collecting angular velocity data, acceleration data, and azimuth angle data of the target object in three-dimensional space, and performing filtering processing on the collected angular velocity data to obtain the filtered angular velocity value; A correction module for inputting the filtered angular velocity value into a preset dynamic pose model to generate an initial pose estimate value, and using the acceleration data and azimuth angle data to correct the initial pose estimate value to obtain the corrected pose estimate value; A classification module for constructing a three-dimensional pose atlas based on the corrected pose estimate value, performing data sequence analysis on the three-dimensional pose atlas, extracting key feature parameters in the object pose change, classifying the key feature parameters to obtain the pose change pattern, and generating a pose adjustment instruction based on the pose change pattern; A generation module for calculating the pose error of the pose adjustment instruction to obtain a pose error value. If the pose error value does not exceed the preset threshold, use the pose adjustment instruction to generate a pose control signal. If the pose error value exceeds the preset threshold, correct the pose adjustment instruction and generate a pose control signal based on the corrected pose adjustment instruction.
Citation Information
Cited By
AR intelligent glasses control method and system and AR intelligent glasses
CN120909434A
Robot aerial attitude real-time correction method based on visual prediction
CN121325936A