Perform rational fit using pole-residue representation of the component
rational class to represent RF components using a
rational function object of the form:
There are two ways to construct an rational function object:
You can fit a rational function object to the component data using the
You can use the
rfmodel.rationalconstructor to specify the pole-residue representation of the component directly.
h = rfmodel.rational returns a rational function
object whose properties are set to their default values.
sets properties using one or more name-value pairs. You can specify multiple
name-value pairs. Enclose each property name in a quote
A — Poles of rational function object
Poles of rational function object, specified as a complex vector in radians/second. The property length is shown in:
where, n must be equal to the length
of the vector you provide for
is the number of poles in the rational function object. By default, this
property is empty.
C — Residues of rational function object
Residues of the rational function object, specified as a complex vector in radians/second. The property length is shown in
n, must be equal to the length of
the vector you provide for
the number of residues in the rational function object. By default, this
property is empty.
D — Frequency response offset
Frequency response offset, specified as a scalar. The default value is
Delay — Frequency response time delay
Frequency response time delay, specified as a scalar. The default value is
Name — Object name
'Rational Function' (default) |
1-by-N character array
Object name, specified as a
1-by-N character array.
This is a read-only property.
|Time response for rational objects|
|Step-signal response for rational object and |
|Frequency response of rational object and |
|Impulse response for rational function object|
|Return true if |
|Enforce passivity of |
|Plot passivity of N-by-N
|Calculate time response of piecewise linear input signal|
|Generate SPICE file from |
|Generate Verilog-A description of |
|Construct state-space matrices from |
|Compute zeros, poles, and gain of rational object|
Fit a Rational Function to Data
Fit a rational function to data from an
S = sparameters('defaultbandpass.s2p'); freq = S.Frequencies; data = rfparam(S,2,1); fit = rationalfit(freq,data)
fit = rfmodel.rational with properties: A: [10x1 double] C: [10x1 double] D: 0 Delay: 0 Name: 'Rational Function'
Define, Evaluate and Visualize a Rational Function
Construct a rational function object,
rat, with poles at -4 Mrad/s, -3 Grad/s,and -5 Grad/s and residues of 600 Mrad/s,2 Grad/s and 4 Grad/s.
Perform frequency-domain analysis from 1.0 MHz to 3.0 GHz.
f = [1e6:1.0e7:3e9];
Plot the resulting frequency response in decibels on the X-Y plane.
[resp,freq]=freqresp(rat,f); figure plot(freq/1e9,20*log10(abs(resp))); xlabel('Frequency (GHz)') ylabel('Magnitude (dB)')
Generate SPICE File of 2-by-2 S-parameters
Read a file named
passive.s2p and fit the 2-by-2 S-parameters. Generate a SPICE file of these S-parameters.
S = sparameters('passive.s2p'); fit = rationalfit(S); generateSPICE(fit,'passive.ckt')
The circuit is saved in your current folder.
Introduced in R2009a