Develop a particle swarm optimizer (PSO) capable of optimizing multiple input values as applied to a single cost function in a real-time and adaptive manner.
Use the optimizer to tune Ki, Kp, & Kd weighting factors in a classic PID controller to optimize DER operation under a given cost function.
The PSO shall except a minimum of three input variables for exploring the candidate solution space.
The input variables shall be capable of being bounded, including both position and velocity.
User shall be able to specify the cost function in terms of parameters external to PSO object.
Cost function shall support weighted linear sums of a minimum of three variables.
All selected convergence and algorithm criteria shall be exposed to the user for user adjustment, including (but not limited to) number of particles, number of iterations, etc.
The PSO shall update at a time interval specified by the user.