This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

rffilter

Create RF filter object

Description

Use the rffilter object to create a Butterworth or Chebyshev RF filter. The RF filter is a 2-port circuit object, and you can include this object as an element of a circuit.

Creation

Syntax

rfobj = rffilter
rfobj = rffilter(Name,Value)

Description

example

rfobj = rffilter creates a 2-port filter with default properties.

example

rfobj = rffilter(Name,Value) sets properties using one or more name-value pairs. For example, rfobj = rffilter('FilterType','Chebyshev') creates a 2-port Chebyshev RF filter.

Properties

expand all

Filter type, specified as 'Butterworth' or 'Chebyshev'.

Example: 'FilterType','Chebyshev'

Example: rfobj.FilterType = 'Chebyshev'

Data Types: char | string

Filter response type, specified as 'Lowpass', 'Highpass', 'Bandpass', or 'Bandstop'. For more information, see Frequency Responses.

Example: 'ResponseType','Highpass'

Example: rfobj.ResponseType = 'Highpass'

Data Types: char | string

Filter implementation, specified as 'LC Tee', 'LC Pi', or 'Transfer function'.

Example: 'Implementation','Transfer function'

Example: rfobj.Implementation = 'Transfer function'

Data Types: char | string

Filter order, specified as a real finite nonnegative integer. In a lowpass or highpass filter, the order specifies the number of lumped storage elements. In a bandpass or bandstop filter, the number of lumped storage elements is twice the value of the order.

Note

FilterOrder has the highest precedence among all the name-value pairs in the filter design. Using this property sets the UseFilterOrder read-only property to true.

Example: 'FilterOrder',4

Example: rfobj.FilterOrder = 4

Data Types: double

Passband frequency, specified as:

  • A scalar in hertz for lowpass and highpass filters.

  • A two-element vector in hertz for bandpass or bandstop filters.

By default, the values are 1e9 for lowpass filter, 2e9 for highpass filter, and [2e9 3e9] for bandpass and bandstop filters.

Example: 'PassbandFrequency',[3e6 5e6]

Example: rfobj.PassbandFrequency = [3e6 5e6]

Data Types: double

Stopband frequency, specified as:

  • A scalar in hertz for lowpass and highpass filters.

  • A two-element vector in hertz for bandpass or bandstop filters.

By default, the values are 2e9 for lowpass filter, 1e9 GHz for highpass filter, [1.5e9 3.5e9] for bandpass filters, and [2.1e9 2.9e9] bandstop filters.

Example: rffilter('ResponseType','lowpass','StopbandFrequency',[3e6 5e6])

Example: rfobj.StopbandFrequency = [3e6 5e6]

Data Types: double

Passband attenuation, specified as a scalar in dB. For bandpass filters, this value is applied equally to both edges of the passband.

Example: 'PassbandAttenuation',4.5e6

Example: rfobj.PassbandAttenuation = 4.5e6

Data Types: double

Stopband attenuation, specified as a scalar in dB. For bandstop filters, this value is applied equally to both edges of the stopband.

Example: 'StopbandAttenuation',4.5e6

Example: rfobj.StopbandAttenuation = 4.5e6

Data Types: double

Source impedance, specified as a positive real part finite scalar in ohms.

Example: 'Zin',70

Example: rfobj.Zin = 70

Data Types: double

Load impedance, specified as a positive real part finite scalar in ohms.

Example: 'Zout',70

Example: rfobj.Zout = 70

Data Types: double

Name of RF filter object, specified as a character vector. Two elements in the same circuit cannot have the same name. All names must be valid MATLAB® variable names.

Example: 'Name','filter1'

Example: rfobj.Name = 'filter1'

Data Types: char | string

Number of ports, specified as a 2. This property is read-only.

Data Types: double

Names of the terminals, specified as a {'p1+','p2+','p1-','p2-'}. This property is read-only.

Data Types: char

Filter design data, specified as a structure. This property is read-only. For more information, see Design Data for LC Tee and LC Pi Topologies and Design Data for Transfer Function Implementation.

Data Types: struct

Use of filter order for filter design, specified as a true or false. This property is a read-only.

Data Types: logical

Object Functions

groupdelayGroup delay of s-parameter object or RF filter object or RF Toolbox circuit object
sparametersS-parameter object
setSet rffilter object property values

Examples

collapse all

Create and view the properties of a default RF filter object.

rfobj = rffilter
rfobj = 
  rffilter: Filter element

             FilterType: 'Butterworth'
           ResponseType: 'Lowpass'
         Implementation: 'LC Tee'
            FilterOrder: 3
      PassbandFrequency: 1.0000e+09
    PassbandAttenuation: 3.0103
                    Zin: 50
                   Zout: 50
             DesignData: [1×1 struct]
         UseFilterOrder: 1
                   Name: 'Filter'
               NumPorts: 2
              Terminals: {'p1+'  'p2+'  'p1-'  'p2-'}

rfobj.DesignData
ans = struct with fields:
            FilterOrder: 3
              Inductors: [7.9577e-09 7.9577e-09]
             Capacitors: 6.3662e-12
               Topology: 'lclowpasstee'
      PassbandFrequency: 1.0000e+09
    PassbandAttenuation: 3.0103

Create a Butterworth passband filter object named BFCG_162W with passband frequencies between 950 and 2200 MHz, stopband frequencies between 770 and 3000 MHz, passband attenuation of 3.0 dB, and stopband attenuation of 40 dB.

robj = rffilter('ResponseType','Bandpass','PassbandFrequency',[950e6 2200e6],'StopbandFrequency',[770e6 3000e6], ...
     'PassbandAttenuation',3,'StopbandAttenuation',40);
robj.Name = 'BFCG_162W'
robj = 
  rffilter: Filter element

             FilterType: 'Butterworth'
           ResponseType: 'Bandpass'
         Implementation: 'LC Tee'
      PassbandFrequency: [950000000 2.2000e+09]
    PassbandAttenuation: 3
      StopbandFrequency: [770000000 3.0000e+09]
    StopbandAttenuation: 40
                    Zin: 50
                   Zout: 50
             DesignData: [1×1 struct]
         UseFilterOrder: 0
                   Name: 'BFCG_162W'
               NumPorts: 2
              Terminals: {'p1+'  'p2+'  'p1-'  'p2-'}

Calculate the S-parameters at 2.1 GHz.

s = sparameters(robj,2.1e9)
s = 
  sparameters: S-parameters object

       NumPorts: 2
    Frequencies: 2.1000e+09
     Parameters: [2×2 double]
      Impedance: 50

  rfparam(obj,i,j) returns S-parameter Sij

Create a Chebyshev lowpass filter with a passband frequency of 2 GHz.

robj = rffilter('FilterType','Chebyshev','PassbandFrequency',2e9);

Set the filter order to 5 and the implementation to LC Pi.

set(robj,'FilterOrder',5,'Implementation','LC Pi');

Calculate the group delay of the filter at 1.9 GHz.

groupdelay(robj,1.9e9)
ans = 1.4403e-09

More About

expand all

References

[1] G.Ellis, Michael,Sr.Electronic Filter Analysis and Synthesis,Artech House, 1994

Introduced in R2018b