3266 views|1 replies

95

Posts

6583

Resources
The OP
 

Liaoning Province Electric Competition Award-winning Works - Firefighting Flying Vehicle [Copy link]

1 System Solution
1.1 Demonstration and Selection of Master Control
Solution 2: Use STM32 microcontroller, which has analog, communication, timing and control peripherals and rich functions, but its motion control related functions are not as strong as the microcontroller provided by the official competition.
Comparing the above two solutions, this system adopts Solution 1.
1.2 Demonstration and Selection of Driver
Solution 2: BTN7971. It is a half-bridge driver chip, which requires two chips to drive a motor. The current can reach up to 43A. Its internal resistance is very small, heat dissipation is good, and practicality is good.
1.3 Demonstration and selection of control system
Scheme 2: Adopt cascade PID algorithm, calculate according to the functional relationship of proportion P, integral I, differential D, and then output the calculation result to the control end. The PID algorithm is simple, easy to understand, and has high control accuracy, which can meet the control requirements of this system.
Comprehensively comparing the above two schemes, this system adopts scheme 2.

Solution 1: Use bmp085 pressure sensor to measure atmospheric pressure and convert it to altitude. Subtract the altitude value at takeoff from the current altitude measurement value to get the height of the aircraft from the ground. However, the flight altitude of this competition is relatively low, the chip price is relatively expensive, the error is large, and debugging is relatively difficult.

Combining the above two solutions, choose Solution 2.
The system is mainly based on TI's TM4C1294XL microcontroller. In terms of the control of the quadcopter, MPU6050 is used as an angle sensor to measure the relevant attitude angle of the quadcopter during flight, and cascade PID is used for adjustment, so that the quadcopter can complete the stable flight of the relevant attitude. In terms of positioning height, we use ultrasonic ranging sensors to measure the height of the quadcopter and make corresponding adjustments to enable the aircraft to complete the measurement of fixed height. In terms of identifying flames, we use the camera OV7725 plus an optical flow sensor to identify the location of the target through corresponding features. The figure below is a specific system program flowchart.
Figure 1.1][attach]4136 21[/attach]
Figure 1.1]
[size= 10.5pt]2.1 Analysis of system structure
We use the OV7725 camera, which can recognize multiple colors. Due to the large amount of data, the acquisition speed will be slow, about 17ms, so there will be a certain lag. When designing parameters, attention should be paid to the response speed of the system. And it is also necessary to pay attention to the overshoot of the system. Too large a P value will speed up the response speed, but it will also increase the overshoot of the system and cause the system to oscillate at a low frequency. Because the power of the system is provided by the motor, a larger D value is required to stabilize the control and reduce the overshoot, but too high a D value will cause the system to oscillate at a high frequency, making the system unstable. More suitable P and D parameters can make the system have a faster response speed and a smaller overshoot, but the system will still have a certain static error. For this static error, a smaller I value can be used to overcome it, but too large an I value will cause the system to oscillate. Therefore, when setting the PID parameters, a suitable P should be selected with a larger D and a smaller I.
2.2 Analysis of the control algorithm

This system uses the PID algorithm to control the input PWM value of the four motors. After the four motors start working, the camera acquisition module continuously collects the current state of the car and compares it with the previous state, thereby changing the input PWM value of the four motors to achieve following. The PID algorithm controller consists of position proportion P, position error integral I and position differential D.
(2.1)
(2.2)
Proportional P: Proportional adjustment of position. The larger the proportion, the faster the adjustment speed. However, it should not be too large, otherwise the motor may become unstable due to sudden changes in working state.
Integral I: Eliminate steady-state error of the system. Adding integral adjustment can reduce system stability and slow down dynamic response. This system pursues faster and more stable control of the quadcopter, so the system has very little need for integral adjustment. That is, it ensures that the system will not be affected when it is not needed.
Unipolar PID: When you know the current state and the expected state of the system, how to adjust the system from the current state to the expected state is a problem. Here we can use PID for adjustment. PID is divided into position type and incremental type.
Cascade PID is two PIDs connected in series, divided into inner loop and outer loop PID. Here, we use inner loop PID control and outer loop PID control. The input of unipolar PID is the expected angle, and the feedback is angle data. In cascade PID, the input feedback of the outer loop is also angle data, and the input feedback of the inner loop is angular velocity data. The figure below is a specific structural schematic diagram. Figure 1.2 Cascade PID program diagram
Figure 1.2 Cascade PID program diagram

3.1 Circuit design

[attach]413624 [/attach]
The block diagram of the MCU subsystem is shown in Figure 3.2
Figure 3.2 Block diagram of the MCU subsystem
3.2 Program Design
The figure below is the corresponding program flow diagram.
Figure 3.6 Interrupt program block diagram

4.1 Test plan

[p=21, null, Use multimeter, oscilloscope and other instruments to check the hardware circuit board to ensure that there is no problem with the circuit board and that the power supply and output of each module are normal. Use keil compiler software to perform software simulation test. During debugging, the download line is connected to the microcontroller so that multiple variables in the control algorithm can be observed in real time when the program is executed. 4.2 Test conditions and instruments Ensure that the simulation circuit is exactly the same as the hardware circuit and the system schematic diagram, and ensure that the hardware circuit is welded normally without cold welding. Ensure that the output voltage of the power chip in the circuit is the designed voltage.5pt]The following figure is the corresponding program flowchart.
Figure 3.6 Interrupt program block diagram

4.1 Test plan

[p=21, null, Use multimeter, oscilloscope and other instruments to check the hardware circuit board to ensure that there is no problem with the circuit board and that the power supply and output of each module are normal. Use keil compiler software to perform software simulation test. During debugging, the download line is connected to the microcontroller so that multiple variables in the control algorithm can be observed in real time when the program is executed. 4.2 Test conditions and instruments Ensure that the simulation circuit is exactly the same as the hardware circuit and the system schematic diagram, and ensure that the hardware circuit is welded normally without cold welding. Ensure that the output voltage of the power chip in the circuit is the designed voltage.5pt]The following figure is the corresponding program flowchart.
Figure 3.6 Interrupt program block diagram

4.1 Test plan

[p=21, null, Use multimeter, oscilloscope and other instruments to check the hardware circuit board to ensure that there is no problem with the circuit board and that the power supply and output of each module are normal. Use keil compiler software to perform software simulation test. During debugging, the download line is connected to the microcontroller so that multiple variables in the control algorithm can be observed in real time when the program is executed. 4.2 Test conditions and instruments Ensure that the simulation circuit is exactly the same as the hardware circuit and the system schematic diagram, and ensure that the hardware circuit is welded normally without cold welding. Ensure that the output voltage of the power chip in the circuit is the designed voltage.确保仿真电路与硬件电路与系统原理图完全相同,并且确保硬件电路焊接正常,没有虚焊。确保电路上电源芯片输出电压为设计电压。[ <="" [="" [color="#333333]综上所述,本设计达到设计要求。4.3.3" [tr][td="283]
[p=21," align](2)" align][="" center]3分6秒[="" center][size="10.5pt]1

[/td][td=274][p=21," center]是[="" color]="" color][="" div="" font]赛题测试结果
测试次数
[/td][td=274]
1[/td][td=274]2[/td][td=274]3[/td][td=274]4
[/td][td=274]
151
[/td][/tr]" null,="" p][="" size][="" size][align="left]测试次数

[/td][td=274]
[p=21," table][="" td][="" tr]="" 主控板各功能模块工作正常,满足设计要求。[="">
Thanks for sharing!

Liaoning Province Electric Competition Award-winning Works - Firefighting Flying Vehicle


确保仿真电路与硬件电路与系统原理图完全相同,并且确保硬件电路焊接正常,没有虚焊。确保电路上电源芯片输出电压为设计电压。[>

image005.jpg (7.56 KB, downloads: 0)

image005.jpg

image006.png (14.65 KB, downloads: 0)

image006.png
This post is from Electronics Design Contest

Latest reply

Thanks for sharing!  Details Published on 2019-5-16 13:30
 
 

172

Posts

0

Resources
2
 
Thanks for sharing!
This post is from Electronics Design Contest
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list