Accelerating the pace of engineering and science

rfmodel.rational class

Package: rfmodel

Rational function object

Syntax

h = rfmodel.rational
h = rfmodel.rational('Property1',value1,'Property2',value2,...)

Description

Use the rational class to represent RF components using a rational function object of the form

$F\left(s\right)=\left(\sum _{k=1}^{n}\frac{{C}_{k}}{s-{A}_{k}}+D\right){e}^{-s\tau }\begin{array}{cc},& s=j2\pi f\end{array}$

There are two ways to construct an rational function object:

• You can fit a rational function object to the component data using the rationalfit function.

• You can use the rfmodel.rational constructor 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.

h = rfmodel.rational('Property1',value1,'Property2',value2,...) returns a rational function object, h, with the specified properties. Properties that you do not specify retain their default values.

Properties

 A Poles of rational function object C Residues of rational function object D Frequency response offset Delay Frequency response time delay Name Object name

Methods

 freqresp Frequency response of rational function object ispassive Check passivity of scalar rational function object stepresp Step-signal response of rational function object timeresp Time response for rational function object writeva Write Verilog-A description of rational function object

Examples

Fit a Rational Function to Data

Fit a rational function to data from an rfdata.data object:

```orig_data=read(rfdata.data,'default.s2p');
freq=orig_data.Freq;
data=orig_data.S_Parameters(2,1,:);
fit_data=rationalfit(freq,data)
```
```Warning: The least error fit only meets tolerance -32.77 dB, using 48 poles.

fit_data =

rfmodel.rational with properties:

A: [48x1 double]
C: [48x1 double]
D: 0
Delay: 0
Name: 'Rational Function'

```

Define, Evaluate and Visualize a Rational Function

• Perform frequency-domain analysis from 1.0 MHz to 3.0 GHz.

• Plot the resulting frequency response in decibels on the X-Y plane.

```rat=rfmodel.rational...
('A',[-5e9,-3e9,-4e6],...
'C',[6e8,2e9,4e9]);      % Create model
f = [1e6:1.0e7:3e9];
[resp,freq]=freqresp(rat,f);   % Compute frequency response
figure
plot(freq/1e9,db(resp));      % Plot frequency response
xlabel('Frequency (GHz)')
ylabel('Magnitude (dB)')
```