esc_test
This is a Python package used to plot and analyze data collected for the purpose of characterizing a particular propeller, motor, and ESC configuration (e.g. for quadrotors).
main.py computes two models:
- a quadratic model describing thrust as a function of motor RPM
- a linear model describing torque as a function of thrust
The data sources currently supported are:
- RCBenchmark logs
- AutoQuad logs, from the ESC32 Configuration Utility
Additional sources can be used by adding an appropriate class to formats.py.
Sample data from 6 tests is included, all with the three-bladed 7-inch DALPROP T7056.
- ESC32v3 with T-Motor F40 Pro III 1600 kv (esc32v3-f40)
- Kotleta 20 with F60 Pro II 1750 kv (duty cycle commands, kotleta-f60-duty)
- Kotleta 20 with F60 Pro II 1750 kv (closed-loop RPM commands, kotleta-f60-rpm)
- ESC32v3 with F60 Pro II 1750 kv (esc32v3-f60)
- ESC32v2 with F60 Pro II 1750 kv (esc32v2-f60)
- Aikon BLHeli32 4-in-1 with F80 Pro 1900 kv (aikon-f80)
You can add your own data by editing tests_sample.py or creating Test objects and adding them to tests.py.
The relationship between RPM and thrust should really only be a function of the propeller and it should be independent of the ESC and motor. So for all six tests above, the RPM to thrust curves should be fairly similar. However, the command and voltage to RPM (and thus to thrust) relationship will depend on the ESC and motor as well.
Written with the help of Xuning Yang.
Usage
Dependencies are numpy, scipy, and matplotlib.
Run python main.py
where TEST is a test name found in tests_sample.py.
Run python main.py --help
to see additional options. In particular, --plot-debug
can be used to plot additional intermediate quantities used in the model computation and --plot-extra
will plot additional measurements that may be interesting.
plot_rpm_thrust.py is a helper script to compare motor thrust models from different tests.
Sample Output
Plots can be optionally saved to the media
folder by passing --save
to main.py.