Optimization problem with complex number in patternsearch command
Mostra commenti meno recenti
clc; clear;
%% Model
% Prameters
N = 64; % #of antenna element
angle = -pi/2:0.005:pi/2; % Define angle within visible region (rad)
degree=angle.*180./pi; % rad -> degree
u=sin(angle); % Define u space
% Arrayfactor without weights (d=0.5lambda)
n=(1:N)';
steeringangle=60;
us=0;
% us=sind(steeringangle);
arrayfactor=exp(-i*(-(N+1)/2+n)*pi*u); % For objfun
% Desired pattern for beam1
Beam_left=-pi/4;
Beam_right=pi/4;
for num = 1:size(angle,2)
if ( (angle(num) >= Beam_left) & (angle(num) <= Beam_right) )
Beam_d(num)=1;
else Beam_d(num)=0;
end
end
%% Optimization for beam
p=4;
objfun = @(w)(2/length(u)*sum(abs(abs(w'*arrayfactor)-Beam_d).^p)).^(1/p); % Objective functin
weights_i = [ones(N,1),i*ones(N,1)]; % Initial setting for w
weights_o = patternsearch(objfun,weights_i,[],[],[],[],[],[ones(N,1),ones(N,1)]);
Hello,
I am trying to write code to synthesis antenna array with optimization command.
However, I could not get complex optimization values.
And can I give constraint like 'abs[weights_i(complex number)] <= 1' as a upper bound?
Thank you so much.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Antenna and Array Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!