CN110209182A - A kind of quadrotor based on AVR single chip - Google Patents
A kind of quadrotor based on AVR single chip Download PDFInfo
- Publication number
- CN110209182A CN110209182A CN201910423310.7A CN201910423310A CN110209182A CN 110209182 A CN110209182 A CN 110209182A CN 201910423310 A CN201910423310 A CN 201910423310A CN 110209182 A CN110209182 A CN 110209182A
- Authority
- CN
- China
- Prior art keywords
- quadrotor
- single chip
- module
- avr single
- flight
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013461 design Methods 0.000 claims abstract description 31
- 230000008901 benefit Effects 0.000 claims abstract description 4
- 238000000034 method Methods 0.000 claims description 36
- 238000005259 measurement Methods 0.000 claims description 15
- 238000001914 filtration Methods 0.000 claims description 11
- 230000004927 fusion Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 6
- 230000001133 acceleration Effects 0.000 claims description 4
- 238000005070 sampling Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000012937 correction Methods 0.000 claims description 3
- 238000012772 sequence design Methods 0.000 claims 1
- 238000012360 testing method Methods 0.000 abstract description 11
- 230000006870 function Effects 0.000 abstract description 9
- 238000005516 engineering process Methods 0.000 abstract description 8
- 230000033001 locomotion Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- RZVHIXYEVGDQDX-UHFFFAOYSA-N 9,10-anthraquinone Chemical group C1=CC=C2C(=O)C3=CC=CC=C3C(=O)C2=C1 RZVHIXYEVGDQDX-UHFFFAOYSA-N 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000005672 electromagnetic field Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000010006 flight Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/08—Control of attitude, i.e. control of roll, pitch, or yaw
- G05D1/0808—Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/10—Simultaneous control of position or course in three dimensions
- G05D1/101—Simultaneous control of position or course in three dimensions specially adapted for aircraft
Landscapes
- Engineering & Computer Science (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
The invention belongs to vehicle technology fields, disclose a kind of quadrotor based on AVR single chip, and the quadrotor based on AVR single chip includes: main control module, underwater acoustic remote control module, inertia measuring module, power module, drive module.The quadrotor that the present invention designs has mechanical structure simple, and at low cost, accident rate is low, aircraft may be implemented from steady, hovering in the advantages that light-weight, the quadrotor for the functions such as make a return voyage, cooperate two close cycles cas PID control algorithm to control quadrotor simultaneously, finally carry out on-line debugging using upper computer software, is proved through outdoor test flight on the spot, quadrotor can be very good steadily to take off, and it can complete from surely, the movement such as hovering has achieved the purpose that design.
Description
Technical field
The invention belongs to vehicle technology field more particularly to a kind of quadrotors based on AVR single chip.
Background technique
Currently, the immediate prior art: quadrotor is a multi-functional work system;It uses fado
Kind of multiplicity, either military or civilian, quadrotor has all embodied the incomparable advantage of other aircraft, by social each
Each industry of row is approved, therefore the utility value of quadrotor is very high.
At the beginning of the origin of quadrotor can trace back to last century, however at that time due to mechanical structure and control technology
It keeps in check, the development of quadrotor is relatively slow.Recently as Micro-control Technology, information technology, the breakthrough of sensing technology,
Quadrotor enters the fast-developing stage.External many famous colleges and universities and laboratory all have developed four different rotations
Rotor aircraft and control algolithm, such as the miniature quadrotor that University of Pennsylvania Vijay and his team develop
Inertial measurement component is merged using visual information measurement posture, can realize and cruise in complicated three-dimensional environment.It is domestic right
The research of quadrotor is in the stage in the ascendant, also one section of no small distance is compared with foreign countries, but China is
Many good achievements have been got on board the aircraft, either in the control algolithm of quadrotor or in practical application
In all achieve striking achievement, Guo Wang power supply company carries out transmission line of electricity with UAV flight's laser radar in save more at present
Inspection work;However, existing quadrotor flight is unstable, it is easy by extraneous factor to the shadow of inertial measurement component
It rings, causes flight attitude bad.During quadrotor flies in the sky, the interference of wind direction and electromagnetic field will receive,
The interference of the defect of quadrotor itself design etc., these disturbance meetings are so that the signal of sensor acquisition includes a large amount of harmonic wave, shadow
Ring the flight of quadrotor.
In conclusion problem of the existing technology is:
During quadrotor flies in the sky, the interference of wind direction and electromagnetic field will receive, quadrotor is set itself
The interference of the defect of meter etc., these disturbance meeting influence the winged of quadrotor so that the signal of sensor acquisition includes a large amount of harmonic wave
Row.
Solve the difficulty of above-mentioned technical problem:
How the collected data of sensor to be filtered, are compensated.
Solve the meaning of above-mentioned technical problem:
The aircraft that the present invention designs is that a stability is high, is had a smooth flight, while having good jamproof performance
Aircraft, design the development to later quadrotor with reference and directive significance.
Summary of the invention
In view of the problems of the existing technology, the present invention provides a kind of quadrotors based on AVR single chip.
The invention is realized in this way a kind of design method of the quadrotor based on AVR single chip, described to be based on
The design method of the quadrotor of AVR single chip includes:
The problem of step 1 carries out quadrotor attitude algorithm, converts geographic coordinate system for aircraft carrier coordinate system;
Step 2 carries out the operation of quaternary number, and the standardization operation of quaternary number is carried out in Inertial Measurement Unit module, then will
This quaternary number again recurrence to beginning;
Step 3 carries out Kalman filtering and data fusion, and using the method for gyroscope and accelerometer complementation, amendment adds
The collected data error of speedometer transducer and the deviation for correcting gyroscope;
Step 4 carries out two close cycles cas PID control, and using two close cycles cas PID control, outer ring uses flight attitude angle
PID control, inner ring use angular speed PID control.
Further, step 1 further comprises: the problem of converting geographic coordinate system for aircraft carrier coordinate system, following formula
In α be reference axis rotation angle, three cosine components are then the components represented on three axis in a coordinate system;
q0=cos (α/2)
q1=sin (α/2) cos (βx)
q2=sin (α/2) cos (βy)
q3=sin (α/2) cos (βz);
Eulerian angles are converted to using arithmetic from above formula;
θ=arcsin (- 2 (q1q3+q0q2))
Further, step 2 further comprises: taking in Inertial Measurement Unit module in accelerometer and sits along x, y, z first
16 numerical value of parameter, and being separately converted to unit is g along x, y, the vectorial force accx, accy, accz of z coordinate axis;From
Three ADC values are read in gyroscope, and these three values of reading are converted into the angular speed around three axis for unit into the degree second
For gyroscope Wx, Wy, Wz;By error than on column post-compensation to velocity sensor, obtaining three updated values of velocity sensor
WxintWyintWzint, that is, compensation null offset;Velocity sensor three revised value WxintWyintWzint are used
In update quaternary number;After quaternary number obtained above standardization, once-through operation is completed, then recurrence arrives again by this quaternary number
Beginning.
Further, step 3 further comprises: using the method for gyroscope and accelerometer complementation, acquiring number with gyroscope
According to the amendment collected data error of acceierometer sensor;The collected posture information of accelerometer is weighted processing,
Gyroscope is fed back to again, corrects the existing deviation of gyroscope.
Another object of the present invention is to provide a kind of designs using the quadrotor based on AVR single chip
The quadrotor based on AVR single chip of method design, the quadrotor based on AVR single chip include:
Main control module is connect with underwater acoustic remote control module, inertia measuring module, power module, drive module, is come for receiving
The flight attitude data transmitted from inertia measuring module and analysis resolving carried out to attitude data, output pwm signal, driving
Direct current generator rotation is also used to receive the instruction issued by user's hand-held remote controller, and controls aircraft according to specific instruction
Complete corresponding flare maneuver;
Underwater acoustic remote control module, connect with main control module, including Digiplex and earth station, and user utilizes Digiplex
Flare maneuver instruction is sent to quadrotor;Earth station sends outside simple control instruction to quadrotor, is also used to that quadrotor is arranged
Fixed point cruise, spot hover flight plan, earth station is also used to the current flight posture of quadrotor to simulate in PC machine
Out;
Inertia measuring module is connect with main control module, for acquiring the status information of quadrotor current flight, by acquisition
Information is transmitted to main control chip, and main control chip converts geographical seat for quadrotor carrier coordinate system using quaternary number according to software algorithm
Mark system controls quadrotor after error correction;
Power module is connect with main control module, for providing power supply for quadrotor;
Drive module is connect with main control module, including brshless DC motor and electron speed regulator, for passing through electronic speed regulation
Device, motor carry out driving operation to quadrotor.
Further, the quadrotor quadrotor weight 900g based on AVR single chip;Quadrotor flight generates most
Lift 1200g;30 minutes cruise duration of quadrotor;Quadrotor fuselage axis is away from size 450mm.
Another object of the present invention is to provide the controlling parties of the quadrotor described in one kind based on AVR single chip
The control method of method, the quadrotor based on AVR single chip carries out software programming and exploitation by ArduinoIDE;
Program design process, interrupting includes SPI interruption, serial ports interruption, timer interruption, underwater acoustic remote control interruption;Timer interruption makes
10ms is completed with timer to interrupt, and sampling, the algorithm fusion, PID of flight attitude sensor are completed in interrupt function
Controller operation and the output of realization motor and data communication.
Another object of the present invention is to provide a kind of designs of the quadrotor described in realize based on AVR single chip
The information data processing terminal of method.
Another object of the present invention is to provide a kind of computer readable storage mediums, including instruction, when it is in computer
When upper operation, so that computer executes the design method of the quadrotor based on AVR single chip.
Another object of the present invention is to provide a kind of designs using the quadrotor based on AVR single chip
The civilian plant protection field unmanned plane of method design.
In the present invention, inertia measuring module mainly includes accelerometer, three-axis gyroscope, compass and barometer;Power supply
Module, the module are mainly the offer normal working voltage of quadrotor, and the voltage that quadrotor is mainly used has
11.1V, 5V and 3.3V etc..
Advantages of the present invention and good effect are as follows:
The quadrotor that the present invention designs has mechanical structure simple, and at low cost, accident rate is low, light-weight etc. excellent
Point, therefore application prospect is extensive;The small-sized quadrotor flight of a frame is designed by core controller of ArduinoMega2560 single-chip microcontroller
Device;Firstly, completing the hardware knot of system by master controller, Inertial Measurement Unit, underwater acoustic remote control module, power supply and drive module
Structure design;Secondly, eliminating interference using Kalman filtering, and flight attitude angle is calculated using Quaternion Algorithm and controls electricity
The revolving speed of machine, and adjust by two close cycles cas PID control the balance of aircraft;It finally adopts and shows a C language control journey
Sequence, software and hardware on-line debugging simultaneously carry out test flight on the spot.
Aircraft may be implemented from steady in the present invention, hovering, the quadrotor for the functions such as make a return voyage, because control algolithm
It realizes particularly important, acceleration and angular speed is extracted from inertial measurement component, preliminary Euler is calculated using Quaternion Method
Angle recycles Kalman filtering and blending algorithm to be filtered and merge the Eulerian angles after resolving, eliminates extraneous factor to used
The influence of property measuring cell, obtains correct flight attitude angle (Eulerian angles), while cooperating two close cycles cas PID control algorithm pair
Quadrotor is controlled, and finally carries out on-line debugging using upper computer software, is proved through outdoor test flight on the spot, four
Rotor can be very good steadily to take off, and can complete from surely, and the movement such as hovering has achieved the purpose that design.
Detailed description of the invention
Fig. 1 is the quadrotor structural schematic diagram provided in an embodiment of the present invention based on AVR single chip.
Fig. 2 is the system structure diagram of quadrotor provided in an embodiment of the present invention.
Fig. 3 is quaternary number operational flowchart provided in an embodiment of the present invention.
Fig. 4 is two close cycles cas PID control block diagram provided in an embodiment of the present invention.
Fig. 5 is main program flow chart provided in an embodiment of the present invention.
Fig. 6 is interrupt routine flow chart provided in an embodiment of the present invention.
Fig. 7 is MissionPlanner initialization surface chart provided in an embodiment of the present invention.
Fig. 8 is roasting machine debugging schematic diagram provided in an embodiment of the present invention.
Fig. 9 is quadrotor Eulerian angles curve graph provided in an embodiment of the present invention.
Figure 10 is quadrotor spot hover figure provided in an embodiment of the present invention.
Figure 11 is that flight attitude provided in an embodiment of the present invention is schemed from steady.
In figure: 1, main control module;2, underwater acoustic remote control module;3, inertia measuring module;4, power module;5, drive module.
Specific embodiment
In order to further understand the content, features and effects of the present invention, the following examples are hereby given, and cooperate attached drawing
Detailed description are as follows.
Structure of the invention is explained in detail with reference to the accompanying drawing.
As shown in Figure 1, the quadrotor provided in an embodiment of the present invention based on AVR single chip includes: main control module
1, underwater acoustic remote control module 2, inertia measuring module 3, power module 4, drive module 5.
Main control module 1 connect with underwater acoustic remote control module 2, inertia measuring module 3, power module 4, drive module 5, is used for
Modules are controlled by main control chip to work normally;
Underwater acoustic remote control module 2 is connect with main control module 1, for carrying out wireless communication four rotation of remote control by Digiplex
Rotor aircraft;
Inertia measuring module 3 is connect with main control module 1, for measuring quadrotor inertia;
Power module 4 is connect with main control module 1, for providing power supply for quadrotor;
Drive module 5 is connect with main control module 1, for being driven by electron speed regulator, motor to quadrotor
Dynamic operation.
The design method of quadrotor controller provided by the invention includes:
The problem of step 1 carries out quadrotor attitude algorithm, converts geographic coordinate system for aircraft carrier coordinate system;
Step 2 carries out the operation of quaternary number, and the standardization operation of quaternary number is carried out in Inertial Measurement Unit module, then will
This quaternary number again recurrence to beginning;
Step 3 carries out Kalman filtering and data fusion, and using the method for gyroscope and accelerometer complementation, amendment adds
The collected data error of speedometer transducer and the deviation for correcting gyroscope;
Step 4 carries out two close cycles cas PID control, and using two close cycles cas PID control, outer ring uses flight attitude angle
PID control, inner ring use angular speed PID control.
In step 1, quadrotor attitude algorithm:
The attitude algorithm algorithm of quadrotor is substantially coordinate system transition problem, is how to turn aircraft carrier coordinate system
The problem of turning to geographic coordinate system.α in following formula is the angle of reference axis rotation, and three cosine components are represented in coordinate system
In component on three axis.
As can be seen from the above formula that Eulerian angles can be converted to using simple arithmetic, with simple Eulerian angles
Calculating is compared, and complicated multiple trigonometric function conversion is reduced, simple many from calculation amount.
In step 2, quaternary number operation process:
The operation process of quaternary number is also the process of analog-to-digital conversion, first taking accelerometer in Inertial Measurement Unit module
It is middle that along x, y, 16 numerical value of z coordinate axis, and being separately converted to unit is g along x, y, the vectorial force accx of z coordinate axis,
Accy, accz read three ADC values from gyroscope, and it is the degree second around three that these three values of reading, which are converted as unit,
The angular speed of a axis is gyroscope Wx, Wy, Wz.Error calculation between vector is carried out in carrier coordinate system, and speed
The integral error of sensor equally also on body coordinate system, the integral error of the size of vector error and velocity sensor at
Direct ratio, there are a proportionality coefficients between them, therefore velocity sensor integral can be demarcated with accelerometer, equally to accidentally
Difference is integrated, and practical is also to have carried out a ratio control, in this way can be with by error than on column post-compensation to velocity sensor
Velocity sensor three updated value WxintWyintWzint are obtained, that is, compensate null offset, velocity sensor three
Revised value WxintWyintWzint is for updating quaternary number.After quaternary number obtained above standardization, one is just completed
Secondary operation, then by this quaternary number again recurrence to beginning.
In step 3, Kalman filtering and data fusion:
Quadrotor is very big to the stability influence of system from Inertial Measurement Unit acquisition attitude data quality, and appearance
State sensor needs first to be filtered the larger attitude data of disturbance vulnerable to the interference from the external world.Kalman's filter
Wave algorithm can predict the dynamic of the system of the system subsequent time in many interference data.Kalman filtering algorithm and volume
Journey is all relatively easy, its real-time update preprocessed data, thus the present invention using Kalman filtering algorithm to collected flight
Attitude data carries out prediction processing, with the attitude angle of the flight after being calibrated.It is obtained to integrate each sensor of quadrotor
The information taken, and acceleration and gyro sensor are reduced by extraneous interference, so needing according to each sensor
The characteristics of, sensor is applied in combination, to make up since sensor unicity causes the one-sidedness of acquisition information.The present invention uses top
The method of spiral shell instrument and accelerometer complementation acquires data with gyroscope to correct the collected data of acceierometer sensor and miss
Difference, similar closed-loop control, then the collected posture information of accelerometer is weighted processing, then feed back to gyroscope, it is used to
Correct the existing deviation of gyroscope.
In step 1, two close cycles cas PID control:
Simple PID control can not adapt to the flight environment of vehicle of such complexity, therefore the present invention uses the control of two close cycles cascade PID
System, outer ring use flight attitude angle PID control, use angular speed PID control in inner ring.
Compared with traditional PID, the anti-interference ability of two close cycles cascade PID is stronger, and control system performance is also more stable.
In embodiments of the present invention, ArduinoMega2560 minimum system plate of the present invention selection based on Open Source Platform is made
For the master controller of quadrotor, software programming and exploitation, program design flow chart are carried out by ArduinoIDE, interruption includes
SPI interruption, serial ports interruption, timer interruption, underwater acoustic remote control interrupt.Timer interruption is completed 10ms using timer and is interrupted, and
And sampling, algorithm fusion, PID controller operation and the realization motor output of flight attitude sensor are completed in interrupt function
With the functions such as data communication.
When the invention works, firstly, providing power supply by power module 4 for quadrotor;Secondly, passing through master control mould
Block 1 is controlling underwater acoustic remote control module 2, inertia measuring module 3, power module 4,5 modules of drive module just using main control chip
Often work;Then, remote control quadrotor is carried out wireless communication using Digiplex by underwater acoustic remote control module 2;Pass through
Drive module 5 carries out driving operation to quadrotor using electron speed regulator, motor;Finally, passing through inertia measuring module 3
Measure quadrotor inertia.
Application principle of the invention is further described combined with specific embodiments below.
1. the hardware design of quadrotor
Quadrotor core is flight control system, and all flare maneuvers of quadrotor are controlled in flight
It is completed under the instruction of system, is the brain of quadrotor.The complete set control system of quadrotor should be logical by main control chip, remote control
Believe module, inertia measuring module, power module and drive module composition.The overall structure frame diagram of quadrotor is as indicated with 2.
2. the design of quadrotor controller
2.1 quadrotor attitude algorithms
The attitude algorithm algorithm of quadrotor is substantially coordinate system transition problem, is how to turn aircraft carrier coordinate system
The problem of turning to geographic coordinate system.α in following formula is the angle of reference axis rotation, and three cosine components are represented in coordinate system
In component on three axis.
q0=cos (α/2)
q1=sin (α/2) cos (βx)
q2=sin (α/2) cos (βy)
q3=sin (α/2) cos (β z);
As can be seen from the above formula that Eulerian angles can be converted to using simple arithmetic, with simple Eulerian angles
Calculating is compared, and complicated multiple trigonometric function conversion is reduced, simple many from calculation amount.
θ=arcsin (- 2 (q1q3+q0q2)
2.2 quaternary number operation processes
The operation process of quaternary number is also the process of analog-to-digital conversion, first taking accelerometer in Inertial Measurement Unit module
It is middle that along x, y, 16 numerical value of z coordinate axis, and being separately converted to unit is g along x, y, the vectorial force accx of z coordinate axis,
Accy, accz read three ADC values from gyroscope, and it is the degree second around three that these three values of reading, which are converted as unit,
The angular speed of a axis is gyroscope Wx, Wy, Wz.Error calculation between vector is carried out in carrier coordinate system, and speed
The integral error of sensor equally also on body coordinate system, the integral error of the size of vector error and velocity sensor at
Direct ratio, there are a proportionality coefficients between them, therefore velocity sensor integral can be demarcated with accelerometer, equally to accidentally
Difference is integrated, and practical is also to have carried out a ratio control, in this way can be with by error than on column post-compensation to velocity sensor
Velocity sensor three updated value WxintWyintWzint are obtained, that is, compensate null offset, velocity sensor three
Revised value WxintWyintWzint is for updating quaternary number.After quaternary number obtained above standardization, one is just completed
Secondary operation, then by this quaternary number again recurrence to beginning.As shown in Figure 3.
2.3 Kalman filterings and data fusion
Quadrotor is very big to the stability influence of system from Inertial Measurement Unit acquisition attitude data quality, and appearance
State sensor needs first to be filtered the larger attitude data of disturbance vulnerable to the interference from the external world.Kalman's filter
Wave algorithm can predict the dynamic of the system of the system subsequent time in many interference data.Kalman filtering algorithm and volume
Journey is all relatively easy, its real-time update preprocessed data, thus the present invention using Kalman filtering algorithm to collected flight
Attitude data carries out prediction processing, with the attitude angle of the flight after being calibrated.It is obtained to integrate each sensor of quadrotor
The information taken, and acceleration and gyro sensor are reduced by extraneous interference, so needing according to each sensor
The characteristics of, sensor is applied in combination, to make up since sensor unicity causes the one-sidedness of acquisition information.The present invention uses top
The method of spiral shell instrument and accelerometer complementation acquires data with gyroscope to correct the collected data of acceierometer sensor and miss
Difference, similar closed-loop control, then the collected posture information of accelerometer is weighted processing, then feed back to gyroscope, it is used to
Correct the existing deviation of gyroscope.
2.4 two close cycles cas PID controls
Simple PID control can not adapt to the flight environment of vehicle of such complexity, therefore the present invention uses the control of two close cycles cascade PID
System, outer ring use flight attitude angle PID control, use angular speed PID control in inner ring.
Compared with traditional PID, the anti-interference ability of two close cycles cascade PID is stronger, and control system performance is also more stable.
Quadrotor two close cycles cas PID control block diagram, as shown in Figure 4.
2.5 software flow
The present invention selects main control of the ArduinoMega2560 minimum system plate as quadrotor based on Open Source Platform
Device carries out software programming and exploitation by ArduinoIDE, and program design flow chart is as shown in figure 5, interrupting includes in SPI
Disconnected, serial ports interruption, timer interruption, underwater acoustic remote control interrupt.Timer interruption is completed 10ms using timer and is interrupted, and will be
Sampling, algorithm fusion, PID controller operation and the output of realization motor and data of flight attitude sensor are completed in interrupt function
The functions such as communication.Its work flow diagram is as shown in Figure 6.
3. quadrotor flight experiment and interpretation of result
3.1 upper computer software
The parameter testing of quadrotor works, the acquisition of quadrotor flying quality, the monitoring of quadrotor state of flight,
The adjustment of offline mode all be unable to do without upper computer software MissionPlanner.Interface is opened as indicated with 6 after installation.
3.2PID parameter setting
The debugging of pid parameter play the role of to the flight of quadrotor it is very important, if pid parameter adjust excessive or mistake
It is small quadrotor all to be produced bigger effect, it even results in quadrotor and is swung left and right and can not take off.To accelerometer, compass school
After standard, start to adjust pid parameter, in order to guarantee the accuracy of pid parameter and the safety of operation, this time debugging exists
It is carried out in the case of " roasting machine "." roasting machine " schematic diagram is as depicted in figure 8.
The above process is completed under host computer operation, and upper computer software can be by revised pid parameter burning
Into flight control panel, the anti-interference ability of quadrotor can be further improved.
Pid data analysis after 3.3 calibrations
By the fuselage that rolls, it can be seen that the dynamic of roll angle and pitch angle in the simulated flight interface of upper computer software
The variation of curve graph.When quadrotor is disturbed, MissionPlanner can detect the current Eulerian angles of aircraft
Information.
Green curve is yaw angle, and red curve is roll angle, can be seen after applying an external disturbance to quadrotor
To the fluctuation of curve, but it can see quadrotor and tend to original stable state again quickly.
3.4 test flights on the spot
In order to test quadrotor from steady characteristic, select outdoor spacious meadow to carry out work of taking a flight test, test site
It is selected in by Hospital on spacious meadow, test same day gentle breeze.After being powered on to quadrotor, gradually adjust aircraft be from steady mode,
The mode flight device can be with self adjustment balance, and testing flying vehicle determines to uphang stop mode, finally draws a conclusion, designs herein
Aircraft can stablize and take off, and can be from steady, as shown in Figure 10 under the interference of wind-force.
3.5 analysis of experimental results
It is unstable due to wind-force, external interference be it is dynamic, can preferably reflect the flat of quadrotor in this way
Weigh performance, and Figure 11 presents this flight test quadrotor local pose angle change curve, and from figure, preceding 3min is four
In the rotor standby for takeoff stage, due to the interference of wind-force, the shake of quadrotor is very big, this period of 4min-5min is quadrotor
It, can be it can be seen from the figure that curve fluctuates very little, it was demonstrated that the strong antijamming capability of aircraft in spot hover mode.
The above is only the preferred embodiments of the present invention, and is not intended to limit the present invention in any form,
Any simple modification made to the above embodiment according to the technical essence of the invention, equivalent variations and modification, belong to
In the range of technical solution of the present invention.
Claims (10)
1. a kind of design method of the quadrotor based on AVR single chip, which is characterized in that described to be based on AVR single chip
The design method of quadrotor include:
The problem of step 1 carries out quadrotor attitude algorithm, converts geographic coordinate system for aircraft carrier coordinate system;
Step 2, carry out the operation of quaternary number, in Inertial Measurement Unit module carry out quaternary number standardize operation, then by this four
First number again recurrence to beginning;
Step 3 carries out Kalman filtering and data fusion, using the method for gyroscope and accelerometer complementation, corrects acceleration
The collected data error of flowmeter sensor and the deviation for correcting gyroscope;
Step 4 carries out two close cycles cas PID control, and using two close cycles cas PID control, outer ring uses flight attitude angle PID
Control, inner ring use angular speed PID control.
2. the design method of the quadrotor based on AVR single chip as described in claim 1, which is characterized in that step 1
Further comprise: the problem of converting geographic coordinate system for aircraft carrier coordinate system, the α in following formula are the angles of reference axis rotation
Degree, three cosine components are then the components represented on three axis in a coordinate system;
q0=cos (α/2)
q1=sin (α/2) cos (βx)
q2=sin (α/2) cos (βy)
q3=sin (α/2) cos (βz);
Eulerian angles are converted to using arithmetic from above formula;
θ=arcsin (- 2 (q1q3+q0q2))
3. the design method of the quadrotor based on AVR single chip as described in claim 1, which is characterized in that step 2
Further comprise: is taken first along x, y, 16 numerical value of z coordinate axis in accelerometer, and divided in Inertial Measurement Unit module
It Zhuan Hua not be unit be g along x, y, the vectorial force accx, accy, accz of z coordinate axis;Three ADC values are read from gyroscope,
And converting these three values of reading for unit is the angular speed around three axis of degree second into gyroscope Wx, Wy, Wz;By error
Than on column post-compensation to velocity sensor, obtaining velocity sensor three updated value Wxint Wyint Wzint, that is,
Compensate null offset;Velocity sensor three revised value Wxint Wyint Wzint are for updating quaternary number;Above
After the quaternary number standardization arrived, once-through operation is completed, then by this quaternary number again recurrence to beginning.
4. the design method of the quadrotor based on AVR single chip as described in claim 1, which is characterized in that step 3
Further comprise: using the method for gyroscope and accelerometer complementation, acquiring data correction acceierometer sensor with gyroscope
Collected data error;The collected posture information of accelerometer is weighted processing, then feeds back to gyroscope, corrects top
The existing deviation of spiral shell instrument.
5. a kind of design method using the quadrotor described in claim 1 based on AVR single chip design based on AVR
The quadrotor of single-chip microcontroller, which is characterized in that the quadrotor based on AVR single chip includes:
Main control module is connect with underwater acoustic remote control module, inertia measuring module, power module, drive module, for receiving from used
Property measurement module transmitting flight attitude data and analysis resolving is carried out to attitude data, output pwm signal, drive direct current
Motor rotation is also used to receive the instruction issued by user's hand-held remote controller, and completes according to specific instruction control aircraft
Corresponding flare maneuver;
Underwater acoustic remote control module, connect with main control module, including Digiplex and earth station, and user utilizes Digiplex to four
Rotor sends flare maneuver instruction;Earth station sends outside simple control instruction to quadrotor, is also used to be arranged quadrotor
Fixed point cruise, spot hover flight plan, earth station, which is also used to the current flight posture of quadrotor to simulate in PC machine, to be come;
Inertia measuring module is connect with main control module, for acquiring the status information of quadrotor current flight, by the information of acquisition
It is transmitted to main control chip, main control chip converts geographical coordinate for quadrotor carrier coordinate system using quaternary number according to software algorithm
System controls quadrotor after error correction;
Power module is connect with main control module, for providing power supply for quadrotor;
Drive module is connect with main control module, including brshless DC motor and electron speed regulator, for by electron speed regulator,
Motor carries out driving operation to quadrotor.
6. as claimed in claim 5 based on the quadrotor of AVR single chip, which is characterized in that described to be based on AVR monolithic
The quadrotor quadrotor weight 900g of machine;Quadrotor flight generates maximum lift 1200g;Quadrotor cruise duration 30 divides
Clock;Quadrotor fuselage axis is away from size 450mm.
7. a kind of control method of the quadrotor based on AVR single chip as claimed in claim 5, which is characterized in that institute
The control method for stating the quadrotor based on AVR single chip carries out software programming and exploitation by ArduinoIDE;Main journey
Sequence design cycle, interrupting includes SPI interruption, serial ports interruption, timer interruption, underwater acoustic remote control interruption;It is fixed that timer interruption uses
When device complete 10ms and interrupt, and sampling, the algorithm fusion, PID control of flight attitude sensor are completed in interrupt function
Device operation and the output of realization motor and data communication.
8. a kind of design method for realizing the quadrotor described in Claims 1 to 4 any one based on AVR single chip
Information data processing terminal.
9. a kind of computer readable storage medium, including instruction, when run on a computer, so that computer is executed as weighed
Benefit requires the design method of the quadrotor described in 1-4 any one based on AVR single chip.
10. a kind of design method using the quadrotor based on AVR single chip described in 4 any one of Claims 1 to 4
The civilian plant protection field unmanned plane of design.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910423310.7A CN110209182A (en) | 2019-05-21 | 2019-05-21 | A kind of quadrotor based on AVR single chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910423310.7A CN110209182A (en) | 2019-05-21 | 2019-05-21 | A kind of quadrotor based on AVR single chip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110209182A true CN110209182A (en) | 2019-09-06 |
Family
ID=67787970
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910423310.7A Pending CN110209182A (en) | 2019-05-21 | 2019-05-21 | A kind of quadrotor based on AVR single chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110209182A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110865647A (en) * | 2019-12-15 | 2020-03-06 | 华南理工大学广州学院 | Control method for remotely controlling multi-rotor aircraft based on single chip microcomputer |
CN111703580A (en) * | 2020-05-28 | 2020-09-25 | 上海交通大学 | Electric propulsion rotor craft power system and control method thereof |
CN112650294A (en) * | 2020-12-30 | 2021-04-13 | 彩虹无人机科技有限公司 | Unmanned aerial vehicle automatic baking machine system and control method thereof |
CN114594675A (en) * | 2022-03-07 | 2022-06-07 | 东华理工大学长江学院 | Improved PID four-rotor aircraft control system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104773289A (en) * | 2015-04-16 | 2015-07-15 | 四川理工学院 | Internet-of-things-based micro four-rotor aircraft |
CN105980939A (en) * | 2014-02-11 | 2016-09-28 | 沙特基础工业公司 | Control system |
CN106249745A (en) * | 2016-07-07 | 2016-12-21 | 苏州大学 | The control method of four axle unmanned planes |
CN106444804A (en) * | 2016-09-16 | 2017-02-22 | 杭州电子科技大学 | Complementary filtering algorithm and cascade PID based four-rotor aircraft design method |
-
2019
- 2019-05-21 CN CN201910423310.7A patent/CN110209182A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105980939A (en) * | 2014-02-11 | 2016-09-28 | 沙特基础工业公司 | Control system |
CN104773289A (en) * | 2015-04-16 | 2015-07-15 | 四川理工学院 | Internet-of-things-based micro four-rotor aircraft |
CN106249745A (en) * | 2016-07-07 | 2016-12-21 | 苏州大学 | The control method of four axle unmanned planes |
CN106444804A (en) * | 2016-09-16 | 2017-02-22 | 杭州电子科技大学 | Complementary filtering algorithm and cascade PID based four-rotor aircraft design method |
Non-Patent Citations (4)
Title |
---|
DIEGO ALBERTO MERCADO RAVELL: "Modeling and control of unmanned aerial/underwater vehicles using hybrid control", 《CONTROL ENGINEERING PRACTICE》 * |
吕玉恒: "基于STM32单片机的自主飞行的四旋翼系统设计及算法研究", 《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》 * |
曹鲁成: "基于AVR单片机的四旋翼飞行器的设计", 《现代电子技术》 * |
高云淑: "基于RTOS的四轴飞行器", 《电子制作》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110865647A (en) * | 2019-12-15 | 2020-03-06 | 华南理工大学广州学院 | Control method for remotely controlling multi-rotor aircraft based on single chip microcomputer |
CN111703580A (en) * | 2020-05-28 | 2020-09-25 | 上海交通大学 | Electric propulsion rotor craft power system and control method thereof |
CN111703580B (en) * | 2020-05-28 | 2021-02-12 | 上海交通大学 | Electric propulsion rotor craft power system and control method thereof |
WO2021238047A1 (en) * | 2020-05-28 | 2021-12-02 | 上海交通大学 | Power system of electric propulsion rotary wing aircraft, and control method therefor |
CN112650294A (en) * | 2020-12-30 | 2021-04-13 | 彩虹无人机科技有限公司 | Unmanned aerial vehicle automatic baking machine system and control method thereof |
CN114594675A (en) * | 2022-03-07 | 2022-06-07 | 东华理工大学长江学院 | Improved PID four-rotor aircraft control system and method |
CN114594675B (en) * | 2022-03-07 | 2024-06-04 | 东华理工大学长江学院 | Four-rotor aircraft control system and method with improved PID |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110209182A (en) | A kind of quadrotor based on AVR single chip | |
CN105353762B (en) | The control method of six rotor wing unmanned aerial vehicles based on double remaining attitude transducers | |
CN107368091B (en) | A kind of stabilized flight control method of more rotor unmanned aircrafts based on finite time neurodynamics | |
CN105700540B (en) | UAV Flight Control circuit based on FPGA | |
CN104615142B (en) | Flight controller for civil small UAV (Unmanned Aerial Vehicle) | |
CN102830622B (en) | Auto-disturbance-rejection automatic flight control method for four-rotor aircraft | |
CN102426457B (en) | Flight control navigation system of miniature flapping-wing flying vehicle | |
CN107804474B (en) | Design method of complete machine system of multi-rotor flying robot with redundant mechanical arm | |
CN103611324A (en) | Unmanned helicopter flight control system and control method thereof | |
CN104656660A (en) | Control system for micro-unmanned helicopter multi-mode autonomous flight and method thereof | |
CN202939489U (en) | Multi-rotor autobalance flight controller | |
CN110488850A (en) | A kind of quadrotor drone vision navigation system and method based on raspberry pie | |
CN113359867B (en) | Unmanned aerial vehicle self-stabilizing cradle head and control method | |
CN106325289A (en) | Renesas R5F100LEA master control-based four-rotor flight controller and control method thereof | |
CN107065911A (en) | Quadrotor and its control method | |
CN109269526B (en) | Rotary grid inertial navigation horizontal damping method based on damping network | |
CN107247459A (en) | Anti-interference flight control method and device | |
CN103712598A (en) | Attitude determination system and method of small unmanned aerial vehicle | |
CN110806754A (en) | Four-rotor aircraft attitude correction control system and method | |
CN201004180Y (en) | Pose control system for unmanned plane | |
CN113375670A (en) | Method for resolving attitude by using quaternion based on three-axis gyroscope and accelerometer value | |
CN110488857A (en) | A kind of control system of the quadrotor unmanned vehicle of solar energy | |
CN100587644C (en) | Integrated single loop controller for camera optical axis stable tracing | |
Wei | Autonomous control system for the quadrotor unmanned aerial vehicle | |
Zhan et al. | Control system design and experiments of a quadrotor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190906 |
|
RJ01 | Rejection of invention patent application after publication |