Showing posts with label digital compass. Show all posts
Showing posts with label digital compass. Show all posts

Wednesday, July 17, 2024

What is a digital output - Full attitude 3D electronic Compass

 


more detail:https://www.ericcointernational.com/.../three-dimensional...

The ER-EC-360A is a high precision full attitude 3D electronic compass that uses hard and soft iron calibration algorithms to provide high precision course information in 360° roll and +/-90° full dip range. It has the characteristics of small volume and low power consumption and is more suitable for the measurement system with power consumption and volume sensitivity.
The precise attitude of the product output carrier can be used in the system of full attitude rotation. This product has hard magnetic, soft magnetic and tilt compensation, compass output after calibration of high precision measurement. The patented triaxial fluxgate, which uses the CPU to calculate the course in real time and the triaxial accelerometer to compensate for the course angle, provides accurate course data even in extremely harsh environments. With the characteristics of small size and low power consumption, it is widely used in many fields such as petroleum logging, antenna pointing, vehicle navigation, attitude system and so on.

Tuesday, March 5, 2024

Soft Magnetic Error Compensation Method of Electronic Compass

 

1. Analysis of soft magnetic error of electronic compass

There is another ferromagnetic substance in the working environment of the electronic compass sensor, which, unlike hard ferromagnetic materials, is easily magnetized in a weak magnetic field. When the external magnetic field changes, its induced magnetism will also undergo a related change. The size and direction of the induced magnetic field will also change with the attitude and position of the carrier.
Because of its special properties, this material is called soft iron material. This soft iron material magnetizes itself due to the size of the external magnetic field it receives to produce a magnetic field that resists changes in magnetic flux, which can vary over a wide range. If the magnetic field in the space where the electronic compass sensor is located is known, the magnetic field actually measured by the electronic compass sensor is equal to the superposition of the geomagnetic field and the magnetic field generated by the soft iron interference. The soft iron error is equivalent to a time-varying error superimposed on the output of the electronic compass sensor. Because of the different properties of soft magnetic interference error and hard magnetic interference error, the least square method is no longer applicable when compensating soft magnetic interference error. Soft magnetic interference will lead to the deviation of the measurement Angle of the electronic compass. In an ideal environment, the Angle rotated by the measurement of the electronic compass is controllable, but the existence of soft magnetic interference error will lead to the deviation and uncontrollable Angle of the measurement process of the electronic compass. In the application of navigation system, a small Angle difference will lead to a large route error. The modern electronic compass has strong anti-interference and can suppress most of the Angle deviation, but the compensation of soft magnetic error is still worth studying and discussing.

2. Soft magnetic interference error compensation method
In the actual use of electronic compass, the noise errors caused by soft magnetic interference are mostly random noise errors. At present, there are many algorithms that can be used to compensate random noise and most of them are relatively mature, but considering the characteristics of electronic compass requiring real-time and rapid processing of large amounts of data. Three very mature random noise compensation algorithms, namely Kalman filter, improved Sage adaptive Kalman filter and particle filter, are selected as soft magnetic interference compensation algorithms. These three algorithms are easy to implement and can handle dense data.

2.1 Kalman filter
Kalman filtering algorithm can estimate the linear system with Gaussian white noise, which is the most widely used filtering method at present, and has been well applied in the fields of communication, navigation, guidance and control. The basic idea is that the minimum mean square error criterion is the best estimation criterion, and the future state quantity of the system is estimated by recursion theory, so that the estimated value is as close as possible to the real value.

2.2 Adaptive Kalman filtering
Traditional Kalman filter requires that the mean of dynamic noise and observed noise of the system be zero, and the statistical characteristics are known white noise, but these conditions may not be satisfied in practice, so there are modeling errors. Due to the limitation of objective conditions such as computing tools, the filtering algorithm is easy to produce error accumulation when running on the computer. This results in the loss of positivity or symmetry of error covariance matrix and the instability of numerical calculation.

2.3 Particle filter algorithm
The particle filter algorithm originated from the research of Poor Man's Monte Carlo problem in the 1950s, but the first applied particle filter algorithm was proposed by Gordon et al in 1993. The particle filter is based on the Monte Carlo method, which uses sets of particles to represent probabilities and can be used for any form of state-space model. Particle filter can accurately express the posterior probability distribution based on the observed and controlled quantities, and is a sequential important sampling method. Bayesian inference and importance sampling are the basis of understanding particle filtering.

3.Allan variance simulation experiment
The Allan analysis of variance is used to simulate the original data of random sequence, the data compensated by Kalman filter algorithm, the data compensated by particle filter algorithm, and the four groups of data compensated by adaptive Kalman filter algorithm. Verify the feasibility of Allan variance analysis algorithm. The Allan standard deviation curve of each data is drawn according to the analysis results. The Allan standard deviation curves of the four groups of data are shown in FIG. 14-17 respectively.

Fig 14 Allen variance curve of raw data

The compensated Allen variance curve

4. Summary
From FIG. 14 to FIG. 17, it can be seen that the Allan variance program of the paper can effectively analyze the experimental data.
Several sets of experimental data show that the program is effective.

Different algorithm compensation results

After analyzing the data before and after compensation, it can be seen that the quantization noise and zero bias instability noise of the data after compensation by Kalman filter algorithm are reduced by 64% and 66.4% respectively. The quantization noise and zero bias instability noise of the compensated particle filter data are reduced by 70% and 72.1% respectively. The quantization noise and zero bias instability noise of the data compensated by adaptive Kalman filter are reduced by 91.5% and 75.7% respectively. All the algorithms we mentioned can have a better compensation effect for the original data noise.
It can be seen from the compensation effect that compared with traditional Kalman filter and particle filter, adaptive Kalman filter can better remove the noise in the original data, and filter the noise of ER-EC-385ER-EC-365B and other types of electronic compass. The random data in the simulation experiment is based on the simulation of the noise caused by soft magnetic interference. The simulation results show that the filtering algorithm can compensate the noise of soft magnetic interference. 

Thursday, February 22, 2024

Soft Magnetic Error Compensation Method of Electronic Compass

 


1. Analysis of soft magnetic error of electronic compass

There is another ferromagnetic substance in the working environment of the electronic compass sensor, which, unlike hard ferromagnetic materials, is easily magnetized in a weak magnetic field. When the external magnetic field changes, its induced magnetism will also undergo a related change. The size and direction of the induced magnetic field will also change with the attitude and position of the carrier.
Because of its special properties, this material is called soft iron material. This soft iron material magnetizes itself due to the size of the external magnetic field it receives to produce a magnetic field that resists changes in magnetic flux, which can vary over a wide range. If the magnetic field in the space where the electronic compass sensor is located is known, the magnetic field actually measured by the electronic compass sensor is equal to the superposition of the geomagnetic field and the magnetic field generated by the soft iron interference. The soft iron error is equivalent to a time-varying error superimposed on the output of the electronic compass sensor. Because of the different properties of soft magnetic interference error and hard magnetic interference error, the least square method is no longer applicable when compensating soft magnetic interference error. Soft magnetic interference will lead to the deviation of the measurement Angle of the electronic compass. In an ideal environment, the Angle rotated by the measurement of the electronic compass is controllable, but the existence of soft magnetic interference error will lead to the deviation and uncontrollable Angle of the measurement process of the electronic compass. In the application of navigation system, a small Angle difference will lead to a large route error. The modern electronic compass has strong anti-interference and can suppress most of the Angle deviation, but the compensation of soft magnetic error is still worth studying and discussing.

2. Soft magnetic interference error compensation method
In the actual use of electronic compass, the noise errors caused by soft magnetic interference are mostly random noise errors. At present, there are many algorithms that can be used to compensate random noise and most of them are relatively mature, but considering the characteristics of electronic compass requiring real-time and rapid processing of large amounts of data. Three very mature random noise compensation algorithms, namely Kalman filter, improved Sage adaptive Kalman filter and particle filter, are selected as soft magnetic interference compensation algorithms. These three algorithms are easy to implement and can handle dense data.

2.1 Kalman filter
Kalman filtering algorithm can estimate the linear system with Gaussian white noise, which is the most widely used filtering method at present, and has been well applied in the fields of communication, navigation, guidance and control. The basic idea is that the minimum mean square error criterion is the best estimation criterion, and the future state quantity of the system is estimated by recursion theory, so that the estimated value is as close as possible to the real value.

2.2 Adaptive Kalman filtering
Traditional Kalman filter requires that the mean of dynamic noise and observed noise of the system be zero, and the statistical characteristics are known white noise, but these conditions may not be satisfied in practice, so there are modeling errors. Due to the limitation of objective conditions such as computing tools, the filtering algorithm is easy to produce error accumulation when running on the computer. This results in the loss of positivity or symmetry of error covariance matrix and the instability of numerical calculation.

2.3 Particle filter algorithm
The particle filter algorithm originated from the research of Poor Man's Monte Carlo problem in the 1950s, but the first applied particle filter algorithm was proposed by Gordon et al in 1993. The particle filter is based on the Monte Carlo method, which uses sets of particles to represent probabilities and can be used for any form of state-space model. Particle filter can accurately express the posterior probability distribution based on the observed and controlled quantities, and is a sequential important sampling method. Bayesian inference and importance sampling are the basis of understanding particle filtering.

3. Allan variance simulation experiment 
The Allan analysis of variance is used to simulate the original data of random sequence, the data compensated by Kalman filter algorithm, the data compensated by particle filter algorithm, and the four groups of data compensated by adaptive Kalman filter algorithm. Verify the feasibility of Allan variance analysis algorithm. The Allan standard deviation curve of each data is drawn according to the analysis results. The Allan standard deviation curves of the four groups of data are shown in FIG. 14-17 respectively.

Fig 14 Allen variance curve of raw data

The compensated Allen variance curve

4 Summary
From FIG. 14 to FIG. 17, it can be seen that the Allan variance program of the paper can effectively analyze the experimental data.
Several sets of experimental data show that the program is effective.

Different algorithm compensation results

After analyzing the data before and after compensation, it can be seen that the quantization noise and zero bias instability noise of the data after compensation by Kalman filter algorithm are reduced by 64% and 66.4% respectively. The quantization noise and zero bias instability noise of the compensated particle filter data are reduced by 70% and 72.1% respectively. The quantization noise and zero bias instability noise of the data compensated by adaptive Kalman filter are reduced by 91.5% and 75.7% respectively. All the algorithms we mentioned can have a better compensation effect for the original data noise.
It can be seen from the compensation effect that compared with traditional Kalman filter and particle filter, adaptive Kalman filter can better remove the noise in the original data, and filter the noise of ER-EC-385ER-EC-365B and other types of electronic compass. The random data in the simulation experiment is based on the simulation of the noise caused by soft magnetic interference. The simulation results show that the filtering algorithm can compensate the noise of soft magnetic interference.  

Sunday, February 18, 2024

Electronic Compass Hard Magnetic Error Compensation

 


1. Electronic compass error classification

Electronic compass plays an important role in the navigation application of modern society, because electronic compass is based on the particularity of geomagnetic navigation, digital compass is prone to geomagnetic interference and magnetic material interference in actual use, resulting in measurement errors, according to the source of magnetic interference, can be divided into hard magnetic interference error and soft magnetic interference error. Among them, the hard magnetic interference will cause the zero deviation of the compass measurement value, which will lead to the inaccurate positioning of GPS in the navigation system. It will cause immeasurable impact on activities such as maritime navigation positioning and disaster rescue positioning. Moreover, compensation of hard magnetic interference error is a prerequisite for compensation of soft magnetic interference error. Therefore, before compensation of soft magnetic interference for electronic compass, it is necessary to ensure that the hard magnetic interference error has been compensated, so as to achieve a complete digital compass error compensation process.

2. Hard magnetic error analysis
In the actual working environment of electronic compass sensors, there are inevitably ferromagnetic materials, and one of these ferromagnetic materials is called hard magnetic materials. Because the hard magnetic material has the characteristics of high coercivity, it will be magnetized only in the external magnetic field with sufficient magnetic field strength. Although it is not easy to magnetize hard magnetic materials, the remanent magnetism after it is magnetized will be retained for a long time and is not easy to remove. The magnitude and direction of the magnetic field vector of hard iron in the carrier fixed coordinate system are fixed, and do not change with the course and position of the carrier.

Therefore, the error caused by hard magnetic interference is constant in the short term, which can be considered as a constant additional error output during calibration. At the same time, hard magnetic interference can be used to characterize all time-invariant perturbations of digital compass sensors without losing generality. In the actual measurement and use, the hard magnetic interference will cause the measurement value of the electronic compass to appear obvious deviation, that is, zero drift. In the ideal case of no hard magnetic interference, the electronic compass in the static state, rotating measurement one week, can draw a circle with the center at zero. The hard magnetic error causes the center of the circle to shift, which is called zero drift. Because of the particularity of the hard magnetic error, it can not be avoided and processed by simple physical means, but can only compensate the data collected by the compass to remove the hard magnetic interference error.

3. Hard magnetic interference error compensation method
3.1 Least square method
Generally, the constant error of the sensor is relatively stable, and the corresponding parameters can be obtained by calibration method, and the parameters are introduced into the error calibration equation. To eliminate the constant error of the sensor. Therefore, the error compensation method based on least square method can be adopted. As a kind of mathematical optimization technique, least square method can obtain the best matching function of the optimized object by minimizing the square of the error. Using least squares method can make it easier to obtain unknown data and minimize the sum of squares of error between the obtained data and the actual data. Least squares can also be used for curve fitting. The least square method is the most widely used method in system identification, which can be applied not only to dynamic systems, but also to static systems. It can be used to estimate linear and nonlinear systems as well as offline systems, and the online estimation of systems often uses least square method. In the random environment, when the least square method is used, the observation data does not need to provide its probability and statistics information, but the estimated results have quite good statistical characteristics. The least square method is easy to understand and master, and the recognition algorithm developed based on the least square principle is relatively simple to implement. When other parameter identification methods encounter difficulties, least square method can provide corresponding solutions. The most likely value of unknown model parameters is at the minimum of the sum of repeated error squares between the actual observed value and the calculated value, and the obtained model output can be closest to the output of the actual system, which is the principle of least square.

3.2 Algorithm simulation experiment
The Matlab editor produces a set of standard circle tracks whose center is not at the zero point of the coordinates. The center of the first standard circle is located at the coordinates (2,5) with a radius of 5, as shown in Figure 2. The center of the second standard circle is located at coordinates (114, -304), and the radius is also 5, as shown in Figure 3. It is assumed that the two standard circular trajectories are the actual trajectories measured by the digital compass under hard magnetic interference. Simulation experiments are carried out with the data to verify the feasibility of the algorithm.

Fig.2 Before removing the zero offsetFig.3 Before removing the zero offset

The experimental results are shown in FIG. 4 and 5 respectively. After zero deviation compensation, the zero drift of the standard circle is effectively compensated, and the center coordinates of the circle are located at (0,0) after compensation, and the trajectory does not deform. Moreover, good improvement is achieved in both large and small drifts. The simulation results show that the algorithm based on least square method is feasible.

Fig.4,5 After removing the zero offset

4 Summary
We analyze the source of the hard magnetic error of the electronic compass, select the least square method as the error compensation method according to the error properties, and carry out the program design and simulation experiment based on the least square algorithm to verify the feasibility of the algorithm program. The feasibility and correctness of the algorithm in theory are verified, which lays a foundation for the actual measurement experiment. Ericco's E-compass products such as ER-EC-360AER-EC-365A and ER-EC-385CAN have hard magnetic, soft magnetic and inclination compensation functions, so we can use the least square method to compensate its hard magnetic interference error, so that the zero drift can be effectively compensated. 

Monday, March 14, 2022

How does Inertial Positioning Solve the Problem of Gyroscope Drift and Magnetic Field Interference?

In order to solve the problems of integral error and magnetic field interference of gyroscope and electronic compass in attitude calculation of navigation system, a fusion algorithm of Kalman filter and complementary filter was proposed. First, the electronic compass and gyroscope are obtained through the Kalman filter to obtain the optimally estimated quaternion. Then, the complementary filtering algorithm is used to compensate for the drift of the gyroscope to obtain the corrected quaternion. Then, the obtained quaternion and Kalman filters are used to obtain the optimally estimated quaternion, and the second optimal estimation of the quaternion is conducted through the Kalman filter. Then output attitude Angle. The results of the proposed algorithm, the complementary filtering algorithm, and the non-filtering algorithm are compared in the experiment. Experiments show that the algorithm can not only effectively solve the divergence of azimuth error, but also effectively solve the magnetic field interference, and achieve high precision azimuth output.

For more info Ericco Gyro Sensor.

With the development of miniaturized inertial devices represented by MEMS (Micro-Electromechanical Systems) sensors, the inertial positioning technology based on strapdown inertial navigation principle and MEMS sensors is increasingly paid attention to. Especially in indoor, underground, mine, underwater, battlefield, and other occasions where satellite signals are difficult to receive [1].In view of the above problems, the electronic compass is often used to correct the gyro. In the indoor, underground, mine, underwater, and other processes, the magnetometer is more prone to interference, resulting in greater deviation of orientation. To solve the problems of magnetometer vulnerable to interference and gyro integral drift, there have been numerous fusion algorithms, such as Kalman filter, untracked Kalman filter (UKF), extended Kalman filter (EKF), etc. [2-4]. These filtering methods need to establish accurate state equations and observation equations. There is another filtering algorithm that extends on the basis of complementary filterings, such as classical complementary filtering and complementary filtering algorithm based on gradient descent method [3-6]. However, the accuracy of this filtering algorithm is not high. Face these problems, this paper proposes an inertial positioning algorithm of Kalman filtering and complementary filtering fusion, the algorithm in the design of Kalman filter, the accelerometer and magnetometer fusion of quaternion as observed value, using the gyroscope of a quaternion as a status value, through the data fusion filtering, complete the quaternion optimal estimate for the first time, For the gyro drift problem, the designed complementary filter is used to compensate the gyro drift, and the corrected angular velocity is obtained, and then the continuously updated quaternion after correction is obtained. Then, the optimal estimation quaternion completed at the first time is estimated through the second Kalman filter, and then the high-precision attitude angle is output.

If interested, pls contact us: info@ericcointernational.com.

Monday, May 31, 2021

How to choose an electronic compass ?

There are a lot of people in the choice of electronic compass do not know how to choose, sometimes because did not consider the following content, and choose the wrong electronic compass, resulting in a waste of time and money, let us to see some tips when choose an electronic compass. 

First, let's take a look at what an electronic compass, also known as a digital compass, is a way of locating the North Pole using the geomagnetic field.

Secondly, as an important navigation and orientation tool, electronic compass is increasingly used in navigation and orientation systems.Most current navigation systems use an electronic compass to indicate direction.The electronic compass can accurately output Azimuth, pitch, Roll and other parameters by calculating the earth's magnetic field and gravitational field.

Known the basic concept of the electronic compass, now let's take a look at the electronic compass types on the market, manufacturers, many models, in the face of these we may look confused, so how to distinguish the performance of the electronic compass, how to choose a suitable for your application of the electronic compass?What's the difference between a good compass and a bad compass?

The main difference between electronic compasses is the difference in accuracy, namely the accuracy of heading, pitch and roll, and especially the accuracy of heading.The heading is defined as the Angle between the projection of the compass's axis on the horizontal plane and the north direction, the pitch is defined as the Angle between the compass's axis and the ground plane, and the roll is defined as the Angle at which the compass rotates about its axis.As shown in the figure below

According to the above definition, if the compass changes only in pitch, then its output azimuth and roll Angle should remain the same.In the same way, if a compass rolls about itself, that is, on its axis, the azimuth and pitch angles of its output should remain the same.In the use of compass, such as used in vehicles, antenna orientation and surface buoys and many other occasions, the carrier will often tilt back and forth, when used in petroleum, geological logging, often rotation, so most applications require compass to meet the requirements of tilt and roll orientation will not change.
Another requirement for compass accuracy is that the output of the compass should be 0 degrees if the current carrier is pointing north, and 90 degrees if the carrier is pointing east. The measured value and the true value should match exactly within the margin of error

For petroleum, geological, and coal logging, the orientation and inclination of the product should not change as the logging instrument rotates downhole, which is important for logging applications.
Another rule when choosing a compass is whether it is resistant to harsh conditions.A natural disadvantage of compasses is that they become less accurate in environments with magnetic interference.Compasses use the direction of the Earth's magnetic field to determine orientation. If the Earth's magnetic field is disturbed or distorted, the accuracy of orientation measurement will be reduced.Iron materials, batteries, motors, high currents, and so on can interfere with the geomagnetic field, and the closer these materials are to the compass, the worse the interference is.So if you want the compass to be accurate, you have to stay away from the source of the interference, but in many cases this is not possible.So the only way to solve this problem is to do magnetic calibration.In the process of magnetic calibration, the compass rotates with the measured object (i.e., the interference source) in a certain way and learns the surrounding magnetic environment to distinguish which is magnetic interference and which is geomagnetic field. Through this learning, the interference is eliminated and the high-precision azimuth output is obtained.




How is the application of 3-axis electronic compass in pipeline monitoring?

 The 3-axis electronic compass can help us to know the precise location of the pipeline.

In recent years, with the acceleration of urbanization, there are more and more underground pipe networks in cities, which brings with it frequent problems.This is because the pipeline is laid in a buried way. When the pipeline runs for a period of time, there are often some defects in the external anti-corrosion system, which causes the chemical corrosion and electrochemical corrosion of the pipeline, thus causing the pipeline corrosion perforation, stress corrosion cracking and other accidents.

Therefore, in order to ensure the safety of the pipeline and reduce the occurrence of accidents, it is necessary for us to monitor the pipeline to ensure the normal application of the pipelin

Pipeline monitoring requires monitoring of a lot of data, including monitoring of pipeline direction, deformation, corrosion, crack, pipeline environment and other key pipeline data.In the whole monitoring process, the precise positioning of the pipeline is a very important part, for example, when we detect deformation, corrosion and other problems, we need to know the specific position of the pipeline problem before the deformation, corrosion and other repairs.

The use of the 3-axis electronic compass can help us to know the precise location of the pipeline.

  • The composition and working principle of 3-axis electronic compass

The 3-axis electronic compass consists of a 3-D reluctance sensor, a biaxial inclination sensor and an MCU, which can locate the direction and measure the inclination.

The three dimensional reluctance sensor is used to measure the earth's magnetic field. The inclination sensor compensates when the magnetometer is not horizontal. The MCU processes the signals from the magnetometer and inclination sensor as well as the data output and the soft and hard iron compensation

The geomagnetic field is a vector, and for a fixed location this vector can be decomposed into two components parallel to the local level and one component perpendicular to the local level.If the electronic compass is kept parallel to the local horizontal plane, then the three axes of the compass magnetometer correspond to these three components.




The three dimensional reluctance sensor uses three mutually perpendicular reluctance sensors, each axial sensor detects the strength of the geomagnetic field in that direction.

The forward direction is called the x-direction sensor to detect the vector value of the geomagnetic field in the x-direction;

Right - or Y-oriented sensors detect the vector value of the geomagnetic field in the Y direction;

The downward or z-direction sensor detects the vector value of the geomagnetic field in the z-direction

The sensor sensitivity in each direction has been adjusted to an optimal point according to the component vector of the geomagnetic field in that direction and has a very low transverse sensitivity.The analog output signal generated by the sensor is amplified and sent to MCU for processing. Combined with the dip Angle data measured by the biaxial dip Angle sensor, the error is reduced and the azimuth is finally determined.

3 axis electronic compass application in pipeline monitoring

As can be seen from the above, the 3-axis electronic compass can locate the direction and measure the inclination Angle, and can be used in pipeline monitoring.However, the 3-axis electronic compass is not directly used. In general, it will be used as a real-time pipeline trajectory detector.The pipeline trajectory detector consists of single chip microcomputer, electronic compass and rotary encoder, etc., which can detect the azimuth Angle, pitch Angle and distance between measuring points of the pipeline in real time, and reconstruct the pipeline trajectory in real time through software algorithm.


3D electronic compass used in pipeline 




Choose a suitable IMU to make your drone flight more stable and safe

         As one of the core components of drones, IMU plays an irreplaceable role. Its high precision, fast response and freedom from extern...