Main Content


Create gap-coupled ring resonator in microstrip form

Since R2022b


Use the resonatorRing object to create a gap-coupled ring resonator in the microstrip form. Resonant structures such as rectangular, circular, and ring resonators are used in oscillators and filters.

Three part image from right to left: Default image of a ring resonator. Current distribution on the ring resonator. S-parameters plot of the ring resonator.




resonator = resonatorRing creates a default gap-coupled ring resonator. The default properties of the ring resonator are for a design frequency of 1 GHz.


resonator = resonatorRing(Name=Value) sets Properties using one or more name-value arguments. For example, resonatorRing(RingWidth=0.045) creates a ring resonator with a ring width of 0.045 meters. Properties not specified retain their default values


expand all

Length of the port line in meters, specified as a positive scalar.

Example: resonator = resonatorRing(PortLineLength=0.045)

Data Types: double

Width of the port line in meters, specified as a positive scalar.

Example: resonator = resonatorRing(PortLineWidth=0.0061)

Data Types: double

Gap between the port lines and the ring in meters, specified as a positive scalar.

Example: resonator = resonatorRing(CouplingGap=0.002)

Data Types: double

Outer radius of the ring in meters, specified as a positive scalar.

Example: resonator = resonatorRing(RingRadiusOuter=0.0481)

Data Types: double

Width of the ring in meters, specified as a positive scalar.

Example: resonator = resonatorRing(RingWidth=0.0061)

Data Types: double

Height of the resonator from the ground plane in meters, specified as a positive scalar. In the case of a multilayer substrate, you can use the Height property to create a resonator where the two dielectrics interface.

Example: resonator = resonatorRing(Height=0.020)

Data Types: double

Width of the ground plane in meters, specified as a positive scalar.

Example: resonator = resonatorRing(GroundPlaneWidth=0.2241)

Data Types: double

Type of dielectric material used as a substrate, specified as a dielectric object. The thickness of the default dielectric material Teflon is 0.0016 m or the same value as the Height property.

Example: d = dielectric("FR4"); resonator = resonatorRing(Substrate=d)

Type of metal used in the conducting layers, specified as a metal object.

Example: m = metal("Copper"); resonator = resonatorRing(Conductor=m)

Flag to add a metal shielding to the PCB component, specified as a logical 0 or logical 1. The default value is logical 0.

Example: IsShielded = true or 1 add a metal shield.


To enable FEM solver required for the metal shield property, download the Integro-Differential Modeling Framework for MATLAB. To download this add-on:

  1. In the Home tab Environment section, click on Add-Ons. This opens the add-on explorer. You need an active internet connection to download the add-on.

  2. Search for Integro-Differential Modeling Framework for MATLAB and click Install.

  3. To verify if the download is successful, run

    in your MATLAB® session command line.

  4. On Windows, to run the IDMF add-on, you must install the Windows Subsystem for Linux (WSL). To install WSL, see Install Linux on Windows with WSL.

    The Windows Defender Firewall can block the PostgreSQL server when using the IDMF add-on. To resolve this issue, you can allow the server to communicate on desired networks if the firewall prompts. Alternatively, you can manually add the executable file of the PostgreSQL server located in <matlabroot>\sys\postgresql\win64\PostgreSQL\bin\postgres.exe. For more information regarding firewalls, see Allowing apps through Windows Defender Firewall .

Data Types: logical

This property is read-only.

Metal shield for the PCB component, specified as a shape.Box object. The length and width of the box must be equal to the length and width of the ground plane. The center of the box is at [0 0 Shielding.Height]. You can modify the property after creating the object.


To enable the Shielding property, set the IsShielded property to true or 1.

Type of RF connector assembled at the feed locations of the PCB component, specified as a RFConnector object.

Example: Create connector from RFConnector object like this: coaxial = RFConnector adds a coaxial connector.


To enable the Connector property, set the IsShielded property to true or 1.

Object Functions

chargeCalculate and plot charge distribution
currentCalculate and plot current distribution
designDesign ring resonator around specified frequency
feedCurrentCalculate current at feed port
getZ0Calculate characteristic impedance of transmission line
layoutPlot all metal layers and board shape
meshChange and view mesh properties of metal or dielectric in PCB component
shapesExtract all metal layer shapes of PCB component
showDisplay PCB component structure or PCB shape
sparametersCalculate S-parameters for RF PCB objects
RFConnectorCreate RF connector


collapse all

Create a default ring resonator.

resonator = resonatorRing
resonator = 
  resonatorRing with properties:

      PortLineLength: 0.0100
       PortLineWidth: 0.0050
         CouplingGap: 1.0000e-03
     RingRadiusOuter: 0.0100
           RingWidth: 0.0040
              Height: 0.0016
    GroundPlaneWidth: 0.0400
           Substrate: [1x1 dielectric]
           Conductor: [1x1 metal]
          IsShielded: 0

Visualize the resonator.


Create a ring resonator at the interface of a multilayer dielectric.

resonator = resonatorRing;
resonator.Substrate = dielectric(Name={'Teflon','Teflon'},EpsilonR=[2.1 2.1],...
    LossTangent=[0 0],Thickness=[0.8e-3 0.8e-3]);
resonator.Height = 0.8e-3;

Visualize the ring resonator.



[1] Pozar, David.M. Microwave Engineering Singapore; JohnWiley and Sons. Inc, 2012.

[2] Bogner, Andreas, Carsten Steiner, Stefanie Walter, Jaroslaw Kita, Gunter Hagen, and Ralf Moos. Planar Microstrip ring resonators for Microwave-Based Gas Sensing: Design Aspects and Initial Transducers for Humidity and Ammonia Sensing.

[3] Bernard, P.A., and J.M. Gautray. “Measurement of Dielectric Constant Using a Microstrip Ring Resonator.” IEEE Transactions on Microwave Theory and Techniques 39, no. 3 (March 1991): 592–95.

Version History

Introduced in R2022b

expand all