Beamwidth and Peak Radiation Analysis
This example shows how to use AI-based analyses to compute key radiation pattern metrics, specifically the beamwidth and peak gain, for a horn antenna. It compares results from AI-based analyses with traditional electromagnetic (EM) simulations, showing that AI achieves comparable accuracy while drastically reducing computation time. Furthermore, you can perform these analyses across a wide frequency range in seconds, making this approach ideal for rapid antenna design and optimization.
Create AI-Based and Standard Horn Antennas
Use the design function to create an AI-based horn antenna model operating at 10 GHz. Then use the exportAntenna function to generate a standard horn antenna from the AI-based model.
f = 10e9; antAI = design(horn,f,ForAI=true); antEm = exportAntenna(antAI);
Analyze Beamwidth
AI‑based beamwidth analysis determines the half‑power beamwidth (HPBW) and the corresponding angles in the elevation and azimuth planes, which intersect along the major lobe of the antenna’s radiation pattern. HPBW is defined as the angular width of the major lobe between the points where the radiated power drops to half (−3 dB) of its maximum value. It is a key parameter used to characterize the directional performance of an antenna.
tic [bw,ang,plane] = beamwidth(antAI,f)
bw = 2×1
27.5029
30.4996
ang = 2×2
346.7615 14.2644
344.7485 15.2481
plane=2×3 table
Plane Slice SliceValue
___________ _____ __________
"Elevation" "Az" 0
"Azimuth" "El" 0
tAIBw = toc;
The plane output specifies the two principal planes to calculate the beamwidth. The first element in bw corresponds to the beamwidth in the elevation plane, obtained by slicing the radiation pattern at an azimuth angle (Az) of 0 degrees. The second element in bw represents the beamwidth in the azimuth plane, obtained by slicing the pattern at an elevation angle (El) of 0 degrees. The ang output provides the lower and upper angular bounds of the beamwidth in each respective plane.
Compute beamwidth using full-wave EM simulation along the elevation and azimuth planes. Quantize the results with a 1 degree resolution.
tic [bwpEl,angpEl] = beamwidth(antEm,f,0,0:1:360); [bwpAz,angpAz] = beamwidth(antEm,f,0:1:360,0); tEmBw = toc;
Evaluate the accuracy of the AI-predicted beamwidth values against those obtained from the full-wave simulation. Compute the relative error for the beamwidth and for the corresponding lower and upper angular bounds in both planes using the calcerr function defined in this section.
errbwp1 = calcerr(bwpEl,bw(1)); errLowerAngp1 = calcerr(angpEl(1),ang(1,1)); errUpperAngp1 = calcerr(angpEl(2),ang(1,2)); errbwp2 = calcerr(bwpAz,bw(2)); errLowerAngp2 = calcerr(angpAz(1),ang(2,1)); errUpperAngp2 = calcerr(angpAz(2),ang(2,2)); function err = calcerr(act,pred) err = (abs(act-pred)/act)*100; end
Tabulate the results to compare the AI and EM analysis outputs along with the computed errors and analysis time.
predValues = [bwpEl,angpEl(1),angpEl(2), bwpAz,angpAz(1),angpAz(2)]'; actualValues = [bw(1),ang(1,1),ang(1,2),bw(2),ang(2,1),ang(2,2)]'; errors = [errbwp1,errLowerAngp1,errUpperAngp1,errbwp2,errLowerAngp2,errUpperAngp2]'; tab_bw = table(predValues,actualValues,errors,... VariableNames=["EM","AI","Relative Error (%)"],RowNames=["Beamwidth Az (deg)",... "Lower Angle Az (deg)","Upper Angle Az (deg)","Beamwidth El (deg)",... "Lower Angle El (deg)","Upper Angle El (deg)"])
tab_bw=6×3 table
EM AI Relative Error (%)
___ ______ __________________
Beamwidth Az (deg) 28 27.503 1.7754
Lower Angle Az (deg) 346 346.76 0.2201
Upper Angle Az (deg) 14 14.264 1.8888
Beamwidth El (deg) 32 30.5 4.6886
Lower Angle El (deg) 344 344.75 0.21759
Upper Angle El (deg) 16 15.248 4.6991
tab_bw_time = table(tEmBw,tAIBw,tEmBw/tAIBw,VariableNames=["EM","AI","Speed Up"],RowNames="Time (sec)")
tab_bw_time=1×3 table
EM AI Speed Up
______ ______ ________
Time (sec) 7.6804 1.2628 6.0823
The AI-based beamwidth analysis shows strong agreement with the EM results, with all relative errors within 5%. Additionally, the significant reduction in computation time highlights the efficiency of the AI approach.
Analyze Peak Radiation
Analyze the peak radiation of the AI-model-based horn antenna using the peakRadiation function. This function returns the maximum gain of the antenna along with the corresponding azimuth and elevation angles.
tic [pgAI,azAngAI,elAngAI] = peakRadiation(antAI,f); tAIPg = toc;
Analyze peak radiation of the regular horn antenna.
tic [pgEm,azAngEm,elAngEm] = peakRadiation(antEm,f,0:1:360,-90:1:90); tEmPg = toc;
Calculate the error for three outputs.
errPg = calcerr(pgEm,pgAI); errAz = calcerr(azAngEm,azAngAI); errEl = calcerr(elAngEm,elAngAI);
The AI-based analysis shows strong agreement with the EM simulation results while requiring significantly less computation time. Refer to the table for a comparison of the time taken by the AI and EM analyses.
predValues = [pgEm,azAngEm,elAngEm]'; actualValues = [pgAI,azAngAI,elAngAI]'; errors = [errPg,errAz,errEl]'; tab_pg = table(predValues,actualValues,errors,... VariableNames=["EM","AI","Relative Error (%)"],RowNames=["Peak Gain (dBi)",... "Azimuth Angle (deg)","Elevation Angle (deg)"])
tab_pg=3×3 table
EM AI Relative Error (%)
______ ________ ___________________
Peak Gain (dBi) 15.472 15.51 0.24546
Azimuth Angle (deg) 0 0 NaN
Elevation Angle (deg) 0 0.042063 Inf
tab_pg_time = table(tEmPg,tAIPg,tEmPg/tAIPg,VariableNames=["EM","AI","Speed Up"],RowNames="Time (sec)")
tab_pg_time=1×3 table
EM AI Speed Up
______ ________ ________
Time (sec) 70.692 0.061116 1156.7