Home \ Metaheuristics \ Particle Swarm Optimization in MATLAB

Particle Swarm Optimization in MATLAB

A video tutorial on PSO implementation in MATLAB is freely available for download, in this link.

Particle Swarm Optimization (PSO) is an intelligent optimization algorithm based on the Swarm Intelligence. It is based on a simple mathematical model, developed by Kennedy and Eberhart in 1995, to describe the social behavior of birds and fish. The model relies mostly on the basic principles of self-organization which is used to describe the dynamics of complex systems.

Swarm intelligence is ability of such systems, to achieve a higher level of intelligence, which is absolutely unreachable for any of system units. For example, a flock of birds as a society, has very complex behavior patterns, which is beyond the intelligence level of any of birds in the flock, of course. However, this complex patterns are created via simple and repetitive tasks, performed by any of members in the flock.

PSO utilizes a very simplified model of social behavior to solve the optimization problems, in a cooperative and intelligent framework. PSO is one of the most useful and famous metaheuristics and it is successfully applied to various optimization problems. If you would like to read more about PSO, you can see the related article on Wikipedia (here).

In this post, we are going to share with you a complete implementation of Particle Swarm Optimization (PSO) in MATLAB. The algorithm is implemented in a structured manner and if you are familiar with MATLAB programming language, you will find it easy, to use the codes in your research projects.

Also the MATLAB implementation of Multi-Objective Particle Swarm Optimization (MOPSO) is available for download, in this link.


The download link of this project follows.

Implementation of Particle Swarm Optimization (PSO) in MATLAB



  1. I need to Nested PSO in dispatching problem in Matlab. Do you help me?

  2. I need PSO implmentation for Dynamic Economic Load Dispatch problem in Matlab. I will much appreciate your help and support please.

  3. i need a MOPSO in optimizing speed, feed, depth of cut for measuring response 4 responses

  4. I need PSO implementation in more than two or three dimensions in MATLAB. This is useful for my studies..

    • You can use the provided code to solve single-objective optimization problems, with various decision variables, e.g. 100 variables or more. However if you are going to solve a multi-objective optimization problem, you must use MOPSO, which is available to download in this link.

  5. Thanks for your sharing! I have downloaded the programs,such as NSGA2,SPEA2,MOPSO,PSO,They are easy to use and modify.It is excellent.Thanks again.

  6. Dinesh kumar kasdekar

    its a good programming which is generally used in education purpose

Leave a Reply

Your email address will not be published. Required fields are marked *



Check Also

Artificial Bee Colony in MATLAB

Artificial Bee Colony (ABC) is a metaheuristic algorithm, inspired by foraging behavior of honey bee ...