GithubHelp home page GithubHelp logo

xzwj / quadcopter-ucosii Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.52 MB

嵌入式系统大三上学期课程设计

License: GNU General Public License v3.0

C 93.45% Objective-C 0.06% Assembly 1.10% C++ 0.15% Makefile 0.76% HTML 2.20% CWeb 2.28%
quadcopter ucos-ii pid-control

quadcopter-ucosii's Introduction

Quadcopter-UCOSii

功能

  • 当前功能:稳定飞行,能够用遥控器进行控制
  • 未来添加功能:飞行定高(现缺少PID控制)、摄像头实现目标识别(已实现,未整合进整体程序),GPS实现、悬停以及定点飞行(未实现)
  • 性能相关:飞行稳定性较好,操作系统任务运行频率较高(姿态解算为300HZ左右,PID控制为150HZ左右),飞行时间大概为10几分钟
  • 存在问题:脚架弹性过高,降落易弹翻

选材

  • 机架:F450
  • 电调:好盈天行者20A
  • 电机:新西达A2212
  • 电池:格氏 2200mAh 25C
  • 飞控板:STM32F401RE
  • 扩展板:自己画的,原理图待上传
  • 传感器:GY-86(加速度计、陀螺仪、磁力计和气压计)
  • 蓝牙:HM-10(PC端使用HM-15)
  • 遥控器:乐迪4通道+接收器

姿态解算

传感器数据获取

  • 功能:获取加速度计、陀螺仪和磁力计的三轴(XYZ)数据,并对其数据进行滤波和零漂矫正
  • 原理:传感器连接飞控板后,通过I2C将传感器数据读出;滤波采用低通滤波,由硬件来实现;零漂矫正采取静置时采集上千次数据求平均值的方法

算法

  • 功能:将九轴数据转化为欧拉角以得到飞行器的姿态
  • 原理:采取Mahony的AHRS算法;通过四元数的旋转矩阵得到欧拉角

遥控器信号捕获

  • 功能:捕获遥控器信号并进行零点矫正和限幅,以输入PID控制 器进行控制
  • 原理:遥控器的接收器与飞控板连接后,将信号输入定时器进行PWM信号解析;零点矫正采取开机时采集上百次数据求平均值的方法;限幅采取乘上比例因子的方法

PID控制

  • 功能:控制四个电机的转速,让飞行器稳定飞行
  • 原理:采取双闭环PID控制(算法自主编写),外环为欧拉角P控制,内环为加速度PID控制;获得三个欧拉角PID值后,与油门一起融合为电机速度PWM占空比分子值(X模式)

uC/OS II 移植

  • 功能:通过移植操作系统来进行任务分配
  • 设计:任务一为姿态解算、任务二为PID控制、任务三为蓝牙串口通信;任务间通过全局变量进行数据交换

quadcopter-ucosii's People

Contributors

xzwj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.