WWWUniversityUnityMachine LearningIndustryGaming : MixGaming : MinecraftGaming : From The Depths : ModdingGaming : From The Depths : FilmingGaming : From The Depths : DesignsArtworkArchitecture

Machine Learning

Unity3D : 3DoF Gimbal Controller : Genetic Neural Network

Posted: 2020-03-03 15:23:31

Project focused on designing of 3DoF Gimbal Controller, to simulate behavior of orbiting spacecraft controlled with thrusters, with given reference point, using Evolving Neural Network (NEAT) approach.

It was been while, number of searches, efforts, trials and errors past, aiming, to create the controller in Unity, which will allow orient a satellite toward target reference, i.e. an orbit of the planet. Rather than using standard Unity method Lerp, to set the orientation, I wanted to simulate close to realistic behavior, of thruster based controller for spacecrafts. This means, each individual axis of the satellite (spacecraft), can be controlled individually, to ensure desired orientation of 3 axis. Not only orientation can be defined for each 3 axis, but also angular velocity for any of axis. This allows for example, for traveling satellite, to spin around one of its axis, while pointing into desired direction.

Video discuses steps taken, to train brain in Evolving Neural Network and showcases results. Configuration took steps in brain training, which resulted in only few generations of species, to achieve decent responsive system. C# code is also discussed.

As input to neural network, I used angular velocity error of xyz (3 inputs), in respect to the target, rather than position, or rotation itself. As output, I simulate thrusters behavior, by applying torque force on each side of model for xyz (3 outputs), where value is accepted both positive and negative. Can try imagine space shuttle, which fires multiple directional thrusters, to orient spacecraft in a space.

Fitness of Nerual Network, is the summary of angular velocity error, in respect to the reference angular velocity.

Unity Package. The project was made using Unity 2018.2.0b4. Howver, since is c# based, it should be able work on older version of Unity.

Project uses Evolving Neural Network - NEAT, based on Evolving Neural Networks through Augmenting Topologies.pdf (NEAT Paper by Kenneth O. Stanley and Risto Miikkulainen)