optimize
Syntax
Description
optimizes the pcb components catalog object at the specified frequency.optimizedobj = optimize(pcbcatobj,frequency,objectivefunction,propertynames,bounds,algorithm)
optimizes the using additional options specified by one or more name-value
arguments (Antenna Toolbox).optimizedobj = optimize(___,Name=Value)
Examples
This example shows the otimization of a Wilkinson Splitter pcb catalog object
Create Wilkinson Splitter
Use the design function to create a Wilkinson Splitter at 3 GHz
obj = design(wilkinsonSplitter,3e9);
Set up the optimization parameters and run
Optimize, visualize, and plot the s parameters
bounds = {10e-3 1e-3 50 2e-3 10e-3; 50e-3 8e-3 100 20e-3 50e-3};
constraints.S11 = '<-10';
constraints.S21 = '>-4';
constraints.S22 = '<-10';
constraints.S12 = '>-4';
prop = {'SplitLineLength','SplitLineWidth','Resistance','PortLineLength','GroundPlaneWidth'};
op = optimoptions('patternsearch');
op.Algorithm ='nups';
op.Display = 'iter';
op.PlotFcn = @psplotbestf;
optiobj = optimize(obj,2e9,"minimizeArea",prop,bounds,"patternsearch","Constraints",constraints,'OptimizerOptions',op);Iter Func-count f(x) MeshSize Method
0 1 0.0033999 1
1 4 0.0013999 2 Successful Poll
2 10 0.000669459 4 Successful Poll
3 16 0.000669459 2 Refine Mesh
4 22 0.000669459 1 Refine Mesh
5 28 0.000669459 0.5 Refine Mesh
6 34 0.000401675 1 Successful Poll
7 41 0.000401675 0.5 Refine Mesh
8 48 0.000401675 0.25 Refine Mesh
9 52 0.000401675 0.125 Refine Mesh
10 56 0.000401675 0.0625 Refine Mesh
11 60 0.000401675 0.03125 Refine Mesh
12 64 0.000401675 0.01562 Refine Mesh
13 69 0.000401675 0.007812 Refine Mesh
14 74 0.000401675 0.003906 Refine Mesh
15 79 0.000401675 0.001953 Refine Mesh
16 84 0.000401675 0.0009766 Refine Mesh
17 92 0.000400947 0.0009766 Successful Poll
18 100 0.00040022 0.0009766 Successful Poll
19 108 0.000399493 0.00293 Successful Poll
20 116 0.000397316 0.008789 Successful Poll
21 124 0.000390814 0.02637 Successful Poll
22 132 0.000371566 0.0791 Successful Poll
23 140 0.00031616 0.2373 Successful Poll
24 146 0.000197048 0.4746 Successful Poll
25 153 0.000197048 0.2373 Refine Mesh
26 160 0.000197048 0.1187 Refine Mesh
27 165 0.000197048 0.05933 Refine Mesh
28 170 0.000197048 0.02966 Refine Mesh
29 174 0.000197048 0.01483 Refine Mesh
30 178 0.000197048 0.007416 Refine Mesh
Iter Func-count f(x) MeshSize Method
31 182 0.000197048 0.003708 Refine Mesh
32 186 0.000197048 0.001854 Refine Mesh
33 194 0.000195915 0.002781 Successful Poll
34 202 0.000194219 0.004171 Successful Poll
35 210 0.000191682 0.01251 Successful Poll
36 218 0.000184131 0.03754 Successful Poll
37 226 0.000165511 0.1126 Successful Poll
38 234 0.000165511 0.05631 Refine Mesh
39 242 0.000165511 0.02816 Refine Mesh
40 250 0.000165511 0.01408 Refine Mesh
41 258 0.000158529 0.02112 Successful Poll
42 266 0.000158529 0.01056 Refine Mesh
43 274 0.000153292 0.01584 Successful Poll
44 282 0.000151921 0.02376 Successful Poll
45 290 0.000151921 0.01188 Refine Mesh
46 297 0.000151921 0.005939 Refine Mesh
47 303 0.000151921 0.00297 Refine Mesh
48 310 0.000151921 0.001485 Refine Mesh
49 318 0.000151191 0.002227 Successful Poll
50 326 0.000151191 0.001114 Refine Mesh
51 334 0.000151095 0.00167 Successful Poll
52 342 0.000151095 0.0008352 Refine Mesh
53 350 0.000151095 0.0004176 Refine Mesh
54 358 0.00015089 0.0004176 Successful Poll
55 366 0.00015089 0.0002088 Refine Mesh
56 374 0.000150788 0.0002088 Successful Poll
57 382 0.000150788 0.0001044 Refine Mesh
58 388 0.000150788 5.22e-05 Refine Mesh
59 393 0.000150762 5.22e-05 Successful Poll
60 398 0.000150762 2.61e-05 Refine Mesh
Iter Func-count f(x) MeshSize Method
61 403 0.000150762 1.305e-05 Refine Mesh
62 404 0.000150762 6.525e-06 Refine Mesh
63 406 0.000150762 3.263e-06 Refine Mesh
64 408 0.000150762 1.631e-06 Refine Mesh
65 408 0.000150762 8.156e-07 Refine Mesh
patternsearch stopped because the mesh size was less than options.MeshTolerance.

figure,show(optiobj);

spar = sparameters(optiobj,linspace(1e9,5e9,51)); figure,rfplot(spar)

Input Arguments
PCB object to optimize, specified as an object from the PCB Components Catalog or as a pcbComponent object.
Example: microstripLine
Operating frequency of the PCB Components Catalog object specified as a positive scalar in Hertz.
Example: 70e6
Data Types: double
Objective of antenna or array optimization, specified as a string from one of the following:
maximizeBandwidth— Maximize the operation bandwidth of the object. Use this objective function for optimizing in wideband applications.minimizeBandwidth— Minimize the operation bandwidth of the object. Use this objective function for optimizing in narrowband applications.minimizeArea— Minimizes the maximum area occupied by the object.maximizeReturnLoss— Maximizes the retuen loss of the objectCustom objective function — Optimizes the antenna or array as per the user defined objective function.
Data Types: string
Properties of the object to be included in the optimization, specified as a cell
array of character vectors. The property names are selected as the design variables in
optimization. For a pcbComponent object variable names need to
specified.
Example: {'Length','Width'}
Data Types: cell
Lower and upper bounds of design variables, specified as a two-row cell array.
Example: For a microstripLine: {7e-3 3e-3 20e-3;20e-3
8e-3 40e-3}
Data Types: double
The name of the algorithm to be used in the optimization.
Example: 'patternsearch'
Data Types: string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: Constraints={'Area < 0.03'}
Optimization constraints, specified as a cell array of strings or character vectors. Each character vector or string must be specified in the following format: (analysis function) (inequality sign) (value). Constraints may also be specified in a structure format with each constraint as a separate field in a structure.
The inequality signs '<' or '>' and the
values specifies the analysis function limits. For example, 'Area <
0.03' indicates that the area of the optimizing antenna must be less than
0.03 square meter.
Example: {'S11<1-10','S12>-4','S21,-4,'S22<-10','S33,-10','S23<-20'}
specified in cell format
Example: C.S11 = '<-10' as a field in a
structure.
Data Types: string | struct
Weight or penalty of each constraint function, specified as a row matrix with the
same number of inputs as the Constraints, specified in the same
order.
Reference impedance of object being optimized, specified as a scalar in ohms, to
be used to compute results such as sparameters.
Example: 75
Data Types: double
optimoptions property available for optimizers. The
optimoptions can be defined and object can be specified as in
input.
Output Arguments
Optimized object, returned as a pcbComponentsCatalog object or
pcbComponent object.
Version History
Introduced in R2025a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)