Keep It Simple

Neural Networks don’t always require complex frameworks and other mathematical algorithms to support them – it’s always best to start simple and only increase the complexity when absolutely needed.

A case in point is this Neural Network control system that was designed to control one specific RC helicopter airframe and yet … was able to fly several different types of RC helicopters with different airframes and different powerplants (gas, electric, and jet). In addition, the Neural Network control system could easily handle sling-loads and gusting / turbulent winds – two nonlinear disturbances that were never part of the training and test sets.

The flight software, with Neural Network functions, was:
1) coded in C,
2) used procedural, not object-oriented, programming,
3) was single-threaded, and
4) ran in the DOS 6.22 operating system.

It was uncomplicated yet highly effective. The flight software executed the following functions:
1) Sensor and actuator checks were performed during the start-up mode and the flight software would refuse to execute the take-off maneuver if anything was off.
2) RS-232 messages were received and processed from the onboard RC data link via another IO processor board – these were the pilot’s basic commands such as “take-off”, “hover”, “ascend”, “forward-flight”, etc.
3) RS-232 messages were received and processed from an onboard 900 MHz data link. These were also the pilot commands plus various commands for autonomous flight. In addition, the flight software also performed a telemetry function by sending out flight and system data to the 900 MHz data link so that the operators on the ground could visually monitor the geographic location of the helicopter and the health statuses on the ground control station.
4) All sensor messages – direct RS-232 from the sensor and RS-232 messages from an IO processor board, were processed and the servo actuator positions were monitored.
5) It performed all of the flight control functions such as hover, transition to forward flight and forward flight, velocity-set, take-off, landing and also managed the execution of an autonomous flight plan (setting up the flight modes on its own). Thus it continuously commanded all of the servo actuators.
6) If the datalink was lost for a period of time, the flight software would execute the “Return Home” mode and fly back autonomously to its original takeoff point (including landing).
7) It recorded all pertinent flight and system data and continuously wrote it out to a binary file which could be reviewed later as a diagnostic tool if there were any observed anomalies.

And despite the simplicity, the Neural Network flight control performance was extremely powerful. The Neural Networks easily handle different airframes, different powerplants, gusting winds, etc.

The video (approximately 9 minutes) shows all of the different airframes performing various maneuvers – the same Neural Network control system stabilized and guided each of them.  There are four slides in the beginning and the rest of the video shows flight maneuvers.

This is not to say that you shouldn’t use modern tools and processes – but don’t overcomplicate the process. In the beginning it’s really important to keep things simple and only use what is needed to execute the objectives.

If you’d like to learn about building Neural Network applications, consider becoming a Patron on my Patreon site. I will be posting articles on a monthly basis with specific applications that will include source code, documentation, and video discussions.


Published by Joys and Sorrows of Coding

Originally my degree was in Aerospace Engineering but I started coding in school and was hooked. In those days it was FORTRAN and reverse Polish notation on my hand-held HP 41-CV computer. Later I learned C, Pascal, Matlab, Java, C++, HTML and Python. Now I'm learning Android (Java) with Android Studio. The main IDEs that I use are NetBeans, IntelliJ IDEA, and Android Studio.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: