image thumbnail

optimization of DC motor speed controller through ICA

by

 

optimization of PI controler of DCmotor speed control by Imperialist competitive algorithm

PossesEmpire(TheEmpire)
function TheEmpire = PossesEmpire(TheEmpire)
    
    ColoniesCost = TheEmpire.ColoniesCost;

    [MinColoniesCost BestColonyInd]=min(ColoniesCost);
    if MinColoniesCost < TheEmpire.ImperialistCost

        OldImperialistPosition = TheEmpire.ImperialistPosition;
        OldImperialistCost = TheEmpire.ImperialistCost;

        TheEmpire.ImperialistPosition = TheEmpire.ColoniesPosition(BestColonyInd,:);
        TheEmpire.ImperialistCost = TheEmpire.ColoniesCost(BestColonyInd);

        TheEmpire.ColoniesPosition(BestColonyInd,:) = OldImperialistPosition;
        TheEmpire.ColoniesCost(BestColonyInd) = OldImperialistCost;
    end

end

Contact us