R-Studio
For the R code to function properly, two components are essential:
- The optimization function
- The Genetic algorithm
Functions to optimize
Thrust current function
This function adjusts the PWM signal to optimize the ratio between thrust and current.
Maximum Thrust function
This function adjusts the PWM signal and aims to identify the peak thrust.
Minimum Thrust function
This function adjusts the PWM signal to ascertain the least thrust value greater than zero.
The genetic algorithmn
To execute the genetic algorithm effectively, a suite of functions is required. These functions cater to various stages such as initialization, data transformation, communication, and storage.
Genetic algorithmn code
Algorithmn for R, Data transformation
Algorithmn for R, connection and Genetic Algorithm