Hi Sandy jeak . You can try out this code from my senior project. I think its working successful. For objective function and MaxIt ,runtime also you can change as system that you want. All the best! Now, I've to use social spider optimization(SSO)to optimize PID Controller.Hopefully someone can help me also.