摘要本论文介绍了一种基于stm32的滚球控制系统,并重点研究了该系统的视觉控制算法。该系统通过OpenMV摄像头获取小球的图像信息,分析锁定小球所处的坐标,通过一些相对应的PID算法来控制电机的运行。通过数字舵机的运行将平板倾斜到所需要的角度,从而驱动小球滚动到特定的位置。其目的是实现对小球的滚动方向和停留位置的控制以及小球运行轨迹的追踪。其中主要涉及的研究内容有:图像识别、图像处理、运动控制、智能控制。文中介绍了整个系统的结构和制作过程,详细探讨了其控制算法的调试与实现。对于单片机程序的设计和滚球系统的硬件搭建提出了自己的看法。针对系统的需求使用了多组PD,相互串联或并联使用来控制系统。对于实际编写和制作及调试过程中所遇到的各种问题及处理办法都进行了深入的探讨。关键词:滚球系统:电机控制;图像处理;串联PD控制ABSTRACTThis paper introduces a STM32-based rolling ball control system,and focuses onthe visual control algorithm of the system.The system obtains the image informationof the ball through the OpenMV camera,analyzes the coordinates of the locked ball,and controls the operation of the motor through some corresponding PID algorithms.The plate is tilted to the desired angle by the operation of the digital servo,thusdriving the ball to roll to a specific position.Its purpose is to realize the control of therolling direction and residence position of the ball and the tracking of the trajectory ofthe ball.The main research contents involved are:image recognition,imageprocessing,motion control,intelligent control.This paper introduces the structure andproduction process of the whole system,and discusses the debugging andimplementation of its control algorithm in detail.He put forward his own views on thedesign of the single-chip microcomputer program and the hardware construction ofthe rolling ball system.Multiple sets of PIDs are used to control the system accordingto the needs of the system,connected in series or parallel to control the system.Various problems encountered in the actual writing,production and debuggingprocess and treatment methods were discussed in depth.Key words:ball system;motor control;image processing;series PID control目录第一章绪论1.1研究背景及意义1.2国内外研究现状1.3研究的主要内容21.4本文的组织结构第二章系统总体设计2.1系统功能42.2现有方案比较2.3系统设计方案确定.62.4小结.12第三章系统硬件设计与实现.143.1滚球控制系统的硬件组成143.2图像识别模块153.3舵机控制模块163.4STM32控制器..173.5小结18第四章系统软件设计与实现.214.1滚球控制系统的程序构架214.2PID算法程序224.3openmv代码234.4STM32控制代码254.6小结28第五章系统测试295.1系统组装295.2控制电路结构原理图315.3测试效果325.4小结35第六章总结与展望.376.1工作总结376.2课题展望37参考文献38
暂无评论内容