IMU ground test software design based on CP-132UL V2

Publisher:cloudsousou6Latest update time:2011-09-23 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction
In view of the limitations of the field test environment of IMU, its test method needs to be improved, and a new hardware acquisition circuit is needed. According to actual needs, based on the CP-132ULV2 data acquisition board, VC6.0 is used to design the test software required for the field test environment, so as to complete the calibration of IMU in harsh environments.

2 Introduction to CP-132UL V2
CP-132UL V2 is an industrial-grade multi-serial port acquisition board produced by Moxa. It can reliably transmit information up to 4,000 feet and has a maximum baud rate of 92,160 b/s, making it as easy to transmit RS-422/485 information as RS-232. The automatic data transmission control feature of CP-132UL V2 can provide precise time control for the opening and closing of data channels, and will not cause failures even at high-speed data transmission. The device is placed in the terminal resistor of the circuit board to provide a suitable resistance value for the resistor. The insulation protection scheme enables the circuit board to withstand a high voltage of 2,000 V. The following is a pin assignment diagram of the CP-132UL V2 interface. Figure 1 is the interface between the circuit board and the computer. It has a 25-pin structure and can be directly inserted into the motherboard slot of the industrial computer. Table 1 shows the interface functions of each pin; Figure 2 is the interface connected to the device. It has a 9-pin structure and is connected to the signal generator to be measured. Table 2 shows the interface functions of each pin.

3 Calibration test method
The core components of IMU are gyroscopes and accelerometers. Due to the influence of the scale factors and installation errors of the gyroscopes and accelerometers themselves, there are large errors in the IMU output, so it is necessary to calibrate the IMU to achieve output compensation.

The discrete calibration method is used to calibrate the error parameters of the inertial group. The so-called discrete calibration method is to directly use the output of the accelerometer and gyroscope as the observed quantity, and compare it with the known reference information to determine the error parameters. The calibration test mainly includes: ① calibration of accelerometer error parameters; ② calibration of gyro scale factor and installation error coefficient; ③ calibration of gyro constant drift; ④ evaluation of calibration results.


4 Calibration software design
The calibration test software based on CP-132UL V2 mainly includes RS-422 serial communication, static drift test and calibration test function modules.
4.1 RS-422 serial communication
The ground test equipment communicates with the inertial group through the RS-422 serial bus, mainly completing the inertial group data reception and inertial group error compensation parameter writing, and its baud rate is 921.6 Kb/s. The data includes frame count, 3-way gyro data and temperature, 3-way temperature meter data and temperature, and temperature control board temperature. The inertial group data sends a set of data every 10 ms. The API function is used to access the RS-422 serial port communication. In the control communication, three functions are mainly called to realize the serial port control: first configure the serial port, open the serial port, and then operate the serial port to receive data and close the serial port. The program design process is shown in Figure 3. During the design, the serial port design was for the CP-132UL V2 acquisition board. Since the acquisition board can automatically assign addresses internally, there is no need to do any operation on the hardware. You only need to write the serial port function in the software to achieve serial port communication.

4.2 Static drift test
Static drift test is mainly to test the stability of the inertial group once it is powered on. The test data sampling period T and the number of test data groups N can be set in advance. Finally, the average value and random error of the static drift test data are calculated to evaluate the stability of the inertial group.
When designing, it should be noted that the sampling period and the number of test groups can be set arbitrarily, so the sampling period and the number of test groups should be set as global variables. When calculating the average value and random error, only the previously collected values ​​need to be subjected to a simple algorithm.
4.3 Calibration test
[page]

4.3.1 Accelerometer calibration
The calibration of the accelerometer error parameters adopts the multi-position calibration method under the static condition of the gravity field. After the inertial group is heated and stabilized, the calibration is carried out in the order of the 12 positions shown in Table 3.

During the test, if the data of a certain position is not ideal, it can be re-measured, or one or several positions can be re-measured after completing all position tests. Therefore, in the program design, it is necessary to add the function of allowing error correction and compensation, set its identifier for each position, and determine the array position where each position data is stored, so that after re-measuring a certain position, the new data will overwrite the old data, thereby realizing the error correction and compensation function. Since the data of each previous position is fixed, it is only necessary to read the data at the determined position when processing the data.
4.3.2 Calibration of gyro scale factor and installation error coefficient
The rate calibration method is used to calibrate the gyro scale factor and installation error coefficient. Calibrate according to the X, Y, and Z axes, allowing error correction or error compensation. In a single-axis turntable, the forward and reverse rotation of the turntable is used to offset the influence of the earth's angular velocity. In order to reduce the influence of the turntable's unevenness, the method of increasing the rotation speed is adopted to achieve a rotation speed higher than 30°/s. Since the earth's rotation angular velocity is very small relative to the turntable rotation speed. Therefore, the turntable is approximately regarded as rotating around the inertial space. In order to avoid dynamic effects. The start and stop of the turntable are not included in the test time. To improve the test accuracy, the full-circle calibration method is used, with a rotation time of 120 s and a number of revolutions of 10.
4.3.3 Calibration of the gyro zero position
Take the 4 positions of celestial north-west, celestial south-east, terrestrial south-west, and terrestrial north-east, and the static test time for each position is about 20 min. Set 4 flags to correspond to the 4 positions respectively, and then store the data of the 4 positions in the memory array respectively. Substitute the data of the 4 positions stored in the memory array into formula (1) to obtain the gyro zero position. The gyro zero position is the arithmetic mean (Dx0) of the gyro outputs at the 4 positions.


4.3.4 Program Design Flow
The calibration test is divided into three steps: ① position calibration, completing the calibration of the accelerometer; ② rate calibration, calibrating the installation error and scale factor of the gyro; (9 gyro constant calibration. Figure 4 is the overall program design flow. According to the flow of Figure 4, the test software shown in Figure 5 is designed. In the design, the function is first determined. To select the required function, only three identifiers need to be set, and each identifier corresponds to the corresponding function. In the specific test function, three classes are established, and each class writes its own test function. When calibrating the position, since there are many positions, each position should be set with its own identifier, and the collected data is stored in a fixed position in the memory. In this way, when processing the data, only the corresponding position needs to be read, avoiding misoperation and shortening the operation time. When calibrating the rate, three global variables are set to represent the three axes respectively. At the same time, when supplementing the test, the old data can be directly overwritten with the new data. When testing the gyro zero position, due to the long test time, the array storage space required in the test initialization is large, and the data processing part is similar to the position calibration. Figure 5 is the test interface.


5 Result evaluation
Put the IMU assembly on a flat plate, use the measured error coefficients of the gyro and the gauge, and according to the error equations of the gyro and the gauge, obtain the input of the gyro and the gauge under the calibrated error coefficient, that is, the earth's rotation angular velocity sensitive to each axis of the gyro and the gravity acceleration sensitive to each axis of the gauge, and then compare with the ideal earth's rotation angular velocity and gravity acceleration to evaluate the calibration results. If the difference is within the accuracy allowable range of the gyro and the gauge, it means that the calibration results are relatively satisfactory.

6 Conclusion
One end of CP-132UL V2 is connected to the IMU combination, and the other end is directly plugged into the industrial computer. VC6.0 is used to write the test software that meets the test plan. The engineering test proves that the test software has good compatibility with CP-132UL V2, works stably at high baud rate, and successfully completes the ground test of IMU.

Reference address:IMU ground test software design based on CP-132UL V2

Previous article:Design of single light curtain speed measurement system for high-speed moving targets based on FPGA
Next article:Design and implementation of a new intelligent cleaning robot measurement and control system

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号