Unmanned Aerial Vehicle Design EXploration - A Python package for multidisciplinary analysis and optimization of electric group 1-2 UAVs.
Project description
UAV DEsign eXploration
Sammy N. Nassau, RPI DBF 2021-2026, sammynassau@gmail.com, UAVDEX Repo
UAVDEX enables rapid determination of electric aircraft propulsion quantities (i.e. thrust or efficiency) across the entire flight envelope. It is intended primarily for students competing in design competitions such as AIAA Design/Build/Fly or SAE Aero.
The tools to thoughtfully design aircraft should be accessible to all.
Example analyses using UAVDEX
CAUTION: Validation is currently a work in progress and will be published in a conference paper for AIAA AVIATION 2026.
Installation
Anaconda is recommended. In anaconda prompt with a desired environment (not base) activated, simply run:
pip install uavdex
PointDesign
This object allows for calculation of electric aircraft propulsion with specified components across the entire flight envelope.
Key inputs that define a single flight condition:
- Uinf: freestream velocity over the propeller
- h: altitude
- OR rho: density
- dT: throttle setting (0-100%)
- SOC: battery state of charge (0-100%)
- OR Voc: cell voltage (~3.5-4.15 for LiPo)
- OR t: runtime
Runtime assumes constant current. This is valid when designing an aircraft that spends most of its flight time in a single condition (i.e. cruise). The inputs support most common units including
| Input Type | Name in Code | Units | Input Type | Name in Code | Units |
|---|---|---|---|---|---|
| Velocity | Uinf_mph | miles per hour | Throttle | dT | 0-100% |
| Velocity | Uinf_fps | feet per second | Altitude | h_ft | feet |
| Velocity | Uinf_mps | meters per second | Altitude | h_m | meters |
| Velocity | Uinf_kmh | kilometers per hour | Density | rho_kgm3 | kg/m$^3$ |
| Velocity | Uinf_kt | knots | Density | rho_slugft3 | slug/ft$^3$ |
| State of Charge | SOC | 0-100% | Density | rho_lbft3 | lbm/ft$^3$ |
| Battery Cell Voltage | Voc | Volts | Runtime | t_s | seconds |
| Runtime | t_m | minutes | Runtime | t_hr | hours |
Velocity, throttle, altitude/density, and state of charge/cell voltage/runtime must all be specified as shown in PointResult Example.
Component initialization
import uavdex as ud
design = ud.PointDesign() # initialize PointDesign object
design.Motor('C-4130/20', nmot = 2) # add a motor, and specify the # of motors (nmot = 1 by default)
design.Battery('Gaoneng_8S_3300', discharge = 85) # add a battery, and specify the maximum discharge (default is 80%)
design.Prop('16x10E') # add a propeller
To view and edit the databases use
design.OpenMotorData() # opens an editable csv
design.OpenBatteryData() # opens an editable csv
design.OpenPropellerData() # opens a folder containing .dat files from https://www.apcprop.com/technical-information/performance-data/?v=7516fd43adaa
Alternatively, for a list of options printed to the console:
design.MotorOptions()
design.BatteryOptions()
design.PropellerOptions()
All values required are typically provided by the manufacturer, meaning users can add whatever components they desire.
PointResult
A simple function to get propulsion quantities (called 'propQ' in the code) at a specified flight condition.
PointResult example
import uavdex as ud
# Component Initialization
design = ud.PointDesign() # initialize PointDesign object
design.Motor('C-4130/20', nmot = 2) # add a motor, and specify the # of motors
design.Battery('Gaoneng_8S_3300') # add a battery
design.Prop('16x10E') # add a propeller
# PointResult
# Uinf_mps: velocity in m/s (alternatively use Uinf_fps, Uinf_mph, Uinf_kmh, Uinf_kt)
# dT: throttle (0-100%)
# h_m: altitude in m (alternatively use h_ft, rho_kgm3, rho_slugft3, rho_lbft3)
# t_s: runtime in s (alternatively use t_m, t_hr, SOC, Voc)
propQs = design.PointResult(Uinf_mps = 15, dT = 70, h_m = 50, t_s = 30,
verbose = True) # this returns propQs as an array and also prints to console. To stop printing, set verbose = False.
which prints the following to the console:
At: t = 30 s, Uinf = 15 m/s, dT = 70 %, h = 50 m Total Thrust (N) = 51.281 Total Thrust (lbf) = 11.528 Total Thrust (g) = 5229.235 Total Thrust (oz) = 184.456 Total Torque (N-m) = 1.806 Total Torque (lbf-ft) = 1.332 RPM = 6298.030 Drive Efficiency (%) = 54.775 Propeller Efficiency (%) = 64.581 Gearing Efficiency (%) = 100.000 Motor Efficiency (%) = 91.515 ESC Efficiency (%) = 93.000 Battery Efficiency (%) = 99.657 Mech. Power Out of 1 Motor (W) = 595.549 Elec. Power Into 1 Motor (W) = 650.770 Elec. Power Into 1 ESC (W) = 699.752 Waste Power in 1 Motor (W) = 55.221 Waste Power in 1 ESC (W) = 48.983 Waste Power in 1 Battery (W) = 4.810 Current in 1 Motor (A) = 29.138 Current in 1 ESC (A) = 21.932 Current in Battery (A) = 43.864 Voltage in 1 Motor (V) = 22.334 Voltage in 1 ESC (V) = 31.905 Battery Voltage (V) = 31.905 Voltage Per Cell (V) = 4.002 State of Charge (%) = 88.923
propQs is an array containing the following propulsion quantities,
| Index | Symbol | Description | Units | Index | Symbol | Description | Units |
|---|---|---|---|---|---|---|---|
| 0 | T_N |
Total Thrust | N | 14 | Pin_m |
Electrical Power Into 1 Motor | W |
| 1 | T_lbf |
Total Thrust | lbf | 15 | Pin_c |
Electrical Power Into 1 ESC | W |
| 2 | T_g |
Total Thrust | g | 16 | Pw_m |
Waste Power in 1 Motor | W |
| 3 | T_oz |
Total Thrust | oz | 17 | Pw_c |
Waste Power in 1 ESC | W |
| 4 | Q_Nm |
Total Torque | N·m | 18 | Pw_b |
Waste Power in 1 Battery | W |
| 5 | Q_lbfft |
Total Torque | lbf·ft | 19 | Im |
Current in 1 Motor | A |
| 6 | RPM |
Propeller Speed | RPM | 20 | Ic |
Current in 1 ESC | A |
| 7 | eta_drive |
Drive Efficiency | % | 21 | Ib |
Current in Battery | A |
| 8 | eta_p |
Propeller Efficiency | % | 22 | Vm |
Voltage in 1 Motor | V |
| 9 | eta_g |
Gearing Efficiency | % | 23 | Vc |
Voltage in 1 ESC | V |
| 10 | eta_m |
Motor Efficiency | % | 24 | Vb |
Battery Voltage | V |
| 11 | eta_c |
ESC Efficiency | % | 25 | Voc |
Voltage Per Cell | V |
| 12 | eta_b |
Battery Efficiency | % | 26 | SOC |
State of Charge | % |
| 13 | Pout |
Mechanical Power Out of 1 Motor | W |
LinePlot
To plot a sweep of any one of the 4 inputs (Uinf, dT, h/rho, Voc/SOC/t) with the others fixed, use a LinePlot. The output variable plotted on the y-axis will be a selected propQ from the list above.
To select a propQ output, input a single variable or a list of variables as shown below
propQ = 'T_lbf' # for a single plot
# OR
propQ = ['T_lbf', 'eta_drive', 'Ib'] # to create multiple plots of propQs for the same sweep
LinePlot example
import uavdex as ud
import numpy as np
# Component Initialization
design = ud.PointDesign() # initialize PointDesign object
design.Motor('C-4130/20', nmot = 2) # add a motor, and specify the # of motors
design.Battery('Gaoneng_8S_3300') # add a battery
design.Prop('16x10E') # add a propeller
# LinePlot usage
design.LinePlot(propQ = ['T_lbf','eta_drive','Ib'],
Uinf_mph = np.linspace(0, 100),
dT = 100, h_m = 100, t_s = 30)
This code opens the plots below. Datatips pop up when clicking anywhere along the line in an interactive viewer (see Python IDE notes).
|
|
|
|
np.linspace simply samples 50 points by default between the start and ending values. To sample 200 points and get a smoother curve, use
Uinf_mph = np.linspace(0, 100, 200)
Alternatively, Uinf can be set to a specific value and sweeps of another quantity (dT, h/rho, or SOC/Voc/t) used.
ContourPlot
For sweeps of two inputs, use a contour plot!
ContourPlot example
import uavdex as ud
import numpy as np
# Component Initialization
design = ud.PointDesign() # initialize PointDesign object
design.Motor('C-4130/20', nmot = 2) # add a motor, and specify the # of motors
design.Battery('Gaoneng_8S_3300') # add a battery
design.Prop('16x10E') # add a propeller
# to control the number of points used in linspace (n = 50 --> ~5s runtime, n = 200 --> ~15s runtime)
n = 120
# ContourPlot (sweeps of velocity and runtime)
design.ContourPlot(propQ = ['T_lbf', 'eta_drive', 'Ib'],
Uinf_mps = np.linspace(0, 45, n),
t_s = np.linspace(0, 300, n),
dT = 100,
h_m = 100)
|
Thrust for velocity vs runtime |
Propulsion Efficiency for velocity vs runtime |
Battery Current for velocity vs runtime |
Additional ContourPlot examples
Notes on Python IDE usage
- VSCode: The best IDE for viewing UAVDEX plots and using the built-in datatips. No changes necessary.
- PyCharm: "Settings > Tools > Python Plots > Show plots in tool window" should be unchecked for interactive datatips.
- Spyder: Switch plot renderer from inline to QT. If the computer has a 4k screen, the text will be extremely small unless "Tools > Preferences > Application > Interface > Enable Auto High DPI Scaling" is selected.
- Jupyter: Displays static plots but it cannot support interactive datatips at this time.
Future updates
- Automatic boundary selection (no input array needed, just specify which variable is the sweep)
- Battery resistance near low SOC modeled
- Manual limit lines based on component values (i.e. ESC waste power < 500 W)
- Functions for the best Uinf, dT, h for maximum efficiency
- Steady state mission simulation for DBF laps
- Manual switching between UIUC exp data, APC BEMT, and custom data
- QPROP integration for arbitary propellers
- Setup pareto fronts
Have any requests? Open a github issue thread!
Want a propulsion component added to the default package CSV sheets? Request here:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uavdex-0.1.13.tar.gz.
File metadata
- Download URL: uavdex-0.1.13.tar.gz
- Upload date:
- Size: 15.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e29086f51d0d2179e2b2b56d60a538aede583ae59cfd157edea386cf33a0b5
|
|
| MD5 |
ba6250ca8454450beadc319e246e3f2b
|
|
| BLAKE2b-256 |
c33986471ce916ac66d1e82a16eaec967816b41e0d5e96103a00035eb26afa80
|
File details
Details for the file uavdex-0.1.13-py3-none-any.whl.
File metadata
- Download URL: uavdex-0.1.13-py3-none-any.whl
- Upload date:
- Size: 14.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa98bfb9f42a06b6b840335bcf44acf6ce3520402dd3b22c3cc2fd9e85cd668
|
|
| MD5 |
4bedc7452c8459c29b4c2cfd5f0942bf
|
|
| BLAKE2b-256 |
0defdee7ee8e9b8af452e4b8cfcc26c0f18585a3b1379a4ad4696ea5e4fb37e7
|