Stochastic nature-inspired population-based algorithms are very powerful tools for solving stationary and deterministic, NP-hard optimization problems. These algorithms have rarely been applied to real-world dynamic and uncertain optimization due to their complexity. In this paper, this kind of algorithms were ported onto real hardware (i.e., the velocity controller of a one degree of freedom robot mechanism), where they were used to control the behavior of a non-linear system online. This means that the feedback response from the system must be less than 5 ms. Due to the complexity of the fitness function evaluation, a surrogate linear model was used, implemented as a single-layer artificial neural network, consisting of two phases: learning and simulation. In the first phase, the model of the nonlinear plant is learned during online operation, while in the second, the value of the fitness function needed by the optimization algorithms is predicted. Six algorithms were compared with the PI-controller in our experimental work. This were: classical evolution strategies, contemporary evolution strategies, differential evolution, self-adaptive differential evolution, particle swarm optimization, and the bat algorithm. The results showed that the algorithms outperformed PI-controller in the sense of stability, flexibility and adaptability.