eval_controlled_pwl()

Evaluates the piece-wise linear response of system when supplied with N pairs of data points in vector format

Syntax
eval_controlled_pwl( pwlvector, xin, [stretch], [scale] ) where pwlvector is a list( in1, out1, ..., inN, outN)

Arguments
Name Description Range Type Default Required
pwlvector list of pairs of datapoints defining corners of the PWL function list of (-∞, ∞) † † † integer, real † † yes
xin scalar input signal (-∞, ∞) integer, real, complex yes
stretch used for scaling input signal prior to PWL computation (-∞, 0) U (0, ∞) integer, real 1.0 no
scale used for scaling output signal following PWL computation (-∞, ∞) integer, real 1.0 no
† At least one pair of data points should be supplied. † † Only scalar inputs should be supplied. † † † First element should always be listed. If Ith element is listed then (I-1)th element should also be explicitly listed

Examples

The response of a system described by the three-point PWL vector
list( in 1 , out 1 , in 2 , out 2 , in 3 , out 3 ) to input xin , stretch , and scale is
xout = eval_controlled_pwl( list(in 1 , out 1 , in 2 , out 2 , in 3 , out 3 ), xin, stretch, scale )

Notes/Equations
  1. This function exists in ADS primarily to emulate the behavior of piece-wise linear (PWL) behavior of single input, single output controlled voltage and current sources of the Cadence Spectre library. For further information about the sources cccs , ccvs , vccs , and vcvs , see the Cadence Spectre simulator's analog library documentation.
  2. This function supports PWL values either directly in list() or indirectly in file format. For PWL files, the following approach is recommended to create a list-based entry for the SYM function:
    pwlData = read_data("file","<pwlvector_filename>","sppwl")
    pwlIn = dstoarray(pwlData,"inputPWL")
    pwlOut = dstoarray(pwlData,"outputPWL")
    xout = eval_controlled_pwl(list(pwlIn, pwlOut), xin[, stretch[, scale]])
    In this case the list() function concatenates the two vectors pwlIn and pwlOut by interleaving the values as expected by eval_controlled_pwl().
    A PWL file is a simple ASCII data file containing two columns, for input and output values marking corner points of the function. This file may contain comment lines preceded by the ";" character. No explicit format information is expected from such a file. An example of a PWL file is:
    ; PWLfile
    ; Input Output
    2 4.0
    3 -1.0
    -1 3.0
    The file contents are equivalent to
    list( 2, 4.0, 3, -1.0, -1, 3.0 ) Data points may be supplied out of order in either list or file format. The function automatically checks for duplicate points, which it tolerates, for ambiguity, such as one-to-many input-output mapping causing an error when encountered.
  3. Default value of stretch is 1.0, but if a value is supplied and found to be too close to zero, its effective value is limited to a small non-zero number. This prevents interpolation errors due to infinitesimal shrinkage of input xin by the stretch factor. It ensures that xin ~ is truly 0.0 only when xin is 0.0.
  4. Only the real part of a complex input variable is affected by the PWL. The imaginary part merely gets stretched and scaled.
 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources