Create a dipole antenna resonating at 75 MHz and calculate its maximum directivity.
Choose its length and width as design variables. Provide lower and upper bounds of length and width.
InitialDirectivity =
2.1002
Use the SADEA optimizer to optimize this dipole antenna for its directivity. Specify an evaluation function for optimization using the CustomEvaluationFunction
property of the OptimizerSADEA
object. The evaluation function used in this example is defined at the end of this example.
Run the optimization for 100 iterations.
View the best member data.
bestDesign =
bestMemberData with properties:
member: [4.7998 0.1101]
performances: -4.7895
fitness: -4.7895
bestIterationId: 50
bestdesignValues = 1×2
4.7998 0.1101
Update the reference antenna with best design values from the optimizer. Calculate directivity of the optimized design.
Observe an increase in directivity value after optimization.
postOptimizationDirectivity =
4.7895
View the surrogate model data used for prediction.
InitialData =
initializationData with properties:
members: [30×2 double]
performances: [30×1 double]
fitness: [30×1 double]
View the data for all iterations.
iterData =
iterationData with properties:
members: [68×2 double]
performances: [68×1 double]
fitness: [68×1 double]
Check if the algorithm has converged.
ConvergenceFlag = logical
1
Check how many times the evaluation function is computed.
Plot the convergence trend.
Following code defines the evaluation function used in this example.