[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92598":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},92598,"Extended-Kalman-Filter---STM32","DjVul\u002FExtended-Kalman-Filter---STM32","DjVul","Universal Extended Kalman Filter (EKF) in C for 6-DOF IMU (gyroscope + accelerometer).  Estimates Roll and Pitch with STM32 firmware and Python visualization.",null,"C",56,10,52,0,4,43.52,"Apache License 2.0",false,"main",true,[],"2026-07-22 04:02:06","# STM32 IMU Extended Kalman Filter (EKF)\n\n## Overview\n\nThis project implements a **6-DOF IMU orientation estimation** using an **Extended Kalman Filter (EKF)**. The filter fuses data from a **3-axis gyroscope** and a **3-axis accelerometer** to estimate **Roll and Pitch angles** in real-time.\n\nThe firmware is written in C and tested on STM32, but the core EKF and matrix math libraries are platform-independent and can be easily ported to any microcontroller (Arduino, ESP32, etc.). Code is commented step by step so someone who didn't implement EKF can learn.\n\n---\n## How It Works\n\nBelow is the block diagram of the Extended Kalman Filter algorithm used in this project:\n\n![EKF Block Diagram](KalmanFilterDiagram.png)\n\n### System Model\nThe EKF tracks a **6-state vector**:\nx = [roll, pitch, yaw, bias_x, bias_y, bias_z]\n\n- **roll, pitch, yaw** – orientation angles (radians)\n- **bias_x, bias_y, bias_z** – gyroscope biases (rad\u002Fs) to compensate for drift\n\n### Filter Phases\n1. **Prediction (Gyroscope)** – integrates angular velocity to predict new angles\n2. **Correction (Accelerometer)** – corrects drift using gravity vector measurement\n\n### Why Extended Kalman Filter?\n- Standard Kalman filter assumes linear systems\n- Accelerometer measurement model uses **sin\u002Fcos** (nonlinear)\n- EKF linearizes the measurement model using a **Jacobian matrix**\n\n---\n\n##  Results\n\n![Full Signal](FilteringFullSignal.png)\n\n**What you see:**\n- **Green** = True angle (ground truth)\n- **Red dashed** = Raw angle from accelerometer (noisy)\n- **Blue** = EKF filtered output (smooth, accurate)\n\n---\n\n### Simulation & Visualization (Python)\n- **NumPy** – data generation\n- **Matplotlib** – plotting\n- **PySerial** – UART communication\n\n","这是一个面向嵌入式平台的通用扩展卡尔曼滤波器（EKF）实现，专用于6自由度IMU的姿态解算。核心功能是融合三轴陀螺仪与加速度计数据，在STM32上实时估计滚转角（Roll）和俯仰角（Pitch），同时在线估计并补偿陀螺仪零偏。项目采用纯C语言编写，包含平台无关的EKF算法与矩阵运算模块，支持跨MCU移植；配套Python脚本提供仿真、串口通信与可视化。适用于无人机、机器人、姿态稳定系统等对实时性与资源受限有要求的嵌入式姿态感知场景。",2,"2026-07-09 02:30:27","CREATED_QUERY"]