On-line control using the particle swarm optimisation algorithm