个人主页:研学社的博客
欢迎来到本博客❤️❤️
博主优势:博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
本文目录如下:
目录
1 概述
2 运行结果
2.1 ABC
2.2 PSO
2.3 SQP
3 参考文献
4 Matlab代码实现
本文基于ABC、PSO和SQP优化算法实现电力变压器绕组的独特电路合成研究。使用基于群体和梯度的算法估计变压器绕组的高频梯形电路变量。
部分代码:
clear all
clc
global N
global r
global Ceq
global Cg_eff
global foc
global fsc
global foc_estimated
global fsc_estimated
global oc_error
global sc_error
global Leq
global K
N=9;
r = (10/N/1000);
Ceq=0.43;
Cg_eff=1.7;
Leq=382;
Cg0 = Cg_eff/N;
X0 = rand(N,1);
Y0 = rand(1,1);
Z0 = rand(1,1);
U0 = [X0; Y0; Z0];
particle=U0;
empty_particle.Position= [];
empty_particle.Velocity= [];
empty_particle.Cost= [];
empty_particle.Best.Position= [];
empty_particle.Best.Cost= [];
ub =[12,12,12,12,12,12,12,12,12,12,12];
lb = [0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001];
options = optimoptions('particleswarm','InertiaRange',[0.35,0.9],'SelfAdjustmentWeight',0.6,'SocialAdjustmentWeight',0.9,'MaxIterations',1000,'Display','iter','swarmsize',30);
optim.options.particleswarm.StallGenLimit = 50;
[U,fval,exitflag,output] = particleswarm(@cons_objec,11,lb,ub,options)
foc';
foc_estimated';
fsc';
fsc_estimated';
disp('Values of circuit parameters-')
Lvalues = U(1:N)';
Cs_values = U(N+1)';
Cg_values = U(N+2)';
Lvalues
Cs_values
Cg_values
clear all
clc
tic
global N
global r
global Ceq
global Cg_eff
global foc
global fsc
global foc_estimated2
global fsc_estimated
global oc_error
global sc_error
global Leq
global K
global ok
global GlobalParams
global pen9
global leq
global pen66
global normtotal
N=9;
r = (10/N/1000);
i=1;
foc=[0.009;0.023;0.041;0.072];
fsc=[0.019;0.038;0.068];
Ceq=0.43;
Cg_eff=1.7;
Leq=382;
runABC;
oc1 = length(foc);
oc2 = length(foc_estimated);
sc1 = length(fsc);
sc2 = length(fsc_estimated);
error1 = [oc_error' zeros(1,(oc2-oc1))];
error2 = [sc_error' zeros(1,(sc2-sc1))];
foc';
foc_estimated';
fsc';
fsc_estimated';
error1;
error2;
disp('Values of circuit parameters-')
Lvalues = GlobalParams(1:N)';
Cs_values = GlobalParams(N+1)';
Cg_values = GlobalParams(N+2)';
foc_estimated
%fsc
fsc_estimated
Lvalues
error1
error2
Cs_values
Cg_values
%normtotal
toc
部分理论来源于网络,如有侵权请联系删除。
[1]Rajesh Reddy, Krupa Shah, Manjunath Kallamad (2023) Towards Unique Circuit Synthesis of Power Transformer Winding Using Gradient and Population Based Methods