RF

2.4GHz PCB Patch Antenna V2 Design with Matlab

I previously create a PCB patch antenna using the Matlab antenna design toolbox and had some pretty good results, but the narrow bandwidth of patch designs means that small errors in the simulation parameters cause a shift away from your desired frequency. My old post into the details of my journey of learning about patch antennas and how to use the Matlab toolbox to create a design can be found below…

Lessons Learned

Version 1 suffered from one main flaw that I could not have determined apriori, that being the permittivity of the OSHPark PCB FR4 material so my estimate of 3.6 was too low. To remedy this I took my original simulation and began to modify the permittivity parameter until the simulated response shifted to the measured frequency from the VNA.

This worked out to be an Er = 4.35 to shift the V1 design to 2.67GHz.

Tweaked Parameters

I then created a new design based on the old patch antenna with the modified permittivity constant. Because of my vigilance in creating a Matlab script that used variables to define the patch I could easily play with the physical dimensions of the patch to create a 2.45GHz design.

ParametersV1 – 2.67GHzV2 – 2.45GHz
Er4.354.35
Patch Length (m)0.02560.0281
Notch Length (m)2.685e-3 x 1.72.685e-3 x 2

The patch was slightly lengthened and the notch length was increased to adjust the 50ohm matching point for the 2.45GHz center frequency. These are coupled parameters so multiple iterations were done to arrive at this point.

Moving Matlab Versions

One other thing that I did in the interim was to upgrade my Matlab version from “2018a” to “2020a”. This means I had updated models, but there was a downside that was lurking. The meshing function that I was using in the previous version that would get automatically called was showing me different results between the versions! This is not good as it puts in doubt the computations in the new version.

I found that the solution to this was to manually define the mesh on the antenna which resolved the main dispute between the simulations and stabilized the design across versions.

%% Before
basicPatch.FeedLocations = [Lg/2 0 1];
figure
show(basicPatch)

%% After
basicPatch.FeedLocations = [Lg/2 0 1 3];
basicPatch.FeedDiameter = mw50/2;
figure
show(basicPatch)
figure;
mesh(basicPatch, 'MaxEdgeLength',2.5e-3,'MinEdgeLength',0.8e-3);

Meshing the antenna is critical to the simulation performance, smaller mesh elements increase the accuracy and repeatability of a simulation. Matlab will auto mesh the antenna but defining the mesh yourself is a good idea as we will see in the results below. The mesh defines a lattice of small geometric elements that make up the antenna structure and guide the electromagnetic simulation.

Rerunning the simulations with the defined mesh in both versions shows much more promise. The radiation patterns are basically the same but the S11 values are still a bit off. This could be a product of how the mesh gets generated in each version with slightly different lattice patterns.

The differing results are still concerning, but it’s probably best to use the most up-to-date version of the software and freeze that while you are making changes to the design geometry to match a particular frequency.

Output to OSHPark 1

Like the last time, this was supposed to be easy, but because of my switch to a different OS and Matlab version, something went horribly wrong. In my first design, I used the PCB generator in Matlab to define an edge mount SMA connector that should extend from the defined board by just enough to allow for the connector to be placed. Unfortunately, Matlab seems to have a bug, so when the Gerber files were generated the connector pads get cut off. I did not catch this before I submitted the design, so I ended up with 6 antennas that do not have connector pads.

I did remedy this by sanding off the solder mask a bit and was able to solder an SMA connector on but the frequency response was a bit off from the designed frequency. Resulting in an antenna centered at 2.4GHz instead of 2.45GHz

This shift could also have come from me selecting the “After Dark” FR4 that could have a different Er than the default selection.

Output to OSHPark 2

To fix the no connector issue was very easy, I just removed the extend board option and the connector was placed correctly. I did extend the ground plane dimensions a bit to compensate for the connector as it was a bit too close to the antenna without it.

These came back looking good!

Measurement

I hooked one of the new PCB antennas up to my NanoVNA V2 and finally got my antennas spot on! what a relief.

Compared to my first attempt you can literally see the difference in the size of the patch. The one on the left is the V2 and you can see it is much larger due to its now lower frequency response.

Design Files

You can find the Matlab design script on my Github, but be sure to only get these antennas manufactured with OSHPark. Otherwise, the permittivity may be different for other manufactures as I have not tried any others.

GitHub: 2.4GHz Antenna Design V2

2 thoughts on “2.4GHz PCB Patch Antenna V2 Design with Matlab”

Comments are closed.