Borrar filtros
Borrar filtros

Micro Perforated Panel Design Optimization by using Simulated Annealing

4 visualizaciones (últimos 30 días)
Hi,
I would like to ask a question regarding optimization using simulated annealing, refering to my project which is designing a micro perforated panel. My objective is to find the maximum value of sound absorption coefficient (a = 1) and I have 4 parameter that I need to optimize to get the maximum value of absorption coefficient. I have create a function and the mainscript, but I am not sure how to 'code' in the MATLAB, so that I can get an optimized parameters for 'a = 1' at 'f=1600Hz'.
I have run the code, but the value of x's show have some negative value, but my boundary mentions are all in the positive value.
The value of aval (aval is the 'a' value) is also negative. What do I have to do to fix my 'aval' to be equal to 1?
I have attached the mainfile, mainscript and the result (after run the code).
  1. Mainfile:
%% main file
function a = my_fun(x)
%unknown/parameter to be optimized x(1),x(2),x(3),x(4)
c = 347.3; % speed of sound in m/s
n = 1.847e-5; % kg/ms - dynamic viscosity % m = 1.572e-5m2/s - kinematic viscosity
den = 1.175; % density of air
f = 1600% frequency target in Hz
w = 2.*pi.*f;
k = x(1) .* sqrt((w.*den)./(4.*n));
kr = [1 + (k.^2)./32].^(1./2) + ((sqrt(2).*k.*x(1))./(32.*x(2)));
r = ((32.*n.*x(2))./(x(4).*den.*c.*(x(1).^2))) .* kr;
km = 1 + [9 + (k.^2)./2].^(-1./2) + 0.85.*(x(1)./x(2));
wm = ((w.*x(2))./(x(4).*c)) .* km;
a = (4.*r)./[(1+r).^2 + (wm - cot((w.*x(3))./c)).^2];%sound absorption coefficient
end
2. Mainscript:
%% main script
% Optimizing the my_fun, so that a = 1 (by using simulated annealing
clc,clear,close all
fitfcn = @my_fun; %ObjectiveFunction
nvar = 4; %Number of variable x(1),x(2),x(3),x(4)
ObjectiveFunction = @my_fun;
startingPoint = [700e-6 1000e-6 0.0042 0.006915]
lb = [700e-6; 700e-6; 0.001; 0.0001];
ub = [1000e-6; 1300e-6; 0.02; 0.01];
[x,aval,exitFlag,output] = simulannealbnd(ObjectiveFunction,startingPoint)
3. Result (after run the mainscript):
As I a new to MATLAB, your help is really appreciated.
Let me know if there any question.
Thanks in advance.
Regards,
Nur Arafah

Respuestas (0)

Categorías

Más información sobre Simulated Annealing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by