agilent 85190a ic-cap 2004dl.edatop.com/mte/ads/edatop.com_ads所有函数.pdf · use the following...

318
Agilent Technologies Agilent 85190A IC-CAP 2004 Expressions

Upload: others

Post on 15-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Agilent 85190A IC-CAP 2004

Expressions

Agilent Technologies

Page 2: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Notices© Agilent Technologies, Inc. 2004

No part of this manual may be reproduced in any form or by any means (including elec-tronic storage and retrieval or translation into a foreign language) without prior agree-ment and written consent from Agilent Technologies, Inc. as governed by United States and international copyright laws.

Manual Part Number85190-90144

EditionAugust 2004

Printed in USA

Agilent Technologies, Inc.395 Page Mill Road Palo Alto, CA 94304 USA

WarrantyThe material contained in this docu-ment is provided “as is,” and is sub-ject to being changed, without notice, in future editions. Further, to the max-imum extent permitted by applicable law, Agilent disclaims all warranties, either express or implied, with regard to this manual and any information contained herein, including but not limited to the implied warranties of merchantability and fitness for a par-ticular purpose. Agilent shall not be liable for errors or for incidental or consequential damages in connec-tion with the furnishing, use, or per-formance of this document or of any information contained herein. Should Agilent and the user have a separate written agreement with warranty terms covering the material in this document that conflict with these terms, the warranty terms in the sep-arate agreement shall control.

Technology Licenses The hardware and/or software described in this document are furnished under a license and may be used or copied only in accor-dance with the terms of such license.

Restricted Rights LegendIf software is for use in the performance of a U.S. Government prime contract or subcon-tract, Software is delivered and licensed as “Commercial computer software” as defined in DFAR 252.227-7014 (June 1995), or as a “commercial item” as defined in FAR 2.101(a) or as “Restricted computer soft-ware” as defined in FAR 52.227-19 (June 1987) or any equivalent agency regulation or contract clause. Use, duplication or disclo-sure of Software is subject to Agilent Tech-nologies’ standard commercial license terms, and non-DOD Departments and Agencies of the U.S. Government will receive no greater than Restricted Rights as defined in FAR 52.227-19(c)(1-2) (June

1987). U.S. Government users will receive no greater than Limited Rights as defined in FAR 52.227-14 (June 1987) or DFAR 252.227-7015 (b)(2) (November 1995), as applicable in any technical data.

Safety Notices

CAUTION

A CAUTION notice denotes a haz-ard. It calls attention to an operat-ing procedure, practice, or the like that, if not correctly performed or adhered to, could result in damage to the product or loss of important data. Do not proceed beyond a CAUTION notice until the indicated conditions are fully understood and met.

WARNING

A WARNING notice denotes a hazard. It calls attention to an operating procedure, practice, or the like that, if not correctly per-formed or adhered to, could result in personal injury or death. Do not proceed beyond a WARNING notice until the indicated condi-tions are fully understood and met.

AcknowledgmentsUNIX ® is a registered trademark of the Open Group.

ErrataThe IC-CAP product may contain references to “HP” or “HPEESOF” such as in file names and directory names. The business entity formerly known as “HP EEsof” is now part of Agilent Technologies and is known as “Agilent EEsof.” To avoid broken functional-ity and to maintain backward compatibility for our customers, we did not change all the names and labels that contain “HP” or “HPEESOF” references.

2 IC-CAP Expressions

Page 3: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Contents

1 Introduction to Measurement Expressions

IC-CAP Expressions

Measurement Expressions Syntax 18

Case Sensitivity 18Variable Names 18Built-in Constants 19Operator Precedence 20Conditional Expressions 21

Manipulating IC-CAP Data with Expressions 23

IC-CAP Data 23Generating Data 23Simple Sweeps and Using “[ ]” 24S-parameters and Matrices 25Matrices 25Multidimensional Sweeps and Indexing 26

User-Defined Functions 27

Functions Reference Format 29

Alphabetical Listing of Measurement Expressions 30

2 Data Access Functions

build_subrange() 37

chop() 38

chr() 39

circle() 40

collapse() 41

3

Page 4: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

4

contour() 42

contour_polar() 44

expand() 45

find() 46

find_index() 47

fun_2d_outer() 48

generate() 49

get_attr() 50

get_indep_values() 51

indep() 52

max_index() 53

min_index() 54

permute() 55

plot_vs() 56

set_attr() 57

size() 58

sort() 59

sweep_dim() 60

sweep_size() 61

type() 62

vs() 63

what() 64

3 Harmonic Balance Functions

Working with Harmonic Balance Data 66

IC-CAP Expressions

Page 5: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

IC-CAP Expressions

carr_to_im() 67

cdrange() 68

dc_to_rf() 69

ifc() 70

ip3_in() 71

ip3_out() 72

ipn() 73

it() 74

mix() 75

pae() 76

pfc() 77

phase_gain() 78

pspec() 79

pt() 80

remove_noise() 81

sfdr() 82

snr() 84

spur_track() 85

spur_track_with_if() 87

ts() 89

vfc() 91

vspec() 92

vt() 93

5

Page 6: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

4 Math Functions

6

abs() 97

acos() 98

acosh() 99

acot() 100

acoth() 101

asin() 102

asinh() 103

atan() 104

atan2() 105

atanh() 106

ceil() 107

cint() 108

cmplx() 109

complex() 110

conj() 111

convBin() 112

convHex() 113

convInt() 114

convOct() 115

cos() 116

cosh() 117

cot() 118

coth() 119

cum_prod() 120

IC-CAP Expressions

Page 7: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

IC-CAP Expressions

cum_sum() 121

db() 122

dbm() 123

dbmtow() 125

deg() 126

diagonal() 127

diff() 128

erf() 129

erfc() 130

erfcinv() 131

erfinv() 132

exp() 133

fft() 134

fix() 135

float() 136

floor() 137

identity() 138

im() 139

imag() 140

int() 141

integrate() 142

interp() 143

inverse() 144

jn() 145

ln() 146

7

Page 8: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

8

log() 147

log10() 148

mag() 149

max() 150

max_outer() 151

max2() 152

mean() 153

mean_outer() 154

median() 155

min() 156

min_outer() 157

min2() 158

num() 159

ones() 160

phase() 161

phase_comp() 162

phasedeg() 163

phaserad() 164

polar() 165

pow() 166

prod() 167

rad() 168

re() 169

real() 170

rms() 171

IC-CAP Expressions

Page 9: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

IC-CAP Expressions

round() 172

sgn() 173

sin() 174

sinc() 175

sinh() 176

sqrt() 177

sum() 178

tan() 179

tanh() 180

transpose() 181

unwrap() 182

wtodbm() 183

xor() 184

zeros() 185

5 Signal Processing Functions

add_rf() 188

ber_pi4dqpsk() 189

ber_qpsk() 191

eye() 193

eye_amplitude() 194

eye_closure() 195

eye_fall_time() 196

eye_height() 197

eye_rise_time() 198

9

Page 10: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

10

spec_power() 199

6 S-parameter Analysis Functions

abcdtoh() 203

abcdtos() 204

abcdtoy() 205

abcdtoz() 206

bandwidth_func() 207

center_freq() 208

dev_lin_phase() 209

ga_circle() 210

gain_comp() 212

gl_circle() 213

gp_circle() 215

gs_circle() 217

htoabcd() 219

htos() 220

htoy() 221

htoz() 222

l_stab_circle() 223

l_stab_circle_center_radius() 224

l_stab_region() 225

map1_circle() 226

map2_circle() 227

max_gain() 228

IC-CAP Expressions

Page 11: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

IC-CAP Expressions

mu() 229

mu_prime() 230

ns_circle() 231

ns_pwr_int() 233

ns_pwr_ref_bw() 234

pwr_gain() 235

ripple() 236

s_stab_circle() 237

s_stab_circle_center_radius() 238

s_stab_region() 239

sm_gamma1() 240

sm_gamma2() 241

sm_y1() 242

sm_y2() 243

sm_z1() 244

sm_z2() 245

stab_fact() 246

stab_meas() 247

stoabcd() 248

stoh() 249

stos() 250

stot() 251

stoy() 252

stoz() 253

tdr_sp_gamma() 254

11

Page 12: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

12

tdr_sp_imped() 255

tdr_step_imped() 256

ttos() 257

unilateral_figure() 258

volt_gain() 259

volt_gain_max() 261

vswr() 262

write_snp() 263

yin() 265

yopt() 266

ytoabcd() 267

ytoh() 268

ytos() 269

ytoz() 270

zin() 271

zopt() 272

ztoabcd() 273

ztoh() 274

ztos() 275

ztoy() 276

7 Statistical Analysis Functions

cdf() 278

cross_corr() 279

histogram() 280

IC-CAP Expressions

Page 13: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

IC-CAP Expressions

histogram_multiDim() 282

histogram_sens() 283

histogram_stat() 284

lognorm_dist_inv1D() 285

lognorm_dist1D() 286

moving_average() 287

norm_dist_inv1D() 288

norm_dist1D() 289

norms_dist_inv1D() 290

norms_dist1D() 291

pdf() 292

stddev() 293

uniform_dist_inv1D() 294

uniform_dist1D() 295

yield_sens() 296

8 Transient Analysis Functions

Working with Transient Data 298

constellation() 299

cross() 301

fspot() 302

ifc_tran() 305

ispec_tran() 306

pfc_tran() 307

pspec_tran() 308

13

Page 14: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

14

step() 309

vfc_tran() 310

vspec_tran() 311

vt_tran() 312

IC-CAP Expressions

Page 15: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Agilent 85190A IC-CAP 2004Expressions

1Introduction to Measurement Expressions

Measurement Expressions Syntax 18

Manipulating IC-CAP Data with Expressions 23

User-Defined Functions 27

Functions Reference Format 29

Alphabetical Listing of Measurement Expressions 30

This document describes the measurement expressions that are available for use with IC- CAP. For a complete list of available measurement expressions, refer to the “Alphabetical Listing of Measurement Expressions” on page 30 or consult the index.

NOTE Measurement expressions are based on the mathematical syntax in Application Extension Language (AEL) and are NOT usable in IC-CAP’s Parameter Extraction Language (PEL).

Measurement expressions are equations that are evaluated during post processing. They can be entered into the program using various methods, depending on which product you are using. In ADS, measurement expressions are evaluated during simulation post- processing and can also be evaluated in the Data Display. In IC- CAP, measurement expressions can only be evaluated in the Data Display. For more information on entering equations in a data display, refer to the Data Display documentation.

The following figure illustrates the differences between IC- CAP and ADS in evaluating measurement expressions.

15Agilent Technologies

Page 16: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

16

1 Introduction to Measurement Expressions

Measure/Calculate/Simulate Data in IC-CAP

Export Data to .ds File

IC-CAP

Figure 1 How Measurement Expressions are Evaluated

Measurement Expressions are

evaluated during simulation

post-processing.

Measurement Expressions canalso be evaluated in a DataDisplay.

Start Simulation

Evaluate Simulator Expressions

Complete Simulation

Evaluate Measurement Expressions

Open Data Display

Evaluate Measurement Expressions in Data Display

ADS

IC-CAP Expressions

Page 17: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

IC-CAP Expressions

Within this document you will find information on:

• “Measurement Expressions Syntax” on page 18

• “Manipulating IC- CAP Data with Expressions” on page 23

• Information on working with different types of data.

• Information specific to entering simulator expressions in your particular product.

You will also find a complete list of functions that can be used as measurement expressions individually, or combined together as a nested expression. These expressions have been separated into libraries and are listed in alphabetical order within each library. The expressions available include:

• Chapter 2, “Data Access Functions

• Chapter 3, “Harmonic Balance Functions

• Chapter 4, “Math Functions

• Chapter 5, “Signal Processing Functions

• Chapter 6, “S- parameter Analysis Functions

• Chapter 7, “Statistical Analysis Functions

• Chapter 8, “Transient Analysis Functions

For a complete listing of all functions provided in this document, refer to “Alphabetical Listing of Measurement Expressions” on page 30 or consult the index.

17

Page 18: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

1 Introduction to Measurement Expressions

Measurement Expressions Syntax

18

Use the following guidelines when creating measurement expressions:

• Measurement expressions are based on the mathematical syntax in Application Extension Language (AEL).

• Function names, variable names and constant names are all case sensitive in measurement expressions.

• Use commas to separate arguments.

• White space between arguments is acceptable.

Case Sensitivity

All variable names, functions names, and equation names are case sensitive in measurement expressions.

Variable Names

Data produced by IC- CAP can be referenced in equations with various degrees of rigidity. IC- CAP output and transform names are referred to as variables in the Data Display window. In general, a Data Display variable is defined as:

DatasetName.Model.DUT.Setup.<KEY>.<DataType>.Name

where

<KEY> is either XFORM or ICCAP_SWEPT_DATA. Data under ICCAP_SWEPT_DATA are transforms or outputs that have the same number of points as specified by the inputs in the setup. Data under XFORM are transforms that have a different number of points than specified by the inputs in the setup.

<DataType> is either XFORM, SWEEP, or OUT. Data under XFORM is from transforms, under SWEEP is from inputs, and under OUT is from outputs.

By default, in the Data Display window, a variable is commonly referenced as:

DatasetName..VariableName

IC-CAP Expressions

Page 19: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

IC-CAP Expressions

where the double dot “..” indicates that the variable is unique in this dataset. If a variable is referenced without a dataset name, then it is assumed to be in the current default dataset.

NOTE If a dataset has a single output of type measured or simulated, the measured output is named m and the simulated output is named s. If a dataset has at least two measured or simulated outputs, the outputs are given more readable names such as id.m and id.s.

When the results of several setups are in a dataset (very common when saving your entire .mdl to a .ds file), it becomes necessary to specify the setup and possibly the DUT name with the variable name. This is only necessary when a particular output name (id, ia, etc.) is used in multiple setups. The double dot can always be used to pad a variable name instead of specifying the complete name.

The most common use of the double dot is when it is desired to tie a variable to a dataset other than the default dataset.

Built-in Constants

The following constants can be used in measurement expressions.

Table 1 Built-in Constants

Constant Description Value

PI (also pi) π 3.1415926535898

e Euler’s constant 2.718281822

ln10 natural log of 10 2.302585093

boltzmann Boltzmann’s constant 1.380658e–23 J/K

qelectron electron charge 1.60217733e–19 C

planck Planck’s constant 6.6260755e-34 J*s

c0 Speed of light in free space 2.99792e+08 m/s

e0 Permittivity of free space 8.85419e–12 F/m

19

Page 20: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

20

1 Introduction to Measurement Expressions

u0 Permeability of free space 12.5664e–07 H/m

i, j sqrt(–1) 1i

Table 1 Built-in Constants

Constant Description Value

Operator Precedence

Measurement expressions are evaluated from left to right, unless there are parentheses. Operators are listed from higher to lower precedence. Operators on the same line have the same precedence. For example, a+b*c means a+(b*c), because * has a higher precedence than +. Similarly, a+b- c means (a+b)–c, because + and – have the same precedence (and because + is left- associative).

The operators !, &&, and || work with the logical values. The operands are tested for the values TRUE and FALSE, and the result of the operation is either TRUE or FALSE. In AEL a logical test of a value is TRUE for non- zero numbers or strings with non- zero length, and FALSE for 0.0 (real), 0 (integer), NULL or empty strings. Note that the right hand operand of && is only evaluated if the left hand operand tests TRUE, and the right hand operand of || is only evaluated if the left hand operand tests FALSE.

The operators >=, <=, >, <, ==, != , AND, OR, EQUALS, and NOT EQUALS also produce logical results, producing a logical TRUE or FALSE upon comparing the values of two expressions. These operators are most often used to compare two real numbers or integers. These operators operate differently in AEL than C with string expressions in that they actually perform the equivalent of strcmp() between the first and second operands, and test the return value against 0 using the specified operator.

Operator Name Example

( ) function call, matrix indexer foo(expr_list)X(expr,expr)

[ ] sweep indexer, sweep generator X[expr_list][expr_list]

IC-CAP Expressions

Page 21: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

IC-CAP Expressions

{ } matrix generator {expr_list}

** exponentiation expr**expr

! not !expr

* / .*./

multiplydivideelement-wise multiply element-wise divide

expr * exprexpr / exprexpr .* exprexpr ./ expr

+-

addsubtract

expr + exprexpr - expr

:: sequence operatorwildcard

exp::expr::exprstart::inc::stop::

< <= >>=

less thanless than or equal to greater thangreater than or equal to

expr < exprexpr <= exprexpr > exprexpr >= expr

==, EQUALS!=, NOTEQUALS

equalnot equal

expr == exprexpr != expr

&& AND logical and expr && expr

|| OR logical or expr || expr

Operator Name Example

Conditional Expressions

The if- then- else construct provides an easy way to apply a condition on a per- element basis over a complete multidimensional variable. It has the following syntax:

A = if ( condition ) then true_expression else false_expression

Condition, true_expression, and false_expression are any valid expressions. The dimensionality and number of points in these expressions follow the same matching conditions required for the basic operators.

Multiple nested if- then- else constructs can also be used:

21

Page 22: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

22

1 Introduction to Measurement Expressions

A = if ( condition ) then true_expression elseif ( condition2) then true_expression else false_expression

The type of the result depends on the type of the true and false expressions. The size of the result depends on the size of the condition, the true expression, and the false expression.

IC-CAP Expressions

Page 23: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

Manipulating IC-CAP Data with Expressions

IC-CAP Expressions

Expressions defined in this documentation are designed to manipulate data produced by IC- CAP. Expressions may reference any IC- CAP data, and may be placed in a Data Display window.

IC-CAP Data

The expressions package has inherent support for two main IC- CAP data features. First, IC- CAP data are normally multidimensional. Each sweep introduces a dimension. All operators and relevant functions are designed to apply themselves automatically over a multidimensional IC- CAP output. Second, the independent (swept) variable is associated with the data (for example, S- parameter data). This independent is propagated through expressions, so that the results of equations are automatically plotted or listed against the relevant swept variable.

Generating Data

Datasets exported from IC- CAP contain scalars and matrices. When a sweep is being performed, the sweep can produce scalars and matrices as a function of a set of swept variables. It is also possible to generate data by using expressions. Two operators can be used to do this. The first is the sweep generator “[ ]”, and the second is the matrix generator “{ }”. These operators can be combined in various ways to produce swept scalars and matrices. The data can then be used in the normal way in other expressions. The operators can also be used to concatenate existing data, which can be very useful when combined with the indexing operators.

In the Data Display, you can also create an array from an equation by combining two or more equations in the following manner:

A=2B=3C=[A,B]

23

Page 24: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

1 Introduction to Measurement Expressions

Simple Sweeps and Using “[ ]”

24

Data from an IC- CAP setup generally contains at least one sweep. For a DC setup, this may be a bias sweep. For a two port analysis, your primary sweep may be frequency. IC- CAP generates this data in a .ds file such that outputs and transforms with this data shape are attached to this sweep information. This association is visible from the hierarchy of the variables listed under any ICCAP_SWEPT_DATA branch in your dataset.

Often with a setup that contains multidimensional data, we want to look at a single sweep point or group of points. The sweep indexer “[ ]” can be used to do this. The sweep indexer is zero offset, meaning that the first sweep point is accessed as index 0. A sweep of n points can be accessed by means of an index that runs from 0 to n–1. Also, the what() function can be useful in indexing sweeps. Use what() to find out how many sweep points there are, and then use an appropriate index. Indexing out of range yields an invalid result.

The sequence operator can also be used to index into a subsection of a sweep. Given a parameter X, a subsection of X may be indexed as

a=X[start::increment::stop]

Because increment defaults to one,

a=X[start::stop]

is equivalent to

a=X[start::1::stop]

The “::” operator alone is the wildcard operator, so that X and X[::] are equivalent. Indexing can similarly be applied to multidimensional data. As will be shown later, an index may be applied in each dimension.

IC-CAP Expressions

Page 25: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

S-parameters and Matrices

IC-CAP Expressions

As previously described, the sweep indexer “[ ]” is used to index into a sweep. However, IC- CAP can produce a swept matrix, as when an S- parameter analysis is performed over some frequency range. Matrix entries can be referenced as S11 through Snm. While this is sufficient for most simple applications, it is also possible to index matrices by using the matrix indexer “()”. For example, S(1,1) is equivalent to S11. The matrix indexer is offset by one meaning the first matrix entry is X(1,1). When it is used with swept data its operation is transparent with respect to the sweep. Both indexers can be combined. For example, it is possible to access S(1,1) at the first sweep point as S(1,1)[0]. As with the sweep indexer “[ ]”, the matrix indexer can be used with wild cards and sequences to extract a submatrix from an original matrix.

Matrices

S- parameters above are an example of a matrix produced when a Two Port output or a transform with matrix data is exported to a dataset. Mathematical operators implement matrix operations. Element- by- element operations can be performed by using the dot modified operators (.* and ./).

The matrix indexer conveniently operates over the complete sweep, just as the sweep indexer operates on all matrices in a sweep. As with scalars, the mathematical operators allow swept and non- swept quantities to be combined. For example, the first matrix in a sweep may be subtracted from all matrices in that sweep as

Y = X- X[0]

25

Page 26: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

1 Introduction to Measurement Expressions

Multidimensional Sweeps and Indexing

26

In the previous examples we looked at single- dimensional sweeps. Multidimensional sweeps are very common in Two- Port setups with an outer bias sweep and in DC characteristics with multiple bias sweeps. Expressions are designed to operate on the multidimensional data. Functions and operators behave in a meaningful way when a parameter sweep is added or taken away. A common example is DC IV characteristics.

The sweep indexer accepts a list of indices. Up to N indices are used to index N- dimensional data. If fewer than N lookup indices are used with the sweep indexer, then wild cards are inserted automatically to the left.

IC-CAP Expressions

Page 27: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

User-Defined Functions

IC-CAP Expressions

By writing some Application Extension Language (AEL) code, you can define your own custom functions. The following file is provided specifically for this purpose:

$ICCAP_ROOT/expressions/ael/user_defined_fun.ael

By reviewing the other _fun.ael files in this directory, you can see how to write your own code. You can have as many functions as you like in this one file, and they will all be compiled upon program start- up. If you have a large number of functions to define, you may want to organize them into more than one file. In this case, include a line such as:

load("more_user_defined_fun.ael");

These load statements are added to the user_defined_fun.ael in the same directory in order to have your functions all compile. To create your own custom user defined functions:

1 Copy the $ICCAP_ROOT/expressions/ael/user_defined_fun.ael file to one of the following directories.

$HOME/hpeesof/expressions/ael (User Config)

$ICCAP_ROOT/custom/expressions/ael (Site Config)

Create the appropriate subdirectories if they do not already exist. The User Config is setup for a single user. The Site Config can be set up by a CAD Manager or librarian to control a site configuration for a group of users.

2 Edit the new file and add any custom defined functions. If your custom functions reside in another file, you can add a load statement to your new user_defined_fun.ael file to include your functions in another file. For example:

load("my_custom_functions_file.ael");

3 Save your changes to the new file and restart so your changes take effect. The search path looks in the following locations for user defined functions.

$HOME/hpeesof/expressions/ael (Config)

27

Page 28: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

28

1 Introduction to Measurement Expressions

$ICCAP_ROOT/custom/expressions/ael (Site Config)

$ICCAP_ROOT/expressions/ael (Default Config)

If for some reason your functions are not recognized, check to ensure that

NOTEthe user_defined_fun.atf (compiled version of user_defined_fun.ael file) was generated after restarting the software.

IC-CAP Expressions

Page 29: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

Functions Reference Format

IC-CAP Expressions

The information below illustrates how each measurement expression in the functions reference is described.

<function name> Presents a brief description of what the function does.

Synopsis Presents the general syntax of the function, including a description of the arguments.

NOTE Optional arguments described in the Synopsis section are enclosed with curly braces. For example, y = ga_circle(S{, gain, numOfPts, numCircles, gainStep}), where gain, numOfPts, numCircles, and gainStep are all optional arguments. This should not be confused with the required syntax or the use of braces in the matrix generator described in “Generating Data” on page 23.

Examples Presents one or more simple examples that use the function.

Defined in Indicates whether the measurement function is defined in a script or is built in. All AEL functions are built in.

See also Lists related functions, if any.

Notes/Equations Describes any additional notes and equations.

29

Page 30: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

1 Introduction to Measurement Expressions

Alphabetical Listing of Measurement Expressions

30

A“abcdtoh()” on page 203“abcdtos()” on page 204“abcdtoy()” on page 205“abcdtoz()” on page 206“abs()” on page 97“acos()” on page 98“acosh()” on page 99“acot()” on page 100

“acoth()” on page 101“add_rf()” on page 188“asin()” on page 102“asinh()” on page 103“atan()” on page 104“atan2()” on page 105“atanh()” on page 106

B“bandwidth_func()” on page 207“ber_pi4dqpsk()” on page 189

“ber_qpsk()” on page 191“build_subrange()” on page 37

C“carr_to_im()” on page 67“cdf()” on page 278“cdrange()” on page 68“ceil()” on page 107“center_freq()” on page 208“chop()” on page 38“chr()” on page 39“cint()” on page 108“circle()” on page 40“cmplx()” on page 109“collapse()” on page 41“complex()” on page 110“conj()” on page 111“constellation()” on page 299

“contour()” on page 42“contour_polar()” on page 44“convBin()” on page 112“convHex()” on page 113“convInt()” on page 114“convOct()” on page 115“cos()” on page 116“cosh()” on page 117“cot()” on page 118“coth()” on page 119“cross()” on page 301“cross_corr()” on page 279“cum_prod()” on page 120“cum_sum()” on page 121

D“db()” on page 122“dbm()” on page 123“dbmtow()” on page 125“dc_to_rf()” on page 69

“deg()” on page 126“dev_lin_phase()” on page 209“diagonal()” on page 127“diff()” on page 128

IC-CAP Expressions

Page 31: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

IC-CAP Expressions

E“erf()” on page 129“erfc()” on page 130“erfcinv()” on page 131“erfinv()” on page 132“exp()” on page 133“expand()” on page 45

“eye()” on page 193“eye_amplitude()” on page 194“eye_closure()” on page 195“eye_fall_time()” on page 196“eye_height()” on page 197“eye_rise_time()” on page 198

F“fft()” on page 134“find()” on page 46“find_index()” on page 47“fix()” on page 135

“float()” on page 136“floor()” on page 137“fspot()” on page 302“fun_2d_outer()” on page 48

G“ga_circle()” on page 210“gain_comp()” on page 212“generate()” on page 49“get_attr()” on page 50

“get_indep_values()” on page 51“gl_circle()” on page 213“gp_circle()” on page 215“gs_circle()” on page 217

H“histogram()” on page 280“histogram_multiDim()” on page 282“histogram_sens()” on page 283“histogram_stat()” on page 284

“htoabcd()” on page 219“htos()” on page 220“htoy()” on page 221“htoz()” on page 222

I“identity()” on page 138“ifc()” on page 70“ifc_tran()” on page 305“im()” on page 139“imag()” on page 140“indep()” on page 52“int()” on page 141“integrate()” on page 142

“interp()” on page 143“inverse()” on page 144“ip3_in()” on page 71“ip3_out()” on page 72“ipn()” on page 73“ispec_tran()” on page 306“it()” on page 74

J“jn()” on page 145

31

Page 32: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

32

1 Introduction to Measurement Expressions

L“l_stab_circle()” on page 223“l_stab_circle_center_radius()” on page 224“l_stab_region()” on page 225“ln()” on page 146

“log()” on page 147“log10()” on page 148“lognorm_dist_inv1D()” on page 285“lognorm_dist1D()” on page 286

M“mag()” on page 149“map1_circle()” on page 226“map2_circle()” on page 227“max()” on page 150“max_gain()” on page 228“max_index()” on page 53“max_outer()” on page 151“max2()” on page 152“mean()” on page 153“mean_outer()” on page 154

“median()” on page 155“min()” on page 156“min_index()” on page 54“min_outer()” on page 157“min2()” on page 158“mix()” on page 75“moving_average()” on page 287“mu()” on page 229“mu_prime()” on page 230

N“norm_dist_inv1D()” on page 288“norm_dist1D()” on page 289“norms_dist_inv1D()” on page 290“norms_dist1D()” on page 291

“ns_circle()” on page 231“ns_pwr_int()” on page 233“ns_pwr_ref_bw()” on page 234“num()” on page 159

O“ones()” on page 160

P“pae()” on page 76“pdf()” on page 292“permute()” on page 55“pfc()” on page 77“pfc_tran()” on page 307“phase()” on page 161“phase_comp()” on page 162“phasedeg()” on page 163“phase_gain()” on page 78

“phaserad()” on page 164“plot_vs()” on page 56“polar()” on page 165“pow()” on page 166“prod()” on page 167“pspec()” on page 79“pspec_tran()” on page 308“pt()” on page 80“pwr_gain()” on page 235

IC-CAP Expressions

Page 33: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Introduction to Measurement Expressions 1

IC-CAP Expressions

R“rad()” on page 168“re()” on page 169“real()” on page 170“remove_noise()” on page 81

“ripple()” on page 236“rms()” on page 171“round()” on page 172

S“s_stab_circle()” on page 237“s_stab_circle_center_radius()” on page 238“s_stab_region()” on page 239“set_attr()” on page 57“sfdr()” on page 82“sgn()” on page 173“sin()” on page 174“sinc()” on page 175“sinh()” on page 176“size()” on page 58“sm_gamma1()” on page 240“sm_gamma2()” on page 241“sm_y1()” on page 242“sm_y2()” on page 243“sm_z1()” on page 244“sm_z2()” on page 245“snr()” on page 84“sort()” on page 59

“spec_power()” on page 199“spur_track()” on page 85“spur_track_with_if()” on page 87“sqrt()” on page 177“stab_fact()” on page 246“stab_meas()” on page 247“stddev()” on page 293“step()” on page 309“stoabcd()” on page 248“stoh()” on page 249“stos()” on page 250“stot()” on page 251“stoy()” on page 252“stoz()” on page 253“sum()” on page 178“sweep_dim()” on page 60“sweep_size()” on page 61

T“tan()” on page 179“tanh()” on page 180“tdr_sp_gamma()” on page 254“tdr_sp_imped()” on page 255“tdr_step_imped()” on page 256

“transpose()” on page 181“ts()” on page 89“ttos()” on page 257“type()” on page 62

U“uniform_dist_inv1D()” on page 294“uniform_dist1D()” on page 295

“unilateral_figure()” on page 258“unwrap()” on page 182

33

Page 34: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

34

1 Introduction to Measurement Expressions

V“vfc()” on page 91“vfc_tran()” on page 310“volt_gain()” on page 259“volt_gain_max()” on page 261“vs()” on page 63

“vspec_tran()” on page 311“vspec()” on page 92“vswr()” on page 262“vt()” on page 93“vt_tran()” on page 312

W“what()” on page 64“write_snp()” on page 263

“wtodbm()” on page 183

X“xor()” on page 184

Y“yield_sens()” on page 296“yin()” on page 265“yopt()” on page 266“ytoabcd()” on page 267

“ytoh()” on page 268“ytos()” on page 269“ytos()” on page 269“ytoz()” on page 270

Z“zeros()” on page 185“zin()” on page 271“zopt()” on page 272“ztoabcd()” on page 273

“ztoh()” on page 274“ztos()” on page 275“ztoy()” on page 276

IC-CAP Expressions

Page 35: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

35

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

2Data Access Functions

build_subrange() 37

chop() 38

chr() 39

circle() 40

collapse() 41

contour() 42

contour_polar() 44

expand() 45

find() 46

find_index() 47

fun_2d_outer() 48

generate() 49

get_attr() 50

get_indep_values() 51

indep() 52

max_index() 53

min_index() 54

permute() 55

plot_vs() 56

set_attr() 57

size() 58

sort() 59

sweep_dim() 60

sweep_size() 61

type() 62

vs() 63

what() 64

Page 36: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

36 IC-CAP Expressions

2 Data Access Functions

This chapter describes data access and data manipulation functions in detail. The functions are listed in alphabetical order.

NOTE You can use these functions to find information about a piece of data (e.g., independent values, size, type, attributes, etc.). You can also use some functions to generate data for plotting circles and contours.

Page 37: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 37

build_subrange()

Builds the subrange data according to the innermost independent range. Use with all swept data.

Synopsis y = build_subrange(data{, innermostIndepLow, innermostIndepHigh})

where

data can be analysis results or user input.

innermostIndepLow is an optional argument. The default value is the minimum value of the inner most independent variable.

innermostIndepHigh is an optional argument. The default value is the maximum value of the inner most independent variable.

Examples Given S- parameter data swept as a function of frequency with a range of 100 MHz to 500 MHz, find the values of S12 in the range of 200 MHz to 400 MHz.subrange_S12 = build_subrange(S12, 200MHz, 400MHz)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

Page 38: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

38 IC-CAP Expressions

2 Data Access Functions

chop()

Replace numbers in x with magnitude less than dx with 0.

Synopsis y = chop(x{, dx})

then y= x if mag(x)>=mag(dx)

and y=0 if mag(x)<mag(dx)

dx is optional, default is 1e−10.

Actually this function is more complicated; it acts independently on the real and complex components of x, comparing each to mag(dx).

Examples chop(1)

returns 1chop(1e–12)

returns 0chop(1+1e–12i)

returns 1+0i

Defined in $ICCAP_ROOT/expressions/ael/elementary_fun.ael

Page 39: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 39

chr()

Returns the character representation of an integer.

Synopsis y = chr(x)

where x is a valid ASCII string representing a character.

Examples a = chr(64)

returns @

a = chr(60)

returns <a = chr(117)

returns u

Defined in Built in

Page 40: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

40 IC-CAP Expressions

2 Data Access Functions

circle()

Used to draw a circle on a Data Display page. Accepts the arguments center, radius, and number of points. Can only be used on polar plots and Smith charts.

Synopsis a = circle(x, y, z)

where

x is the center coordinate (can be a complex number).

y is the radius.

z is the number of points.

Examples x = circle(1,1,500)y = circle(1+j*1,1,500)

Defined in AEL

Page 41: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 41

collapse()

Collapses the inner independent variable and returns one dimensional data.

Synopsis y = collapse(x)

where x is a required argument. Its dimension is larger than one and less than four.

Examples Given monte carlo analysis results for the S11 of a transmission line: It is two- dimensional data: the outer sweep is mcTrial; the inner sweep is the frequency from 100 MHz to 300 MHz and is given in the following format:

collapsed_S11 = collapse(S11) returns a one dimensional data with mcTrail, containing all of the previous data.

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “expand()” on page 45

mcTrial freq S111 100MHz 0.2

200MHz 0.4300MHz 0.6

2 100MHz 0.3200MHz 0.5300MHz 0.7

mcTrial S111 0.21 0.41 0.62 0.32 0.52 0.7

Page 42: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

42 IC-CAP Expressions

2 Data Access Functions

contour()

Generates contour levels on surface data.

Synopsis y = contour(data {, contour_levels, interpolatio_ type})

where

data is the data to be contoured, which must be at least two- dimensional real number or integer or implicit.

contour_levels is an optional one- dimensional quantity specifying the levels of the contours, which is normally specified by the sweep generator “[ ],” but can also be specified as a vector. If not provided, contour_levels defaults to six levels equally spaced between the maximum and the minimum of the data.

interpolation_type specifies the type of interpolation to perform. Types of interpolation supported are:

0 – No Interpolation (Default)

1 – Cubic Spline

2 – B- Spline

Examples a = contour(dB(S11), [1::3::10])

ora = contour(dB(S11), {1, 4, 7, 10})

produces a set of four equally spaced contours on a surface generated as a function of, say, frequency and strip width.

a = contour(dB(S11), {1, 4, 7, 10}, 1)

produces the same set of contours as the above example, but with cubic spline interpolation.

Defined in

Built in

See also“contour_polar()” on page 44

Notes/Equations

This function introduces three extra inner independents into the data. The first two are "level", the contour level, and "number", the contour number. For each contour level there may

Page 43: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 43

be n contours. The contour is an integer running from 1 to n. The contour is represented as an (x, y) pair with x as the inner independent.

Page 44: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

44 IC-CAP Expressions

2 Data Access Functions

contour_polar()

Generates contour levels on polar or Smith chart surface data.

Synopsis y = contour_polar(data {, contour_levels, interpolation_type})

where

data is the polar or Smith chart data to be contoured, (and therefore is surface data).

contour_levels is an optional one- dimensional quantity specifying the levels of the contours, which is normally specified by the sweep generator “[ ],” but can also be specified as a vector.

If not provided, contour_levels defaults to six levels equally spaced between the maximum and the minimum of the data.

interpolation_type specifies the type of interpolation to perform. Types of interpolation supported are:

0 - No Interpolation (Default)

1 - Cubic Spline

2 - B- Spline

Examples a = contour_polar(data_polar, [1::4])

ora = contour_polar(data_polar, {1, 2, 3, 4})

produces a set of four equally spaced contours on a polar or Smith chart surface.a = contour_polar(data_polar, {1, 2, 3, 4}, 2)

produces the same set of contours as the above example, but with B- spline interpolation.

Defined in $ICCAP_ROOT/expressions/ael/display_fun.ael

See also “contour()” on page 42

Page 45: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 45

expand()

Expands the dependent data of a variable into single points by introducing an additional inner independent variable.

Synopsis y = expand(x)

where x is a required argument. Its dimension is larger than one and less than four.

Examples Given a dependent data A which has independent variables B:

If A is a 1 dimensional data containing 4 points (10, 20, 30, and 40) and similarly B is made up of 4 points (1, 2, 3, and 4),Eqn A = [10,20,30,40]Eqn B = [1,2,3,4]Eqn C = vs(A,B,"X")

Using expand(C) increases the dimensionality of the data by 1 where each inner dependent variable ("X") consists of 1 point.Eqn Y = expand(C)

Defined in Built in

See also “collapse()” on page 41

X C A B Y

1234

10203040

10203040

1234

X=110

X=220

X=330

X=440

Page 46: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

46 IC-CAP Expressions

2 Data Access Functions

find()

Finds the indices of the conditions that are true. Use with all IC- CAP data

Synopsis indices = find(condition)

The find function will return all the indices of the conditions that are true. If none of the conditions are true, then a - 1 is returned. The find function performs an exhaustive search on the given data. The supplied data can be an independent or dependent data. In addition, the dimension of the data that is returned will be identical to the dimension of the input data.

Examples Given an S- parameter data swept as a function of frequency, find the value of S11 at 1GHz.index_1 = find(freq == 1GHz)data = S11[index_1]

Given an S- parameter data swept as a function of frequency, find the values of the frequencies where the magnitude of S11 is greater than a given value.lookupValue = 0.58indices = find(mag(S11) > lookupValue))firstPoint = indices[0]lastPoint = indices[sweep_size(indices)-1]freqDifference = freq[lastPoint]- freq[firstPoint]

Defined in Built in

See also “find_index()” on page 47, “mix()” on page 75

Page 47: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 47

find_index()

Finds the closest index for a given search value. Use with all IC- CAP data.

Synopsis index = find_index(data_sweep, search_value)

To facilitate searching, the find_index function finds the index value in a sweep that is closest to the search value. Data of type int or real must be monotonic. find_index also performs an exhaustive search of complex and string data types.

Examples Given S- parameter data swept as a function of frequency, find the value of S11 at 1 GHz:index = find_index(freq, 1GHz)a = S11[index]

Defined in Built in

See also “find()” on page 46, “mix()” on page 75

Page 48: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

48 IC-CAP Expressions

2 Data Access Functions

fun_2d_outer()

Applies a function to the outer dimension of two- dimensional data.

Synopsis y = fun_2d_outer(data, fun)

where

data must be two- dimensional data.

fun is some function (usually mean, max, or min) that will be applied to the outer dimension of the data.

Examples y = fun_2d_outer(data, min)

Defined in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

See also “max_outer()” on page 151, “mean_outer()” on page 154, “min_outer()” on page 157

Notes/Equations

Used in “max_outer()” on page 151, “mean_outer()” on page 154, “min_outer()” on page 157 functions.

Functions such as mean, max, and min operate on the inner dimension of two- dimensional data. The function fun_2d_outer enables these functions to be applied to the outer dimension. As an example, assume that a Monte Carlo simulation of an amplifier was run, with 151 random sets of parameter values, and that for each set the S- parameters were simulated over 26 different frequency points. S21 becomes a [151 Monte Carlo iteration X 26 frequency] matrix, with the inner dimension being frequency, and the outer dimension being Monte Carlo index. Now, assume that it is desired to know the mean value of the S- parameters at each frequency. Inserting an equation mean(S21) computes the mean value of S21 at each Monte Carlo iteration. If S21 is simulated from 1 to 26 GHz, it computes the mean value over this frequency range, which usually is not very useful. The function fun_2d_outer allows the mean to be computed over each element in the outer dimension.

Page 49: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 49

generate()

This function generates a sequence of real numbers. The modern way to do this is to use the sweep generator “[ ].”

Synopsis y = generate(start, stop, npts)

where

start is the first number.

stop is the last number.

npts is the number of numbers in the sequence.

Examples a = generate(9, 4, 6)

returns the sequence 9., 8., 7., 6., 5., 4.

Defined in Built in

Page 50: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

50 IC-CAP Expressions

2 Data Access Functions

get_attr()

Gets a data attribute. This function only works with frequency swept variables.

Synopsis y = get_attr(data, "attr_name"{, eval})

where

data is a frequency swept variable.

attr_name is the name of an attribute.

eval is true or false as to whether to evaluate the attribute.

Examples y = get_attr(data, "fc", true)

returns 10GHzy = get_attr(data, "dataType")

returns "TimedData"y = get_attr(data, "TraceType", false)

returns "Spectral"

Defined in Built in

See also “set_attr()” on page 57

Page 51: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 51

get_indep_values()

Returns the independent values associated with the given dependent value as an array.

Synopsis indepVals = get_indep_values(Data, LookupValue)

where

Data is a 1 to 5 dimensional array.

LookupValue is the dependent value for which the corresponding independent values have to be found.

Examples We assume that the data is 2- dimensional i.e. 2 independent variables created from a Harmonic Balance Analysis with Pout being the output data.indepVals = get_indep_values(Pout, max(max(Pout))

returns the values of the independent as an array

Defined in $HPEESOF_DIR/expressions/ael/utility_fun.ael

See also “indep()” on page 52

Notes/Equations

This function can be used only on 1 to 5 dimensional data. The independent values have to be real. The dependent value to be looked up can only be a single value.

Page 52: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

52 IC-CAP Expressions

2 Data Access Functions

indep()

Returns the independent attached to the data

Synopsis Y = indep(x)Y = indep(x, dimension)Y = indep(x, "indep_name")

indep() returns the independent (normally the swept variable) attached to IC- CAP data. When there is more than one independent, then the independent of interest may be specified by number or by name. If no independent specifications are passed, then indep() returns the innermost independent.

Examples Given S- parameters versus frequency and power: Frequency is the innermost independent, so its index is 1. Power has index 2. freq = indep(S, 1)freq = indep(S, "freq")power = indep(S, 2)power = indep(S, "power")

Defined in Built in

See also “find_index()” on page 47

Page 53: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 53

max_index()

Returns the index of the maximum.

Synopsis y = max_index(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples y = max_index([1, 2, 3])

returns 2y = max_index([3, 2, 1])

returns 0

Defined in Built- in

See also “min_index()” on page 54

Page 54: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

54 IC-CAP Expressions

2 Data Access Functions

min_index()

Returns the index of the minimum

Synopsis y = min_index(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = min_index([3, 2, 1])

returns 2a = min_index([1, 2, 3])

returns 0

Defined in Built in

See also “max_index()” on page 53

Page 55: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 55

permute()

Permutes data based on the attached independents.

Synopsis y = permute(data, permute_vector)

where

data is any N- dimensional square data (all inner independents must have the same value N).

permute_vector is any permutation vector of the numbers 1 through N. The permute_vector defaults to {N::1}, representing a complete reversal of the data with respect to its independent variables. If permute_vector has fewer than N entries, the remainder of the vector, representing the outer independent variables, is filled in. In this way, expressions remain robust when outer sweeps are added.

Examples a = permute(data)a = permute(data, {3, 2, 1})

reverses the (three inner independents of) the data.a = permute(data, {1, 2, 3})

preserves the data.

Defined in Built in

Page 56: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

56 IC-CAP Expressions

2 Data Access Functions

plot_vs()

Attaches an independent to data for plotting.

Synopsis y = plot_vs(dependent, independent)

where

dependent is any N- dimensional square data (all inner independents must have the same value N).

independent is the independent variable.

Examples a=[1, 2, 3] b=[4, 5, 6]c=plot_vs(a, b)

Builds c with independent b, and dependent a.

Defined in $ICCAP_ROOT/expressions/ael/display_fun.ael

See also “indep()” on page 52, “vs()” on page 63

Notes/Equations

When using plot_vs(), the independent and dependent data should be the same size (i.e., not irregular).

Page 57: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 57

set_attr()

Sets the data attribute.

Synopsis y = set_attr(data, "attr_name", "attribute_value")

where

data is the data for which you want to set/change the attributes.

"attr_name" is the name of the attribute to be changed.

"attribute_value" is the value of the attribute to change to.

Examples a = set_attr(data, "TraceType", "Spectral")a = set_attr(data, "TraceType", "Histogram")

Defined in Built in

See also “get_attr()” on page 50

Page 58: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

58 IC-CAP Expressions

2 Data Access Functions

size()

Returns the row and column size of a vector or matrix.

Synopsis Y = size(X)

Examples Given 2- port S- parameters versus frequency, and given 10 frequency points. Then for ten 2 × 2 matrices, size() returns the dimensions of the S- parameter matrix, and its companion function sweep_size() returns the size of the sweep:Y = size(S)

returns {2, 2}Y = sweep_size(S)

returns 10

Defined in Built in

See also “sweep_size()” on page 61

Page 59: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 59

sort()

This measurement returns a sorted variable in ascending or descending order. The sorting can be done on the independent or dependent variables. String values are sorted by folding them to lower case.

Synopsis y = sort(data, sortOrder, indepName)

where

data is a multidimensional scalar variable.

sortOrder is the sorting order, {"ascending", "descending"} (If not specified, it is set to "ascending").

indepName is used to specify the name of the independent variable for sorting (if not specified, the sorting is done on the dependent).

Examples a = sort(data) a = sort(data, "descending", "freq")

Defined in Built in

Page 60: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

60 IC-CAP Expressions

2 Data Access Functions

sweep_dim()

Returns the dimensionality of the data.

Synopsis y = sweep_dim(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = sweep_dim(1)

returns 0a = sweep_dim([1, 2, 3])

returns 1

Defined in Built in

See also “sweep_size()” on page 61

Page 61: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 61

sweep_size()

Returns the sweep size of a data object.

Synopsis y = sweep_size(x)

This function returns a vector with an entry corresponding to the length of each sweep.

Examples Given 2- port S- parameters versus frequency, and given 10 frequency points, there are then ten 2 × 2 matrices. sweep_size() is used to return the sweep size of the S- parameter matrix, and its companion function size() returns the dimensions of the S- parameter matrix itself:a = sweep_size(S)

returns 10a = size(S)

returns {2, 2}

Defined in Built in

See also “size()” on page 58, “sweep_dim()” on page 60

Page 62: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

62 IC-CAP Expressions

2 Data Access Functions

type()

Returns the type of the data.

Synopsis y = type(x)

Returns a string, which is one of “Integer”, “Real”, “Complex” or “String”

Examples a = type(1)

returns “Integer”a = type(1i)

returns “Complex”a = type(“type”)

returns “String”

Defined in Built in

See also “what()” on page 64

Page 63: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Data Access Functions 2

IC-CAP Expressions 63

vs()

Attaches an independent to data.

Synopsis y = vs(dependent, independent)

Examples a=[1, 2, 3] b=[4, 5, 6]c = vs(a, b)

Builds c with independent b, and dependent a.

Defined in Built in

See also “indep()” on page 52

Page 64: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

64 IC-CAP Expressions

2 Data Access Functions

what()

Returns size and type of data. This function is used to determine the dimensions of a piece of data, the attached independents, the type, and (in the case of a matrix) the number of rows and columns. Use what() by entering a listing column and using the trace expression what(x).

Synopsis y = what(x)

Examples x=[10,20,30,40]

y=what(x)

Defined in Built in

See also “type()” on page 62

yDependency : [ ]Num. Points : [4]Matrix Size : scalarType : Integer

Page 65: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

65

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

3Harmonic Balance Functions

Working with Harmonic Balance Data 66

carr_to_im() 67

cdrange() 68

dc_to_rf() 69

ifc() 70

ip3_in() 71

ip3_out() 72

ipn() 73

it() 74

mix() 75

pae() 76

pfc() 77

phase_gain() 78

pspec() 79

pt() 80

remove_noise() 81

sfdr() 82

snr() 84

spur_track() 85

spur_track_with_if() 87

ts() 89

vfc() 91

vspec() 92

vt() 93

This chapter describes the harmonic balance functions in detail. The functions are listed in alphabetical order.

Page 66: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

66 IC-CAP Expressions

3 Harmonic Balance Functions

Working with Harmonic Balance Data

Harmonic Balance (HB) Analysis produces complex voltages and currents as a function of frequency or harmonic number. A single analysis produces 1- dimensional data. Individual harmonic components can be indexed by means of “[ ]”. Multi- tone HB also produces 1- dimensional data. Individual harmonic components can be indexed as usual by means of “[ ]”. However, the function “mix()” on page 75 provides a convenient way to select a particular mixing component.

Page 67: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 67

carr_to_im()

This measurement gives the suppression (in dB) of a specified IMD product below the fundamental power at the output port.

Synopsis y = carr_to_im(vOut, fundFreq, imFreq{, Mix})

where

vOut is the signal voltage at the output port.

fundFreq and imFreq are the harmonic frequency indices for the fundamental frequency and IMD product of interest, respectively.

Mix is an optional argument. The mix variable consists of all possible vectors of harmonic frequency (mixing terms) in the analysis. It is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/current spectrum.

Examples a = carr_to_im(out, {1, 0}, {2, –1})

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ip3_out()” on page 72

Page 68: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

68 IC-CAP Expressions

3 Harmonic Balance Functions

cdrange()

Returns compression dynamic range.

Synopsis y = cdrange(nf, inpwr_lin, outpwr_lin, outpwr)

where

nf is noise figure at the output port.

inpwr_lin and outpwr_lin are input and the output power, respectively, in the linear region.

outpwr is output power at 1 dB compression.

Examples a = cdrange(nf2, inpwr_lin, outpwr_lin, outpwr)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “sfdr()” on page 82

Notes/Equations

Used in XDB simulation.

The compressive dynamic range ratio identifies the dynamic range from the noise floor to the 1- dB gain- compression point. The noise floor is the noise power with respect to the reference bandwidth.

Page 69: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 69

dc_to_rf()

This measurement computes the DC- to- RF efficiency of any part of the network.

Synopsis y = dc_to_rf(vPlusRF, vMinusRF, vPlusDC, vMinusDC, currentRF, currentDC, harm_freq_index{, Mix})

where

vPlusRF and vMinusRF are RF voltages at the negative terminals.

vPlusDC and vMinusDC are DC voltages at the negative terminals.

currentRF and currentDC are the RF and DC currents for power calculation.

harm_freq_index is harmonic index of the RF frequency at the output port.

Mix is an optional variable consisting of all possible vectors of harmonic frequency indices (mixing terms) in the analysis.

Examples a = dc_to_rf(vrf, 0, vDC, 0, I_Probe1.i, SRC1.i, {1,0})

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

Page 70: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

70 IC-CAP Expressions

3 Harmonic Balance Functions

ifc()

This measurement gives the RMS current value of one frequency- component of a harmonic balance waveform.

Synopsis y = ifc(iOut, harm_freq_index{, Mix})

where

iOut is the current through a branch.

harm_freq_index is the harmonic index of the desired frequency. Note that the harm_freq_index argument's entry should reflect the number of tones in the harmonic balance controller. For example, if one tone is used in the controller, there should be one number inside the braces; two tones would require two numbers separated by a comma.

Mix is an optional variable consisting of all possible vectors of harmonic frequency indices (mixing terms) in the analysis.

Examples The following example is for two tones in the harmonic balance controller:y = ifc(I_Probe1.i, {1, 0})

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “pfc()” on page 77, “vfc()” on page 91

Page 71: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 71

ip3_in()

This measurement determines the input third- order intercept point (in dBm) at the input port with reference to a system output port.

Synopsis y = ip3_in(vOut, ssGain, fundFreq, imFreq, zRef{, Mix})

where

vOut is the signal voltage at the output.

ssGain is the small signal gain in dB.

fundFreq and imFreq are the harmonic frequency indices for the fundamental and intermodulation frequencies, respectively.

zRef is the reference impedance.

Mix is an optional argument. The mix variable consists of all possible vectors of harmonic frequency (mixing terms) in the analysis. It is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/current spectrum.

Examples y = ip3_in(vOut, 22, {1, 0}, {2, –1}, 50)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ip3_out()” on page 72, “ipn()” on page 73

Notes/Equations

To measure the third- order intercept point, you must setup a Harmonic Balance simulation with the input signal driving the circuit in the linear range. Input power is typically set 10 dB below the 1 dB gain compression point. If you simulate the circuit in the nonlinear region, the calculated results will be incorrect.

Page 72: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

72 IC-CAP Expressions

3 Harmonic Balance Functions

ip3_out()

This measurement determines the output third- order intercept point (in dBm) at the system output port.

Synopsis y = ip3_out(vOut, fundFreq, imFreq, zRef{, Mix})

where

vOut is the signal voltage at the output

fundFreq and imFreq are the harmonic frequency indices for the fundamental and intermodulation frequencies, respectively.

zRef is the reference impedance.

Mix is an optional argument. The mix variable consists of all possible vectors of harmonic frequency (mixing terms) in the analysis. It is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/current spectrum.

Examples y = ip3_out(vOut, {1, 0}, {2, –1}, 50)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ip3_in()” on page 71, “ipn()” on page 73

Notes/Equations

To measure the third- order intercept point, you must setup a Harmonic Balance simulation with the input signal driving the circuit in the linear range. Input power is typically set 10 dB below the 1 dB gain compression point. If you simulate the circuit in the nonlinear region, the calculated results will be incorrect.

Page 73: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 73

ipn()

This measurement determines the output nth- order intercept point (in dBm) at the system output port.

Synopsis y = ipn(vPlus, vMinus, iOut, fundFreq, imFreq, n)

where

vPlus and vMinus are the voltages at the positive and negative output terminals, respectively.

iOut is the current through a branch.

fundFreq and imFreq are the harmonic indices of the fundamental and intermodulation frequencies, respectively.

n is the order of the intercept.

Examples y = ipn(vOut, 0, I_Probe1.i, {1, 0}, {2, -1}, 3)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ip3_in()” on page 71, “ip3_out()” on page 72

Notes/Equations

To measure the third- order intercept point, you must setup a Harmonic Balance simulation with the input signal driving the circuit in the linear range. Input power is typically set 10 dB below the 1 dB gain compression point. If you simulate the circuit in the nonlinear region, the calculated results will be incorrect.

Page 74: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

74 IC-CAP Expressions

3 Harmonic Balance Functions

it()

This measurement converts a harmonic- balance current frequency spectrum to a time- domain current waveform.

Synopsis it(iOut, tmin, tmax, numOfPnts)

where

iOut is the current through a branch.

tmin and tmax are start time are stop time, respectively.

numOfPts is the number of points (integer values only).

Examples y = it(I_Probe1.i, 0, 10nsec, 201)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “vt()” on page 93

Page 75: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 75

mix()

Returns a component of a spectrum based on a vector of mixing indices.

Synopsis mix(xOut, harmIndex{, Mix})

where

xOut is a voltage or a current spectrum.

harmIndex is the desired vector of harmonic frequency indices (mixing terms).

Mix is a variable consisting of all possible vectors of harmonic frequency indices (mixing terms) in the analysis.

Examples y = mix(vOut, {2, -1}) z = mix(vOut⋅vOut/50, {2, -1}, Mix)

Defined in Built in

See also “find_index()” on page 47

Notes/Equations

This function returns the mixing component of a voltage or a current spectrum corresponding to particular harmonic- frequency indices or mixing terms. Note that the third argument, Mix, is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/or current spectrums.

Page 76: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

76 IC-CAP Expressions

3 Harmonic Balance Functions

pae()

This measurement computes the power- added efficiency (in percent) of any part of the circuit.

Synopsis y = pae(vPlusOut, vMinusOut, vPlusIn, vMinusIn, vPlusDC, vMinusDC, iOut, iIn, iDC, outFreq, inFreq)

where

vPlusOut and vMinusOut are output voltages at the positive and negative terminals.

vPlusIn and vMinusIn are input voltages at the positive and negative terminals.

vPlusDC and vMinusDC are DC voltages at the positive and negative terminals.

iOut, iIn, and iDC are the output, input, and DC currents, respectively.

outFreq and inFreq are harmonic indices of the fundamental frequency at the output and input port, respectively.

Examples y = pae(vOut, 0, vIn, 0, v1, 0, I_Probe1.i, I_Probe2.i, I_Probe3.i, 1, 1)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “db()” on page 122, “dbm()” on page 123

Page 77: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 77

pfc()

This measurement gives the RMS power value of one frequency component of a harmonic balance waveform.

Synopsis y = pfc(vPlus, vMinus, iOut, harm_freq_index)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

iOut is the current through a branch.

harm_freq_index is the harmonic index of the desired frequency. Note that the harm_freq_index argument's entry should reflect the number of tones in the harmonic balance controller. For example, if one tone is used in the controller, there should be one number inside the braces; two tones would require two numbers separated by a comma.

Examples The following example is for two tones in the harmonic balance controller:y = pfc(vOut, 0, I_Probe1.i, {1, 0})

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ifc()” on page 70, “vfc()” on page 91

Page 78: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

78 IC-CAP Expressions

3 Harmonic Balance Functions

phase_gain()

Returns the gain associated with the phase (normally zero) crossing at associated power. Can be used in the Harmonic Balance Analysis of an oscillator to get the loop- gain. Returns an array of gains.

Synopsis y = phase_gain(Gain {, DesiredPhase})

where

Gain is two dimensional data representing gain of complex type (e.g., Loop- gain of an oscillator).

DesiredPhase is a single value representing the desired phase.

Examples We assume that a Harmonic Balance analysis has been performed at different power.gainAtZeroPhase = phase_gain(Vout/Vin, 0)

returns the gain at zero phase.

Defined in $HPEESOF_DIR/expressions/ael/rf_system_fun.ael

Page 79: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 79

pspec()

This measurement gives a power frequency spectrum in harmonic balance analyses.

Synopsis y = pspec(vPlus, vMinus, iOut)

where

vPlus and vMinus are voltages at the positive and negative terminals.

iOut is the current through a branch measured for power calculation.

Examples a = pspec(vOut, 0, I_Probe1.i)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

Page 80: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

80 IC-CAP Expressions

3 Harmonic Balance Functions

pt()

This measurement calculates the total power of a harmonic balance frequency spectrum.

Synopsis y = pt(vPlus, vMinus, iOut)

where

vPlus and vMinus are the voltages at the positive and negative terminals, respectively.

iOut is the current through a branch.

Examples y = pt(vOut, 0, I_Probe1.i)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “pspec()” on page 79

Page 81: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 81

remove_noise()

Removes noise floor data from noise data and returns an array.

Synopsis nd = remove_noise(NoiseData, NoiseFloor)

where

NoiseData is a two dimensional array representing noise data

NoiseFloor is a single dimensional array representing noise floor

Examples nd = remove_noise(vnoise, noiseFloor)

returns the noise data with the noise floor removed

Used in Harmonic Balance

Available asmeasurement

component?

Not available

Defined in $HPEESOF_DIR/expressions/ael/rf_system_fun.ael

Description NoiseData is [m,n] where m is receive frequency and n is interference offset frequency. If NoiseData is [m,n], NoiseFloor must be [m]. If NoiseData – NosieFloor is less than zero, then - 200 dBm is used.

Page 82: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

82 IC-CAP Expressions

3 Harmonic Balance Functions

sfdr()

Returns the spurious- free dynamic range.

Synopsis y = sfdr(vOut, ssgain, nf, noiseBW, fundFreq, imFreq, zRef{, Mix})

where

vOut is the output voltage.

ssgain is the small- signal gain (in dB).

nf is the noise figure at the output port.

noiseBW is the noise bandwidth.

fundFreq and imFreq are the harmonic frequency indices for the fundamental and intermodulation frequencies, respectively.

zRef is the reference impedance.

Mix is an optional argument. The mix variable consists of all possible vectors of harmonic frequency (mixing terms) in the analysis. It is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/current spectrum.

Examples a = sfdr(vIn, 12, nf2, , {1, 0}, {2, -1}, 50)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ip3_out()” on page 72

Notes/Equations

Used in a Harmonic Balance simulation, sfdr is used in Small- signal S- parameter simulations. It appears in the HB Simulation palette.

This measurement determines the spurious- free dynamic- range ratio for noise power with respect to the reference bandwidth. zRef is an optional parameter that, if not specified, is set to 50.0 ohms.

To measure the third- order intercept point, you must setup a Harmonic Balance simulation with the input signal driving the circuit in the linear range. Input power is typically set 10 dB

Page 83: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 83

below the 1 dB gain compression point. If you simulate the circuit in the nonlinear region, the calculated results will be incorrect.

Page 84: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

84 IC-CAP Expressions

3 Harmonic Balance Functions

snr()

This measurement gives the ratio of the output signal power (at the fundamental frequency for a harmonic balance simulation) to the total noise power (in dB).

Synopsis y = snr(vOut, vOut.noise{, fundFreq, Mix})

where

vOut and vOut.noise are the signal and noise voltages at the output port.

fundFreq is the harmonic frequency index for the fundamental frequency. Note that fundFreq is not optional; it is required for harmonic balance simulations, but it is not applicable in AC simulations.

Mix is an optional argument. The mix variable consists of all possible vectors of harmonic frequency (mixing terms) in the analysis. It is required whenever the first argument is a spectrum obtained from an expression that operates on the voltage and/current spectrum. It is not applicable for an AC simulation.

Examples a = snr(vOut, vOut.noise, {1, 0})

returns the signal- to- power noise ratio for a harmonic balance simulation.

a = snr(vOut, vOut.noise)

returns the signal- to- power noise ratio for an AC simulation.

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ns_pwr_int()” on page 233, “ns_pwr_ref_bw()” on page 234

Notes/Equations

If the second argument is of higher dimension than the first, the noise bandwidth used for the purpose of computing snr will be equal to the frequency spacing of the innermost dimension of the noise data, instead of the standard value of 1 Hz.

Page 85: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 85

spur_track()

Returns the maximum power of all signals appearing in a user- specifiable IF band, as a single RF input signal is stepped. If there is no IF signal appearing in the specified band, for a particular RF input frequency, then the function returns an IF signal power of - 500 dBm.

Synopsis IFspur = spur_track(vs(vout, freq), if_low, if_high, rout)

where

vout is the IF output node name.

if_low is the lowest frequency in the IF band

if_high is the highest frequency in the IF band

rout is the load resistance connected to the IF port, necessary for computing power delivered to the load.

IFspur computed above will be the power in dBm of the maximum signal appearing in the IF band, versus RF input frequency. Note that it would be easy to modify the function to compute dBV instead of dBm.

Examples IFspur = spur_track(vs(HB.VIF1, freq), Fiflow[0, 0], Fifhigh[0, 0], 50)

where

VIF1 is the named node at the IF output.

Fiflow is the lowest frequency in the IF band.

Fifhigh is the highest frequency in the IF band.

50 is the IF load resistance.

Fiflow and Fifhigh are passed parameters from the schematic page (although they can be defined on the data display page instead.) These parameters, although single- valued on the schematic, become matrices when passed to the dataset, where each element of the matrix has the same value. The [0, 0] syntax just selects one element from the matrix.

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

Page 86: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

86 IC-CAP Expressions

3 Harmonic Balance Functions

See also “spur_track_with_if()” on page 87

Notes/Equations

Used in Receiver spurious response simulations

This function is meant to aid in testing the response of a receiver to RF signals at various frequencies. This function shows the maximum power of all signals appearing in a user- specifiable IF band, as a single RF input signal is stepped. There could be fixed, interfering tones present at the RF input also, if desired. The maximum IF signal power may be plotted or listed versus the stepped RF input signal frequency. If there is no IF signal appearing in the specified band, for a particular RF input frequency, then the function returns an IF signal power of - 500 dBm.

Page 87: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 87

spur_track_with_if()

Returns the maximum power of all signals appearing in a user- specifiable IF band, as a single RF input signal is stepped. In addition, it shows the IF frequencies and power levels of each signal that appears in the IF band, as well as the corresponding RF signal frequency.

Synopsis IFspur = spur_track_with_if(vs(vout, freq), if_low, if_high, rout)

where

vout is the IF output node name.

if_low is the lowest frequency in the IF band.

if_high is the highest frequency in the IF band.

rout is the load resistance connected to the IF port, necessary for computing power delivered to the load.

IFspur computed above will be the power in dBm of the maximum signal appearing in the IF band, versus RF input frequency. Note that it would be easy to modify the function to compute dBV instead of dBm.

Examples IFspur=spur_track_with_if(vs(HB.VIF1, freq), Fiflow[0, 0], Fifhigh[0, 0], 50)

where

VIF1 is the named node at the IF output.

Fiflow is the lowest frequency in the IF band.

Fifhigh is the highest frequency in the IF band.

50 is the IF load resistance.

Fiflow and Fifhigh are passed parameters from the schematic page (although they can be defined on the data display page instead.) These parameters, although single- valued on the schematic, become matrices when passed to the dataset, where each element of the matrix has the same value. The [0, 0] syntax just selects one element from the matrix.

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

Page 88: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

88 IC-CAP Expressions

3 Harmonic Balance Functions

See also “spur_track()” on page 85

Notes/Equations

Used in Receiver spurious response simulations.

This function is meant to aid in testing the response of a receiver to RF signals at various frequencies. This function, similar to the spur_track function, shows the maximum power of all signals appearing in a user- specifiable IF band, as a single RF input signal is stepped. In addition, it shows the IF frequencies and power levels of each signal that appears in the IF band, as well as the corresponding RF signal frequency. There could be fixed, interfering tones present at the RF input also, if desired. The maximum IF signal power may be plotted or listed versus the stepped RF input signal frequency.

Page 89: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 89

ts()

Performs a frequency- to- time transform.

Synopsis y= ts(x{, tstart, tstop, numtpts, dim, windowType, windowConst, nptsspec})

See detailed Notes/ Equations below.

Examples The following examples of ts assume that a harmonic balance simulation was performed with a fundamental frequency of 1 GHz and order = 8:Y=ts(vOut)

returns the time series (0, 20ps, ... , 2ns)Y=ts(vOut, 0, 1ns)

returns the time series (0, 10ps, ..., 1ns)Y=ts(vOut, 0, 10ns, 201)

returns the time series (0, 50ps, ... , 10ns)Y=ts(vOut, , , , , , , 3)

returns the time series (0, 20ps, ... , 2ns), but only uses harmonics from 1 to 3 GHz

Defined in Built in

See also “fft()” on page 134, “fspot()” on page 302

Notes/Equations

Used in Harmonic Balance simulations.

ts(x) returns the time domain waveform from a frequency spectrum. When x is a multidimensional vector, the transform is evaluated for each vector in the specified dimension. For example, if x is a matrix, then ts(x) applies the transform to every row of the matrix. If x is three dimensional, then ts(x) is applied in the lowest dimension over the remaining two dimensions. The dimension over which to apply the transform may be specified by dimension; the default is the lowest dimension (dimension=1). ts() originated in MDS and is similar to vt().

x must be numeric. It will typically be data from a harmonic balance analysis.

Page 90: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

90 IC-CAP Expressions

3 Harmonic Balance Functions

By default, two cycles of the waveform are produced with 101 points, starting at time zero, based on the lowest frequency in the input spectrum. These may be changed by setting tstart, tstop, or numtpts.

All of the harmonics in the spectrum will be used to generate the time domain waveform. When the higher- order harmonics are known not to contribute significantly to the time domain waveform, only the first n harmonics may be requested for the transform, by setting nptsspec = n.

The data to be transformed may be windowed by a window specified by windowType, with an optional window constant windowConst. The window types allowed and their default constants are:

0 = None

1 = Hamming 0.54

2 = Hanning 0.50

3 = Gaussian 0.75

4 = Kaiser 7.865

5 = 8510 6.0 (This is equivalent to the frequency- to- time transformation with normal gate window setting in the 8510 series network analyzer.)

6 = Blackman

7 = Blackman- Harris

windowType can be specified either by the number or by the name.

ts(x) can be used to process more than Harmonic Balance. For example, ts(x) can be used to convert AC simulation data to a time domain waveform using only one frequency point in the AC simulation.

Page 91: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 91

vfc()

This measurement gives the RMS voltage value of one frequency- component of a harmonic balance waveform.

Synopsis y = vfc(vPlus, vMinus, harm_freq_index)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

harm_freq_index is the harmonic index of the desired frequency. Note that the harm_freq_index argument's entry should reflect the number of tones in the harmonic balance controller. For example, if one tone is used in the controller, there should be one number inside the braces; two tones would require two numbers separated by a comma.

Examples The following example is for two tones in the harmonic balance controller:a = vfc(vOut, 0, {1, 0})

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ifc()” on page 70, “pfc()” on page 77

Page 92: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

92 IC-CAP Expressions

3 Harmonic Balance Functions

vspec()

Returns the voltage frequency spectrum.

Synopsis y = vspec(vPlus, vMinus)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

Examples a = vspec(v1, v2)

Used in Harmonic Balance

Defined in $HPEESOF_DIR/expressions/ael/circuit_fun.ael

See also “pspec()” on page 79

Description This measurement gives a voltage frequency spectrum across any two nodes. The measurement gives a set of RMS voltages at each frequency.

Page 93: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Harmonic Balance Functions 3

IC-CAP Expressions 93

vt()

This measurement converts a harmonic- balance voltage frequency spectrum to a time- domain voltage waveform. vt() originated in SIV and is similar to ts().

Synopsis y = vt(vPlus, vMinus, tmin, tmax, numOfPnts)

where

vPlus and vMinus are the voltages at the positive and negative nodes, respectively.

tmin and tmax are the start time and stop time, respectively.

numOfPts is the number of points (integer values only).

Examples a = vt(vOut, 0, 0, 10nsec, 201)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “it()” on page 74

Page 94: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

94 IC-CAP Expressions

3 Harmonic Balance Functions

Page 95: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

95

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

4Math Functions

Aabs() 97

acos() 98

acosh() 99

acot() 100

acoth() 101

asin() 102

asinh() 103

atan() 104

atan2() 105

atanh() 106

Cceil() 107

cint() 108

cmplx() 109

complex() 110

conj() 111

convBin() 112

convHex() 113

convInt() 114

convOct() 115

cos() 116

cosh() 117

cot() 118

coth() 119

cum_prod() 120

cum_sum() 121

D,E,Fdb() 122

dbm() 123

dbmtow() 125

deg() 126

diagonal() 127

diff() 128

erf() 129

erfc() 130

erfcinv() 131

erfinv() 132

exp() 133

fft() 134

fix() 135

float() 136

floor() 137

Page 96: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

96 IC-CAP Expressions

4 Math Functions

This chapter describes the math functions in detail. The functions are listed in alphabetical order. You can generally use these functions with data from any type of analysis. They consist of traditional math (e.g., trigonometric functions and matrix operations) and other functions.

I,J, Lidentity() 138

im() 139

imag() 140

int() 141

integrate() 142

interp() 143

inverse() 144

jn() 145

ln() 146

log() 147

log10() 148

M,N,Omag() 149

max() 150

max_outer() 151

max2() 152

mean() 153

mean_outer() 154

median() 155

min() 156

min_outer() 157

min2() 158

num() 159

ones() 160

P,Rphase() 161

phase_comp() 162

phasedeg() 163

phaserad() 164

polar() 165

pow() 166

prod() 167

rad() 168

re() 169

real() 170

rms() 171

round() 172

S,Q,X,Zsgn() 173

sin() 174

sinc() 175

sinh() 176

sqrt() 177

sum() 178

tan() 179

tanh() 180

transpose() 181

unwrap() 182

wtodbm() 183

xor() 184

zeros() 185

Page 97: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 97

abs()

Returns the absolute value of a real number or an integer. In the case of a complex number, the abs function:

• accepts one complex argument.

• returns a positive real number.

• returns the magnitude of its complex argument.

Synopsis y = abs(x)

where x is an integer or real number.

Examples a = abs(−45)

returns 45

Defined in Built in

See also “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log()” on page 147, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

Page 98: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

98 IC-CAP Expressions

4 Math Functions

acos()

Returns the inverse cosine, or arc cosine, in radians, of a real number or integer.

Synopsis y = acos(x)

where x is an integer or real number, and y ranges from 0 to pi.

Examples a = acos(−1)

returns 3.142

Defined in Built in

See also “asin()” on page 102, “atan()” on page 104, “atan2()” on page 105

Page 99: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 99

acosh()

Returns the inverse hyperbolic cosine of an integer, real or complex number.

Synopsis y = acosh(x)

where x is any integer, real number, or complex number.

Examples a = acosh(1.5)

returns 0.962

Defined in Built in

See also “acos()” on page 98, “asin()” on page 102, “atan()” on page 104, “atan2()” on page 105

Page 100: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

100 IC-CAP Expressions

4 Math Functions

acot()

Returns the inverse cotangent of an integer, real, or complex number.

Synopsis y = acot(x)

where x is any integer, real, or complex number.

Examples a = acot(1.5)

returns 0.588

Defined in Built in

See also “asin()” on page 102, “atan()” on page 104, “atan2()” on page 105

Page 101: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 101

acoth()

Returns the inverse hyperbolic cotangent of an integer, real, or complex number.

Synopsis y = acoth(x)

where x is any integer, real, or complex number.

Examples a = acoth(1.5)

returns 0.805

Defined in Built in

See also “acot()” on page 100, “asin()” on page 102, “atan()” on page 104, “atan2()” on page 105

Page 102: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

102 IC-CAP Expressions

4 Math Functions

asin()

Returns the inverse sine, or arc sine, in radians, of a real number or integer.

Synopsis y = asin(x)

where x is an integer or real number and y ranges from −pi/2 to pi/2.

Examples a = asin(−1)

returns −1.571

Defined in Built in

See also “acos()” on page 98, “atan()” on page 104, “atan2()” on page 105

Page 103: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 103

asinh()

Returns the inverse hyperbolic sine of an integer, real, or complex number.

Synopsis y = asinh(x)

where x is an integer, real number, or complex number.

Examples a = asinh(.5)

returns 0.481

Defined in Built in

See also “asin()” on page 102, “acos()” on page 98, “atan()” on page 104, “atan2()” on page 105

Page 104: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

104 IC-CAP Expressions

4 Math Functions

atan()

Returns the inverse tangent, or arc tangent, in radians, of a real number or integer.

Synopsis y = atan(x)

where x is a real number or integer and y ranges from - pi/2 to pi/2.

Examples a = atan(−1)

returns −0.785

Defined in Built in

See also “acos()” on page 98, “asin()” on page 102, “atan2()” on page 105

Page 105: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 105

atan2()

Returns the inverse tangent, or arc tangent, of the rectangular coordinates y and x.

Synopsis w = atan2(y, x)

where y and x are integer or real number coordinates, and w ranges from −pi to pi. atan2(0, 0) defaults to −pi/2.

Examples a = atan2(1, 0)

returns 1.571

Defined in Built in

See also “acos()” on page 98, “asin()” on page 102, “atan()” on page 104

Page 106: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

106 IC-CAP Expressions

4 Math Functions

atanh()

Returns the inverse hyperbolic tangent of an integer, real, or complex number.

Synopsis y = atanh(x)

where x is an integer, real, or complex number.

Examples a = atanh(.5)

returns 0.549

Defined in Built in

See also “acos()” on page 98, “asin()” on page 102, “atan()” on page 104, “atan2()” on page 105

Page 107: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 107

ceil()

Given a real number, returns the smallest integer not less than its argument; that is, its argument rounded to the next highest number.

Synopsis y = ceil(realVal)

where realVal is a real number.

Examples a = ceil(5.27)

returns 6

Defined in Built in

Page 108: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

108 IC-CAP Expressions

4 Math Functions

cint()

Given a non- integer real number, returns a rounded integer.

Synopsis y = cint(x)

where x is a real number to be rounded to an integer.

Examples a = cint(45.6)

returns 46a = cint(-10.7)

returns - 11

Defined in Built in

See also “abs()” on page 97, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log()” on page 147, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

NOTE 0.5 rounds up, −0.5 rounds down (up in magnitude).

Page 109: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 109

cmplx()

Given two real numbers representing the real and imaginary components of a complex number, returns a complex number.

Synopsis y = cmplx(x, y)

where x is the real component and y is the imaginary component.

Examples a = cmplx(2, –1)

returns 2 – 1j

Defined in Built in

See also “complex()” on page 110, “imag()” on page 140, “real()” on page 170

NOTE Use the real and imag functions to retrieve the real and imaginary components, respectively. The basic math functions operate on complex numbers.

Page 110: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

110 IC-CAP Expressions

4 Math Functions

complex()

Given two real numbers representing the real and imaginary components of a complex number, returns a complex number.

Synopsis y = complex(x, y)

where x is the real component and y is the imaginary component.

Examples a = cmplex(2, –1)

returns 2 – 1j

Defined in Built in

See also “cmplx()” on page 109, “imag()” on page 140, “real()” on page 170

NOTE Use the real and imag functions to retrieve the real and imaginary components, respectively. The basic math functions operate on complex numbers.

Page 111: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 111

conj()

Returns the conjugate of a complex number.

Synopsis y = conj(x)

where x is a complex number.

Examples a = conj(3–4*j)

returns 3.000 + j4.000 or 5.000/53.130 in magnitude/degrees

Defined in Built in

See also “mag()” on page 149

Page 112: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

112 IC-CAP Expressions

4 Math Functions

convBin()

Returns a binary string of an integer with n- digits.

Synopsis y = convBin(val, num)

where

val is any integer to be converted to a binary string.

num is an integer to specify the number of digits in the binary string.

Examples a = convBin(1064, 8)

returns 00101000

Defined in Built in

See also “convHex()” on page 113, “convInt()” on page 114, “convOct()” on page 115

Page 113: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 113

convHex()

Returns a hexadecimal string of an integer with n- digits.

Synopsis y = convHex(val, num)

where

val is any integer to be converted to a hexadecimal string.

num is an integer to specify the number of digits in the hexadecimal string.

Examples a = convHex(1064, 8)

returns 00000428

Defined in Built in

See also “convBin()” on page 112, “convOct()” on page 115, “convInt()” on page 114

Page 114: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

114 IC-CAP Expressions

4 Math Functions

convInt()

Returns an integer of a binary, octal or hexadecimal number

Synopsis y = convInt(“val”, Base)

where

“val” is a string representation of the binary, octal or hexadecimal number to be converted to an integer.

Base is a integer to specify the base of the conversion binary – 2, octal – 8, hexadecimal – 16.

Examples b2I = convInt(“11100”, 2)

returns 28o2I = convInt(“34”, 8)

returns 28h2I = convInt(“1c”, 16)

returns 28

Defined in Built in

See also “convBin()” on page 112, “convHex()” on page 113, “convOct()” on page 115

Page 115: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 115

convOct()

Returns an octal string of an integer with n- digits.

Synopsis y = convOct(val, num)

where

val is any integer to be converted to an octal string.

num is an integer to specify the number of digits in the octal string.

Examples a = convOct(1064, 8)

returns 00002050

Defined in Built in

See also “convBin()” on page 112, “convHex()” on page 113, “convInt()” on page 114

Page 116: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

116 IC-CAP Expressions

4 Math Functions

cos()

Returns the cosine of an integer or real number.

Synopsis y = cos(x)

where x is the real number or integer, in radians.

Examples y = cos(pi/3)

returns 0.500

Defined in Built in

See also “sin()” on page 174, “tan()” on page 179

Page 117: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 117

cosh()

Returns the hyperbolic cosine of an integer or real number.

Synopsis y = cosh(x)

where x is the real number or integer, in radians.

Examples y = cosh(0)

returns 1y = cosh(1)

returns 1.543

Defined in Built in

See also “sinh()” on page 176, “tanh()” on page 180

Page 118: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

118 IC-CAP Expressions

4 Math Functions

cot()

Returns the cotangent of an integer, real, or complex number.

Synopsis y = cot(x)

where x is any integer, real, or complex number.

Examples a = cot(1.5)

returns 0.071

Defined in Built in

See also “tan()” on page 179, “tanh()” on page 180

Page 119: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 119

coth()

Returns the hyperbolic cotangent of an integer, real, or complex number.

Synopsis y = coth(x)

where x is any integer, real, or complex number.

Examples a = coth(1.5)

returns 1.105

Defined in Built in

See also “cot()” on page 118, “tan()” on page 179, “tanh()” on page 180

Page 120: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

120 IC-CAP Expressions

4 Math Functions

cum_prod()

Returns the cumulative product.

Synopsis y = cum_prod(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[x, y, ...]”

Examples y = cum_prod(1)

returns 1.000y = cum_prod([1, 2, 3])

returns [1.000, 2.000, 6.000]y = cum_prod([i, i])

returns [i, i2]

Defined in Built in

See also “cum_sum()” on page 121, “max()” on page 150, “mean()” on page 153, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 121: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 121

cum_sum()

Returns the cumulative sum.

Synopsis y = cum_sum(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[x, y, ...]”

Examples y = cum_sum([1, 2, 3])

returns [1.000, 3.000, 6.000]y = cum_sum([i, i]

returns [i,2i]

Defined in Built in

See also “cum_prod()” on page 120, “max()” on page 150, “mean()” on page 153, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 122: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

122 IC-CAP Expressions

4 Math Functions

db()

Returns the decibel measure of a voltage ratio.

Synopsis y = db(r{, z1, z2}) = 20 log(mag(r)) - 10 log(zOutfactor/zInfactor)

where

r is a voltage ratio (vOut/vIn).

z1 is the source impedance (default is 50).

zOutfactor = mag(z2)**2 / real (z2), z2 is the load impedance (default is 50).

zInfactor = mag(z1)**2 / real (z1).

Examples y = db(100)

returns 40y = db(8-6*j)

returns 20

Defined in Built in

See also “dbm()” on page 123, “pae()” on page 76

Page 123: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 123

dbm()

Returns the decibel measure of a voltage referenced to a 1 milliwatt signal.

Synopsis y = dbm(v{, z}) = 20 log(mag(v)) - 10 log(real(zOutfactor/50)) + 10

where

v is a voltage (the peak voltage).

z is an impedance (default is 50).

zOutfactor = mag(z)**2 / real (z).

The voltage is assumed to be a peak value. Signal voltages stored in the dataset from AC and harmonic balance simulations are in peak volts. However, noise voltages obtained from AC and HB simulations are in rms volts. Using the dbm() function with noise voltages will yield a result that is 3 dB too low unless the noise voltage is first converted to peak:

noise_power = dbm(vout.noise * sqrt(2));

For more information, refer to Understanding the dbm() function 123.

Examples y = dbm(100)

returns 50y = dbm(8-6*j)

returns 30

Defined in Built in

See also “db()” on page 122, “pae()” on page 76

Understanding the dbm() function

Given a power Po in Watts, the power in dB is:

while the power in dBm is:

Po_dB = 10*log(mag(Po/(1 W)))

Po_dBm = 10*log(mag(Po/(1 mW)))

Page 124: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

124 IC-CAP Expressions

4 Math Functions

Given a voltage Vo in Volts, the voltage in dB is:

This is the db() function - voltage in dB relative to 1 V.

Given a real impedance Zo, the power- voltage relation is:

Using the above, Po in dBm is then:

This is the dbm() function - voltage in dBm in a Zo environment.

= 10*log(mag(Po/(1 W)))+ 30= Po_dB + 30

V_dB = 20*log(mag((Vo/(1 V)))

Po = (Vo)2/(2*Zo)

Po_dBm = 10*log(mag(Po/(1 W))) + 30= 10*log(mag((Vo/(1 V))2/(2*Zo/(1 Ohm)))) + 30= 10*log(mag((Vo/(1 V))2)) - 10*log(mag(2*Zo/(1

Ohm))) + 30= 20*log(mag(Vo/(1 V))) - 10*log(mag(Zo/(50 Ohm)))

+ 10

Page 125: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 125

dbmtow()

Converts dBm to watts.

Synopsis y = dbmtow(P) = (1mW)*10P/10

where P is the power expressed in dBm.

Examples y = dbmtow(0)

returns .001 Wy = dbmtow(-10)

returns 1.000E- 4 W

Defined in Built in

See also “dbm()” on page 123, “wtodbm()” on page 183

Page 126: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

126 IC-CAP Expressions

4 Math Functions

deg()

Converts radians to degrees.

Synopsis y = deg(x)

where x is the value in radians.

Examples y = deg(1.5708)

returns 90y = deg(pi)

returns 180

Defined in Built in

See also “rad()” on page 168

Page 127: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 127

diagonal()

Purpose Returns the diagonal of a square matrix as a matrix

Synopsis diag = diagonal(Matrix)

where

Matrix is square matrix to find the diagonal

Examples mat={{1,2,3},{4,5,6},{7,8,9}}diag=diagonal(mat)

returns {1,5,9}

For a 2- port S- parameter analysis of 10 freq points:

diagS=diagonal(S) would return S11 and S22 for each frequency point

Defined in Built In

See also “transpose()” on page 181, “inverse()” on page 144

Page 128: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

128 IC-CAP Expressions

4 Math Functions

diff()

Calculates a simple numerical difference against the inner independent variable associated with the data. Can be used to calculate group delay.

Synopsis y = diff(data)

Returns the numerical difference against the inner independent variable associated with the data.

Examples group_delay = −diff(unwrap(phaserad(S21),pi) )/ (2⋅pi)

Defined in $ICCAP_ROOT/expressions/ael/elementary_fun.ael

See also “dev_lin_phase()” on page 209, “integrate()” on page 142, “phasedeg()” on page 163, “phaserad()” on page 164, “ripple()” on page 236, “unwrap()” on page 182

Notes/Equations

This function only works on one dimensional data. It calculates the derivative of the dependent data with respect to the inner independent value.

Page 129: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 129

erf()

Calculates the error function, the area under the Gaussian curve exp(−x**2).

Synopsis y = erf(x)

where x is real.

Examples a = −erf(0.1)

returns 0.112a = −erf(0.2)

returns 0.223

Defined in Built in

See also “erfc()” on page 130

Page 130: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

130 IC-CAP Expressions

4 Math Functions

erfc()

Calculates the complementary error function, or 1 minus the error function. For large x, this can be calculated more accurately than the plain error function.

Synopsis y = erfc(x)

where x is a real number.

Examples a = −erfc(0.1)

returns 0.888a = −erfc(0.2)

returns 0.777

Defined in Built in

See also “erf()” on page 129

Page 131: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 131

erfcinv()

Returns the inverse complementary error function as a real number

Synopsis y = erfcinv(val)

where val is a real number.

Examples res= erfcinv(0.5)

returns 0.477res= erfcinv(1.9)

returns - 1.163

Defined in in- built

See also “erfc()” on page 130

Notes The argument val accepts numbers in the range [0,2]. For numbers outside the range returns NULL. If val is 0, erfcinv returns <infinity>. If val is 2, then <- infinity>.

Page 132: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

132 IC-CAP Expressions

4 Math Functions

erfinv()

Returns the inverse error function as a real number

Synopsis y = erfinv(val)

where val is a real number.

Examples res= erfinv(-0.4)

returns - 0.371res= erfinv(0.8)

returns 0.906

Defined in in- built

See also “erf()” on page 129

Notes The argument val accepts numbers in the range [- 1,1]. For numbers outside the range returns NULL. If val is +1, erfinv returns <infinity>. If val is - 1, then <- infinity>.

Page 133: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 133

exp()

The exponential function is used to calculate powers of e. Given a complex number, x, the exp(x) function calculates e to the power of x (i.e. ex).

Synopsis y = exp(x) = ex

If x=a+j*b then ex=ea+j*b=(ea)*(ej*b)=(ea)*(cos(b)+j*sin(b))

As shown above, the exp() function accepts complex arguments and returns complex values.

Examples a = exp(1)

returns 2.71828b = exp(1+j1)

returns 1.469 + j*2.287

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “float()” on page 136, “int()” on page 141, “log()” on page 147, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

Page 134: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

134 IC-CAP Expressions

4 Math Functions

fft()

Performs the discrete Fourier transform.

Synopsis y = fft(x, length)

Examples fft([1, 1, 1, 1])

returns [4+0i, 0+0i]fft([1, 0, 0, 0]

returns [1+0i, 1+0i]fft(1, 4)

returns [1+0i, 1+0i]

Defined in Built in

See also “ts()” on page 89

Notes/Equations

fft(x) is the discrete Fourier transform of x computed with the fast Fourier transform algorithm. fft() uses a high- speed radix- 2 fast Fourier transform when the length of x is a power of two. fft(x, n) performs an n- point discrete Fourier transform, truncating x if length(x) > n and padding x with zeros if length(x) < n.

fft() uses a real transform if x is real and a complex transform if x is complex. If the length of x is not a power of two, then a mixed radix algorithm based on the prime factors of the length of x is used.

Page 135: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 135

fix()

Takes a real number argument, truncates it, and returns an integer value.

Synopsis y = fix(realVal)

where realVal is a real number.

Examples a = fix(5.9)

returns 5

Defined in Built in

Page 136: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

136 IC-CAP Expressions

4 Math Functions

float()

Converts an integer to a real (floating- point) number

Synopsis y = float(x)

where x is the integer to convert.

Examples a = float(10)

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “int()” on page 141, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

NOTE To convert a real to an integer, use int().

Page 137: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 137

floor()

Returns the largest integer not more than its argument from a real number, that is, returns its argument rounded to the next highest number.

Synopsis y = floor(realVal)

where realVal is a real number to be rounded to an integer.

Examples a = floor(5.6)

returns 5

Defined in Built in

Page 138: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

138 IC-CAP Expressions

4 Math Functions

identity()

Returns the identity matrix.

Synopsis Y = identity(2)Y = identity(2, 3)

The identity matrix is defined as follows. If one argument is supplied, then a square matrix is returned with ones on the diagonal and zeros elsewhere. If two arguments are supplied, then a matrix with size rows × cols is returned, again with ones on the diagonal.

Examples a = identity(2)

Defined in Built in

See also “ones()” on page 160, “zeros()” on page 185

Page 139: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 139

im()

Returns a real value, the imaginary component of a complex number.

Synopsis y = im(x)

where x is a complex number.

Examples a = im(1–1*j)

returns - 1.000

Defined in Built in

See also “imag()” on page 140, “cmplx()” on page 109, “real()” on page 170

Page 140: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

140 IC-CAP Expressions

4 Math Functions

imag()

Returns the imaginary component of a complex number.

Synopsis y = imag(x)

where x is a complex number.

Examples a = imag(1–1*j)

returns - 1.000

Defined in Built in

See also “cmplx()” on page 109, “im()” on page 139, “real()” on page 170

Page 141: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 141

int()

Returns the largest integer not greater than a given real value.

Synopsis y = int(x)

where x is the real value.

Examples a = int(4.3)

returns 4

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

Page 142: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

142 IC-CAP Expressions

4 Math Functions

integrate()

Returns the integral of data.

Synopsis y = integrate(data{, start, stop{, incr}})

Returns the integral of data from start to stop with increment incr.

Examples x = [0::0.01::1.0]y = vs(2⋅exp(-x⋅x) / sqrt(pi), x)z= integrate(y, 0.1, 0.6, 0.001)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “diff()” on page 128

Notes/Equations

Returns the integral of data from start to stop with increment incr using the composite trapezoidal rule on uniform subintervals. The default values for start and stop are the first and last points of the data, respectively. The default value for incr is “(stop - start) / (nPts - 1)” where nPts is the number of original data points between start and stop, inclusively.

Page 143: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 143

interp()

Returns linearly interpolated data.

Synopsis y = interp(data{, start, stop{, incr}})

Returns linearly interpolated data between start and stop with increment incr.

Examples y = interp(data{, start, stop{, incr}})

Defined in Built in

Notes/Equations

Returns linearly interpolated data between start and stop with increment incr. The default values for start and stop are the first and last points of the data, respectively. The default value for incr is “(stop - start) / (nPts - 1)” where nPts is the number of original data points between start and stop, inclusively.

Page 144: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

144 IC-CAP Expressions

4 Math Functions

inverse()

Performs a matrix inverse.

Synopsis y = inverse(x)

Returns inversion of real and complex general matrices.

Examples inverse({{1, 2}, {3, 4}})

returns {{–2, 1}, {1.5, –0.5}}

Defined in Built in

Page 145: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 145

jn()

Computes the Bessel function of the first kind and returns a real number

Synopsis y = jn(n, x)

where

n is the order (integer)

x is the value for which the Bessel value is to be found (real)

Examples jn0_15 = jn(0, 15)

returns - 0.014jn1_xV = jn(1, 5.23)

returns - 0.344jn10_15 = jn(10, 15)

returns - 0.09

Defined in in- built

Page 146: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

146 IC-CAP Expressions

4 Math Functions

ln()

Returns the natural logarithm (ln) of an integer or real number.

Synopsis y = ln(x)

where x is the integer or real number.

Examples a = ln(e)

returns 1

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

Page 147: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 147

log()

Returns the base 10 logarithm of an integer or real number.

Synopsis y = log(x)

where x is the integer or real number.

Examples a = log(10)

returns 1a = log(0+0i)

returns NULL and an error message "log of zero"

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

NOTE The log10(x) function performs the same operation.

Page 148: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

148 IC-CAP Expressions

4 Math Functions

log10()

Returns the base 10 logarithm of an integer or real number.

Synopsis y = log10(x)

where x is the integer or real number.

Examples a = log10(10)

returns 1a = log10(0+0i)

returns NULL and an error message "log of zero"

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log()” on page 147, “pow()” on page 166, “sgn()” on page 173, “sqrt()” on page 177

NOTE The log(x) function performs the same operation.

Page 149: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 149

mag()

Returns the magnitude of a complex number.

Synopsis y = mag(x)

where x is a complex number.

Examples a = mag(3–4*j)

returns 5.000

Defined in Built in

See also “conj()” on page 111

Page 150: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

150 IC-CAP Expressions

4 Math Functions

max()

Returns the maximum value.

Synopsis y = max(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = max([1, 2, 3])

returns 3

Defined in Built in

See also “cum_prod()” on page 120, “cum_sum()” on page 121, “max2()” on page 152, “mean()” on page 153, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 151: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 151

max_outer()

Computes the maximum across the outer dimension of two- dimensional data.

Synopsis y = max_outer(data)

where data must be two- dimensional data.

Examples y = max_outer(data)

Defined in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

See also “fun_2d_outer()” on page 48, “mean_outer()” on page 154, “min_outer()” on page 157

Notes/Equations

The max function operates on the inner dimension of two- dimensional data. The max_outer function just calls the fun_2d_outer function, with max being the applied operation. As an example, assume that a Monte Carlo simulation of an amplifier was run, with 151 random sets of parameter values, and that for each set the S- parameters were simulated over 26 different frequency points. S21 becomes a [151 Monte Carlo iteration X 26 frequency] matrix, with the inner dimension being frequency, and the outer dimension being Monte Carlo index. Now, assume that it is desired to know the maximum value of the S- parameters at each frequency. Inserting an equation max(S21) computes the maximum value of S21 at each Monte Carlo iteration. If S21 is simulated from 1 to 26 GHz, it computes the maximum value over this frequency range, which usually is not very useful. Inserting an equation max_outer(S21) computes the maximum value of S21 at each Monte Carlo iteration.

Page 152: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

152 IC-CAP Expressions

4 Math Functions

max2()

Returns the larger value of two numeric values, or NULL if parameters are invalid.

Synopsis z = max2(x, y)

where x is any integer or real number and y is any integer or real number.

Examples a = max2(1.5, -1.5)

returns 1.500

Defined in Built in

See also “cum_prod()” on page 120, “cum_sum()” on page 121, “max()” on page 150, “mean()” on page 153, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 153: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 153

mean()

Returns the mean.

Synopsis y = mean(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = mean([1, 2, 3])

returns 2

Defined in Built in

See also “cum_prod()” on page 120, “cum_sum()” on page 121, “max()” on page 150, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 154: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

154 IC-CAP Expressions

4 Math Functions

mean_outer()

Computes the mean across the outer dimension of two- dimensional data.

Synopsis y = mean_outer(data)

where data must be two- dimensional data.

Examples a = mean_outer(data)

Defined in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

See also “fun_2d_outer()” on page 48, “max_outer()” on page 151, “min_outer()” on page 157

Notes/Equations

The mean function operates on the inner dimension of two- dimensional data. The mean_outer function just calls the fun_2d_outer function, with mean being the applied operation. As an example, assume that a Monte Carlo simulation of an amplifier was run, with 151 random sets of parameter values, and that for each set the S- parameters were simulated over 26 different frequency points. S21 becomes a [151 Monte Carlo iteration X 26 frequency] matrix, with the inner dimension being frequency, and the outer dimension being Monte Carlo index. Now, assume that it is desired to know the mean value of the S- parameters at each frequency. Inserting an equation mean(S21) computes the mean value of S21 at each Monte Carlo iteration. If S21 is simulated from 1 to 26 GHz, it computes the mean value over this frequency range, which usually is not very useful. Inserting an equation mean_outer(S21) computes the mean value of S21 at each Monte Carlo frequency.

Page 155: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 155

median()

Returns the median. This function can only be used by entering an equation (Eqn) in the Data Display window.

Synopsis y = median(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = median([1, 2, 3, 4])

returns 2.5

Defined in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

See also “mean()” on page 153, “sort()” on page 59

Page 156: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

156 IC-CAP Expressions

4 Math Functions

min()

Returns the minimum value of a swept parameter.

Synopsis y = min(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = min([1, 2, 3])

returns 1

Defined in Built in

See also “cum_prod()” on page 120, “cum_sum()” on page 121, “max()” on page 150, “mean()” on page 153, “prod()” on page 167, “sum()” on page 178

Page 157: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 157

min_outer()

Computes the minimum across the outer dimension of two- dimensional data.

Synopsis y = min_outer(data)

where data must be two- dimensional data.

Examples a = min_outer(data)

Defined in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

See also “fun_2d_outer()” on page 48, “max_outer()” on page 151, “mean_outer()” on page 154

Notes/Equations

The min function operates on the inner dimension of two- dimensional data. The min_outer function just calls the fun_2d_outer function, with min being the applied operation. As an example, assume that a Monte Carlo simulation of an amplifier was run, with 151 random sets of parameter values, and that for each set the S- parameters were simulated over 26 different frequency points. S21 becomes a [151 Monte Carlo iteration X 26 frequency] matrix, with the inner dimension being frequency, and the outer dimension being Monte Carlo index. Now, assume that it is desired to know the minimum value of the S- parameters at each frequency. Inserting an equation min(S21) computes the minimum value of S21 at each Monte Carlo iteration. If S21 is simulated from 1 to 26 GHz, it computes the minimum value over this frequency range, which usually is not very useful. Inserting an equation min_outer(S21) computes the minimum value of S21 at each Monte Carlo iteration.

Page 158: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

158 IC-CAP Expressions

4 Math Functions

min2()

Returns the lesser value of two numeric values, or NULL if parameters are invalid.

Synopsis z = min2(x, y)

where x is any integer or real number and y is any integer or real number.

Examples a = min2(1.5, -1.5)

returns - 1.500

Defined in Built in

See also “cum_prod()” on page 120, “cum_sum()” on page 121, “max()” on page 150, “max2()” on page 152, “mean()” on page 153, “min()” on page 156, “prod()” on page 167, “sum()” on page 178

Page 159: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 159

num()

Returns an integer that represents an ASCII numeric value of the first character in the specified string.

Synopsis y = num(str)

where str is a string.

Examples a = num("/users/myhome/fullpath")

returns 47

a = num("alpha")

returns 97

Defined in Built in

Page 160: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

160 IC-CAP Expressions

4 Math Functions

ones()

Returns a matrix of ones.

Synopsis y = ones(2)

This is the ones matrix. If only one argument is supplied, then a square matrix is returned. If two are supplied, then a matrix of ones with size rows × cols is returned.

Examples a = ones(2)

returns {{1, 1}, {1, 1}}

Defined in Built in

See also “identity()” on page 138, “zeros()” on page 185

Page 161: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 161

phase()

Phase in degrees.

Synopsis y = phase(x)

Examples a = phase(1*i)

returns 90a = phase(1+1i)

returns 45

Defined in Built- in

See also “phaserad()” on page 164

Page 162: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

162 IC-CAP Expressions

4 Math Functions

phase_comp()

Returns the phase compression (phase change).

Synopsis y = phase_comp(Sji)

where Sji is a power- dependent parameter obtained from large- signal S- parameters simulation.

Examples a = phase_comp(S21[::, 0])

Defined in $ICCAP_ROOT/expressions/ael/rf_systems_fun.ael

See also “gain_comp()” on page 212

Notes/Equations

Used in Large- signal S- parameter simulations

This measurement calculates the small- signal minus the large- signal phase, in degrees. The first power point (assumed to be small) is used to calculate the small- signal phase.

Page 163: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 163

phasedeg()

Phase in degrees.

Synopsis y = phasedeg(x)

Examples a = phasedeg(1*i)

returns 90a = phasedeg(1+1i)

returns 45

Defined in Built- in

See also “dev_lin_phase()” on page 209, “diff()” on page 128, “phase()” on page 161, “phaserad()” on page 164, “ripple()” on page 236, “unwrap()” on page 182

Page 164: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

164 IC-CAP Expressions

4 Math Functions

phaserad()

Phase in Radians.

Synopsis y = phaserad(x)

Examples a = phaserad(1*i)

returns 1.5708a = phaserad(1+1i)

returns 0.785398

Defined in Built in

See also “dev_lin_phase()” on page 209, “diff()” on page 128, “phase()” on page 161, “phasedeg()” on page 163, “ripple()” on page 236, “unwrap()” on page 182

Page 165: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 165

polar()

Builds a complex number from magnitude and angle (in degrees).

Synopsis y = polar(mag, angle)

Examples a = polar(1, 90)

returns 0+1ia = polar(1, 45)

returns 0.707107+0.707107i

Defined in Built in

Page 166: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

166 IC-CAP Expressions

4 Math Functions

pow()

Raises an integer or real number to a given power.

Synopsis z = pow(x, y)

where x is the integer or real number and y is the exponent of that number. x and y can be complex numbers.

Examples a = pow(4, 2)

returns 16

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log10()” on page 148, “sgn()” on page 173, “sqrt()” on page 177

Page 167: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 167

prod()

Returns the product.

Synopsis y = prod(x)

where x can be an integer, real, or complex number.

Examples a = prod([1, 2, 3]

returns 6a = prod([4, 4, 4])

returns 64

Defined in Built- in

See also “sum()” on page 178

Page 168: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

168 IC-CAP Expressions

4 Math Functions

rad()

Degrees to radians.

Synopsis y = rad(x)

Examples a = rad(90)

returns 1.5708a = rad(45)

returns 0.785398

Defined in Built in

See also “deg()” on page 126

Page 169: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 169

re()

Returns a real number, the real part of a complex value.

Synopsis y = re(x)

where x is a complex number.

Examples a = re(1–1*j)

returns 1.000

Defined in Built in

See also “cmplx()” on page 109, “imag()” on page 140, “real()” on page 170

NOTE The real() function performs the same operation.

Page 170: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

170 IC-CAP Expressions

4 Math Functions

real()

Returns the real part of a complex number.

Synopsis y = real(x)

where x is a complex number.

Examples a = real(1–1*j)

returns 1.000

Defined in Built in

See also “cmplx()” on page 109, “imag()” on page 140, “re()” on page 169

NOTE The re() function performs the same operation.

Page 171: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 171

rms()

Returns the root mean square value.

Synopsis y = rms(val)

where val is an integer, real, or complex number.

Examples rmsR = rms(2)

returns 1.414rmsR = rms(complex(3, 10))

returns 7.382/73.301rmsR = rms( [1, 2, 3, 4, 5,] )

returns [0.707, 1.414, 2.121, 2.828, 3.536]

Defined in $HPEESOF_DIR/expressions/ael/elementary_fun.ael

Page 172: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

172 IC-CAP Expressions

4 Math Functions

round()

Rounds to the nearest integer.

Synopsis y = round(x)

Examples a = round(0.1)

returns 0a = round(0.5)

returns 1a = round(0.9)

returns 1a = round(–0.1)

returns 0a = round(–0.5)

returns –1a = round(–0.9)

returns –1

Defined in Built in

See also “int()” on page 141

Page 173: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 173

sgn()

Returns the integer sign of an integer or real number, as either 1 or –1.

Synopsis y = sgn(x)

where x is an integer or real number.

Examples a = sgn(–1)

returns –1a=sgn(1)

returns 1

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log10()” on page 148, “pow()” on page 166, “sqrt()” on page 177

Page 174: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

174 IC-CAP Expressions

4 Math Functions

sin()

Returns the sine of an integer or real number.

Synopsis y = sin(x)

where x is an integer or real number, in radians.

Examples a = sin(pi/2)

returns 1

Defined in Built in

See also “cos()” on page 116, “tan()” on page 179

Page 175: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 175

sinc()

Returns the sinc of an integer or real number. The sinc function is defined as sinc(x) = sin(pi*x)/ (pi*x) and sinc(0)=1.

Synopsis y = sinc(x)

where x is an integer or real number, in radians.

Examples a = sinc(0.5)

returns 0.959

Defined in Built in

See also “sin()” on page 174

Page 176: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

176 IC-CAP Expressions

4 Math Functions

sinh()

Returns the hyperbolic sin of an integer or real number.

Synopsis y = sinh(x)

where x is an integer or real number, in radians.

Examples a = sinh(0)

returns 0a = sinh(1)

returns 1.1752

Defined in Built in

See also “cosh()” on page 117, “tanh()” on page 180

Page 177: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 177

sqrt()

Returns the square root of a positive integer or real number.

Synopsis y = sqrt(x)

where x is a positive integer or real number.

Examples a = sqrt(4)

returns 2

Defined in Built in

See also “abs()” on page 97, “cint()” on page 108, “exp()” on page 133, “float()” on page 136, “int()” on page 141, “log10()” on page 148, “pow()” on page 166, “sgn()” on page 173

Page 178: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

178 IC-CAP Expressions

4 Math Functions

sum()

Returns the sum.

Synopsis y = sum(x)

The function takes a single argument, so enclose a sequence of numbers in brackets “[a, b, c, ...]”

Examples a = sum([1, 2, 3])

returns 6

Defined in Built in

See also “max()” on page 150, “mean()” on page 153, “min()” on page 156

Page 179: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 179

tan()

Returns the tangent of an integer or real number.

Synopsis y = tan(x)

where x is an integer or real number, in radians.

Examples a = tan(pi/4)

returns 1a = tan(+/-pi/2)

returns +/- 1.633E16

Defined in Built in

See also “cos()” on page 116, “sin()” on page 174

Page 180: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

180 IC-CAP Expressions

4 Math Functions

tanh()

Returns the hyperbolic tangent of an integer or real number.

Synopsis y = tanh(x)

where x is an integer or real number, in radians.

Examples a = tanh(0)

returns 0a = tanh(1)

returns 0.761594a = tanh(–1)

returns –0.761594

Defined in Built in

See also “cosh()” on page 117, “sinh()” on page 176

Page 181: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 181

transpose()

Transposes a matrix.

Synopsis Y = transpose(y)

This function transposes a matrix, but does not perform a conjugate transpose for complex matrices.

Examples a={{1, 2}, {3, 4}}b=transpose(a)

returns {{1, 3}, {2, 4}}

Defined in Built in

Page 182: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

182 IC-CAP Expressions

4 Math Functions

unwrap()

This measurement unwraps a phase by changing an absolute jump greater than jump to its 2*jump complement.

Synopsis y = unwrap(phase{, jump})

where

phase is a swept real variable.

jump is the absolute jump. By default, jump is set to 180.

Examples a = unwrap(phase(S21))a = unwrap(phaserad(S21), pi)

Defined in Built- in

See also “dev_lin_phase()” on page 209, “diff()” on page 128, “phase()” on page 161, “phasedeg()” on page 163, “phaserad()” on page 164, “ripple()” on page 236

NOTE The unit used is in degrees.

Page 183: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 183

wtodbm()

Converts Watts to dBm and returns a real or complex number.

Synopsis dbmVal = wtodbm(Value)

where

Value is an integer, real or complex number.

Examples wtodbm01_M=wtodbm(0.01)

returns 10wtodbm1_M=wtodbm(1)

returns 30wtodbmC_M=wtodbm(complex(10,2))

returns 40.094/1.225

Defined in $HPEESOF_DIR/expressions/ael/elementary_fun.ael

See also “dbmtow()” on page 125

Page 184: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

184 IC-CAP Expressions

4 Math Functions

xor()

Returns an integer that represents the exclusive OR between arguments.

Synopsis z = xor(x, y)

where x is any integer and y is any integer.

Examples a = xor(16, 32)

returns 48

Defined in Built in

Page 185: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Math Functions 4

IC-CAP Expressions 185

zeros()

Returns a matrix of zeros.

Synopsis Y = zeros(2)Y = zeros(2, 3)

This is the zeros matrix. If only one argument is supplied, then a square matrix is returned. If two are supplied, then a matrix of zeros with size rows x cols is returned.

Examples a=zeros(2)

returns {{0, 0}, {0, 0}}b=(2, 3)

returns {{0, 0, 0}, {0, 0, 0}}

Defined in Built in

See also “identity()” on page 138, “ones()” on page 160

Page 186: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

186 IC-CAP Expressions

4 Math Functions

Page 187: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

187

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

5Signal Processing Functions

add_rf() 188

ber_pi4dqpsk() 189

ber_qpsk() 191

eye() 193

eye_amplitude() 194

eye_closure() 195

eye_fall_time() 196

eye_height() 197

eye_rise_time() 198

spec_power() 199

This chapter describes the signal processing functions in detail. The functions are listed in alphabetical order.

Page 188: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

188 IC-CAP Expressions

5 Signal Processing Functions

add_rf()

Returns the sum of two Timed Complex Envelope signals defined by the triplet in- phase (real or I(t)) and quadrature- phase (imaginary or Q(t)) part of a modulated carrier frequency(Fc).

Synopsis y = add_rf(T1, T2)

where T1 and T2 are two Timed Complex Envelope signals at two distinct carrier frequencies Fc1 and Fc2.

Examples y= add_rf(T1, T2)

Defined in $ICCAP_ROOT/expressions/ael/signal_proc_fun.ael

Notes/Equations

Used in Signal processing designs that output Timed Signals using Timed Sinks

This equation determines the sum of two Timed Complex Envelope at a new carrier frequency Fc3. Given Fc1 and Fc2 as the carrier frequencies of the two input waveforms, the output carrier frequency Fc3 will be the greater of the two.

Page 189: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 189

ber_pi4dqpsk()

Returns the symbol probability of error versus signal- to- noise ratio per bit for pi/4 DQPSK modulation.

Synopsis data = ber_pi4dqpsk(vIn, vOut, symRate, noise{, samplingDelay, rotation, tranDelay, pathDelay})

where

vIn and vOut are the complex envelope voltage signals at the input and output nodes, respectively.

symRate is the symbol rate (real) of the modulation signal.

noise is the RMS noise vector.

The remaining arguments are optional and will be calculated if not specified by the user:

samplingDelay is the clock phase in seconds.

rotation is the carrier phase in radians.

tranDelay is an optional time in seconds that causes this time duration of symbols to be eliminated from the bit error rate calculation. Usually the filters in the simulation have transient responses, and the bit error rate calculation should not start until these transient responses have finished.

Note that ber_pi4dqpsk returns a list of data:

data[0]= symbol probability of error versus Eb / N0

data[1]= path delay in seconds

data[2]= carrier phase in radians

data[3]= clock phase in seconds

data[4]= complex(Isample, Qsample)

pathDelay is the delay from input to output in seconds.

Examples y = ber_pi4dqpsk(videal[1], vout[1], 0.5e6, {0.1::-0.01::0.02})

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

Page 190: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

190 IC-CAP Expressions

5 Signal Processing Functions

See also “ber_qpsk()” on page 191, “constellation()” on page 299

Notes/Equations

Used in Data Flow simulation

The argument noise usually comes from a harmonic balance simulation, and is assumed to be additive white Gaussian. It can take a scalar or vector value. The function uses the quasi- analytic approach for estimating BER: for each symbol, Eb / N0 and BER are calculated analytically; then the overall BER is the average of the BER values for the symbols.

Page 191: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 191

ber_qpsk()

Returns the symbol probability of error versus signal- to- noise ratio per bit for QPSK modulation.

Synopsis data = ber_qpsk(vIn, vOut, symRate, noise{, samplingDelay, rotation, tranDelay, pathDelay})

where

vIn and vOut are the complex envelope voltage signals at the input and output nodes, respectively.

symRate is the symbol rate (real) of the modulation signal, and noise is the RMS noise vector.

The remaining arguments are optional and will be calculated if not specified by the user:

samplingDelay is the clock phase in seconds.

rotation is the carrier phase in radians.

tranDelay is an optional time in seconds that causes this time duration of symbols to be eliminated from the bit error rate calculation. Usually the filters in the simulation have transient responses, and the bit error rate calculation should not start until these transient responses have finished.

Note that ber_qpsk returns a list of data:

data[0]= symbol probability of error versus Eb / N0

data[1]= path delay in seconds

data[2]= carrier phase in radians

data[3]= clock phase in seconds

data[4]= complex(Isample, Qsample)

pathDelay is the delay from input to output in seconds.

Examples y = ber_qpsk(videal[1], vout[1], 1e6, {0.15::-0.01::0.04})

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

See also “ber_pi4dqpsk()” on page 189, “constellation()” on page 299

Page 192: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

192 IC-CAP Expressions

5 Signal Processing Functions

Notes/Equations

Used in Data Flow simulation

The argument noise usually comes from a harmonic balance simulation, and is assumed to be additive white Gaussian. It can take a scalar or vector value. The function uses the quasi- analytic approach for estimating BER: for each symbol, Eb / N0 and BER are calculated analytically; then the overall BER is the average of the BER values for the symbols.

Page 193: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 193

eye()

Creates data for an eye diagram plot.

Synopsis y = eye(data, symbolRate{, Cycles{, Delay}})

where

data is either numeric data or a time domain waveform typically from the I or Q data channel.

symbolRate is the symbol rate of the channel. For numeric data, the symbol rate is the reciprocal of the number of points in one cycle; for a waveform, it is the frequency.

Cycles is optional and is the number of cycles to repeat, default is 1.

Delay is an optional sampling delay, default is 0.

Examples y = eye(I_data, symbol_rate)

Defined in Built in

See also “constellation()” on page 299

Page 194: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

194 IC-CAP Expressions

5 Signal Processing Functions

eye_amplitude()

Returns eye amplitude

Synopsis eye_amplitude(Vout_time, Delay, BitRate, SamplePoint, WindowPct)

where

Vout_time is the time domain voltage waveform

Delay is used to remove initial transient in the eye diagram and is expressed in time units.

BitRate is the bit rate of the channel and is expressed in frequency units.

SamplePoint is a marker name placed on the eye diagram measurement. The independent value of this marker is used to determine the symbol offset.

WindowPct is used to determine level '1' and level '0' of the time domain waveform and its typical value is 0.2.

Examples Eye_amp = eye_amplitude(vout,12 ps,10 GHz, m1, 0.2)

See also “eye_closure()” on page 195, “eye_fall_time()” on page 196, “eye_height()” on page 197, “eye_rise_time()” on page 198

Notes/Equations

The eye_amplitude() function essentially takes the vertical histogram of the eye voltages and subtracts the “0” level mean from “1” level mean within a given measurement window.

Page 195: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 195

eye_closure()

Returns eye closure

Synopsis eye_closure(Vout_time, Delay, BitRate, SamplePoint, WindowPct)

where

Vout_time is the time domain voltage waveform,

Delay is used to remove initial transient in the eye diagram and is expressed in time units.

BitRate is the bit rate of the channel and is expressed in frequency units.

SamplePoint is a marker name placed on the eye diagram measurement. The independent value of this marker is used to determine the symbol offset.

WindowPct is used to determine level “1” and level “0” of the time domain waveform and its typical value is 0.2.

Examples Eye_Close = eye_closure(vout,12 ps,10 GHz, m1, 0.2)

Defined in Built in

See also “eye_amplitude()” on page 194, “eye_fall_time()” on page 196, “eye_height()” on page 197, “eye_rise_time()” on page 198

Notes/Equations

Computes the ratio of eye height to eye amplitude to provide eye closure.

Page 196: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

196 IC-CAP Expressions

5 Signal Processing Functions

eye_fall_time()

Returns eye fall time

Synopsis eye_fall_time(Vout_time,Delay,BitRate,SamplePoint,WindowPct)

where

Vout_time is the time domain voltage waveform.

Delay is used to remove initial transient in the eye diagram and is expressed in time units.

BitRate is the bit rate of the channel and is expressed in frequency units.

SamplePoint is a marker name placed on the eye diagram measurement. The independent value of this marker is used to determine the symbol offset.

WindowPct is used to determine level '1' and level '0' of the time domain waveform and its typical value is 0.2.

Examples Eye_Fall = eye_fall_time(vout,12 ps,10 GHz, m1, 0.2)

Defined in Built in

See also “eye_amplitude()” on page 194, “eye_closure()” on page 195, “eye_height()” on page 197, “eye_rise_time()” on page 198

Notes/Equations

Computes 20% – 80% fall time of a time domain waveform.

Page 197: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 197

eye_height()

Returns eye height

Synopsis eye_height(Vout_time, Delay, BitRate, SamplePoint, WindowPct)

where

Vout_time is the time domain voltage waveform,

Delay is used to remove initial transient in the eye diagram and is expressed in time units.

BitRate is the bit rate of the channel and is expressed in frequency units.

SamplePoint is a marker name placed on the eye diagram measurement. The independent value of this marker is used to determine the symbol offset.

WindowPct is used to determine level '1' and level '0' of the time domain waveform and its typical value is 0.2.

Examples Eye_Ht = eye_height(vout,12 ps,10 GHz, m1, 0.2)

Defined in Built in

See also “eye_amplitude()” on page 194, “eye_closure()” on page 195, “eye_fall_time()” on page 196, “eye_rise_time()” on page 198

Notes/Equations

The eye_height() function essentially takes the vertical histogram of the eye voltages and computes inner bounds of the eye opening.

Page 198: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

198 IC-CAP Expressions

5 Signal Processing Functions

eye_rise_time()

Returns eye rise time

Synopsis eye_rise_time(Vout_time,Delay,BitRate,SamplePoint,WindowPct)

where

Vout_time is the time domain voltage waveform

Delay is used to remove initial transient in the eye diagram and is expressed in time units.

BitRate is the bit rate of the channel and is expressed in frequency units.

SamplePoint is a marker name placed on the eye diagram measurement. The independent value of this marker is used to determine the symbol offset.

WindowPct is used to determine level “1” and level “0” of the time domain waveform and its typical value is 0.2.

Examples Eye_Rise = eye_rise_time(vout,12 ps,10 GHz, m1, 0.2)

Defined in Built in

See also “eye_amplitude()” on page 194, “eye_closure()” on page 195, “eye_fall_time()” on page 196, “eye_height()” on page 197

Notes/Equations

Computes 20% – 80% rise time of a time domain waveform.

Page 199: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Signal Processing Functions 5

IC-CAP Expressions 199

spec_power()

Returns the integrated signal power (dBm) of a spectrum.

Synopsis y = spec_power(sinkInstanceName{, lowerFrequencyLimit, upperFrequencyLimit})

where

sinkInstanceName is the instance of the FFTAnalyzer or SpecAnalyzer sink in the DSP schematic window (values in dBm).

lowerFrequencyLimit and upperFrequencyLimit are optional and define the lower and upper frequency limits to be used in calculating the integrated power. The frequency unit used must match that used in SpecAnalyzer. The default unit is MHz. The entire spectral frequency range will be used if lowerFrequencyLimit and upperFrequencyLimit are not specified.

Examples total_power = spec_power(Mod_Spectrum, 60, 71)

returns the integrated power between 60 and 71 MHztotal_power = spec_power(Mod_Spectrum, indep(m1), indep(m2))

returns the integrated power between markers 1 and 2

where Mod_Spectrum is the instance ID of an FFTAnalyzer or SpecAnalyzer sink

Defined in $ICCAP_ROOT/expressions/ael/signal_proc_fun.ael

Notes/Equations

Used in Agilent Ptolemy simulations

This function will return the total integrated power (dBm) of a spectrum. The frequency window over which the integrated power will be calculated can be specified, otherwise the entire spectral frequency range will be used.

The FFTAnalyzer and SpecAnalyzer sinks are valid for this measurement. These sinks should have a termination resistor shunted to ground at their input for a measurement referenced to an impedance such as 50 Ohms. This termination resistor

Page 200: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

200 IC-CAP Expressions

5 Signal Processing Functions

value should be set to the Ref_Resistance value specified in the FFTAnalyzer or SpecAnalyzer sink. The display parameter of the sinks must be set to dBm.

Page 201: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

201

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

6S-parameter Analysis Functions

A,B,C,D,Gabcdtoh() 203

abcdtos() 204

abcdtoy() 205

abcdtoz() 206

bandwidth_func() 207

center_freq() 208

dev_lin_phase() 209

ga_circle() 210

gain_comp() 212

gl_circle() 213

gp_circle() 215

gs_circle() 217

H,L,Mhtoabcd() 219

htos() 220

htoy() 221

htoz() 222

l_stab_circle() 223

l_stab_circle_center_radius() 224

l_stab_region() 225

map1_circle() 226

map2_circle() 227

max_gain() 228

mu() 229

mu_prime() 230

N,P,Rns_circle() 231

ns_pwr_int() 233

ns_pwr_ref_bw() 234

pwr_gain() 235

ripple() 236

Page 202: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

202 IC-CAP Expressions

6 S-parameter Analysis Functions

This chapter describes the S- parameter analysis functions in detail. The functions are listed in alphabetical order.

Ss_stab_circle() 237

s_stab_circle_center_radius() 238

s_stab_region() 239

sm_gamma1() 240

sm_gamma2() 241

sm_y1() 242

sm_y2() 243

sm_z1() 244

sm_z2() 245

stab_fact() 246

stab_meas() 247

stoabcd() 248

stoh() 249

stos() 250

stot() 251

stoy() 252

stoz() 253

T,U,V,W,Ytdr_sp_gamma() 254

tdr_sp_imped() 255

tdr_step_imped() 256

ttos() 257

unilateral_figure() 258

volt_gain() 259

volt_gain_max() 261

vswr() 262

write_snp() 263

yin() 265

yopt() 266

ytoabcd() 267

ytoh() 268

ytos() 269

ytoz() 270

Zzin() 271

zopt() 272

ztoabcd() 273

ztoh() 274

ztos() 275

ztoy() 276

Page 203: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 203

abcdtoh()

This measurement transforms the chain (ABCD) matrix of a 2- port network to a hybrid matrix.

Synopsis y = abcdtoh(A)

where A is the chain (ABCD) matrix of a 2- port network.

Examples h=abcdtoh(a)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtos()” on page 204, “abcdtoy()” on page 205, “abcdtoz()” on page 206, “htoabcd()” on page 219, “stoabcd()” on page 248, “ytoabcd()” on page 267, “ztoabcd()” on page 273

Page 204: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

204 IC-CAP Expressions

6 S-parameter Analysis Functions

abcdtos()

This measurement transforms the chain (ABCD) matrix of a 2- port network to a scattering matrix.

Synopsis y = abcdtos(A, zRef)

where A is the chain (ABCD) matrix of a 2- port network and zRef is a reference impedance.

Examples s = abcdtos(a, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “abcdtoy()” on page 205, “abcdtoz()” on page 206, “htoabcd()” on page 219, “stoabcd()” on page 248, “ytoabcd()” on page 267, “ztoabcd()” on page 273

Page 205: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 205

abcdtoy()

This measurement transforms the chain (ABCD) matrix of a 2- port network to an admittance matrix.

Synopsis y = abcdtoy(A)

where A is the chain (ABCD) matrix of a 2- port network.

Examples y = abcdtoy(a)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “abcdtos()” on page 204, “abcdtoz()” on page 206, “htoabcd()” on page 219, “stoabcd()” on page 248, “ytoabcd()” on page 267, “ztoabcd()” on page 273

Page 206: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

206 IC-CAP Expressions

6 S-parameter Analysis Functions

abcdtoz()

This measurement transforms the chain (ABCD) matrix of a 2- port network to impedance matrix.

Synopsis y = abcdtoz(A)

where A is the chain (ABCD) matrix of a 2- port network.

Examples z = abcdtoz(a)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “abcdtos()” on page 204, “abcdtoy()” on page 205, “htoabcd()” on page 219, “stoabcd()” on page 248, “ytoabcd()” on page 267, “ztoabcd()” on page 273

Page 207: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 207

bandwidth_func()

Returns the bandwidth at the specified level as a real number. Typically used in filter application to calculate the 1, 3 dB, etc. bandwidth.

Synopsis bw = bandwidth(Data, DesiredValue {, Bandstop})

where

Data is (usually gain) to find the bandwidth.

DesiredValue is a single value representing the desired bandwidth level.

Bandstop is an optional argument set to 1 to calculate the bandstop response rather than the bandpass.

Examples This example assumes that an S- parameter analysis has been performed.bw3dB = bandwidth_func(db(S21), 3)

returns the 3dB bandwidth

Defined in $HPEESOF_DIR/expressions/ael/rf_system_fun.ael

See also “center_freq()” on page 208

Notes/Equations

This function returns the bandwidth of a filter response. Linear interpolation is done between data points. Uses an iterative process to find the bandwidth on non- ideal responses. The data can be from 1 to 4 dimensions.

Page 208: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

208 IC-CAP Expressions

6 S-parameter Analysis Functions

center_freq()

Returns the center frequency at the specified level as a real number. Typically used in filter application to calculate the center frequency at 1, 3 dB, etc. bandwidth.

Synopsis fc = center_freq(Data, DesiredBW)

where

Data is (usually gain) to find the center frequency.

DesiredBW is a single value representing the reference bandwidth.

Examples This example assumes that an S- parameter analysis has been performed.fc3 = center_freq(db(S21), 3)

returns the center frequency using the 3dB point as reference.

Defined in $HPEESOF_DIR/expressions/ael/rf_system_fun.ael

See also “bandwidth_func()” on page 207

Notes/Equations

This function returns the center frequency of a filter response. Linear interpolation is done between data points. Uses an iterative process to find the bandwidth on non- ideal responses. The data can be from 1 to 4 dimensions.

Page 209: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 209

dev_lin_phase()

Given a variable sweep over a frequency range, a linear least- squares fit is performed on the phase of the variable, and the deviation from this linear fit is calculated at each frequency point.

Synopsis y = dev_lin_phase(voltGain)

where voltGain is a function of frequency.

Examples a = dev_lin_phase(S21)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “diff()” on page 128, “phasedeg()” on page 163, “phaserad()” on page 164, “pwr_gain()” on page 235, “ripple()” on page 236, “unwrap()” on page 182, “volt_gain()” on page 259

Page 210: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

210 IC-CAP Expressions

6 S-parameter Analysis Functions

ga_circle()

Generates an available- gain circle.

Synopsis y = ga_circle(S{, gain, numOfPts, numCircles, gainStep})

where

S is the scattering matrix of a 2- port network.

gain is the specified gain in dB. The default value for gain is min(max_gain(S)) - {0, 1, 2, 3}.

numOfPts is the desired number of points per circle. The default value for numOfPts is 51.

numCircles is the number of desired circles. This is used if gain is not specified.

gainStep is the gain step size. This is used if gain is not specified. Default = 1.0.

Examples circleData = ga_circle(S, 2, 51)circleData = ga_circle(S, {2, 3, 4}, 51)

returns the points on the circle(s).circleData = ga_circle(S, , 51, 5, 0.5)

returns the points on the circle(s) for 5 circles at maxGain - {0,0.5,1.0,1.5,2.0}

circleData = ga_circle(S, , , 2, 1.0)

returns the points on the circle(s) for 2 circles at maxGain - {0,1.0}

Used in Small- signal S- parameter simulations

Available asmeasurement

component?

GaCircle

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “gl_circle()” on page 213, “gp_circle()” on page 215, “gs_circle()” on page 217

Page 211: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 211

Description This function generates the constant available- gain circle resulting from a source mismatch. The circle is defined by the loci of the source- reflection coefficients resulting in the specified gain.

A gain circle is created for each value of the swept variable(s). Multiple gain values can be specified for a scattering parameter that has dimension less than four. This measurement is supported for 2- port networks only.

If gain is not specified, and if numCircles is not specified as well gain circles are drawn at min(max_gain(S)) - {0,1,2,3}. That is gain is calculated at a loss of 0,1,2,3 dB from maxGain. If gain is not specified, and if numCircles is given then numCircles gain circles are drawn at gainStep below max_gain(). Gain is also limited by max_gain(S) (i.e., is gain > max_gain(S), then the circle is generated at max_gain(S)).

Page 212: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

212 IC-CAP Expressions

6 S-parameter Analysis Functions

gain_comp()

Returns gain compression.

Synopsis y = gain_comp(Sji)

where Sji is a power- dependent complex transmission coefficient obtained from large- signal S- parameter simulation.

Examples gc = gain_comp(S21[::, 0])

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “phase_comp()” on page 162

Notes/Equations

Used in Large- signal S- parameter simulations

This measurement calculates the small- signal minus the large- signal power gain, in dB. The first power point (assumed to be small) is used to calculate the small- signal power gain.

Page 213: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 213

gl_circle()

Generates a load- mismatch gain circle.

Synopsis y =gl_circle(S{, gain, numOfPts, numCircles, gainStep})

where

S is the scattering matrix of a 2- port network

gain is the specified gain in dB. The default value for gain is maxGain – {0, 1, 2, 3}.

Where maxGain = 10*log(1 / (1 - mag(S22)**2))

numOfPts is the desired number of points per circle. The default value for numOfPts is 51.

numCircles is the number of desired circles. This is used if gain is not specified.

gainStep is the gain step size. This is used if gain is not specified. Default = 1.0.

Examples circleData = gl_circle(S, 2, 51)circleData = gl_circle(S, {2, 3, 4}, 51)

returns the points on the circle(s).circleData = gl_circle(S, , 51, 5, 0.5)

returns the points on the circle(s) for 5 circles at maxGain - {0,0.5,1.0,1.5,2.0}

circleData = gl_circle(S, , , 2, 1.0)

returns the points on the circle(s) for 2 circles at maxGain - {0,1.0}

Used in Small- signal S- parameter simulations

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “ga_circle()” on page 210, “gp_circle()” on page 215, “gs_circle()” on page 217

Description This expression generates the unilateral gain circle resulting from a load mismatch. The circle is defined by the loci of the load- reflection coefficients that result in the specified gain.

Page 214: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

214 IC-CAP Expressions

6 S-parameter Analysis Functions

A gain circle is created for each value of the swept variable(s). Multiple gain values can be specified for a scattering parameter that has dimension less than four. This measurement is supported for 2- port networks only.

If gain is not specified, and if numCircles is not specified as well gain circles are drawn at maxGain – {0,1,2,3}. That is gain is calculated at a loss of 0,1,2,3 dB from the maximum gain. If gain is not specified, and if numCircles is given then numCircles gain circles are drawn at gainStep below maxGain. Gain is also limited by maxGain (i.e., if gain > maxGain, then the circle is generated at maxGain).

Page 215: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 215

gp_circle()

Generates a power gain circle.

Synopsis y = gp_circle(S{, gain, numOfPts, numCircles, gainStep})

where

S is the scattering matrix of a 2- port network.

gain is the specified gain in dB. The default value for gain is min(max_gain(S)) − {1, 2, 3}.

numOfPts is the desired number of points per circle. The default value for numOfPts is 51.

numCircles is the number of desired circles. This is used if gain is not specified.

gainStep is the gain step size. This is used if gain is not specified. Default = 1.0.

Examples circleData = gp_circle(S, 2, 51)circleData = gp_circle(S, {2, 3, 4}, 51)

returns the points on the circle(s).circleData = gp_circle(S, , 51, 5, 0.5)

returns the points on the circle(s) for 5 circles at maxGain – {0,0.5,1.0,1.5,2.0}

circleData = gp_circle(S, , , 2, 1.0)

returns the points on the circle(s) for 2 circles at maxGain – {0,1.0}

Used in Small- signal S- parameter simulations

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “ga_circle()” on page 210, “gl_circle()” on page 213, “gs_circle()” on page 217

Description This expression generates a constant- power- gain circle resulting from a load mismatch. The circle is defined by the loci of the output- reflection coefficients that result in the specified gain.

Page 216: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

216 IC-CAP Expressions

6 S-parameter Analysis Functions

A gain circle is created for each value of the swept variable(s). Multiple gain values can be specified for a scattering parameter that has dimension less than four. This measurement is supported for 2- port networks only.

If gain is not specified, and if numCircles is not specified as well gain circles are drawn at min(max_gain(S)) – {0,1,2,3}. That is gains are calculated at a loss of 0,1,2,3 dB from the maximum gain. If gain is not specified, and if numCircles is given then numCircles gain circles are drawn at gainStep below max_gain(). Gain is also limited by max_gain(S) (i.e., if gain > max_gain(S), then the circle is generated at max_gain(S)).

Page 217: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 217

gs_circle()

Returns a source- mismatch gain circle.

Synopsis y = gs_circle(S{, gain, numOfPts, numCircles, gainStep})

where

S is the scattering matrix of a 2- port network.

gain is the specified gain in dB. The default value for gain is maxGain – {0, 1, 2, 3}.

Where maxGain = 10*log(1 / (1 - mag(S11)**2))

numOfPts is the desired number of points per circle. The default value for numOfPts is 51.

numCircles is the number of desired circles. This is used if gain is not specified.

gainStep is the gain step size. This is used if gain is not specified. Default = 1.0.

Examples circleData = gs_circle(S, 2, 51)circleData = gs_circle(S, {2, 3, 4}, 51)

returns the points on the circle(s).circleData = gs_circle(S, , 51, 5, 0.5)

returns the points on the circle(s) for 5 circles at maxGain - {0,0.5,1.0,1.5,2.0}

circleData = gs_circle(S, , , 2, 1.0)

returns the points on the circle(s) for 2 circles at maxGain - {0,1.0}

Used in Small- signal S- parameter simulations

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “ga_circle()” on page 210, “gl_circle()” on page 213, “gp_circle()” on page 215

Description This expression generates the unilateral gain circle resulting from a source mismatch. The circle is defined by the loci of the source- reflection coefficients that result in the specified gain.

Page 218: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

218 IC-CAP Expressions

6 S-parameter Analysis Functions

A gain circle is created for each value of the swept variable(s). Multiple gain values can be specified for a scattering parameter that has dimension less than four. This measurement is supported for 2- port networks only.

If gain is not specified, and if numCircles is not specified as well gain circles are drawn at maxGain – {0,1,2,3}. That is gain values are calculated at a loss of 0,1,2,3 dB from the maximum gain. If gain is not specified, and if numCircles is given then numCircles gain circles are drawn at gainStep below maxGain. Gain is also limited by maxGain (i.e., if gain > maxGain, then the circle is generated at maxGain).

Page 219: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 219

htoabcd()

This measurement transforms the hybrid matrix of a 2- port network to a chain (ABCD) matrix.

Synopsis y = htoabcd(H)

where H is the hybrid matrix of a 2- port network.

Examples a = htoabcd(h)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “htoz()” on page 222, “ytoh()” on page 268

Page 220: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

220 IC-CAP Expressions

6 S-parameter Analysis Functions

htos()

This measurement transforms the hybrid matrix of a 2- port network to a scattering matrix.

Synopsis y = htos(H, Z)

where

H is the hybrid matrix of a 2- port network.

Z is the reference impedance.

Examples s = htos(h, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htoy()” on page 221, “htoz()” on page 222, “stoh()” on page 249

Page 221: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 221

htoy()

This measurement transforms the hybrid matrix of a 2- port network to an admittance matrix.

Synopsis y = htoy(H)

where H is the hybrid matrix of a 2- port network.

Examples y = htoy(H)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htos()” on page 220, “htoz()” on page 222, “ytoh()” on page 268

Page 222: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

222 IC-CAP Expressions

6 S-parameter Analysis Functions

htoz()

This measurement transforms the hybrid matrix of a 2- port network to an impedance matrix.

Synopsis y = htoz(H)

where H is the hybrid matrix of a 2- port network.

Examples z = htoz(h)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htos()” on page 220, “htoy()” on page 221, “ytoh()” on page 268

Page 223: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 223

l_stab_circle()

Returns a load (output) stability circle.

Synopsis y = l_stab_circle(S{, numOfPts})

where

S is the scattering matrix of a 2- port network.

numOfPts is the desired number of points per circle and is set to 51 by default.

Examples circleData = l_stab_circle(S, 51)

returns the points on the circle(s).

Used in Small- signal S- parameter simulations

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_region()” on page 225, “s_stab_circle()” on page 237, “s_stab_region()” on page 239

Notes/Equations

The expression generates a load stability circle. The circle is defined by the loci of load- reflection coefficients where the magnitude of the source- reflection coefficient is 1.

A circle is created for each value of the swept variable(s). This measurement is supported for 2- port networks only.

Page 224: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

224 IC-CAP Expressions

6 S-parameter Analysis Functions

l_stab_circle_center_radius()

Returns the center and radius of the load (output) stability circle.

Synopsis y = l_stab_circle_center_radius(S, {Type})

where

S is the scattering matrix of a 2- port network.

Type is the type of parameter to return – “center”, “radius”. Default “both”.

Examples l_cr=l_stab_circle_center_radius(S)

returns a 1X2 matrix containing center and radius.lCirc=expand(circle(l_cr(1), real(l_cr(2)), 51))

returns data for the load stability circle.l_radius=l_stab_circle_center_radius(S, “radius”)

returns the radius.

Used in Small- signal S- parameter simulations

Available asmeasurement

component?

Not available

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_circle()” on page 223, “s_stab_circle()” on page 237, “s_stab_circle_center_radius()” on page 238

Description If the argument Type is not specified, the function returns complex data. Although radius is of type real, the values are returned as complex. Therefore, when using the returned radius, use the real part. To obtain the radius as a real number, set “Type” to radius.

Page 225: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 225

l_stab_region()

This expression returns a string identifying the region of stability of the corresponding load stability circle.

Synopsis y = l_stab_region(S)

where S is the scattering matrix of a 2- port network.

Examples region = l_stab_region(S)

returns “Outside” or “Inside”.

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_circle()” on page 223, “s_stab_circle()” on page 237, “s_stab_region()” on page 239

Notes/Equations

Used in Small- signal S- parameter simulations

Page 226: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

226 IC-CAP Expressions

6 S-parameter Analysis Functions

map1_circle()

Returns source- mapping circles from port 1 to port 2.

Synopsis circleData=map1_circle(S{, numOfPts})

where

S is the scattering matrix of a 2- port network.

numOfPts is the desired number of points per circle and is set to 51 by default.

Examples circleData=map1_circle(S, 51)

returns the points on the circle(s).

Defined in $ICCAP_ROOT/expressions/ael/circles_fun.ael

See also “map2_circle()” on page 227

Notes/Equations

Used in Small- signal S- parameter simulations

The expression maps the set of terminations with unity magnitude at port 1 to port 2. The circles are defined by the loci of terminations on one port as seen at the other port.

A source- mapping circle is created for each value of the swept variable(s). This measurement is supported for 2- port networks only.

Page 227: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 227

map2_circle()

Returns source- mapping circles, from port 2 to port 1

Synopsis circleData=map2_circle(S{, numOfPts})

where

S is the scattering matrix of a 2- port network.

numOfPts is the desired number of points per circle and is set to 51 by default.

Examples circleData=map2_circle(S, 51)

returns the points on the circle(s).

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “map1_circle()” on page 226

Notes/Equations

Used in Small- signal S- parameter simulations

The expression maps the set of terminations with unity magnitude at port 2 to port 1. The circles are defined by the loci of terminations on one port as seen at the other port.

A source- mapping circle is created for each value of the swept variable(s). This measurement is supported for 2- port networks only.

Page 228: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

228 IC-CAP Expressions

6 S-parameter Analysis Functions

max_gain()

Given a 2 x 2 scattering matrix, this measurement returns the maximum available and stable gain (in dB) between the input and the measurement ports.

Synopsis y = max_gain(S)

where S is a scattering matrix of 2- port network.

Examples y = max_gain(S)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “sm_gamma1()” on page 240, “sm_gamma2()” on page 241, “stab_fact()” on page 246, “stab_meas()” on page 247

Page 229: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 229

mu()

Returns the geometrically derived stability factor for the load.

Synopsis y = mu(S)

where S is a scattering matrix of a 2- port network.

Examples x=mu(S)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “mu_prime()” on page 230

Notes/Equations

This measurement gives the distance from the center of the Smith chart to the nearest output (load) stability circle.

This stability factor is given by

mu = {1- |S11|**2} / {|S22 - conj(S11)*Delta | + |S12*S21| }

where Delta is the determinant of the S- parameter matrix. Having mu > 1 is the single necessary and sufficient condition for unconditional stability of the 2- port network.

Reference 1 M. L. Edwards and J. H. Sinsky, “A new criterion for linear 2- port stability using geometrically derived parameters", IEEE Transactions on Microwave Theory and Techniques, Vol. 40, No. 12, pp. 2303- 2311, Dec. 1992.

Page 230: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

230 IC-CAP Expressions

6 S-parameter Analysis Functions

mu_prime()

Returns the geometrically derived stability factor for the source.

Synopsis y = mu_prime(S)

where S is a scattering matrix of 2- port network.

Examples a = mu_prime(S)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “mu()” on page 229

Notes/Equations

This measurement gives the distance from the center of the Smith chart to the nearest unstable- input (source) stability circle.

This stability factor is given by

mu_prime = {1- |S22|**2} / {|S11 - conj(S22)*Delta | + |S21*S12| }

where Delta is the determinant of the S- parameter matrix. Having mu_prime > 1 is the single necessary and sufficient condition for unconditional stability of the 2- port network.

Reference 1 M. L. Edwards and J. H. Sinsky, “A new criterion for linear 2- port stability using geometrically derived parameters”, IEEE Transactions on Microwave Theory and Techniques, Vol. 40, No. 12, pp. 2303- 2311, Dec. 1992.

Page 231: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 231

ns_circle()

Returns noise- figure circles.

Synopsis y = ns_circle(nf, NFmin, Sopt, rn{, numOfPts, numCircles, NFStep})

where

nf is the specified noise figure and is set by default to max(NFmin) + {0, 1, 2, 3}.

NFmin is the minimum noise figure.

Sopt is the optimum mismatch.

rn is the equivalent normalized noise resistance of a 2- port network (rn = Rn/zRef where Rn is the equivalent noise resistance and zRef is the reference impedance).

numOfPts is the desired number of points per circle and is set to 51 by default.

numCircles is the number of desired circles. This is used if nf is not specified.

NFStep is the nf step size. This is used if nf is not specified. Default = 1.0.

Examples circleData = ns_circle(0+NFmin, NFmin, Sopt, Rn/50, 51). circleData = ns_circle({0, 1}+NFmin, NFmin, Sopt, Rn/50, 51)

returns the points on the circle(s). circleData = ns_circle(, NFmin, Sopt, Rn/50, 51, 3, 0.5)

returns the points on the circle(s) for 3 circles at max(NFmin) + {0, 0.5, 1.0}.

circleData = ns_circle(, NFmin, Sopt, Rn/50, , 3)

returns the points on the circle(s) for 3 circles at max(NFmin) + {0, 1, 2.0}.

Used in Small- signal S- parameter simulations

Available asmeasurement

component?

NsCircle

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

Page 232: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

232 IC-CAP Expressions

6 S-parameter Analysis Functions

Description The expression generates constant noise- figure circles. The circles are defined by the loci of the source- reflection coefficients that result in the specified noise figure. NFmin, Sopt, and Rn are generated from noise analysis.

A circle is created for each value of the swept variable(s).

If nf is not specified, and if numCircles is not specified as well nf circles are drawn at max(NFmin) + {0,1,2,3}. If nf is not specified, and if numCircles is given then numCircles nf circles are drawn at NFStep above max(NFmin).

Page 233: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 233

ns_pwr_int()

Returns the integrated noise power.

Synopsis y = ns_pwr_int(Sji, nf, resBW)

where

Sji is the complex transmission coefficient.

nf is noise figure at the output port (in dB).

resBW is the user- defined resolution bandwidth.

Examples Y = ns_pwr_int(S21, nf2, 1MHz)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ns_pwr_ref_bw()” on page 234, “snr()” on page 84

Notes/Equations

Used in Small- signal S- parameter simulation

This is the integrated noise power (in dBm) calculated by integrating the noise power over the entire frequency sweep. The noise power at each frequency point is calculated by multiplying the noise spectral density by a user- defined resolution bandwidth.

Page 234: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

234 IC-CAP Expressions

6 S-parameter Analysis Functions

ns_pwr_ref_bw()

Returns noise power in a reference bandwidth.

Synopsis y = ns_pwr_ref_bw(Sji, nf, resBW)

where

Sji is the complex transmission coefficient.

nf is noise figure at the output port (in dB).

resBW is the user- defined resolution bandwidth.

Examples Y = ns_pwr_ref_bw(S21, nf2, 1MHz)

returns the noise power with respect to the reference bandwidth.

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “ns_pwr_int()” on page 233, “snr()” on page 84

Notes/Equations

Used in Small- signal S- parameter simulation

This is the noise power calculated by multiplying the noise spectral density at a frequency point by a user- defined resolution bandwidth. Unlike NsPwrInt, this gives the noise power (in dB) at each frequency sweep.

Page 235: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 235

pwr_gain()

This measurement is used to determine the transducer power gain (in dB) and is defined as the ratio of the power delivered to the load, to the power available from the source. (where power is in dBm).

Synopsis y = pwr_gain(S, Zs, Zl{, Zref})

where

S is the 2 × 2 scattering matrix.

Zs and Zl are the input and output impedances, respectively.

Zref is the reference impedance, set by default to 50 ohms.

Examples pGain = pwr_gain(S,50,75) - Zref defaults to 50 ohms

pGain1 = pwr_gain(S, 50, 75, 75) - Zref = 75 ohms

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “stos()” on page 250, “volt_gain()” on page 259, “volt_gain_max()” on page 261

Page 236: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

236 IC-CAP Expressions

6 S-parameter Analysis Functions

ripple()

This function measures the deviation of x from the average of x.

Synopsis y = ripple(x)

where x can be a gain or group delay data over a given frequency range.

Examples a = ripple(pwr_gain(S21))

Defined in $ICCAP_ROOT/expressions/ael/elementary_fun.ael

See also “dev_lin_phase()” on page 209, “diff()” on page 128, “mean()” on page 153, “phasedeg()” on page 163, “phaserad()” on page 164, “unwrap()” on page 182

Page 237: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 237

s_stab_circle()

Returns source (input) stability circles.

Synopsis y = s_stab_circle(S{, numOfPts})

where

S is the scattering matrix of a 2- port network.

numOfPts is the desired number of points per circle and is set to 51 by default.

Examples circleData = s_stab_circle(S, 51)

returns the points on the circle(s).

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_circle()” on page 223, “l_stab_region()” on page 225, “s_stab_region()” on page 239

Notes/Equations

Used in Small- signal S- parameter simulations

This expression generates source stability circles. The circles are defined by the loci of source- reflection coefficients where the magnitude of the load- reflection coefficient is 1.

A circle is created for each value of the swept variable(s). This measurement is supported for 2- port networks only.

To find the center and radius of the stability circle use the following expressions:cir=s_stab_circle(S,2)cir_center=sum((cir[0::1]) /2)cir_radius=abs(cir[1]-cir[0]) /2

and to determine the region of stability use the function s_stab_region(S).

Page 238: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

238 IC-CAP Expressions

6 S-parameter Analysis Functions

s_stab_circle_center_radius()

Returns the center and radius of the source (input) stability circle.

Synopsis y = s_stab_circle_center_radius(S, {Type})

where

S is the scattering matrix of a 2- port network.

Type is the type of parameter to return – “center”, “radius”. Default “both”.

Examples s_cr=s_stab_circle_center_radius(S)

returns a 1X2 matrix containing center and radiussCirc=expand(circle(s_cr(1), real(s_cr(2)), 51))

returns data for the source stability circles_radius=s_stab_circle_center_radius(S, "radius")

returns the radius

Used in Small- signal S- parameter simulations

Available asmeasurement

component?

Not available

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_circle()” on page 223, “s_stab_circle()” on page 237, “l_stab_circle_center_radius()” on page 224

Description If the argument Type is not specified, the function returns complex data. Although radius is of type real, the values are returned as complex. Therefore, when using the returned radius, use the real part. To obtain the radius as a real number, set Type to “radius”.

Page 239: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 239

s_stab_region()

This expression returns a string identifying the region of stability of the corresponding source stability circle.

Synopsis y = s_stab_region(S)

where S is the scattering matrix of a 2- port network.

Examples region = s_stab_region(S)

returns “Outside” or “Inside”.

Defined in $ICCAP_ROOT/expressions/ael/circle_fun.ael

See also “l_stab_circle()” on page 223, “l_stab_region()” on page 225, “s_stab_region()” on page 239

Notes/Equations

Used in Small- signal S- parameter simulations

Page 240: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

240 IC-CAP Expressions

6 S-parameter Analysis Functions

sm_gamma1()

Returns the simultaneous- match input- reflection coefficient.

Synopsis y = sm_gamma1(S)

where S is a scattering matrix of 2- port network.

Examples a = sm_gamma1(S)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “max_gain()” on page 228, “sm_gamma2()” on page 241, “stab_fact()” on page 246, “stab_meas()” on page 247

Notes/Equations

This complex measurement determines the reflection coefficient that must be presented to the input (port 1) of the network to achieve simultaneous input and output reflections. If the Rollett stability factor stab_fact(S) is less than unity for the analyzed circuit, then sm_gamma1(S) returns zero. It is, in effect, undefined when stab_fact(S) < 1.

Page 241: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 241

sm_gamma2()

Returns the simultaneous- match output- reflection coefficient.

Synopsis y = sm_gamma2(S)

where S is a scattering matrix of 2- port network.

Examples a = sm_gamma2(S)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “max_gain()” on page 228, “sm_gamma1()” on page 240, “stab_fact()” on page 246, “stab_meas()” on page 247

Notes/Equations

This complex measurement determines the reflection coefficient that must be presented to the output (port 2) of the network to achieve simultaneous input and output reflections. If the Rollett stability factor stab_fact(S) is less than unity for the analyzed circuit, then sm_gamma2(S) returns zero. It is, in effect, undefined when stab_fact(S) < 1.

Page 242: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

242 IC-CAP Expressions

6 S-parameter Analysis Functions

sm_y1()

This complex measurement determines the admittance that must be presented to the input (port 1) of the network to achieve simultaneous input and output reflections.

Synopsis y = sm_y1(S, Z)

where

S is a scattering matrix of a 2- port network.

Z is a port impedance.

Examples a = sm_y1(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “sm_y2()” on page 243

Page 243: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 243

sm_y2()

This complex measurement determines the admittance that must be presented to the input (port 2) of the network to achieve simultaneous input and output reflections.

Synopsis y = sm_y2(S, Z)

where

S is a scattering matrix of 2- port network.

Z is a port impedance.

Examples a = sm_y2(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “sm_y1()” on page 242

Page 244: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

244 IC-CAP Expressions

6 S-parameter Analysis Functions

sm_z1()

This complex measurement determines the impedance that must be presented to the input (port 1) of the network to achieve simultaneous input and output reflections.

Synopsis y = sm_z1(S, Z)

where

S is a scattering matrix of a 2- port network.

Z is a port impedance.

Examples a = sm_z1(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “sm_z2()” on page 245

Page 245: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 245

sm_z2()

This complex measurement determines the impedance that must be presented to the output (port 2) of the network to achieve simultaneous input and output reflections.

Synopsis Y = sm_z2(S, Z)

where

S is a scattering matrix of 2- port network.

Z is a port impedance.

Examples a = sm_z2(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “sm_z1()” on page 244

Page 246: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

246 IC-CAP Expressions

6 S-parameter Analysis Functions

stab_fact()

Returns the Rollett stability factor.

Synopsis y = stab_fact(S)

where S is the scattering matrix of a 2- port network.

Examples k = stab_fact(S)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “max_gain()” on page 228, “sm_gamma1()” on page 240, “sm_gamma2()” on page 241, “stab_meas()” on page 247

Notes/Equations

Given a 2 x 2 scattering matrix between the input and measurement ports, this function calculates the stability factor.

The Rollett stability factor is given by

k = {1- |S11|**2 - |S22|**2 + |S11*S22 - S12*S21| **2} / {2*|S12*S21|}

The necessary and sufficient conditions for unconditional stability are that the stability factor is greater than unity and the stability measure is positive.

Reference 1 Guillermo Gonzales, Microwave Transistor Amplifiers, second edition, Prentice- Hall, 1997.

Page 247: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 247

stab_meas()

Returns the stability measure.

Synopsis y = stab_meas(S)

where S is the scattering matrix of a 2- port network.

Examples b = stab_meas(S)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “max_gain()” on page 228, “sm_gamma1()” on page 240, “sm_gamma2()” on page 241, “stab_fact()” on page 246

Notes/Equations

Given a 2 x 2 scattering matrix between the input and measurement ports, this function calculates the stability measure.

The stability measure is given by

b = 1+ |S11|**2 - |S22|**2 - |S11*S22 - S12*S21| **2

The necessary and sufficient conditions for unconditional stability are that the stability factor is greater than unity and the stability measure is positive.

Reference 1 Guillermo Gonzales, Microwave Transistor Amplifiers, second edition, Prentice- Hall, 1997.

Page 248: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

248 IC-CAP Expressions

6 S-parameter Analysis Functions

stoabcd()

This measurement transforms the scattering matrix of a 2- port network to a chain (ABCD) matrix.

Synopsis y = stoabcd(S, zRef)

where

S is a scattering matrix of a 2- port network.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples a = stoabcd(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “stoh()” on page 249, “stoy()” on page 252

Page 249: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 249

stoh()

This measurement transforms the scattering matrix of a 2- port network to a hybrid matrix.

Synopsis y = stoh(S, zRef)

where

S is a scattering matrix of a 2- port network.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples h = stoh(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htos()” on page 220, “stoabcd()” on page 248, “stoy()” on page 252

Page 250: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

250 IC-CAP Expressions

6 S-parameter Analysis Functions

stos()

This function changes the normalizing impedance of a scattering matrix.

Synopsis y = stos(S, zRef, zNew, zy)

where

S is a scattering matrix

zRef is a normalizing impedance and can be an integer, real, or complex number.

zNew is a new normalizing impedance and can be an integer, real, or complex number.

zy is an optional parameter for directing the conversion through the Z- or Y- matrix. If zy=0, the S- to- S conversion is performed through the Z- matrix. If zy=1, the S- to- S conversion is performed through the Y- matrix.

Examples a = stos(S, 50, 75, 1)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoy()” on page 252, “stoz()” on page 253

Page 251: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 251

stot()

This function transforms the scattering matrix of a 2- port network to a chain scattering matrix.

Synopsis y = stot(s)

where

s is a two port scattering parameter matrix

Examples Tparams = stot(S)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “ttos()” on page 257

Page 252: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

252 IC-CAP Expressions

6 S-parameter Analysis Functions

stoy()

This measurement transforms a scattering matrix to an admittance matrix.

Synopsis y = stoy(S, zRef)

where

S is a scattering matrix of a 2- port network.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples y = stoy (S, 50.0)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoh()” on page 249, “stoz()” on page 253, “ytos()” on page 269

Page 253: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 253

stoz()

This measurement transforms a scattering matrix to an impedance matrix.

Synopsis y = stoz(S, zRef)

where

S is a scattering matrix of a 2- port network.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples z = stoz(S, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoh()” on page 249, “stoy()” on page 252, “ztos()” on page 275

Page 254: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

254 IC-CAP Expressions

6 S-parameter Analysis Functions

tdr_sp_gamma()

Returns step response. This function calculates time domain response from the S- parameter measurement directly. Normalization is taken into account.

Synopsis y=tdr_sp_gamma(S_parm_dataset, delay, reference_imped, start_time, stop_time, num_of_pts, window)

This function takes an S- parameter dataset and changes it to a step response. The step response is normalized and used to calculate reflection coefficient vs. time.

Examples x= tdr_sp_gamma(S(1,1), 0.05ns, 50, -0.2 ns, 3.8 ns, 401,, "Hamming")

Defined in Built in

See also “tdr_sp_imped()” on page 255, “tdr_step_imped()” on page 256

Page 255: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 255

tdr_sp_imped()

Returns step response. This function calculates time domain response from the S- parameter measurement directly. Normalization is taken into account.

Synopsis y=tdr_sp_imped(S_parm_dataset, delay, reference_imped, start_time, stop_time, num_of_pts, window)

This function takes an S- parameter dataset and changes it to a step response. The step response is normalized and used to calculate reflection coefficient vs. time. This gamma is then used to calculate impedance versus time.

Examples x= tdr_sp_imped(S(1,1), 0.05ns, 50, -0.2 ns, 3.8 ns, 401,, "Hamming")

Defined in Built in

See also “tdr_sp_gamma()” on page 254, “tdr_step_imped()” on page 256

Page 256: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

256 IC-CAP Expressions

6 S-parameter Analysis Functions

tdr_step_imped()

Returns time domain Impedance. This function essentially takes voltage reflection coefficient and calculates impedance versus time.

Synopsis y=tdr_step_imped(time_waveform, reference_imped)

This function takes a time domain pulse TDR waveform, and computes the impedance versus time. The function also assumes that a step impulse was applied to the DUT, since it normalizes the impedance data to the last time point.

Examples x=tdr_step_imped(vout, 50)

Defined in Built in

See also “tdr_sp_gamma()” on page 254, “tdr_sp_imped()” on page 255

Page 257: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 257

ttos()

This function transforms the chain scattering matrix of a 2- port network to a scattering matrix.

Synopsis y = ttos(t)

where

t is a two port chain scattering parameter matrix.

Examples Sparams= ttos(T)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stot()” on page 251

Page 258: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

258 IC-CAP Expressions

6 S-parameter Analysis Functions

unilateral_figure()

Returns the unilateral figure of merit as a real number.

Synopsis U = unilateral_figure(SParam)

Where

SParam is the scattering matrix of a 2- port network

Examples Form an S matrix at a single frequencysMat={{polar(0.55,-50), polar(0.02,10)}, {polar(3.82,80),polar(0.15,-20)}}U = uniltaeral_figure(sMat)

returns 0.009U_plus = 10*log(1/(1-U)**2)

returns 0.081U_minus = 10*log(1/(1+U)**2)

returns - 0.08

Used in Small- signal S- parameter simulations

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also Not applicable

Notes/Equations

This function is used to calculate the Unilateral Figure of Merit, which determines whether the simplification can be made in neglecting the effect of S12 (unilateral behavior of device). It's calculated as:

The error limit on unilateral figure or merit, U is:

Where GT is Transducer Gain, and GTU is Unilateral Transducer Gain.

This function can be used only with 2- Port S- Parameters. And works only on 1- dimensional or single swept parameter data.

US11 S12 S21 S22

1 S112

–( ) 1 S222

–( )----------------------------------------------------------=

1

1 U+( )2---------------------

GTGTU------------

1

1 U–( )2--------------------< <

Page 259: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 259

volt_gain()

Returns the voltage gain

Synopsis y= volt_gain(S, Zs, Zl{, Zref})

where

S is the 2 × 2 scattering matrix measured with equal terminations of Zref.

Zs and Zl are the source and load impedances, respectively for voltage gain calculation.

Zref is the reference impedance for s- matrix measurement, set by default to the value of 50 ohms.

Examples a = volt_gain(S, 50, 75)

Defined in circuit_fun.ael

See also “pwr_gain()” on page 235, “volt_gain_max()” on page 261

Notes/Equations

This function calculates the ratio of the voltage across the load impedance to the voltage applied at the input port of the network. The network- parameter transformation function “stos” can be used to change the normalizing impedance of the scattering matrix.

The following figure illustrates the volt_gain measurement.

volt_gainS21

2--------

1 ΓS–( ) 1 ΓL+( )⋅S11 ΓS 1–⋅( ) S22 ΓL 1–⋅( ) S12 S21 ΓS ΓL⋅ ⋅ ⋅–⋅

-----------------------------------------------------------------------------------------------------------------------⋅=

Page 260: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

260 IC-CAP Expressions

6 S-parameter Analysis Functions

Figure 2 Signal Flow Diagram used for volt_gain Calculation

1 In the S- parameter simulation setup, the source and load impedances must be identical.

2 For a case of unequal source and load impedances, S- parameter analysis should be performed with identical source and load impedances. Voltage gain can then be computed with the actual source and load impedances as the second and third arguments.

For example, compute voltage gain with Zs=100 and Zl=50. Perform an S- parameter analysis with both the Zs=Zl=50 ohms. The voltage gain is computed as follows:

volt_gain(S, 100, 50, 50)

This expression gives the voltage gain when the source impedance is 100 ohms and the load impedance is 50 ohms. The fourth argument in volt_gain is the reference impedance, which is the value of the Z parameter of the Term components used in the S- parameter analysis.

S21

S12

S11 S22ΓS ΓL

Page 261: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 261

volt_gain_max()

This measurement determines the ratio of the voltage across the load to the voltage available from the source at maximum power transfer. The network- parameter transformation function “stos()” on page 250 can be used to change the normalizing impedance of the scattering matrix.

Synopsis Y = volt_gain_max(S, Zs, Zl{, Zref})

where

S is the 2 × 2 scattering matrix.

Zs and Zl are the input and output impedances, respectively.

Zref is the reference impedance, set by default 50 ohms.

Examples vGain = volt_gain_max(S, 50, 75) - Zref defaults to 50 ohmsvGain1 = volt_gain(S, 50, 75, 75) - Zref = 75 ohms

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “pwr_gain()” on page 235, “volt_gain()” on page 259

Page 262: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

262 IC-CAP Expressions

6 S-parameter Analysis Functions

vswr()

Given a complex reflection coefficient, this measurement returns the voltage standing wave ratio.

Synopsis y = vswr(Sii)

where Sii is the complex reflection coefficient.

Examples a = vswr(S11)

Defined in $ICCAP_ROOT/expressions/ael/rf_system_fun.ael

See also “yin()” on page 265, “zin()” on page 271

Page 263: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 263

write_snp()

Write S- Parameters in Touchstone SnP file format. Returns True or False.

Synopsis y = write_snp(FileName, Smatrix [, Comment, FreqUnit, DataFormat, Smatrix, Zref])

where

FileName is name or full- path of the S- Parameter file.

Smatrix is S- parameter matrix variable (1 to 99 ports)

Comment is text that is to be written at the top of file. Default is "".

FreqUnit is frequency unit – “Hz”, “KHz”, “MHz”, “GHz”, “THz”. Default is “GHz”.

DataFormat is format of S- Parameter that is to be output – “MA”, “DB”, “RI”. Default is “MA”.

Zref is reference impedance or value of R in the output file. Default is 50.0.

Examples This example assumes that an S- parameter Analysis has been performed, and the data is to be written to a file.writeTS = write_snp("spar_ts.s2p", S, "S-par simulation data", "GHz", "MA", 50)

writes the S- Parameters to the file spar_ts.s2p in mag- phase format

write_snp("spar_ts_1.s2p", S, "S-par simulation data")

writes the S- Parameters to the file spar_ts_1.s2p in default "GHz", mag- phase format and reference impedance of 50.0.

Used in S- Parameter Analysis.

Defined in $HPEESOF_DIR/expressions/ael/network_fun.ael

See also “stos()” on page 250

Notes/Equations

The function supports only 1- dimensional S- Parameter data. S- parameters can be from 1 to 99 ports. Z, Y, G and H parameters are not supported.

Page 264: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

264 IC-CAP Expressions

6 S-parameter Analysis Functions

Function does not support writing noise data.

DataFormat can be set to one of the following:

• “MA”: magnitude- phase

• “DB”: dB- phase

• “RI”: real- imaginary

Page 265: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 265

yin()

Given a reflection coefficient and the reference impedance, this measurement returns the input admittance looking into the measurement ports.

Synopsis y = yin(Sii, Z)

where

Sii is a complex reflection coefficient.

Z is a reference impedance.

Examples a = yin(S11, 50)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “vswr()” on page 262, “zin()” on page 271

Page 266: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

266 IC-CAP Expressions

6 S-parameter Analysis Functions

yopt()

Returns optimum admittance for noise match.

Synopsis y = yopt(gammaOpt, zRef)

where

gammaOpt is a optimum reflection coefficient.

zRef is a reference impedance.

Examples a = yopt(Sopt, 50)

Defined in Built in

See also “zopt()” on page 272

Notes/Equations

Used in Small- signal S- parameter simulations

This complex measurement produces the optimum source admittance for noise matching. gammaOpt is the optimum reflection coefficient that must be presented at the input of the network to realize the minimum noise figure (NFmin).

Page 267: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 267

ytoabcd()

This measurement transforms an admittance matrix of a 2- port network into a hybrid matrix.

Synopsis z = ytoabcd(Y)

where Y is an admittance matrix.

Examples a = ytoabcd(Y)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoh()” on page 203, “htoabcd()” on page 219

Page 268: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

268 IC-CAP Expressions

6 S-parameter Analysis Functions

ytoh()

This measurement transforms an admittance matrix of a 2- port network into a hybrid matrix.

Synopsis z = ytoh(Y)

where Y is an admittance matrix.

Examples h = ytoh(Y)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htoy()” on page 221, “ytoabcd()” on page 267

Page 269: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 269

ytos()

This measurement transforms an admittance matrix into a scattering matrix.

Synopsis z = ytos(Y, zRef)

where

Y is an admittance matrix.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples s = ytos(Y, 50.0)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoy()” on page 252, “ytoz()” on page 270

Page 270: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

270 IC-CAP Expressions

6 S-parameter Analysis Functions

ytoz()

This measurement transforms an admittance matrix to an impedance matrix.

Synopsis z = ytoz(Y)

where Y is an admittance matrix

Examples a = ytoz(Y)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “ytos()” on page 269, “ztoy()” on page 276

Page 271: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 271

zin()

Given a reflection coefficient and the reference impedance, this measurement returns the input impedance looking into the measurement ports.

Synopsis y = zin(Sii, Z)

where

Sii is a complex reflection coefficient.

Z is a reference impedance.

Examples a = zin(S11, 50.0)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “vswr()” on page 262, “yin()” on page 265

Page 272: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

272 IC-CAP Expressions

6 S-parameter Analysis Functions

zopt()

Returns the optimum impedance for noise matching.

Synopsis y = zopt(gammaOpt, zRef)

where

gammaOpt is an optimum reflection coefficient.

zRef is a reference impedance.

Examples a = zopt(Sopt, 50)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “yopt()” on page 266

Notes/Equations

Used in Small- signal S- parameter simulations

This complex measurement produces the optimum source impedance for noise matching. gammaOpt is the optimum reflection coefficient that must be presented at the input of a network to realize the minimum noise figure (NFmin).

Page 273: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 273

ztoabcd()

This measurement transforms an impedance matrix of a 2- port network into a chain (ABCD) matrix.

Synopsis y = ztoabcd(Z)

where Z is an impedance matrix.

Examples a = ztoabcd(Z)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “abcdtoz()” on page 206, “ytoabcd()” on page 267, “ztoh()” on page 274

Page 274: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

274 IC-CAP Expressions

6 S-parameter Analysis Functions

ztoh()

This measurement transforms an impedance matrix of a 2- port network into a hybrid matrix.

Synopsis y = ztoh(Z)

where Z is an impedance matrix.

Examples h = ztoh(Z)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “htoz()” on page 222, “ytoh()” on page 268, “ztoabcd()” on page 273

Page 275: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

S-parameter Analysis Functions 6

IC-CAP Expressions 275

ztos()

This measurement transforms an impedance matrix to a scattering matrix.

Synopsis y = ztos(Z, zRef)

where

Z is an impedance matrix.

zRef is a reference impedance and can be an integer, real, or complex number.

Examples s = ztos(Z, 50.0)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoz()” on page 253, “ytoz()” on page 270, “ztoy()” on page 276

Page 276: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

276 IC-CAP Expressions

6 S-parameter Analysis Functions

ztoy()

This measurement transforms an impedance matrix to an admittance matrix.

Synopsis y = ztoy(Z)

where Z is an impedance matrix.

Examples a = ztoy(Z)

Defined in $ICCAP_ROOT/expressions/ael/network_fun.ael

See also “stoz()” on page 253, “ytos()” on page 269, “ztoy()” on page 276

Page 277: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

277

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

7Statistical Analysis Functions

cdf() 278

cross_corr() 279

histogram() 280

histogram_multiDim() 282

histogram_sens() 283

histogram_stat() 284

lognorm_dist_inv1D() 285

lognorm_dist1D() 286

mean() 153

mean_outer() 154

moving_average() 287

norm_dist_inv1D() 288

norm_dist1D() 289

norms_dist_inv1D() 290

norms_dist1D() 291

pdf() 292

stddev() 293

uniform_dist_inv1D() 294

uniform_dist1D() 295

yield_sens() 296

This chapter describes the statistical analysis functions in detail. The functions are listed in alphabetical order.

Page 278: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

278 IC-CAP Expressions

7 Statistical Analysis Functions

cdf()

Returns the cumulative distribution function (CDF).

Synopsis y = cdf(data, numBins, minBin, maxBin)

where

data is the signal.

numBins is the number of subintervals or bins used to measure CDF. This is an optional value.

minBin and maxBin are the beginning and end, respectively, of the evaluation of the CDF. These are optional values.

Examples y = cdf(data)y = cdf(data, 20)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “histogram()” on page 280, “pdf()” on page 292, “yield_sens()” on page 296

Notes/Equations

This function measures the cumulative distribution function of a signal. The default values for minBin and maxBin are the minimum and the maximum values of the data, and numBins is set to log(numOfPts)/log(2.0) by default.

This function can only be used by entering an equation (Eqn) in the Data Display window.

Page 279: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 279

cross_corr()

Returns the cross- correlation.

Synopsis cross_corr(v1, v2)

where v1 and v2 are 1- dimensional data

Examples v1 = qpsk..videal[1]v2 = qpsk..vout[1]x_corr_v1v2 = cross_corr(v1, v2)auto_corr_v1 = cross_corr(v1, v1)

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

Page 280: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

280 IC-CAP Expressions

7 Statistical Analysis Functions

histogram()

Generates a histogram representation. This function creates a histogram that represents data.

Synopsis y = histogram(data, numBins, minBin, maxBin)

where

data is the signal and must be one- dimensional.

numBins is number of subintervals or bins used to measure the histogram. numBins is set to log(numOfPts)/log(2.0) by default.

minBin and maxBin are the beginning and end, respectively, of the evaluation of the histogram. The default values for minBin and maxBin are the minimum and the maximum values, respectively, of the data.

Examples y = histogram(data)y = histogram(data, 20)

If you have performed a parameter sweep such that the first argument (data) in the histogram function is a function of two independent variables, then you must reduce the dimensionality of data before using it in the histogram function. For example, if you run a Monte Carlo simulation on the S- parameters of a circuit, S21 would be a function of both the Monte Carlo index and the frequency (assuming you have swept frequency). So, you could plot the histogram of S21 at the 100th frequency in the sweep by using:

y = histogram(dB(S21[::,99]))

See also $ICCAP_ROOT/examples/Tutorial/yldex1_prj(see measurement_hist.dds and worstcase_measurement_hist.dds)

Defined in Built in

See also “cdf()” on page 278, “pdf()” on page 292, “yield_sens()” on page 296, “histogram_multiDim()” on page 282, “histogram_stat()” on page 284

Page 281: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 281

Notes/Equations

This function can only be used by entering an equation (Eqn) in the Data Display window.

Page 282: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

282 IC-CAP Expressions

7 Statistical Analysis Functions

histogram_multiDim()

Collapses the multi- dimensional data down to one- dimensional data and applies the histogram to the one- dimensional data.

Synopsis y = histogram_multiDim(data{, normalized, numBins, minBin, maxBin})

where

data is the signal.

When normalized is set to "yes", the histogram is generated with percent on the Y- axis instead of the number of outcomes.

numBins is number of subintervals or bins used to measure the histogram.

minBin and maxBin are the beginning and end, respectively, of the evaluation of the histogram.

Examples Given monte carlo analysis results for the S12. It is two- dimensional data: the outer sweep is mcTrial; the inner sweep is the frequency from 100 MHz to 500 MHz.Histogram_multiDim_S12 = histogram_multiDim(S12)

See also $ICCAP_ROOT/examples/Tutorial/yldex1_prj(see measurement_hist.dds and worstcase_measurement_hist.dds)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “collapse()” on page 41, “histogram()” on page 280

NOTE This function calls the collapse() function, therefore, it only works for data with dimension less than four.

Page 283: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 283

histogram_sens()

Produces the yield sensitivity histogram displaying the sensitivity of a measurement statistical response to a selected statistical variable. The function is mainly applied to the statistical analysis (Monte Carlo/Yield/YieldOpt) results.

Synopsis y = histogram_sens(data, sensitivityVar{, goalMin, goalMax, innermostIndepLow, innermostIndepHigh, numBins})

where

data is the statistical response.

sensitivityVar is the selected statistical variable.

goalMin and goalMax specifies the performance range - the yield is 1 inside the range, and the yield is zero outside the range. Note that while goalMin and goalMax are optional arguments, at least one of them must be specified.

innermostIndepLow and innermostIndepHigh specifies the subrange of data with the inner most sweep variable.

numBins is number of subintervals or bins used to measure the histogram.

Examples Given monte carlo analysis results for the S11. It is two- dimensional data: the outer sweep is mcTrial; the inner sweep is the frequency from 100 MHz to 500 MHz.

The design wants the maximum of db(S11) is - 18.0dB in the frequency range of 200 MHz to 400 MHz. The yield sensitivity of such performance to statistical variable "C1v" can be calculated as:Histogram_sens_S11 = histogram_sens(dB(S11),C1v,,-18.0,200MHz,400MHz)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “histogram()” on page 280, “histogram_multiDim()” on page 282, “histogram_stat()” on page 284, “build_subrange()” on page 37, “yield_sens()” on page 296

Page 284: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

284 IC-CAP Expressions

7 Statistical Analysis Functions

histogram_stat()

Produces the histogram of a subrange of the multi- dimension data. It first calls build_subrange() to build the subrange of a mulit- dimension data, then calls histogram_multiDim() to produce the histogram.

Synopsis y = histogram_stat(data{, normalized, innermostIndepLow, innermostIndepHigh, numBins, minBin, maxBin})

where

data is the statistical analysis.

When normalized is set to "yes", the histogram is generated with percent on the Y- axis instead of the number of outcomes.

innermostIndepLow and innermostIndepHigh specifies the subrange of data with the inner most sweep variable.

numBins is number of subintervals or bins used to measure the histogram.

minBin and maxBin are the beginning and end, respectively, of the evaluation of the histogram.

Examples Given monte carlo analysis results for the S12. It is two- dimensional data: the outer sweep is mcTrial; the inner sweep is the frequency from 100 MHz to 500 MHz.Histogram_stat_S12 = histogram_stat(S12,,200MHz,400MHz)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “histogram()” on page 280, “histogram_multiDim()” on page 282, “build_subrange()” on page 37

NOTE Because this function calls the histogram_multi() function, which calls the collapse() function, it is only valid for data with dimension less than four.

Page 285: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 285

lognorm_dist_inv1D()

Returns the inverse of the cumulative distribution function (cdf) for a lognormal distribution.

Synopsis y = lognorm_dist_inv1D(data, m, s{, absS})

where

data is a real number in range [0,1] representing the cumulative probability.

m and s are the mean and standard deviation for the lognormal distribution. Can an integer or real number.

When absS is not equal to "0", s is the absolute standard deviation; otherwise, s is the relative standard deviation. Must be an integer and the default is "1".

Examples X_cpf = 0.5X= lognorm_dist_inv1D(X_cpf, 2.0, 0.2, 1)XX_cpf=[0.0::0.01::1.0]XX= lognorm_dist_inv1D(XX_cpf, 2.0, 0.2, 1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

Page 286: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

286 IC-CAP Expressions

7 Statistical Analysis Functions

lognorm_dist1D()

Returns a lognormal distribution: either its probability density function (pdf), or cumulative distribution function (cdf).

Synopsis y = lognorm_dist1D(data, m, s{, absS, is_cpf})

where

data is a number or a one- dimensional data.

m and s are the mean and standard deviation for the lognormal distribution. Can an integer or real number.

When absS is not equal to "0", the given "s" represents the absolute standard deviation value; otherwise, "s" is the relative standard deviation. Must be an integer and the default is "1".

is_cdf is required as an integer number. When is_cdf is not equal to "0", the function returns the cdf of the lognormal distribution. Otherwise, it returns the pdf of the lognormal distribution. Default is "0".

Examples X = 0.5X_pdf= lognorm_dist1D(X, 2.0,0.2, 1, 0)X_cdf = lognorm_dist1D(X,2.0,0.1, 0, 1)XX=[-3.9::0.1::3.9]XX_pdf = lognorm_dist1D(XX,2.0, 0.2,1,0)XX_cdf = lognorm_dist1D(XX,2.0,0.2,0,1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

Page 287: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 287

moving_average()

Returns the moving_average of a sequence of data.

Synopsis y = moving_average(data, numPoints)

where

data is a one- dimensional sequence of numbers in brackets “[x, y, ...]”.

numPoints is the number of points to be averaged together. (see notes section)

Examples a = moving_average([1, 2, 3, 7, 5, 6, 10], 3)

returns [1, 2, 4, 5, 6, 7, 10]

Built in $ICCAP_ROOT/expressions/ael/statistcal_fun.ael

Notes/Equations

numPoints must be an odd number. If even, the value is increased to the next odd number. If greater or equal to the number of data points, the value is set to number of data points - 1 for even number of data points. For odd number of data points, numPoints is set to number of data points.

The first value of the smoothed sequence is the same as the original data. The second value is the average of the first three. The third value is the average of data elements 2, 3, and 4, etc. If numPoints were set to 7, for example, then the first value of the smoothed sequence would be the same as the original data. The second value would be the average of the first three original data points. The third value would be the average of the first five data points, and the fourth value would be the average of the first seven data points. Subsequent values in the smoothed array would be the average of the seven closest neighbors. The last points in the smoothed sequence are computed in a way similar to the first few points. The last point is just the last point in the original sequence. The second from last point is the average of the last three points in the original sequence. The third from the last point is the average of the last five points in the original sequence, etc.

Page 288: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

288 IC-CAP Expressions

7 Statistical Analysis Functions

norm_dist_inv1D()

Returns the inverse of the cumulative distribution function (cdf) for a normal distribution.

Synopsis y = norm_dist_inv1D(data, m, s{, absS})

where

data is a real number in range [0,1] representing the cumulative probability.

m and s are the mean and standard deviation of the normal distribution. Can be an integer or real number.

When absS is not equal to "0", s is the absolute standard deviation; otherwise, s is the relative standard deviation. Default is "1".

Examples X_cpf = 0.5X= norm_dist_inv1D(X_cpf, 0, 1, 1)

will be equal to 0.0XX_cpf=[0.0::0.01::1.0]XX= norm_dist_inv1D(XX_cpf, 5.0, 0.5, 1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist1D()” on page 289, “norms_dist_inv1D()” on page 290, “norms_dist1D()” on page 291, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist_inv1D()” on page 294, “uniform_dist1D()” on page 295

Page 289: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 289

norm_dist1D()

Returns a normal distribution: either its probability density function (pdf), or cumulative distribution function (cdf).

Synopsis y = norm_dist1D(data, m, s{, absS, is_cpf})

where

data is a number or a one- dimensional data.

m and s are the mean and standard deviation for the normal distribution. Can be an integer or real number.

When absS is not equal to "0", the given "s" represents the absolute standard deviation value; otherwise, "s" is the relative standard deviation. Must be an integer and default is "1".

is_cdf is required as an integer number. When is_cdf is not equal to "0", the function returns the cdf of the normal distribution. Otherwise, it returns the pdf of the normal distribution. Default is "0".

Examples X = 0.5X_pdf= norm_dist1D(X, 0, 1, 1, 0)X_cdf = norm_dist1D(X,0, 1, 1, 1)XX=[-3.9::0.1::3.9]XX_pdf = norm_dist1D(XX,5.0, 0.5,1,0)XX_cdf = norm_dist1D(XX,5.0,0.1,0,1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist_inv1D()” on page 288, “norms_dist_inv1D()” on page 290, “norms_dist1D()” on page 291, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist_inv1D()” on page 294, “uniform_dist1D()” on page 295

Page 290: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

290 IC-CAP Expressions

7 Statistical Analysis Functions

norms_dist_inv1D()

Returns the inverse of the cumulative distribution function (cdf) for a standard normal distribution.

Synopsis y = norms_dist_inv1D(data)

where

data is an integer or real number in range [0,1] representing the cumulative probability.

Examples X_cpf = 0.5X= norms_dist_inv1D(X_cpf)

will be equal to 0.0XX_cpf=[0.0::0.01::1.0]XX= norms_dist_inv1D(XX_cpf)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist1D()” on page 289, “norm_dist_inv1D()” on page 288, “norms_dist1D()” on page 291, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist_inv1D()” on page 294, “uniform_dist1D()” on page 295

Page 291: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 291

norms_dist1D()

Returns the standard normal distribution: either its probability density function (pdf), or cumulative distribution function (cdf).

Synopsis y = norms_dist1D(data{, is_cdf})

where

data is a number or a one- dimensional data.

is_cdf is required as an integer number. When is_cdf is not equal to "0", the function returns the cdf of the standard normal distribution. Otherwise, it returns the pdf of the standard normal distribution. Default is "0".

Examples X = 0.5X_pdf= norms_dist1D(X, 0)X_cdf = norms_dist1D(X,1)XX=[-3.9::0.1::3.9]XX_pdf = norms_dist1D(XX,0)XX_cdf = norms_dist1D(XX,1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist1D()” on page 289, “norm_dist_inv1D()” on page 288, “norms_dist_inv1D()” on page 290, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist_inv1D()” on page 294, “uniform_dist1D()” on page 295

Page 292: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

292 IC-CAP Expressions

7 Statistical Analysis Functions

pdf()

Returns a probability density function (PDF).

Synopsis y = pdf(x, numBins, minBin, maxBin)

where

x is the signal.

numBins is number of subintervals or bins used to measure PDF.

minBin and maxBin are the beginning and end, respectively, of the evaluation of the PDF.

Examples y = pdf(data)y = pdf(data, 20)

Defined in AEL statistical_fun.ael

See also “cdf()” on page 278, “histogram()” on page 280, “yield_sens()” on page 296

Notes/Equations

This function measures the probability density function of a signal. The default values for minBin and maxBin are the minimum and the maximum values of the data and numBins is set to log(numOfPts)/log(2.0) by default.

This function can only be used by entering an equation (Eqn) in the Data Display window.

Page 293: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 293

stddev()

The stddev() function calculates the standard deviation of the data.

Synopsis y = stddev(x{, flag})

where

x is the data.

flag is used to indicate how stddev normalizes. By default, flag is set to 0, which means that stddev normalizes by N- 1, where N is the length of the data sequence. Otherwise, stddev normalizes by N.

Examples a = stddev(data)a = stddev(data, 1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “mean()” on page 153

Notes/Equations

This function can only be used by entering an equation (Eqn) in the Data Display window.

Page 294: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

294 IC-CAP Expressions

7 Statistical Analysis Functions

uniform_dist_inv1D()

Returns the inverse of the cumulative distribution function (cdf) for a uniform distribution.

Synopsis y = uniform_dist_inv1D(data, A, B)

where

data is an integer or real number in range [0,1] representing the cumulative probability.

A and B are the uniform distributed range. Can be an integer or real number.

Examples X_cpf = 0.5X= uniform_dist_inv1D(X_cpf, 0.0, 1.5)XX_cpf=[0.0::0.01::1.0]XX= uniform_dist_inv1D(XX_cpf, 0.0, 1.5)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist1D()” on page 289, “norm_dist_inv1D()” on page 288, “norms_dist_inv1D()” on page 290, “norms_dist1D()” on page 291, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist1D()” on page 295

Page 295: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Statistical Analysis Functions 7

IC-CAP Expressions 295

uniform_dist1D()

Returns a uniform distribution: either its probability density function (pdf), or cumulative distribution function (cdf).

Synopsis y = uniform_dist1D(data, A, B{, is_cpf})

where

data is a number or a one- dimensional data. Can be an integer or real number.

A and B are the uniform distributed range. Can be an integer or real number.

is_cdf is required as an integer number. When is_cdf is not equal to "0", the function returns the cdf of the uniform distribution. Otherwise, it returns the pdf of the uniform distribution. Default is "0".

Examples X = 0.5X_pdf= uniform_dist1D(X, 0.0,1.0, 0)X_cdf = uniform_dist1D(X,0.0,1.0, 1)XX=[-3.9::0.1::3.9]XX_pdf = uniform_dist1D(XX,0.0,5.0,0)XX_cdf = uniform_dist1D(XX,0.0,5.0,1)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “norm_dist1D()” on page 289, “norm_dist_inv1D()” on page 288, “norms_dist_inv1D()” on page 290, “norms_dist1D()” on page 291, “lognorm_dist_inv1D()” on page 285, “lognorm_dist1D()” on page 286, “uniform_dist_inv1D()” on page 294

Page 296: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

296 IC-CAP Expressions

7 Statistical Analysis Functions

yield_sens()

Returns the yield as a function of a design variable.

Synopsis y = yield_sens(pf_data{, numBins})

where

pf_data is a binary- valued scalar data set indicating the pass/fail status of each value of a companion independent variable.

numBins is the number of subintervals or bins used to measure yield_sens.

Examples a = yield_sens(pf_data)a = yield_sens(pf_data, 20)

Defined in $ICCAP_ROOT/expressions/ael/statistical_fun.ael

See also “cdf()” on page 278, “histogram()” on page 280, “pdf()” on page 292

Notes/Equations

Used in Monte Carlo simulation.

This function measures the yield as a function of a design variable. The default value for numBins is set to log(numOfPts)/log(2.0) by default. For more information and an example refer to "Creating a Sensitivity Histogram" in the "Tuning, Optimization and Statistical Design" documentation.

This function can only be used by entering an equation (Eqn) in the Data Display window.

Page 297: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

297

Agilent 85190A IC-CAP 2004Expressions

Agilent Technologies

8Transient Analysis Functions

Working with Transient Data 298

constellation() 299

cross() 301

fspot() 302

ifc_tran() 305

ispec_tran() 306

pfc_tran() 307

pspec_tran() 308

step() 309

vfc_tran() 310

vspec_tran() 311

vt_tran() 312

This chapter describes the transient analysis functions in detail. The functions are listed in alphabetical order.

Page 298: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

298 IC-CAP Expressions

8 Transient Analysis Functions

Working with Transient Data

Transient analysis produces real voltages and currents as a function of time. A single analysis produces 1- dimensional data. Sections of time- domain waveforms can be indexed by using a sequence within “[ ]”.

Page 299: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 299

constellation()

Generates the constellation diagram from Circuit Envelope, Transient, or Ptolemy simulation I and Q data.

Synopsis Const = constellation(i_data, q_data, symbol_rate, delay)

where

i_data is the in- phase component of data versus time of a single complex voltage spectral component (for example, the fundamental) (this could be a baseband signal instead, but in either case it must be real- valued versus time).

q_data is the quadrature- phase component of data versus time of a single complex voltage spectral component (for example, the fundamental) (this could be a baseband signal instead, but in either case it must be real valued versus time).

symbol_rate is the symbol rate of the modulation signal.

delay (if nonzero) throws away the first delay = N seconds of data from the constellation plot. It is also used to interpolate between simulation time points, which is necessary if the optimal symbol- sampling instant is not exactly at a simulation time point. Usually this parameter must be nonzero to generate a constellation diagram with the smallest grouping of sample points.

Examples Rotation = −0.21Vfund =vOut[1] ⋅ exp(j ⋅ Rotation)delay =1/sym_rate[0, 0] − 0.5 ⋅ tstep[0, 0]Vimag = imag(Vfund)Vreal = real(Vfund)Const = constellation(Vreal, Vimag, sym_rate[0, 0], delay)

where Rotation is a user- selectable parameter that rotates the constellation by that many radians, and vOut is the named connection at a node. The parameter delay can be a numeric value, or in this case an equation using sym_rate, the symbol rate of the modulated signal, and tstep, the time step of the simulation. If these equations are to be used in a Data Display window, sym_rate and tstep must be defined by means of a variable (VAR) component, and they must be

Page 300: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

300 IC-CAP Expressions

8 Transient Analysis Functions

passed into the dataset as follows: Make the parameter Other visible on the Envelope simulation component, and edit it so that

Other = OutVar = sym_rate OutVar = tstep

In some cases, it may be necessary to experiment with the value of delay to get the constellation diagram with the tightest points.

Defined in $ICCAP_ROOT/expressions/ael/digital_wireless_fun.ael

Notes/Equations

Used in Constellation diagram generation.

The I and Q data do not need to be baseband waveforms. For example, they could be the in- phase (real or I) and quadrature- phase (imaginary or Q) part of a modulated carrier. The user must supply the I and Q waveforms versus time, as well as the symbol rate. A delay parameter is optional.

NOTE vOut is a named connection on the schematic. Assuming that a Circuit Envelope simulation was run, vOut is output to the dataset as a two-dimensional matrix. The first dimension is time, and there is a value for each time point in the simulation. The second dimension is frequency, and there is a value for each fundamental frequency, each harmonic, and each mixing term in the analysis, as well as the baseband term.

vOut[1] is the equivalent of vOut[::, 1], and specifies all time points at the lowest non-baseband frequency (the fundamental analysis frequency, unless a multitone analysis has been run and there are mixing products).

Page 301: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 301

cross()

Computes the zero crossings of a signal and the interval between successive zero crossings. The independent axis returns the time when the crossing occurred. The dependent axis returns the time interval since the last crossing.

Synopsis cross(signal, direction)

If direction = +1, compute positive going zero crossings.

If direction = - 1, compute negative going zero crossings.

If direction = 0, compute all zero crossings (default).

Examples period=cross(vosc-2.0, 1)

This computes the period of each cycle of the vosc signal. The period is measured from each positive- going transition through 2.0V.

Defined In Built in

Page 302: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

302 IC-CAP Expressions

8 Transient Analysis Functions

fspot()

Performs a single- frequency time- to- frequency transform.

Synopsis fspot(x{, fund, harm, windowType, windowConst, interpOrder, tstart})

See detailed Notes/ Equations below.

Examples The following example equations assume that a transient simulation was performed from 0 to 5 ns on a 1- GHz- plus- harmonics signal called vOut:fspot(vOut)

returns the 200- MHz component, integrated from 0 to 5 ns.fspot(vOut, , 5)

returns the 1- GHz component, integrated from 0 to 5 ns.fspot(vOut, 1GHz, 1)

returns the 1- GHz component, integrated from 4 to 5 ns.fspot(vOut, 0.5GHz, 2, , , , 2.5ns)

returns the 1- GHz component, integrated from 2.5 to 4.5 ns.fspot(vOut, 0.25GHz, 4, "Kaiser")

returns the 1- GHz component, integrated from 1 to 5 ns, after applying the default Kaiser window to this range of data.

fspot(vOut, 0.25GHz, 4, 3, 2.0)

returns the 1- GHz component, integrated from 1 to 5 ns, after applying a Gaussian window with a constant of 2.0 to this range of data.

Defined in Built in

See also “fft()” on page 134

Notes/Equations

fspot(x) returns the discrete Fourier transform of the vector x evaluated at one specific frequency. The value returned is the peak component, and it is complex. The harmth harmonic of the fundamental frequency fund is obtained from the vector x. The Fourier transform is applied from time tstop–1/fund to tstop, where tstop is the last timepoint in x.

When x is a multidimensional vector, the transform is evaluated for each vector in the specified dimension. For example, if x is a matrix, then fspot(x) applies the transform to every row of the

Page 303: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 303

matrix. If x is three dimensional, then fspot(x) is applied in the lowest dimension over the remaining two dimensions. The dimension over which to apply the transform may be specified by dim; the default is the lowest dimension (dim=1). x must be numeric. It will typically be data from a transient, signal processing, or envelope analysis.

fund must be greater than zero. It is used to specify the period 1/fund for the Fourier transform. fund defaults to a period that matches the length of the independent axis of x.

harm may be any positive number. harm defaults to 1. Specifying harm=0 will compute the DC component of x.

The data to be transformed may be windowed. The window is specified by windowType, with an optional window constant windowConst. The window types and their default constants are:

0 = None

1 = Hamming 0.54

2 = Hanning 0.50

3 = Gaussian 0.75

4 = Kaiser 7.865

5 = 8510 6.0

6 = Blackman

7 = Blackman- Harris

windowType can be specified either by the number or by the name.

By default, the transform is performed at the end of the data from tstop- 1/fund to tstop. By using tstart, the transform can be started at some other point in the data. The transform will then be performed from tstart to tstart+1/fund.

Unlike with fft or fs, the data to be transformed are not zero padded or resampled. fspot works directly on the data as specified, including nonuniformly sampled data from a transient simulation.

Page 304: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

304 IC-CAP Expressions

8 Transient Analysis Functions

Transient simulation uses a variable timestep and variable order algorithm. The user sets an upper limit on the allowed timestep, but the simulator will control the timestep so the local truncation error of the integration is controlled. If the Gear integration algorithm is used, the order can also be changed during simulation. fspot can use all of this information when performing the Fourier transform. The time data are not resampled; the Fourier integration is performed from timestep to timestep of the original data.

When the order varies, the Fourier integration will adjust the order of the polynomial it uses to compute the shape of the data between timepoints.

This variable order integration depends on the presence of a special dependent variable, tranorder, which is output by the transient simulator. If this variable is not present, or if the user wishes to override the interpolation scheme, then interpOrder may be set to a nonzero value:

1 = use only linear interpolation

2 = use quadratic interpolation

3 = use cubic polynomial interpolation

Only polynomials of degree one to three are supported. The polynomial is fit because time domain data are obtained by integrating forward from zero; previous data are used to determine future data, but future data can never be used to modify past data.

Page 305: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 305

ifc_tran()

Returns frequency- selective current in Transient analysis.

Synopsis y = ifc_tran(iOut, fundFreq, harmNum)

where

iOut is the current through a branch.

fundFreq is the fundamental frequency.

harmNum is the harmonic number of the fundamental frequency (positive integer value only).

Examples y = ifc_tran(I_Probe1.i, 1GHz, 1)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “pfc_tran()” on page 307, “vfc_tran()” on page 310

Notes/Equations

This measurement gives RMS current, in current units, for a specified branch at a particular frequency of interest. fundFreq determines the portion of the time- domain waveform to be converted to the frequency domain. This is typically one full period corresponding to the lowest frequency in the waveform. harmNum is the harmonic number of the fundamental frequency at which the current is requested.

Page 306: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

306 IC-CAP Expressions

8 Transient Analysis Functions

ispec_tran()

Returns current spectrum.

Synopsis y = ispec_tran(iOut, fundFreq, numHarm)

where

iOut is the current through a branch.

fundFreq is the fundamental frequency value.

numHarm is the number of harmonics of fundamental frequency (positive integer value only).

Examples y = ispec_tran(I_Probe1.i, 1GHz, 8)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “pspec_tran()” on page 308, “vspec_tran()” on page 311

Notes/Equations

This measurement gives a current spectrum for a specified branch. The measurement gives a set of RMS current values at each frequency. fundFreq determines the portion of the time- domain waveform to be converted to frequency domain. This is typically one full period corresponding to the lowest frequency in the waveform. numHarm is the number of harmonics of fundamental frequency to be included in the currents spectrum.

Page 307: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 307

pfc_tran()

Returns frequency- selective power.

Synopsis y = pfc_tran(vPlus, vMinus, iOut, fundFreq, harmNum)

where

vPlus and vMinus are the voltages at the positive terminals.

iOut is the current through a branch measured for power calculation.

fundFreq is fundamental frequency.

harmNum is the harmonic number of the fundamental frequency (positive integer value only).

Examples a = pfc_tran(v1, v2, I_Probe1.i, 1GHz, 1)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ifc_tran()” on page 305, “vfc_tran()” on page 310

Notes/Equations

This measurement gives RMS power, delivered to any part of the circuit at a particular frequency of interest. fundFreq determines the portion of the time- domain waveform to be converted to frequency domain. This is typically one full period corresponding to the lowest frequency in the waveform. harmNum is the harmonic number of the fundamental frequency at which the power is requested.

Page 308: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

308 IC-CAP Expressions

8 Transient Analysis Functions

pspec_tran()

Returns transient power spectrum.

Synopsis y = pspec_tran(vPlus, vMinus, iOut, fundFreq, numHarm)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

iOut is the current through a branch measured for power calculation.

fundFreq is the fundamental frequency.

numHarm is the number of harmonics of the fundamental frequency (positive integer value only).

Examples a = pspec_tran(v1, v2, I_Probe1.i, 1GHz, 8)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ispec_tran()” on page 306, “vspec_tran()” on page 311

Notes/Equations

This measurement gives a power spectrum, delivered to any part of the circuit. The measurement gives a set of RMS power values at each frequency. fundFreq is the fundamental frequency determines the portion of the time- domain waveform to be converted to frequency domain (typically one full period corresponding to the lowest frequency in the waveform). numHarm is the number of harmonics of the fundamental frequency to be included in the power spectrum.

Page 309: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 309

step()

A step function that returns 0, 5, or 1. Returns: 0 if the argument < 0, .5 if argument == 0, or 1 if the argument > 0.

Synopsis y= step(x)

where x is any integer, real, or complex number.

Examples a = step(-1.5)

returns 0.000a = step(0)

returns 0.500a = step(1.5)

returns 1.000

Defined in built in

Page 310: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

310 IC-CAP Expressions

8 Transient Analysis Functions

vfc_tran()

Returns the transient frequency- selective voltage.

Synopsis y = vfc_tran(vPlus, vMinus, fundFreq, harmNum)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

fundFreq is the fundamental frequency.

harmNum is the harmonic number of the fundamental.

Examples a = vfc_tran(vOut, 0, 1GHz, 1)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ifc_tran()” on page 305, “pfc_tran()” on page 307

Notes/Equations

This measurement gives the RMS voltage across any two nodes at a particular frequency of interest. The fundamental frequency determines the portion of the time- domain waveform to be converted to frequency domain. This is typically one full period corresponding to the lowest frequency in the waveform. The harmonic number is the fundamental frequency at which the voltage is requested (positive integer value only).

Page 311: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Transient Analysis Functions 8

IC-CAP Expressions 311

vspec_tran()

Returns the transient voltage spectrum.

Synopsis y = vspec_tran(vPlus, vMinus, fundFreq, numHarm)

where

vPlus and vMinus are the voltages at the positive and negative terminals.

fundFreq is the fundamental frequency.

numHarm is the number of harmonics of the fundamental frequency (positive integer value only).

Examples a = vspec_tran(v1, v2, 1GHz, 8)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “ispec_tran()” on page 306, “pspec_tran()” on page 308

Notes/Equations

This measurement gives a voltage spectrum across any two nodes. The measurement gives a set of RMS voltages at each frequency. The fundamental frequency determines the portion of the time- domain waveform to be converted to the frequency domain. This is typically one full period corresponding to the lowest frequency in the waveform. numHarm is the number of harmonics of the fundamental frequency to be included in the voltage spectrum.

Page 312: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

312 IC-CAP Expressions

8 Transient Analysis Functions

vt_tran()

This measurement produces a transient time- domain voltage waveform for specified nodes. vPlus and vMinus are the nodes across which the voltage is measured.

Synopsis y = vt_tran(vPlus, vMinus)

where vPlus and vMinus are the terminals across which the voltage is measured.

Examples a = vt_tran(v1, v2)

Defined in $ICCAP_ROOT/expressions/ael/circuit_fun.ael

See also “vt()” on page 93

Page 313: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Index

Aabcdtoh, 203abcdtos, 204abcdtoy, 205abcdtoz, 206abs, 97acos, 98acosh, 99acot, 100acoth, 101add_rf, 188alphabetical list of functions, 30asin, 102asinh, 103atan, 104atan2, 105atanh, 106

Bbandwidth_func, 207ber_pi4dqpsk, 189ber_qpsk, 191build_subrange, 37built-in constants, 19

Ccarr_to_im, 67case sensitivity, 18cdf, 278cdrange, 68ceil, 107center_freq, 208chop, 38chr, 39cint, 108circle, 40cmplx, 109collapse, 41complex, 110

IC-CAP Expressions

conditional expressions, 21conj, 111constellation, 299contour, 42contour_polar, 44convBin, 112convHex, 113convInt, 114convOct, 115cos, 116cosh, 117cot, 118coth, 119cross, 301cross_corr, 279cum_prod, 120cum_sum, 121

Ddata

access functions, 35generating, 23harmonic balance, 66transient, 298

db, 122dbm, 123dbmtow, 125dc_to_rf, 69deg, 126dev_lin_phase, 209diagonal, 127diff, 128

Eerf, 129erfc, 130erfcinv, 131erfinv, 132exp, 133expand, 45

expressions, alphabetic list, 30eye, 193eye_amplitude, 194eye_closure, 195eye_fall_time, 196eye_height, 197eye_rise_time, 198

Ffft, 134find, 46find_index, 47fix, 135float, 136floor, 137fspot, 302fun_2d_outer, 48functions

alphabetic list, 30data access, 35harmonic balance, 65math, 95signal processing, 187S-parameter analysis, 201statistical analysis, 277transient analysis, 297

Gga_circle, 210gain_comp, 212generate, 49generating data, 23get, 50get_attr, 50get_indep_values, 51gl_circle, 213gp_circle, 215gs_circle, 217

313

Page 314: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Index

Hharmonic balance data, 66harmonic balance functions, 65histogram, 280histogram_multiDim, 282histogram_sens, 283histogram_stat, 284htoabcd, 219htos, 220htoy, 221htoz, 222

Iidentity, 138ifc, 70ifc_tran, 305if-then-else construct, 21im, 139imag, 140indep, 52Indexing, 26int, 141integrate, 142interp, 143inverse, 144ip3_in, 71ip3_out, 72ipn, 73ispec_tran, 306it, 74

Jjn, 145

Ll_stab_circle, 223l_stab_circle_radius, 224l_stab_region, 225list of functions, 30ln, 146log, 147log10, 148lognorm_dist_inv1D, 285lognorm_dist1D, 286

Mmag, 149map1_circle, 226map2_circle, 227math functions, 95Matrices, 25max, 150max_gain, 228max_index, 53max_outer, 151max2, 152mean, 153mean_outer, 154measurement expressions list, 30median, 155min, 156min_index, 54min_outer, 157min2, 158mix, 75moving_average, 287mu, 229mu_prime, 230multidimensional sweeps, 26

Nnorm_dist_inv1D, 288norm_dist1D, 289norms_dist_inv1D, 290norms_dist1D, 291ns_circle, 231ns_pwr_int, 233ns_pwr_ref_bw, 234num, 159

Oones, 160Operator Precedence, 20

Ppae, 76pdf, 292permute, 55pfc, 77pfc_tran, 307

phase, 161phase_comp, 162phase_gain, 78phasedeg, 163phaserad, 164plot_vs, 56polar, 165pow, 166prod, 167pspec, 79pspec_tran, 308pt, 80pwr_gain, 235

Rrad, 168re, 169real, 170remove_noise, 81ripple, 236rms, 171round, 172

Ss_stab_circle, 237s_stab_circle_center_radius, 238s_stab_region, 239set_attr, 57sfdr, 82sgn, 173signal processing functions, 187sin, 174sinc, 175sinh, 176size, 58sm_gamma1, 240sm_gamma2, 241sm_y1, 242sm_y2, 243sm_z1, 244sm_z2, 245snr, 84sort, 59S-parameter analysis functions, 201S-parameters, 25spec_power, 199spur_track, 85

314

IC-CAP Expressions
Page 315: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

Index

spur_track_with_if, 87sqrt, 177stab_fact, 246stab_meas, 247Stability, 229, 230, 246, 247statistical analysis functions, 277stddev, 293step, 309stoabcd, 248stoh, 249stos, 250stot, 251stoy, 252stoz, 253sum, 178sweep_dim, 60sweep_size, 61

Ttan, 179tanh, 180tdr_sp_gamma, 254tdr_sp_imped, 255tdr_step_imped, 256transient analysis functions, 297transient data, 298transpose, 181ts, 89ttos, 257type, 62

Uuniform_dist_inv1D, 294uniform_dist1D, 295unilateral_figure, 258unwrap, 182user-defined functions, 27

VVariable Names, 18vfc, 91vfc_tran, 310volt_gain, 259volt_gain_max, 261vs, 63vspec, 92, 311

vswr, 262vt, 93vt_tran, 312

Wwhat, 64write_snp, 263wtodbm, 183

Xxor, 184

Yyield_sens, 296yin, 265yopt, 266ytoabcd, 267ytoh, 268ytos, 269ytoz, 270

Zzeros, 185zin, 271zopt, 272ztoabcd, 273ztoh, 274ztos, 275ztoy, 276

IC-CAP Expressions

315
Page 316: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

316 IC-CAP Expressions

Index

Page 317: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

专注于微波、射频、天线设计人才的培养 易迪拓培训 网址:http://www.edatop.com

A D S 视 频 培 训 课 程 推 荐

ADS–Advanced Design System 是由原美国安捷伦科技(现更名为是德科技)推出的微波射频电路、

通信系统和 MMIC/RFIC 仿真设计软件,其功能强大、应用广泛,被国内高校、科研院所和大型科技

公司使用广为使用。掌握 ADS 无疑能提升相关设计领域工程师的技术实力、提高工作效率。

为了帮助工程技术人员更好、更快的学习掌握 ADS 的使用,易迪拓培训(www.edatop.com)特聘多

年 ADS 使用经验的资深专家精心制作推出了多套 ADS 视频培训课程,由浅入深、全面系统地讲授了

ADS 在微波射频电路设计、通信系统设计和电磁仿真设计方面的仿真设计和应用操作。其中,视频课

程多以设计实例边操作边讲解,工程实践强,且直观易学,能够帮助您在最短的时间内学会使用 ADS,

并把 ADS 真正应用到设计研发工作中去...

ADS 学习培训课程套装

该套装是易迪拓培训和微波 EDA 网联合推出的迄今为止国内最全面、最

权威的 ADS 培训教程,共包含 10 门 ADS 学习培训课程。课程是由具有

多年 ADS 使用经验的微波射频与通信系统设计领域资深专家讲解,并多

结合设计实例,由浅入深、详细而又全面地讲解了 ADS 在微波射频电路

设计、通信系统设计和电磁仿真设计方面的内容。能让您在最短的时间

内学会使用 ADS,迅速提升个人技术能力,把 ADS 真正应用到实际研发

工作中去,成为 ADS 设计专家...

课程网址: http://www.edatop.com/peixun/ads/13.html

更多 ADS 视频培训课程:

两周学会 ADS — 中文视频培训教程

最新版 ADS 的入门和进阶培训课程,适合 ADS2011 ~ ADS2014 以及更新版本 ADS 的学习。是

ADS 初学者的最佳课程,网址:http://www.edatop.com/peixun/ads/14.html

ADS 射频模拟电路设计详解 — 中文视频教程

本课程基于新版的 ADS 软件,由李明洋老师讲授,讲解了 ADS 在微波射频模拟电路设计中的具

体应用,视频课程,直观易学,网址:http://www.edatop.com/peixun/ads/15.html

ADS 高低阻抗线微带滤波器设计(ADS2014 版)— 中文视频教程

该门课程旨在帮助学员快速、全面、透彻地理解高低阻抗线微带滤波器的设计原理和设计步骤,

帮助学员学会并掌握使用 ADS 软件仿真分析和优化设计微带线滤波器的实际操作;课程网址:

http://www.edatop.com/peixun/filter/128.html

更多 ADS 培训课程,敬请浏览:http://www.edatop.com/peixun/ads

Page 318: Agilent 85190A IC-CAP 2004dl.edatop.com/mte/ads/edatop.com_ADS所有函数.pdf · Use the following guidelines when creating measurement expressions: • Measurement expressions are

`

专注于微波、射频、天线设计人才的培养 易迪拓培训 网址:http://www.edatop.com

关于易迪拓培训:

易迪拓培训(www.edatop.com)由数名来自于研发第一线的资深工程师发起成立,一直致力和专注

于微波、射频、天线设计研发人才的培养;后于 2006 年整合合并微波 EDA 网(www.mweda.com),

现已发展成为国内最大的微波射频和天线设计人才培养基地,成功推出多套微波射频以及天线设计相

关培训课程和 ADS、HFSS 等专业软件使用培训课程,广受客户好评;并先后与人民邮电出版社、电

子工业出版社合作出版了多本专业图书,帮助数万名工程师提升了专业技术能力。客户遍布中兴通讯、

研通高频、埃威航电、国人通信等多家国内知名公司,以及台湾工业技术研究院、永业科技、全一电

子等多家台湾地区企业。

我们的课程优势:

※ 成立于 2004 年,10 多年丰富的行业经验

※ 一直专注于微波射频和天线设计工程师的培养,更了解该行业对人才的要求

※ 视频课程、既能达到现场培训的效果,又能免除您舟车劳顿的辛苦,学习工作两不误

※ 经验丰富的一线资深工程师讲授,结合实际工程案例,直观、实用、易学

联系我们:

※ 易迪拓培训官网:http://www.edatop.com

※ 微波 EDA 网:http://www.mweda.com

※ 官方淘宝店:http://shop36920890.taobao.com

专注于微波、射频、天线设计人才的培养

官方网址:http://www.edatop.com 易迪拓培训 淘宝网店:http://shop36920890.taobao.com