# HP ADS 1.5 User-defined Models User Manual

Brand: HP, Pages: 216, PDF Size: 1.33 MB

### Page 101 from 216

5-1

Chapter 5: Custom Modeling with

Symbolically-Defined Devices

This chapter presents a powerful capability of Advanced Design System: the ability

to create a user-defined nonlinear component which can simulate both the

large-signal and small-signal behavior of a nonlinear device, without the use of

source code.

The symbolically-defined device (SDD) is an equation-based component that enables

you to quickly and easily define custom, non-linear components. These components

are multi-port devices that can be modeled directly on a schematic. You define an

SDD by specifying equations that relate port currents, port voltages, and their

derivatives. Equations can also reference the current flowing in another device. Once

a model is defined, it can be used with any circuit simulator in Advanced Design

System. Derivatives are automatically calculated during the simulation.

Before the SDD, the techniques that were available for modeling nonlinear devices

were either limited or cumbersome. One technique was to model the device equations

using discrete components—usually resistors, capacitors, inductors, and controlled

sources. Since most simulators restrict these devices to be linear, this approach could

be used to model only the small-signal (AC) behavior of the nonlinear device, and you

could not achieve an accurate DC simulation or harmonic balance simulation. A

second approach would be to use measured data, typically S-parameters, to model the

device, but this approach, too, modeled only small-signal behavior.

The only technique previously available to develop a model that simulated both the

large-signal and small-signal behavior of a nonlinear device required writing source

code, which was a lengthy task. For example, a typical BJT model would require over

4500 lines of code, and could take an experienced engineer well over a month to write

and debug. There also is the requirement that the simulator be linked to your

compiled code.

By comparison, the SDD offers a simple, fast way to develop and modify complex

models. Equations can be modified easily, and simulation results can be compared to

measured data within Advanced Design System.

The SDD can also model high-level circuit blocks such as mixers or amplifiers. By

using a single, high-level component instead of a subcircuit of low-level devices,

simulations run more quickly. If second- and third-order effects of low-level

subcircuits need to be analyzed, the SDD can be modified to develop a more

comprehensive implementation of the circuit.

### Page 102 from 216

5-2

Custom Modeling with Symbolically-Defined Devices

The examples in this chapter start with a simple nonlinear resistor, then more

complex devices, like the Gummel-Poon charge-storage model of the bipolar junction

transistor, are described. With the techniques used to develop these models, you can

develop your own, custom, nonlinear components.

This chapter has the following sections:

•“Writing SDD Equations” on page 5-3 explains how to write the equations that

define an SDD.

•“Adding an SDD to a Schematic” on page 5-13 describes how to add an SDD to a

schematic and enter equations.

•“SDD Examples” on page 5-17 show how to use SDDs to define a wide range of

nonlinear circuit components.

•“Modified Nodal Analysis” on page 5-45 is a discussion of modified nodal

analysis and branch equations.

•“Error Messages” on page 5-50 lists SDD error messages and their meaning.

Detailed knowledge of microwave and RF circuit theory and of building and

analyzing circuits using Advanced Design System is assumed.

### Page 103 from 216

Writing SDD Equations 5-3

Writing SDD Equations

The symbolically-defined device is represented on the circuit schematic as an n-port

device, with up to 10 ports. The equations that specify the voltage and current of a

port are defined as functions of other voltages and currents. An example of a 2-port

SDD is shown here.

Figure 5-1. The schematic symbol for a two-port SDD

Port Variables

For each port on the SDD, there are voltage and current port variables. A variable

begins with an underscore, followed by v (for voltage) or i (for current), and the port

number. For example, current and voltage variables for port one are

_i1 and _v1,

respectively. You can rename variables to better suit the device being modeled. In

text, v

n and in are used to refer to _vn and _in.

By convention, a positive port current flows into the terminal marked +.

port 1port 2

equations

### Page 104 from 216

5-4 Writing SDD Equations

Custom Modeling with Symbolically-Defined Devices

Defining Constitutive Relationships with Equations

A well-defined n port is described by n equations, called constitutive relationships,

that relate the n port currents and the n port voltages. For linear devices, the

constitutive relationships are often specified in the frequency domain (for example, as

admittances), but since the SDD is used to model nonlinear devices, its constitutive

relationships are specified in the time domain.

The constitutive relationships may be specified in either explicit or implicit

representations.

Explicit Representation

With the explicit representation, the current at port k is specified as a function of port

voltages:

An example of an explicit equation is:

In this example, the current at port 1 is calculated by dividing the voltage at port 1 by

50.

NoteEach port of the SDD must have at least one equation. For an unused port n,

apply the equation I[n,0] = 0.0 (an open circuit) to the unused port.

NoteAlthough not often utilized in standard circuit models, the explicit equation

defining the i

k port current can actually be a function of any of the port voltages and

any of the other port currents for ports that are defined with implicit equations. Since

port k is being defined with an explicit equation, the i

k port variable is not available

and so cannot be used to implicitly define ik.

ikfv1v2¼vn,, () =

I[1,0] = _v1/50

equation applies

to port 1

weighting function is 0

explicit equationequation

### Page 105 from 216

Writing SDD Equations 5-5

Implicit Representation

The implicit representation uses an implicit relationship between any of the port

currents and any of the port voltages:

An example of an implicit equation is:

This equation is part of the Gummel-Poon example.

If you want to use the current variable (_in) of a port in another equation, you must

define the port using an implicit equation.

A procedure for how to enter equations is in the section “Adding an SDD to a

Schematic” on page 5-13.

fkv1v2¼vni1i2¼in,, ,,, ()0 =

F[1,0] = vbi + ib*Rbb - vb

equation applies

to port 1

weighting function is 0

implicit equation equation