The best book for understanding optimization is "Convex Optimization" by Stephen Boyd of Stanford University. Here is the PDF of his book available freely.
I think that you need to search the papers about optimization based on your intended use. For example, the lead-lag controller design based on PSO has been shown in a paper as below:
Article Damping of low-frequency oscillation in power systems using ...
I will strongly recommend to try MATLAB coding of different optimization algorithms , that will give you exactly what you want for your objective function .
It took long time to understand ,how to formulate objective function ,but once you created your function , than you can accumulate results by different algorithms , & it is less time consuming (I have wasted a lot of time to understand , how I will obtain optimized results for my problem)
@mahamad nawab Alam have provided PSO coding on his page , that is really helpful .