Main Content

Finite Element Method Based Open Problem

This example shows how to create, visualize and analyze a Finite Element Method (FEM) based open problem.

Prerequisites

The example requires the Integro-Differential Modeling Framework for MATLAB add-on. To enable the 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 matlab.addons.installedAddons in your MATLAB® session command line.

  4. On Windows, to run the FEM based open problem, you must install the Windows Subsystem for Linux (WSL).

Create Variables

Create variable for the frequency range.

freq = linspace(1e9,5e9,21);

Create Branch-line Coupler

Create a branch-line coupler with default properties.

branchline = couplerBranchline;

Visualize the coupler.

figure
show(branchline)

Figure contains an axes object. The axes object with title couplerBranchline element, xlabel x (mm), ylabel y (mm) contains 8 objects of type patch, surface. These objects represent PEC, feed, Teflon.

Use the sparameters function to calculate the S-parameters in the frequency range of 1 - 5 GHz. The default solver is a Method of Moments (MoM).

sparam_mom = sparameters(branchline,freq);

Plot the S-parameters of the coupler.

figure
rfplot(sparam_mom)

Figure contains an axes object. The axes object with xlabel Frequency (GHz), ylabel Magnitude (dB) contains 16 objects of type line. These objects represent dB(S_{11}), dB(S_{21}), dB(S_{31}), dB(S_{41}), dB(S_{12}), dB(S_{22}), dB(S_{32}), dB(S_{42}), dB(S_{13}), dB(S_{23}), dB(S_{33}), dB(S_{43}), dB(S_{14}), dB(S_{24}), dB(S_{34}), dB(S_{44}).

Create FEM based Branch-line Coupler

Convert the branch-line coupler to the pcbComponent object.

pcb = pcbComponent(branchline)
pcb = 
  pcbComponent with properties:

              Name: 'couplerBranchline'
          Revision: 'v1.0'
        BoardShape: [1×1 antenna.Rectangle]
    BoardThickness: 0.0016
            Layers: {[1×1 antenna.Polygon]  [1×1 dielectric]  [1×1 antenna.Rectangle]}
     FeedLocations: [4×4 double]
      FeedDiameter: 0.0026
      ViaLocations: []
       ViaDiameter: []
      FeedViaModel: 'strip'
         Conductor: [1×1 metal]
              Tilt: 0
          TiltAxis: [0 0 1]
              Load: [1×1 lumpedElement]
        SolverType: 'MoM'
        IsShielded: 0

Set the SolverType property to 'FEM'.

pcb.SolverType = 'FEM';

Visualize the FEM based coupler.

figure
show(pcb)

Figure contains an axes object. The axes object with title pcbComponent element, xlabel x (mm), ylabel y (mm) contains 21 objects of type patch. These objects represent PEC, Teflon, Coax feed Inner conductor, Coax feed Dielectric.

Design RF Connector

Unlike a delta gap source feed model in MoM, the FEM uses a coaxial wave port model. Use the design function to design a coaxial connector model.

c = design(RFConnector(PinLength=0),pcb);

Set the designed coaxial connector to the coupler.

pcb.Connector = c;

Visualize the coupler.

figure
show(pcb)

Figure contains an axes object. The axes object with title pcbComponent element, xlabel x (mm), ylabel y (mm) contains 21 objects of type patch. These objects represent PEC, Teflon, Coax feed Inner conductor, Coax feed Dielectric.

Calculate S-parameters

Use the sparameters function to calculate the S-parameters in the frequency range of 1 - 5 GHz.

sparam_fem = sparameters(pcb,freq);

Plot the S-parameters of the coupler.

figure
rfplot(sparam_fem)

Figure contains an axes object. The axes object with xlabel Frequency (GHz), ylabel Magnitude (dB) contains 16 objects of type line. These objects represent dB(S_{11}), dB(S_{21}), dB(S_{31}), dB(S_{41}), dB(S_{12}), dB(S_{22}), dB(S_{32}), dB(S_{42}), dB(S_{13}), dB(S_{23}), dB(S_{33}), dB(S_{43}), dB(S_{14}), dB(S_{24}), dB(S_{34}), dB(S_{44}).