以下为《Modeling翻译1》的无排版文字预览,完整格式请下载
下载前请仔细阅读文字预览以及下方图片预览。图片预览是什么样的,下载的文档就是什么样的。
II.Modeling
The mobile robot may be a removable initial order inverted pendulum where it works as the heart of the whole device. It is a mobile platform, which may attain balance by its self-regulation. For cognizing the mobile robot additional and precisely, we need to analysis its mathematical model. The establishment of additional actual model is that the premise of planning control system and management rule. The robotic systems have a mechanical part, controlsystem and sensing system. Here we use Arduino Uno board for the implementation of the system and as a data acquisition system. It contains one embedded system sensors for the balancing the system and two stepper motor for the system as wheels. The platform structured by metallic element bars containsthree layers. within the 1st layer, there are a unit motors, reducers, batteries, 2 wheels of car and 2 little safety wheelsin front and back. within the middle layer, there are accelerometer and gyroscope as the heart of the unit.
II. 建模
移动机器人可以是一个可移动的初级倒立摆,它作为整个设备的心脏工作。它是一个移动平台,通过自我调节可以达到平衡。为了进一步准确地认识移动机器人,需要对其数学模型进行分析。附加实际模型的建立是规划控制系统和管理规则的前提。机器人系统有机械部分、控制系统和传感系统。在这里,我们使用Arduino Uno板来进行系统搭建,并作为数据采集系统。它包含一个用于平衡系统的嵌入式系统传感器和作为车轮的两个步进电机。它是由金属棒构成的平台搭建而成。在第一层,有一个单元电机、减速器、电池组,2个车轮以及前后各有2个小安全轮。中间层以加速度计和陀螺仪为核心。
III.System Design
To keep the robot balanced, the motors should counteract the autumn of the robot. This action needs a feedback and a correcting part. The feedback component is that the MPU6050 gyroscope plus accelerometer, which provides each acceleration and rotation in all 3 axes that is employed by the Arduino to understand this orientation of the robot. The correcting component is that the motor and wheel combination. The Connection of the sensor to the Arduino and testing the connection are done using proteus design tool before implementing on the hardware. The code is analyzed using the Arduino IDE codes. The L298N module can provide the +5V needed by the Arduino as long as its input voltage is +7 V or greater. However, we have chosen to have separate power sources for the motor and the circuit for isolation. If the system us Note that if you are planning to use a supply voltage of more than +12V for the L298N module, you need to remove the jumper just above the +12V input.
The self-balancing robot is not new, but when we started this research project we found a lot of information, but never in the same place, we had to search a lot to join all information in a single research project. The materials and electronics used in the research project, was a servo motor for a good results and also we can user stepper motor for the same. We user L293 for driving the motors.The physics behind this is very simple, the robot stand in two points lined, the wheel, and it tends to fall and lose his verticality, the movement of the wheel in the direction of the falling rises the robot for recover the vertical position.
A Segway-type vehicle is a classic inverted pendulum control problem that is solvable in two degrees of freedom for the simplest models. The vehicle attempts to correct for an induced lean angle by moving forward or backwards, and the goal is to return itself to vertical. Or at least not fall over.For that objective we have two things to do, in one side of it we have to measure the angle of inclination (Roll) that have the vehicle, and in the other hand we have to control the motors for going forward or backwards to make that angle 0, maintaining his verticality. The concept is implemented using the radio transceivermodule . Emphasis being given to presentation of idea. The implementation is based around the well-known microcontroller originally designed by Intel but the chips that we are using were manufactured by the Atmel corp. Although any other microcontroller could be used without any major change. The only direct impact will be only in the software or the assembly code written for the particular microcontroller. The system uses the simple transmitter section designed using the USART .
III. 系统设计
为了保持机器人的平衡,电机应该抵消机器人的渐衰期。这一动作需要反馈和修正部分。这个反馈组件是MPU6050陀螺仪和加速度计,提供3个轴上的每个加速度和旋转角度给Arduino来了解这个机器人的方位。校正元件是电机和车轮组合。在硬件上实现之前,传感器与Arduino的连接和连接测试是使用proteus设计工具完成的。代码通过使用Arduino IDE代码进行分析。只要输入7V以上的电压,L298N模块就可以向Arduino提供其所需的5V电压。然而,我们选择了独立电源给电机以达到电路隔离的目的。我们要注意到,如果计划使用电源电压超过+12V的L298N模块,你需要删除+12V输入。
自平衡机器人并不新鲜,但当我们开始这个研究项目时,我们在不同的地方发现了很多信息,我们不得不搜索大量的信息来加入一个单一的研究项目。该研究项目所使用的材料和电子产品,是一种伺服电机,取得了良好的效果,我们也同样可以使用步进电机。我们使用L293来驱动电机。 这背后的物理很简单,机器人站在车轮轴线上,当它倾向于倾倒并不再垂直时,车轮会向倾倒方向运动从而使机器人恢复垂直位置。
塞格威式车辆是一个经典的倒立摆控制问题,对于最简单的模型,它可以在两个自由度内求解。车辆试图通过向前或向后移动来修正感应到的倾斜角度,目标是将自己恢复到垂直状态。或者至少不能摔倒。为了达到这个目的,我们有两件事要做,一方面,我们必须测量有车辆的倾斜角(滚动),另一方面,我们必须控制电机前进或后退,使倾斜角度为0,保持他的垂直度。该概念是使用无线电收发模块实现的。重点应放在方案的实现上。该方案最初实现是依靠由英特尔设计的著名微控制器,但我们现在使用的芯片是由Atmel公司制造的。尽管任何其他微控制器都可以在没有任何重大变化的情况下使用。唯一的直接影响只在软件或为特定微控制器编写的装配代码中。该系统使用USART设计的简单发射机部分。
IV.Angle Measurement
Here for measure the angle we have two sensors, accelerometer and gyroscope, both have his advantages and disadvantages. The accelerometer can measure the force of the gravity, and with that information we can obtain the angle of the robot, the problem as we have seen in the accelerometer is that it can also measure the rest of the forces the vehicle is summited, so it has lot of error and noise. The gyroscope is used to measure the angular velocity, so if we integrate this measure we can obtain the angle the robot is moved, the problem of this measure isthat is not perfect and the integration has a deviation, that means that in short time the measure is so good, but for long time terms the angle will deviate much form the real angle.Those problems can be resolved be the combination of both sensors, that's called sensor fusion, and there are a lot of methods to combine it. In this research project we have tried two of them: Kalman Filter, and complementary filter.
The Kalman filter is an algorithm very extended in robotics, and offers a good result with low computational cost. The library is used for arduino that implements this method.
The Complementary filter is a combination of two or more filters that combines the information from different sources and gets the best value you want.angle = A * (angle + gyro * dt) + (1 - A) *acceleration;where A is normally equals to 0.98.
First we tried to use Kalman filter but the results obtained was not up to the mark, the angle was calculated with a little delay and it affect the control.
The Kalman filter has three variables and can bechanged based on the parameter of your sensor, and varying this can obtain better result, the values were changed to get the better results but was not good and wetried to implement the same using complementary filter. The main structure of the robot was created using some plastics materials for chassis with some nuts and screws, two wheels with two motors, one battery socket, one caster wheel, and even 2 little wheels for encoders.
The two motor were placed in the lower part of the structure and closed it with the two plastic parts, keeping it together with the screws. The electronics and the battery creates a tower in the upper part of the structure.The electronics were used here are arduino UNO,a motor driver, in this case a L298 was used, here we use acommercial motor driver based on the chip L298, maybe much powerful that we need for these motors but we have it and it works fine. If a DC motor has to be used, then a DC motor driver that is a H-bridge or use a L293. For the IMU we used 10DOF that is GY-80 with 3-axis accelerometer, 3-axis gyroscope, magnetometer, barometer and temperature sensors. We use only accelerometer and gyro. The IMU is connected to the Arduino using I2C bus, so we need 2 wires for communication (SDA and SCL) and 2 wires for power, it uses 3.3V so we need 3.3V wire and GND.The code has 4 files: one the main code, a second one for the motors, the third is for the PID, and the last one is for the sensor code.
In the main code is to initialize the entire robot which in turn com 内容过长,仅展示头部和尾部部分文字预览,全文请查看图片预览。 also be used to generate the output using the PID controller.
VI. 基本概念&系统的实现
MPU6050使用加速度计来测量倾角,它有一个三轴加速度计和一个三轴陀螺仪。加速度计测量三个轴的加速度,陀螺仪测量三个轴的角速度。为了测量机器人的倾斜角,我们需要沿y轴和z轴的加速度值。atan2(y,z)函数给出了平面正z轴与平面上坐标(z,y)给出的点之间的曲率角,逆时针角为正号,负号表示顺时针角(左半平面,y<0)。我们使用Jeff Rowberg编写的库来读取MPU6050的数据。上传下面给出的代码,看看dip是如何变化的。
使用陀螺仪测量倾斜角度,程序启动时MPU6050的位置为零倾斜。倾角是相对于这一点测量的。保持机器人稳定在一个固定的角度,你会发现角度会逐渐增加或减少。它不会保持稳定。这是由于陀螺仪的固有漂移造成的。在上面给出的代码中,循环时间是使用Arduino IDE中内置的millis()函数计算的。在后面的步骤中,我们将使用计时器中断来创建精确的采样间隔。采样周期也将被用来使用PID控制器产生输出。
[文章尾部最后500字内容到此结束,中间部分内容请查看底下的图片预览]
以上为《Modeling翻译1》的无排版文字预览,完整格式请下载
下载前请仔细阅读上面文字预览以及下方图片预览。图片预览是什么样的,下载的文档就是什么样的。