Comparing MMANA-GAL with measurements of a biquad antenna

17.03.2023 9:45

My dad recently made a biquad antenna for the 2.4 GHz band. He optimized the geometry in the MMANA-GAL software. I've measured the S-parameters of the antenna using my home-made VNA and compared it to the simulation results produced by MMANA-GAL. Measured VSWR is slightly higher than predicted and the resonance is off by around 30 MHz, but otherwise the measurements show roughly similar results than the simulation.

The antenna is made in an old CD-R cake box. The driven element is a 1.5 mm diameter copper wire bent into the figure eight shape. Center of the wire is positioned 15 mm above a circular reflector made out of steel foil with a diameter of 122 mm. A coaxial feed line goes through the reflector and attaches to one side of the element. The feed line is soldered to a SMA connector on the bottom of the box. There is some more info on the construction of biquad antennas for the 2.4 GHz band on this page.

Biquad antenna in a CD-R cake box with two sizes of covers.

Two transparent covers of different heights fit over the antenna: the high cover measures 50 mm in height. The low cover measures 23 mm in height. The low cover sits just above the element. Both covers are made of polypropylene. I've measured the antenna with each cover as well as with no cover installed.

Biquad antenna modelled in MMANA-GAL.

The antenna models in MMANA-GAL consist of a collection of wires. The solid reflector plate was modeled as a grid of wires, with spacing small compared to the wavelength. Diameter of the wires in the model was 0.8 mm and "Cu wire" was selected for the loss model. The signal source in the model was placed directly at the element. Antenna was simulated in free space. MMANA-GAL has no capability to simulate dielectrics around the antenna, so the effect of the box was not simulated.

The built-in optimization function of MMANA-GAL was used to optimize the geometry of the driven element for the best VSWR at 2450 MHz. This produced the slightly elongated shape of the element (note that the corners are not 90 degrees)

My small home made vector network analyzer.

I've measured the complex reflection coefficient of the antenna using my home-made VNA. I've written about it previously on my blog. It consists of a custom RF bridge and a multiplex board. The detector is a modified HackRF SDR and the stimulus signal is generated with the ERASynth Micro synthesizer. Instrument control and signal processing is performed by a PC running software based on scikit-rf.

The antenna was connected to the VNA with 50 cm of a SS405 semi-rigid coaxial cable. The calibration plane was at the SMA connector at end of the cable. I used the short-open-load calibration with the SMA calibration kit I've written about previously. I used the SMA female-to-female adapter from the kit to connect the calibration standards to the male connector at the end of the cable.

I've measured the antenna inside a room. This probably means that reflections from walls affected the measurements. The measurements shown here were done with the antenna flat on a table, facing the ceiling. I repeated the measurement with the antenna in other orientations. The measured VSWR curve was very similar to the one shown.

Measured and simulated VSWR of the biquad antenna.

The measured resonance without the cover is around 28 MHz higher than predicted by MMANA-GAL. If I assume that this difference in resonance is only due to the difference in element size between the model and the real antenna the corresponding difference is only around 0.3 mm. This is well within the tolerances of such a hand-made antenna.

MMANA-GAL calculated a lower VSWR at resonance than what my measurement shows. It predicted 1.06 (30 dB reflection loss), while I measured 1.21 (20 dB reflection loss).

The cover also affects the resonance. Polypropylene has a relative permittivity of around 2.3. Since the propagation speed is lower, the wavelength is lower as well. This means that the same antenna should have a lower resonance frequency in polypropylene than in empty space. The measurements agree with that. With the low cover the resonance is lower by about 55 MHz. If I consider the entire band from 2.4 GHz to 2.5 GHz, the antenna actually performs better with the low cover, since the maximum VSWR inside the band is lower in this case. On the other hand, the high cover is apparently far enough from the element that it has almost no effect. The measured VSWR with the high cover was very similar to the VSWR with no cover.

An archived post on Wireless Nederland forum lists some VSWR measurements of a similar antenna. At 15 mm height of the element above the reflector they measured 1.20. They find an optimum at 17 mm height with VSWR of 1.15. I'm guessing these measurements were made with the driven element sized to 1/4 wavelength, not the optimized geometry produced by the MMANA-GAL in our case.

Reflection coefficient of the biquad antenna shown on a Smith chart.

The measured reflection coefficient on the Smith chart differs from the simulated. I'm guessing this is because of the electrical length of the feed line. I calibrated the VNA before the feed line, so I also measured the phase delay incurred by it. On the other hand, in the simulation the signal source was directly at the driven element and does not include this delay.


I think the measurements fit nicely with the simulations. Differences in resonance frequency can easily be attributed to mechanical tolerances. At these frequencies a tenth of a millimeter difference can already produce measurable deviations in antenna performance. There is also the fact that the feed line and cover were not included in the simulation and that the reflector is steel, not copper. Even though the measured performance is slightly worse than what was predicted with MMANA-GAL, 1.21 VSWR is still a very good result, indicating that 99% of the power is being radiated out of the antenna.

Posted by Tomaž | Categories: Analog | Comments »

z80dasm 1.2.0

02.03.2023 18:48

Today I've released z80dasm 1.2.0, a new version of the disassembler for the Zilog Z80 and compatible microprocessors. My thanks for this release goes to two kind contributors that sent in patches that added new functionality.

Back in March 2021 Ben Hildred submitted a patch through the Debian bug tracking system adding partial support for the Zilog Z180 instruction set. Zilog Z180 is a lesser-known successor to the Z80 that was released by Zilog around 10 years after the popular Z80. I don't have any hands-on experience with it, but I thought Ben's patch would be a useful addition to the z80dasm functionality. Since Z180 largely shares the instruction set with Z80 not much new code was needed. Using the Z180 datasheet I added support for the instructions that Ben missed, so baring any undocumented instructions or mistakes on my part, the Z180 support in z80dasm should be complete. It can be enabled using the new --z180 command-line option.

More recently, Michael Riviera sent me a patch by email that added the possibility of copying comments from the symbol file to the disassembly. To produce a more readable output, z80dasm allows you to define symbol names in a separate symbol file. The symbol names are used to define labels in the disassembly so that, for example, function names instead of memory addresses are used in calls. If you also have some comments above the definitions in the symbol file, Michael's new code can now copy them to the output, above the label definition. This can be used to get function documentation in the disassembly. The feature can be enabled using the new --sym-comments command-line option.

Finally, Michael also submitted a patch that improved the alignment of columns in the disassembly. z80dasm's output consists of several columns, depending on the settings. The old code attempted to keep the columns somewhat aligned, but did a bad job at it with a mix of spaces and tabs. Especially if you defined symbols with longer names the output required manual editing if you wanted to have a nice looking disassembly.

I didn't keep Michael's implementation, but the discussion about it did prompt me to clean up and refactor the code that deals with the output formatting. The new z80dasm should now do a much better job at aligning the columns. The new code is also configurable at run time, to allow for different personal preferences regarding column widths and tab sizes. See the new --tab-width and --tab-stops command-line options in the man page.

The new source package is available in the same place as before. See the enclosed README and the man page for build and usage instructions.

I will work on getting the updated package into Debian as my time permits. It will definitely be updated after Debian 12/Bookworm, since there is already a freeze in place.

Posted by Tomaž | Categories: Code | Comments »