File Exchange

image thumbnail

Hybrid GWOPSO optimization

version 2.1.0 (30.4 KB) by Abhishek Gupta
This script implements the hybrid of PSO and GWO optimization algorithm. This code is developed at


Updated 07 Jan 2019

View Version History

View License

This script implements the hybrid of PSO and GWO optimization algorithm.
This code is developed at and the detail description can be checked at

Cite As

Abhishek Gupta (2021). Hybrid GWOPSO optimization (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (19)


Thank you for your code. Which article did your code come from? I want to quote it.


Can you please tell me how to add my below objective function to this code:

function [ Y ] = MyFun( K)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
global Kp ;
global Ki ;
global Kp1 ;
global Ki1 ;
Y = trapz(df.^2+df1.^2);

s huang


Abhishek Gupta

@S Huang: this PSOGWO needs fine-tuning for better results. it's a raw code which we tuned for our application in power system. You may take a reference from this for your application.

s huang

Newcomer. Sir, may I ask the results of the program to run PSOGWO better, and sometimes GWO is better, can you conclude that PSOGWO is better?

ashutosh singh

Kacjer Frank

I have check the original code of the GWO and I correct the error I mentioned before, using the code you provided, the results show that for most of the benchmark functions, the original algorithm GWO has better performance than PSOGWO. Probably you can have a try and tell me if I am wrong.

Abhishek Gupta

@Kacjer Frank: the GWO.m is borrowed from this paper The hybrid might not putperform for all benchamrk functions but outperforming for maximum of those. It has been tested on NN weights and biase tuning, feature selection and classification also. Let me know your application where it is not improving.

Kacjer Frank

Well, I mean shouldn't the position updating of search agents is influenced by all three leaders' position? The updating for the search agents in the code file ‘GWO.m’ is supposed be a third of the sum rather than being divided by the D_Delta first and then adding other two D value of alpha and beta. And I didn't find the performance of the hybrid algorithm outperform the original GWO algorithm. Please inform me if I am wrong, thank you.

Abhishek Gupta

@Kacjer Frank : what are missing brackets. This code is uploaded for benchmark functions here and results are improved than GWO.

Kacjer Frank

Thanks, but the performance seems not good due to the missing brackets in GWO flie. Anyway, a good idea to combine the two algorithms.

Abhishek , in the files there is GWOPSO. there are only 2 GWO files with only the same grey wolf optimizer. please upload the GWOPSO file.

Abhishek Gupta

GWOPSO file was uploaded with others. Probably this repository has some technical glitches. It is showing the GWO.m twice. I uploaded a new version too but showing same. Please follow this link to obtain that file

Praveen Pawar

GWOPSO file missing

xiaofei wang

Hello Sir, How can I obtain the paper of GWOPSO?

Abhishek Gupta

New changes: uploaded the GWOPSO file too


GWO pso , where is the function?

Deepak Kumar Lal

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!