Patch array antenna model

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Post Reply
Posts: 2
Joined: Wed 22 Aug 2018, 15:29

Patch array antenna model

Post by mt4 » Wed 22 Aug 2018, 16:22


First of all, thanks a lot for making this great tool available for everyone.

I am trying to simulate a very simple 2x2 patch array at 30GHz, with patches and in-line corporate feed in the same layer, on a substrate and a ground layer behind that. There is a single lumped port to the feed line. I have been trying to adapt the Patch_Antenna_Array.m file in the openEMS\matlab\examples\antennas folder and the Patch_Antenna_Phased_Array.m script from the openEMS\matlab\tutorials\antennas folder. I have had more success with the former, and the CSX geometry plot is exactly how I want it. However, I am not getting any meaningful results with a zero plot for 'feed point impedance', 'voltage ut1' and then the following error when plotting S11:

Code: Select all

Error using hdf5lib2
The HDF5 library encountered an unknown error.

Error in (line 35)
attr = H5ML.hdf5lib2('H5Aread', attr_id, dtype_id);

Error in h5readatt (line 49)
raw_att_val =,'H5ML_DEFAULT');

Error in ReadHDF5Attribute (line 30)
        attr = double(h5readatt(file,groupname,attr_name));

Error in ReadNF2FF (line 22)
nf2ff.freq = ReadHDF5Attribute(file,'/nf2ff','Frequency');

Error in CalcNF2FF (line 140)
nf2ff = ReadNF2FF(nf2ff);

Error in Patch_Antenna_Array_test (line 317)
nf2ff = CalcNF2FF(nf2ff, Sim_Path, f_res, thetaRange*pi/180, phiRange*pi/180);
I feel that I am likely misunderstanding the way ports are defined in OpenEMS as the U and I arrays have vectors of zeros for .val or it may be that I have not defined my mesh correctly, although I've tried to keep to the -1/3 2/3 format as previously mentioned in the threads. Should I be defining my port in a different way to how it is done in the example and tutorial for what I am trying to do? Please find the script I am trying to run attached.

Thank you,
(12.72 KiB) Downloaded 685 times

Posts: 173
Joined: Fri 13 May 2016, 02:54

Re: Patch array antenna model

Post by Hale_812 » Thu 23 Aug 2018, 02:49

1)After MS updated Windows 7-10 kernels, fixing Spectre and Meltdown vulnerabilities, APPCSXCAD behaves very weird. Generally it creates delay when intercepted by antiviruses, from 15 seconds to 15 minutes; rarely crashing. Probably, nothing can be done without making totally new tool for Windows.

2)Too little timesteps. Remember, that is FDTD, and mesh criteria is 20 points per wavelength. Every point is a timestep with wave velocity. Just remove the timestep limit and base the simulation on -30~ -45dB criterion.

3)You did not understand how DefineRectGrid works.
You pass there "mesh". It copies mesh to CSX structure. Not the mesh pointer, but the data. After that, any changes to "mesh" have no meaning, until you call DefineRectGrid again.
Therefore call DefineRectGrid in the end of the script, just before the lumped ports definition.
In lumped ports do not use explicit coordinates, rather use "mesh" values. You can use interp1 (mesh.x, mesh.x, desired_x, "nearest") for snapping to grid, or just address mesh.x(i) directly .

4) check HDD free space. Sometimes, it is just the temp data filled all the space....

Here is your mesh, and it looks quite fine, when the script is fixed (for unknown reason I waited 20 minutes, until AppCSXCAD has opened its window). BTW, there is nothing on the other side of the substrate.
I did not try simulating it, so don't know are there other errors. Just can say that the solver starts well.
Capture2.PNG (51.74 KiB) Viewed 11699 times
Capture1.PNG (20.94 KiB) Viewed 11699 times

Posts: 2
Joined: Wed 22 Aug 2018, 15:29

Re: Patch array antenna model

Post by mt4 » Fri 24 Aug 2018, 09:39

Hi Hale_812,

Thank you so much for your reply. I have changed what you said, especially about DefineRectGrid and stipulating the position of the port as mesh values, and the simulation is running correctly!

In a lot of the patch antenna designs I have seen, the sharp corners of feed lines are cut-off at an angle. I was wondering whether you could point me in the right direction of an explanation for how to design these trims (e.g. if you remember that this was covered in Balanis, Pozar, etc.) or if there is a general rule of thumb? My other question was about how you think it is best to define this geometry change in OpenEMS. I have been looking at AddPolyhedron.m but is there a function that can cut-away from the feed line boxes I have already defined, maybe along a specified plane?


Posts: 173
Joined: Fri 13 May 2016, 02:54

Re: Patch array antenna model

Post by Hale_812 » Mon 27 Aug 2018, 02:59

cutting corners is for excitation of transverse mode in elliptically polarized antennas. you can google for elliptical patch antenna pictures, there are a lot of examples.

you can make a "priority cut", since there are no boolean operations (so sad). Or use an extruded poly. Personally, I prefer latter method, because with it you are safe from geometry errors, and the visualization is ready for report.

just don't forget do define denser mesh, where diagonal lines, and oblique surfaces happen.

BTW, even 64bit Octave/Matlab is prone to numeric errors. More, they use FPU sin, cos, tan. And Inel's FPU tan gives awful truncation errors. So, when calculating, use AMD cpu, or truncate the argument manually. And whenever possible, replace sin/cos with Pythagorean squares. That was about calculating fine matching diagonals.

Posts: 8
Joined: Sun 22 Jan 2017, 22:39

Re: Patch array antenna model

Post by Henkel » Sun 13 Dec 2020, 04:18

In case anyone is interested, looks like the author met some success in the simulations: ... ubeSat.pdf

Posts: 1528
Joined: Mon 27 Jun 2011, 12:26

Re: Patch array antenna model

Post by thorsten » Sun 13 Dec 2020, 10:40

Yes very interesting, thanks for the link!

Post Reply