【正文】
差,則有: (14) 濾波誤差協(xié)方差的推導(dǎo): (15) (16) 式中: I 為 1 的矩陣,對于單模型單測量, I=1; P(k|k1)是 X(k|k1)對應(yīng)的協(xié)方差, P(k1|k1)是 X(k1|k1)對應(yīng)的協(xié)方差;表示 A 的轉(zhuǎn)置矩陣; Q 是系統(tǒng)過程的協(xié)方差 (施聞明, 20xx)。四階龍格 — 庫塔法可以用來求解四元數(shù)微分方程,具體過程如下 : 設(shè) (3) (4) (5) (6) 則 上式中, T 為更新周期, q(t)為初始四元數(shù), q(t+T)為更新后的四元數(shù)。 發(fā)送數(shù)據(jù)過程:通過 nRF24L01 將 kalman 濾波后的數(shù)據(jù)無線傳輸。 C3GNDSCL1VDD2NC3S14NC5NC6NC7SETP8GND9C110GND11SETC123V313NC14DRDY15SDA16U5HMC5883SCL3V33V3 3V3SETPSETPSDADR_HMCSETC 圖 8 磁阻傳感器 HMC5883 電路圖 HMC5883工作特點(diǎn) HMC5883 傳感器的測量模式可以使用連續(xù)測量模式,測量速率最快為 75Hz,也可以使用單側(cè)模式加中斷的方式進(jìn)行,測量速率可達(dá)到 160Hz。當(dāng)引腳 SDO 為高電平時(shí),其 I2C 設(shè)備地址是 0x1D,進(jìn)行寫操作時(shí)變?yōu)?0x3A,讀操作時(shí)變?yōu)?0x3B。敲擊檢測功能可以檢測任意方向的單振和雙振動作。對陀螺儀的操作步驟如下所示: ① 對 STM32F103VCT陀螺儀進(jìn)行初始化,配置各個(gè)寄存器; ② 啟動 I2C 總線,數(shù)據(jù)讀取; ③ STM32F103VCT6 發(fā)出應(yīng)答,讀數(shù)據(jù)有效; ④ 解析并轉(zhuǎn)換數(shù)據(jù)。500/177。 12P6104C610uFC7Vout21Vin3LM1117GND104C810uFC9104C10104C11GND3V3 圖 5 電源電路圖 陀螺儀傳感器 L3G4200三軸陀螺儀 L3G4200D 是意法半導(dǎo)體推出的三軸共用一個(gè)感應(yīng)結(jié)構(gòu)的低功耗三軸陀螺儀,能同時(shí)檢測三條正交軸向運(yùn)動。在掉電模式下電流損耗最小,同時(shí) nRF24L01 也不工作,但其所有配置寄存器的值仍然保留。 STM32F103VCT6最小系統(tǒng)電路如下圖 2 所示。 綜合以上方案,考慮到系統(tǒng)需要顯示的內(nèi)容比較少,選擇了經(jīng)濟(jì)實(shí)惠的字符液晶LCD1602 來作為接收端的顯示。 使用 ADIS16355 則會使目標(biāo)板布電路圖困難,而且體積大,接口不方便使用。數(shù)字輸出數(shù)據(jù)為 16 位二進(jìn)制補(bǔ)碼的形式,可通過 SPI(3 線或 4線 )或者 I2C 數(shù)字接口訪問。 ADIS16355 的輸出零偏穩(wěn)定性為,溫度系數(shù)為,角度隨機(jī)游走為,適于精度要求較高的應(yīng)用。 方案三:采用 nRF24L01 無線射頻模塊進(jìn)行通信, nRF24L01 是一款高速低功耗的無線通信芯片 ,由 NORDIC 公司生產(chǎn)。 方案三:采用宏晶科技有限公司的 STC89C52RC 單片機(jī)作為主控芯片。本文通過對三軸陀螺儀和三軸加速度計(jì)的數(shù)據(jù)進(jìn)行采集和處理,進(jìn)行四元數(shù)算法的計(jì)算和 kalman 濾波,得到穩(wěn)定的目標(biāo)載體姿態(tài)角的數(shù)據(jù)。s science and technology, Hightech applications bee increasingly and widely used in modern agriculture, thus the modernization of agriculture needs to be supported by intelligent technology. In the process of realization of intelligent, it needs to control realtime feedback on the status of the motion of the detection ,the data collected by attitude angle to give feedback on target carrier movement of intelligent devices is particularly important. This paper presents an attitude angle detection system based on ADXL345 threeaxis accelerometer,L3G4200 three axis gyro sensor and HMC5883 magoresistive sensor. The system uses STM32F103VCT6 ARM CortexM3 corebased microcontroller as the master chip. Through acquisition and processing data from ADXL345, L3G4200 and HMC5883, attitude angle data was obtained. Then, nRF24L01 sent the obtained information to the receiver on whose display module shows realtime data. Through wireless transmission, function of realtime detection can be realized. Through the experimental analysis, the results show that abse of the data after being pocessed the fusion by using ADXL345, L3G4200 and HMC5883 is less than 10%. Keywords: SCM nRF24L01 acceleration sensor Gyroscope Magoresistive sensor 農(nóng)業(yè)機(jī)械車輛的姿態(tài)角監(jiān)測設(shè)計(jì) 目 錄 1 前言 .........................................................................................................................................1 2 系統(tǒng)方案分析與選擇論證 ...................................................................................................1 系統(tǒng)方案設(shè)計(jì) .................................................................................................................. 1 主控芯片方案 .............................................................................................................. 1 無線通信模塊方案 ...................................................................................................... 2 陀螺儀、加速度 計(jì)傳感器方案 .................................................................................. 2 顯示模塊方案 .............................................................................................................. 3 系統(tǒng)最終方案 .................................................................................................................. 4 3 主要芯片介紹和系統(tǒng)模塊硬件設(shè)計(jì) ...................................................................................4 STM32F103VCT6 模塊 .................................................................................................. 4 nRF24L01 無線模塊 ....................................................................................................... 6 無線模塊原理圖 .......................................................................................................... 6 接口電路 .................................................................................................................... 6 寄存器配置 .................................................................................................................. 7 供電電源 ........................................................................................................................ 8 陀螺儀傳感器 .................................................................................................................. 8 L3G4200 三軸陀螺儀 ................................................................................................. 8 陀螺儀電路圖 .............................................................................................................. 8 L3G4200 陀螺 儀工作特點(diǎn) ......................................................................................... 9 加速度計(jì)傳感器 .............................................................................................................. 9 ADXL345 三軸加速度計(jì) ........................................................................................... 9 加速度計(jì)電路圖 ........................................................................................................ 10 ADXL345 工作特點(diǎn) ................................................................................................. 11 磁阻傳感器 ..........................................................................