This submission illustrates how to use a parallel computing loop to perform an optimization of the process that has been represented in Simulink.
The aim of this submission is to provide You a tool that you can adjust and apply it for your own study. Therefore the presented process is simple. The optimization problem presented in this submission concerns the selection of gains for a PI controller.
Base on this submission you might create your own code/model to solve optimization problems.
You can find examples of the use of the PSO (run in parallel computing mode) in:
 Michalczuk Marek; Ufnalski Bartłomiej; Grzesiak Lech M.; Particle swarm optimization of the fuzzy logic controller for a hybrid energy storage system in an electric car. In: Power Electronics and Applications (EPE'16 ECCE Europe), 2016 18th European Conference on. IEEE, 2016. p. 1-10.
 Michalczuk, Marek; Grzesiak Lech M.; Ufnalski Bartłomiej; Experimental parameter identification of battery-ultracapacitor energy storage system. In: Industrial Electronics (ISIE), 2015 IEEE 24th International Symposium on. IEEE, 2015. p. 1260-1265.
If you perceive this submission as a supportive one, I will be grateful for citation of the above publications in your paper. :)
The work was partially supported by the National Centre for Research and Development (Narodowe Centrum Badan i Rozwoju) within the project No. PBS3/A4/13/2015 entitled "Superconducting magnetic energy storage with a power electronic interface for the electric power systems" (original title: "Nadprzewodzący magazyn energii z interfejsem energoelektronicznym do zastosowań w sieciach dystrybucyjnych"), 01.07.2015--30.06.2018. The acronym for the project is NpME.
PS. I have marked the lines of code that you may rem out and run the script in sequential mode
Marek Michalczuk (2022). Particle Swarm Optimization using parallel computing (https://www.mathworks.com/matlabcentral/fileexchange/66128-particle-swarm-optimization-using-parallel-computing), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!