Multi-Rotor UAV Flight Control System Detailed Design Plan

Before embarking on the design of a multi-rotor UAV flight control system, it is necessary to draft a comprehensive design plan, which serves as the foundation for the flight control system design. Below is the design plan for the UAV flight control development process:

Multi-Rotor UAV Flight Control System Detailed Design Plan

Before embarking on the design of a multi-rotor UAV flight control system, it is necessary to draft a comprehensive design plan, which serves as the foundation for the flight control system design. Below is the design plan for the UAV flight control development process:

1. System Functions

1.1 Real-Time Attitude Resolution
The system is proposed to use an IMU configuration consisting of the MPU6050, IST8310 (magnetometer), and SPL06-001/MS5611 (barometer). These sensors will be interfaced via I2C/SPI buses to acquire real-time sensor data, which will be fused using complementary filtering/Kalman filtering to obtain real-time attitude angles and angular velocity data.

1.2 Attitude Control
A PID controller will be used to generate the desired control output based on the attitude angle error.

1.3 Position Estimation
The system will use a combination of ultrasonic and barometer data to obtain the UAV's current altitude, and an optical flow sensor to determine the UAV's translational velocity.

1.4 Position Control
Position errors will be used to generate the desired attitude angles, allowing the UAV to track and eliminate position errors by following the desired attitude angles.

1.5 Motor Control
Based on the attitude information, real-time control outputs will be generated by the PID controller, and different PWM signals with varying duty cycles will be used to control the four rotor motors' speeds.

1.6 Real-Time Communication
The system will transmit the UAV's flight data to the ground station in real-time using telemetry.

1.7 Attitude Mode
Only the attitude stabilization function will be enabled.

1.8 Altitude Hold Mode
The system will use attitude stabilization combined with altitude control to maintain stable altitude by implementing closed-loop control for height, in addition to keeping the attitude stable.

1.9 Position Hold Mode
The system will use attitude stabilization, altitude hold, and position control to achieve closed-loop control in all three channels, allowing the UAV to maintain its position.

1.10 Real-Time Flight Status Display
The UAV's real-time flight status will be displayed using an LED module.

2. Hardware Plan

2.1 Hardware Schematic

2.2 Hardware Interface

Interface Signal Connection Module Description
Power GND/+24V MCU Power bus on the base plate
SWD GND/+3.3V/SWDIO/SWCLK MCU Update MCU program
USART GND/+5V/RX/TX External Debugging/Optical flow and ultrasound/Telemetry/SBUS
I2C GND/+5V/SCL/SDA IMU Sensor data transmission
PWM GND/PWM Motor Output PWM signal to drive motors

2.3 Mechanical Parameters
Estimated dimensions: 6.5 cm × 4.5 cm × 2.5 cm

2.4 Component Selection

Component Model Function Module Remarks
1 STM32F407VET6 MCU LQFP100
2 CAT6219-330TD-GT3 5V to 3.3V Converter
3 MPU6050 Attitude Measurement
4 IST8310 Magnetometer
5 SPL06-001 Barometer
6 74LVC2G240 Inverter
7 TVS PESD0603-240 ESD Protection
8 8M Crystal Oscillator CLK
9 LED Power Indicator
10 MP1953 Power Converter (BEC)

2.5 Hardware Design Considerations

a. Vibrations caused by motor rotation can significantly impact the accuracy of attitude resolution; therefore, design measures must include vibration dampening.

b. (1) Design must incorporate sealing and protective measures to enhance dust and water resistance. (2) Include electronic fence functionality to prevent the UAV from entering restricted or sensitive areas, thereby reducing safety risks. (3) Incorporate remote identification capability to enable regulators to track and identify the UAV's identity and location. (4) Design emergency response mechanisms for safe handling in case of malfunctions or other emergencies. (5) Ensure reliability and safety of the power system, including battery management and motor control. (6) Ensure high controllability, including precise control over flight path, speed, and attitude. (7) Reduce operation errors through intuitive user interfaces and logical operation designs to improve user experience. (8) Equip necessary sensors and algorithms for environmental perception and obstacle avoidance. (9) Implement security measures in communication links with ground stations to prevent data interception or tampering. (10) Ensure the electronic system meets electromagnetic compatibility requirements to avoid interference with other electronic devices. (11) Design for stability and safety under different wind conditions. (12) Control noise levels to prevent excessive noise interference with the environment. (13) Conduct hazard analysis during design phase to identify and control system hazards, reducing accident risks.

c. Include test points on the PCB for easier debugging and testing.

2.6 Hardware Testing Methods

  1. Test the power circuit to check if all node voltages are normal and if there are any short circuits or open circuits after powering the board.
  2. Solder the MCU, then use simple routines to test if the MCU functions and soldering are correct.
  3. Use an oscilloscope to check if the PWM port outputs are normal.
  4. Output attitude data via serial port to check if the IMU module functions correctly.

3. Software Plan

3.1 Software Functions

  1. Perform attitude resolution to obtain real-time UAV attitude angles and angular velocity information.
  2. Use extended sensor modules to obtain real-time UAV position information.
  3. Use the SBUS communication module to receive each channel value from the remote control.
  4. Use the PID controller for UAV attitude and position control.
  5. Use the LED module to display the UAV's state in real-time, providing feedback during long-distance flight.

3.2 Module Function Division

  1. IMU Module
  2. Extended Sensor Module
  3. BEC Module
  4. Motor Control Module
  5. SBUS Communication Module
  6. Telemetry Communication Module
  7. LED Module

3.3 Process Scheduling

  1. Initialize parameters for LED, IMU, USART, PWM, ADC, TIMER, and PID.
  2. Input IMU sensor measurements via the I2C interface to the MCU, perform attitude resolution, and update attitude information.
  3. Update UAV position information based on extended sensor module measurements.
  4. The position controller generates the desired attitude angles.
  5. The PID controller generates the desired control output based on current attitude information.
  6. Convert control output to corresponding PWM signal duty cycles for motor speed control.
  7. Send UAV information to the ground station via telemetry.
  8. Update the LED display state.

3.4 Interface Definition

  1. IMU Module

    • Input: Raw IMU measurement data
    • Output: Three-axis attitude angles and angular velocities, barometric altitude
  2. Extended Sensor Module

    • Output: UAV altitude and position information
  3. BEC Module

    • Input: +25.2V power voltage
    • Output: +5V voltage
  4. Motor Control Module

    • Input: Current attitude angle
    • Output: PWM control signal generated by PID controller
  5. SBUS Communication Module

    • Input: Raw SBUS receiver data
    • Output: Channel values from the remote control
  6. Telemetry Communication Module

    • Input: Current UAV attitude, speed, and position information
    • Output: Convert UAV information into data complying with telemetry protocol
  7. LED Module

    • Input: Current UAV state
    • Output: Display corresponding light color for each state

3.5 Testing Methods

Each module will undergo functional testing individually. After confirming that all modules function correctly, the entire board will be tested.

  • IMU Module Testing: Output resolved attitude angles via serial port and check the accuracy and latency of the output.
  • SBUS Module Testing: Print collected SBUS data to the serial port and use a serial debugging tool to verify the normalcy of the SBUS signal before proceeding with signal parsing.
  • Motor Control Module Testing: Use an oscilloscope to observe PWM output, rotate sensors, and check for corresponding PWM waveform changes and delays.
  • Telemetry Communication Module Testing: First, check for stable and correct serial output from telemetry; then, connect the entire telemetry link and verify that the ground station receives correct information.

With over 17 years of experience in PCBA design and manufacturing, our company partners with Fortune 500 companies. Our team of 25 engineers, who have collaborated with industry leaders, is dedicated to designing and producing top-quality products for our clients.

Related Articles