I've read some papers for controlling nonlinear systems (e.g. nonlinear pendulum). There are several approaches for targeting nonlinear systems. The most common ones are feedback linearizaing, backstepping, and sliding mode controllers.
In my case, I've done the theoretical and practical parts of controlling nonlinear model of a simple pendulum plus other manipulators problems in C++. For the pendulum, I've utilized a backstepping controller for solving the tracking task for the angular displacement and velocity. The results are
$$ \ddot{\theta} + (k/m) \dot{\theta} + (g/L) \sin\theta= u $$
where $m=0.5, k=0.0001, L=.2$ and $g=9.81$.
The results are good. However, tuning the controller is time consuming. The majority of papers use genetic algorithms for tuning their controllers such as PD, PID, and backstepping controllers. I'm clueless in this field and I hope someone sheds some light on this concept, preferable if there is a MATLAB sample for at least controlling a simple pendulum.
So far I've designed a simple GUI in C++/Qt in order to tune the controller manually. In the below picture, the response of the controller for step function.