SystemVue 2020.1 Users Guide
SystemVue 2020.1 Users Guide
SystemVue 2010.01
2010
Users Guide
1
SystemVue - Users Guide
Errata The SystemVue 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 functionality
and to maintain backward compatibility for our customers, we did not change all the
names and labels that contain "HP" or "HPEESOF" references.
Warranty The material contained in this document is provided "as is", and is subject to
being changed, without notice, in future editions. Further, to the maximum 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 particular purpose. Agilent
shall not be liable for errors or for incidental or consequential damages in connection with
the furnishing, use, or performance 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 separate 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 accordance with the terms of
such license.
Portions of this product is derivative work based on the University of California Ptolemy
Software System.
In no event shall the University of California be liable to any party for direct, indirect,
special, incidental, or consequential damages arising out of the use of this software and its
documentation, even if the University of California has been advised of the possibility of
such damage.
The University of California specifically disclaims any warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a particular purpose. The
software provided hereunder is on an "as is" basis and the University of California has no
obligation to provide maintenance, support, updates, enhancements, or modifications.
Portions of this product include code developed at the University of Maryland, for these
portions the following notice applies.
In no event shall the University of Maryland be liable to any party for direct, indirect,
special, incidental, or consequential damages arising out of the use of this software and its
documentation, even if the University of Maryland has been advised of the possibility of
such damage.
The University of Maryland specifically disclaims any warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a particular purpose. the
software provided hereunder is on an "as is" basis, and the University of Maryland has no
2
SystemVue - Users Guide
obligation to provide maintenance, support, updates, enhancements, or modifications.
Portions of this product include the SystemC software licensed under Open Source terms,
which are available for download at http://systemc.org/ . This software is redistributed by
Agilent. The Contributors of the SystemC software provide this software "as is" and offer
no warranty of any kind, express or implied, including without limitation warranties or
conditions or title and non-infringement, and implied warranties or conditions
merchantability and fitness for a particular purpose. Contributors shall not be liable for
any damages of any kind including without limitation direct, indirect, special, incidental
and consequential damages, such as lost profits. Any provisions that differ from this
disclaimer are offered by Agilent only.
With respect to the portion of the Licensed Materials that describes the software and
provides instructions concerning its operation and related matters, "use" includes the right
to download and print such materials solely for the purpose described above.
3
SystemVue - Users Guide
The SystemVue Environment . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
What the SystemVue Design Environment Looks Like . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Workspace Tree . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Part Selector . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Library Selector . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Simulation Status Window . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Using the Status Bar . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Simulation Log . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Setting Global Options for SystemVue . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
To set Global Options . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Appearance Options Tab . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Default Units Options Tab . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Directories Options Tab . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
General . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Graph Options Tab . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Schematic Options Tab . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Startup Options Tab . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Creating Annotations . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Line Annotations . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Text Annotations . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Button Annotations (Widgets) . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Slider Annotations (Widgets) . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Variable Selector . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Specific Types of Designs . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Creating a Design . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Modifying a Design . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Design Properties . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Filter Designer . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Filter Specification Window . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Coefficients Display Window . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Response Plots . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
FIR Filter Design . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
IIR Filter Design . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Hierarchy in Equations . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Automatic Calculation . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Using Math Language . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Debugging Equations . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Math Language Function Reference . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
acos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
acosd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
acosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
acot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
acotd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
acoth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
acsc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
acscd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
acsch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
alignsignals . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
any . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
asec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
asecd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4
SystemVue - Users Guide
asech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
asin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
asind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
asinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
atan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
atan2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
atand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
atanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
awgn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
bartlett . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
berawgn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
bi2de . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
bilinear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
biterr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
blackman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
bsc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
butter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
buttord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
ceil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
cheb1ord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
cheb2ord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
cheby1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
cheby2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
clc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
conj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
conv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
convdeintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
convenc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
convintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
cos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
cosd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
cosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
cot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
cotd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
coth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
crcdec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
crcenc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
csc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
cscd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
csch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
cumprod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
cumsum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
dbg_print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
dbg_showvar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
de2bi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
dec2hex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
decimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
deconv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
deintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
depuncture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
diag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
diff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
downsample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
eig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
ellip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
eps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
erf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
erfc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
exist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
exp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5
SystemVue - Users Guide
eye . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
eyediag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
fclose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
fft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
fftfilt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
fftshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
fgetl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
fgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
finddelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
findstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
fir1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
flipdim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
fliplr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
flipud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
floor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
fopen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
fprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
fread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
fscanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
fwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
gaussfir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
gausswin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
getindep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
getindepvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
getunits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
getvariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
hamming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
hankel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
hann . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
hex2dec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
hilbert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
histc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
ifft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
ifftshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
imag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
inf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
interp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
interp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
intrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
ipermute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
iscell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
ischar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
isempty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
isequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
isequalwithequalnans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
isfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
isfinite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
isfloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
isinf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
isinteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
islogical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
isnan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
isnumeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
isreal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
isscalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
isstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
isstruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
isvector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
kaiser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
kurtosis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
6
SystemVue - Users Guide
linspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
log2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
log10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
logspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
lp2bp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
lp2bs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
lp2hp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
lp2lp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
lu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
matdeintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
matintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
mean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
median . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
mkdir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
mkpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
mod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
moment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
muxdeintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
muxintrlv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
NaN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
ndims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
false . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
nextpow2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
noisebw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
num2str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
numel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
oct2dec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
ones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
pchip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
permute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
phasedelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
phasez . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
poly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
poly2trellis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
polyval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
polyvalm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
true . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
ppval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
prctile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
prod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
puncture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
qfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
qfuncinv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
quantile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
rand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
randerr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
randint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
randn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
randsrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
readvector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
rectpulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
rectwin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
rem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
repmat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
reshape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
rot90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
round . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
7
SystemVue - Users Guide
rsdec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
rsenc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
runanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
sec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
secd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
sech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
setindep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
setunits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
setvariable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
sftrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
shiftdim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
sin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
sinc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
sind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
sinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
skewness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
spline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
sqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
sscanf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
std . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
str2num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
strcmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
strcmpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
strfind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
strncmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
strncmpi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
strtok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
svd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
symerr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
tan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
tand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
tcpip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
tic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
toc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
toeplitz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
triang . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
turbodec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
turboenc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
unmkpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
upfirdn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
upsample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
using . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
var . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
vec2mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
vitdec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
wgn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
xcorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
xor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Using Math Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Cell Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Examining Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Creating Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Creating Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Using Dataset Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
8
SystemVue - Users Guide
Using Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Importing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Creating Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Graph Menu (users) and Graph Toolbar (users) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Graph Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Changing Graph Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Graph Properties Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Graph Series Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Wizard Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Types of Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Rectangular Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Polar Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Using Markers on Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Adding Markers to Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Marker Styles (Peak, Valley, etc.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Placing a Marker on a Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Naming Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Graph Marker Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Customizing Graphs and Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Importing Data Files Using SystemVue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
To import a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Exporting Files Using SystemVue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Export a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Instrument Scripting and Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
A Simple Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
How to Run the Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Example of a more Advanced Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
LiveReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Creating a LiveReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Supported LiveReport Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Adding a View Window to a LiveReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Removing a Window from a LiveReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Arranging Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
LiveReport Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Managing Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Using the Library Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Creating Custom Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Adding Library Items to Your Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Nets, Connection Lines and Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Part Ports (Terminals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Connection Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Connection Line Net Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Connection Lines and Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Mapping Nets to Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Connecting Parts in SystemVue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Parts, Models and Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Mapping Symbols to Models in Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Finding Symbols and Models during Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Running Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Creating Script Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Script Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Script Verbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Using Scripts in Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
VBBrowser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Example: Running a Script from Microsoft Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
9
SystemVue - Users Guide
Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 314
Creating a Simple Schematic . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 314
Placing Parts on a Schematic . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 315
Manipulating Parts . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 317
Modifying Part Parameters On the Schematic . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 319
Changing the Schematic View . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 319
Title Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 320
Annotating Schematics . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 322
Using S-Parameters in SystemVue (RF Design Kit) ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
Creating S-Parameter Data . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
Using S-Parameters in a Simulation . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
File Based S-Parameters . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
Displaying S-Parameter Data . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
Physical S-Parameters . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 324
Touchstone Format . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 325
Sweeps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 327
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 330
Creating Tables . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 330
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 331
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 332
Selecting a SystemVue Template . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 332
Reviewing the SystemVue Templates . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 333
Tuning Variables . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 334
Making a part parameter tunable . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 335
Actually changing a value . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 336
Specifying how values are tuned up/down . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 337
Tuning Options . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 338
Adjusting the Value of Tuning Options . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 338
Setting Tuned Values . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 338
Quicker Tuning: don't tune more than you need ........ . . . . . . . . . . . . . . . . . . . . . . . . . 338
Reverting Tuned Values . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 340
Checkpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 341
Gang Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 342
User Defined Models . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 343
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 343
Creating a Custom C++ Model Library . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 344
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 344
Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 345
Defining the Model Library Properties . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 345
Writing C++ Models for Code Generation . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 346
Writing Data Flow C++ Models . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 347
Writing Header file for the C++ Class . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 347
Writing cpp file for the C++ Class . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 347
Building your first Custom C++ Model Library . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 353
Setting Up a New Visual Studio Project . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 353
Adding a new Model to the Project . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 354
Using the Model in SystemVue . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 356
Loading and Debugging a C++ Model Library . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 357
Loading a C++ Model Library . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 357
Debugging Data Flow C++ Models . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 357
Making Changes in C++ Model while SystemVue is Running . . . . . . . . . . . . . . . . . . . . . . . . . 359
Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 360
Compiling the Example Visual Studio Project . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 360
Loading the Custom Library into SystemVue . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 360
Simulating the Example WorkSpace . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 360
Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 363
Supported Data Types . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 364
Data Types Used as Parameters . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 364
Data Types Used as Inputs/Outputs . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 364
SystemVue FixedPoint Data Type . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 368
SystemVue Matrix Data Type . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 371
SystemVue Envelope Signal Data Type . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 373
Sub-Network Models . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 375
Roles of Sub-Network Model Attributes . . . . . . ........ . . . . . . . . . . . . . . . . . . . . . . . . . 375
10
SystemVue - Users Guide
Creating a Parameterized Sub-Network Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Run-time Hierarchy - How Parameters get passed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
SystemVue 2007 APG DLL Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
SystemVue 2007 MetaSystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Building a SystemVue 2007 APG DLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Importing a SystemVue 2007 APG DLL into SystemVue . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
Using X-Parameters in SystemVue (RF Design Kit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Validation Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Performance Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Operational Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Getting X-Parameters into the Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Using X-Parameters in a Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Using DC Bias Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Using X-Parameters in Spectrasys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Using X-Parameters in the Circuit Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Using X-Parameters in the RF Link (RF Design Kit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Convergence Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Appendix A - Keystroke Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
General Keystroke Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Graph Keystroke Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
LiveReport Keystroke Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Schematic Keystroke Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Appendix B - Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Action Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Equations Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Graph Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
See Also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
LiveReport Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Notes Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
PartList Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Schematic Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Scripts Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Tools Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
View Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
Window Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
Appendix C - Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Annotation Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Dataset Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Equations Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Graph Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
LiveReport Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Main Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Notes Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Schematic Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Script Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Spectrasys Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
11
SystemVue - Users Guide
You might want to view some of the videos listed in the New Users section, even if you're
an experienced user. They are typically short and cover some of the most useful
convenience and quick-start topics.
Click Close to go to the Start Page - a nice way to access the many capabilities of
SystemVue. When you start editing workspaces the top box will fill. To start afresh, select
from a template or perhaps synthesize a design or open one of our many examples.
Note: The don't show me this again checkbox will hide this dialog box.
This is a general SystemVue feature. If a window has this option (and it's checked), the window will not
be shown in the future. In addition, it remembers your response when it is closed: OK, Cancel, Yes, or No.
The response will be used automatically, instead of showing the window. All "Don't show me this again"
checkboxes can be re-enabled in Tools / Options / Start up.
12
SystemVue - Users Guide
Click the Start Page button, (the first button in the main toolbar) to open this dialog
anytime.
13
SystemVue - Users Guide
or like this...
14
SystemVue - Users Guide
We show you the second environment by default so you know what is available and what
it looks like. In the design area, an un-maximized window can be re-sized by clicking on a
boundary and dragging it. Three buttons on the right of the title bar control a design
window's viewability. Click on to minimize the window. Click on to maximize the
window. Click on to remove the window.
Also, it's easy to switch to a tabbed window view, by using the Window Menu (users).
Note the view window tabs at the top of the graph:
15
SystemVue - Users Guide
As you click inside each design window, the toolbar for that window will appear and may
replace toolbars from the previous design window. You can move or dock toolbars
anywhere in SystemVue by grabbing the bar on the left and moving it (if docked) or
grabbing the title bar (if floating). If a design window is active (selected) among several
windows, its title bar becomes dark blue. The above examples show different toolbars to
the left of the main toolbar.
If you re-size or maximize a window, the contents will grow (or shrink) adjusting to the
new window size. Notes will reformat. Graphs print full-page and schematics print
according to their defined physical sizes (using shrink to fit if the page will not fit on the
paper).
Design windows are special in that they can show multiple views of itself, so you can see
the partlist in one tab, the schematic in another and the layout in yet a third tab. Right
16
SystemVue - Users Guide
click on the window and select the tab option to get another view of the design.
Menus
The SystemVue menus are located on the menu bar at the top of the SystemVue window.
There are several menus that appear automatically whenever SystemVue is started. These
are called default menus.
The other SystemVue menus are called object menus. They are specific to the windows in
a design and appear only when that window is active. For example, the Schematic menu is
visible only when the Schematic window is active.
For more information about all of the SystemVue menus, see Appendix B Menus (users).
Toolbars
There are many toolbars in SystemVue. The main SystemVue toolbar is referred to as a
default toolbar. The main SystemVue toolbar is shown below:
SystemVue also has a number of other toolbars called object toolbars. They are specific to
the windows in a design and appear only when that window is active. For example, the
Schematic toolbar is visible only when the Schematic window is active.
For more information about all of the SystemVue toolbars, see Appendix C Toolbars
(users).
To reposition a toolbar:
To re-size a toolbar:
Click View on the SystemVue menu and select the toolbar you want to show or hide
from the Toolbars menu.
Note
Toolbars that are currently open have a check mark next to them.
17
SystemVue - Users Guide
Click View on the SystemVue menu and select either Show All Object Toolbars or
Hide All Object Toolbars from the Toolbars menu.
Tip
Dock your toolbars in 2 rows, so that the inner window area doesn't change size every time you switch
active windows (from a graph to a schematic, etc.).
Workspace Tree
The SystemVue Workspace Tree displays a hierarchical list of items in your project such as
designs, analyses, data sets, and graphs. With it, you can add, delete, or rename items.
To use an item right-click the item and select from the menu or click and highlight the
item and then click the item menu button shown below.
You can use the Workspace Tree toolbar to perform the following tasks:
Pull down the Workspace Tree menu to adjust the Tree appearance by letting you show/hide
datasets, change the sorting order, show additional information, etc.
Get online Help.
1. Click the New Item button ( ) and select the item you want to add.
18
SystemVue - Users Guide
2. Type a name in the Name box.
3. Type a description in the Description box, if any.
4. Enter any other parameters in the properties window.
5. Click OK.
1. Right-click the item you want to delete and select Delete from the menu.
2. Click Yes.
1. Right-click the item you want to rename and select Rename from the menu.
2. Delete the current name, and then type a new name in the box.
3. Click OK.
1. Right-click the item and select the Copy To submenu. Pick a library to copy to or use
New Library to create a new library.
Part Selector
The Part Selector is a toolbar that lets you add parts to a design. It displays a list of parts
from the currently selected library. A library is a collection of objects that can be used in
SystemVue. The Part Selector only displays libraries of parts. The Library Selector is used
to display libraries of other types. Algorithm Design is the default library. You can use the
Category and Filter By features to display a subset of parts from the current library. When
you select a part, detailed information about it is displayed in the information window at
the bottom.
SystemVue provides two part selectors: A and B. Part Selector A is the default, but you
can display both part selectors at the same time. The options for viewing either part
selector are found in the View Menu (users). Having both Part Selectors open lets you
work with two libraries at once. Building a custom library of parts is easier with both Part
Selectors open, because you can set one to view the custom library of parts as you build
it.
19
SystemVue - Users Guide
You can use the Part Selector toolbar to perform the following tasks.
Select options to change the way parts display in the Part Selector window.
Manage the part libraries. Click this button to open the Library Manager.
To place a part:
1. Click a part in the Part Selector list. Notice the part details that display in the
information window.
2. Click in the Schematic window to place the part.
Click the Current Library pull-down and select a library name to display all of the
parts in that library.
Click the Library Manager button ( ) and select Library Manager to get a dialog
20
SystemVue - Users Guide
allowing you to add existing libraries.
1. Type the text for the parts you want in the Filter By box. For example, type math to
find the math function part or any parts whose names or descriptions contains that
text.
2. Click the Go button ( ) to display the parts in the Part Selector window.
Right-click the part you want to copy, and then select the name of a library from the
Copy To menu. A copy of the part is automatically placed in the new library.
Right-click the column heading and check on or off the columns you want to see.
Click a column heading to sort by that column.
Right-click the white area in the selector and select from the View submenu.
Library Selector
The Library Selector is a toolbar that gives you quick access to libraries of archived
workspace items(datasets, designs, equations, etc.). The light-yellow background of the
Library Selector distinguishes it from the Part Selector and other toolbars. It is used to
display libraries of item types such as datasets, designs, or equations.
A library is a collection of one type of object found in SystemVue. For example, a library of
equations contains a collection of Equation Blocks, and only other Equations Blocks can be
added to this library of equations. Schematic, Models, and Symbols are all considered to
be a design, and so a library of designs can contain all three of these. Libraries of parts
cannot be displayed in the Library Selector and must be viewed in the Part Selector.
The Library Selector operates for other objects much like the Part Selector operates for
parts. The Library Type sets the type of object library you want to view and the Current
Library sets to the particular library you want to display. The Filter By feature can be used
to display a subset of the Current Library. When you select an item, detailed information
about it is displayed in the information window at the bottom.
21
SystemVue - Users Guide
Double-click an item in the Library Selector list. The object is placed into your
workspace and available for editing. Note that if this is a model or symbol you are
currently using in your workspace then the in-workspace version of the
model/symbol will override the library version.
Hint
This is a great way to send self-contained workspaces to your coworkers, by embedding any custom
models or symbols (or vendor models or symbols) into the workspace itself.
Click the Library Type pulldown and select a library type to find.
To change libraries:
Click the Current Library pulldown and select a library to switch to. The Current
Library pulldown only contains libraries of the type set in Library Type.
1. Type the text for the items you want in the Filter By box. For example, in the library
shown above type rand to find the randint functionor any objects whose name or
description contains that text. The filter is applied to the part name and description.
2. Click the Go button ( ) to display the updated list.
Right-click the item in the workspace tree and select the Copy To menu to copy the
object to a library.
Right-click the column heading and check on or off the columns you want to see.
Click a column heading to sort by that column.
22
SystemVue - Users Guide
Right-click the white area in the selector and select from the View submenu.
An example sweep
The simulation status box always lies on top of SystemVue. When it is running you can
resize it and you can move and resize other SystemVue windows. You can get SystemVue
to redraw between sweeps by enabling "Redraw after each sweep". Note that this can
slow down the sweep significantly, but you will see schematics, tables, and graphs update
during the run.
The View Rate just determines how fast the dialog stays up to date while an analysis is
running. The faster the view rate the quicker the data inside the boxes updates (but of
course this also slows SystemVue down).
Error Log
The Error Log displays near the bottom of the SystemVue window and alerts you to
potential problems in your design. You can display the Error Log whenever you open
SystemVue. Or, you can have SystemVue display the Errors window only when higher-
level error messages are generated.
23
SystemVue - Users Guide
Click the Automatically Display Errors check box.
Messages always have a Show button. Click to bring up a schematic showing the
highlighted error or a dialog showing the error line. If you have an undefined error, the
Show button may do nothing.
More than one error message can come from the same part. Look at the last error in the
list (the first to get thrown) to view the root error.
An instantiation error in a model during a simulation usually means that a parameter was
bad (invalid or out of range). It might also imply the model couldn't be found or has
changed since it was last used.
It spans the width of the window and contains useful information or messages regarding
your current task. If there is no information, the default message is Ready. When an
action successfully completes, the default message is Done.
You should read the information in the status bar on a regular basis for assistance in using
the program.
Simulation Log
By default, the Simulation Log shows near the bottom of the SystemVue window.
However, it is a docking window that can float or be docked in the SystemVue window.
The content of the simulation log will depend on the simulation or evaluation that is run.
Each will show different information that ranges from a date and time run with execution
time to an output for each frequency simulated.
24
SystemVue - Users Guide
or
If the window is open click the close button (the x on the upper left) of the
Simulation Log to close the window.
25
SystemVue - Users Guide
The global default units used are listed in the table below.
Quantity Units
Angle Degrees
Capacitance pF (picofarads)
Conductance mhos (1/ohms or Siemens)
Current Amps
Frequency MHz (Megahertz)
Inductance nH (nanohenries)
Physical Length, Width, Height mm (millimeters), or based on substrate for netlist
Power dBm (referenced to a milliwatt)
Resistance ohms
Temperature C (Celsius)
Time ns (nanoseconds)
Voltage V (volts)
27
SystemVue - Users Guide
To change a path:
Note
You can edit the path directly.
General
Use the Global Options General window to select general environment options not specific
to any one area of the program.
30
SystemVue - Users Guide
Connections – Allow dragging wires enables schematic parts to be easily
connected; just place the mouse cursor over a part terminal, press the left-
button, and drag the newly-created connector to another node. Keep parts
connected ensures that schematic parts retain their electrical connections, by
inserting new wires (as necessary) when dragging parts. The Alt-key acts as a
toggle for the keep connect setting.
Scroll On Mouse Wheel – When checked, the mouse center wheel scrolls the
schematic window; when unchecked, the wheel zooms the window instead.
Factory Defaults – When clicked, this button resets all of the settings on this
page of the dialog box.
4. Click OK.
Startup Options Tab
Use the Global Options Startup window to customize start up.
31
SystemVue - Users Guide
Analysis
Circuits and systems can be analyzed in many different ways. When you simulate a circuit,
the settings for the analysis determine how the simulation runs. The analysis creates a
dataset with the simulation results. If an analysis is set to automatically recalculate it will
re-simulate each time you make a change to the schematic design and then click a graph
or table dependent on the analysis.
Data Flow (sim) - Performs a data driven analysis on data driven models.
RF Design Kit Spectrasys (sim) - Performs a system-block-level non-linear analysis
on the entire system to determine if all system-level requirements are met.
To add an analysis
1. Click the New Item button ( ) on the Workspace Tree toolbar and select an
analysis from the Analyses menu. A new analysis of the selected type will be created.
2. Alternatively, right-click the word "Designs" in the Workspace Tree, select "Add", and
then select an analysis from the Analyses menu. A new analysis of the selected type
will be created.
calculator.
A dialog box will pop up asking if you'd like to create one and if you click yes, it will
automatically add one to the tree.
32
SystemVue - Users Guide
33
SystemVue - Users Guide
Annotations
Annotations include text boxes, arrows, shapes, and controls (widgets) that can be placed
on a schematic, graph, or LiveReport to help document a workspace, highlight items of
interest, etc.
Tools
Rectangle Draw a square or rectangle.
Ellipse Draw a circle or ellipse
Polygon Draws a filled polygon or unfilled polyline.
Arrow / Draw a line or arrow. Change the arrow style by selecting a line and picking an arrow type from
Line Arrows button menu.
Arc Draw a circular arc.
Picture Insert a picture. Use this annotation to add a company logo to a graph, for example. Double-click
the new object and select a JPG, GIF, or BMP image file to be displayed. (To allow all users to see
the image, the bitmap file should reside on a network server.)
Text Place text. Text has a number of settings. Double-click a text annotation to set the horizontal and
vertical justification (text alignment). The name of the text item can be changed and shown on-
screen, which simplifies building a schematic title block.
Text Draw a text balloon. This annotation has a "tail" which can be anchored to a data point on a
Balloon graph, to the page, or not anchored (using the right-button menu).
Button Draw a user button. This annotation can be "clicked" to run a custom script, which is specified by
double-clicking the outer EDGE of the button control. (The middle of the button runs the script.)
Slider Draw a slider control. This annotation is linked to a tunable parameter and functions much like
the Tuning Window.
Settings
Fill Color Sets the annotation fill color. Use the 3 color buttons to change the colors of the selected
annotation(s). New annotations will be created using the current colors. The bottom-right color
swatch (with a diagonal slash) is transparent, which specifies an unfilled object.
Line Color Sets the annotation line / border color. The bottom-right color swatch (with a diagonal slash) is
transparent, which specifies a object with no outline.
Text Color Sets the annotation text color.
Line Set the width of borders and lines.
Thickness
Line Style Set the drawing style of borders and lines (dash pattern, etc.).
Arrows Set the arrow style of lines.
Properties Display the properties window for the selected annotation.
Creating Annotations
The Annotation button ( ) on the Schematic, LiveReport, and Graph toolbars toggles
the display of the Annotation toolbar.
The toolbar provides tools like lines, circles, and text that you can use to point out details
of interest on a schematic, draw a box around a group of components, etc.
To place an annotation:
1. Click the various settings buttons (colors, line style, etc.) to adjust the settings for
newly created annotations
2. Click an annotation tool button (box, arc, text, etc.) on the Annotation Toolbar.
3. Click in a schematic, LiveReport, or graph window to place the new annotation.
4. Use the annotation setting buttons to change existing, selected annotations. (More
than 1 annotation can be adjusted at a time.) To set the Font for annotations with
text, right-click the object and pick Font... from the pop-up menu.
Line Annotations
Lines have many drawing options: Line Thickness, style, color, arrowheads, etc., which
34
SystemVue - Users Guide
are controlled via the Annotation toolbar and by the object's right button menu. Lines can
have arrowheads and ends. Simply select a line and pick an arrow type:
Text Annotations
A text annotation is a filled rectangular box with text inside.
Text annotations can display model and parameter info when used within a custom
symbol . This is implemented via macro-text-substitution. When symbol text is drawn on
a schematic, the displayed text is modified prior to output. For example, Name=%Model%
would be displayed as "Name=Resistor" on a symbol using a resistor model. The
recognized macro strings are:
Variable Selector
(displayed via the '...' button)
37
SystemVue - Users Guide
Filter by - Limits the variables displayed to only those that include the specified text.
Variable - Displays the variable's name.
Path - Displays the full pathname of the variable.
Value - Displays the current value of the variable.
Tuned - Displays an X, if the variable is tunable.
Part parameters only - Limits the variables displayed to only part parameters.
Show tuned variables only - Limits the variables displayed to only tunable variables.
38
SystemVue - Users Guide
Designs
Introduction
A design is an abstract term used to define a collection of related items that fully
characterize a simulatable circuit. A design generally contains a schematic and parts list.
However, notes, equations, scripts, and user defined parameters can also be added to any
given design. The schematic is a visual representation of the parts being simulated and
their connectivity with each other. The schematic is generally the heart of the design.
Each tab at the bottom of the design window contains its characteristics that complement
and influence the design. Many of these tabs and their added affects are optional. A
design is the generic simulatable object. A schematic is a design as well as a schematic
symbol, model, user model, subcircuit, etc. Designs are often contained in designs. The
most common names for a design are schematics, models, or parts. Throughout the
documentation the term Schematic will be generally synonymous with Design.
Schematic
Schematic Symbol
User Model
Creating a Design
There are two different ways to to create a design in SystemVue. One is the by clicking on
the New Item button ( ) on the Workspace Tree toolbar or by right clicking on a folder
in the workspace tree.
Or
1. Right click on a folder in the workspace tree to bring up the right click menu.
2. Select the 'Add >' submenu.
3. Select the 'Designs >' submenu
4. Now select the design of interest
5. The design will added under the folder that was initially right clicked
Note
If you create the new design in the wrong folder, simply drag it to the folder of interest.
Modifying a Design
The following attributes can be added to a design:
Notes
Equations
Scripts
Parameters
Here is a brief overview of these attributes.
Notes
A note can be added to help document different aspects of the design.
For more information see Notes .
Equations
An equation block can be added to a design so that variables can be based on equations.
These variables can be used for various design parameters. An equation block is generally
the link between the parameters a user would see and the parameters used in models.
Note
These equations are local to the design. Other parts of your workspace cannot access the variables in this
equation set.
40
SystemVue - Users Guide
Scripts
Scripts control SystemVue operations. Add a script to your design to load files, save files,
save data sets, and change object parameters.
Note
To run this script, copy the text and paste it into the Script Processor, then select
Run.
Parameters
Parameters are added to a design when the implementation details are generally hidden
from the user as is the case of a user model. When a design contains parameters this
design can be used as a user model and these parameters will be exposed as model
parameters in the part that uses this design as its model.
Design Properties
(General Tab)
Use the General Properties tab page to change the general properties of a Design.
41
SystemVue - Users Guide
42
SystemVue - Users Guide
Filter Designer
SystemVue Filter Designer is a filter design tool that helps users to design digital IIR
(infinite impulse response) and FIR (finite impulse response) filters based on the specified
frequency response, design method, and other relevant parameters.
SystemVue integrates Filter Designer with the Filter Part (algorithm). To launch the Filter
Designer, place a Filter part on a schematic and double click the Filter part.
Please refer to Filter Part (algorithm) for further details. Especially refer to Filter Designer and Filter Part
(algorithm) about the integration with the Filter Part and the associated filter models.
The Filter Designer is implemented as a "live" dialog box — as specifications are changed,
the plots and coefficients are updated automatically. With this feature, users can easily
experiment with different design methods and parameters, and verify the responses as
well as review the coefficients in almost real time.
Certain filter specifications may require large filter order and cost noticeable amount of time to design the
filter and to compute the responses. For example, Sample Rate is too large comparing to the frequency
specifications, or the specified transition band is too small to be accomplished, etc. Under these
conditions, the Filter Designer may be busy in designing the filter and computing the responses and may
not respond to user's action.
If the Sample Rate is too small to represent a bandpass or a bandstop filter, the Filter Designer will
then try to design the filter for analytic signal (see Bandpass and Bandstop Filtering for Analytic
Signals (sim)) and inform the user in the calculation log. This additional design process is for Filter
Designer ONLY. During simulation, the filter model will re-design the filter based on the actual input
signal (real or analytic).
Parameters - The parameter grid is filled with the specific parameters of the
selected filter. After entering a parameter value in the Value column, press Enter to
accept the value and move to the next row.
Please refer to individual filter model documentation (algorithm) for parameter details.
Graph - Check the boxes to display the designated plots (magnitude response, phase
response, group delay, impulse response, step response, and pole-zero plot).
Reposition Windows - Click to restore the enabled graph windows to their default
arrangement.
Undo - Undoes all setting changes (restores settings to original values when the
Filter Designer popped up). This is like a Cancel operation, but the dialog box
remains open.
Help - Displays THIS help topic.
Close - Closes the Filter Designer window, instantiates the current selected filter
model (as well as the proper symbol) under the Filter part, and retains the current
parameter values for the filter model.
44
SystemVue - Users Guide
Save - Saves the filter coefficients file; the file format is compatible with SystemVue
Classic.
Convert to Z-Domain Digital Model - Convert the current filter selection into
either ZDomainFIR (algorithm) (Custom – FIR – Taps) or ZDomainIIR (algorithm)
(Custom – IIR – H(z) Coefficients (Z-Domain)). If the current filter is FIR, the FIR
coefficients (Numerator Coefficients) are copied into the Coefficients parameter of the
ZDomainFIR. On the other hand, if the current filter is IIR, the Numerator
Coefficients and the Denominator Coefficients are copied into the Numerator
parameter and the Denominator parameter of the ZDomainIIR, respectively.
Most of the other settings are only available when using a Custom Z-Domain filter
(CustomIIR or CustomFIR / Taps).
Load - Loads a filter coefficients file; the file format is compatible with SystemVue
Classic.
Structure - Determines the IIR filter structure which can be either cascade form or
parallel form. This setting is ignored for FIR filters.
Coefficients - The coefficients grid is filled with the filter's coefficients. After
entering a setting, press Enter to accept the value and move to the next row. IIR
filters are implemented as sections.
Clear Numerator / Denominator - Sets the number of coefficients to 1 and sets its
value to "1.0".
Add Coefficient - Inserts a new coefficient after the current selection and sets its
value to "1.0".
Add Section - Inserts a new section after the currently selected section. The new
section will have one coefficient set to "1.0".
Remove - Removes the currently selected coefficient or section. The section is
removed from both numerator and denominator.
45
SystemVue - Users Guide
Reposition Windows - Click to restore the enabled graph windows to their default
arrangement.
Undo - Undoes all setting changes (restores settings to original values when the
Filter Designer popped up). This is like a Cancel operation, but the dialog box
remains open.
Help - Displays THIS help topic.
Close - Closes the window, retaining the current settings.
For FIR filters, the coefficients shown in the "Coefficients" tab do not include decimation process.
Response Plots
In the right-lower corner of the specification window, users can choose to display:
When the Filter Designer designs a bandpass or bandstop filter for analytic signal (see Sample Rate in
Filter Specification Window and also see Bandpass and Bandstop Filtering for Analytic Signals (sim)), the
frequency axis is adjusted to the range from FCenter - Sample Rate / 2 to FCenter _ Sample Rate / 2.
46
SystemVue - Users Guide
References
1. S. Haykin, Communication Systems, 4th ed. John Wiley and Sons, Inc, 2000.
2. A. V. Oppenheim, R. W. Schafer, and J. R. Buck, Discrete-Time Signal Processing,
2nd ed. Prentice Hall, 1999.
3. B. Sklar, Digital Communications: Fundamentals and Applications. Prentice Hall,
1988.
4. P. P. Vaidyanathan, Multirate Systems and Filter Banks, Prentice Hall, 1993.
Causal, Linear Phase FIR Filter Basic
According to [2], for a causal and linear phase FIR system, if the impulse response is
symmetric, i.e.,
47
SystemVue - Users Guide
,
where
On the other hand, for a causal and linear phase FIR system, if the impulse response is
antisymmetric, i.e.,
,
where
Four types of causal, linear-phase FIR filters are defined in [2], and the four types are
listed in the following table.
According to the table, Type II is not suitable for highpass nor bandstop filters; Type III is
only acceptable for bandpass filter; and Type IV is not suitable for lowpass nor bandstop
filters.
Custom FIR Design
In custom FIR design, users specify the desired frequency response of the FIR filter. In
general, the frequency response is specified in terms of
There are several methods to compute FIR coefficients based on the given frequency
response. The SystemVue CustomFIR (algorithm) and SData (algorithm) models use a
method that involves the FFT.
The data provided is first interpolated as needed to obtain a power of two number of data
points that are evenly spaced in frequency.
When the input signal is real, the first frequency point must be at 0 Hz and the data
is interpolated in the range [0, (Sample Rate) / 2].
When the input signal is a complex envelope one with non-zero characterization
frequency, fc, the first frequency point can be greater than zero and the data is
interpolated in the range [fc - (Sample Rate) / 2, fc + (Sample Rate) / 2].
Any frequency response data supplied that is outside the above ranges is not used.
If the supplied frequency response data does not extend to the limits of the ranges
defined above, data extrapolation is performed to achieve data to these limits. The
extrapolation method used, as specified in the model ExtrapolationOption parameter, can
be
Constant: the value at the lowest/highest frequency specified is held constant until
the limits of the ranges defined above are reached.
versus freq: linear extrapolation is performed.
From the interpolated frequency data, the inverse FFT is applied to obtain a set of FIR
coefficients. For a complex envelope input signal, the interpolated frequency data is
decomposed into I and Q frequency responses, which are used to generate the I and Q
FIR filters that will independently filter the complex envelope input signal I and Q
envelopes.
When the magnitude tolerance, as specified in the model MagTolerance parameter (in dB),
is greater than zero, the FIR coefficients obtained from the inverse FFT are further
processed to possibly reduce the total number of coefficients needed to represent the
frequency response data as an FIR filter. This is done by successively reducing the number
of FIR coefficients, observing the resultant frequency response, and stopping the
coefficient number reduction when the specified magnitude tolerance is reached.
Oftentimes, a 1 dB magnitude tolerance can result in a sizable reduction in the number of
FIR coefficients. During this process, the magnitude tolerance is calculated only over the
tolerance frequency range [LowerFitFreq, UpperFitFreq], as specified in corresponding
model parameters.
EDGE Pulse Shaping Filter
EDGE pulse shaping filter is the modulation pulse shaping filter; it is used to control the
power of the spectrum outband and decrease the peak-to-average ratio. The impulse
response of this filter is
, which is the main component in the Laurent expansion of the GMSK modulation. In his
paper, Laurent introduces a method to express any constant-amplitude binary phase
modulation as a sum of a finite number of time-limited amplitude-modulated pulses (AMP
decomposition). Using this method in GMSK, which is a constant-amplitude phase
modulation, the GMSK signals can be transformed into the sum of
, where
49
SystemVue - Users Guide
is derived from the length of the impulse response of the Gaussian filter. And, compared
to
, other components
is defined as follows.
where
and
where
and
EDGE References
50
SystemVue - Users Guide
pulse rise time with no overshoot or ringing in time domain.
,
and the corresponding impulse response is
.
Here,
in
up to filter order
where
is defined as
,
where
51
SystemVue - Users Guide
.
Multirate Polyphase FIR Filter Implementation
Most of the SystemVue FIR filter blocks are integrated with multirate (rational sampling
rate change) capability. Users can specify Interpolation factor, Decimation factor, and
DecimationPhase for the desired multirate characteristics. By default (Interpolation = 1,
Decimation = 1, and DecimationPhase = 0), the filter blocks do not perform any rate
change. When the Decimation factor is > 1, the FIR filter behaves exactly as if it were in
default mode and were followed by a DownSample (algorithm) block with Factor
parameter equal to the Decimation factor of the filter and Phase parameter equal to the
DecimationPhase of the filter. Similarly, when the Interpolation factor is > 1, the filter
behaves as if it were in default mode and were preceded by an UpSample (algorithm)
block with Factor parameter equal to the Interpolation factor of the filter, Mode parameter
is "Insert zeros" (zero insertion), and Phase parameter equal to 0 (interpolation phase is
0). The following figure illustrate the equivalence of SystemVue multirate FIR filters.
The benefit of multirate polyphase filters is that the multirate implementation integrated
inside the filter models is much more efficient than it would be using UpSample
(algorithm) and DownSample (algorithm). A polyphase structure is used internally,
avoiding unnecessary use of memory and unnecessary multiplication of zeros. Arbitrary
sample-rate conversions by rational factors can be accomplished this way.
It is users' responsibility to make sure the decimation and interpolation factors do not cause aliasing and
imaging effect. The Filter Designer (users) frequency response plot cannot display imaging effect and may
not properly display aliasing effect.
Parks-McClellan Method
The Parks-McClellan design method uses the Remez exchange algorithm to design linear
phase FIR filters such that a filter has minimum weighted Chebyshev error in
approximating a desired ideal frequency response. For further details, please refer to
Chapter 7.4.3 The Parks-McClellan Algorithm in Discrete-Time Signal Processing, 2nd ed. [2
(users)].
The Parks-McClellan design method in SystemVue uses a modified version of the remez
program from Jake Janovetz under GNU Library General Public License. The source of the
modified remez program and the GNU Library General Public License are located in
PublicSource\remez under the SystemVue installation directory.
Raised Cosine Filter
Raised-cosine filters are used for shaping pulses for transmission through digital channels
to prevent intersymbol interference (ISI). The background for intersymbol interference
52
SystemVue - Users Guide
and raised cosine filter can be found in [1], [3], and other communication textbooks. The
following discussion is based on [3].
hz. However, in practical, we need to provide some "excess bandwidth" beyond the
theoretical minimum. One frequently used system transfer function is the raised cosine
filter.
where
.
The impulse response of the raised cosine filter is
The transfer function of the square root raised cosine filter or root raised cosine
filter is defined as
.
The corresponding impulse response is
The above raised cosine filter and root raised cosine filter are defined in continuous-time
domain, and the impulse responses are not causal. The discrete-time raised cosine and
root raised cosine FIR filters are obtained by introducing delay
53
SystemVue - Users Guide
in
and
The transfer function of the raised cosine filter with pulse equalization is
,
and the transfer function of the root raised cosine filter with pulse equalization is
In SystemVue, the impulse response of the discrete-time pulse equalization raised cosine
(or
) in equally spaced frequency points, next performing inverse discrete Fourier transform
(IDFT), and then take the real parts.
Window functions can be applied to raised cosine and root raised cosine filters to smooth
the possible discontinuities at the both ends of the impulse response.
is defined as
54
SystemVue - Users Guide
,
where
.
The ideal impulse response may be noncausal and infinitely long. The window method
obtains a
55
SystemVue - Users Guide
On the other hand, suppose a highpass FIR filter is specified with cutoff frequency
,(
,(
57
SystemVue - Users Guide
,(
Window Functions
For common Rectangular, Bartlett, Hann, Hamming, Blackman, Kaiser windows, please
refer to [2].
Rectangular
Bartlett (Triangular)
Hann
Hamming
Blackman
Blackman Harris
Flat Top
Generalized Cosine
58
SystemVue - Users Guide
, and so on. Hann, Hamming, Blackman, and Flat Top windows are special cases of the
generalized cosine windows.
Given parameters
Ready
The parameter
Kaiser
59
SystemVue - Users Guide
denote the passband and stopband ripple (if passband and stopband ripples are different,
choose the smaller one); let
denote the passband cutoff frequency (in radius), i.e., the highest frequency such that
; let
denote the stopband cutoff frequency (in radius), i.e., the lowest frequency such that
; and let
is given by
and
must satisfy
60
SystemVue - Users Guide
.
IIR Filter Design
SystemVue uses digital (discrete-time) IIR filters to implement analog (continuous-time)
filters.
In general, SystemVue IIR filters are designed in the following steps:
Reference
1. A. Antoniou, Digital Filters: Analysis and Design. McGraw Hill, 1979.
2. L. B. Jackson, Digital Filters and Signal Processing, 3rd ed. Kluwer Academic
Publishers, 1995.
3. L. B. Jackson, "A correction to impulse invariance", Signal Processing Letters, IEEE,
vol. 7, no. 10, pp. 273-275, Oct. 2000.
4. A. V. Oppenheim, R. W. Schafer, and J. R. Buck, Discrete-Time Signal Processing,
2nd ed. Prentice Hall, 1999.
5. J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms
and Applications, 3rd ed. Prentice Hall, 1995.
6. L. R. Rabiner and B. Gold, Theory and Application of Digital Signal Processing.
Prentice Hall, 1975.
Analog Frequency Transformation
A lowpass filter can be transformed into another lowpass, highpass, bandpass, or
bandstop filters based on the following analog frequency transformation techniques.
Lowpass to Lowpass
.
The resulting lowpass filter has transfer function
Lowpass to Highpass
.
The resulting highpass filter has transfer function
Lowpass to Bandpass
62
SystemVue - Users Guide
.
The resulting bandpass filter has transfer function
Note that the order of the bandpass filter will be doubled after this lowpass to bandpass frequency
transformation. In bandpass filter design specification, the "order" refers to the order of the prototype
lowpass filter.
Lowpass to Bandstop
.
The resulting bandstop filter has transfer function
63
SystemVue - Users Guide
Note that the order of the bandstop filter will be doubled after this lowpass to bandstop frequency
transformation. In bandstop filter design specification, the "order" refers to the order of the prototype
lowpass filter.
Impulse Invariance
of the discrete-time system is "invariant" with respect to the sampled version of the
impulse response of the continuous-time system.
is causal and stable. Based on the discussion found in [1] and [3], if
,
we can approximate the continuous-time system in discrete-time domain
Let
64
SystemVue - Users Guide
are
zeros and
are
poles.
Suppose
, and
Due to the band limited restriction and the fact that the impulse invariance technique is
only practical for
, currently only certain lowpass IIR filter blocks in SystemVue provides impulse invariance
option.
Bilinear Transformation
-axis (
65
SystemVue - Users Guide
) in the Z-plain. Bilinear transformation avoids the aliasing problem, but the
transformation from S-domain frequency to Z-domain frequency is nonlinear.
by replacing
in
with
,
where
is the sampling period of the discrete-time system. The resulting Z-domain transfer
function is therefore
.
Due to the nonlinearity of bilinear transformation, SystemVue IIR filter blocks prewarp
the critical frequencies, such as passband frequency and stopband frequency, based on
the above equation before designing analog filters. With prewarping, the resulting digital
filters will meet the desired specification at the critical frequencies.
Bessel filters are all-pole filters that are characterized by the S-domain transfer function
,
where
is the
with
and
as initial conditions.
Butterworth
,
where
, where
67
SystemVue - Users Guide
Chebyshev I
Chebyshev type I filters are all-pole filters that have equiripple behavior in the passband
and monotonic behavior in the stopband. The magnitude-squared frequency response of a
Chebyshev type I filter is
,
where
by
,
and
is the
The poles of a Chebyshev type I filter lie on an ellipse in the S-plain with major axis
,
where
68
SystemVue - Users Guide
.
The poles are located in the S-plain at points
,
where
Chebyshev II
Chebyshev type II filters have both poles and zeros and exhibit monotonic behavior in the
passband and equiripple behavior in the stopband. The magnitude-squared frequency
response of a Chebyshev type II filter is
,
where
as
,
and
is the
The poles of a Chebyshev type II filter are located in the S-plain at points
69
SystemVue - Users Guide
,
where
,
and the parameter
by
.
The zeros of a Chebyshev type II filter are located on the imaginary axis at points
.
In the above equations,
Elliptic
Elliptic filters have equiripple behavior in both the passband and stopband. This class of
filters have both poles and zeros and is characterized by the magnitude-squared
frequency response
,
where
, and
Interested users may find more information on this topic in Reference 1 (users), where
the author provides detailed derivations.
Synchronously Tuned
Synchronously Tuned filters are all-pole filters with all the poles are located at the same
point on the negative real axis in the S-plain. A Synchronously Tuned filter is
characterized by the S-domain transfer function
,
where
.
S-Domain Design
S-Domain design is a different IIR filter design approach. In S-Domain design, users
specify the S-Domain poles
and zeros
of the system. To ensure the resulting IIR transfer function is causal, stable, and real
coefficients,
The S-domain pole-zero system is then transformed into Z-domain transfer function by
either bilinear transformation or impulse invariance. Bilinear transformation will result in a
Z-domain transfer function that is not a linear mapping of the S-domain pole-zero
system, see Bilinear Transformation (users). On the other hand, impulse invariance
restricts the S-domain pole-zero system to be bandlimited, see Impulse Invariance
(users), and may suffer from implementation difficulty in multiple-order poles.
71
SystemVue - Users Guide
Equations
Overview
Equations are a powerful tool that enable post processing of data, control over inputs to
simulations, and definition of user-defined custom models.
The Equations window also has an associated toolbar, see Equation Toolbar (users).
Among the simplest application of equations is to define a variable in the Script Editor area (upper right),
such as myvar=123 (then press "Go")
Then myvar can be entered into component properties on the schematic, to drive component values.
Entering myvar=?123 (ie. adding the question mark) makes the value myvar tunable in the tune window.
After pressing "Go", the variable value should appear in the Variable Viewer (left side). If nothing appears
in the Variable Viewer after pressing "Go", this usually indicates some problem with equation syntax.
Typically the error messages window will provide some clues.
Variable Viewer
The Variable Viewer displays any variables that currently exist in the Equations object. If
the variable is a scalar, the value is displayed. If the variable is an array, the type and
dimensions of the array are displayed.
If you right-click on any variable displayed in the Variable Viewer, you will be presented
with a menu containing options to plot the variable on a graph or display it on a table. If
you wish to see the variable's value without creating a table, you can do so in the
Command Window, as discussed below.
Buttons are located at the top of the Variable Viewer window: The Units button, and the
Go button.
The Units button allows you to define how the values of the variables shown in the
72
SystemVue - Users Guide
variable list are to be interpreted when used elsewhere, such as part-parameters. If the
Units are set to "Use MKS", then the value of the variables in this Equations block will be
treated as MKS values. If, on the other hand, the Units are set to "Use Display", then the
units will be defined where the value is actually used.
"Use Display" means to to interpret the unit of measure of a parameter as a scale factor.
So, if an equation variable X=20 is used in an Inductor set to nH in Use MKS the inductor
value is 20H (MKS) in Use Display the inductor value is 20nH. "Use MKS" is very important
for Model portability and units portability.
You will almost always want to use "Use Display", since you will usually want a unit to be
attached wherever the variable is used. "Use MKS" may be used for model equations to
ensure portability of models regardless of an end user's unit preferences.
The Go button provides an easy way to force execution of the equations. Its function is
equivalent to the Go button on the Equation Toolbar (users).
If you want the variable block to be cleared each time the equations are executed, the first line of your
equations should be the clear statement.
Script Editor
The Script Editor is used to type in a sets of equation statements to be executed. More
specifically, the Script Editor window is used to:
The Script Editor includes Find and Replace support, accessible from the Edit menu or with
the Ctrl+F or Ctrl+H keys, respectively.
New If you want context sensitive help on a function, select the keyword and press F1
in the Script Editor.
New Use Ctrl_MouseWheel to zoom in and out on the equations Script Editor.
Command Window
The Command Window is used to execute statements line-by-line. It interacts with the
same variables that are visible to the Script Editor. It is a useful debugging tool since the
contents of a variable can be displayed here.
If an assignment statement does not end in a semicolon, the results of that assignment
are outputted in the Command Window, as can be seen in the above figure. If an
assignment statement does end in a semicolon, then the dump of the contents of the
result is suppressed.
Any errors or warnings caused by executing a line in the Command Window are outputted
to the Command Window.
Hierarchy in Equations
Equations obey hierarchy as defined by their place in the Workspace Tree. Note that this is
true for Equation objects as well as equations that are embedded inside a Design object
(ie. an Equation tab in a Design).
73
SystemVue - Users Guide
Equation BottomEquation contains:
x=3
if x==3 then
y = 4*x + cos(z)
else
y = 4*x + sin(z)
endif
In the example above, the value of z will be coming from another equation set
(NextEquations or TopEquations) to execute without errors. The Equations engines look up
the workspace hierarchy until the value of z is found, otherwise an error is reported.
In other words, in this example, if z is defined in NextEquations, then z will come from
there. If NextEquations does not define z then the Equations engine looks up another
folder level to TopEquations for z .\
Equations on the same level of hierarchy should all be visible to each other.
Suppose, for example, that we have 2 designs as shown in the below picture. Both
designs have an Equation tab (and possibly a Parameters tab, which is equivalent, since
Parameters get passed into the design's Equations at run-time).
In the situation shown in the above picture, when you are NOT running a simulation (ie.
you are in design-time), the design called SubNetwork will be able to see variables that
are defined in the Equations tab of the design called TopLevel, simply because
SubNetwork is located in a folder beneath the level of hierarchy that TopLevel is in.
However, suppose that, as shown, SubNetwork defines a subnetwork model. Also suppose
that the schematic in TopLevel defines an instance of SubNetwork (ie. it has a part that
references the SubNetwork model). When you run a simulation (ie. during run-time), a
Model hierarchy is defined in which SubNetwork is a child of TopLevel, since an instance of
a SubNetwork model is instantiated inside of TopLevel. Because of this, SubNetwork can
see all of TopLevel's variables. This is what makes the passing of parameters from
TopLevel to SubNetwork possible.
It is important to note that when you are editing a design (ie. you are in design-time), the
values of parameters you see in your design are those calculated using the design-time
hierarchy. For example, if you define a Design that contains Parameters, and you use one
of those parameters inside your Design, you will see the value of that parameter
correspond to the "Default" value of the Parameter that you defined in the Parameters
tab. This is, of course, not necessarily the value that will be seen at run-time when you
run a simulation, since that depends on the run-time hierarchy defined by the topology of
the network you are simulating.
Automatic Calculation
74
SystemVue - Users Guide
If an Equation object is set to Auto-Calculate, the equations are always kept up to date
whenever a value is requested from them. This is desirable when the equation block
defines variables that you use in part parameters on a schematic: when you change these
values, you want the part parameters that use them to update. However, sometimes
this is undesirable. If, for example, you are using an Equation block to import data from
a file or to transfer data to and from an instrument, you do not want the Equations to
calculate unless you specifically tell them to. In these cases, you should disable Auto-
Calculate. The Auto-Calculate toolbar button located on the Equation Toolbar (users)
toggles automatic calculation on and off.
There are some cases where you probably want to DISABLE automatic recalculation of an equation block:
equations which do file I/O or TCP/IP communications, equations which run simulations via the runanalysis
function, equations that do time-consuming processing.
If you disable Automatic Calculation , the only way to recalculate the equation is manually
with the calculate button, or with the F5 or Ctrl+G keyboard shortcuts. Equations that
have Automatic Calculation turned off will not update during simulations. As mentioned
before, you would normally disable Automatic Calculation for Math Language equations
that control hardware, for example, so the hardware doesn't get re-controlled every time
a variable changes.
If you disable Auto-Calculate in an equation that is a function definition, the function won't exist until you
manually calculate the equation.
Debugging Equations
A fully featured and intuitive debugger is built-in to the equation editing user interface.
Workspace Equations: to run the equations click the Go button in the Equation
Toolbar (users). If a workspace equation is set to Auto-Calculate, they will calculate
whenever something they are dependent on triggers a calculation. If any breakpoints
are set, the evaluation of the equations is halted and the user interface is brought to
the front, clearly marking what line of code the equation processor is currently halted
at.
It is important to keep in mind that an equation block may be calculated may times due to
various factors, such as a simulator changing a variable. The evaluation of the equations
will halt whenever the breakpoint is hit. Typical scenarios include:
Equations in sub-circuit models: the breakpoint will be hit once per run of the
simulator except when the equation is dependent on the simulator independent
75
SystemVue - Users Guide
variable.
Equations in a Math Language block: the breakpoint will be hit at each 'tic' of the
simulator as data is delivered to the block.
Setting Breakpoints
Click the Breakpoint Margin at the line you wish to set a breakpoint at in the script editor
window to toggle a breakpoint on/off. A red dot will appear when the breakpoint is on. The
Breakpoint margin is located between the Line Number and Folding margins. You may also
set a breakpoint at the current line by using the Ctrl+B keyboard shortcut or clicking the
Add/Remove Breakpoint toolbar button.
When the equation processor hits a breakpoint, the current line it is halted at will display a
yellow arrow in the breakpoint margin as can be seen in the picture below. At this point
you may single-step, step-into functions, continue, or abort execution. If you step-into a
function, a green arrow marks the line that the function was called from.
The Equation Debug docking window can be shown/hidden using the Edit/View/Docking
Windows/Equation Debug menu path or using the show/hide dockers button on the main
toolbar. This window has a list of debug lines that your equations generate using functions
described below. A sample Equation Debug Window is shown here.
76
SystemVue - Users Guide
Debug Functions
There are two functions available (in both Engineering Language and Mathematics
Language) for writing to the Equation Debug docking window. Both functions add lines to
the Equation Debug Docking Window so you can trace progress as the program runs. The
code samples are written in Mathematics Language.
1.
dbg_print( 'Message' )
dbg_print( 'Message', 'Equation')
dbg_print( 'Message', 'Equation', Line)
prints the Message in the Equation Debug window. The Equation and Line parameters
may be omitted, in which case the equation engine will attempt to auto-detect which
equation set and line number called the function.
1. Make sure the input and output equations are in separate blocks
It is a bad idea to have something like:
c = ?4 ' value of some capacitor in the schematic
s21 = Linear1_Data.S[2,1] ' s21 from analyzing the schematic
The "c" is an input to a schematic; it MUST exist before Linear1_Data is ever created,
so this equation block will not compile reliably. Any equation statements that call
variables from analysis datasets should be in a separate block.
2. Let each line compile cleanly before typing more text
Avoid the temptation to write a long set of statements before verifying that it works;
type one line at a time and check that there are no error messages, and that the
variables are showing up in the left side of the equation editor.
77
SystemVue - Users Guide
3. Before writing a large loop or in-line vector statement, check the boundary
values
Instead of writing a large loop then wondering why there are out of bounds errors or
wrong calculations, first type something like:
testA = myVector[firstIndex]
testB = myVector[lastIndex]
The values will display in the Variable view; this way you first verify that the initial
and final values are as expected; then you can let the loop or vector operation run
with more confidence.
4. Don't try to pack everything into one line of code
It is very difficult to find the problem when there are too many calculations packed
into a one line statement. By breaking up a line into several variables and lines you
give yourself the chance to debug and find problems, rather than just look at a huge
line that doesn't work as intended.
5. Check dimensions of variables carefully
Always pay attention to the size and dimension of variables being used; a common
pitfall is to use incorrect multiplication or division of vectors and thus accidentally
create wrong-sized matrices or other unwanted results.
Careless use of the "/" operator causes a 1601x1601 matrix to be created; the
variables view alerts the user of the problem, so part-wise division can be used
instead:
Note that the functions numcols( myMatrix) and numrows( myMatrix) can be used to find the
dimensions of a variable. For matrix operations, the number of columns of a left-hand operator
should equal the number of rows of a right-hand operator, while for part-wise operations the
dimensions should be identical.
78
SystemVue - Users Guide
Function Name Description
abs (users) absolute value or magnitude
acos (users) inverse cosine, in radians
acosd (users) inverse cosine, in degrees
acosh (users) inverse hyperbolic cosine
acot (users) inverse cotangent
acotd (users) inverse cotangent, in degrees
acoth (users) inverse hyperbolic cotangent
acsc (users) inverse cosecant
acscd (users) inverse cosecant, in degrees
acsch (users) inverse hyperbolic cosecant
all (users) true if all parts in a vector are nonzero
angle (users) phase of a complex number, in radians
any (users) true if any part in a vector is nonzero
asec (users) inverse secant, in radians
asecd (users) inverse secant, in degrees
asech (users) inverse hyperbolic secant
asin (users) inverse sine, in radians
asind (users) inverse sine, in degrees
asinh (users) inverse hyperbolic sine
atan (users) inverse tangent, in radians
atan2 (users) 4-quadrant inverse tangent, in radians
atand (users) inverse tangent, in degrees
atanh (users) inverse hyperbolic tangent
alignsignals (users) align two signals by delaying earliest signal
awgn (users) add white Gaussian noise to signal
bartlett (users) Bartlett Window
blackman (users) Blackman Window
butter (users) Butterworth filter designer
berawgn (users) theoretical ber calculation of baseband signal in AWGN channel
bi2dec (users) convert binary vectors to decimal
biterr (users) compute number of bit errors and bit error rate (BER)
bsc (users) binary symmetric channel
bilinear (users) parameter transformation from analog filter to digital filter
buttord (users) butterworth filter order and cutoff frequency calculation
ceil (users) smallest integer greater than or equal to argument
cell (users) create a cell array
cheby1 (users) Chebyshev type 1 filter designer
cheby2 (users) Chebyshev type 2 filter designer
class (users) data-type (class name) of argument
clc (users) clear the command window
clear (users) delete a class object
conj (users) complex conjugate
conv (users) linear convolution (or polynomial multiplication)
cos (users) cosine of a radian-valued argument
cosd (users) cosine of a degree-valued argument
cosh (users) hyperbolic cosine
cot (users) cotangent of a radian-valued argument
cotd (users) cotangent of a degree-valued argument
coth (users) hyperbolic cotangent
csc (users) cosecant of a radian-valued argument
cscd (users) cosecant of a degree-valued argument
csch (users) hyperbolic cosecant
cumprod (users) cumulative product of parts of a vector
cumsum (users) cumulative sum of parts of a vector
79
SystemVue - Users Guide
convdeintrlv (users) permute data with specified shift register group
convenc (users) convolutionally encode binary data
convintrlv (users) permute data with specified shift register group
crcdec (users) cyclic redundancy check decoder
crcenc (users) cyclic redundancy check encoder
cheb1ord (users) minimum order calculation for Chebyshev Type I filter
cheb2ord (users) minimum order calculation for Chebyshev Type II filter
dbg_print (users) output to equation debug window
dbg_showvar (users) output contents of a variable to equation debug window
deconv (users) deconvolution (or polynomial division)
dec2hex (users) decimal to hexadecimal conversion
diag (users) create diagonal matrix or extract diagonal of a matrix
diff (users) difference (or approximate derivative)
de2bi (users) decimal numbers to binary vectors
deintrlv (users) reorder data back with specified permutation table
depuncture (users)
decimate (users) filter signal with lowpass filter and then downsample it
downsample (users) downsample input signal
eig (users) eigenvalues and eigenvectors of a matrix
ellip (users) elliptic or cauer filter designer
eps (users) spacing of floating point numbers
erf (users) error function
erfc (users) complementary error function
error (users) posts to error log or output error to command window
exist (users) check the existance of a variable or a builtin function
exp (users) exponential
eye (users) construct identity matrix
eyediag (users) build an eye diagram from time data
false (users) logical false
fclose (users) close a file or stream
fft (users) Discrete Fourier Transform (DFT)
fftshift (users) shift zero-frequency to center of spectrum
fgetl (users) read a line from a file, discard newline
fgets (users) read a line from a file, keep newline
filter (users) one dimensional digital filtering
find (users) indices of nonzero parts
findstr (users) find a string within another string
fir1 (users) FIR filter design using window method
fix (users) round toward zero
flipdim (users) flip matrix along a dimension
fliplr (users) left/right matrix flip
flipud (users) up/down matrix flip
floor (users) largest integer less than or equal to argument
fopen (users) open file or stream
fread (users) read binary data from a file or stream
fprintf (users) write formatted text to a file or stream
fscanf (users) read formatted text from a file or stream
fwrite (users) write binary data to a file or stream
finddelay (users) estimate delay(s) between signals
fftfilt (users) FFT-based FIR filtering using overlap-add method
gausswin (users) Gaussian Window
getindep (users) returns the string property containing the path to the independent value of a variable
x. (ie. the reference to the independent
variable)
getindepvalue (users) returns the single independent value of a variable x.
getunits (users) Returns an integer corresponding to the units of a variable x. This integer may be
80
SystemVue - Users Guide
used by setunits.
getvariable (users) get the value of a variable from a dataset
gaussfir (users) Gaussian FIR Pulse-Shaping Filter Design
hamming (users) Hamming Window
hann (users) Hann Window
hankel (users) construct Hankel matrix
hex2dec (users) hexadecimal to decimal conversion
hilbert (users) compute the analytic signal from a real data vector
histc (users) histogram count
ifft (users) Inverse Discrete Fourier Transform (IDFT)
ifftshift (users) inverse FFT shift
imag (users) imaginary part of a complex number
inf (users) infinity
interp1 (users) one dimensional interpolation
intrlv (users) reorder data with specified permutation table
ipermute (users) inverse permutation of array dimensions
iscell (users) true if argument is a cell array
ischar (users) true if argument is of type character array
isempty (users) true if argument is empty or array with a dimension of length 0
isequal (users) true if arrays contain equal values, ignoring NaNs
isequalwithequalnans true if arrays contain equal values, including NaNs
(users)
isfield (users) true if a field is in a structure or structure array
isfinite (users) true for finite parts
isfloat (users) true if argument is a floating point scalar or array
isinf (users) true for infinite parts
isinteger (users) true if argument is an integer scalar or array
islogical (users) true if argument is a logical scalar or array
isnan (users) true for NaN parts
isnumeric (users) true if argument is a numeric scalar or array
isreal (users) true if argument is a real-valued scalar or array
isscalar (users) true if argument is a scalar
isstr (users) true if argument is a character array
isstruct (users) true if argument is a structure array
isvector (users) true if argument is a vector
interp (users) resample input at a higher rate with lowpass filter
kurtosis (users) sample kurtosis
kaiser (users) kaiser window
length (users) length of a vector
linspace (users) construct linearly spaced vector
log (users) natural logarithm
log2 (users) Base-2 logarithm
log10 (users) Base-10 logarithm
logspace (users) construct logarithmically spaced vector
lookup (users) look up values in a sorted table
lu (users) LU matrix factorization
lp2bp (users) transform lowpass filter to bandpass filter
lp2bs (users) transform lowpass filter to bandstop filter
lp2hp (users) transform lowpass filter to highpass filter
lp2lp (users) lowpass filter with normalized frequency to desired frequency
max (users) largest value of a vector
mean (users) arithmetic mean of a vector
median (users) median of a vector
min (users) smallest value of a vector
mkdir (users) make directory
mkpp (users) construct a piecewise polynomial
81
SystemVue - Users Guide
mod (users) modulus after division
mode (users) mode (most frequent value) of a vector
moment (users) nth order central moment of a vector
matdeintrlv (users) reorder data by filling matrix by columns and emptying it by rows
matintrlv (users) reorder data by filling matrix by rows and emptying it by columns
muxdeintrlv (users) restore ordering of data with specified shift register group
muxintrlv (users) reorder data with specified shift register group
nan (users) Not-a-Number
ndims (users) number of dimensions of the argument
nextpow2 (users) next power of two
num2str (users) convert number to a character array
numel (users) total number of parts in an array
noisebwlv (users) equivalent two-sided noise bandwidth of lowpass filter
ones (users) construct array with parts set to 1
oct2dec (users) convert octal to decimal numbers
pchip (users) construct piecewise cubic Hermite interpolating polynomial
permute (users) permutation of array dimensions
poly (users) convert roots to a polynomial
polyval (users) evaluate a polynomial
polyvalm (users) evaluate a polynomial with a matrix argument
ppval (users) evaluate a piecewise polynomial
prctile (users) p'th percentiles of a vector
prod (users) product of parts of a vector
poly2trellis (users) convert convolutional code polynomials to trellis description
puncture (users)
phasedelay (users) return phase delay vector for digital filter
phasez (users) return phase response vector for digital filter
quantile (users) q'th quantiles of a vector
qfunc (users) Q function
qfuncinv (users) inverse Q function
rand (users) uniformly distributed random numbers between 0 and 1
randn (users) Normally (Gaussian) distributed random numbers
readvector (users) reads formatted data from a file, implicitly opening and closing the file for you. Useful
when you want a part parameter's value to be read from a file.
real (users) real part of a complex number
rectwin (users) Rectangular Window
rem (users) remainder after division
repmat (users) replicate and tile an array
reshape (users) change dimensions of an array
roots (users) roots of a polynomial
rot90 (users) rotate a matrix 90 degrees
round (users) round towards nearest integer
runanalysis (users) Run an analysis in the workspace tree. Useful for scripting simulations.
randerr (users) generate bit error patterns
randint (users) generate uniformly distributed random integers
randsrc (users) generate random matrix using prescribed alphabet
rectpulse (users) rectangular pulse shaping
rsdec (users) reed-Solomon decoder
rsenc (users) reed-Solomon encoder
sec (users) secant of a radian-valued argument
secd (users) secant of a degree-valued argument
sech (users) hyperbolic secant
setindep (users) set the independent reference for a swept dependent variable to indepvar(s). A
minimum of two arguments is required.
This function can be used to remove all independent values of a variable by passing
in a blank string for the second argument.
82
SystemVue - Users Guide
setvariable (users) write a value to a variable in a dataset
setunits (users) sets a variable to have units specified by unit. The unit may be an integer or a string.
Integer units correspond to the units returned by the getunits function. Units do not
change the underlying value of a variable, but rather, just change how the value is
displayed. Example: setunits( 'freqaxis', 'MHz')
shiftdim (users) shift array dimensions
sign (users) signum
sin (users) sine of a radian-valued argument
sinc (users) sinc function (sin(pi*x) / (pi*x))
sind (users) sine of a degree-valued argument
sinh (users) hyperbolic sine
size (users) dimensions of an array
skewness (users) skewness of a vector
sort (users) sort a vector in ascending or descending order
spline (users) cubic spline interpolation
sqrt (users) square root
sscanf (users) read formatted text from a string
std (users) standard deviation of a vector
str2num (users) convert a string to a number
strcmp (users) case-sensitive string comparison
strcmpi (users) case-insensitive string comparison
strfind (users) find one sting in a longer string
strncmp (users) compare first N characters of a string (case-sensitive)
strncmpi (users) compare first N characters of a string (case-insensitive)
strtok (users) splits strings into tokens
struct (users) construct a structure array
sum (users) sum of the parts of a vector
svd (users) matrix singular value decomposition
symerr (users) compute number of symbol errors and symbol error rate
sftrans (users) transform of lowpass filter to other type filter
square (users) Square wave generation
tan (users) tangent of a radian-valued argument
tand (users) tangent of a degree-valued argument
tanh (users) hyperbolic tangent
tcpip (users) construct tcpip stream object for TCP/IP communications
tic (users) Measure performance using stopwatch timer
toc (users) Measure performance using stopwatch timer
toeplitz (users) construct Toeplitz matrix
true (users) logical true
turbodec (users) compute number of symbol errors and symbol error rate
turboenc (users) inverse Q function
triang (users) coefficients of a triangular window
unmkpp (users) details of piecewise polynomial
using (users) sets the current context in an equation block to the dataset called Dataset
upfirdn (users) Upsample by zero inserting, filtering and downsampling a signal
upsample (users) Upsample input signal by inserting R-1 zeros between elements
var (users) variance of a vector
vec2mat (users) convert vector into matrix
vitdec (users) convolutionally decodes binary stream using Viterbi algorithm
warning (users) posts a warning to error log or output warning to command window
wgn (users) generates white Gaussian noise
xcorr (users) cross correlation
xor (users) logical exclusive-OR
zeros (users) construct array with parts set to 0
abs
83
SystemVue - Users Guide
Syntax
y = abs(x)
Definition
This function takes the absolute value of a real variable or the magnitude of a complex
variable. It operates on an part-by-part basis on arrays.
Examples:
Formula Result
abs( -1.5) 1.5
abs( complex( 1,1) 1.414
)
abs( [-1;-2;3] ) [1;2;3]
Compatibility
scalars, vectors, arrays
acos
Syntax
y = acos(x)
Definition
This function returns the inverse cosine of the angular value x, in radians expressed in the
MKS range [ 0, PI ]. It operates on an part-by-part basis on arrays. It cannot accept a
complex valued variable.
Examples:
Formula Result or
acos( 0 ) 1.571 PI/2
acos( 1 ) 0 0
acos( -1 ) 3.141 PI
acos( .707) 0.786 PI/4
acos( [-.707 0 1]) [2.356 1.571 [3*PI/4 PI/2
0] 0]
Compatibility
Real valued scalars, vectors, arrays
See Also
acosd (users)
acosh (users)
cos (users)
cosd (users)
cosh (users)
acosd
Syntax
y = acosd(x)
Definition
This function returns the inverse cosine of the angular value x, in radians expressed in the
range [ 0, 180 ]. It operates on an part-by-part basis on arrays. It cannot accept a
complex valued variable.
Examples:
84
SystemVue - Users Guide
Formula Result
acosd( 0 ) 90
acosd( 1 ) 0
acosd( -1 ) 180
acosd( .707) 45
acosd( [-.707 0 1]) [135 90 0]
Compatibility
Real valued scalars, vectors, arrays
See Also
acos (users)
acosh (users)
cos (users)
cosd (users)
cosh (users)
acosh
Syntax
y = acosh(x)
Definition
This function returns the inverse of the hyperbolic cosine of the number x. It operates on
an part-by-part basis on arrays. It cannot accept a complex valued variable.
Formula Result
acosh( 1 ) 0
acosh( 10 ) 2.993
acosh( 0) NaN
Compatibility
Real valued scalars, vectors, arrays
See Also
acos (users)
acosd (users)
cos (users)
cosd (users)
cosh (users)
acot
Syntax
y = acot(x)
Definition
This function returns the inverse co-tangent of the angular value x, in radians expressed
in the MKS range [ 0, PI ]. It operates on an part-by-part basis on arrays. It cannot accept
a complex valued variable.
Formula Result or
acot(1.732) 0.5236 PI/6
acot(0.577) 1.0472 PI/3
Compatibility
Real valued scalars, vectors, arrays
See Also:
85
SystemVue - Users Guide
acotd (users)
acoth (users)
cot (users)
cotd (users)
coth (users)
acotd
Syntax
y = acotd(x)
Definition
This function returns the inverse co-tangent of the angular value x, in radians expressed
in the range [ 0, 180 ]. It operates on an part-by-part basis on arrays. It cannot accept a
complex valued variable.
Formula Result
acotd(1.732) 30
acotd(0.577) 60
Compatibility
Numeric scalars, vectors, arrays
See Also:
acot (users)
acoth (users)
cot (users)
cotd (users)
coth (users)
acoth
Syntax
y = acoth(x)
Definition
This function returns the inverse of the hyperbolic co-tangent of the number x. It operates
on an part-by-part basis on arrays. It cannot accept a complex valued variable.
Compatibility
Real valued scalars, vectors, arrays
See Also:
acot (users)
acotd (users)
cot (users)
cotd (users)
coth (users)
acsc
Syntax
y = acsc(x)
Definition
This function returns the inverse co-secant of the angular value x, in radians expressed in
the MKS range [ 0, PI ]. It operates on an part-by-part basis on arrays. It cannot accept a
complex valued variable.
Compatibility
Real valued scalars, Vectors, Arrays
See Also:
acscd (users)
acsch (users)
86
SystemVue - Users Guide
csc (users)
cscd (users)
csch (users)
acscd
Syntax
y = acscd(x)
Definition
This function returns the inverse co-secant of the angular value x, in degrees expressed in
the range [ 0, 180 ]. It operates on an part-by-part basis on arrays. It cannot accept a
complex valued variable.
Compatibility
Real valued scalars, Vectors, Arrays
See Also:
acsc (users)
acsch (users)
csc (users)
cscd (users)
csch (users)
acsch
Syntax
y = acsch(x)
Definition
This function returns the inverse of the hyperbolic co-secant of the number x. It operates
on an part-by-part basis on arrays. It cannot accept a complex valued variable.
Compatibility
Numeric scalars, Vectors, Arrays
See Also:
acsc (users)
acscd (users)
csc (users)
cscd (users)
csch (users)
alignsignals
align two signals by delaying earliest signal
Syntax
[Xa,Ya] = alignsignals(X,Y)
[Xa,Ya] = alignsignals(X,Y,MAXLAG)
[Xa,Ya] = alignsignals(...,'truncate')
[Xa,Ya,D] = alignsignals(...)
Definition
[Xa Ya] = alignsignals(X,Y), X and Y should be vectors and the return Xa and Ya
are both column vectors. This function estimates the delay between X and Y via
finddelay function and then delay the earlier signal by inserting zeros to align
these two signals.
Examples
Compatibility
all
Syntax
all(data)
all(data, dim)
Definition
This function returns true if all values in a vector are non-zero or logical true, otherwise it
returns false. If data is a matrix, then this function operates on the columns of data.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
all( [1 0 0 1 0] ) 0
all( [1 1 1] ) 1
For A = [1 1 0; 1 0 1; 1 1 1];
See Also
any (users)
angle
Syntax
y = angle(x)
Definition
This function returns the phase of a complex number, in radians.
This function operates on an part-by-part basis on arrays.
Compatibility
Complex valued scalars, vectors, arrays
Real valued variables are treated as vectors with angular value of zero.
any
Syntax
any(data)
any(data, dim)
Definition
This function returns true if any of the values in a vector are non-zero or logical true,
otherwise it returns false. If data is a matrix, then this function operates on the columns
of data.
88
SystemVue - Users Guide
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
all( [1 0 0 1 0] ) 1
all( [0 0 0] ) 0
For A = [0 0 1; 0 1 0; 0 0 0];
See Also
all (users)
asec
Syntax
y = asec(x)
Definition
This function is the inverse secant, in radians in the range [0, PI].
This function operates on an part-by-part basis on arrays.
Compatibility
Real valued scalars, vectors, arrays
See Also
asecd (users)
asech (users)
sec (users)
secd (users)
sech (users)
asecd
Syntax
y = asecd(x)
Definition
This function is the inverse secant, in degrees.
This function operates on an part-by-part basis on arrays.
Compatibility
Real valued scalars, vectors, arrays
See Also
asec (users)
asech (users)
sec (users)
secd (users)
sech (users)
asech
Syntax
89
SystemVue - Users Guide
y = asech(x)
Definition
This function returns the inverse hyperbolic secant of the argument.
This function operates on an part-by-part basis on arrays.
Compatibility
Real valued scalars, vectors, arrays
See Also
asecd (users)
sec (users)
secd (users)
sech (users)
asin
Syntax
y = asin(x)
Definition
asin returns the inverse sine of the argument, in radians, between -PI / 2 <= r <= PI / 2.
This function operates on an part-by-part basis on arrays.
Examples:
Formula Result or
asin ( 0 ) 0 0
asin ( 1 ) 1.571 PI/2
asin( -1 ) -1.571 -PI/2
asin ( .707) 0.786 PI/4
asin ( -.707) -0.786 -PI/4
Compatibility
Real valued scalars, vectors, arrays
See Also
asind (users)
asinh (users)
sin (users)
sind (users)
sinh (users)
asind
Syntax
y = asind(x)
Definition
asind returns the inverse sine of the argument, in degrees, in a range of [-180, 180]. This
function operates on an part-by-part basis on arrays.
Examples:
See Also:
90
SystemVue - Users Guide
asin (users)
asinh (users)
sin (users)
sind (users)
sinh (users)
asinh
Syntax
y = asinh(x)
Definition
This function returns the inverse hyperbolic sine of the argument, equal to log( x + sqrt(
x^2 + 1)). This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
asinh( 1 ) 0.881
asinh( 10 ) 2.998
asinh( [0 1 10]) [0 0.881 2.998]
Compatibility
Real valued scalars, vectors, arrays
See Also:
asind (users)
asin (users)
sin (users)
sind (users)
sinh (users)
atan
Syntax
y = atan(x)
Definition
This function returns the inverse tangent of the argument, in radians between -PI/2 < r <
PI/2. This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
atan( 0 ) 0
atan( 1 ) 0.785
atan( [-1 .5 -.5] ) [-0.785 0.464 -0.464]
Compatibility
Real valued scalars, vectors, arrays
See Also:
tanh (users)
atan2 (users)
atand (users)
atanh (users)
tan (users)
tand (users)
atan2
Syntax
y = atan2(y, x)
Definition
atan2 returns the 4-quadrant inverse tangent of the argument, in radians. The return
91
SystemVue - Users Guide
value is the same size as the input arrays y and x, and is computed on an part-by-part
basis. Either argument may be a scalar, in which case that argument is expanded to be
the same size as the other argument. For complex inputs, imaginary parts are ignored.
Examples:
Formula Result or
atan2( 1, 0 ) 1.571 pi/2
atan2( 1, 1 ) 0.785 pi/4
atan2( [1; 0; -1], -1 ) [2.356; 3.142; -2.356] [3*pi/4; pi; -3*pi/4]
Compatibility
Real valued scalars, vectors, arrays
See Also
atan (users)
tan (users)
atand
Syntax
y = atand(x)
Definition
This function returns the inverse tangent of the argument, in degrees.
This function operates on an part-by-part basis on arrays.
Examples:
See Also:
atan (users)
tan (users)
tand (users)
atanh (users)
tand (users)
atanh
Syntax
y = atanh(x)
Definition
This function returns the inverse hyperbolic tangent of the argument, which is equivalent
to 0.5 * log( (1 + x) / (1 - x) ). This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
atanh( 1 ) undefined
atanh( .5 ) 0.549
atanh( -.5 ) -0.549
atanh( 0 ) 0
Compatibility
Real valued scalars, vectors, arrays
See Also:
atan (users)
92
SystemVue - Users Guide
tan (users)
atand (users)
tanh (users)
tand (users)
awgn
Add white Gaussian noise to signal
Syntax
Y = AWGN(X,SNR)
Y = AWGN(X,SNR,SIGPWR)
Y = AWGN(X,SNR,'measured')
Y = AWGN(X,SNR,SIGPWR,STATE)
Y = AWGN(X,SNR,'measured',STATE)
Y = AWGN(...,POWERTYPE)
Definition
Examples
Compatibility
bartlett
Syntax
bartlett(N)
Definition
This function returns a column vector containing a Bartlett window with N points, N being
a positive integer greater than 2. The Bartlett window is characteristically triangular in
shape with a base value of 0 and an apex value of 1. When N is odd, the apex is explicitly
an part of the window function. When N is even, the apex is not explicitly sampled but
rather the two sample points which flank the apex are represented in the returned vector.
Note
bartlett(2), a redundant usage of this function returns [0 0] whereas bartlett(1) returns [1].
Examples:
Compatibility
scalar
See Also
blackman (users)
gausswin (users)
hamming (users)
hann (users)
rectwin (users)
berawgn
theoretical BER (Bit Error Ratio) calculation of baseband signal in AWGN channel
Syntax
BER = BERAWGN(EbNo,'pam',M)
BER = BERAWGN(EbNo,'qam',M)
BER = BERAWGN(EbNo,'psk',M,dataenc)
BER = BERAWGN(EbNo,'dpsk',M)
BER = BERAWGN(EbNo,'oqpsk',dataenc)
BER = BERAWGN(EbNo,'fsk',M,coherence)
BER = BERAWGN(EbNo,'fsk',2,coherence,rho)
BER = BERAWGN(EbNo,'msk',dataenc)
BER = BERAWGN(EbNo,'msk',dataenc,coherence)
BER = BERAWGN(EbNo,'cpfsk',M,modindex,kmin)
Definition
EbNo: The ratio of Eb to No, in dB. Eb is the average bit energy of modulated
signal, No is the single-sided noise power spectral density of the AWGN (Additive
White Gaussian Noise) channel.
Modulation type
type description
'pam' Pulse amplitude modulation (PAM)
'qam' Quadrature amplitude modulation (QAM)
'psk' Phase shift keying (PSK)
'oqpsk' Offset quaternary phase shift keying (OQPSK)
'dpsk' Differential phase shift keying (DPSK)
'fsk' Frequency shift keying (FSK)
'msk' Minimum shift keying (MSK)
'cpfsk' Continuous phase frequency shift keying (CPFSK)
M: Number of states of mudulated signal, must be at least 2 and satisfying:
M==2^floor(log2(M)).
Notes
Most results are only applicable with large EbNo. By default, the bit-to-constellation mapping is based on
Gray code
References:
Examples
Compatibility
bi2de
Convert binary vectors to decimal numbers
Syntax
d = bi2de(b)
d = bi2de(b,flg)
d = bi2de(b,p)
95
SystemVue - Users Guide
d = bi2de(b,p,flg)
Definition
Examples
Compatibility
bilinear
bilinear parameter transformation from analog filter to digital filter
Syntax
[Zd,Pd,Kd] = bilinear(Za,Pa,Ka,Fs)
[Zd,Pd,Kd] = bilinear(Za,Pa,Ka,Fs,Fp)
[NUMd,DENd] = bilinear(NUMa,DENa,Fs)
[NUMd,DENd] = bilinear(NUMa,DENa,Fs,Fp)
[Ad,Bd,Cd,Dd] = bilinear(Aa,Ba,Ca,Da,Fs)
[Ad,Bd,Cd,Dd] = bilinear(Aa,Ba,Ca,Da,Fs,Fp)
Definition
1. Bilinear transforms analog filter parameters (s-domain) to digital filter equivalent (in
z-domain) with equation (without frequency prewarping):
Output arguments should NOT be omitted, becuase they are used for input argument type differentiation.
Examples
Compatibility
See also
impinvar
biterr
compute number of bit errors and bit error rate (BER)
Syntax
[number,ratio] = biterr(x,y)
[number,ratio] = biterr(x,y,flg)
[number,ratio,individual] = biterr(...)
Definition
96
SystemVue - Users Guide
[NUMBER,RATIO,LOC] = biterr(X,Y,FLG) compare the bit difference between X
and those in Y. elements in X and Y should be positive integer. They are
translated to binary resentation of k bits which is specified by the maximal
number in X and Y.
If X and Y are of the same size, FLG may be 'overall','row-wise' and 'column-
wise'. When FLG is 'overall', NUMBER and RATIO are scalar which mean the
difference number and rate of all elements in X compared with those in Y. When
FLG is 'row-wise', NUMBER and RATIO are column vectors which mean the
differenc number and rate of each row of X compared with that in Y. When FLG
is 'column-wise',NUMBER and RATIO are row vectors which mean the difference
number and rat of each column of X compared with that in Y. LOC is the same
size with X, in which 0 means same, 1 means difference. Default is 'overall' in
this case.
If X is MX-1 vector and Y is MX-NY matrix, FLG may be 'overall' and 'column-
wise'. Default is 'overall'. In this case, X is extended to MX-NY matrix in which
each column is same. Then the calculation is same with that when X and Y are
of the same size.
If X is 1-NX vector and Y is MY-NX matrix, FLG may be 'overall' and 'row-wise'.
Default is 'overall'. In this case, X is extended to MY-NX matrix in which each
row is same. Then the calculation is same with that when X and Y are of the
same size.
Examples
Compatibility
blackman
Syntax
blackman(N)
Definition
This function returns a column vector containing a Blackman window with N points, N
being a positive integer greater than 2. The Blackman window is composed of raised
cosine windows scaled to have a base value of 0 and an apex value of 1 as follows:
_blackman_value_at_n_of_N_ = 0.42 - 0.5 * cos( 2*pi*n/N ) + 0.08 * cos( 4*pi*n/N ), 0 <= n <=
N
When N is odd, the apex is explicitly an part of the window function. When N is even, the
apex is not explicitly sampled but rather the two sample points which flank the apex are
represented in the returned vector.
Note
blackman(2), a redundant usage of this function returns [0 0] whereas blackman(1) returns [1].
Examples:
97
SystemVue - Users Guide
Compatibility
scalar
See Also
bartlett (users)
gausswin (users)
hamming (users)
hann (users)
rectwin (users)
bsc
Model binary symmetric channel
Syntax
Y = bsc(X,P)
Y = bsc(X,P,STATE)
[Y,ERR] = bsc(...)
Definition
[Y,ERR] = bsc(X,...) returns error pattern in ERR with the same size as X.
Examples
Compatibility
See also
98
SystemVue - Users Guide
RAND (users)
AWGN (users)
butter
Syntax
[num, denom] = butter( order, normfreq, ftype, domain )
or
[zeros, poles, gain] = butter( order, normfreq, ftype, domain )
Parameters
Examples:
Note that while zeros and poles are expressed as column vector, numerator and
denominator coefficients are expressed as row vectors. Gain is always expressed as a real
valued scalar variable.
Syntax
[N,Wc] = buttord(Wp,Ws,Rp,Rs)
[N,Wc] = buttord(Wp,Ws,Rp,Rs,'s')
Definition
Lowpass: Wp = .2, Ws = .3
Highpass: Wp = .4, Ws = .3
Bandpass: Wp = [.3 .6], Ws = [.1 .7]
Bandstop: Wp = [.2 .8], Ws = [.3 .7]
Compatibility
See also
butter (users), cheb1ord (users), cheb2ord (users), ellipord
ceil
Syntax
y = ceil(x)
Definition
ceil returns the smallest integer greater than or equal to the argument. If x is complex,
only the real part is used. This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
ceil( 10 ) 10
ceil( complex ( 1.5 , 6 ) ) 2
ceil( [ -0.5, 0.5 ] ) [0,1]
Compatibility
Numeric scalars, vectors, arrays
See Also
floor (users)
cell
Syntax
a = cell(y)
a = cell(x, y)
a = cell([x, y])
a = cell(x, y, z,...)
a = cell([x y z ...])
a = cell(size(V))
Definition
a = cell(y) creates a cell array, whose dimension is y-by-y, containing empty matrices. If
the parameter y is not of type scalar, then a = cell(y) produces an error message.
a = cell(x,y, z, ...) and a = cell([x,y,z,...]) creates a cell array, whose dimension is x-by-
y-by-z-...and so on, containing empty matrices. If any of the parameters x, y, z,..., are
not of type scalar, then an error message is produced when these statements are
executed.
100
SystemVue - Users Guide
a = cell(size(V)) creates a cell array, whose dimension matches that of V, containing
empty matrices.
Examples:
Formula Result
a = cell(2) a = {[], []; [],[]}
a = cell([3,2]) a=
{[],[];[],[];[],[]}
V = [1;3;5] a = {[];[];[]}
a=
cell(size(V))
Compatibility
scalar, vector, array
See Also
ones (users)
rand (users)
randn (users)
zeros (users)
cheb1ord
minimum order calculation for Chebyshev Type I filter
Syntax
[N,WN] = cheb1ord(WP,WS,DBP,DBS)
[N,WN] = cheb1ord(WP,WS,DBP,DBS,'s')
Definition
1. This function calculates the minimum order for Chebyshev Type I filter.
2. [N,WN] = cheb1ord(WP,WS,DBP,DBS) returns the order N for digital Chebyshev filter
that has no more than DBP loss in passband and at least DBS attenuation in the stop
band. WP is also returned in WN.
3. [N,WN] = cheb1ord(WP,WS,DBP,DBS,'s') returns the order N for analog Chebyshev
filter that has no more than DBP loss in passband and at least DBS attenuation in the
stop band. WP is also returned in WN.
4.
Output arguments should NOT be omitted
Examples
Compatibility
See also
cheb2ord (users), ellipord
cheb2ord
minimum order calculation for Chebyshev Type II filter
Syntax
[N,WN] = cheb2ord(WP,WS,DBP,DBS)
[N,WN] = cheb2ord(WP,WS,DBP,DBS,'s')
Definition
1. This function calculates the minimum order for Chebyshev Type I filter.
2. [N,WN] = cheb2ord(WP,WS,DBP,DBS) returns the order N for digital Chebyshev filter
that has no more than DBP loss in passband and at least DBS attenuation in the stop
101
SystemVue - Users Guide
band. WP is also returned in WN.
3. [N,WN] = cheb2ord(WP,WS,DBP,DBS,'s') returns the order N for analog Chebyshev
filter that has no more than DBP loss in passband and at least DBS attenuation in the
stop band. WP is also returned in WN.
4.
Output arguments should NOT be omitted
Examples
Compatibility
See also
cheb1ord (users), ellipord
cheby1
Syntax
[num, denom] = cheby1( order, normripple, normfreq, ftype, domain )
or
[zeros, poles, gain] = cheby1( order, normripple, normfreq, ftype, domain )
Parameters
Examples:
Note that while zeros and poles are expressed as column vector, numerator and
denominator coefficients are expressed as row vectors. Gain is always expressed as a real
valued scalar variable.
Parameters
Examples:
Note that while zeros and poles are expressed as column vector, numerator and
denominator coefficients are expressed as row vectors. Gain is always expressed as a real
valued scalar variable.
Definition
This function returns the type of class of the supplied object as a string type. The input
argument is evaluated as an expression so a combination of existing objects can be
applied to this parameter.
Example
char
103
SystemVue - Users Guide
Compatibility
all
See Also
struct (users)
clc
Syntax
clc()
Definition
Clear the command window
clear
Syntax
clear
clear name
clear name1 name2 name3
clear ( 'name1', 'name2', 'name3' )
clear global name
Definition
Remove variables from an equation block. This frees up old variables in memory.
clear name just removes the variable name from the equation block.
clear name1 name2 name3 or clear( 'name1', 'name2', 'name3' ) removes variables
name1, name2, and name3 from the equation block.
clear global name removes the global variable name from the equation block.
conj
Syntax
y = conj( x )
Definition
conj returns the complex conjugate of the argument. The conjugate of a complex number
x + jy is x - jy. This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
conj( 1+2j ) 1 - 2j
conj( [ 1 + 2j, 3 - 4j ] ) [ 1 - 2j, 3 + 4j]
Compatibility
Numeric Scalars, Arrays, Vectors
conv
Syntax
y = conv( x1,x2 )
Definition
This function performs the algebraic convolution between the two vector valued inputs x1
and x2. Given the lengths of the vectors to be lN = length( xN ), N = {1, 2}, the result is
of length equal to sum of all lengths minus 1.
Examples:
a = [ 2, 3 ]
b = [ 5, 6, 7 ]
c = conv( a, b )
104
SystemVue - Users Guide
% c = [10 27 32 21] because
% c(1) = a(1)*b(1) = 10
% c(2) = a(1)*b(2) + a(2)*b(1) = 12 + 15 = 27
% c(3) = a(1)*b(3) + a(2)*b(2) = 14 + 18 = 32
% c(4) = a(2)*b(3) = 21
Compatibility
Real and complex valued scalars and vectors. Multi-dimensional arrays are not supported.
See Also
fft (users)
ifft (users)
convdeintrlv
Permute data with specified shift register group
Syntax
Y = convdeintrlv(X,FIFONum,Delta)
Y = convdeintrlv(X,FIFONum,Delta,InitState)
[Y,FinalState] = convdeintrlv(X,FIFONum,Delta,...)
Definition
Examples
Compatibility
See also
Syntax
cBits = convenc(uBits,TRELLIS)
cBits = convenc(uBits,TRELLIS,puncPat)
cBits = convenc(uBits,TRELLIS,puncPat,initState)
Definition
Examples
Compatibility
See also
Syntax
Y = convintrlv(X,FIFONum,Delta)
Y = convintrlv(X,FIFONum,Delta,InitState)
[Y,FinalState] = convintrlv(X,FIFONum,Delta,...)
Definition
[] --FIFO 1
[1] --FIFO 2
[2 3] --FIFO 3
[4 5 6], --FIFO 4
106
SystemVue - Users Guide
[Y,FinalState] = convintrlv(X,FIFONum,Delta,...) returns final state of
shiftregisters in FinalState which may be used as initial state of the nextprocess
when dealing with consecutive data. FinalState is a struct composedof variables
FinalState.value and FinalState.index. FinalState.value has thesame number of
columns as X, each stores the final state of shift registers(from first to last) after
processing the corresponding column of X.FinalState.index represents the index
of the shift register from which thenext consecutive processing shall begin.
Examples
Compatibility
See also
Definition
cos returns the cosine of a radian-valued argument. This function operates on an part-by-
part basis on arrays.
Examples:
Formula Result
cos( 0 ) 1
cos( pi ) -1
cos( pi / 2 ) 0
cos( pi / 4) 0.707
cos( [2*pi/3; pi/2] ) [-0.5; 0]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
cosd (users)
sin (users)
tan (users)
cosd
Syntax
y = cosd(x)
Definition
cosd returns the cosine of a degree-valued argument. This function operates on an part-
by-part basis on arrays.
Examples:
Formula Result
cosd( 0 ) 1
cosd( 180 ) -1
cosd( 90 ) 0
cosd( 45 ) 0.707
cosd( [60; 90] ) [-0.5; 0]
Compatibility
Numeric scalars, Vectors, Arrays
107
SystemVue - Users Guide
See Also
cos (users)
cosh
Syntax
y = cosh( x )
Definition
cosh returns the hyperbolic cosine of the argument, equivalent to (exp(x) + exp(-x)) / 2.
This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
cosh( 1 ) 1.543
cosh( pi / 3 ) 1.6
cosh( [pi/6; 0] ) [1.14; 1]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
acosh (users)
cot
Syntax
y = cot(x)
Definition
cot returns the cotangent of a radian-valued argument, which is equivalent to 1 / tan(x).
This function operates on an part-by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
cotd
Syntax
y = cotd(x)
Definition
cotd returns the cotangent of a degree-valued argument. This function operates on an
part-by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
coth
Syntax
y = coth(x)
Definition
coth returns the hyperbolic cotangent of the argument. This function operates on an part-
by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
crcdec
cyclic redundancy check decoder
Syntax
108
SystemVue - Users Guide
[msg, errFlag, syndrome] = crcdec(code, genPoly, initState)
Definition
Examples
Compatibility
See also
crcenc (users)
crcenc
cyclic redundancy check encoder
Syntax
Definition
Examples
109
SystemVue - Users Guide
Compatibility
See also
crcdec (users)
csc
Syntax
y = csc(x)
Definition
csc returns the cosecant of a radian-valued argument. This function operates on an part-
by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
cscd
Syntax
y = cscd(x)
Definition
cscd returns the cosecant of a degree-valued argument. This function operates on an part-
by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
csch
Syntax
y = csch(x)
Definition
csch returns the hyperbolic cosecant of the argument. This function operates on an part-
by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
cumprod
Syntax
b = cumprod(a)
b = cumprod(a,dim)
Definition
Returns the cumulative product of a vector. If a is a vector, then cumprod finds the
cumulative product of all the parts and returns it in a vector, b. If a is a matrix, then
cumprod finds the cumulative product of each column and returns it in a matrix b, whose
dimensions are the same as a.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
cumprod( [1 2 3 4] ) [1 2 6 24]
cumprod( [1 2 3 4;5 6 7 8] ) [1 2 3 4;5 12 21 32]
cumprod( [1 2 3 4;5 6 7 8], 2 ) [1 2 6 24;5 30 210 1680]
110
SystemVue - Users Guide
Compatibility
Numeric vectors and arrays
See Also
cumsum (users)
cumsum
Syntax
b = cumsum(a)
b = cumsum(a, dim)
Definition
Returns the cumulative sum of a vector. If a is a vector, then cumsum finds the
cumulative sum of all the parts and returns it in a vector, b. If a is a matrix, then cumsum
finds the cumulative sum of each column and returns it in a matrix b, whose dimensions
are the same as a.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
cumsum( [1 2 3 4] ) [1 3 6 10]
cumsum( [1 2 3 4;5 6 7 8] ) [1 2 3 4;6 8 10 12]
cumsum( [1 2 3 4;5 6 7 8], 2 ) [1 3 6 10;5 11 18 26]
Compatibility
Numeric vectors and arrays
See Also
cumprod (users)
dbg_print
Syntax
dbg_print( 'message' )
Definition
This function can be invoked from within a set of equations on an equations page in order
to report execution status to the Equation Debug window. Note that the window for
debugging equations is not the same as the Error Log. The debug window can be invoked
by selecting View > Advanced Windows > Equation Debug.
Examples:
Note the difference between the reporting windows and formats for debug and non-debug
messages.
111
SystemVue - Users Guide
Compatibility
string
See Also
error (users)
dbg_showvar (users)
warning (users)
dbg_showvar
Syntax
dbg_showvar( name, variable )
Definition
This function can be invoked from within a set of equations on an equations page in order
to report the current value of a variable to the Equation Debug window by the supplied
name. Note that the window for debugging equations is not the same as the Error Log.
The debug window can be invoked by selecting View > Advanced Windows > Equation
Debug.
Examples:
In the following example the use model of dbg_showvar() is shown along side that of
other relevant Mathematical Language functions.
112
SystemVue - Users Guide
Formula Message in Equation Debug
dbg_showvar( 'Expression', 2+3 ); 'Expression = 8-byte Real: 5'
string1 = 'hello world'; 'Greeting = Array[1x11] of type Char: hello world'
dbg_showvar( 'Greeting', string1 );
vector1 = [1 2 3]; 'Vector = Array[1x3] of type 8-Byte Real: 1 2 3'
dbg_showvar( 'Vector', vector1 );
array1 = [1 2; 3+2j, 9]; 'Array = Array[2x2] of type 16-Byte Complex: 1 2 3+2i, 9'
dbg_showvar( 'Array', array1 );
cell1 = {'This','is','a','sentence','.'}; 'Cell = Array[1x5] of type Variant: [1x4 char] [1x2 char] ['a']
dbg_showvar( 'Cell', cell1 ); [1x8 char] ['.']'
struct1 = struct('name',{'Jane','Doe'},'AgE', 'Struct = Array[1x2] of type Object:[1x2\ struct] with fields:
37); name AgE'
dbg_showvar( 'Struct', struct1 );
Compatibility
name - string
variable - any pre-defined variable or expression
See Also
error (users)
dbg_print (users)
warning (users)
de2bi
convert decimal numbers to binary vectors
Syntax
b = de2bi(d)
b = de2bi(d,n)
b = de2bi(d,n,p)
b = de2bi(d,[],p)
b = de2bi(d,flg)
b = de2bi(d,n,flg)
b = de2bi(d,n,p,flg)
b = de2bi(d,[],p,flg)
Definition
Examples
Compatibility
113
SystemVue - Users Guide
See also
bi2de (users)
dec2hex
Decimal to hexadecimal number string conversion
Syntax:
dec2hex(number[,places])
Definition:
dec2hex function converts a decimal number to a hexadecimal number string. Places is an
optional field, specifying to zero pad to that number of spaces. If places is too small or
negative #NUM! error is returned.
Examples:
dec2hex(42) equals 2A.
See Also:
hex2dec (users)
decimate
filter signal with lowpass filter and then downsample it
Syntax
Y = decimate(X,R)
Y = decimate(X,R,N)
Y = decimate(X,R,'FIR')
Y = decimate(X,R,N,'FIR')
Definition
Examples
Compatibility
See also
downsample (users), interp (users), resample , filtfilt , fir1 (users), cheby1 (users)
deconv
Syntax
[a,b] = deconv(c,d)
Definition
[a,b] = deconv(c,d) deconvolves a vector d out of a vector c and returns it in vector a,
114
SystemVue - Users Guide
and the remainder in b so that c = conv(d,a) + b.
Examples:
Formula Result
b = [1 2 3 4] q = [10 20 30]
a = [10 20 30] r = [0 0 0 0 0 0]
[q,r] = deconv(a,b)
Compatibility
vector
See Also
conv (users)
deintrlv
reorder data back with specified permutation table
Syntax
Y = deintrlv(X,PermTab)
Definition
Examples
b =
10 70
20 80
30 90
40 100
50 110
60 120
Compatibility
See also
intrlv (users)
depuncture
restores erasures based on puncture pattern
Syntax
Y = depuncture(X, puncPat)
Definition
Examples
x = [1 3 4 5 7 8 9];
puncPat = [1 0 1 1];
y = puncture(x,puncPat); then,
y = [1 0 3 4 5 0 7 8 9 0]
Compatibility
See also
diag
Syntax
V = diag(x [, a])
v = diag(X)
Definition
If x is a vector, diag(x) gives a matrices V with x on main diagonal. diag(x, a) returns an
abs(a)+n (if there are n parts in x) square matrix with the parts of a on the a-th diagonal,
main diagonal when a = 0, upper diagonal when a>0, and lower diagonal when a<0.
If X is a matrix, diag(X) returns its main diagonals to a column vector v.
Examples:
Formula Result
diag([2,3]) [2, 0; 0, 3]
diag( [1,5], 1) [0, 1, 0; 0, 0, 5; 0, 0, 0]
diag([1 2 3; 4 5 6; 7 8 9]) [1; 5; 9]
Compatibility
Numeric vectors, Vectors, Matrices
diff
Syntax
A = diff(B)
A = diff(B,r)
A = diff(B,r,dim)
Definition
text here
A = diff(B) returns, in the vector A, the difference between each part in B.
A = diff(B,r) recurses the diff function r times, to find the rth difference.
A = diff(B,r,dim) recurses the diff function r times, to find the rth difference in the scalar
dimension dim. If r>= dim, then an empty array is returned.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
B = [1 5 15 35] [4 10 20]
A = diff(B)
N = diff(A) [6 10]
Z = diff(A,2) [4]
Compatibility
scalar, vector, array
See Also
prod (users)
116
SystemVue - Users Guide
sum (users)
downsample
downsample input signal
Syntax
Y = downsample(X,R)
Y = downsample(X,R,OFFSET)
Definition
Examples
x = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20].';
y = downsample(x, 4);
z = upsample(x, 4, 1);
p = [1 5 9 13 17].'; % y equals to p
q = [2 6 10 14 18].'; % z equals to q
Compatibility
See also
upsample (users), upfirdn (users), interp (users), decimate (users), resample
eig
Syntax
X = eig(Y)
X = eig(Y,Z)
[U,X] = eig(Y)
[U,X] = eig(Y,Z)
[U,X] = eig(Y,Z,flag)
Definition
X = eig(Y) returns, in vector X, the eigenvalues of the matrix Y.
[U,X] = eig(Y,Z) produces a diagonal matrix, X, that contains the generalized eigenvalues,
and a full matrix, U, containing the eigenvectors in columns, so: Y*U = Z*U*X
Examples:
117
SystemVue - Users Guide
Formula Result
Z =[ 3 -2 -.9 2*eps; Z*VZ - VZ*DZ
-2 4 1 -eps; Z*VY - VY*DY
-eps/4 eps/2 -1 0;
-.5 -.5 .1 1 ]
[VZ,DZ] = eig(Z)
[VY,DY] = eig(Z,'nobalance')
ellip
Syntax
[num, denom] = ellip( order, passnormripple, stopnormripple, normfreq, ftype, domain )
or
[zeros, poles, gain] = ellip( order, passnormripple, stopnormripple, normfreq, ftype,
domain )
Parameters
Examples:
Note that while zeros and poles are expressed as column vector, numerator and
denominator coefficients are expressed as row vectors. Gain is always expressed as a real
valued scalar variable.
Definition
This function is used to create arrays of various sizes containing the default tolerance of a
machine in distinguishing between absolute 1.0 and the next higher floating point number.
On machines with IEEE floating point arithmetic, the value of eps is 2^(-52) = 2.2204e-
16. The function returns a m by n by ... array with every part equal to 2.2204e-16. If only
one argument is specified and it is a scalar m, then an m x m matrix is returned. A vector
of dimensions may also be passed in. The optional class argument is a string that specifies
the data type of the array to return.
Examples:
Formula Result
y = eps( 3 , 2 ) y = [ 2.2204e-16, 2.2204e-16 ; 2.2204e-16, 2.2204e-16 ; 2.2204e-16, 2.2204e-16 ]
y = eps( 2 ) y = [ 2.2204e-16, 2.2204e-16; 2.2204e-16, 2.2204e-16]
y = eps( [5 1] ) y = [ 2.2204e-16; 2.2204e-16; 2.2204e-16; 2.2204e-16; 2.2204e-16 ]
See Also
ones (users)
zeros (users)
erf
Syntax
y = erf(x)
Definition
This function computes the error function of each part of x.
The parts of x must be real.
Examples:
Formula Result
erf( -1.5) -0.9661
erf( 2 ) 0.9953
erf( [-1; -2; 1.1] ) [-0.8427; -0.9953;
0.8802]
Compatibility
Real valued scalars, vectors, arrays
See Also
erfc (users)
erfc
Syntax
y = erfc(x)
Definition
This function computes the complementary error function of each part of x.
The parts of x must be real.
Examples:
Formula Result
erfc( -1.5) 1.9661
erfc( 2 ) 0.0047
erfc( [-1; -2; 1.1] [1.8427; 1.9953;
) 0.1198]
Compatibility
Real valued scalars, vectors, arrays
119
SystemVue - Users Guide
See Also
erf (users)
error
Syntax
error('message')
Definition
Posts the error message to the error log and also places the red error symbol on the menu
button.
Examples:
Formula Result
error( 'out of range') the message "out of range" is posted to the Error Log as an error
Compatibility
Strings
See Also
warning (users)
exist
Syntax
y = exist( Name, Kind, Scope)
Definition
This function checks the existence of a variable or a built-in function. The Name, Kind, and
Scope arguments must be strings. Kind and Scope are optional arguments, whereas Name
is mandatory. The value of Name must be the name of a variable or built-in function. The
exist functions returns 1 if Name is a variable in the Scope, and 5 if it is builtin function,
and 0 if the specified Name is not found in the Scope.
If Kind is specified then only that kind is searched for existence. The supported values for
Kind are 'var' and 'builtin'.
Default value for an Scope is 'global', a Scope argument can only be specified if Kind =
'var'. The Scope can be either a 'global', a 'local' or the name of a dataset.
Examples:
120
SystemVue - Users Guide
Formula Result
iCode = exist( 'x') set the variable iCode to 1 if 'x' is a variable name in global scope
iCode = exist( 'sin') set the variable iCode to 5 because 'sin' is a built-in function
iCode = exist( 'sin','var') set the variable iCode to 0 because 'sin' is a built-in function but it is not
of Kind 'var'
iCode = exist( 'x','builtin') set the variable iCode to 0 even if the variable named 'x' exist as it is
not a built-in function
iCode = exist( set the variable iCode to 1 if S1 is a variable present in dataset
'S1','var','Design1_Data') 'Desing1_Data'
Compatibility
Name, Kind, and Scope are strings.
See Also
getvariable (users)
setvariable (users)
exp
Syntax
y = exp(x)
Definition
This function returns the exponential of the argument. The exponential function calculates
e to the power of x, where e = 2.7182817... This function operates on an part-by-part
basis on arrays.
Examples:
Formula Result
exp( 1 ) 2.718
exp( [ 0 , 1.5 ] ) [ 1 , 4.482 ]
exp( [ -0.5 , 0.5 ; -2 , 2 ] ) [ 0.607 , 1.649 ; 0.135 , 7.389 ]
Compatibility
Numeric scalars, Vectors, Arrays. Real and Complex.
eye
Syntax
y = eye( n )
y = eye( m, n )
y = eye( size(A) )
Definition
Y = eye( n ) returns the n-by-n identity matrix.
Y = eye( m, n ) or eye( [m n] ) returns an m-by-n matrix with 1's on the diagonal and 0's
elsewhere.
Examples
X = eye( 4, 5 );
eyediag
Syntax
y = eyediag( x, symbolRate, numCycles, startupDelay )
Definition
This function builds an eye diagram from a time sequence x.
121
SystemVue - Users Guide
Parameter Comment Unit Requirement Compatibility Default
x one-dimensional time sequence waveform V required real-valued
symbolRate rate of input sequence Hz required real > 0.0
numCycles number of unit intervals to be plotted >= 1 optional integer >=1 1
startupDelay number of samples that will be removed from optional integer > 0 0
beginning of time sequence before plotting >= 0
Examples:
y = eyediag( x, 2*5e3, 1, 23 )
Note that the following eye diagram was derived from a sinusoid at 5 kHz, so the unit
interval was half of the 200 usec period, or just 100 usec. The data-rate or symbol-rate of
this simple waveform is therefore 1/unit interval or 10 kHz. The eye-diagram itself was
delayed by 23 samples to demonstrate the time-shift propert of this function.
fclose
Syntax
fclose( fileP )
Definition
This function closes the file stream referenced by fileP and returns a 0 if the operation is
successful.
Examples:
fft
Syntax
V = fft(X)
V = fft(X,n)
V = fft(X,[],c)
V = fft(X,n,c)
Definition
Discrete Fourier Transform (DFT) of data. Computed with FFT algorithm when possible.
The parameter len is the FFT length and is optional.
fft(X) gives the discrete Fourier transform of vector X.
fft(X,n) returns the n-point DFT. X adds zeros if n>length of X, X is truncated if n<length
of X.
fft(X, [], c) gives the FFT on the dimension c.
Examples:
The following example generates a signal consisting of the sum of two sinusoids: one at
400 Hz, and one at 1500 Hz. The fft function is then used to compute the spectrum of the
signal.
Compatibility
Vectors, Arrays, Dataset
See Also
ifft (users)
fftfilt
FFT-based FIR filtering using overlap-add method
Syntax
Y = fftfilt(B,X)
Y = fftfilt(B,X,N)
Definition
123
SystemVue - Users Guide
3. If X is a matrix and B is a vector, FFTFILT filters each column of X with B and returns
a matrix with the same number of columns as X.
If X is a matrix and B is a matrix, FFTFILT filters each column of X with the
corresponding column of B.
If X is a vector and B is a matrix, FFTFILT filters X with each column of B
respectively, the result is the same as that when X is a matrix with the same number
of columns as B and all columns are the same.
4. FILTER performs length(B) points of multiplications for each sample. FFTFILT
performs N*log2(N)/2 + N + N*log2(N)/2 or N*(1+log2(N) points of complex
multiplication for every N-length(B)+1 samples. For complex X and complex B, the
cost ratio of FFTFILT to FILTER is approximately (1+log2(N))*N/(N-
length(B)+1)/length(B). By default, N is selected a value that minimize the ratio.
Examples
Compatibility
See also
filter (users), filtfilt
fftshift
Syntax
Y=fftshift(X)
Definition
If X is the output of fft(V):
fftshift(X) moves the zero-frequency to the center,
If X is a vector:
fftshift(X) swaps the left and right
If X is a Matrix:
fftshift(X) swaps the first quadrant with the third and the second quadrant with the fourth.
Examples:
Formula Result
x=[1 2; 3 y=[4, 3; 2, 1]
4]
Compatibility
Vectors, Arrays
See Also
fft (users)
ifft (users)
fgetl
Syntax
y = fgetl( fileP )
Definition
This function gets the next line from an open file and presents it in a string, after
discarding the newline character.
Examples:
124
SystemVue - Users Guide
See Also
fclose (users)
fgets (users)
fopen (users)
fread (users)
fprintf (users)
fscanf (users)
fwrite (users)
tcpip (users)
fgets
Syntax
y = fgets( fileP )
y = fgets( fileP, maxChars )
Definition
This function gets the next line from an open file and presents it in a string, including the
newline character.
Use the argument maxChars to specify the maximum number of character to read. At
most_maxChars_ characters will be returned.
Compatibility
fileP - pointer to an open file that is ready for reading
maxChars - maximum number of characters to be read from the next line
See Also
fclose (users)
fgetl (users)
fopen (users)
fread (users)
fprintf (users)
fscanf (users)
fwrite (users)
tcpip (users)
filter
Syntax
y = filter(b,a,X)
[y,zf] = filter(b,a,X)
Definition
y = filter(b,a,X)filters the data in vector/matrix X with the filter described by numerator
coefficient vector b and denominator coefficient vector a.
[y,zf] = filter(b,a,X) returns the final conditions, zf, of the filter delays. If X is a row or
column vector, output zf is a column vector of max(length(a),length(b))-1.
Examples:
Formula Result
X = [1:0.4:6]'; ans =
windowSize = 4; ? 0.25
filter(ones(1,windowSize)/windowSize,1,X) ? 0.6
? 1.05
? 1.6
?2
? 2.4
? 2.8
? 3.2
? 3.6
?4
? 4.4
? 4.8
? 5.2
125
SystemVue - Users Guide
Compatibility
Vectors, Matrices
See Also
text here
find
Syntax
i = find(A)
I = find(A, n)
I = find(A, n, 'first')
I = find(A, n, 'last')
[r,c] = find(A, ...)
[r,c,x] = find(A, ...)
Definition
i = find(A) returns the indices of all the nonzero parts in array A and places them in vector
i.
I = find(A n) returns an n number of indices of all the nonzero parts in an array A and
places them in vector i. adding a 'first' argument means that it returns the first n indices
of all the nonzero parts, and adding a 'last' argument means that it returns the last n
indices.
[r,c] = find(A, ...) finds all the nonzero parts in array A and returns the row location, in r,
and column location, in c.
[r,c,x] = find(A, ...) finds all the nonzero parts in array A and returns the row location, in
r, and column location, in c, as well as returning the nonzero parts in a vector, x.
Examples:
Formula Result
find( [ 1, 0, 2, 0, 3, 5]) [1, 3, 5, 6]
find( [ 1, 0, 2; 0, 3, 5], 3) [1, 4, 5]
find( [ 1, 0, 2; 0, 3, 5], 2, 'last') [5,6]
Compatibility
Numeric arrays
finddelay
estimate delay(s) between signals
Syntax
D = finddelay(X,Y)
D = finddelay(X,Y,MAXLAG)
Definition
126
SystemVue - Users Guide
Examples
Compatibility
See also
findstr
Find a string within another, longer string
Syntax:
k = findstr(str1,str2)
Definition:
k = findstr(str1,str2) searches the longer of the two input strings for any occurrences of
the shorter string, returning the starting index of each such occurrence in the double
array, k. If no occurrences are found, then findstr returns the empty array, [].
The search performed by findstr is case sensitive. Any leading and trailing blanks in either
input string are explicitly included in the comparison
Examples:
Formula Result
s = 'Find the starting indices of the shorter string.';
findstr(s,'the') 6 30
findstr('the',s) 6 30
Compatibility:
String, array
See Also:
strtok (users)
strfind (users)
fir1
Syntax
coefs = fir1( order, bandEdge, filterType, window, normalization )
Definition
This function returns a vector containing n+1 coefficients for a finite impulse response
(FIR) filter of order=n.
Parameters
127
SystemVue - Users Guide
Parameter Description Requirement Compatibility Default Example
order order of FIR filter required integer >= 1 5
bandEdge a scalar defining required 0 < real < 1 [0.25
normalized passband edge 0.75]
frequency for lowpass and
highpass filters or a 2-part
vector defining normalized
lower and upper passband
edge frequencies for
bandpass and bandstop
filters
filterType filter response type: optional {'low','high','pass','stop'} 'low' if 'high'
lowpass, highpass, bandEdge is a
bandpass, bandstop scalar; 'pass' if
bandEdge is a
2-part vector
window a vector containing order optional real rectangular [1 1 1]
+1 window coefficients window with
length order+1
normalization specifies whether or not optional {'scale','noscale'} 'scale' 'noscale'
the filter passband
magnitude is normalized to
0 dB
If all or any subset of the last three optional parameters are specified, they should be
specified in order.
Examples:
Formula Result
fir1( 5,0.1 ) [0.0264077,0.140531,0.333061,0.333061,0.140531,0.0264077]
fir1( 5,[0.1,0.9],'pass' ) [0,-0.134665,0.572442,0.572442,-0.134665,0]
See Also
filter (users)
fix
Syntax
y = fix(x)
Definition
fix rounds the argument toward zero, producing integer. This function operates on an
part-by-part basis on arrays.
Examples:
Formula Result
fix( 2.2) 2
fix( 2.2 + 3.3j) 2 + 3j
fix( -2.3 - 3.9j) -2 - 3j
Compatibility
Numeric scalars, Vectors, Arrays
See Also
floor (users)
flipdim
Syntax
Y = flipdim(X, dim)
Definition
This function returns an array Y which is X flipped along a dimension dim. For example, if
dim is 1, X is flipped row-wise down (same as flipud). If dim is 2, X is flipped column-wise
left to right (same as fliplr).
128
SystemVue - Users Guide
Examples:
Formula Result
X = [1 2; 3 4; 5 6] Y = [5 6; 3 4; 1
flipdim(X, 1) 2]
X = [1 2; 3 4; 5 6] Y = [2 1; 4 3; 6
flipdim(X, 2) 5]
Compatibility
Arrays
See Also
flipud (users)
fliplr (users)
fliplr
Syntax
Y = fliplr(X)
Definition
This function returns X, except it flips the columns about the vertical axis, so in the left to
right direction.
If X is a column vector, then the function just returns the original X. If X is a row vector,
then a vector the same dimensions as X is returned but with the parts flipped left to right.
Examples:
Formula Result
X = [1, 4; 2, 5; 3, 6] Y = [4, 1; 5, 2; 6,
3]
Y = fliplr(X)
X = [1, 2, 3, 4, 5] Y = [5, 4, 3, 2, 1]
Y = fliplr(X)
X = [1;2;3;4;5] Y = [1;2;3;4;5]
Y = fliplr(X)
Compatibility
array
See Also
flipud (users)
flipdim (users)
flipud
Syntax
Y = flipud(X)
Definition
This function returns X, except it flips the rows about the horizontal axis, so in the up-
down direction.
If X is a row vector, then the function just returns the original X. If X is a column vector,
then a vector the same dimensions as X is returned but with the parts flipped up-down.
Examples:
Formula Result
X = [1, 4; 2, 5; 3, 6; Y = [3, 6; 2, 5; 1,
Y = flipud(X) 4]
X = [1;2;3;4;5] Y=[5;4;3;2;1]
Y = flipud(X)
X = [1,2,3,4,5] Y = [1,2,3,4,5]
Y = flipud(X)
Compatibility
array
129
SystemVue - Users Guide
See Also
fliplr (users)
flipdim (users)
floor
Syntax
y = floor(x)
Definition
floor returns the largest integer less than or equal to the argument. This function operates
on an part-by-part basis on arrays.
Examples:
Formula Result
floor( 10 ) 10
floor( 1.5 + 6.2j) ) 1
floor( [ -0.5, 0.5 ] ) [ -1 , 0 ]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
ceil (users)
fopen
Opens a file to read, write or append.
Syntax
Definition
This function performs file access and returns a handle fileP to the beginning of a file
whose name is filename enclosed in single quotes. The file name can be an absolute path
or a relative path. An extension for the file name is optional. The operationFormat is
specified in operationFormat. Supported operations are:
If two outputs are expected, the first one will be the handle fileP and the second one will
be an appropriate message indicating whether the file was successfully opened or not.
Note that for binary files, the functions fread (users) and fwrite (users) should be used for
file access.
Example
fileP = fopen( 'C:\TEMP\test.txt' ) will open the existing test.txt file for reading.
130
SystemVue - Users Guide
fileP = fopen( 'C:\TEMP\test.txt', 'w' ) will create the test.txt file and open it for writing.
See Also
fclose (users)
fgetl (users)
fgets (users)
fread (users)
fprintf (users)
fscanf (users)
fwrite (users)
tcpip (users)
fprintf
Syntax
count = fprintf( fid, format, A, ...)
Definition
Formats data from a matrix A or set of matrix ... and writes results to a file fid. count is
the number of elements that were written to the file.
Compatibility
The first argument is a file handle which is returned from a call to fopen, followed by a
format string and then by one or more matrix arguments.
The format string is of the form (only the leading % and conversionChar are required):
%{flags}{fieldWidth}{.precision})conversionChar
Flags are used to control the alignment of the output. Valid flags are:
Precision specifies the number of digits to be printed after the decimal point
Character Description
c Character sequence
d or i Signed decimal integer
e Scientific notation (mantise/exponent) using e character
E Scientific notation (mantise/exponent) using E
character
f Decimal floating point
g Use the shorter of %e or %f
G Use the shorter of %E or %f
o Signed octal
s String of characters
u Unsigned decimal integer
x Unsigned hexadecimal integer
X Unsigned hexadecimal integer (capital letters)
See Also
fclose (users)
fgetl (users)
fgets (users)
fopen (users)
131
SystemVue - Users Guide
fread (users)
fscanf (users)
fwrite (users)
tcpip (users)
fread
Reads binary data from a file.
fread supports both TCP/IP and FILE I/O connections.
TCP/IP
Syntax
cIn = fread( cStream, iValues, cConvert)
Definition
Read some amount of binary data from the stream.
Examples:
Formula Result
dOut = fread( t, 12, 'double') read 12 doubles from the input and save them as doubles (the default).
FILE I/O
Description
Formula Result
fread(fileP) reads the contents of the file pointed to by the handle fileP (obtained from fopen.) The file is
read from beginning to end and fileP is finally positioned at the end of the file.
mat=fread(fileP) does exactly the above and returns a matrix mat with the contents of the file.
Compatibility
Scalars, Vectors, Arrays. Real and Complex and Character.
See Also:
fclose (users)
fgetl (users)
fgets (users)
fopen (users)
fprintf (users)
fscanf (users)
fwrite (users)
tcpip (users)
(2 bytes per character for unicode).
This will consume 22 bytes of input data.|
fscanf
Syntax
A = fscanf( fileP, format )
A = fscanf( fileP, format, size )
132
SystemVue - Users Guide
Definition
This function reads data from a file represented by a file handle fileP and converts it to a
string using format. The result is returned in a matrix A.
An optional argument can be passed size, to specify the amount of data in the resulting
matrix.
Compatibility
fileP - file pointer to an open file ready for reading
format - string description of format in which to access contents of file, e.g. '%f' for
floating-point
c Character sequence
d or i Signed decimal integer
e Scientific notation (mantise/exponent) using e character
E Scientific notation (mantise/exponent) using E
character
f Decimal floating point
g Use the shorter of %e or %f
G Use the shorter of %E or %f
o Signed octal
s String of characters
u Unsigned decimal integer
x Unsigned hexadecimal integer
X Unsigned hexadecimal integer (capital letters)
See Also
fclose (users)
fgetl (users)
fgets (users)
fopen (users)
fprintf (users)
fread (users)
fwrite (users)
tcpip (users)
fwrite
Writes binary data to a file.
fwrite supports both TCP/IP and FILE I/O operations.
TCP_IP
Syntax
iWritten = fwrite( cStream, Value)
133
SystemVue - Users Guide
iWritten = fwrite( cStream, Value, Precision, Mode)
Definition
Write some amount of binary data to the stream.
Examples:
Formula Result
iOut = fwrite( t, 12) Write the value 12 to the stream as a single byte.
iOut = fwrite( t, [1, 2], 'int', 'async') Write the vector [1 2] to the stream as two integers.
iOut = fwrite( t, 22, 'sync') Write the value 22 synchronously to the stream as a single byte.
FILE I/O
Description
Formula Result
fwrite(fileP, mat) will write the contents of matrix mat to the file pointed to by the handle fileP
(obtained from fopen.) Data is written to the file in column order.
counter=fwrite(fileP, will do exactly the above. In addition it will return a counter with the number of
mat) elements successfully written to the file.
Note: Until the file is closed using the fclose (users) function, the contents of that fill
cannot be viewed.
Compatibility
Scalars, Vectors, Arrays. Real and Complex and Character.
See Also
fclose (users)
fgetl (users)
fgets (users)
fopen (users)
fprintf (users)
fread (users)
fscanf (users)
tcpip (users)
gaussfir
Gaussian FIR Pulse-Shaping Filter Design
Syntax
H=gaussfir(BT)
H=gaussfir(BT,NT)
H=gaussfir(BT,NT,OF)
Definition
1. H=gaussfir(BT) designs a low pass FIR gaussian pulse-shaping filter. BT is the 3-dB
bandwidth-symbol time product where B is the one-sided bandwidth in Hertz and T is
in seconds.
2. H=gaussfir(BT,NT) NT is the number of symbol periods between the start of the filter
impulse response and its peak. If NT is not specified, NT = 3 is used.
3. H=gaussfir(BT,NT,OF) OF is the oversampling factor, that is, the number of samples
per symbol. If OF is not specified, OF = 2 is used.
4. The length of the impulse response of the filter is given by 2*OF*NT+1. Also, the
134
SystemVue - Users Guide
coefficients H are normalized so that the nominal passband gain is always equal to
one.
Examples
Compatibility
See also
gausswin
Syntax
c = gausswin(L)
c = gausswin(L,alpha)
Definition
This function returns, in the column vector c, a Gaussian window with L-points and a
window width parameter alpha. The default value of alpha is 2.5. The width of the window
is inversely related to the value of alpha as shown in the graph below.
Note
gausswin(2), a redundant usage of this function returns [0.458 0.458], whereas gausswin(1) returns [1].
Examples:
In the following graph, 13-point Gaussian windows are overlaid for alpha in the range
[1.5,3.5]. Vector values at each sample point are shown. The default behavior of alpha
=2.5 is shown in green.
Note that the values at the end points of the vector are not forced to zero but rather
determined by the value of alpha.
Compatibility
scalar
135
SystemVue - Users Guide
See Also:
bartlett (users)
blackman (users)
hamming (users)
hann (users)
rectwin (users)
getindep
Syntax
y = getindep( x )
Definition
Returns a string with the name(s) of the independent variable(s). x is the variable to
check.
Examples:
Formula Result
n=getindep(S) if S is a linear analysis result this will usually return "Linear_Data\Eqns\VarBlock\F" (the
longname of F)
n=getindep(VPORT) in a HARBEC analysis this will return "HbData\Eqns\VarBlock\Freq" - the Frequency
vector
Compatibility
Swept vectors, arrays
See Also
setindep
getindepvalue
Syntax
y = (x)
Definition
text
Examples:
Formula Result
Compatibility
text
See Also
text
getunits
Syntax
y = getunits( x )
Definition
Returns an integer corresponding to the units of a variable x. This integer may be used by
setunits.
Examples:
136
SystemVue - Users Guide
Formula Result
z=1 y = 9001
setunits( "z" , "V" )
y = getunits( z )
z=1 y = 6002
setunits( "z" , "mil" )
y = getunits( z )
z=1 y = 4003
setunits( "z" , "H" )
y = getunits( z )
Compatibility
Numeric scalars, vectors, arrays
See Also
setunits
getvariable
Syntax
y = getvariable( Dataset, Variable)
[y, yindep] = getvariable( Dataset, Variable)
Definition
This function gets a variable value (and, optionally, the value of its independent variable)
from a dataset. The Dataset and Variable arguments must be strings. If an independent
value is requested but the referenced variable doesn't have one, a warning is issued and
yindep is set to a blank value.
Examples:
Formula Result
OutVar = getvariable( 'OutData', set the variable OutVar from the dataset variable OutData.OutVar
'OutVar')
myVar = getvariable( 'Out', 'Var') set the variable myVar from the dataset variable Out.Var
[myVar, myIndep] = getvariable( set the variable myVar from the dataset variable out.Var and set myIndep
'Out', 'Var' ) to Out.Var's independent value
Compatibility
Dataset and Variable are strings.
See Also
setvariable (users)
hamming
Syntax
c = hamming(L)
Definition
This function returns a Hamming window with L points into a column vector, c.
Note
hamming(2) a redundant usage of this function returns [0.08 0.08] whereas hamming(1) returns [1].
Examples:
137
SystemVue - Users Guide
Compatibility
scalar
See Also:
bartlett (users)
blackman (users)
gausswin (users)
hann (users)
rectwin (users)
hankel
Syntax
hm = hankel( col )
hm = hankel( col,row )
Definition
This function returns a Hankel matrix whose first column is defined by the argument col
and whose parts start at zero below the first anti-diagonal.
If the row argument is specified, then the first column is col , and last row is row. If the
last part in col suppresses the first part in row, if the two values happen to be different.
Examples:
col = [1,2,5];
row = [7,8,9,10];
% Note that col(length(col)) == 5 ~= 7 == row(length(row)),
% therefore, the (3,1), (2,2) and (1,3) parts of the Hankel matrix will be 5.
hm = hankel( col, row )
% hm = [ 1, 2, 5, 8 ;
% 2, 5, 8, 9 ;
% 5, 8, 9, 10 ]
% Note how the left-upper triangular section of the matrix corresponds to the column vector
% and the right-lower triangular section corresponds to the row vector.
Compatibility:
col - Numeric valued vector
row - Numeric valued vector
138
SystemVue - Users Guide
hann
Syntax
c = hann(L)
Definition
This function returns a hann window with L points into a column vector, c.
Note
hann(2) a redundant usage of this function returns [0 0] whereas hann(1) returns [1].
Examples:
Compatibility
scalar
See Also:
bartlett (users)
blackman (users)
gausswin (users)
hamming (users)
rectwin (users)
hex2dec
Convert a hexadecimal string to decimal number
Syntax:
139
SystemVue - Users Guide
hex2dec('hex_value')
Definition:
The hex2dec function converts a hexadecimal number string to its decimal equivalent.
Examples:
Formula Result
d = hex2dec('3ff') d stores the conversion of hex no '3ff' in
decimal i.e. d = 1023
d = hex2dec(S) where S is a character array S[0]= 0FF, 255, 734, 291
s[1]=2DE & s[2]=123
Compatibility:
This function is Excel compatible.
See Also:
dec2hex (users)
hilbert
Syntax:
V = hilbert(X)
V = hilbert(X,n)
V = hilbert(X,[],c)
V = hilbert(X,n,c)
Definition:
Computes the analytic signal from a real data vector using the Hilbert Transform, where
the Discrete Fourier Transform is used to calculate the Hilbert Transform. In the resulting
complex vector the original real vector values are stored in the real part, and the
imaginary part is the Hilbert Transform of the real vector.
hilbert(X) calculates the analytic signal of vector X. If X is a matrix, the analytic signal is
computed for each column.
hilbert(X,n) returns the n-point analytic signal. X is extended by adding zeros if n>length
of X, X is truncated if n<length of X.
hilbert(X, [], c) calculates the analytic signal on the dimension c.
Examples:
The following example creates a simple sinusoid at 400Hz then generates the analytic
signal from that waveform. The resulting complex vector will contain the original sine
wave as the real part, and a cosine wave (the Hilbert transform) as the imaginary part.
140
SystemVue - Users Guide
Compatibility:
Vectors, Arrays, Dataset
See Also:
histc
Syntax
y = histc( x,e )
y = histc( x,e,dim )
[y,bin] = histc( x,e )
Definition
This function provides a count of the number of parts of a numeric real-valued vector or
array x that fall into each histogram bin where the histogram itself is defined by the bin
boundaries defined in the vector e. By definition y is a vector of integers. If x is a multi-
dimensional array then the dimension of binning may be included as an optional third
argument dim. If dim is omitted, the innermost non-singleton dimension is chosen as the
dimension to operate along.
If the function is called with an optional bin output variable, then the actual binning matrix
is returned in addition to the bin count vector y.
Examples:
ifft
Syntax
ifft( data, len )
Definition
Inverse Discrete Fourier Transform (IDFT) of data. Computed with IFFT algorithm when
possible. The parameter len is the IFFT length and is optional.
Examples:
The following example code is taken from the fft example:
Compatibility
Dataset
See Also
fft (users)
ifftshift
Syntax
ifftshift(X)
Definition
Inverse FFT shift.
ifftshift(X) swaps the left and right halves of the vector X. For matrices, ifftshift(X) swaps
the first quadrant with the third and the second quadrant with the fourth.
Examples:
Formula Result
x=[1 2] ? ans =
?21
x=[1 2;3 4] ? ans =
?43
?21
Compatibility
Vectors, Matrices
See Also
142
SystemVue - Users Guide
fftshift (users)
fft (users)
ifft (users)
imag
Syntax
y = imag( x )
Definition
imag returns the imaginary part of a complex number. This function operates on an part-
by-part basis on arrays.
Examples:
Formula Result
imag( 2 - 5j ) -5
imag( [10 + 1j , 12] ) [1 , 0]
imag( [20 + 3j; 1 + 2j] ) [ 3 ; 2 ]
Compatibility
Numeric scalars, Vectors, Arrays
inf
Syntax
DA = Inf(n, dist)
DA = Inf(m, n, dist)
DA = Inf(m, n , dist)
DA = Inf(..., classname, dist)
Definition
this function creates an n by n, or m by n, array of class double.
The classname parameter is for specifying the underlying class, which can be either
'double', the default, or 'single'.
Examples:
Formula Result
x = inf 1.#IOe
Compatibility
Numeric
See Also
Inf (users)
interp
resample input at a higher rate with lowpass filter
Syntax
Y = interp(X,R)
Y = interp(X,R,L)
Y = interp(X,R,L,Alpha)
Y = interp(X,R,L,Alpha,SNR)
Definition
1. Y = interp(X,R) resamples the signal in vector X at R times the original sample rate.
The resampled vector Y is R times the length of X. Filter transition is compensated by
image the input signal at the beginning and the end of filtering.
143
SystemVue - Users Guide
2. The symmetric lowpass filter B is obtained with minimum mean square error (MSE)
rule, it allows the original signal pass through unchanged and minimizes the mean
square error between the interpolated signal and the expected signal.
3. Y = interp(X,R,L,ALPHA,SNR) is used for specific filter length, cutoff frequency and
signal noise power ratio. 2*L is the number of original samples used to compute each
new sample. The filter length is 2*L*R+1. Alpha is bandwidth of the input signal
which should satisfy 0 < ALPHA <1.0, where 1.0 correspons to half the sample rate.
SNR is the power ratio of useful signal and AWGN noise. By default, L, ALPHA and
SNR is 4, 0.5 and 300(dB) respectively. For some large L, try a lower SNR to get a
reliable filter B.
4. [Y,B] = interp(X,R,L,ALPHA,SNR) returns the coefficients of filter B.
Examples
Compatibility
See also
decimate (users), resample , upfirdn (users)
interp1
Syntax
y2 = interp1(x1,Y1,x2)
y2 = interp1(x1,Y1,x2,method)
y2 = interp1(x1,Y1,x2,method,'extrap')
pp = interp1(x,Y,method,'pp')
Definition
y2 = interp1(x1,Y1,x2) interpolates to find y2, the values of the underlying function Y1 at
the points in the vector x1.
method:
'nearest' Nearest neighbor interpolation
'linear' Linear interpolation (default)
'spline' Cubic spline interpolation
'pchip' Piecewise cubic Hermite interpolation
'cubic' (Same as 'pchip')
Examples:
Formula Result
x1=[1 2 4 5] y2
y1=[34 56 67 77] ? ans =
y2=interp1(x1,y1,3) ? 61.5
x1=[1 2 4 5] y2
y1=[34 56 67 77] ? ans =
y2=interp1(x1,y1,-1,'linear','extrap') ? -10
Compatibility
Numeric scalars, Vectors
See Also
pchip (users)
spline (users)
intrlv
reorder data with specified permutation table
Syntax
Y = intrlv(X,PermTab)
Definition
144
SystemVue - Users Guide
Y = intrlv(X,PermTab) rearranges the data in X with indices given in PermTab. If
X is a vector of length N, length of PermTab must be a factor of N, i.e.
mod(N,length(PermTab))==0. If X is a matrix, PermTab must be a factor of the
number of rows of X, and each column of X is treated as an independent signal.
Examples
See also
deintrlv (users)
ipermute
Syntax
b = ipermute( Array, PermutedIndexes)
Definition
Inverse permute dimensions of an array. This inversley permutes Array using the vector of
permuted indexes.
Examples:
Formula Result
r=[1,2,3,4; 5,6,7,8] >> r
u=ipermute(r, [2,1]) ans =
1234
5678
>> u
ans =
15
26
37
48
r=[1,2,3,4;5,6,7,8] >> b
a=[r , r] ans(:,:,1) =
b=reshape(a, [2,4,2]) 1234
u=ipermute(b, [2,3,1]) 5678
ans(:,:,2) =
1234
5678
>> u
ans(:,:,1) =
15
15
ans(:,:,2) =
26
26
ans(:,:,3) =
37
37
ans(:,:,4) =
48
4 8 >>
Compatibility
Numeric Arrays.
See Also
permute (users)
145
SystemVue - Users Guide
iscell
Syntax
y = iscell( x )
Definition
This function determines whether the given parameter x, is a cell or an array of cells. If
so, it returns true, logical 1, and if not it returns false, logical 0.
Examples:
See Also:
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
ischar
Syntax
y = char( x )
Definition
This function determines whether the given parameter x, is a character or array of
characters. If so, it returns true, logical 1, and if not it returns false, logical 0.
Examples:
See Also:
iscell (users)
isempty (users)
isfield (users)
isfloat (users)
146
SystemVue - Users Guide
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
isempty
Syntax
y = isempty( x )
Definition
This function returns true if x is an empty array and false otherwise. An empty array has
at least one dimension of size zero, for example, 0-x-0 or 0-x-5. This function does not
operate on strings or cells. So supplying an empty string to the function does not get a
logical true.
Examples:
Formula Result
isempty( rand( 2,2 ) ) 0
b(:,:) = []; a = 1;
a = isempty(b)
Compatibility
Numeric scalars, vectors, arrays.
isequal
Syntax
out = isequal(a, b[, ...])
Definition
isequal returns true if the input arrays have the same contents, and false otherwise.
Nonempty arrays must be of the same data type and size to be compared.
Examples:
Formula Result
a = [1,2;3,4] out=1;
b = [1,2;3,4]
out = isequal(a,b)
Compatibility
Arrays and scalars.
isequalwithequalnans
Syntax
out = isequalwithequalnans(a, b[, ...])
Definition
isequalwithequalnans returns true if the input arrays have the same contents, and false
otherwise. Nonempty arrays must be of the same data type and size to be compared. NaN
values are not ignored, and considered to be equal to each other.
Examples:
147
SystemVue - Users Guide
Formula Result
a = [1,2;NaN,4] out=1;
b = [1,2;NaN,4]
out = isequalwithequalnans(a,b)
Compatibility
Arrays and scalars.
isfield
Syntax
y = isfield( x,'fieldname' )
y = isfield( x, {'fieldname1','fieldname2',...,'fieldnameN'} )
Definition
This function examines the structure, x, to confirm whether it contains the field specified
by 'fieldname'. It returns a logical 1 if the field exists and a logical 0 otherwise. When
multiple field names are specified in a cell array, then an array is returned with the
corresponding logical values.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
isfinite
Syntax
b = isfinite( Array)
Definition
isfinite returns an array the same size as Array containing true where the parts of Array
are finite and false where they are infinite or NaN. For a complex number z, isfinite(z)
returns true if both the real and imaginary parts of z are finite, and false if either the real
or the imaginary part is infinite or NaN.
Compatibility
Numeric arrays
See Also
isinf (users)
isfloat
148
SystemVue - Users Guide
Syntax
y = isfloat(x)
Definition
This function determines whether the given parameter x, is a floating point number. If so,
it returns true, logical 1, and if not, it returns false, logical 0. When x is a character or a
string, this function returns 0 because the argument is not an explicit numeric value but
isreal (users) returns 1 because the argument is implicitly real valued because ASCII
characters are involved in scalar or vector format.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
isinf
Syntax
out = isinf( Array)
Definition
isinf returns an array the same size as Array containing true where the parts of Array are
+Inf or -Inf and false where they are finite. For a complex number z, isinf(z) returns true
if either the real or imaginary part of z is infinite, and false if both the real and imaginary
parts are finite or NaN. For any real a, exactly one of the three quantities isfinite(a),
isinf(a), and isnan(a) is true.
isinteger
Syntax
y = isinteger(x)
Definition
This function determines whether the given parameter x, is an integer. If so, it returns
true, logical 1, and if not it returns false, logical 0. When applied to a multi-part array, all
parts must be integers for the function to evaluate to a true.
Examples:
149
SystemVue - Users Guide
Compatibility
Numeric and string valued variables.
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
islogical
Syntax
y = islogical(x)
Definition
This function determines whether the given expression x, is evaluates to a binary logical
value. If so, it returns true, logical 1, and if not it returns false, logical 0.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
isnan
Syntax
out = isnan( Array)
Definition
isnan returns an array the same size as Array containing true where the parts of Array are
NaN (not-a-number). For any real a, exactly one of the three quantities isfinite(a),
isinf(a), and isnan(a) is true.
isnumeric
Syntax
y = isnumeric(x)
Definition
150
SystemVue - Users Guide
This function determines whether the given parameter x, is of numeric value. If so, it
returns true, logical 1, and if not it returns false, logical 0. Strings, cells and structures are
not numeric parts.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
isvector (users)
isreal
Syntax
y = isreal(x)
Definition
This function determines whether the given parameter x, is a real valued number or a
vector or array containing only real numbers. If so, it returns true, logical 1, and if not, it
returns false, logical 0.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isscalar (users)
isstr (users)
151
SystemVue - Users Guide
isstruct (users)
isvector (users)
isscalar
Syntax
y = isscalar(x)
Definition
This function determines whether the given parameter x, is a 1x1 part with an ASCII value
i.e. a scalar. If so, then it returns true, logical 1, and if not then it returns false, logical 0.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isstr (users)
isstruct (users)
isvector (users)
isstr
Syntax
y = isstr(x)
Definition
This function determines whether the given parameter x, is a string. If so, then it returns
true, logical 1, and if not then it returns false, logical 0.
Examples:
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
152
SystemVue - Users Guide
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstruct (users)
isvector (users)
isstruct
Syntax
y = isstruct(x)
Definition
This function determines whether the given parameter x, is a structure and if so it returns
true, logical 1. Otherwise, it returns false, logical 0.
Examples:
type.greeting='hi!';
type.date=[01 29 2009];
y = isstruct(type);
isstruct(type) 1 type is a structure with fields 'greeting' and 'date'
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isvector (users)
isvector
Syntax
y = isvector(x)
Definition
This function determines whether the given parameter x, is a vector. If so, it returns true,
logical 1, and if not it returns false, logical 0.
Examples:
153
SystemVue - Users Guide
Compatibility
Numeric and string valued variables.
See Also:
iscell (users)
ischar (users)
isempty (users)
isfield (users)
isfloat (users)
isinteger (users)
islogical (users)
isnumeric (users)
isreal (users)
isscalar (users)
isstr (users)
isstruct (users)
kaiser
Kaiser window
Syntax
W = kaiser(NL,Beta)
Definition
Examples
Compatibility
See also
kurtosis
Syntax
y = kurtosis( x )
y = kurtosis( x, Flag )
y = kurtosis( x, Flag, iDim )
Definition
Returns the sample kurtosis of a vector x. Kurtosis is the fourth central moment of X
divided by the fourth power of the standard deviation.
If Flag is 0 (default), kurtosis normalizes by N-1 where N is the sample size. If Flag is 1,
kurtosis normalizes by N.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
The iDim argument is optional and specifies which dimension to operate along. For
example, if iDim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
y = kurtosis( [ 3 ; 4 ; 8 ; 9 ] ) y = 1.1479
y = kurtosis( [ 1, 2, 3], 1) y = 1.5
Compatibility
154
SystemVue - Users Guide
Numeric arrays
See Also
std (users)
var (users)
skewness (users)
length
Syntax
y = length(x)
Definition
This function returns the longest dimension of the array x. When presented with a single
string, it returns the character count. When presented with a list of strings it returns list
length even if one of the words has a character count (inner dimension) greater than the
word count of the string (outer dimension).
Examples:
See Also
size (users)
linspace
Syntax
y = linspace(u,v)
y = linspace(u,v,x)
Definition
This function creates vectors that have values that are linearly spaced, similar to the colon
operator. However, unlike the colon operator, this function gives control on specifying the
number of points. The points are generated between, and including, u and v. The number
of points generated are determined by the parameter x. If not specified, this value
defaults to 100.
Examples:
Formula Result
y = linspace(1, 10, Y=
10) [1,2,3,4,5,6,7,8,9,10]
Compatibility
u - Real valued scalar
v - Real valued scalar
x - Positive integer
See Also:
logspace (users)
log
Syntax
155
SystemVue - Users Guide
y = log(x)
Definition
This function returns the natural logarithm (base e) of the argument x. It operates on an
part-by-part basis on arrays. Exceptions of "-1.#INF" (negative infinity) and "-
1.#IND"(indefinable) are thrown for zero and negative arguments respectively, as is to be
expected. For complex valued arguments, the returned y = a + bi is such that a is
log(sqrt(real(x)^2+imag(x)^2)), i.e. the natural log of the magnitude and b is
atan(imag(x)/real(x)), i.e. the argument assumed to be in natural log.
Examples:
Formula Result
log( 1 ) 0
log( [ 10 , 1.5 ] ) [ 2.3 , 0.4 ]
log( [ 2.3 , 0.5 ; 3.7 , 0.8 ] ) 0.832909 -0.693147
1.30833 -0.223144
Compatibility
Real and complex-valued scalars, Vectors, Arrays
See Also:
log10 (users)
log2 (users)
log2
Syntax
y = log2(x)
[f, e] = log2(x)
Definition
When used with one output argument, this function returns the base-2 logarithm of the
argument. It operates on an part-by-part basis on arrays. Exceptions of "-1.#INF"
(negative infinity) and "-1.#IND"(indefinable) are thrown for zero and negative arguments
respectively, as is to be expected. For complex valued arguments, the returned y = a + bi
is such that a is log2(sqrt(real(x)^2+imag(x)^2)), i.e. the base-2 log of the magnitude
and b is atan(imag(x)/real(x))/log(2), i.e. the argument assumed to be in base-2 log.
When used with two output arguments, the mantissa and exponent of the floating point
argument are returned into f and e respectively.
Definition
This function returns the natural logarithm (base e) of the argument x.
Examples:
Formula Result
log2( 2 ) 1
log2( [ 4, 512 ] ) [ 2, 9 ]
Compatibility
Real and complex-valued scalars, vectors, arrays
See Also
log (users)
log10 (users)
log10
Syntax
y = log10(x)
Definition
This function returns the 10-base logarithm of the argument x. It operates on an part-by-
part basis on arrays. Exceptions of "-1.#INF" (negative infinity) and "-
1.#IND"(indefinable) are thrown for zero and negative arguments respectively, as is to be
156
SystemVue - Users Guide
expected. For complex valued arguments, the returned y = a + bi such that a is
log10(sqrt(real(x)^2+imag(x)^2)), i.e. the log10 of the magnitude of the vector and b is
atan(imag /imag )/log(10) i.e. the log10 of the argument, where log(10) is the natural
logarithm of 10.
Examples:
Formula Result
log10( 1 ) 0
log10( [ 10 , 1.5 ] ) [ 1 , 0.176 ]
log10( [ 2.3 , 0.5 ; 3.7 , 0.8 ] ) [ 0.362 , -0.301 ; 0.568 , -0.097 ]
log10( 3+2i ) 0.556972 + 0.255366i
Compatibility
Real and complex valued scalars, vectors, arrays
See Also
log (users)
log2 (users)
logspace
Syntax
y = logspace(u,v)
y = logspace(u,v,x)
y = logspace(u,pi)
Definition
This function creates a real-valued vector that is spaced logarithmically. It is the
logarithmic equivalent of linspace and the colon operator (:), and is useful for generating
frequency vectors.
This function generates values that are spaced from 10^u to 10^v. It creates an x
number of points, and if x is not specified, it defaults the value to 50.
If pi is specified instead of v then the values are spaced from 10^u to pi (approx. 3.14).
This is useful for digital signal processing where frequencies go around the unit circle.
Examples:
Formula Result
logspace(1,6,6) [10, 100, 1000, 1e4, 1e5, 1e6]
logspace(-3,3,7) [0.001, 0.01, 0.1, 1, 10, 100, 1000]
logspace(0,1,10) [1, 1.29155, 1.6681, 2.15443, 2.78256, 3.59381, 4.64159, 5.99484, 7.74264, 10]
logspace(0,pi,5) [1, 1.33134, 1.77245, 2.35973, 3.14159]
Compatibility
u - Real valued scalar
v - Real valued scalar
x - Positive integer
See Also
linspace (users)
lookup
Syntax
index = lookup(x,v)
Definition
This function returns the index of the real value of v in the vector x after sorting the
vector in ascending order of real values. If real( v ) does not explicitly exist in real( x ),
then the returned index is 0 if the sought value is less than the minimum value in the
vector. Otherwise, the index of part which would serve as the lower bound of the range
containing the value, is returned. Accordingly, if real( v ) is larger than the maximum
157
SystemVue - Users Guide
value in x, then the returned index is that of the last part of real( x ).
Examples:
Formula Result
lookup([0.1,0.2,0.4,0.3], 4
0.4)
lookup([-4; 3; -2; 1; 0], 2.5 4
lookup([-4; 3; -2; 1; 0], -4.5 0
Compatibility
x - Real or complex valued vector
v - value whose position is being sought.
lp2bp
transform lowpass filter to bandpass filter
Syntax
[bt,at] = lp2bp(b,a,wo)
[at,bt,ct,dt] = lp2bp(a,b,c,d,wo)
Definition
1. lp2bp transform analog lowpass filter with normalized cutoff frequency of 1 rad/s into
bandpass filter with desired central frequency and passband.
2. [bt,at] = lp2bp(b,a,wo) is the transfer function form. B and A are polynomial
coefficients. wo has two elements. wo(1) is low band edge and wo(2) is high band
edge.
3. [at,bt,ct,dt] = lp2bp(a,b,c,d,wo) is the state-space form.
4.
Output arguments should NOT be omitted
Examples
Compatibility
See also
lp2bs (users), lp2hp (users), lp2lp (users)
lp2bs
transform lowpass filter to bandstop filter
Syntax
[bt,at] = lp2bs(b,a,wo)
[at,bt,ct,dt] = lp2bs(a,b,c,d,wo)
Definition
1. lp2bs transform analog lowpass filter with normalized cutoff frequency of 1 rad/s into
bandstop filter with desired central frequency and stopband.
2. [bt,at] = lp2bs(b,a,wo) is the transfer function form. B and A are polynomial
coefficients. wo has two elements. wo(1) is low band edge and wo(2) is high band
edge.
3. [at,bt,ct,dt] = lp2bs(a,b,c,d,wo) is the state-space form.
4.
Output arguments should NOT be omitted
Examples
Compatibility
158
SystemVue - Users Guide
See also
lp2bp (users), lp2hp (users), lp2lp (users)
lp2hp
transform lowpass filter to highpass filter
Syntax
[bt,at] = lp2hp(b,a,wo)
[at,bt,ct,dt] = lp2hp(a,b,c,d,wo)
Definition
1. lp2hp transform analog lowpass filter with normalized cutoff frequency of 1 rad/s into
highpass filter with desired cutoff frequency.
2. [bt,at] = lp2hp(b,a,wo) is in transfer function form. B and A are polynomial
coefficients. wo is the desired cutoff frequency.
3. [at,bt,ct,dt] = lp2hp(a,b,c,d,wo) is in state-space form.
4.
Output arguments should NOT be omitted
Examples
Compatibility
See also
lp2bp (users), lp2bs (users), lp2lp (users)
lp2lp
transform lowpass filter with normalized frequency to desired frequency
Syntax
[bt,at] = lp2lp(b,a,wo)
[at,bt,ct,dt] = lp2lp(a,b,c,d,wo)
Definition
1. lp2lp transform analog lowpass filter with normalized cutoff frequency of 1 rad/s into
lowpass filter with desired cutoff frequency.
2. [bt,at] = lp2lp(b,a,wo) is in transfer function form. B and A are polynomial
coefficients. wo is the desired cutoff frequency.
3. [at,bt,ct,dt] = lp2lp(a,b,c,d,wo) is in state-space form
4.
Output arguments should NOT be omitted
Examples
Compatibility
See also
lp2bp (users), lp2bs (users), lp2hp (users)
lu
Syntax
[L,U,P] = lu(A)
Definition
Let A be an m x n matrix and k=min(m,n).
159
SystemVue - Users Guide
[L,U,P] = lu(A) produces matrices L, U, and P such that L·U = P·A, where
L is a lower triangular (when m≤n) or lower trapezoidal (when m>n) m x k matrix with
unit parts in the primary diagonal
U is an upper triangular (when m≥n) or upper trapezoidal (when m<n) k x m matrix
P is a permutation m x m matrix
Examples:
>> A=randn(3,3)+j*randn(3,3)
A =
0.723014 + 1.18447j 0.934672 + 0.460644j 0.441228 + 0.256457j
-0.328791 - 0.851946j -0.861837 + 2.87705j 0.955427 + 1.76944j
0.179696 - 0.856819j 1.68603 - 0.932334j -0.0821437 - 1.2154j
>> [L,U,P] = lu(A)
L =
1 0 0
-0.647459 - 0.117631j 1 0
-0.459545 - 0.43222j -0.150244 - 0.569137j 1
U =
0.723014 + 1.18447j 0.934672 + 0.460644j 0.441228 + 0.256457j
0 -0.310862 + 3.28524j 1.21094 + 1.98739j
0 0 -0.939387 + 0.080946j
P =
1 0 0
0 1 0
0 0 1
>> max( max( abs( L*U-P*A ) ) )
ans =
1.11022e-016
>> A = rand(6,3)
A =
0.60099 0.440156 0.864022
0.127121 0.130142 0.348069
0.946835 0.559306 0.632182
0.766416 0.852558 0.260926
0.857445 0.0636686 0.47777
0.447486 0.372438 0.510765
>> [L,U,P] = lu(A)
L =
1 0 0
0.905591 1 0
0.634736 -0.192272 1
0.809451 -0.902882 -0.756563
0.134259 -0.124312 0.565567
0.472613 -0.244116 0.424851
U =
0.946835 0.559306 0.632182
0 -0.442834 -0.0947284
0 0 0.444539
P =
0 0 1 0 0 0
0 0 0 0 1 0
1 0 0 0 0 0
0 0 0 1 0 0
0 1 0 0 0 0
0 0 0 0 0 1
>> max( max( abs( L*U-P*A ) ) )
ans =
1.11022e-016
matdeintrlv
reorder data by filling matrix by columns and emptying it by rows
Syntax
Y = matdeintrlv(X,Rows,Cols)
Definition
160
SystemVue - Users Guide
matrix column by column and then reading the matrix row by row to the output.
Rows and Cols specifies the size of the temporary matrix. If X is a vector, it
must have Rows*Cols elements. If X is a matrix, it must have Rows*Cols rows,
each column is treated as an independent signal.
Examples
b = matdeintrlv([1 4 2 5 3 6; 7 10 8 11 9 12].',2,3)
b =
1 7
2 8
3 9
4 10
5 11
6 12
Compatibility
See also
matintrlv (users)
matintrlv
reorder data by filling matrix by rows and emptying it by columns
Syntax
Y = matintrlv(X,Rows,Cols)
Definition
Y = matintrlv(X,Rows,Cols) rearranges the data in X by writting a temporary matrix row
by row and then reading the matrix column by column to the output. Rows and Cols
specifies the size of the temporary matrix. If X is a vector, it must have Rows*Cols
elements. If X is a matrix, it must have Rows*Cols rows, each column is treated as an
independent signal.
Examples
b = matintrlv([1 2 3 4 5 6; 7 8 9 10 11 12].',2,3)
b =
1 7
4 10
2 8
5 11
3 9
6 12
Compatibility
See also
matdeintrlv (users)
max
Syntax
y = max(x)
y = max(x,z)
y = max(x,dim)
[y, i] = max(...)
Definition
Returns the maximum part of a vector x. In the case of arrays, the function returns a row
vector with the maximum part in each column. When dealing with multidimensional
arrays, it treats the parts along the first non-singleton dimension, or the specified dim, as
vectors and returns the maximum of each.
161
SystemVue - Users Guide
y = max(x,z) returns an array with the same dimensions as x and z containing the
maximum parts from vectors x or z. The size of x and z have to be the same.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
[y, i] = max(...) also returns the indices of the maximum parts in a vector i. If more than
one maximum of the same value exists, then only the first parts index is returned.
Examples:
Formula Result
x = 10 y = 10
y = max( x )
x = [18 -20 23 54 4 71 -43] y = 71
y = max( x )
x = [27 86; complex( 600 , -435 ), 34] y = [600 - j435, 86]
y = max( x )
x = [27 86; complex( 1 , 1) , -34] y = [27, 86]
y = max( x )
Compatibility
Numeric Scalars, Vectors, Arrays
See Also
min (users)
mean
Syntax
y = mean(x)
y = mean(x,dim)
Definition
Returns the arithmetic mean of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
dim, or the first non-singleton dimension if dim, is not specified.
Examples:
Formula Result
y = mean( [ 3 ; 4 ; 8 ; 9 ] ) y=6
y = mean( [ complex( 1 , 2 ) ; complex( 1 , 1 ) ; complex( 2 , 1 ) ] ) y = 1.333 + j1.333
y = mean( [ 1,2,3;4,5,6;7,8,9 ] ) y = [4, 5, 6]
Compatibility
Numeric arrays
See Also
median (users)
median
Syntax
y = median(x)
y = median(x,iDim)
Definition
Returns the median of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
162
SystemVue - Users Guide
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
y = median( [ 3 ; 4 ; 8 ; 9 ] ) y=6
y = median( [ complex( 1 , 2 ) ; complex( 1 , 1 ) ; complex( 2 , 1 ) ] ) y = 2 + j1
See Also
mean (users)
mode (users)
min
Syntax
y = min(x)
y = min(x,z)
y = min(x,dim)
[y,i] = min(...)
Definition
Returns the minimum part of a vector x. In the case of complex-valued arrays, the
magnitude of each part is used.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
dim, or the first non-singleton dimension if dim is not specified.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
[y,i] = min(...) also returns the indices of the minimum valued parts in x. If there are
more than one minimum parts of the same value, the index of the first one found is
returned.
Examples:
Formula Result
x = [ 10 ] y = 10
y = min( x )
x = [ 18 , -20 , 23 , 54 , 4 , 71 , -43] y = -43
y = min( x )
x = [ 27, 86 ; complex( 600 , -435 ) , 34 ] y = [27, 34]
y = min( x )
x = [ 27, 86 ; complex( 1 , 1 ) , -34 ] y = [1+j1, -34]
y = min( x )
Compatibility
Numeric Scalars, Vectors, Arrays
See Also
max (users)
mkdir
Make a new directory
Syntax:
mkdir('dname')
163
SystemVue - Users Guide
mkdir('pdir','dname')
status = mkdir('pdir','dname')
[status,mess,messid] = mkdir('pdir','dname')
Definition:
mkdir('dname') creates the directory dname in the current directory. The full path of the
directory is displayed in warnings. A warning sign is displayed if the directory dname
already exists.
mkdir('pdir','dname') creates the directory dname in the existing directory pdir. An error is
displayed if the directory pdir is not an existing directory. A warning sign is displayed if
the directory dname already exists.
status = mkdir('pdir,'dname') creates the directory dname and returns a status of logical 1
if the operation was successful. It returns an error message if the creation of dname
failed.
[status, mess, messid] = mkdir('pdir','dname') creates the directory dname and returns a
status of logical 1 if the operation was successful. If dname previously existed, mess and
messid contain appropriate messages.
Examples:
To create a New Sub Directory called NewTest in the Current Directory, type
mkdir ('NewTest')
To create a New Sub Directory called NewTest in the parent directory 'C:\Documents and
Settings', type
mkdir ('C:\Documents and Settings','NewTest')
See Also:
movefile
cd
mkpp
Syntax
y = mkpp(x, coefs [, b])
Definition
builds a piecewise polynomial y (a structure with six fields) from its breaks x, and
coefficients cofes. breaks is a vector of length a+1 with strictly increasing parts which
represent the start and end of each of a intervals. coefs is an a-by-k matrix with each row
coefs(i,:) containing the coefficients of the terms, from highest to lowest exponent, of the
order k polynomial on the interval [breaks(i),breaks(i+1)]. the optional parameter l gives
the value of each of its coefficients is a vector of length b.
Examples:
164
SystemVue - Users Guide
Formula Result
b=[ 4 5 ] >> pp
c=[3 5 6] ? ans =
pp=mkpp(b,c) ? form: [pp]
pp2=mkpp(b,c,3) ? breaks: [1x2 double]
? coefs: [1x3 double]
? pieces: [1]
? order: [3]
? dim: [1]
>> pp2
? ans =
? form: [pp]
? breaks: [1x2 double]
? coefs: [3x1 double]
? pieces: [1]
? order: [1]
? dim: [3]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
spline (users)
ppval (users)
unmkpp (users)
mod
Syntax
m = mod(a,b)
Definition
This function applies the modulus operation on a by b.
It returns, m = a - ( floor( a./b ) .* b ). If b is a scalar, then all parts of a are treated by
its value. If b is nor
Examples:
Formula Result
m = mod(13, 5) m=3
m = mod([1:5],3) m = [1,2,0,1,2]
Compatibility
Real valued scalars, vectors, arrays
See Also
rem (users)
mode
Syntax
y = mode(x)
y = mode(x,iDim)
[y, n] = mode(x, ...)
[y,n,ca] = mode(x, ...)
Definition
Returns the mode of a vector x. If there are several values with equal maximum number
of occurrences, the smallest value is returned.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
[y, n] = mode(x, ...) also returns an array of same size as y which contains the number of
occurrences of each part in y.
[y,n,ca] = mode(x, ...) also returns a cell array with the same size as y and n, and it
165
SystemVue - Users Guide
contains, in each part, a sorted vector of the values that have the same frequency as each
part in y.
Examples:
Formula Result
y = mode ( [ 8 ; 4 ; 8 ; 9 ] ) y=8
y = mode ( [ complex( 1 , 2 ) ; complex( 1 , 2 ) ; complex( 2 , 1 ) ] ) y = 1 + j2
See Also
mean (users)
median (users)
moment
Syntax
y = moment(x,order)
y = moment(x,order,iDim)
Definition
Returns the central moment of order order of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
y = moment( [ 1 ; 2 ; 3 ; 4 ] ) y = 1.25
y = moment( [ complex( 1 , 2 ) ; complex( 2 , 3 ) ], 2 ) y = 0 + j0.5
Compatibility
Numeric arrays
muxdeintrlv
restore ordering of data with specified shift register group
Syntax
Y = muxdeintrlv(X,Delay)
Y = muxdeintrlv(X,Delay,InitState)
[Y,FinalState] = muxdeintrlv(X,Delay,...)
Definition
166
SystemVue - Users Guide
The total processing delay of the muxintrlv concatenated by muxdeintrlv is Td =
max(Delay) * size(Delay)
Y = muxintrlv(X, max(Delay)-Delay)
Examples
Compatibility
See also
muxintrlv (users)
muxintrlv
reorder data with specified shift register group
Syntax
Y = muxintrlv(X,Delay)
Y = muxintrlv(X,Delay,InitState)
[Y,FinalState] = muxintrlv(X,Delay,...)
Definition
167
SystemVue - Users Guide
Examples
Compatibility
See also
muxdeintrlv (users)
NaN
Syntax
array = NaN(n, distdim)
array = NaN(m, n, distdim)
array = NaN(..., classname, distdim)
Definition
This function creates an n-by-n, or m-by-n as specified, distributed array, which is of class
double by default. The distributed dimension dim and partition PAR are specified by
distdim in the parameters, but if not then it automates to the second dimension and
defaultPartition(n) is used.
array = NaN(..., classname, distdim) also allows you to specify the class of the array.
These can either be 'double' or 'single.'
Examples:
Formula Result
ndims
Syntax
y = ndims(x)
Definition
This function returns the number of dimensions of x. Note that scalars are treated as 1x1
arrays, so the function returns a dimesnion count of 2.
Examples:
Formula Result
ndims(5) 2
ndims([1, 2]) 2
See Also:
permute (users)
shiftdim (users)
false
Syntax
false
168
SystemVue - Users Guide
Definition
false as a boolean value.
Examples:
Formula Result
x=false false
See Also
true (users)
nextpow2
Syntax
y = nextpow2(x)
Definition
This function returns the power of two that produces the number immediately higher than
the absolute value of the supplied scalar number x. If x is a one-dimensional vector, then y
is the power of two that would cover length(x). Multi-dimensional arrays are not
supported by the function.
Examples:
Syntax
Definition
[h(1),h(2),...h(NumSamp)] * conj([h(1),h(2),...h(NumSamp)].')
NBW = Fs * -------------------------------------------------------------
abs(sum([h(1),h(2),...h(NumSamp)])).^2
where h(1),h(2),... h(NumSamp) is impulse response of the given filter.
Examples
Compatibility
See also
169
SystemVue - Users Guide
num2str
Syntax
ystring = num2str(x)
Definition
This function can convert a real-valued scalar, vector or array to a string representation.
Only real portions of complex valued numbers will be entered to the string. Arrays are
traversed along the innermost (column) dimension. Commas, semicolons, brackets and
other non-whitespace delimiters are ignored when drafting the string.
Examples:
Formula Result
num2str(500) '500'
num2str([500,200;100,400]) '500 100 200
400'
num2str(500+200i) '500'
Compatibility
Real valued scalars, vectors, arrays
See Also
str2num (users)
numel
Syntax
y = numel(x)
Definition
This function returns the total number of parts in the array x.
Examples:
Formula Result
numel(2) 1
numel([1 2 3]) 3
numel(diag([ 1 1])) 4
Compatibility
scalars, vectors, arrays
See Also
ndims (users)
oct2dec
convert octal to decimal numbers
Syntax
d = oct2dec(c)
Definition
Examples
Compatibility
See also
ones
170
SystemVue - Users Guide
Syntax
y = ones(m )
y = ones(m, n)
y = ones(m, n, p, ...)
y = ones([m,n,p,...] )
y = ones(m, n, p, ..., class)
y = ones([m,n,p,...], class)
Definition
This function returns a m by n by ... array with every part equal to 1. If only one
argument is specified and it is a scalar m, then an m x m matrix is returned. A vector of
dimensions may also be passed in. The optional class argument is a string that specifies
the data type of the array to return.
Examples:
Formula Result
y = ones( 3 , 2 ) y = [ 1 , 1 ; 1 , 1 ; 1 , 1 ]
y = ones( 2 ) y=[1,1;1,1]
y = ones( [5 1] ) y = [ 1 ; 1 ; 1 ; 1 ; 1 ]
See Also
zeros (users)
pchip
Syntax
y2 = pchip(x,y,x2)
pp = pchip(x,y)
Definition
By using cubic interpolation with x and corresponding y, y2 = pchip(x,y,x2) returns y2
with is corresponding with x2.
pp = pchip(x,y) returns a polynomial structure pp. both x and y can be row or column
vector.
Examples:
x = -3:3;
y = [-1 -1 -1 0 1 1 1];
t = -3:.01:3;
p = pchip(x,y,t);
s = spline(x,y,t);
171
SystemVue - Users Guide
Compatibility
Numeric scalars, Vectors, Arrays
See Also
spline (users)
ppval (users)
interp1 (users)
permute
Syntax
y = permute(x,n)
Definition
This function rearranges the dimensions of the array x, using an order specified by the
vector n.
Examples:
% x is a 2x3 matrix
x = [1, 2, 3; 4, 5, 6];
y = permute(x,[2,1])
% y is a 3x2 matrix
% y = [1, 4; 2, 5; 3, 6]
%
% z is a 3x2x4 matrix
z=zeros(3,2,4);
z(1,:,:) = [ 1, 2, 3; 4, 5, 6];
z(2,:,:) = 0.1*z(1,:,:);
z(3,:,:) = 10*z(1,:,:);
% Create a permuted version of z
w = permute(z,[2,3,1]);
% w(1,:,:) = [1, 0.1, 10; 2, 0.2, 20; 3, 0.3, 30; 4, 0.4, 40];
% w(2,:,:) = [5, 0.5, 50; 6, 0.6, 60; 7, 0.7, 70; 8, 0.8, 80];
% Note that w is a 2x4x3 matrix since according to the vector [2,...]
% w's 3rd (outermost) dimension is the same as z's 2nd (middle) dimension,
% w's 2nd (middle) dimension is the same as z's 3rd (outermost) dimension
See Also
ipermute (users)
shiftdim (users)
172
SystemVue - Users Guide
phasedelay
return phase delay vector for digital filter
Syntax
[phi,w] = phasedelay(b,a,n)
[phi,w] = phasedelay(b,a,n,'whole')
phi = phasedelay(b,a,w)
[phi,f] = phasedelay(b,a,n,fs)
[phi,f] = phasedelay(b,a,n,'whole',fs)
phi = phasedelay(b,a,f,fs)
Definition
1. [PHI,W] = phasedelay(B,A,N) returns frequency vector W and phase delay vector PHI
of the filter defined by numerator coefficients of B and denominator coe -fficients of
A. The length of PHI and W are N. W is n points equally spaced from 0 to pi. N should
be integer larger than 1.
2. [PHI,W] = phasedelay(B,A,N,'whole') uses n points eually spaced from 0 to 2*pi
3. PHI = phasedelay(B,A,W) returns the phase delay at given frequencies specified in
W. W is normally between 0 and pi.
4. [...] = phasedelay(...,fs) is same with above except the frequency vector is in HZ.
5. In [PHI,F] = phasedelay(B,A,N,FS), F is equally spaced from o to FS/2.
6. In [PHI,F] = phasedelay(B,A,N,'whole',FS), F is equally spaced from o to FS.
7. In PHI = phasedelay(B,A,F,FS), F should be in the range of 0 to FS/2.
8.
Output arguments should NOT be omitted
Examples
Compatibility
See also
phasez
return phase response vector for digital filter
Syntax
[phi,w] = phasez(b,a,n)
[phi,w] = phasez(b,a,n,'whole')
phi = phasez(b,a,w)
[phi,f] = phasez(b,a,n,fs)
[phi,f] = phasez(b,a,n,'whole',fs)
phi = phasez(b,a,f,fs)
Definition
1. [PHI,W] = phasez(B,A,N) returns frequency vector W and phase response vector PHI
of the filter defined by numerator coefficients of B and denominator coe -fficients of
A. The length of PHI and W are N. W is n points equally spaced from 0 to pi. N should
be integer larger than 1.
173
SystemVue - Users Guide
2. [PHI,W] = phasez(B,A,N,'whole') uses n points eually spaced from 0 to 2*pi PHI =
phasez(B,A,W) returns the phase response at given frequencies specified in W. W is
normally between 0 and pi.
3. [...] = phasez(...,FS) is same with above except the frequency vector is in Hz.
4. In [PHI,F] = phasez(B,A,N,FS), F is equally spaced from o to FS/2.
5. In [PHI,F] = phasez(B,A,N,'whole',FS), F is equally spaced from o to FS.
6. In PHI = phasez(B,A,F,FS), F should be in the range of 0 to FS/2.
7.
Output arguments should NOT be omitted
Examples
Compatibility
See also
poly
Syntax
p = poly(matx)
p = poly(vec)
Definition
p = poly(matx) returns a row vector containing the coefficients of the characteristic
polynomial, det(sl-a), ordered in descending powers.
p = poly(vec) returns a row vector containing the coefficients of the polynomial which has
roots that are the parts of vec.
Examples:
>> p
? ans =
? 1 -6 -72 -27
>> r
? ans =
? 12.1229
? -5.73451
? -0.388384
Compatibility
Vectors, Matrices
See Also
conv (users)
polyval (users)
roots (users)
poly2trellis
convert convolutional code polynomials to trellis description
Syntax
Y = poly2trellis(CONSLEN,CODEGEN)
Definition
CONSLEN: K by 1 vector, whrer K is the number of input bit streams to the encoder,
or the number of bits the encoder takes simultaneously each clock cycle.
CONSLEN[i]-1 specifys the number of registors used for the i'th input bit stream.
Examples
Compatibility
See also
istrellis , convenc (users), vitdec (users)
polyval
Syntax
y = polyval(v,x)
Definition
y = polyval(v,x) returns the value of a polynomial of degree n evaluated at x. The input
argument v is a vector of length n+1 whose parts are the coefficients in descending
powers of the polynomial to be evaluated.
Examples:
>> y
? ans =
? 7 13 23
Compatibility
Vectors
See Also
polyvalm (users)
polyvalm
Syntax
Y = polyvalm(v,X)
Definition
Y = polyvalm(v,X) evaluates matrix X in the polynomial v.
Polynomial v is a vector whose parts are the coefficients of a polynomial in descending
powers, and X must be a square matrix.
Examples:
>> Y
? ans =
? 80 110
? 22 36
Compatibility
Matrices
See Also
175
SystemVue - Users Guide
polyval (users)
true
Syntax
true
Definition
The value true (logical 1).
Examples:
Formula Result
x = true x is a true (logical 1)
See Also
false (users)
ppval
Syntax
v = ppval(pp,xx)
Definition
v = ppval(pp,xx) returns the value of the piecewise polynomial f, contained in pp, at the
entries of xx. You can construct pp using the functions interp1, pchip, spline, or the spline
utility mkpp.
v is obtained by replacing each entry of xx by the value of f there. If f is scalar-valued, v
is of the same size as xx.
Examples:
See Also
spline (users)
mkpp (users)
unmkpp (users)
prctile
Syntax
y = prctile(x,p)
y = prctile(x,p,iDim)
Definition
Returns the p'th percentiles of a vector x (p can be a scalar or a vector of percent values).
Percentiles must be between 0 and 100. For an N-part vector, this function computes
percentiles by assigning percentile values to the sorted input data as 100*(0.5/N),
176
SystemVue - Users Guide
100*(1.5/N), ..., 100*((N-0.5)/N). Linear interpolation is then used to compute
percentiles between these values. The minimum or maximum values in the data are
returned for percentile values outside that range.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
prctile( [1, 2, 3, 4, 5], 50) 3
prctile( [10, 20, 50, 100, 200], 60) 75
Compatibility
Vectors, Arrays
See Also
quantile (users)
median (users)
prod
Syntax
y = prod(x)
y = prod(x,dim)
Definition
Returns the product of parts of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
dim, or the first non-singleton dimension if dim is not pecified.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
Formula Result
y = prod( [ 2 , 3 , 5 ] ) y = 30
y = prod( [ 1 , 3 ; 7 , 5 ] ) y = [7, 15]
y = prod( [ -3.3 , 0.7 , 5 , 3 ]) y = -34.65
a = complex( 1 , 3 ) y = 1 + 13j
b = complex( 4 , 1 )
c = complex( 1 , 0 )
y = prod( [ a , b , c ] )
Compatibility
Numeric Scalars, Vectors, Arrays
See Also
sum (users)
puncture
erase specified symbols based on puncture pattern
Syntax
Y = puncture(X, puncPat)
Definition
177
SystemVue - Users Guide
puncPat: a vector of 1's and 0's, such as [1 0 0 1 1 ]
Examples
x = 1:10;
puncPat = [1 0 1 1];
y = puncture(x,puncPat); then,
y = [1 3 4 5 7 8 9]
Compatibility
See also
depuncture (users)
qfunc
Q function
Syntax
Y = qfunc(X)
Definition
1 _+Inf t^2
Y = Q(X) = ---------- | exp(- ---) dt
sqrt(2*pi) _|X 2
The Q function is related to complementary error function erfc (users), according
to
1 X
Q(X) = - erfc( ----- )
2 sqrt(2)
Examples
Compatibility
See also
qfuncinv (users), erf (users), erfc (users), erfcx , erfinv , erfcinv
qfuncinv
inverse Q function
Syntax
Y = qfuncinv(X)
Definition
1 _+Inf t^2
X = Q(Y) = ---------- | exp(- ---) dt
sqrt(2*pi) _|Y 2
The Q function is related to complementary error function ERFC, according to
1 X
Q(X) = - erfc( ----- )
2 sqrt(2)
178
SystemVue - Users Guide
Examples
Compatibility
See also
quantile
Syntax
y = quantile(x,q)
y = quantile(x,q,iDim)
Definition
Returns the q'th quantiles of a vector x (q can be a scalar or a vector of quantile values).
Quantiles must be between 0 and 1. For an N-part vector, this function computes
quantiles by assigning quantile values to the sorted input data as (0.5/N), (1.5/N), ...,
((N-0.5)/N). Linear interpolation is then used to compute quantiles between these values.
The minimum or maximum values in the data are returned for quantile values outside
that range.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
quantile( [1, 2, 3, 4, 5], 0.5) 3
quantile( [10, 20, 50, 100, 200], 0.6) 75
Compatibility
Vectors, Arrays
See Also
median (users)
prctile (users)
rand
Syntax
y = rand(n1)
OR
y = rand(n1,n2)
OR
y = rand([n1,n2,..nN])
Definition
This function returns an array of random numbers with uniform distribution. The size of
the array can be specified either as a list of one or two scalars or a vector for higher-
dimensions. If a single scalar n1 is used as the only parameter, a square matrix of size n1
x n1 is returned.
Examples:
See Also:
randn (users)
randerr
generate bit error patterns
Syntax
OUT = randerr(M)
OUT = randerr(M,N)
OUT = randerr(M,N,ERRORS)
OUT = randerr(M,N,ERRORS,STATE)
Definition
OUT = RANDERR(M) generates an M-by-M binary matrix, each row of which has
exactly one nonzero entry in a random position.
Examples
Compatibility
See also
rand (users), randint (users), randsrc (users)
randint
generate uniformly distributed random integers
Syntax
OUT = randint
OUT = randint(M)
OUT = randint(M,N)
OUT = randint(M,N,RANGE)
OUT = randint(M,NRANGE,STATE)
Definition
Examples
Compatibility
See also
rand (users), randsrc (users), randerr (users)
randn
Syntax
y = randn(n1)
OR
y = randn(n1,n2)
OR
y = randn([n1,n2,..nN])
Definition
This function returns an array of random numbers with Normal (Gaussian) distribution.
The size of the array can be specified either as a list of one or two scalars or a vector for
higher-dimensions. If a single scalar n1 is used as the only parameter, a square matrix of
size n1 x n1 is returned.
Examples:
See Also:
rand (users)
randsrc
generate random matrix using prescribed alphabet
Syntax
OUT = randsrc
OUT = randsrc(M)
OUT = randsrc(M,N)
OUT = randsrc(M,N,ALPHABET)
OUT = randsrc(M,N,[ALPHABET;PROB])
181
SystemVue - Users Guide
OUT = randsrc(M,N,[ALPHABET;PROB],STATE)
Definition
Examples
Compatibility
See also
rand (users), randint (users), randerr (users)
readvector
Syntax
A = readvector( fileName)
A = readvector( fileName, format)
Definition
readvector reads data from an existing file. This function is useful when you want a part
parameter's value to be read from a file, as this can be done with a single call to
readvector without having to open and close the file using fopen and fclose.
format is the same string format fscanf uses. format defaults to '%f'.
Example
b = readvector('Text.txt', '%f') will read the contents of Text.txt into vector b as flaoting
point numbers.
real
Syntax
y = real(x)
Definition
This function returns the real part of a complex number. This function operates on an
part-by-part basis on arrays.
Examples:
Formula Result
real(20) 20
real(3+2j) 3
real([-2+4j 5-3j 2+j]) [-2 5 2]
Compatibility
Numeric scalars, vectors, arrays
See Also
182
SystemVue - Users Guide
imag (users)
rectpulse
rectangular pulse shaping
Syntax
Y = rectpulse(X,nSamp)
Definition
Examples
Compatibility
See also
upsample (users), rcosflt , guassfir
rectwin
Syntax
c = rectwin(L)
Definition
Examples:
Formula Result
rectwin(5) [1 1 1 1 1]
See Also:
bartlett (users)
blackman (users)
gausswin (users)
hamming (users)
hann (users)
rem
Syntax
r = rem(a,b)
Definition
This function returns the remainder when dividing a by b. Both parameters are required to
be real arrays or real scalars subject to the restriction that if b is a vector or array, it must
be the same size as a for part-by-part division and remainder computation. when b is a
scalar, all the parts of a are divided by it. When b is explicitly zero, the result is NaN.
Examples:
Formula Result
rem(2, 1.45) 0.55
rem([2,5,6], 1.45] [0.55, 0.65, 0.20]
rem([2,5,6], [1.45,1.55,1.65] [0.55, 0.35, 1.05]
Compatibility
Real valued scalars, vectors, arrays
See Also
183
SystemVue - Users Guide
mod (users)
repmat
Syntax
repm = repmat(orig,dim1)
OR
repm = repmat(orig,dim1,dim2)
OR
repm = repmat(orig,[dim1,dim2,...,dimN])
Definition
This function repeats the input matrix orig in a tiled fashion as many
times along as many dimensions as are specified by the following parameters.
Examples:
See Also:
permute (users)
shiftdim (users)
reshape
Syntax
y = reshape(x , i,j)
y = reshape(x , i,j,k, ...)
y = reshape(x , [i,j,k, ...])
y = reshape(x , ...,[],...)
Definition
y = reshape(x , i,j) returns a i-by-j matrix with elements taken column wise from x. The
number of elements in the resulting i-by-j matrix y must be same as number of elements
in the input matrix x.
y = reshape(x , i,j,k, ...) and y = reshape(x , [i,j,k, ...]) will return a i-by-j-by-k-by....
matrix with same elements as in input matrix x. The number of elements in the resulting
i-by-j-by-k-by.... matrix y must be same as number of elements in the input matrix x.
y = reshape(x , ...,[],...) replaces [] with an integer scalar number representing the
number of elements in the corresponding dimension such that the total number of
elements in output matrix y is same as the number of elements in input matrix x. You can
have only one instance of [] in argument.
Swept-dimensions are NOT counted. (eg. if S is the variable produced by a 100 point
linear analysis of a 2-port circuit, reshape(S, [4;1]) would return a variable containing S,
but having dimensions 100x4x1)
Examples:
184
SystemVue - Users Guide
Formula Result
x = [ 1 , 2 , 3 ; 4 , 5 ,6 ] y = [ 1 , 4, 2, 5, 3 , 6 ]
y = reshape( x , 1, 6 )
x = [ 1 , 2 , 3 ; 4 , 5 ,6 ] y = [ 1; 4; 2; 5; 3; 6 ]
y = reshape( x , [6, 1] )
Or
y = reshape( x , 6, 1 )
x = [ 1 , 2 , 3 ; 4 , 5 ,6 ; 7, 8, 9; 10, 11, 12] y = [ 1, 8; 4, 11; 7, 3; 10, 6; 2, 9; 5, 12 ]
y = reshape( x , 6, [] )
Compatibility
Real and complex-valued Scalars, Vectors, Arrays
See Also
permute (users)
shiftdim (users)
roots
Syntax
polyroot = roots(polycoef)
Definition
This function returns a column vector, polyroot, whose parts are the roots of the
polynomial expressed in the form of the coefficient vector polycoef.
Examples:
See Also
poly (users)
rot90
Syntax
y = rot90(x)
y = rot90(x,n)
Definition
This function takes the matrix x, and rotates it 90 degrees in the counterclockwise
direction. You can also supply the parameter n to specify how many times you want to
rotate the object 90 degrees.
Examples:
185
SystemVue - Users Guide
flipdim (users)
round
Syntax
y = round(x)
Definition
round rounds the argument to the nearest integer. This function operates on an part-by-
part basis on arrays.
Examples:
Formula Result
round( 2.2) 2
round( 2.2 + 3.7j) 2 + 4j
round( -2.3 - 3.9j) -2 - 4j
Compatibility
Numeric scalars, Vectors, Arrays
See Also
floor (users)
ceil (users)
fix (users)
rsdec
Reed-Solomon decoder
Syntax
Definition
Examples
Compatibility
See also
rsenc (users)
rsenc
Reed-Solomon encoder
Syntax
Definition
Examples
Compatibility
See also
rsdec (users)
runanalysis
Syntax
runanalysis('AnalysisName')
runanalysis('AnalysisName', ContinueOnError)
Definition
The runanalysis function is used to force an analysis to run from an equation block. It can
be used to control simulations in a sequential manner. The function does not return until
the analysis finishes, whether successful or in error.
Examples:
SourceAmpls = [1 2 5 10]; % We'll step our source's amplitude with these values
for i = 1 : length(SourceAmpls)
CurAmplitude = SourceAmpls(i); % This variable is used by our source's Amplitude parameter
runanalysis('Analysis1');
% Post process data from the current analysis run
% Post-processing equations would go here
end
Compatibility
See Also
sec
Syntax
y = sec(x)
Definition
sec returns the secant of a radian-valued argument. This function operates on an part-by-
part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
secd
Syntax
y = secd(x)
Definition
secd returns the secant of a degree-valued argument. This function operates on an part-
by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
sech
Syntax
y = sech(x)
Definition
sech returns the hyperbolic secant the argument. This function operates on an part-by-
part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
setindep
Syntax
setindep( "dependentvar", "independentvar1", "independentvar2", ...)
Definition
setindep manually sets the independent variable(s) for a swept variable. Both are passed
by name. A long name can be used for the independentvar. If independentvar is empty
(blank) the dependentvar becomes unswept. All independents should have the same
length, equal to the number of rows in the dependent.
Examples:
188
SystemVue - Users Guide
Formula Result
ind = [0.025;1;2;5] set x to have a 4 part independent vector. x should be of size 4xm or 4xmxn
setindep( "x" ,"ind" )
abest = myS[2,1] set abest to use MyData.F as an independent vector. F must have the same
setindep("abest", number of parts as abest has rows.
"myData.F")
Compatibility
Vectors and Arrays. The independent var must be numeric.
See Also
getunits
setunits
Syntax
setunits( 'varname', unit )
Definition
setunits sets a variable named varname to have units specified by the parameter unit.
unit may be an integer or a string.
setunits is used only to set the units of variables in equations and datasets. It will not change units of a
part's parameters.
Examples:
Formula Result
y = [0.025] sets units of y to um
setunits( 'x' , 6006 ) y = 25000
y=5 sets units of y to mm
setunit( 'y' , 'mm' ) y =5000
y = 0.0001 sets units of y to uF
setunits( 'y', 'uF' ) y = 100
Compatibility
Numeric Scalars, Strings
See Also
getunits
setvariable
Syntax
setvariable( Dataset, Variable, value)
Definition
setvariable sets a variable value in a dataset
Examples:
Formula Result
setvariable( 'OutData', 'OutVar', 3) set the variable named Outvar in the dataset OutData to the value 3
setvariable( 'Out', 'Var', [1 2 3]) set the variable named Var in the dataset Out to a vector [1 2 3]
Compatibility
Dataset and Variable are strings. value is any valid value.
See Also
getvariable (users)
sftrans
transform of lowpass filter to other type filter
Syntax
Definition
Examples
Compatibility
See also
shiftdim
Syntax
y = shiftdim(x,n)
[y,n]=shiftdim(x,n)
Definition
This function can shift the dimensions of the matrix x by the specified dimension number n
.
When n is positive, the dimensions are shifted to the left and wrapped around to the right.
Thus, a 3x2x4 sized matrix will have its parts restructured into a 2x4x3 sized matrix.
When n is negative, the new matrix y has as many singleton dimensions to the left and
the basic structure of x is otherwise left intact. Thus, a 3x2x4 sized matrix will be
restructured into a 1x1x3x2x4 matrix with a n = -2;
Examples:
k=1;
a=zeros(3,2,4);
for x=1:3
for y=1:2
for z=1:4
a(x,y,z) = k;
k = k+1;
end
end
end
% a is a 3-dimensional matrix defined in the form of the following three 2x4 2-dimensional
matrices.
% a(1,:,:) = [ 1, 2, 3, 4; 5, 6, 7, 8];
% a(2,:,:) = [ 9,10,11,12; 13,14,15,16];
% a(3,:,:) = [17,18,19,20; 21,22,23,24];
%
% Now shift dimension of a by 1 to the left so that the resulting matrix is 2x4x3
b=shiftdim(a,1);
% b is a 3-dimensional matrix defined in the form of the following 4x3 2-dimensional matrices.
% b(1,:,:) = [1, 9,17; 2,10,18; 3,11,19; 4,12,20];
% b(2,:,:) = [5,13,21; 6,14,22; 7,15,23; 8,16,24];
%
% Now shift dimension of a by -2 to the right so that the resulting matrix is 1x1x3x2x4
c=shiftdim(a,-2);
% c is a 5-dimensional matrix now
% c(1,1,1,:,:) = [ 1, 2, 3, 4; 5, 6, 7, 8];
% c(1,1,2,:,:) = [ 9,10,11,12; 13,14,15,16];
% c(1,1,3,:,:) = [17,18,19,20; 21,22,23,24];
See Also
permute (users)
190
SystemVue - Users Guide
sign
Syntax
y = sign(x)
Definition
sign returns the signum of the argument. The signum function returns -1 if the argument
is negative, 1 if the argument is positive, and 0 if the argument is 0. This function
operates on an part-by-part basis on arrays.
Compatibility
Numeric scalars, Vectors, Arrays
sin
Syntax
y = sin(x)
Definition
sin returns the sine of the radian-valued argument. This function operates on an part-by-
part basis on arrays.
Examples:
Formula Result
sin( 0 ) 0
sin( pi/2 ) 1
sin( -pi/2 ) -1
sin( [pi/4 2*pi/3]) [0.707 0.866]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
asin (users)
sind (users)
sinc
Syntax
y = sinc(x)
Definition
sinc returns the sinc function of the argument. The sinc function is defined as
sin(pi*x)/(pi*x) or 1 if x is equal to 0. This function operates on an part-by-part basis on
arrays.
Examples:
Formula Result
sinc( 0 ) 1
sinc( pi/2 ) 0.198
sinc( pi/4) 0.253
sinc( 2*pi/3 ) 0.044
The following figure shows sinc(-10:0.01:10).
191
SystemVue - Users Guide
Compatibility
Numeric scalars, Vectors, Arrays
See Also
sin (users)
sind
Syntax
y = sind(x)
Definition
sind returns the sine of the degree-valued argument. This function operates on an part-
by-part basis on arrays.
Examples:
Formula Result
sind( 0 ) 0
sind( 90 ) 1
sind( -90 ) -1
sind( [45 60]) [0.707 0.866]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
asin (users)
sin (users)
sinh
Syntax
y = sinh(x)
Definition
sinh returns the hyperbolic sine of the number, or (exp(x) - exp(-x)) / 2. This function
operates on an part-by-part basis on arrays.
Examples:
192
SystemVue - Users Guide
Formula Result
sinh( 1 ) 1.175
sinh( 5 ) 74.203
sinh( [pi/3 0] ) [1.249 0]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
asinh (users)
size
Syntax
y = size(x)
Definition
size returns a vector containing the number of parts in each dimension of x. part one of y
corresponds to the number of parts in the first dimension, part two to the second
dimension, and so on.
Examples:
Formula Result
size( [1 2 3 4] ) [1 4]
size( [1 2 3; 4 5 6] ) [2 3]
size( ones(4,3,2) ) [4 3 2]
Compatibility
Numeric Scalars, Vectors, Arrays
skewness
Syntax
y = skewness(x)
y = skewness(x,Flag)
y = skewness(x,Flag,iDim)
Definition
Returns the sample skewness of a vector x. Skewness is the third central moment of X
divided by the cube of the standard deviation.
If Flag is 0 (default), skewness normalizes by N-1 where N is the sample size. If Flag is 1,
skewness normalizes by N.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
y = skewness( [ 3 ; 4 ; 8 ; 9 ] ) y = 0
y = skewness( [ 1, 2, -5], 1) y = -0.652
Compatibility
Numeric arrays
See Also
kurtosis (users)
std (users)
var (users)
sort
Syntax
193
SystemVue - Users Guide
y = sort(x)
y = sort(x,dim)
[y,index]=sort(x)
[y,index]=sort(x,dim)
Definition
This function sorts contents of the array x in ascending order along one specific dimension
of the array. When unspecified, the innermost non-singleton dimension is chosen. The
function can be required to additionally specify the original indices in the sorted order.
Examples:
In the following example note that b is the column-wise (default dim is 1 for a 2x3 matrix)
sorted whereas c and d are sorted row-wise. The index matrix associated with d is
interpreted as follows: if the value k appears at a specific location along row i column j, it
means that the number now placed (row i,column j) was originally the number at (row i,
column k).
Compatibility:
Real-valued numeric vectors and arrays or strings
spline
Syntax
polynomial = spline(originalIndep,originalDep)
OR
fittedDependent = spline(originalIndep,originalDep,fittedIndep)
Definition
This function performs spline polynomial extraction from a one-dimensional function
defined as the mapping of an original independent vector onto an original dependent
vector. If supplied with a third argument explicitly specifying the independent vector to
which fitting is required, the function returns the fitted dependent vector. If the third
194
SystemVue - Users Guide
parameter is not supplied then a structure describing the piece-wise polynomial function is
returned, which may then be used in a call to the ppval(polynomial,fittedIndep) function
to generate the fittedDependent variable.
Examples:
In the following example, the original mapping of x and sinc(x) are shown in sparsely
spaced blue dots, one dot per unit along the independent axis. When four times as much
granularity is required, an extended fitting vector xx is introduced. Spline curves produced
using this extended independent vector are compared against the true sinc() function of
the extended vector. Note how there is substantial match when some variation is present
in the original data, e.g. just one non-zero data point in the original dependent vector. In
regions where there is absolutely no off-axis data in the dependent vector i.e. in the side-
lobes, the spline() function is still able to partially recover the existence of the side lobes,
if not the full amplitude of each.
Compatibility
Real-valued 1-dimensional vector: originalIndep, fittedIndep
Real or complex-valued array: originalDep
sqrt
Syntax
y = sqrt(x)
Definition
This function returns the square-root of the argument.
This function operates on an part-by-part basis on arrays.
Examples:
Formula Result
sqrt( 0 ) 0
sqrt( 4 ) 2
sqrt( 2+3i ) 1.67415+j0.895977
sqrt( -1 ) j
sqrt( [9 16 -4]) [3 4 -2j]
Compatibility
Real and complex-valued scalars, vectors, arrays
195
SystemVue - Users Guide
square
square wave generation
Syntax
S = square(Rad)
S = square(Rad,Duty)
Definition
1. S = SQUARE(Rad) generates a 50% duty square wave with period 2*Pi for the vector
Rad (radian). Rad is the product of 2*PI, frequency and time.
2. S = SQUARE(T,DUTY) generates a square wave with specified duty cycle. Duty is the
percent of the period in which the signal is positive.
Examples
f = 100;
t = 0:.0001:.0100;
y = square(2*pi*f*t);
Compatibility
See also
sin (users), cos (users), chirp , gauspuls , pulstran , rectpuls , sinc (users), tripuls
sscanf
Syntax:
A = sscanf( string, format)
A = sscanf( string, format, size)
[A, count, msg, next] = sscanf(...)
Definition:
Used to read formatted input from a string. Converts the input string using format
argument (format) and puts the results into a matrix (A).
size (optional) argument is used to determine how much data is read. Valid values are:
Format:
Whitespace characters (space, tab or new lines) are used to delimit fields. There
are not included in the output.
Non-whitespace characters that are not a part of a format specifier are matched
with the next character in string and then discarded. If the character does not match
sscanf stops process string.
Format specifers: %[*][width][modifiers]conversionChar, where:
* (optional) match the data in string but do not put the corresponding match in the
output matrix. The format must match but it isn't included in the output.
width (optional) maximum number of characters to match in string
modifiers (optional) For compatibility only. valid values (h, l, L)
conversionChar see table below
196
SystemVue - Users Guide
Conversion Characters:
std
Syntax
y = std( x )
y = std( x, Flag )
y = std( x, Flag, iDim )
Definition
Returns the standard deviation of a vector x.
If Flag is 0 (default), std normalizes by N-1 where N is the sample size. If Flag is 1, std
normalizes by N.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
y = std( [ 3 ; 4 ; 8 ; 9 ] ) y = 2.9439
y = std( [ 1, 2, 3], 1) y = 0.8165
Compatibility
Numeric arrays
See Also
kurtosis (users)
var (users)
skewness (users)
str2num
Syntax
y = str2num('xstring')
Definition
This function can convert a single real-valued number from string format to numeric
format.
When supplied with a string containing preceeding non-numeric characters, other than
whitespace or tab, the function returns zero.
Examples:
Formula Result
str2num('500') 500
str2num(' 500
500')
Compatibility
197
SystemVue - Users Guide
String
See Also
num2str (users)
strcmp
Syntax
out = strcmp(str1, str2)
out = strcmp(str, ca)
out = strcmp(ca1, ca2)
Definition
out = strcmp(str1, str2) compares two strings, str1 and str2, and returns true (logical 1)
if they are identical. If not, then it returns false (logical 0).
out = strcmp(str, ca) compares str with each string in a cell array. It then returns a logical
array, out, that contains the corresponding logical values on whether the two strings are
identical.
out = strcmp(ca1, ca2) compares each part in ca1 to the corresponding part in ca2. It
then returns a character array that is the same size as ca1 and ca2 with the corresponding
logical value on whether the two strings are identical.
This function does not ignore case. To ignore case, use the strcmpi function.
Examples:
Formula Result
out = strcmp('One', 'Two') out = 0
out = strcmp('Yes', {'No', 'Yes'}) out = [0,
1]
Compatibility
string array, cell array
See Also
strcmpi (users)
strcmpi
Syntax
out = strcmpi(str1, str2)
out = strcmpi(str, ca)
out = strcmpi(ca1, ca2)
Definition
out = strcmpi(str1, str2) compares two strings, str1 and str2, and returns true (logical 1)
if they are identical. If not, then it returns false (logical 0).
out = strcmpi(str, ca) compares str with each string in a cell array. It then returns a
logical array, out, that contains the corresponding logical values on whether the two
strings are identical.
out = strcmpi(ca1, ca2) compares each part in ca1 to the corresponding part in ca2. It
then returns a character array that is the same size as ca1 and ca2 with the corresponding
logical value on whether the two strings are identical.
This function ignores case. To take the case into account, use the strcmp function.
Examples:
198
SystemVue - Users Guide
Formula Result
out = strcmpi('One', 'Two') out = 0
out = strcmpi('Yes', {'No', 'YES'}) out = [0,
1]
Compatibility
string array, cell array
See Also
strcmp (users)
strfind
Find one string within another
Syntax:
k = strfind(str,pattern)
Definition:
k = strfind(str,pattern) searches the string, str, for occurrences of a shorter string,
pattern, returning the starting index of each such occurrence in the double array, k. If
pattern is not found in str, or if pattern is longer than str, then strfind returns the empty
array, [].
The search performed by strfind is case sensitive. Any leading and trailing blanks in either
str or pattern are explicitly included in the comparison
Examples:
Formula Result
s = 'Find the starting indices of the pattern string';
strfind(s,'in') 2 15 19 45
strfind(s,'In') []
strfind(s,' ') 5 9 18 26 29 33 41
Compatibility:
String, array
See Also:
findstr (users)
strtok (users)
strncmp
Syntax
out = strncmp(str1, str2, n)
out = strncmp(str, ca, n)
out = strncmp(ca1, ca2, n)
Definition
This function compares the first n characters in str1 and str2 and if they are identical, it
returns true (logical 1). Otherwise, it returns false (logical 0).
The function can also compare a string and each part in a cell array, or the parts in two
cell arrays.
This function is case sensitive. To ignore case, use the strncmpi function.
Examples:
199
SystemVue - Users Guide
Formula Result
out = strncmp('example', 'exam', 4) out = 1;
out = strncmp('test', {'exam', 'testing'}, out =
4) [0,1];
Compatibility
string array, cell array
See Also
strncmpi (users)
strncmpi
Syntax
out = strncmpi(str1, str2, n)
out = strncmpi(str, ca, n)
out = strncmpi(ca1, ca2, n)
Definition
This function compares the first n characters in str1 and str2 and if they are identical, it
returns true (logical 1). Otherwise, it returns false (logical 0).
The function can also compare a string and each part in a cell array, or the parts in two
cell arrays.
This function is not case sensitive. To take case into account, use the strncmp function.
Examples:
Formula Result
out = strncmpi('example', 'EXAM', 4) out = 1;
out = strncmpi('test', {'exam', 'TeStING'}, out =
4) [0,1];
Compatibility
string array, cell array
See Also
strncmp (users)
strtok
First token in string
Syntax:
token = strtok('str',delimiter)
token = strtok('str')
[token,rem] = strtok(...)
Definition:
token = strtok('str',delimiter) returns the first token in the text string str, that is, the first
set of characters before a delimiter is encountered. The vector delimiter contains valid
delimiter characters. Any leading delimiters are ignored.
token = strtok('str') uses the default delimiters, the white space characters. These include
tabs (ASCII 9), carriage returns (ASCII 13), and spaces (ASCII 32). Any leading white
space characters are ignored.
[token,rem]\ = strtok(...) returns the remainder rem of the original string. The remainder
consists of all characters from the first delimiter on.
Examples:
s = ' This is a good example.';
[token,rem] = strtok(s)
200
SystemVue - Users Guide
token = This
rem = is a good example.
Compatibility:
String, array
See Also:
findstr (users)
strfind (users)
struct
Syntax
y = struct(field1,value1,filed2,value2,....,fieldN,valueN)
Definition
This function creates a structure parts of which can be of various types ranging from
strings through complex cell arrays. Each field is assigned the type of the value which
succeeds it. If the structure contains more than one cell array, like a matrix, all such cell
arrays must be of the same size. Note that fields are always specified as strings.
Examples:
In the figure below, observe how records of two people who share the same last name can
be saved to and retrieved from a single structure.
Compatibility
Numeric scalars, Vectors, Arrays
sum
Syntax
y = sum(x)
y = sum(x,dim)
Definition
Returns the sum of parts of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
dim, or the first non-singleton dimension if dim is not specified.
The dim argument is optional and specifies which dimension to operate along. For
example, if dim is 1, this function operates on each column of the argument. If the
argument is omitted, the first non-singleton dimension is chosen as the dimension to
operate along.
Examples:
201
SystemVue - Users Guide
Formula Result
y = sum( [ 10 , 3 , 5 ] ) y = 18
y = sum( [ 2 ; 9 ; 11 ] ) y = 22
y = sum( [ complex( 3 , 3 ) , complex( 5 , 2 ) ] ) y = 8 + j5
y = sum( [ 3 , 2 , 19 ; 5 , 7 , 1.5 ] ) y = [8, 9, 20.5]
y = sum( [ 3 , 2 , 19 ; 5 , 7 , 1.5 ], 2 ) y = [24; 13.5]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
prod (users)
svd
Syntax
s = svd(X)
[U,S,V] = svd(X)
[U,S,V] = svd(X, 0)
[U,S,V] = svd(X, 'econ')
Definition
Let X be an m x n matrix and k = min(m,n).
S = svd(X) returns, in the vector S, the singular values (in decreasing order) of the matrix
X. S is a column vector of size k.
[U,S,V] = svd(X) produces matrices U, S, and V that form the singular value
decomposition of X, that is, X = U·S·V', where
U is a unitary m x m matrix
S is a diagonal m x n matrix whose primary diagonal parts are the singular values (in
decreasing order) of X
V is a unitary n x n matrix
[U,S,V] = svd(X, 0) OR [U,S,V] = svd(X, 'econ') produce matrices U, S, and V that form
the 'economical' singular value decomposition of X, that is, X = U·S·V', where
U is an m x k matrix containing only the first k columns of the unitary matrix U returned
by [U,S,V] = svd(X)
S is a diagonal k x k matrix whose primary diagonal parts are the singular values (in
decreasing order) of X
V is an n x k matrix containing only the first k columns of the unitary matrix V returned by
[U,S,V] = svd(X)
Examples:
>> X = [ 0.60099 0.766416 0.440156; 0.12712 0.857445 0.130142; 0.94683 0.447486 0.559306 ]
X =
0.60099 0.766416 0.440156
0.12712 0.857445 0.130142
0.94683 0.447486 0.559306
>> S = svd(X)
S =
1.6967
0.663471
0.0347664
>> [U,S,V]=svd(X)
U =
-0.628061 -0.11714 -0.769297
-0.41523 -0.78565 0.458627
-0.658122 0.607481 0.444796
S =
1.6967 0 0
0 0.663471 0
0 0 0.0347664
V =
-0.620837 0.610289 0.492046
-0.667115 -0.740937 0.0772603
202
SystemVue - Users Guide
-0.411726 0.280286 -0.867134
>> X = [0.723014 0.179696 -0.861837 0.441228; -0.328791 0.934672 1.68603 0.955427]
X =
0.723014 0.179696 -0.861837 0.441228
-0.328791 0.934672 1.68603 0.955427
>> [U,S,V]=svd(X)
U =
-0.293781 0.955873
0.955873 0.293781
S =
2.25294 0 0 0
0 1.07425 0 0
V =
-0.233779 0.553425 0.721934 -0.343335
0.373129 0.415505 -0.509149 -0.654903
0.827729 -0.305779 0.463201 -0.0825176
0.347831 0.653893 -0.0708765 0.668142
>> [U,S,V]=svd(X,'econ')
U =
-0.293781 0.955873
0.955873 0.293781
S =
2.25294 0
0 1.07425
V =
-0.233779 0.553425
0.373129 0.415505
0.827729 -0.305779
0.347831 0.653893
symerr
compute number of symbol errors and symbol error rate
Syntax
[number,ratio] = symerr(x,y)
[number,ratio] = symerr(x,y,flg)
[number,ratio,loc] = symerr(...)
[NUMBER,RATIO,LOC] = symerr(X,Y,FLG)
Definition
If X and Y are of the same size, FLG may be 'overall','row-wise' and 'column -
wise'. When FLG is 'overall', NUMBER and RATIO are scalar which mean the
difference number and rate of all elements in X compared with those in Y. When
FLG is 'row-wise', NUMBER and RATIO are column vectors which mean the
difference number and rate of each row of X compared with that in Y. When FLG
is 'column-wise',NUMBER and RATIO are row vectors which mean the difference
number and rate of each column of X compared with that in Y. LOC is the same
size with X, in which 0 means same, 1 means difference. Default is 'overall' in
this case.
If X is MX-1 vector and Y is MX-NY matrix, FLG may be 'overall' and 'column-
wise'. Default is 'overall'. In this case, X is extended to MX-NY matrix in which
each column is same. Then the calculation is same with that when X and Y are
of the same size.
If X is 1-NX vector and Y is MY-NX matrix, FLG may be 'overall' and 'row-wise'.
Default is 'overall'. In this case, X is extended to MY-NX matrix in which each
row is same. Then the calculation is same with that when X and Y are of the
same size.
Examples
Compatibility
See also
tan
Syntax
y = tan(x)
Definition
tan returns the tangent of the radian-valued argument. This function operates on an part-
by-part basis on arrays.
Examples:
Formula Result
tan( pi ) 0
tan( pi/4 ) 1
tan( -pi/4 ) -1
tan( [5*pi/11 -5*pi/11] ) [6.955 -6.955]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
atan (users)
tand (users)
tand
Syntax
y = tand(x)
Definition
tand returns the tangent of the degree-valued argument. This function operates on an
part-by-part basis on arrays.
Examples:
Formula Result
tand( 180 ) 0
tand( 45 ) 1
tand( -45 ) -1
tand( [180 45] ) [0 1]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
atan (users)
tan (users)
tanh
Syntax
y = tanh(x)
Definition
tanh returns the hyperbolic tangent of the argument, defined as (exp(x) - 1) / (exp(x) +
1). This function operates on an part-by-part basis on arrays.
Examples:
204
SystemVue - Users Guide
Formula Result
tanh( 1 ) 0.762
tanh( 5 ) 1
tanh( pi/3 ) 0.781
tanh( [pi/6 0] ) [0.48 0]
Compatibility
Numeric scalars, Vectors, Arrays
See Also
atanh (users)
tcpip
Syntax
t = tcpip( ipAddr, nPort)
Definition
tcpip creates a class object to do tcpip i/o over a lan. ipAddr is a string with the IP
Address in dotted format, and nPort is a port number for the connection. Once created,
use fopen, fwrite, fread, fprintf, fscanf, fclose to manipulate the port.
Examples:
Formula Result
t = tcpip( '127.0.0.1', 80) Create an object to connect to the web server on this computer (port 80 on 'this')
Compatibility
TCP/IP connections via LAN. ipAddr is a char array, and nPort is an integer.
tcpip Properties
Modify the way the tcpip link works by setting properties in the created class object. tcpip
supports the following properties
Property Description
LocalHost Local host descriptor
LocalPort Local port descriptor
LocalPortMode Specify automatic local port assignment
ReadAsyncMode Specfiy whether an asynchronous read operation.
RemoteHost The remote host ip address (char array)
RemotePort The remote port # (integer)
Terminator Terminator string, such as 'CR/LF'. ASCII value 0 - 127, or 'CR', 'LF', 'CR/LF', or 'LF/CR'
TransferDelay Specifies whether or not to use Nagle's algorithm.
InputBufferSize Size of the input buffer in bytes.
OutputBufferSize Size of the output buffer in bytes.
Timeout Time to wait before timing out on receive (in seconds, floating point).
tic
Measure performance using stopwatch timer
Syntax:
tic
start_time = tic
Definition:
Starts a stopwatch timer. The output will be the time in ms since the operating system
started.
Most commonly used with the function toc to measure the performance time of a set of
statments.
Examples:
t1 = tic
<statments>
205
SystemVue - Users Guide
t2 = tic
<statmets>
dt1 = toc(t1) % the time elapsed since the first tic was called (or t1)
dt2 = toc(t2) % the time elapsed since the second tic was called (or t2)
Compatibility:
output is a double
See Also:
toc (users)
toc
Measure performance using stopwatch timer
Syntax:
toc
dt = toc
dt = toc(start_time)
Definition:
1. toc if there are no input and output, toc will just stop the timer.
2. dt = toc if only one output is asked, then dt will become the time elapsed since last
tic was called.
3. dt = toc(start_time) this call will have the output dt to be the time elapsed since
start_time, where start_time usually is the output of a tic call (eg. start_time = tic)
Examples:
Ex 1:
tic
<statments>
dt = toc % calculates the time elapsed since tic was used, or the time to run the
code in the <statments>
Ex 2:
t1 = tic
<statments>
t2 = tic
<statments>
dt1 = toc(t1)
dt2 = toc(t2)
Compatibility:
doubles
See Also:
tic (users)
toeplitz
Syntax
tm = toeplitz(x)
OR
tm = toeplitz(x,y)
Definition
This function returns an m x m Toeplitz matrix based on an m-length vector x or a
combination of m-length vectors x and y.
When only a single vector is used, the result is a symmetric, Hermitian matrix as shown in
the Tr1 table below. Note that the vector parts are distributed symmetrically with respect
to the principal dialoginal which is occupied by the first part of the input vector.
206
SystemVue - Users Guide
When two vectors are present, the first part of the first vector populates the principal
diagonal as evidenced in the differences between Tr12 and Tr21. The other parts of the
first vector populate the lower-triangle whereas those of the second vector populate the
upper-triangle of the resultant matrix.
Examples:
triang
triangular window
Syntax
W = triang(N)
Definition
for N odd:
W(k) = 2*k/(N+1), if 1<= k <=(N+1)/2
= 2*(N-k+1)/(N+1), if (N+1)/2< k <=N
for N even:
W(k) = 2*k/N, if 1<= k <=(N+1)/2
= 2*(N-k+1)/N, if N/2+1< k <=N
Examples
Compatibility
See also
rectwin (users)
turbodec
turbo decoder
Syntax
y=turbodec(x, g1, g2, map, puncture, tail, niter, algorithm, EbN0, rate)
Definition
This function decodes the codeword defined from turboenc (users)
207
SystemVue - Users Guide
Examples
Compatibility
See also
turboenc (users)
turboenc
turbo encoder
Syntax
Definition
This function eccodes the input message with turbo generation polynomial
defined below.
g1 and g2 are binary form component generator each contains two rows the first is
FeedbackPolynomial and the second is GeneratorPolynomial, e.g.
g1 =
[1 1 1;
1 0 1]
Both component coder will be reset to zero at the beginning of a frame whether
tail is 0 or 1.
Examples
Compatibility
See also
turbodec (users)
unmkpp
Syntax
[breaks,coefs,pieces,oredr,dimension] = unmkpp(pp)
Definition
This function extracts, from the supplied piecewise polynomial pp, its break points,
coefficients, number of pieces, order, and dimension of target. Create pp using spline or
the spline utility mkpp.
Breaks and coefficients are presented as row vectors.
Examples:
208
SystemVue - Users Guide
Compatibility
Structure
See Also
spline (users)
ppval (users)
mkpp (users)
upfirdn
upsample by zero inserting, filtering and downsampling a signal
Syntax
Y = upfirdn(X,H)
Y = upfirdn(X,H,P)
Y = upfirdn(X,H,P,Q)
Definition
x_zeroInsrt = zeros(length(x)*p-p+1,1);
x_zeroInsrt(1:p:end) = x;
x_applyH = conv(h,x_zeroInsrt);
x_dnsmpl = x_applyH(1:q:(length(y)));
Compatibility
See also
resample , interp (users), decimate (users), fir1 (users)
upsample
upsample input signal by inserting R-1 zeros between elements
Syntax
Y = upsample(X,R)
Y = upsample(X,R,OFFSET)
Definition
1. Y = upsample(X,R) upsamples input signal X by inserting R-1 zeros behind each input
sample. X may be a vector or a matrix (one signal per column). For matrix,
upsampling is applied to each column respectively.
2. Y = upsample(X,R,OFFSET) specifies an optional sample offset. OFFSET should be an
positive integer within [0,R-1] and is 0 by default.
Examples
x = [1 2 3 4 5].';
y = upsample(x, 4);
z = upsample(x, 4, 1);
p = [1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0].'; % p equals to y
q = [0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0].'; % q equals to z
Compatibility
See also
downsample (users), upfirdn (users), interp (users), decimate (users), resample
using
Syntax
using('DatasetName');
Definition
This function sets the current context in an equation block to the named dataset. When
set, you can use the variables within the dataset as if there were defined in the equation
block. This function can be used to context switch between datasets in any post
processing Equation page.
Examples:
If there are two datasets, called "Data1" and "Data2" which both contain a variable called
"Var1".
Then the way to access these variables without confusion is as follows:
z1 = [1, 2, 3, 4]
210
SystemVue - Users Guide
Z2 = [1, 2, 3]
Compatibility
String
var
Syntax
y = var( x )
y = var( x, W )
y = var( x, W, iDim )
Definition
Returns the variance of a vector x.
For matrices, this function operates separately on each column and returns a vector. For
multi-dimensional arrays in general, this function operates on the dimension specified by
iDim, or the first non-singleton dimension if iDim is not specified.
Examples:
Formula Result
y = var( [ 3 ; 4 ; 8 ; 9 ] ) y = 8.6667
y = var( [ 1, 2, 3], 1) y = 0.6667
y = var( [ 1, 2, 3], [0.7, 0.1, 0.2] ) y = 0.65
Compatibility
Numeric arrays
See Also
kurtosis (users)
std (users)
skewness (users)
vec2mat
convert vector into matrix
Syntax
MAT = vec2mat(VEC,COL)
MAT = vec2mat(VEC,COL,PAD)
[MAT,PADDED] = vec2mat(...)
Definition
MAT = vec2mat(VEC,COL) converts the vector VEC into a matrix with COL
columns.If the length of vector is not a multiple of columms, then extra zeros
are padded in the last row of matrix.
MAT = vec2mat(VEC,COL,PAD) specifies the PAD bits, instead of using the zeros
as default PAD bits.
Examples
Compatibility
See also
211
SystemVue - Users Guide
vitdec
convolutionally decodes binary stream using Viterbi algorithm
Syntax
Y = vitdec(X,TRELLIS,tbLen,MODE,inType)
Y = vitdec(X,TRELLIS,tbLen,MODE,inType,puncPat)
Y = vitdec(X,TRELLIS,tbLen,'cont',inType,puncPat,initState)
Definition
tbLen: Trace back depth (in symbol number) when decoding, the decoded
will be delayed by tbLen*K bits when MODE is 'cont'. K equals to
log2(TRELLIS.numInputSymbols). Typical value of trace back length is
5~10 times of constraint length.
MODE: 'cont', 'term', 'trunc' or 'tailbit'. All modes except 'tailbit' assume
the decoding state starts from state 0.
'trunc' estimate the last tbLen*K decoded bits from the input
trace with the best metric, decoding delay is removed.
'logic' indicates that X consists of 1's and 0's. For quantified non-
negative data(such as, 0~2^Nbits-1, 0 represents the most
confident logic 0, 2^Nbits-1 represents the most confident logic
1), set MODE with 'logic' and use X/(2^Nbits-1) instead of X.
[Y1,finalState1] = vitdec(X1,t,tbLen,inType,'cont',puncPat)
[Y2,finalState2] =
vitdec(X2,t,tbLen,inType,'cont',puncPat,finalState1)
[Y3,finalState3] =
vitdec(X3,t,tbLen,inType,'cont',puncPat,finalState2)
Note
For consecutive processing, do make sure the length of input data (each piece of total input) is a multiple
of the number of 1's in punctPat, i.e. sum(puncPat), and the length of puncPat is a multiple of N. With this
assumption, the length of de-punctured data shall be a multiple of N=log2(trellis.numOutputSymbols). If
above condition is not satisfied, consecutive decoding may fail. For 'tailbit' decoding, similar condition
must be satisfied.
Examples
Compatibility
See also
convenc (users), poly2trellis (users), istrellis
warning
Syntax
error('message')
Definition
Posts the warning message to the error log and also places the yellow warning symbol on
the menu button.
Examples:
Formula Result
warning( 'out of range') the message "out of range" is posted to the Error Log as a warning
213
SystemVue - Users Guide
Compatibility
Strings
See Also
error (users)
wgn
generates white Gaussian noise
Syntax
Y = WGN(M,N,PWR)
Y = WGN(M,N,PWR,IMP)
Y = WGN(M,N,PWR,IMP,STATE)
Y = WGN(..., POWERTYPE)
Y = WGN(..., OUTPUTTYPE)
Definition
Examples
Compatibility
214
SystemVue - Users Guide
See also
xcorr
Syntax
c = xcorr( x, y, maxlags, 'option' )
[ c, lags ] = xcorr( ... )
Definition
xcorr estimates the cross-correlation sequence of a random process. Autocorrelation is a
special case of cross-correlation.
When only x is specified i.e. c = xcorr( x ) then c is the autocorrelation sequence for the
vector x.
[ c, lags ] = xcorr( ... ) returns two variables c and lags. lags is a vector of the lag
indices at which c was estimated. The ' ... ' represent the x, y, maxlags, 'option'
arguments.
Examples:
Formula Result
x = [ 1, 2i, 3] c = [ 6 + i333.1e-18, 5 + i12, 22 + i10, 15 + i8, 12 - i333.1e-18 ]
y = [ 4, 5, 6 ]
c = xcorr( x, y )
xor
Syntax
y = xor(A, B)
Definition
This function performs an exclusive OR operation on arrays A and B.
It returns a vector of logical values that are true if only one of the corresponding values in
A OR B is nonzero, but not both. Otherwise, the value is false. A and B have to be vectors
or arrays of the same size.
Examples:
zeros
Syntax
y = zeros(m )
y = zeros(m, n)
y = zeros(m, n, p, ...)
y = zeros([m,n,p,...] )
y = zeros(m, n, p, ..., class)
215
SystemVue - Users Guide
y = zeros([m,n,p,...], class)
Definition
This function returns a m by n by ... array with every part equal to 0. If only one
argument is specified and it is a scalar m, then an m x m matrix is returned. A vector of
dimensions may also be passed in. The optional class argument is a string that specifies
the data type of the array to return.
Examples:
Formula Result
y = zeros( 3 , 2 ) y = [ 0 , 0 ; 0 , 0 ; 0 , 0 ]
y = zeros( 2 ) y=[0,0;0,0]
y = zeros( [5 1] ) y = [ 0 ; 0 ; 0 ; 0 ; 0 ]
See Also
ones (users)
eps (users)
Using Math Language
Math Language, along with most of its built-in functions, was designed to be compatible
with m-file script syntax.
Statements
An equation block consists of one or more statements. Multiple statements placed on the
same line are separated by line breaks, commas, or semicolons. The following two
equation blocks are equivalent:
X=2
Y=3
and
X = 2, Y = 3
If you end a statement with a semicolon, it does not generate output in the command
window.
Complicated statements can span multiple lines and use control structures like while
loops, for loops, and if statements.
Assignments
An assignment statement assigns a value to a variable. The syntax of an assignment
statement is as follows:
variableName = Expression
For example,
Example:
216
SystemVue - Users Guide
function resonantInductor = ResL( resonantCapacitor, resonanceFrequency )
% inductance is in nH, capacitance is in pF, frequency is in MHz
FHz = 1e6 * resonanceFrequency;
CFarads = 1e-12 * resonantCapacitor;
Omega = 2 * pi * FHz;
LHenries = 1 / (Omega^2 * CFarads);
resonantInductor = LHenries * 1e9; % the return value
end
You may return multiple values by listing them in the result expression, as in
Vectors may also be used for specifying multiple parts in a dimension. The following
example illustrates this:
x = [1 2 3; 4 5 6]
x_dims = size(x) % x_dims is the vector [2 3]
num_parts = length(x) % num_parts is 6
Cell Arrays
Cell arrays are arrays that support each part having a differing data type. Each part in a
cell array is called a cell. As an example, you may have a 1x3 cell array in which the first
cell is a number, the second cell is a character array, and the third cell is a structure.
Furthermore, parts of cell arrays may be cell arrays themselves. Cell arrays, just like
numeric arrays, may have any number of dimensions. Cell array vectors and matrices
may be defined inline as shown here:
217
SystemVue - Users Guide
end
% - close t so we rerun cleanly
fclose(t)
When finished, close the socket by using fclose. If you are totally done with the socket you
can use the Math Language clear function to remove the class object entirely.
218
SystemVue - Users Guide
Examining Datasets
Datasets are containers which hold data, such as the results of a simulation or a table of
input. The results are stored in Variables which can be viewed in tabular form within the
dataset, plotted on a graph, displayed in an output Table, etc. Examine a dataset by
opening it with a double-click. You can also add new variables to a dataset (for sweeping
or just for analizing the data in greater detail).
Open the Data Flow Template (via the Start Page). Double-click Design1_Data on the
workspace tree and then click the variable "Spectrum_Phase" on the left-side of the
window, to see its values. Hovering the mouse over a variable pops up some info, which
varies according to the measurement.
In the display above the left-hand pane shows all of the result variables (including
Spectrum_Phase_Freq, the frequency or independent variable associated with
Spectrum_Phase, the selected variable). The right-hand pane shows whatever piece of
data you have selected in the left pane. The upper left-corner box in the grid is the units
of measure (Hz down and radians for the values). The lower right pane (which is usually
collapsed – drag the divider bar upwards to see it) displays a summary of the variable
information.
Each type of analysis creates a different dataset with differing variables which are
determined by the Analysis. Often, the variable is directly associated with a particular
measurement, such as BER, EVM, or P2.
Each dataset contains variables, which can be matrices, vectors, or scalars. These
variables are either automatically created by simulation runs or manually by the user.
Note that when a dataset is created by a simulation, the data within that dataset is always
in MKS. You may display the data in a unit of your choice, but the actual data values are
MKS values.
Click Spectrum_Phase on the left to show the tabular display of values in the grid on the
top-right. It shows that the frequencies analyzed were 0, 1000, 2000, ..., 500000 Hz. The
single grid-cell (top left corner of the grid) which says Hz:rad shows that the units for
Frequency are Hz and the angles are shown in radians. The display on the bottom-right
(which is usually collapsed) shows the type and size of the clicked data.
In addition to seeing the simulation results, Datasets can have short equations to help you
analyze and diagnose issues with your circuits. For details, see Creating Variables.
219
SystemVue - Users Guide
Creating Datasets
Datasets are usually created automatically when Analyses run. Some analyses
(particularly SPECTRASYS) can create more than one dataset. Within the dataset are the
fundamental results – measurements created by the simulation.
In addition, a blank dataset can be created manually from the workspace tree (in the
docking window) via the "new item" button (although that is rarely neccesary).
The actual data within a dataset is determined the Analyses settings. SPECTRASYS lets
you limit which data is created during the simulation run. This can reduce the size of
datasets significantly and also reduce their complexity.
If we rerun SPECTRASYS with all of the output options enabled, we get this:
Now we can't even fit the entire dataset contents in the window.
Although more complex and intimidating there are many cases where more data is better
than less. However, file storage requirements go way up with this sort of data.
Creating Variables
Variable Properties Dialog Box
For complete description of Variable Properties dialog box, see Variable Properties
220
SystemVue - Users Guide
8. To get...
221
SystemVue - Users Guide
8.
9. For most formulas, the Unit of Measure and Independent Variable will fill themselves
in once the formula is parsed.
222
SystemVue - Users Guide
Using Datasets
Datasets are extremely useful for comparing different circuit configurations. You can run a
simulation, save the data, then change some parameters, rerun the simulation and
compare the two sets of data easily.
Normally, an analysis has the dataset name stored within it. You might set that name to a
formula based on the parameters, but it's simpler to just Snapshot or Checkpoint the
dataset.
To Checkpoint a Dataset
Right-click the dataset and select Snapshot. Another dataset named mydata_Snap is
created. This Snap dataset contains the numerical data from the first dataset (all
formulas are parsed and converted to data and the formula text is stored in the variable
description).
To compare PPORT[2] for the two datasets just enter two measurements in a graph or
table like this:
The HB1_Data_Snap.VPORT entry says to use the VPORT variable from HB1_Data_Snap.
Note we use db() here because the data in the dataset is in MKS and we want dBV for
display.
Importing Variables
Variables can be imported to the dataset from any text file. Access this feature by right-
clicking in the variable block of the data set and choosing "Import Variable".
223
SystemVue - Users Guide
Browse and select a file. Enable "First Column is Independent Data" if the first column of
the data is independent data (swept). Name the variable in the Variable Name field.
The data should be formatted as a list or matrix of numbers. Semicolons (" ; ") and
spaces (" ") are used to indicate breaks between values Other characters are treated as
zeroes. Begin the data with !Units unitindep unitdep to define a unit of measure for the
data. Other rows that begin with a ! are ignored as comments.
225
SystemVue - Users Guide
Notes
1. Complex data should come in pairs of columns; two parts are needed to specify a
point in the 1D complex space. A warning is given if there is an odd number of
columns (excluding the independent vector).
2. To use the dB scale for complex numbers, the unit should be specified as dB;
otherwise the absolute scale is used based on whatever unit is defined. For example,
input impedance should have a unit of "Ohm" which can also potentially have a
phase; thus it cannot be in Ohms and dB simultaneously.
3. Typical units: dB, dBm, dB10, dB20, Abs, Ohms, V, A, mil, pF, nH
4. The independent variable must be real ( this will typically correspond to time or
frequency, both of which are real quantities).
226
SystemVue - Users Guide
Graphs
Graphs display data from datasets (users) or equations (users), which are usually
measurement data derived from the analysis of a design. SystemVue has several types of
graphs, including:
Creating Graphs
Graphs can be created manually, however the easier way to provide a context first. See
sections on creating a graph from a dataset or creating a graph from a schematic.
227
SystemVue - Users Guide
The actual items available on the menu are context-sensitive, based on the part or node you clicked
and the simulations available. For example, the Relevant S-Parameters option generates
measurements for all S-parameter measurements that are pertinent to the indicated port. Also, the
workspace must contain at least one analysis referring to this schematic design to make this feature
available. (Otherwise there is nothing to plot.)
2. To create another graph, right click the port again and select a different option. Your
screen should now have a spectrum similar to this:
Zooming Graphs
You can zoom on graphs using buttons on the Graph Toolbar (users). Depending on which
graph type you are using, some of these buttons might be grayed out.
228
SystemVue - Users Guide
Normally, only the X-Axis on a rectangular graph is zoomed. Hold down the Ctrl key to also zoom the Y-
Axis.
As you zoom out, the graph background may selectively skip drawing excessive details. This is intentional.
Similar to using a street atlas, a state map or a world map, only the appropriate details are shown at a
particular zoom setting.
1. Click one of the following buttons on the Graph toolbar to use a tool:
Click this button To select this tool Keyboard
Pan the graph. P
After selecting the tool, click and drag in the graph to use the tool. When you let up
on the mouse the tool disappears.
Zoom in on a rectangular area of the graph by click-dragging with the zoom tool.
Click the left button to zoom in; click the right button to zoom out.
2. Click one of the following buttons on the Graph toolbar to automatically zoom to a
region
Click this button To do this
Zoom the graph to page.
When you click the Save Axis Favorite button (or use a hot key found in the Graph menu),
the current axis settings will be saved in a short list of favorites. If the list is full, the new
settings will overwrite the oldest Axis Favorite.
Annotating Graphs
The Annotation button ( ) on the Graph toolbar gives you access to the Annotation
Toolbar (users). The Annotation toolbar provides lines, circles, and text that you can use
to point out details of interest on a graph.
For example, the Text Balloon annotation has a "tail" which can be anchored to a data
point on a graph, to the page, or not anchored by right-clicking on the balloon and
selecting Anchor Pointer on the menu.
To create a balloon that's initially anchored to a data point, first ensure that no marker is selected. If the
trace vertices are not visible, right-click the trace and select Show Vertex Symbols. Right-click a trace
vertex (or WhatIF bar) and select Create Info Balloon. The balloon will be anchored to the point and
filled from the info box that is displayed when the mouse hovers over a data point.
Tip for advanced users: To copy the text from the balloon to the Windows clipboard, click on the
balloon, right-click on the balloon and select Enter Text, select the text and copy it to the clipboard using
Ctrl_V.
229
SystemVue - Users Guide
The Graph Properties (users) window lets you change the attributes of a graph, such as
the title or the series measurements.
See Also
230
SystemVue - Users Guide
Graph Properties
Graph properties define a graph object. The Graph Properties window permits changes
to properties such as the title or a series, i.e. a plot of a measurement variable.
231
SystemVue - Users Guide
Name – The name of the graph object, which is shown on the workspace tree
Graph Title – The plot title, which is drawn at the top of the graph (like a heading)
Show All Columns – When this box is checked, infrequently-used columns in the
Series window (such as On Right and Hide?) are shown.
Advanced... Button – Clicking this button displays the Advanced Graph
Properties dialog, as described below.
Series Settings
The following series window has defined two series for plotting.
Edit/Add Button – Clicking on the Edit or Add buttons will pop-up the Graph Series
Wizard (users) for a series definition.
Remove Button – Clicking on this button removes the associated series.
Context – The text provides context for the Variable text box. If left blank, the
Variable text box must have a fully qualified variable name. Typically, the context is
the dataset name where the variable is defined. To graph an equation variable, set
this text box to [Equations]. The equation hierarchy is searched for the equation
variable. If the equation variable is not found, an error is logged.
Variable – The text contains the name of the variable that is to be graphed.
Label (Optional) – The text contains the axis label for the series. If left blank, the
Variable text is used.
On Right / On Bottom – If the box is checked, the an alternate vertical axis for the
series is placed on the right side of a rectangular graph. Polar charts use On Bottom
to indicate the use of the "lower" radial axis.
Hide? – If the box is checked, the series is not plotted.
Color Button – Click on this button to change the color that has been assigned to
the series.
Type – This informational (read only) text box states the series plot type.
If both vertical axes are used, the Y-Axis tab name is changed to Left Y-Axis, and an
additional tab labeled Right Y-Axis is added. Most of the settings are similar.
Auto-Scale – When checked, the axis automatically sets its limits to match the
range of the data which is being plotted
Label – Use this label to customize the axis name
Logarithmic – When checked, the axis is drawn with a logarithmic scale
Min – Sets the lower numerical range of an axis
Max – Sets the upper numerical range of an axis
Units – Sets the units-of-measure used by the axis (and Min and Max)
# Divisions – Sets the number of divisions to use on the axis; contains Auto if the
divisions will be determined automatically
Tip: To control the axis tick marks, you can set the Min and Max fields to appropriate numbers, e.g. in
the above examples you might want to specify the Max to 1000e-6 s.
Upper and Lower Scale – Polar charts have both an upper and lower scale, so that
different numerical ranges may be compared on the same plot.
Linear or dB – Indicates which scaling method to use
Maximum – Typically 0.0 for dB and 1.0 for Linear
General Tab
The General tab contains generalized graph settings, such as a description field.
233
SystemVue - Users Guide
Description – An optional description which is saved with your graph
Goal Lines – Specifies the thickness of the goal line(s): Thin, Medium, Thick, Heavy,
or None
Goal Fill – Sets the transparency of the shaded goal area: Invisible, Faint, Semi-
Transparent (Normal), or Heavy
Show Optimization targets – Enables Optimization target drawing. (Shows targets
set up in separate Optimization evaluation.)
Show Yield targets – Enables Yield target drawing. (Shows targets set up in
separate Yield evaluation.)
Show Circles on vertices – This setting is only available for circular graphs (like
Smith or Polar). When checked, this option draws circle(s) at every vertex of a
circular measurement, such as SB1, SB2, etc.
Apply to All Graphs button – Applies the current Goals tab settings to all the
graphs in the current workspace.
Marker Lines – Sets the thickness of the graph traces: Thin, Medium, Thick, Heavy,
or None
Smooth Graph Traces – By default, anti-aliasing techniques are used to remove
jagged pixel edges, however by default, traces with a large number of vertices are
not smoothed
Allow smoothing when number of vertices is large – Also smooth traces that
contain a lot of points
Smooth Graph Background – Smooths the "graph paper" background; only
available for circular charts
Apply to All Graphs button – Applies the current Graph Lines tab settings to all
the graphs in the current workspace.
Clicking the OK button accepts the property changes and exits the dialog. Clicking the
Cancel button dismisses any changes and exits the dialog. Clicking the Apply button
temporarily accepts property changes for previewing. The Help button links to
documentation.
See Also
Graphs (users)
Graph Series Wizard (users)
Graph Toolbar (users)
Types of Graphs (users)
Graph Series Wizard
234
SystemVue - Users Guide
This wizard initializes properties for a graph object. For a new graph, the wizard is invoked
by adding a graph to the work space tree or by selecting a variable from a dataset and
adding a new graph. For a created graph, clicking on the Add or Edit buttons in the
Graph Properties (users) dialog will pop-up the Graph Series Wizard. The following
shows the wizard when a graph object is added to the work space tree.
Note that a complete list of series (plot) types is available and that all dataset variables
are ready for selection. This wizard state can be reached by clicking the Clear Mode
button.
A specific series can be directly chosen from the list in the Type of Series window, and
consequently the list of available dataset variables is refined. Conversely, a dataset
variable can be chosen from the Data window, and the list of available plot types is
refined.
Wizard Components
The components are described in top-down order.
General. Variables are plotted against their domains. Every variable is compatible
with this type.
Level Diagram. A variable generated by SpectraSys (RF System Analysis) which is
a measurement at components along a selected path is graphed as a function of its
path position.
Spectrum. Plot a variable whose independent axis is Frequency. This plot type is
also compatible with variables whose independent is Time and will produce a post-
processed set of equations which involve taking an FFT. Various options for the FFT
235
SystemVue - Users Guide
are available - see the Post Processed equation block.
Constellation. Complex samples are plotted with the real part specifying the X-Axis
coordinate and the imaginary part specifying the Y-Axis coordinate.
Cross Correlation. Performs a cross correlation between two variables that are
selected in separate Data windows.
Eye. An Eye diagram is produced by overlaying fixed periods of a real variable.
Time. Only variables with a time domain are selected for graphing.
Trajectory. This is the Constellation plot with line segments connecting
consecutive samples.
Y versus X. A variable from each Data window is selected and graphed against each
other.
Data Window
Once a series type is selected, the possible dataset variables required for the plot are
displayed in one or more Data windows. Alternatively, if a variable is chosen then a
refined list of plot types is shown in the Type of Series window.
Note that an un-named pull-down menu that is located at the upper right of a Data
window can be used to modify a selected variable. This pull-down menu is activated when
there is a potential need to further specify the selected variable. In the following example,
only the imaginary part of the complex variable N1 that has been selected in Y Data
window is desired.
236
SystemVue - Users Guide
While equations are automatically added, one can customize the equations. To edit the
equations, click on the Post Process button and the following window post processing
window should appear.
For the description of the equation language, see Using Mathematics Language
(users). The language functions are described in Math Language Function Reference
(users).
237
SystemVue - Users Guide
See Also
Graphs (users)
Graph Properties (users)
Math Language Function Reference (users)
Types of Graphs (users)
Using Math Language (users)
Types of Graphs
Rectangular Graphs
A rectangular graph is a Cartesian coordinate plot. You can use a rectangular graph to
display two-dimensional data versus frequency (for example: magnitude or phase of a
complex measurement, but not both).
In the figure below, the S-parameter insertion loss and return loss of a bandpass filter are
plotted. There are 3 types of markers shown: a peak marker, a regular (fixed frequency)
marker, and a valley marker. You can add to any rectangular graph. Regular markers can
also be placed on circular charts.
238
SystemVue - Users Guide
If you do not like the small circles, squares, or triangles that show each data point, hide them using the
Show Symbols On Trace option on the Graph menu.
Polar Charts
A polar chart is used to display complex data, such as S-Parameters or impedances. In the
figure below, S11 (input reflection coefficient) and S22 (output reflection coefficient) are
plotted. The horizontal axis on a polar chart represents purely real numbers, while the
vertical axis represents purely imaginary numbers. Numbers that lie between the two axes
have both imaginary and real components.
Smith charts and polar charts generate the same plots for S-parameters (only the
background and scales are changed). Additionally, certain measurements (such as Y
Parameters) may be plotted on polar charts and not on Smith charts (where those
measurements don't really make sense).
See Also
Graphs (users)
Graph Properties (users)
Using Markers on Graphs (users)
Using Markers on Graphs
Markers are a useful way to examine and document data values on a graph.
239
SystemVue - Users Guide
Here is the graph after placing a standard marker on the red trace:
The Mark All Traces mode displays additional marker flags on all relevant traces of chart
as shown in the following figure:
Whenever a marker is selected as the currently active marker, the marker text colors are
inverted (white on a colored rectangle). The figure below shows two markers. The marker
on the right is selected.
240
SystemVue - Users Guide
To add a marker
Click a data point on a trace. Clicking on a graph data point will create a new Marker.
To select a marker
Click the marker you want to select.
To delete a marker
Select the marker and then press the Delete key
Alternate: click the Delete All Markers button
Peak marker
1. Place a Standard marker on a graph, as described above.
2. Click the marker and set its style to Peak using the Marker Toolbar.
The following figure is an example of what happens when a standard marker (red) is
changed to a peak marker:
241
SystemVue - Users Guide
Peak/Valley detection works as follows: The "aperture" window is a box that is used for peak / valley
detection. A peak or valley must be at least as large as the box, otherwise it is ignored. In general, a user
should never need to adjust these, as the defaults are pretty good. A local maximum can be rejected by
increasing the aperture window. Small peaks can be detected by decreasing the window size. The same
criteria are used for valley detection (with a sign flip). The parameters are percentages (which are scaled
by the bounds of the graph) and then used to evaluate candidate peaks / valleys and reject those that are
too small to be of interest.
Valley marker
1. Place a Standard marker on a graph, as described above.
2. Click the marker and set its style to Valley using the Marker Toolbar .
Bandwidth marker
1. Place a Standard marker on a graph, as described above.
2. Click the marker and then click Bandwidth on the Marker Toolbar . The marker's style
and name will be updated and 2 associated relative markers will be placed
automatically.
Here is an example of a Bandwidth marker, along with its associated relative markers:
Notice that the actual measured bandwidth of 24 MHz is displayed. It is calculated directly
from the positions of the two relative markers, which are both set to -6.0 dB down. You
can increase the number of data points in the simulation as needed so that the relative
markers are positioned with sufficient precision. You can adjust the dB down settings of
both relative markers associated with the Bandwidth marker at the same time by setting
the Bandwidth marker's properties. Set an individual relative marker's properties to
independently set the dB down to different values.
If you need the bandwidth based on a fixed center frequency, place a bandwidth marker, change the
marker type to Standard, and then type the frequency in the marker's properties window. The relative
markers automatically follow the marker to its new location.
242
SystemVue - Users Guide
Relative marker
The following figure is an example of a Relative maker (on right) that is relative to the
first marker ("M1"):
Notice the delta value (-2.68 dB) is displayed. That is the actual value derived from the
simulation data, even though the marker's default dB down of -3.0103 dB was requested.
The relative marker is always placed on an actual simulation data point.You can
increase*the number of data points in the simulation as needed to get the relative marker
value closer to -3 dB down.*Because this relative marker is attached to a peak marker,
both markers track tuning changes in tandem.Also, notice that the original marker is
automatically named M1 so the relative marker can reference it.
Delta marker
1. Double-click the existing marker that you want to measure the delta to and ensure
that it has a name.
2. Place a Standard marker on a graph, as described above. This will become the "delta
marker".
3. Double-click the new marker.
4. Check Show delta X (and/or delta Y).
5. Select the original marker name in the Relative To combo box.
6. Click OK.
Naming Markers
Name a marker for reference or documentation purposes. You must name a marker if a
Relative or Delta marker references it.
Bandwidth markers are automatically named in the format BW1, BW2, and so on. Other
markers are automatically named M1, M2, and so on.You can hide marker names using
243
SystemVue - Users Guide
the Marker Properties window; however, the name always displays on a tool tip.
Hiding vertical lines and trace symbols using the Graph menu.
Placing marker text on the right using the Graph menu.
Changing graph and marker settings using the Graph menu or Graph toolbar.
Adding titles and annotations by right-clicking the graph and using the menu.
244
SystemVue - Users Guide
Moving graph legends by dragging them into place.
Removing symbols on traces using the Graph menu.
See Also
Graphs (users)
Types of Graphs (users)
Marker Toolbar
Graph Toolbar (users)
245
SystemVue - Users Guide
M-File
Directory of M-Files
S-Data File
XML File
CITI File
Generic MDIF Format
X-parameter GMDIF Format
To import a file
1. Click File on the SystemVue menu and select a file type from the Import menu.
2. Follow the instructions in the windows that appear.
Or
3. Right click on a folder in the Workspace Tree and select the Import menu.
4. Follow the instructions in the windows that appear.
M-File Import
Imported M-Files are placed in an equation block on the workspace tree.
1. Open up the Parts Selector (Ctrl_Shift_A) or click the part selector button ( )
2. Change the Current Library to the S-Parameter library of interest
246
SystemVue - Users Guide
3. Click the library part of interest (the mouse cursor will change to a + sign)
4. Place the part in the schematic by clicking the schematic
NOTE: On first use of the selected library it will be unzipped and the S-Parameter file associated
with the part will be imported into the workspace tree
Or
1. Select File, Import, then S-Data File from the main SystemVue menu
2. Browse to the S-Parameter file
Or
1. Place a S-Parameter part in the schematic (1-port , 2-port , n-port ). This can be
done from the Linear Toolbar or the Part Selector
2. Double click the part to bring up the part properties
3. Click the Browse button to browse to the S-Parameter file
Manually imported S-Parameters don't use a filename name. The data must exist on the
workspace tree. If the dataset is deleted then there is insufficient information to correctly
build the model. The model has no need of the filename and simply needs to know the
name of the dataset.
1. Place a dataset part in the schematic (NPOD ). This can be done from the Linear
Toolbar or the Part Selector
2. Double click the part to bring up the part properties
3. Set the dataset name to the name of the imported S-Parameters
4. Add an analysis and point it to the desired schematic
5. Run the analysis
Reference
NPOD
1. Select the Import menu option from one of the given methods
2. Click XML file
3. Browse to the XML file of interest
CITIfile is a standardized data format that is used for exchanging data between different
computers and instruments. CITIfile stands for Common Instrumentation Transfer and
Interchange file format.
This standard is a group effort between instrument and computer-aided design program
designers. As much as possible, CITIfile meets current needs for data transfer, and it is
designed to be expandable so it can meet future needs.
CITIfile defines how the data inside an ASCII package is formatted. Since it is not tied to
any particular disk or transfer format, it can be used with any operating system, such as
DOS or UNIX, with any disk format, such as DOS or HFS, or with any transfer mechanism,
such as by disk, LAN, or GPIB.
247
SystemVue - Users Guide
Data Formats
There are two main types of data formats: binary and ASCII. CITIfile uses the ASCII text
format. Although this format requires more space than binary format, ASCII data is a
transportable, standard type of format which is supported by all operating systems. In
addition, the ASCII format is accepted by most text editors. This allows files to be created,
examined, and edited easily, making CITIfile easier to test and debug.
The descriptions and examples shown here demonstrate how CITIfile may be used to
store and transfer both measurement information and data. The use of a single, common
format allows data to be easily moved between instruments and computers.
CITIfile Definitions
Package
When stored in a file there may be more than one CITIfile package. With the Agilent 8510
network analyzer, for example, storing a memory all will save all eight of the memories
held in the instrument. This results in a single file that contains eight CITIfile packages .
Header
The header section contains information about the data that will follow. It may also
include information about the setup of the instrument that measured the data. The
CITIfile header shown in the first example has the minimum of information necessary; no
instrument setup information was included.
Data Array
An array is numeric data that is arranged with one data part per line. A CITIfile package
may contain more than one array of data. Arrays of data start after the BEGIN keyword,
and the END keyword follows the last data part in an array.
248
SystemVue - Users Guide
A CITIfile package does not necessarily need to include data arrays. For instance, CITIfile
could be used to store the current state of an instrument. In that case the keywords VAR ,
BEGIN , and END would not be required.
When accessing arrays via the DAC (DataAccessComponent), the simulator requires array
parts to be listed completely and in order.
Keywords
Keywords are always the first word on a new line. They are always one continuous word
without embedded spaces. A listing of all the keywords used in version A.01.00 of CITIfile
is shown in CITIfile Keyword Reference.
3. If the CITI file has arrays (variable, which names have indexes in square braces[]), it
opens the dialog, defining output format of the array data.
249
SystemVue - Users Guide
5. If the workspace tree has dataset with name of the imported CITI file, then this
dialog is opened to rename the output dataset:
250
SystemVue - Users Guide
Saving its array data as Arrays will creates swept relative to independent variable
freq vector PORTZ and matrix S:
otherwise the array data will be saved as scalar varaiables PORTZ_i and S_i_j:
251
SystemVue - Users Guide
CITIfile Examples
This example shows an Agilent 8510 display memory file. The file contains no frequency
information. Some instruments do not keep frequency information for display memory
data, so this information is not included in the CITIfile package.
CITIFILE A.01.00
#NA VERSION HP8510B.05.00
NAME MEMORY
#NA REGISTER 1
VAR FREQ MAG 5
DATA S RI
BEGIN
-1.31189E-3,-1.47980E-3
-3.67867E-3,-0.67782E-3
-3.43990E-3,0.58746E-3
-2.70664E-4,-9.76175E-4
0.65892E-4,-9.61571E-4
END
This example shows an 8510 data file, a package created from the data register of an
Agilent 8510 network analyzer. In this case, 10 points of real and imaginary data was
stored, and frequency information was recorded in a segment list table.
CITIFILE A.01.00
#NA VERSION 8510B.05.00
NAME DATA
#NA REGISTER 1
VAR FREQ MAG 10
DATA S[1,1] RI
SEG_LIST_BEGIN
SEG 1000000000 4000000000 10
SEG_LIST_END
BEGIN
0.86303E-1,-8.98651E-1
8.97491E-1,3.06915E-1
-4.96887E-1,7.87323E-1
252
SystemVue - Users Guide
-5.65338E-1,-7.05291E-1
8.94287E-1,-4.25537E-1
1.77551E-1,8.96606E-1
-9.35028E-1,-1.10504E-1
3.69079E-1,-9.13787E-1
7.80120E-1,5.37841E-1
-7.78350E-1,5.72082E-1
END
This example shows an 8510 3-term frequency list cal set file. It shows how CITIfile may
be used to store instrument setup information. In the case of an 8510 cal set, a limited
instrument state is needed to return the instrument to the same state that it was in when
the calibration was done.
Three arrays of error correction data are defined by using three DATA statements. Some
instruments require these arrays be in the proper order, from E[1] to E[3] . In general,
CITIfile implementations should strive to handle data arrays that are arranged in any
order.
CITIFILE A.01.00
#NA VERSION 8510B.05.00
NAME CAL_SET
#NA REGISTER 1
VAR FREQ MAG 4
DATA E[1] RI
DATA E[2] RI
DATA E[3] RI
#NA SWEEP_TIME 9.999987E-2
#NA POWER1 1.0E1
#NA POWER2 1.0E1
#NA PARAMS 2
#NA CAL_TYPE 3
#NA POWER_SLOPE 0.0E0
#NA SLOPE_MODE 0
#NA TRIM_SWEEP 0
#NA SWEEP_MODE 4
#NA LOWPASS_FLAG -1
#NA FREQ_INFO 1
#NA SPAN 1000000000 3000000000 4
#NA DUPLICATES 0
#NA ARB_SEG 1000000000 1000000000 1
#NA ARB_SEG 2000000000 3000000000 3
VAR_LIST_BEGIN
1000000000
2000000000
2500000000
3000000000
VAR_LIST_END
BEGIN
1.12134E-3,1.73103E-3
4.23145E-3,-5.36775E-3
-0.56815E-3,5.32650E-3
-1.85942E-3,-4.07981E-3
END
BEGIN
2.03895E-2,-0.82674E-2
-4.21371E-2,-0.24871E-2
0.21038E-2,-3.06778E-2
1.20315E-2,5.99861E-2
END
BEGIN
4.45404E-1,4.31518E-1
8.34777E-1,-1.33056E-1
-7.09137E-1,5.58410E-1
4.84252E-1,-8.07098E-1
END
When an instrument's frequency list mode is used, as it was in this example, a list of
frequencies is stored in the file after the VAR_LIST_BEGIN statement. The unsorted
frequency list segments used by this instrument to create the VAR_LIST_BEGIN data are
253
SystemVue - Users Guide
defined in the #NA ARB_SEG statements.
This example shows how a CITIfile can store 2-port S-parameter data. The independent
variable name FREQ has two values located in the VAR_LIST_BEGIN section. The four
DATA name definitions indicate there are four data arrays in the CITIfile package located
in the BEGIN...END sections. The data must be in the correct order to ensure values are
assigned to the intended ports. The order in this example results in data assigned to the
ports as shown in the table that follows:
CITIFILE A.01.00
NAME BAF1
VAR FREQ MAG 2
DATA S[1,1] MAGANGLE
DATA S[1,2] MAGANGLE
DATA S[2,1] MAGANGLE
DATA S[2,2] MAGANGLE
VAR_LIST_BEGIN
1E9
2E9
VAR_LIST_END
BEGIN
0.1, 2
0.2, 3
END
BEGIN
0.3, 4
0.4, 5
END
BEGIN
0.5, 6
0.6, 7
END
BEGIN
0.7, 8
0.8, 9
END
254
SystemVue - Users Guide
Keyword Example and Explanation
CITIFILE Example: CITIFILE A.01.00
Identifies the file as a CITIfile and indicates the revision level of the file. The CITIFILE
keyword and revision code must precede any other keywords.
The CITIFILE keyword at the beginning of the package assures the device reading the file
that the data that follows is in the CITIfile format.The revision number allows for future
extensions of the CITIfile standard.
The revision code shown here following the CITIFILE keyword indicates that the machine
writing this file is using the A.01.00 version of CITIfile as defined here. Any future
extensions of CITIfile will increment the revision code.
NAME Example: NAME CAL_SET
Sets the current CITIfile package name. The package name should be a single word with no
embedded spaces. Some standard package names:
RAW_DATA : Uncorrected data.
DATA: Data that has been error corrected. When only a single data array exists, it should be
named DATA .
CAL_SET: Coefficients used for error correction.
CAL_KIT: Description of the standards used.
DELAY_TABLE: Delay coefficients for calibration.
VAR Example: VAR FREQ MAG 201
Defines the name of the independent variable ( FREQ ); the format of values in a
VAR_LIST_BEGIN table ( MAG ) if used; and the number of data points ( 201 ).
CONSTANT Example: CONSTANT name value
Lets you record values that do not change when the independent variable changes.
# Example: #NA POWER1 1.0E1
Lets you define variables specific to a particular type of device. The pound sign ( # ) tells the
device reading the file that the following variable is for a particular device.
The device identifier shown here ( NA ) indicates that the information is for a network
analyzer. This convention lets you define new devices without fear of conflict with keywords
for previously defined devices. The device identifier can be any number of characters.
SEG_LIST_BEGIN Indicates that a list of segments for the independent variable follows.
Segment Format: segment type start stop number of points
The current implementation supports only a signal segment. If you use more than one
segment, use the VAR_LIST_BEGIN construct. CITIfile revision A.01.00 supports only the
SEG (linear segment) segment type.
SEG_LIST_END Sets the end of a list of independent variable segments.
VAR_LIST_BEGIN Indicates that a list of the values for the independent variable (declared in the VAR
statement) follows. Only the MAG format is supported in revision A.01.00.
VAR_LIST_END Sets the end of a list of values for the independent variable.
DATA Example: DATA S[1,1] RI
Defines the name of an array of data that will be read later in the current CITIfile package ,
and the format that the data will be in. Multiple arrays of data are supported by using
standard array indexing as shown above. CITIfile revision A.01.00 supports only the RI (real
and imaginary) format, and a maximum of two array indexes.
Commonly used array names include:
S - S parameter
E - Error Term
Voltage - Voltage
VOLTAGE_RATIO - a ratio of two voltages (A/R)
CITIfile Guidelines
Line Length. The length of a line within a CITIfile package should not exceed 80
characters. This allows instruments which may have limited RAM to define a reasonable
input buffer length.
Keywords. Keywords are always at the beginning of a new line. The end of a line is as
defined by the file system or transfer mechanism being used.
255
SystemVue - Users Guide
before. Ignoring unknown keywords allows "backwards compatibility" to be
maintained.
Keywords intended for other instruments or devices can be added to the same file
without affecting the reading of the data.
Adding New Devices. Individual users are allowed to create their own device keywords
through the # (user-defined device) mechanism. (Refer to the table immediately above
for more information.) Individual users should not add keywords to CITIfiles without using
the # notation, as this could make their files incompatible with current or future CITIfile
implementations.
File Names. Some instruments or programs identify a particular type of file by characters
that are added before or after the file name. Creating a file with a particular prefix or
ending is not a problem. However in general an instrument or program should not require
any such characters when reading a file. This allows any file, no matter what the filename,
to be read into the instrument or computer. Requiring special filename prefixes and
endings makes the exchange of data between different instruments and computers much
more difficult.
Note
There are some specific problems with the current version in reading and/or writing this data format. On
the Agilent EEsof web site, refer to the Release Notes in Product Documentation, and to Technical Support
for more information and workarounds (http://www.agilent.com/find/eesof ).
0 or int
1 or real
2 or string
3 or complex
256
SystemVue - Users Guide
4 or boolean
5 or binary
6 or octal
7 or hexadecimal
8 or byte16
The variable names above constitute a name-space uniquely identified by the string
blockName which is either:
Guidelines
If there are multiple blocks, the outermost independent variables (e.g., VAR
var1Name(var1Type) = var1 ) apply only to the block immediately following the
variable definitions, and not to any other blocks.
The block data (bVar*Value) lines must follow the pattern (order, number of values
per line, and number of lines) of the format (%) lines. If the number of values in any
data line does not match the number of dependent variables specified in the
corresponding format (%) line, incorrect results will occur. A variable's value cannot
be split across lines. Although there is no line length limit specified, MDIF file readers
may choose to truncate at some finite length. This may result in a file read error, or,
if the file was carefully crafted, truncated names and/or string-type values.
Scale factors, which can be applied only to real numbers, may be case-insensitive
suffixes as follows:
There should be no space between the number and the suffix, and extra characters
are ignored. Unrecognized suffixes result in 1.0. The above is not totally consistent
with the rest of ADS.
The format of complex data is real/imag, with a column for real and a column for
imaginary.
Example
!============================================================
! Example 1
REM This has 3 indepVars: v1, v2, v3(innermost) and
REM 4 depVars: dv1(integer), dv2(real), dv3(string) and
REM dv4(hexadecimal), but is read in as a string.
REM The outermost indepVars: v1, v2 apply only to the block
REM immediately following them, and not to any other block.
257
SystemVue - Users Guide
! There are 2 data nodes
VAR v1(0) = 1
VAR v2(1) = 2.2
BEGIN blk1
% v3(1) dv1(1) dv2(1) dv3(2) dv4(hexadecimal)
7.7 8 9.9999 "line 1" 0xabc
8.8 9 1.11 "line 2 " 0x123
END
VAR v1(0) = 2
VAR v2(1) = 3.2
BEGIN blk1
% v3(1) dv1(1) dv2(1) dv3(2) dv4(hexadecimal)
8.7 9uF 10.9999mA "line 1" 0xff
9.8 10uF 11.11mA "line 2 " 0xdef
END
!=============================================================
! Example 2
! Created Tue Mar 9 13:39:19 1999
! Data Acquired Tue Mar 9 13:38:34 1999
BEGIN NDATA_noise
% freq(real) Sopt(complex) NFmin(real) Rn(real) PortZ[1](real)
1e+09 0.098481 0.017365 1 5 50
2e+09 0.18794 0.068404 2 10 50
3e+09 0.25981 0.15 3 15 50
4e+09 0.30642 0.25712 4 20 50
5e+09 0.32139 0.38302 5 25 50
6e+09 0.3 0.51962 6 30 50
7e+09 0.23941 0.65778 7 35 50
8e+09 0.13892 0.78785 8 40 50
9.543e+09 -0.014122 0.911 9.5445 46.166 50
END
Overview
These files contain X-parameter data for nonlinear n-port devices, or subcircuits. They are
ASCII files in GMDIF format. They use extension: .xnp.
The X-parameter files completely comply by Generic MDIF Format. The specific block and
variable names used in the X-parameter GMDIF files are described in this section.
This section describes Version 2.0 X-parameter GMDIF files.
An X-parameter GMDIF file can be used with an X-Parameter part to model the behavior
of a nonlinear device or subcircuit using X-parameters. The file contains the X-parameters,
the part is placed within the schematic.
Comments
by using "!" or
by using "REM" statement.
258
SystemVue - Users Guide
The "!" can be used in the beginning of a line, or at the end of the line where as, "REM"
can be used only in the beginning of a line.
Version 2.0 X-parameter GMDIF files contain a pre-defined comment section at the
beginning of the files, which provides useful information about the range of operating
conditions covered by the data as shown in the example below:
Example
The version of the file is stated just for convenience. The statement determining the
version is elsewhere. The comment "HB_MaxOrder = 9" tells you that the Harmonic
Balance with MaxOrder=9 was used by X-Parameter Generator. The comment
"XParamMaxOrder = 3" tells you that the X-parameter data in this file contains mixing
indices up to the 3rd order.
The comment "NumExtractedPorts = 3" indicates the total number of ports used for X-
parameter generation. In case of non-consecutive port numbering this value may be
smaller than the highest port number.
The lower part of this comment section indicates various independent variables together
with the covered sweeps for each of them. See X-parameter Independent Variables for
explanation of the variable names.
XParamAttributes
XParamPortData
XParamData
The first two blocks appear only once in the file. The third block appears as many times as
the number of distinct different sweep points present in the data for all but the innermost
independent variable. The following sections provide details for these blocks.
XParamAttributes Block
The XParamAttributes block provides the vehicle for the official statements of (1) the
file version, (2) the number of ports, and (3) the number of fundamental frequencies
(tones).
Example
BEGIN XParamAttributes
% Index(int) Version(real) NumPorts(int) NumFundFreqs(int)
0 2.0 3 1
END
The sole purpose of the Index column is compliance with the Generic MDIF format.
The NumPorts entry indicates the highest port index in the data.
XParamPortData Block
The XParamPortData block provides reference impedances for the incident and reflected
waves at each port covered by the data. The reference impedances can be complex and
the power definition of the waves is used, as follows:
259
SystemVue - Users Guide
Example
BEGIN XParamPortData
% PortNumber(int) RefZ0(complex) PortName(string)
1 50 0 "Input"
2 50 0 "Output"
3 50 0 "VDC"
END
The XParamPortData block also includes the port names. This information is particularly
useful in proper hookup of the X-parameters part in cases where more than two ports
are present and a mixture of port types is used.
XParamData Block
The XParamData block provides the actual X-parameters. This block may appear many
times in the file, each containing X-parameters at one sweep point (of all but the
innermost independent variable) at a time.
Each XParamData block is preceded by m-1 VAR statements for m-1 independent
variables, where m is the total number of independent variables. These VAR statements
provide the types and the values of the independent variables. These values apply to the
XParamData block immediately following the VAR statements, and only to that block.
Example
The last, mth, independent variable is the innermost variable and is placed as the first
variable inside the block. In the above example that variable is "AN_1_1".
The naming convention for the independent variables in X-parameter files is described in
X-parameter Independent Variables.
All the dependent variables (the X-parameters) are provided inside the block. Following
the mth independent variable, the names and the types of the dependent variables are
specified in the header lines (lines starting with a "%" character). The header lines are
specified once per block at the beginning of the block. They are then followed by as many
data groups as the number of sweep points of the innermost independent variable. Each
group consists of data values formatted into lines exactly in the same way as the block
header lines with each entry representing a value of the correspondingly placed variable in
the header lines. Complex data is specified in the rectangular format (real, imaginary) by
two numbers.
Example
260
SystemVue - Users Guide
0.0667 -0.33 0.111 1.02 0.222 -0.0034
0.0677 -0.34 0.110 1.05 0.222 -0.0039
END
In the above example the complex number (0.111 + j1.02) is the value of the dependent
variable FB_2_1 at the multidimensional point established by all the values of the
independent variables, including the value of 0.0667 of AN_1_1.
The naming convention for the dependent variables in X-parameter files is described in X-
parameter Dependent Variables.
X-parameter Variables
Notation
All independent and dependent variables are defined with respect to port and harmonic (or
mixing) indices. For each variable these indices, separated by the underscore character "",
form a string appending the reserved name of the variable. Negative indices, if allowed,
are represented by a string in which the "m" character is used in place of the minus ("-")
sign, with no space between the sign and the number. For example "_m2" represents the
index "-2". For clarity of presentation the following table shows the notation used in
indexing the X-parameters.
k fundamental frequency index; 1 in the case of single tone X-parameters;all consecutive numbers must be
present
p port index - a positive integer; may not be consecutive
pIn - denotes the "input" port index
pOut - denotes the "output" port index
n harmonic index; positive integer
nIn - denotes the harmonic on the "input" port
nOut - denotes the harmonic on the "output" port
in case of multi-tone X-parameters there is a mixing index that is concatenated from harmonic indices
w.r.t. to subsequent fundamentals, for example "_1_m2_2" in the three-tone case refers to the mixing
product f1-2f2+2f3 - the index w.r.t. the first fundamental is expected to be non-negative and all-zero
entries are not allowed.
Independent Variables
The following table lists all the supported independent variables in Version 2.0 X-
parameter files. In general, all X-parameters are functions of some or all of these
independent variables. Their dependence is tabulated in the X-parameter files for all
sweep points of the independent variable values.
All independent variables are real numbers.
261
SystemVue - Users Guide
fund_k kth fundamental frequency; assumed non-commensurate if more than one is present; fund_1 is
required
VDC_p DC voltage applied to port p; not required; mutually exclusive with IDC_p at the same port p
IDC_p DC current applied to port p; not required; mutually exclusive with VDC_p at the same port p
AN_p_n magnitude of a large-signal incident wave applied to port p at harmonic n; only one per each
fundamental is both allowed and required; phase of this incident wave is not tabulated in the X-
parameter files as this incident wave serves as a Reference Signal (Refer to ADS document for
detailed description); power definition of incident waves is used
AM_p_n magnitude of any other than Reference Signal large-signal incident wave applied to port p at
harmonic n; required only if AP_p_n is used at the same port p and harmonic n; power definition of
incident waves is used
AP_p_n phase in degrees of any other than Reference Signal large-signal incident wave applied to port p at
harmonic n; required only if AM_p_n is used at the same port p and harmonic n
GM_p_n magnitude of the reflection coefficient of the load at port p and harmonic n; required only if GP_p_n
is used at the same port p and harmonic n; power definition of the reflection coefficient and the
reference impedance specified for port p are used; mutually exclusive with other formats of
specifying load at the same port p and harmonic n
GP_p_n phase in degrees of the reflection coefficient of the load at port p and harmonic n; required only if
GM_p_n is used at the same port p and harmonic n; mutually exclusive with other formats of
specifying load at the same port p and harmonic n
GX_p_n alternative to GM_p_n and GP_p_n; real and imaginary parts of the reflection coefficient; mutually
GY_p_n exclusive with other formats of specifying load at the same port p and harmonic n
ZM_p_n alternative to GM_p_n and GP_p_n; magnitude and phase of the load impedance; mutually exclusive
ZP_p_n with other formats of specifying load at the same port p and harmonic n
ZX_p_n alternative to GM_p_n and GP_p_n; real and imaginary parts of the load impedance; mutually
ZY_p_n exclusive with other formats of specifying load at the same port p and harmonic n
Dependent Variables
The following table provides the notation for the dependent variables (X-parameters) used
in Version 2.0 X-parameter files. The X-parameters can be either real or complex
numbers. In the latter case the rectangular format (real and imaginary parts) is used. It is
not essential for any specific dependent variable to be present in an X-parameter file. In
general, the default value is zero for any absent parameter that could otherwise be
included in the file (some parameters are mutually exclusive with some other
parameters).
262
SystemVue - Users Guide
FB_pOut_nOut complex B-type X-parameter - measured reflected wave at output port pOut and
harmonic nOut as the response to all large-signal excitations (i.e., under the
large-signal operating conditions); power definition of the reflected waves is
used
FI_pOut real I-type X-parameter - DC current measured at output port pOut under the
large-signal operating conditions
FV_pOut real V-type X-parameter - DC voltage measured at output port pOut under the
large-signal operating conditions
S_pOut_nOut_pIn_nIn complex S-type X-parameter providing the small-signal added-contribution to the
reflected wave at output port pOut and harmonic nOut due to a small-signal
incident wave at input port pIn and harmonic nIn measured under the large-
signal operating conditions; power definition of the incident and reflected
waves is used
T_pOut_nOut_pIn_nIn complex T-type X-parameter providing the small-signal added-contribution to the
reflected wave at output port pOut and harmonic nOut due to a phase-
reversed small-signal incident wave at input port pIn and harmonic nIn
measured under the large-signal operating conditions; power definition of
the incident and reflected waves is used
XY_pOut_pIn_nIn complex Y-type X-parameter providing the small-signal contribution to the DC current
at output port pOut due to a small-signal incident wave at input port pIn and
harmonic nIn measured under the large-signal operating conditions; power
definition of the incident waves is used; the real-valued contribution to the
DC current is the real part of complex product of this X-parameter and the
corresponding incident wave
Yre_pOut_pIn_nIn real alternative to XY_p_n, obsolete in Version 2.0 X-parameter files; two real
Yim_pOut_pIn_nIn real numbers: the real part and negative of the imaginary part are provided
instead of one complex number, as XY = Yre - j*Yim
XZ_pOut_pIn_nIn complex Z-type X-parameter providing the small-signal contribution to the DC voltage
at output port pOut due to a small-signal incident wave at input port pIn and
harmonic nIn measured under the large-signal operating conditions; power
definition of the incident waves is used; the real-valued contribution to the
DC voltage is the real part of complex product of this X-parameter and the
corresponding incident wave
Zre_pOut_pIn_nIn real alternative to XZ_p_n, obsolete in Version 2.0 X-parameter files; two real
Zim_pOut_pIn_nIn real numbers: the real part and negative of the imaginary part are provided
instead of one complex number, as XZ = Zre - j*Zim
Restrictions
If the independent variable VDC_pOut is specified for the port pOut then neither the V-
type (FV_pOut) nor the Z-type (XZ_pOut_pIn_nIn, Zre_pOut_pIn_nIn, Zim_pOut_pIn_nIn
) X-parameters can be specified for the port pOut.
Similarly, if the independent variable IDC_pOut is specified for the port pOut then neither
the I-type (FI_pOut) nor the Y-type (XY_pOut_pIn_nIn, Yre_pOut_pIn_nIn,
Yim_pOut_pIn_nIn) X-parameters can be specified for the port pOut.
263
SystemVue - Users Guide
Export a file
To export a file please follow the following steps detailed below:
Select the object in the Workspace Tree to be exported.
Click File on the SystemVue menu and select a file type from the Export menu.
Follow the instructions in the windows that appear.
Or
Right click on the object in the Workspace Tree to be exported.
Select the Export menu.
Follow the instructions in the windows that appear.
1. Select the File > Export > Bitmap (Entire Screen) menu
2. When prompted specify the directory and filename
264
SystemVue - Users Guide
SystemVue provides a powerful and flexible sequence control mechanism that is based on
MathLang scripting (users).
Important Note: For all available SystemVue releases, MathLang scripting (users) can only support
LXI compliant instruments.
A Simple Sequence
Obviously, the BER result is stored in a variable named MeasuredBER_BER inside the
simulation results of DF_Meas_BER_Data(DF_Meas_BER).
Notice that the Sequence Control ~ A MathLang Equation (users) page, i.e. the script, is located at
the same level on the workspace tree as the workspace (i.e. project) name.
265
SystemVue - Users Guide
click the GREEN triangle button (the 4th icon) on the second tool bar
click the Go button next to the Equation editor area
setvariable - brings the value stored in a variable into the measurement results
storage area (i.e. Data Set) of the simulation
num2str - converts a number to a string
fprintf - writes a string to the opened tcpip port
Note the use of the [] operation to concatenate the strings when creating the dcCmdStr command
string
Important Note: Note how the accumulated BER results are stored in the myBers variable and
how this variable is transposed with the ' operator when calling setvariable(...) on the last line.
266
SystemVue - Users Guide
LiveReports
A LiveReport is a living page that can contain live views of various kinds of SystemVue
objects. You can mix Graphs, Designs, Equations, Notes, Tables, and Datasets all in a
single printable and viewable page. Below is an example of a LiveReport page from the
simple Bridge-T Example.
It's a Live Report because you can click in any of the windows on the page and work
exactly as you would work in single windows in SystemVue. The border turns green when
a window is active, as seen below.
267
SystemVue - Users Guide
When you want to move or resize a window within a LiveReport click the black border
(box) outside the window and it will turn yellow and gain handles you can drag/move.
268
SystemVue - Users Guide
To use the LiveReport rather than one of the windows, click outside all of the windows and
you will see the LiveReport toolbar and the LiveReport menu. No windows will be green or
yellow.
Creating a LiveReport
To manually create a LiveReport:
1. Click the New Item button *( ) on the Workspace Tree toolbar, select *add
LiveReport....
2. If desired, change the LiveReport name, layout, or other properties.
3. Click OK to create the LiveReport or click Cancel to not create the new LiveReport.
Right-click the page and select Insert then select one of the objects listed to insert a
window with that object.
Drag-drop an object from the workspace tree into the page using the mouse left
269
SystemVue - Users Guide
button.
Arranging Views
Use the LiveReport Arrange Views dialog box to arrange the sub-objects of a LiveReport.
270
SystemVue - Users Guide
Automatic - In general, automatic arrangement is quick, easy, and does a reasonable job
of laying out the view windows.
If a window is not placed in the desired location when OK is clicked, simply drag the
window into place and swap it with another, then re-do the Arrange Views.
If the LiveReport page is not divided in the desired fashion, use one of the Best Fit or Split
options.
Best Fit - The best-fit options arrange sub-objects in a tiled arrangement, similar to the
way Windows arranges Tiled views. The images show the order of the major and minor
page splits.
Inter-object Spacing - The distance (gap) between the arranged views. The units can
be set in Page Properties.
Sort Alphabetically - This rarely-used option sorts the views by name, instead of the
usual geometric positioning based on current pane positions. This options is mostly used
to display libraries of symbols or parts.
The images to the left of the radio buttons may be double-clicked to quickly select an arrangement and
close the dialog box.
LiveReport Properties
There are several tab pages that you can use to change the properties of a LiveReport:
Page Properties
Margin Properties
Header and Footer Properties
1. Double-click the report or click LiveReport* on the SystemVue menu and select
*Properties.
2. Click the desired tab.
3. Make the changes you want.
4. Click OK.
271
SystemVue - Users Guide
When double-clicking the LiveReport, SystemVue uses the mouse cursor location to pick an
appropriate tab. Double-click the upper or lower page area to initially display the Header & Footer
page; double-click the side margins to initially display the Margins page; anywhere else displays the
Page settings tab page.
Page Properties
Use the LiveReport Page Properties tab page to change the general properties of a
LiveReport.
Margin Properties
Use the LiveReport Margins Properties page to change the margins of a LiveReport.
272
SystemVue - Users Guide
1. Top, Left, Right, Bottom - The margin widths to use for the page. The margins are
shown by a light-gray, non-printing box; the box can be hidden using the eye toolbar
button menu.
2. Units - The units used by LiveReport for all of its settings can be set on the Page tab.
1. Header - When checked, the header is enabled. It will print at the top of the
LiveReport page. The text is completely customizable; strings such as "Company
Confidential" may be used. Also, macro strings like "%DATE%" and "%TIME%" will
be converted into the actual date, time, filename, etc.
2. Font - Sets the header font.
3. Justification - Determines the header horizontal justification (left / centered / right
).
4. Footer - The footer works just like the header, but is printed at the bottom of the
page.
273
SystemVue - Users Guide
Managing Libraries
Libraries serve as a container for parts, designs, equations, and lots of other SystemVue
objects. They let you keep all of your objects in one place, which makes it easier for you
to organize the contents. SystemVue provides a number of libraries for your convenience
and allows you to add custom libraries. Libraries that are added will be auto-loaded when
SystemVue starts.
There are two dialog boxes in SystemVue that allow you to interact with Libraries: The
Library Selector and the Part Selector. There is also a Library Manager dialog box that
allows you to do things such as import and remove libraries.
The two dialog boxes that enable the interaction with objects are the Library Selector and
the Part Selector.
The Library Selector allows interaction with all object types except parts, since the Part
Selector is used to interact with Parts. You can think of the Part Selector as a specialized
Library Selector where the Library object type is Parts. Both the Library Selector and Part
Selector allow you to bring objects into your workspace or view objects that you have put
into them from the workspace. A search text box is provided in both selectors to help you
find objects in your libraries.
Click the Library Manager ( ) button on the Part Selector or Library Selector
toolbar.
or
274
SystemVue - Users Guide
Select the Tools menu and Library Manager.
Only Show Libraries of Type - Selects which type of libraries to view in the main
window.
Add From File... - Add a SystemVue XML library,
Remove Library - Remove the selected library from the Library Manager.
Up - Move the selected library up one position on the Library list.
Down - Move the selected library down one position on the Library list.
Properties... - View the properties of the selected library.
Save As... - Save the selected library as some other name, or as a encrypted library.
Hide Built-in Libraries - Hides all built in libraries from the library list. Only vendor
and custom libraries are displayed.
Find the XML libraries you want to add using Windows Explorer. Select all of the
libraries and drag then drop them into the SystemVue work area.
In the image above we add 3 new libraries (equation, model, and symbol library) to
SystemVue.
The selection Design - Schematic, Model, Symbol, etc. shows all libraries that contain
schematics, models, or symbols. Notice that if you change the Type to Equation only
libraries of equations are shown in the Library Manager.
276
SystemVue - Users Guide
This feature is useful for libraries of custom models or symbols that you may have. Models
and symbols from libraries that are included in the search path can be type in the Change
Model or Change Symbol dialogs. For example, a library called MyModels that contains a
model called CustomFilter has been added to the Library Manager and added to the search
path. The model CustomFilter or any other model in MyModels can now be entered in the
Change Model dialog directly.
Adding the MyModels library to the search path removes the need to type CustomFilter@MyModels or to
add the model from the library to the workspace tree in order to use the model in a part.
Another helpful tip is to add custom Equation libraries to the search path. Functions in an
Equation library that has been added to the search path can be called directly from any
equation block. For example, a library called "MyEquations" that contains a function called
MyFunction is added to the Library Manager and included into the search path. The
function MyFunction or any other function in MyEquations can now be called from any
equation block.
277
SystemVue - Users Guide
Functions in the MyEquations library do not need to be added to the workspace if MyEquations has been
added to the search path.
Removing a Library
When you remove a library, you only remove it from the Library box in the Library
Manager. The external library file is not deleted.
You cannot remove the Internal libraries. These libraries are read-only.
This does not delete the library file. It just assures that the library is not auto-loaded the next time you
run SystemVue.
You cannot edit Internal libraries nor can you edit Encrypted Libraries. These libraries are read-only.
In the Library Manager, select your custom library and click the Save As... button on the
right.
In the Save As dialog box, there is a checkbox labeled Save Encrypted on the lower
right. Check this box as shown here:
278
SystemVue - Users Guide
The library will then be saved as encrypted. If the library you are encrypting is a Design
Library, you will not be able to view the contents of the designs' part lists or equations.
1. Right click an object in the workspace tree or for a part right click a part in the Part
Selector
2. Select New Library... from the Copy To menu
279
SystemVue - Users Guide
If you don't want the docking library selector to be visible (taking up screen real estate)
use the Add From Library Option as seen below.
Parts are special. They are not added (separately) to your workspace, but instead, are placed using a
mouse onto a schematic design.
280
SystemVue - Users Guide
281
SystemVue - Users Guide
This part has one input port with net name 2 and one output port with net name 1. The
input port is a bus port (indicated by the two arrows), while the out port is a standard port
(indicated by a single arrow). A bus port is an ordered set of ports that can be expanded
dynamically. In other words, while a single port resides on a single net, a bus port can
reside on multiple nets. Bus ports are described in more detail below.
Every part port is assigned a unique net name when placed unconnected on the
schematic. Inputs are distinguished from outputs, because input port arrows point into the
part symbol. For additional visual cues, see port data type (sim).
Connection Terminology
A connection line is a drawn line on the schematic that can be used to connect an output
port with an input port. A bus is a connection line that is a collection of two or more
connection lines. A net is a group of simple connection lines that share a unique net
name and a common value at any instant.
The following schematic has 13 nets with net names: 1, A(1) ... A(10), 4 and 5. Net 1 is a
simple connection line between the Ramp and the Distributor part. Similarly, Net 4 and 5
are simple connection lines. Net A(1) connects an output of the Distributor to one input of
Commutator-1. Net A(10) connects an output of the Distributor to input ports of both
Commutators. All nets named A are contained in the 3 buses labeled A(1:10), A(10:1:-1)
and A(2:10:2).
A net label could be a simple name or number which represents a single net, or it could be
282
SystemVue - Users Guide
a Bus label, in which case the connection line represents several nets. Bus labels are
simple names or numbers followed by indices specified in parentheses. The syntax is as
follows:
BaseName(Start:Stop:Step)
Note that the Start:Stop:Step ordering for Bus labels is different than the Math Language range vector
ordering of Start:Step:Stop. This was done in order to conform to the industry standard bus notation
ordering.
You may use variables or expressions for each of Start, Stop, and Step in the bus indices. This results in a
dynamic bus width: When the variable(s) you use change, so do the widths of buses that use them.
1. Double-click on the connection line OR Right-click on the connection line and select
Net -> Edit Net Name...
2. Enter a net name and click OK.
If two connection lines share a common net from their Net Label, but they do not look visually connected,
they are still connected for simulation purposes.
Renaming a connection line can cause redefinition to a bus or to a simple connection line,
e.g. A to A(1:4) or A(1:4) to A.
When an unconnected connection line is created, it does not have a net name. When the
connection line is connected to net, it may gain a net name from the net. If the net has
context and the net name is not set, an implicit net name is generated which may change
with the schematic. This net name is an integer that is shown at the ends of the net.
When a net name is explicitly assigned, the net name becomes persistent. While a
persistent net name can be an integer, begin the net name with an alphabetic character.
283
SystemVue - Users Guide
Notice in the above schematic that the output from the Constant source is on net 3, while
the output from the Sinusoidal source is on net 4. This is the preferred way to connect
multiple things to a Bus port since it produces separate nets for each terminal connected
to it. This allows an ordering to be defined at the Bus port via the Terminal Mapping dialog
box, which will be discussed shortly.
Since the Addition operation performed by the adder part is commutative, ordering of the
inputs is irrelevant, so the following schematic would yield the same results:
In the above schematic, both the Constant source and the Sinusoidal source are on the
same net. The simulator is intelligent enough to expand the net into 2, since 2 outputs are
feeding an input, however the ordering is undefined.
The Netlist for a part (all terminals) can be viewed in the Netlist tab of the Advanced
properties of a part. See Parts, Models, and Symbols (users) for details.
There is no net name or ordering ambiguity in a connection between a standard port and a
simple connection line.
However, this is not the case for a bus entering or leaving a bus port. The default
284
SystemVue - Users Guide
assignment for the bus port matches the order of ports with the order of the net names.
For example in the schematic shown under the Connection Terminology heading, the bus
port of the Distributor has ports named output(1:10), i.e. output(1) through output(10),
which is mapped to the bus connection line nets named A(1:10), i.e. A(1) through A(10).
The default mapping may not be what is intended, so it is possible to specify an arbitrary
ordering, replicate, and disconnect the sub-nets. These actions can be performed by
means of the Terminal Mapping dialog. To access it, right-click the part terminal you want
to define the terminal mapping for and select "Edit Terminal Mapping" if that menu item
exists. If it does not exist, there is no ambiguity in ordering of the nets presented to the
terminal.
The Terminal Mapping dialog displays differently depending on whether it is for an input
port or an output port. For the input Terminal Mapping dialog, nets are in the left column
(Connect To) and ports are in the right column (Terminal). For the output Terminal
Mapping dialog, nets are in the right column (Connect To) and ports are in the left column
(Terminal). When a row is clicked, the net for that row is selected for operation by the Up,
Down, Connect/Disconnect or Replicate buttons. Click the desired button for the following
results:
1. The Up button will swap the selected net with the one above it.
2. The Down button will swap the selected net with the one below it.
3. The Disconnect button will disconnect the select net and decrement the number of
sub-nets.
4. The Connect button will reconnect the selected (disconnected) net with an appended
sub-net.
5. The Replicate button will present a duplicate sub-net to the port which is appended to
the list.
To exit the Terminal mapping dialog, click the OK button to save the changes or the
Cancel button to discard the changes.
1. Click one of the two Draw Connection buttons from the main toolbar:
2. Click and hold the the start point on the schematic and drag the line to its end point
on schematic.
OR
1. Hover over a part or connection line terminal and see the mouse cursor change into
connection line mode. Click and drag the connection line.
To create a bus:
285
SystemVue - Users Guide
To tap connection line(s) off the bus:
To edit terminal mapping: The precise mapping of individual line(s) of a bus to a multi-
input port component can be achieved using the input Terminal Mapping or output
Terminal Mapping dialogs which is invoked by right clicking on the multi-input or output
pin and selecting Edit Terminal Mapping as shown.
1. Use the Up and Down buttons to rearrange the incoming bus line(s) with respect to
the input sequence. Note that only incoming lines may be moved with respect to the
input ports.
2. Use the context sensitive Disconnect and Connect toggle button to delete and
establish connections. Once a line is disconnected, it is automatically moved to the
bottom of the queue. Connecting it now establishes a link between the last input
part.
3. Use the context sensitive Replicate and Delete toggle button to replicate an
incoming line to drive an additional input to the component. By default, this
additional input is inserted immediately below the line entry that was replicated,
resulting in a duplication of the Connect To entry and an occupation of the next port
index on the component side, resulting in all successive inputs being assigned higher
indices of input port number than before.
The following four figures show the default view of the input terminal mapping dialog box,
the change of listing because of movements up and down the sequence, followed by the
disconnection of A(5) and reconnection followed by insertion of a duplicate of A(2). Note
how the port side now has input indices ranging from 1 through 6, whereas the connection
side has a duplicate of the second incoming line. Note also how the previous association of
A(1) and input(4) has now been replaced by one between A(1) and input(5) and so on.
286
SystemVue - Users Guide
The output terminal mapping dialog is a vertical mirror of the input terminal mapping
dialog except that it does not have the ability for replication and deletion of duplicate
entries. Unilateral input-side replication of connections provides a barrier against
proliferation of bus line(s) at the output of the transmitting component and transfers the
responsibility of duplication to the input of the receiving component(s).
287
SystemVue - Users Guide
Only parts can be placed on schematics. The part's symbol is the image on a schematic
and the part model is what is being simulated. Users connect parts together on a
schematic by placing wires between the part's symbol terminals. These connection points
are called nets. The part itself maps symbol terminal pins to the model nets which are
what actually gets simulated.
Double-click a part to access Part Properties, which provides a quick way to identify or
change:
Each part supports a list of multiple models, with a means to manage these models in Part
Properties.
Parts, their models, and symbols can be saved in libraries for reuse.
288
SystemVue - Users Guide
Certain frequently-used parts can be placed via the keyboard. Inside SystemVue, use the
Help / Keystroke Commands menu to display Appendix A, which lists the available parts.
Schematics can be dropped into other schematics to create a sub-network model. Models,
and S-Parameter files can be dragged and dropped onto the schematic. When a schematic
or model is dragged and dropped on a schematic a sub-network model is created along
with a generic symbol. When an S-Parameter file is dragged and dropped onto a
schematic the dataset part will placed on the schematic.
Part Properties
Each part has the following characteristics:
289
SystemVue - Users Guide
Designator - Descriptive text that appears on the schematic that references the
part.
Show Designator - When checked the designator will appear on the schematic.
Description - Documentation info for the part. This info can be displayed in the part
selector.
Model - Name of the model to be simulated. The format is ModelName@
LibraryName. From this combo box the user can select the active model. The
model parameters table will automatically be updated with this selection.
Show Model - When checked the model name will appear alongside the designator
on the schematic.
Manage Models - When clicked will open a dialog box giving the user the ability to
manage the models that are available for selection.
Model Help - When clicked will open the help page providing descriptive information
for all parameters in the model parameter table.
Part Behavior - This button controls the behavior of the part. The four options are:
Use Model - Use the currently specified model ( ). This is the default
state.
Disable, Open - All model net connections are opened ( ). No data will
flow through this model.
Disable, Short - All model net connections are shorted ( ). The model is
bypassed.
Control by Equation... - Use an equation expression to control the Part
Behavior. The expression must evaluate to 0 = Use Model, 1 = Disable to Open,
2 = Disable to Short.
Symbol - Shows a picture of the symbol associated with the part. This symbol can be
changed on the Advanced Options dialog box.
Models Parameters Table - This table contains the list of parameters specified by
the model. In some cases there are models that have a custom interface that
appears in the same area of the dialog box. See the model help for specifics on these
models.
Browse - This button will be enabled when the user clicks on a model parameter
that needs a filename. The user can then browse to the desired file.
Advanced Options - Gives the user the ability to change / create a symbol. Change
290
SystemVue - Users Guide
its positioning and manage the mapping of the symbol terminals to the model net.
(See details on each Advanced Options tab page below.)
Sort Alphabetically - When checked will sort all parameters in the model parameter
table alphabetically.
This table lists all model parameters, their values, units, and characteristics.
Column Description
Headings
Name Parameter name specified in the model. (Read-only)
Value Parameter value. The values can be in following forms: numeric, enumeration, variable, or
formula. Allowed enumeration values are specified by the model. A formula or an equation can
be used in an enumeration field.
Units Determines the units the parameter value is interpreted in.
Default This is the default parameter value specified in the model. (Read-only)
Use Default When checked the default model parameter value will be used.
Tune When checked will make this model parameter value tunable.
Show When checked with show the parameter and its value on the schematic.
Move the mouse pointer over the part text on the schematic. Note that the mouse
pointer changes to resemble an I-beam (the text edit cursor). Click in the text.
291
SystemVue - Users Guide
Accept Do an OK
Cancel Cancel all changes
<< and >> Expand and contract the box to show/hide the Tune and Show columns.
Up and Expand and contract the box to show/hide non-shown parameters.
Down
Pin / Unpin When pinned, clicking another part will move the box. When unpinned, the box just closes
(Accept).
Help Brings up this help
Keys Supported:
Advanced Options
Part symbols and part connectivity can be changed on the advanced options dialog box.
Creating a Part
When the user has a model and schematic symbol they want combined into a part
they can use the Create Part Wizard to automate this process. The finished part must be
placed in a library for future reuse.
To create a part using the Create Part Wizard:
3. Click Next.
4. Fill in the descriptive fields as you want. If you re-used an existing part, the fields will
be fill from the existing part properties.
292
SystemVue - Users Guide
7. Click Next.
8. Select a symbol.
293
SystemVue - Users Guide
9. Click Next.
10. Select the library were the part is to be placed.
Models
A single part can support multiple models. Models can even be different types. Supported
models types are:
Math (algorithm)
Code (users)
Sub-Network Models (users)
When a model is changed any common properties from one model to the next are copied
over to the new model. Furthermore, the old model is cached so if the user decides to
return to the old model they won't need to re-enter the parameters.
Models can be saved in libraries or in the workspace tree. The model naming convention
is: ModelName@LibraryName. Local model versions can be copied from an original
model in a library. By default these local model copies have the same model name as the
parent model in the library.
294
SystemVue - Users Guide
For more information on models see User Defined Models under the Using SystemVue
section in the users guide.
Tip: Use the toolbar Show/Hide (eyeball) button to show or hide all the model names on a schematic.
Hint: During a simulation a model appearing in the workspace tree will always be used before a model in
a library even if the library name has been specified for the model.
Note: A part can have several models and each model can have its own set of parameters. Those
parameters with the same name and type are shared, i.e. a change in value for a shared parameter is a
change for all models that have this parameter.
Changing a Model
Each part can contain several models. Pick one using the Model combobox in Part
Properties.
Note: Certain specialized symbols, like those using %MACROS%, are designed for use with certain specific
models. When you change a model, you may occasionally also need change the part's symbol, since the
symbol might no longer match.
The list of available models can be changed using the model manager. Click on the
Manage Models button ( ) to bring up the model manager dialog box.
Model Identifier - This parameter is used to distinguish between models of the same
name.
Status Window - This window will alert users to potential errors or warnings.
To add a model:
To remove a model:
295
SystemVue - Users Guide
Active Model Configuration allows changing the model of all parts in a design thus
changing the implementation of the design. Active Model Configuration can contain
multiple configurations that will be saved with the design.
To bring up the Active Model Configuration dialog, right click on the design to be
configured and select "Active Model Configuration...".
Part - Double click a part name to bring up the part's properties. From the part's
properties, among other things, additional models can be added to the available
models list (using the Manage Models button).
Model to Use - When selected a drop down list will be shown which allows a part's
model to be selected. To add models to the list open the part's properties. Note:
Light-blue text indicates that a part has only 1 model attached to it, which means it
cannot be changed. Double click the adjacent Part on the left to add additional
models (as described above).
Add Configuration - Press this button to add a new configuration to the design.
Remove Configuration - Press this button to bring up a dialog that allow you to
remove configurations from the design. Select the configurations you want to delete
296
SystemVue - Users Guide
and press the Delete Selected button.
Creating a Model
To create a model select the type of model to be created. Follow those instructions:
Math
Code
Sub-Network Models (users)
Symbols
The part symbol is the graphical picture the user see's on the schematic that represents
the part. Symbols can easily be created, modified, or changed for a given part.
Note: These parts are normally built for the Genesys-standard schematic grid spacing of 1/6th inches. To
generate symbols for an ADS-standard 1/8th grid, append the @SymbolsQtr suffix to the symbol name.
"Automatic" symbols are a subset of algorithmic symbols, which are based on a model.
The symbol is a filled box with terminal pins on the left (input) and right (output); if in/out
is not specified, the pins will be split evenly between the 2 sides. In addition, model port
info is used to label the symbol pins.
297
SystemVue - Users Guide
1. AutoSym – A Genesys symbol (RF part); used for Spectrasys schematic symbols.
2. AutoSymDF – A SystemVue "Data Flow" symbol, with arrowheads on the I/O pins.
3. MathSymDF – Just like AutoSymDF, but with the MathLang gradient 'M' icon at the
top.
4. HdlSymDF – Just like AutoSymDF, but with a blue square wave at the top to indicate
an HDL part.
Note that if the symbol cannot find the specified model, an error is shown as
indicated.
Data flow pin colors are based on the model port info.
The box fill color is based on the average of all the pin colors. In Spectrasys, since
the pins are always dark blue, the fill color for AutoSym will always be light blue.
An optional model suffix may be specified; for example, use AutoSym-
MyModel@MyModelLibrary to fully specify the model. The @Lib is optional, but can
only be omitted if the model can be found without it.
An optional icon can be placed on the symbol by appending an icon (subsymbol)
name to AutoSym or AutoSymDF. The icon must be in a loaded symbol library and
the icon name must be inclosed within curly-braces { and }. Valid icon names include
{MathLangM}, {VSA Icon}, and {RfLink Icon}. The model suffix (if any) must come
AFTER the icon suffix.
Changing a Symbol
To change a symbol:
298
SystemVue - Users Guide
Create a Symbol
To create a symbol based on an existing part:
1. Click the New Item button ( ) on the Workspace Tree toolbar, then click
"Designs", then select "Add Schematic Symbol"
2. Enter the symbol's name
3. Draw the symbol in the schematic area. Use the Annotation toolbar to place text,
lines, arcs, and other drawing objects.
4. Place input (i key) and output (o key) ports where symbol terminals are to be
located.
Note: Ports do not appear on the schematic when the symbol is used in a part.
5. Connect the symbol to the ports. These connection points are the connection points
seen on a schematic when a part is placed.
6. Change the port designator to give the symbol terminals a name. This name is
used to map symbol terminals to model nets.
When any (not just an algorithic) symbol is drawn on a schematic, symbol text is
processed prior to display, using a technique called "Macro Substitution". The text within
the '%' characters will be replaced with the appropriate value. For example,
Name=%Model% would be displayed as "Name=Resistor" on a symbol using a resistor
model.
For example, when "Impedance = %L%" is drawn on a schematic, the value of parameter
'L' is retrieved from its model and the result is "Impedance = 1.5". Another common use
is to place the model name on the symbol.
To use this advanced feature, place special "macro" strings in any symbol text:
Netlist Options
299
SystemVue - Users Guide
The Netlist tab page shows the current part connectivity. (That is, which terminal is
connected to which schematic network node.)
Note: These fields are read-only unless there is no schematic. Connectivity is then determined by the
names in the Net field.
Note: Symbol port naming is important otherwise the model may appear in the simulation backwards
because model nets were inadvertently connected to the wrong symbols terminals.
300
SystemVue - Users Guide
Running Scripts
Scripts can be used to perform a variety of functions in SystemVue. Some pre-written
script have been included with SystemVue and can be found in the Library Selector by
setting the Library Type to "Scripts".
Click the New Item button ( ) on the Workspace Tree toolbar and select Add
Script.
Once the script is added, edit script text in the window just like a Notes window.
The toolbuttons at the top let you run the script or copy the script to the script
processor (if you want to edit it there).
You can also run a script by using an Annotation Button with an embedded script or
by right-clicking a script in the workspace tree and picking Run.
Typically, most scripts start out by defining a variable to be the workspace object. In the
example below the workspace object was defined by WsDoc =
theApp.GetWorkspaceByIndex(0)
301
SystemVue - Users Guide
There is an object browser example using Visual Basic in the SystemVue Examples\VBBrowser directory.
This example shows you how to:
Script Processor
A script contains objects that let you control SystemVue using industry-standard scripting
languages. Scripts specifically control SystemVue operations and are very different from
equations, which relate variables in SystemVue. Use scripts to load files, save files, save
data sets, and change object parameters. Create and run scripts using the Script
Processor window. Add the scripts to SystemVue or to a specific design.
SystemVue supports scripts written in both VBScript and JScript. These are standard
programming languages not written by Agilent. Documentation for VBScript and JScript is
widely available on the Web.
Note: The latest version of scripting allows scripting from Visual Basic or C__, access to all SystemVue
menu items, customization of menus, and custom optimization. For more information on using any of
these features, please contact Agilent directly or check the latest Help files at Agilent EEsof EDA
Documentation .
To run a script:
Click the New Item button ( ) on the Workspace Tree toolbar and select Add
Script.
Once the script is added, edit script text in the window just like a Notes window.
Script Verbs
Some SystemVue objects have verbs you can use, including a few global verbs that are
applicable to the program.
This table contains a list of all the available functions to use in scripts. The functions are
organized by what type of object or item they can be called on. For example, functions in
the Dataset table can be used off of datasets in your workspace. The VBBrowser is also
very helpful in showing what functions can be used on what objects.
The examples in the table below were created using the Data Flow Template.wsv as the
opened workspace. The Data Flow Template.wsv workspace can be found in the Template
302
SystemVue - Users Guide
folder of the SystemVue directory. These examples work with the Data Flow Template.wsv
example, but can be applied to any workspace. To see the return value of any function in
the script processor you can use the Show() function. If the return value is an object it
may be necessary to use the GetName property before you can use the Show() function to
display the name of the object in the script processor. By default, any file created by a
function call is created in the same directory as the workspace currently opened unless a
path is specified. Any function that takes a file name as a string parameter can also take a
string containing the path of a file as a parameter.
Some sample scripts have been included with SystemVue and can be used as a reference
in writing your own. These scripts are located in the Library Selector under the Library
Type "Script".
For all the examples below w = Application.Manager.GetWorkspaceByIndex(0). This sets the variable "w"
to the current workspace.
Analysis
Application
303
SystemVue - Users Guide
Syntax Description Example
Application() Returns the current version Application()
of SystemVue.
Create(bstr Type, bstr Create a new object with the result = Create("Notes", "ThisNote")
Name) specified type and name.
FileNewFromTemplate(bstr Open a template from the FileNewFromTemplate("Data Flow Template.wsv")
FileName) template directory.
FileOpen(bstr FileName) Open a file from the last FileOpen("Data Flow Template.wsv")
opened directory.
FileOpenExample(bstr Open an example from the FileOpenExample("SPDT.wsv")
FileName) last opened directory.
FileOpenRecent(int Open a recent file. 1 Application.Manager.FileOpenRecent(1)
FileNumber) represents the most recent
file.
GetToolbarSet() Gets the toolbar set as an result = Application.Manager.GetToolbarSet()
object.
GetWorkspaceByIndex( int Returns the workspace w=theApp.GetWorkspaceByIndex(0)
iNum ) object at index iNum
GetWorkspaceCount() Returns the number of result
workspaces opened the =Application.Manager.GetWorkspaceCount()
instance of SystemVue
OpenWorkspace( bstr strFile Loads the specified OpenWorkspace("SPDT.wsv")
) workspace without a open
window prompt
PostCommand(bstr Display a command message Application.Manager.PostCommand("fit_windows")
CmdMsg) in the current view.
SaveTextToFile(bstr Save text to a file. SaveTextToFile "File.txt", "HelloWorld"
FileName, bstr ToShow)
SetNetworkReuse( int iPorts Displays dialog to re use a Application.Manager.SetNetworkReuse 2
) design as a part with the
specified number of ports. A
part of iPort number of ports
is created representing the
design you select.
Show(bstr ToShow) Display the text in the Show("HelloWorld")
Status box below the Edit
box of a window.
ShowToolBar(bstr Toggle, show, or hide a Application.Manager.ShowToolBar "Schematic", 1
ToolBarName, int Show) toolbar by name. 0 = Off, 1
= On
Update() Runs all pending analyses. Application.Manager.Update()
ViewDesignSelector(int Toggle (0), show (1), or hide Application.Manager.ViewDesignSelector(0)
Flags) (2) the Library Selector.
ViewPartPicker(int Flags) Toggle (0), show (1), or hide Application.Manager.ViewPartPicker(0)
(2) Part Selector A.
ViewPartPickerB(int Flags) Toggle (0), show (1), or hide Application.Manager.ViewPartPickerB(0)
(2) Part Selector B.
ViewSimulationStatus(int Toggle (0), show (1), or hide Application.Manager.ViewSimulationStatus(0)
Flags) (2) the Simulation Status
window.
ViewTuneWindow(int Flags) Toggle (0), show (1), or hide Application.Manager.ViewTuneWindow(0)
(2) the Tune window.
ViewWorkspaceWindow(int Toggle (0), show (1), or hide Application.Manager.ViewWorkspaceWindow(0)
Flags) (2) the Workspace window.
Atom
304
SystemVue - Users Guide
Dataset
Folder
Item
305
SystemVue - Users Guide
Syntax Description Example
AddProperty(IDispatch* Insert this result = w.GetItemByName("Note")
Property) property. w.Designs.AddProperty( result ) 'adds the note to the designs
Input must be folder
an item.
DeleteProperty(bstr Delete this w.DeleteProperty("Note")
Property) property.
GetItemByIndex(int Index) Get items by result = w.GetItemByIndex(1)
index starting
with index 0.
GetItemByName(bstr Get item by result = w.Designs.GetItemByName("Signal")
ItemName) name.
GetItemCount() Count the result = w.GetItemCount()
number of
items.
GetMethodList() Get the list of result = w.GetMethodList()
methods from
the GDISP
entries.
GetParentOfItem(IDispatch* Get the child = w.Designs.[Design1 Analysis].DataName
Child) parent item of result = w.GetParentOfItem(child)
given item.
GetPropertyList(variant* Get the w.Designs.Design1.PartList.GetPropertyList result
ItemList) property list
of an item.
GetPropertyType( bstr Get property result=w.Designs.GetPropertyType("Design1 Analysis")
PropName ) type by
name.
GetType() Gets the type result = w.Designs.Spectrum.GetType()
of an item.
GetPropertyAsArray( bstr Gets the w.GetPropertyAsArray "Notes", result
name, variant* ItemList) contents of a
property as a
list
GetVarCount() Count the result = w.Designs.Spectrum.GetVarCount()
number of
variables.
GetVarName(int Index) Get the result = w.Designs.Spectrum.GetVarName(2)
variable name
at given
index.
GetVarType(int Index) Get variable result = w.Designs.Spectrum.GetVarType(2)
type at given
index.
GetVarValue( int Index ) Get the result = w.Designs.Spectrum.Width.GetVarValue(2)
variable value
at a given
index.
GetVarXMLName( int Index Get the XML result = w.Designs.Spectrum.Width.GetVarXMLName(2)
) name of a
variable at a
given index.
HasProperty( bstr PropName Returns -1 is if w.HasProperty("IsOpen") then
) the Item has Show "yes" 'is the workspace open?
the property end if
and 0 if it
does not
SetProperty(bstr Property, Set a property number ="2500"
variant* Value) to a value. w.Designs.Design1.PartList.S1.ParamSet.Frequency.SetProperty
"DataEntry", number
Library
306
SystemVue - Users Guide
Syntax Description Example
GetPartList(variant* Get the part list of a dim Symbols
ItemList) library. Library = w.GetLibrary("Design", "SymbolsQtr")
Library.GetPartList Symbols
For each part in Symbols
Show part
next
Menu
Parameters
Part
Schematic
Equations
307
SystemVue - Users Guide
Syntax Description Example
SnapShotToData Convert the equation variable values into a fixed dataset. w.Equations.SnapShotToData
Calculate Calculate an equation set. Designed for non-auto-calc result =
equations. This is useful for running communications, for w.Equations.Calculate()
example.
Script
Workspace
A program can be written in any one of the supported languages to communicate with
SystemVue using our COM interface. Scripts and commands can be executed in the
SystemVue Script Processor from your program. Your program needs to contain the
proper COM reference and include the proper header for our COM Interface.
RunScript Function
To use the RunScript function the context of the script you wish to run must be contained
in a string variable. The Script Processor works line by line, so the string variable will need
to contain a line return character after each line in your script.
308
SystemVue - Users Guide
For Example, in VB this is one way you could format a string variable strScript to contain a script that
opens a workspace and runs an analysis.
Once you have formulated a string containing the script that you want to execute within
SystemVue, then use the command RunScript to send the script through SystemVue to
the script processor. For example, if the GENESYS.Application was instantiated as
SystemVueApp and the string containing the script was called strScript:
For VB script
SystemVueApp.RunScript( strScript, ScriptLanguage.genLangVBScript ).
For J Script
SystemVueApp.RunScript( strScript, ScriptLanguage.genLangJScript ).
RunScriptFromFile Function
An easier method for running a script in SystemVue from your program is to use the
RunScriptFromFile function which runs a script from a text file. Simply copy the cotents of
a script in SystemVue to a text file and save the file.
OpenWorkspace("C:\Program Files\SystemVue(Version)\Examples\Comms\Bluetooth.wsv")
WsDoc = theApp.GetWorkspaceByIndex(0)
WsDoc.Analyses.DF1.RunAnalysis()
Use the RunScriptFromFile to load the script text file and execute the script. For example,
if the GENESYS.Application was instantiated as SystemVueApp and the string containing
the path to MyScript.txt was called strPath:
For VB script
SystemVueApp.RunScriptFromFile( strPath, ScriptLanguage.genLangVBScript ).
For J Script
SystemVueApp.RunScriptFromFile( strPath, ScriptLanguage.genLangJScript ).
VBBrowser
(SystemVue Browser)
The VBBrowser is used to browse objects in SystemVue. This is an interactive program
that allows a user to see what functions are available to call within the script processor.
The program communicates with one active instance of the SystemVue program. The
browser looks at the current workspace and retrieves objects and items from it.
309
SystemVue - Users Guide
General
The Selected Item box contains the syntax for the script that you can execute by clicking
the Execute Method button.
1. Application.Manager (default) Sets the Item List to the context of the workspace tree.
2. Application.Menu Sets the Item List to the context of the current Menu Bar in
SystemVue
3. Application.StdMenu - Sets the Item List to the context of the standard Menu Bar in
SystemVue
Lists
310
SystemVue - Users Guide
Item List - The window contains a list of all the items found in the current context. If
nothing appears in the window you can click the Refresh button to refresh the context.
Clicking on an item in this list will show you a list of sub items. Note that the sub items
correspond to the items inside the opened workspace. Notice that as you click items, the
text in the selected item box changes. The first thing you should see (in the default
context) in the Item list is the name of the workspace(s) that are loaded in SystemVue. In
the example above you would see Data Flow Template as the first item in the list.
Variable List - The window contains a list of properties, variables, or parameters that are
associated with the current item. Items in this list can be called as a property to an item.
Method List - The window contains a list of the methods that can be used with the current
item. Notice that by double clicking on a method the ExecuteScript window pops up with
current syntax of the method youve selected. This syntax is generated from the Selected
Item text box and the method you have clicked. This is what would pop up if you double
clicked the Save() method.
You can execute this one line script by clicking on OK. A script processor window will not pop up in
SystemVue, so you may not always know if it worked or not. If you need to execute many lines it is
suggested to use a script. The ExecuteScript window is best used as a guide to get the correct syntax for
writing your own script.
Buttons
311
SystemVue - Users Guide
Up - The button sets the Item List to the parent item of the current Item List window
Execute Method The button will bring up the ExecuteScript window that shows the syntax
for the current Selected Item and gives the option to run it or not.
Go To Root - The button sets the Item List to the top most parent.
The global Windows name for SystemVue's COM server is GENESYS. When SystemVue
runs, it registers itself with the Windows operating system by name so that a script can
access it (including run an instance of it).
The first thing one must do to be able to access the SystemVue COM server in Excel is to
make it visible to Excel by setting it as a "Reference". In the Microsoft Visual Basic editor
in Excel, you must declare "GENESYS" as a reference, and this is normally done by
accessing the References dialog box via "Tools/References... "
Note: GENESYS will only appear in the References list only if SystemVue has been installed and run at
least once.
Now, the SystemVue COM server can be accessed in a VBScript module by the name
"GENESYS". Create a new VBScript module by right-clicking on your VBA Project in the
Project explorer and selecting "Insert... / Module".
The following code snippet shows the simplest possible script which simply opens an
instance of SystemVue:
Sub myScript()
Dim comServer As GENESYS.Application ' Declare variable that references our COM server
Set comServer = CreateObject("Genesys.Application") ' Open an instance of the application
End Sub
For illustrative purposes, here is a more involved VBScript which opens SystemVue, opens
a workspace named "MyWorkspace.wsx", Runs a particular analysis that is located in the
workspace, gets data from the dataset, and sets the data into an excel spreadsheet:
Sub myScript()
Dim oGen As GENESYS.Application
Dim WsDoc As GENESYS.Workspace
Dim Stri As String
Exit Sub
Err_Handler:
MsgBox Err.Description, vbCritical, "Error: " & Err.Number
End Sub
313
SystemVue - Users Guide
Schematics
This section describes how to create and use a schematic. A schematic is a graphical way
of describing a network of parts connected together through schematic symbols. These
parts also contain models that are simulated. The schematic symbols and wiring show the
connectivity between models.
Or
1. Right click on a folder in the workspace tree to bring up the right click menu.
2. Select the Add > submenu.
3. Select the Designs > submenu
4. Now select Add Schematic...
The name of the schematic can then be entered along with an optional description.
Note: The schematic will be added under the folder that was last selected in the workspace tree. (ie.
whatever is the "current" folder.) If you want to move it to a different directory simply drag and drop it in
the new folder.
314
SystemVue - Users Guide
A blank schematic will appear.
Parts can be placed on the schematic in either of two ways. Through a part selector or
through part toolbars.
Hint
Some parts can be placed with keyboard short cuts. See Appendix A Keystroke Commands (users) for
more information.
Hint
Some parts can be placed by dragging them from the workspace tree to the schematic. When a schematic
or sub-network model is drug in this way a sub-network part is created with an auto-generated schematic
symbol. S-parameter datasets can also be placed on the schematic by dragging them.
1. Bring up the part selector by clicking on the Part Selector button ( ) on the
Schematic toolbar.
315
SystemVue - Users Guide
1. Click on a part.
2. Move the mouse over the schematic. The cursor will change to a plus sign when
placed over the schematic.
3. Click the schematic where the part is to be placed.
1. Click either the Data Flow ( ) or the the Part Groups ( ) toolbar on the
Schematic Toolbar to make visible the desired part toolbar.
2. For example, select the Data Flow toolbar. The toolbar will appear.
Hint
When placing the part on the schematic with the mouse the direction of its travel on the left mouse click
will determine the initial orientation of the part. For example, if the mouse were being dragged slightly
from left to right when the left mouse button is clicked the part would be oriented from left to right on the
schematic.
1. Select the part by clicking on it. A red selection rectangle will appear around the
part.
2. Press F3 to rotate the part clockwise, Shift + F3 for counter clockwise, and F6 for a
mirror.
3. Repeat step 2 as necessary.
316
SystemVue - Users Guide
Manipulating Parts
Connecting Parts
There are three methods that can be used to connect parts together.
1. Click the part terminal to be connected. A connection highlight dot will appear
nearest the mouse cursor. This will be the terminal of focus for alignment purposes.
1. Place the mouse over the part terminal to be connected. The mouse cursor will
change to black with an angled arrow indicating a wire can be drug from terminal.
2. Click the part terminal and hold the left mouse button down will dragging the wire.
3. Drag the wire to the terminal of the part to be connected. Release the mouse button.
The finished wire will be selected.
For additional information read Nets, Connection Lines, and Buses (users) in the Users
Guide.
317
SystemVue - Users Guide
Moving Parts
There is a global option to keep parts connected (users) when they are moved or they will
be unconnected when they move. The Alt key toggles this behavior.
Hint
Multiple parts can be selected and manipulated at the same time. Click and drag a selection rectangle
around the parts of interest in a schematic. Holding down the Ctrl key during part selection will select /
de-select parts from the group.
Deleting Parts
Parts can be deleted from the schematic.
To delete a part:
318
SystemVue - Users Guide
1. Click the part(s) to be deleted.
2. Press the Del key
Panning a Schematic
Panning can be used to move the position of the schematic.
To pan:
Use the scroll bars to move the page up and down or left and right.
Or
Select the Pan Tool ( keyboard P ) from the schematic toolbar. Click and drag
the schematic to pan with the mouse.
Zooming a Schematic
Use the zooming features to change the viewing area of the schematic.
Page Width & Height - The size of the paper (in current units).
Standard Part Length - The length of a resistor part. Defaults to 1 inch. This
319
SystemVue - Users Guide
setting controls the schematic scaling. (If standard part length is set to 0.5, all parts
on the schematic will be half-size.)
Grid Spacing - The distance between grid dots.
Units - The units used by the schematic for its settings.
Font - Default font use when text is placed on the schematic.
Show Page Frame - When checked shows the page outline on the schematic.
Title Blocks
A title block is used to document a schematic. It often contains information regarding the
name of the schematic, the name of the person who drew it, copyright information, etc. A
library of common title blocks ship with the product.
Or
320
SystemVue - Users Guide
321
SystemVue - Users Guide
Note: These titles can only be changed on a custom title block symbol.
Hint
For Advanced users: An equation can be used for the text. For example, if the workspace contains an
equation block with a text variable named CompanyName, place =CompanyName in the Text field of
the title block. The leading = sign indicates that the text string is actually an expression. When the title
block is drawn, the variable will be evaluated and the result will be displayed in the title block.
Images, like a company logo, or any other annotation can be placed on the
custom symbol.
6. Save the workspace.
7. On workspace tree, right-click the symbol and use "Copy To" to place the symbol
in a new (or existing) library.
8. To use your new custom title block on a schematic, use "Add Title Block..." and
select the custom title block from the library it was saved in.
Annotating Schematics
The Annotation button ( ) on the Schematic toolbar gives you access to the
Annotation toolbar.
The Annotation toolbar provides tools like lines, circles, and text that you can use to point
out details of interest on a schematic, draw a box around a group of components, etc.
Hint
Double-click a text annotation to set the horizontal and vertical justification (text alignment).
Hint
For Advanced users: An equation can be used for the text. For example, if the workspace contains an
equation block with a text variable named CompanyName, place =CompanyName in the Text field of
the title block. The leading = sign indicates that the text string is actually an expression. When the title
block is drawn, the variable will be evaluated and the result will be displayed in the title block.
Text annotations can display model and parameter info when used within a custom
symbol. This is implemented via macro-text-substitution. When symbol text is drawn on a
schematic, the displayed text is modified prior to output. For example, Name=%Model%
would be displayed as "Name=Resistor" on a symbol using a resistor model. The
recognized macro strings are:
322
SystemVue - Users Guide
1. %Des% - Displays the part's designator.
2. %Model% - Displays the name of the model attached to the part.
3. %MODEL% - Displays the model name in UPPERCASE.
4. %ParameterName% - Displays the value of the specified model parameter
attached to the part.
Adding Text
Text can be placed directly on a schematic.
To add text:
323
SystemVue - Users Guide
1. Place a S-Parameter file based part in the schematic (1-port , 2-port , n-port ). This
can be done from the Linear Toolbar or the Part Selector
2. Double click the part to bring up the part properties
3. Click the Browse button to browse to the S-Parameter file
4. Add an analysis and point it to the desired schematic
5. Run the analysis
Physical S-Parameters
S Parameters can be taken or formed in such a way that they represent non physical parts
like negative resistors. Realistic real world answers only come when S-Parameters are
physical. If S-parameters are physical, then the corresponding Y-parameters will meet all
of the following requirements:
1. The real part of every diagonal entry must be positive. i.e. Real.Yp[i,i] > 0
2. The real part of every non-diagonal entry must be negative. i.e. Real.Yp[i,j] < 0
where i is not equal to j
3. The absolute value of the row real summation, excluding the diagonal, must be less
than real value of the diagonal in that row. i.e. abs ( sum( Real.Yp[i,j] ) ) <
Real.Yp[i,i] where i is not equal to j
324
SystemVue - Users Guide
4. The absolute value of the column real summation, excluding the diagonal, must be
less than the real value of the diagonal in that column. i.e. abs ( sum( Real.Yp[i,j]
) ) < Real.Yp[j,j] where i is not equal to j
Examples:
Here are some typical Y-parameters (which is converted from S-parameters):
This matrix meets items 1 and 2 but not 3 and 4, because abs( Real.Y[1,2] ) >
Real.Y[1,1] or abs( Real.Y[2,1] ) > Real.Y[1,1], so these S parameters are non physical.
Touchstone Format
These files contain small-signal S-parameters described by frequency-dependent linear
network parameters for 1- to 10-port components. The 2-port component files can also
contain frequency-dependent noise parameters. This data file format is also known as
Touchstone format.
Overview
Touchstone files are ASCII text files in which frequency dependent data appears line by
line, one line per data point, in increasing order of frequency. Each frequency line consists
of a frequency value and one or more pairs of values for the magnitude and phase of each
S-parameter at that frequency. Values are separated by one or more spaces, tabs or
commands. Comments are preceded by an exclamation mark (!). Comments can appear
on separate lines, or after the data on any line or lines. Extra spaces are ignored.
Filename Recommendations
1-port: filename.s1p, 2-port: filename.s2p, ... i.e. n-port: filename.snp
Comments
Option Line
S-Parameter Data Lines
Noise Data Lines
Comments
Comments can be placed anywhere in the file by preceding a comment with the
exclamation mark !. A comment can be the only entry on a line or can follow the data.
# GHZ S MA R 50.0
! POWER DIVIDER, 3-PORT
5.00000 0.24254 136.711 0.68599 -43.3139 0.68599 -43.3139 ! Frequency Line 1
0.68599 -43.3139 0.08081 66.1846 0.28009 -59.1165
0.68599 -43.3139 0.28009 -59.1165 0.08081 66.1846
6.00000 0.20347 127.652 0.69232 -52.3816 0.69232 -52.3816 ! Frequency Line 2
0.69232 -52.3816 0.05057 52.0604 0.22159 -65.1817
0.69232 -52.3816 0.22159 -65.1817 0.05057 52.0604
7.00000 0.15848 118.436 0.69817 -61.6117 0.69817 -61.6117 ! Frequency Line 3
0.69817 -61.6117 0.02804 38.6500 0.16581 -71.2358
0.69817 -61.6117 0.16581 -71.2358 0.02804 38.6500
# GHZ S MA R 50
5.00000 0.60262 161.240 0.40611 -42.2029 0.42918 -66.5876 0.53640 -79.3473 ! Frequency
Line 1
0.40611 -42.2029 0.60262 161.240 0.53640 -79.3473 0.42918 -66.5876
0.42918 -66.5876 0.53640 -79.3473 0.60262 161.240 0.40611 -42.2029
0.53640 -79.3473 0.42918 -66.5876 0.40611 -42.2029 0.60262 161.240
6.00000 0.57701 150.379 0.40942 -44.3428 0.41011 -81.2449 0.57554 -95.7731 ! Frequency
Line 2
0.40942 -44.3428 0.57701 150.379 0.57554 -95.7731 0.41011 -81.2449
0.41011 -81.2449 0.57554 -95.7731 0.57701 150.379 0.40942 -44.3428
0.57554 -95.7731 0.41011 -81.2449 0.40942 -44.3428 0.57701 150.379
7.00000 0.50641 136.693 0.45378 -46.4151 0.37845 -99.0918 0.62802 -114.196 ! Frequency
Line 3
0.45378 -46.4151 0.50641 136.693 0.62802 -114.196 0.37845 -99.0918
0.37845 -99.0918 0.62802 -114.196 0.50641 136.693 0.45378 -46.4151
0.62802 -114.196 0.37845 -99.0918 0.45378 -46.4151 0.50641 136.693
See also 1-Port , 2-Port , 3-Port , 4-Port , and n-Port S-parameter models
326
SystemVue - Users Guide
Sweeps
3D graphs in SystemVue require parameter sweeps to generate a third dimension for
plotting. Parameter Sweeps give you this third dimension by adjusting a tuned variable,
repeating another simulation for each adjustment. For example, to see how the response
of a circuit changes when a capacitor is adjusted, you can add a Parameter sweep which
sweeps the linear or electromagnetic simulation while adjusting the capacitor value. You
can then view the results on a 3-D graph (users).
For advanced applications, you can nest Parameter sweeps, creating 4-D, 5-D, or higher
data. This data can then be viewed on a table.
1. Click the New Item button ( ) on the Workspace Tree toolbar and select Add
Sweep from the Evaluations menu.
2. You will see the sweep properties box, which will be similar to this:
3. By default the sweep settings will be the same as the last time you created a sweep.
The default parameter to sweep is just the first in the list. Here the parameter is in
the Designs folder, in the design named Design1, in the part named C1, as
parameter C.
In the list are all tuned parameters (or equation variables). Use the settings shown
above, then click Calculate Now to calculate the sweep.
4. Note that a Sweep1_Data dataset is built.
5. Double-click the S21 graph and change the "Default Dataset or Equations" to
Sweep1_Data - so you plot S21 for the swept data. Turn off symbols by clicking the
Symbols button (the last button on the Graph toolbar). You get a range of traces that
looks like this:
327
SystemVue - Users Guide
Here the mouse is hovering over a dot on the dark green trace and the popup
identifies the trace and value.
To look at the range at 200 pF enter the following formula into the graph line
6. Enter S[C1_C_Swp_F@200,2,1]. Note that the swept C value is in the Sweep1_Data
set and named C1_C_Swp_F (C1.C swept on F).
7. The graph now is:
328
SystemVue - Users Guide
Name Description
Sweep Name Name of Sweep Evaluation
Analysis to Sweep Analysis used for the parameter sweep. The selected analysis will be recalculated
for each different value of the swept parameter.
Parameter to Sweep Parameter that gets changed to create the sweep. All parameters defined as
tunable are available to be swept.
Output Dataset Dataset file in which the data is saved. If not specified, the dataset name will be
the name of the analysis with "_Data" appended.
Description Description of the evaluation being run. For documentation purposes only, not
otherwise used by SystemVue.
Calculate Now Run the evaluation. Always runs the analysis, regardless of whether or not any
changes were made.
Propagate All Variables During the sweep process, if the source dataset has user defined variables these
When Sweeping will also be swept and aggregated into the sweep dataset.
Show Long Parameter Display the full parameter name (with path) in case you have multiple
Name parameters with the same short name (such as C1.C).
Factory Defaults Reset all values to their default
Parameter Range Start. The lower bound (minimum frequency) of the sweep.
Stop The upper bound (maximum frequency) of the sweep.
Unit of Measure Unit of measure used for the evaluation
Type of Sweep Linear: Number of Points. Number of points in entire sweep.
Log: Points/Decade Number of points in each decade of the sweep.
Linear: Step Size (MHz) Allows specification of start and stop frequencies, and space between points.
List of Frequencies (MHz) Allows the explicit specification of analysis frequencies. These points are entered
into the List of Frequencies box separated by spaces.
329
SystemVue - Users Guide
Tables
Tables provide text-based tabular output instead of graphical output. There is only one
type of table in SystemVue. You can place any measurement in a table. Change the
properties of a table using the Table Properties window.
Creating Tables
The easiest way to create a new graph is using the Instagraph Feature (users).
The easiest way to add an arbitrary measurement to an existing table is via the
Measurement Wizard (users).
Tables can also be created manually:
1. Click the New Item button ( ) on the Workspace Tree toolbar and select Add
Table.
2. Enter the measurements you want to display in the Table Properties dialog..
3. Click OK.
(note that the Independent Variable for PPORT2 in the Snap dataset was set to the
same as PPORT[2] to remove a second Freq column)
If the data is complex it will often display as dB or magnitude by default. To see the full
complex data select a format from the Complex Format column.
If you want to print a table, copy it to a notes object by using the Copy To Notes right-
330
SystemVue - Users Guide
click menu entry. This copies the headings and data into an HTML table which you can
then copy to Word or other HTML editor or you can just print the Notes. Modify the Notes
manually to change fonts or formatting.
New Right-click in the table header to get a popout menu that lets you turn off
columns.
See Also
Table Toolbar
Graphs (users)
331
SystemVue - Users Guide
Templates
Templates are a very convenient way to get started quickly with a new design. They give
you a complete circuit as your starting point. You can also modify templates for your
specific program. Many templates are included with SystemVue, and you can easily add
your own.
332
SystemVue - Users Guide
2. In the templates area double-click a template name, such as "Data Flow Template".
333
SystemVue - Users Guide
Tuning Variables
One of the most powerful features of SystemVue is real-time tuning of values in variables.
You can use tuned variables almost anywhere in SystemVue, including schematics,
netlists, substrates, and port impedances. See almost any of our examples for tuned
variables.
Every variable in a part is tunable. You can tune the values in one variable or multiple
variables. SystemVue lets you dynamically tune variables to determine whether your
circuit meets its requirements. You can do this by entering different values for a specific
variable and simultaneously viewing the response in a graph. Continue adjusting values
and viewing the graph until you get the desired response.
Accept Tuned Settings – Applies the current Tune settings to the graphs, etc.
Refresh – Scans for currently tunable variables
Variable Options – Sets Tune Window Variable settings
Hide Name Prefix – Omits the name prefix, so the name is as short as possible
(overrides Long Names too). Duplicate variable names are common in this
mode, which is confusing, so the recommended setting is OFF.
Long Names – Display the full name of the tunable variables
Graph Checkpoints – Enables graph checkpoints
Help – Brings up help on tuning. (This page of documentation)
Variable Grid – contains the tunable variables
Variable Tuning Mode (dropdown)
Normal - tune (increment / decrement) by a percentage value, usually 5 or
10%
Step Size – tune by adding or subtracting the step size
Standard – Use Standard part values. (Limits tuning to specified "standard"
values, which is useful for physical "lumped" parts – resistors, capacitors,
etc.)
Tuning Value – Amount to tune variables by (in conjunction with tuning mode)
Variable – The name of a tunable variable, with optional info as set by the Item
Menu above.
Value – The value of a tunable variable. Click grid cell to activate tuning this
variable.
Saved Tune States – Caches the current variable settings
Use These Settings – Opens saved settings
Settings Name – Name of the current settings
Checkpoint the Graphs – Places checkpoint traces on the graphs
Remove All Graph Checkpoints – Removes checkpoint traces from all the
graphs (but does not delete named settings)
Analyses To Run (AutoRecalc) – Provides easy access to the Automatic Recalc
334
SystemVue - Users Guide
settings of all the Analyses in your workspace
Check an analysis to enable its AutoRecalc mode, so that the analysis will run
when a variable is tuned
Uncheck an analysis to disable its AutoRecalc setting, so the analysis will NOT
automatically run
The Tune Window is collapsable; to reduce screen clutter, the Saved Tune States and
Analyses To Run panels can be hidden, via the "Fold" button on the right of each
panels titlebar. (Click the "Unfold" button to restore the panels to full height.)
The Tune Window also has a horizontal display mode, which is automatically triggered
when the Tune Window is wide:
If you are tuning more than one part of the same type, you may notice duplicate variable names. This is
due to the "short name" feature, which shows shortened variable names. To make the displayed names
unique (show the long name), do this: At the top of the Tune Window, select the 3rd icon, Variable
Options and then remove the check-mark from the Hide Name Prefix option.
Or
4. From the Variable Options menu and choose Select Variables... from the drop
down. This will give you a comprehensive list of everything which can be tuned.
5. Check the boxes beside the items that you would like tuned.
6. Click OK. Notice that the variable(s) to be tuned have now changed color on the
schematic and appear in the Tune window. To tune this parameter you simply need
to click the up/down arrows in the Value column.
There are multiple ways to make N (the sample delay size value) of part D2 tunable. First,
load the Model Building / CIC Filter example and rearrange your screen so that it looks
like the screenshot below. Then do any of the following:
Double-click the part and check the Tune box next to a parameter value.
Once D2 is tunable, the N=8 line should turn teal-colored and the Tune Window
should now have a D2.N entry. All of the analyses will turn red because the
335
SystemVue - Users Guide
schematic has changed.
After typing a new value and pressing enter, we see the following display:
The dashed, dark blue trace is the original simulation result Spectrum.
The bright blue is the new, tuned simulation result.
...
Parameters can be marked for tuning via on-screen editing; click a part parameter,
unfold the parameters window (if necessary, use the << button), and click in the first
cell column. A 'T' indicates that a parameter is tunable.
Click the part to select it, then select Make Components Tunable from the Schematic
menu.
Click the part to select it, then click the Make Tunable schematic toolbar button,
which toggles the tunable setting.
In the Tune Window,
336
SystemVue - Users Guide
1. Click the Variable Options button
2. Select Select Variables.
3. Find D2.N and check it.
...
* Type
a new value and press enter
1. Normal – This option is unrestricted. For lumped parts, such as resistors and
capacitors, values between zero (0) and infinity are possible. You can use this option
to determine the theoretical optimum values. This typically increments the value by
5%.
2. Step Size – This option adds or subtracts the specified step-size to the parameter.
For example, if the step-size value equals 0.5, then the allowable parameter values
are 0.5, 1.0, 1.5, and so on.
3. Standard – This option uses only common values, such as 1.2, 3.3, 4.7, 5.6, and so
on for lumped parts. The tuning percentage is shown in the first box in the Value
column. This controls the amount values are stepped when tuning.
Save often
This is always a good idea. Saved workspaces remember all the tune settings, including
what you were tuning, what runs when tuned, and which graphs to update. Click the save
button (the diskette icon in the main toolbar) to save.
337
SystemVue - Users Guide
Tuning Options
To checkpoint graphs, when you save a setting
Click the Graph checkpoint button in the Tune Window and check on/off the
graphs you want to checkpoint when you checkpoint a named setting. The menu
goes away when you click off the menu area.
Check Use All Visible to have the list be all visible graphs. The list dynamically
changes as you open and close graphs.
1. Click the first box in the Variable column in the Tune window.
2. Select an option from the list.
1. Type a new value in the Value box for the variable you want.
2. Click the up or down arrow to increase or decrease the tuning ratio.*
You can press F6 to decrease or F7 to increase the tuning percentage by a factor of 2.
Click the up arrow to increase the value, the down arrow to decrease the value.
Type a value, and when you press the enter key it will be entered and the analyses
you've selected run.
When values have been set and you want to save a set under a new name just type the
name into the name entry field and click the save settings (diskette) icon. Click the graph
checkpoint button to create a named checkpoint.
338
SystemVue - Users Guide
Click the Select Graphs dropdown button and ensure that only 1 graph is selected,
as shown below
339
SystemVue - Users Guide
340
SystemVue - Users Guide
Checkpoints
A checkpoint is a saved intermediate point. In a graph, it is usually a dashed trace
showing potentially good values.
1. Select Show Named Settings from the Item menu in the Tune window. This
will bring up a field to type names/settings in.
2. Type a name into the Named Setting entry field (such as Better ).
As you tune you will see an echo left behind of the original settings, this is the checkpoint.
You can add as many checkpoints as you like. Each new checkpoint will have a dashed
trace and be in a darker color.
1. Click the Remove Checkpoint button in the tune window. This will remove
checkpoints from the graphs listed in your graph checkpoint list. As you then tune a
checkpoint will not be created.
341
SystemVue - Users Guide
Gang Tuning
Another common task in tuning is to adjust more than one parameter at the same time.
This is called Gang Tuning and the easiest way to do it is with an equation variable.
Start with an example: Signal Processing / CrossCorr. In the following figure, an equation
variable has been setup for the "B2" BitFormatter. A new variable named sampbits has
been entered, so that the both BitFormatters can share the same value for the
SamplesPerBit parameter.
Then add an Equation to the workspace and then define the variable (and any others with
might depend on it).
The variable sampbits is defined with a ?1. The 1 is the starting value and the ? syntax
makes the variable tuneable. Other variables, such as packetsampbits can also be defined
based on it (and other variables), for use elsewhere in the workspace.
For more information about Equations and setting variables tunable from Equations,
please refer to the Using Equations (users) section.
342
SystemVue - Users Guide
343
SystemVue - Users Guide
Contents
Requirements (users)
Quick Start (users)
Building your first Custom C++ Model Library (users)
Supported Data Types (users)
Writing Data Flow C++ Models (users)
Loading and Debugging a Data Flow C++ Model (users)
Troubleshooting (sim)
Advanced Topics (users)
344
SystemVue - Users Guide
Advanced Topics
Defining the Model Library Properties
To override the default properties of your C++ library, you need to define the bool
DefineLibraryProperties(AgilentEEsof::LibraryProperties* pLibraryProperties)
function in your library.
For example, in Visual Studio solution in the Quick start (users) section, the AddCx part
specifies its associated model to be AddCx@Custom Models. If you call
LibraryProperties::SetExcludeLibrarySuffixFromPartModels method, the model will
simply be listed as AddCx.
To learn more about the library manager, refer to the Using the Library Manager (users)
documentation.
The XML file generated by SystemVue must be imported as a Resource into your Visual
Studio project. During the Resource Import process, you will be prompted to provide a
name for the Resource Type. You may provide any name you want, but we recommend
"XML". Your imported resource will receive a corresponding ID which must be used to
register the resource.
When a DLL is loaded, certain libraries are automatically generated. For example, a
Design library consisting of generated model templates for each model defined in the DLL
is produced. A Part library is generated as well, unless you provide your own and mark all
of the models as not needing an auto-generated part (done with the
DISABLE_PART_GENERATION() macro in your DEFINE_MODEL_INTERFACE function).
Example
double Input;
};
// Code for source file
DEFINE_MODEL_INTERFACE(CustomModel)
{
// Notice the name to be prepended includes both the name of the data member
// and a '.'. Had this been a pointer to WriteData, the argument would
// have been "m_WriteData->".
m_WriteData.AddInterface(model, "m_WriteData.");
// Add a input port
ADD_MODEL_INPUT(Input);
return true;
}
bool CustomModel::Initialize()
{
m_WriteData.Initialize();
return true;
}
bool CustomModel::Run()
{
m_WriteData.WriteSample(Input);
return true;
}
346
SystemVue - Users Guide
After you have setup the Visual Studio project (users), you can write a C++ class that
represents a Data Flow model. All C++ Data Flow models must be written as a C++ class.
The C++ class for the model must be derived from AgilentEEsof::DFModel with public
access. Each model requires one class, and each class can support only one model. It is
not possible to write multiple models inside a single C++ class. Inheritance and Object
Composition (users) is permitted, to avoid code duplication.
For a simple example cpp file please read Adder.cpp file in the section Adding a new
Model to the Project (users) in First Custom C++ Model Library section.
// The unsigned tapsSize will be set by simulator to the number of elements in the array
param
AgilentEEsof::DFParam paramTaps = ADD_MODEL_ARRAY_PARAM( taps, tapsSize);
paramTaps.SetDescription( "Filter tap values" );
paramTaps.SetName("FilterTaps");
// The SetDefault value method takes const char * as input, the value of this should be
same as you would enter in SystemVue
paramTaps.SetDefaultValue( "[-0.040609, -0.001628, 0.17853, 0.37665, 0.37665, 0.17853, -
0.001628, -0.040609]" );
decimation = 1; // For scalar (non-pointer) data members default can also be set before
adding as parameter
AgilentEEsof::DFParam paramDecimation = ADD_MODEL_PARAM( decimation );
paramDecimation.SetName("Decimation");
paramDecimation.SetDescription( "Decimation ratio" );
The SetDefault value method takes const char * as input, the value of this should be same
as you would enter in SystemVue, for enumerated parameters enter corresponding integer
equivalent. For non-pointer data members, you may set the value of data member before
adding it as a parameter, in this case, there is no need to use SetDefault explicitly and
default is selected based on current value of the corresponding data member added as a
parameter. However, for pointer type data members SetDefault must be called.
The values of the parameters and corresponding value of data member holding array size
are available to be read in the Setup(), Initialize(), Run(), and Finalize() methods. The
values of array type parameters could be accessed using [] operator. The maximum index
that you could use in [] operator should be less than the array parameter size set by the
simulator. In the above code the maximum index for taps should be tapsSize-1.
If you have added a parameter with data type char * then you can call SetParamAsFile()
method of AgilentEEsof::DFParam to set it as a file parameter. If a char * is set as a file
parameter then Browse button is enabled.
If you have added a parameter as an enumeration using ADD_MODEL_ENUM_PARAM then
AddEnumeration(const char * EnumName, int EnumValue) method of
AgilentEEsof::DFParam must be called to add enumeration values to the simulator GUI.
The AddEnumeration method, optionally, can be used with integer parameters as well to
use integer parameter as enumeration in the simulator GUI.
If you have added an integer parameter, you can also use SetEnumeration(const char
* EnumerationName) method of AgilentEEsof::DFParam to use predefined
enumerations. The list of predefined enumerations is mentioned in Adding Parameters to
the Interface section above. The SetEnumeration method only supports one of the
following as its parameter
AgilentEEsof::Units::NONE
AgilentEEsof::Units::ANGLE
AgilentEEsof::Units::LENGTH
AgilentEEsof::Units::TIME
AgilentEEsof::Units::FREQUENCY
AgilentEEsof::Units::VOLTAGE
AgilentEEsof::Units::POWER
AgilentEEsof::Units::RESISTANCE
AgilentEEsof::Units::TEMPERATURE
Warning
By default a model is added with a default name that is same as the model class
name, with no description, no category in part selector, and with an auto-generated
symbol. Optionally, this default behavior can be changed, only inside
DEFINE_MODEL_INTERFACE, using any of the four macros as shown in the
following example code segment.
// File AddFxp.h
#pragma once
#include "ModelBuilder.h"
#include "DFFixedPointInterface.h"
class AddFxp :
public AgilentEEsof::DFModel, public AgilentEEsof::DFFixedPointInterface
{
public:
/// Output Parameters
int WordLength;
int IntegerWordLength;
AgilentEEsof::FixedPointEnums::Sign IsSigned;
AgilentEEsof::FixedPointEnums::OverflowMode Overflow;
AgilentEEsof::FixedPointEnums::QuantizationMode Quantization;
int SaturationBits;
/// input bus
AgilentEEsof::FixedPointCircularBufferBus dataIn;
///output
AgilentEEsof::FixedPointCircularBuffer dataOut;
private:
/// Accumulator for the sum
/// AgilentEEsof::FixedPointValue is arbitray precision type. An object of
/// FixedPointValue type may store a fixed-point value of arbitrary precision
350
SystemVue - Users Guide
/// and binary point location without losing precision or magnitude (no quantization
/// or overflow handling). This is suitbale for accumulating the sum. The
/// overflow/quantization handling will be performed on dataOut[0] when we
/// assign this accumulated sum to the dataOut[0]
AgilentEEsof::FixedPointValue m_fxpAccumulator ;
public:
// This Macro is required for all classes derived from CDFModel
DECLARE_MODEL_INTERFACE( AddFxp )
//-------- Function Overloads --------
bool Run(); // Do the math
bool Initialize();
ERESULT SetOutputFixedPointParameters();
};
//SineGenerator.cpp
#include "SineGenerator.h"
#define TWOPI 6.28318530717958647692528676655900576839433879875021
#ifndef SV_CODE_GEN
DEFINE_MODEL_INTERFACE( SineGenerator )
{
//Add TimedCircularBuffer output as a model output
ADD_MODEL_OUTPUT( output );
AgilentEEsof::DFParam paramAmp = ADD_MODEL_PARAM( Amplitude );
paramAmp.SetDefaultValue( "1.0" );
AgilentEEsof::DFParam paramFreq = ADD_MODEL_PARAM( Frequency );
paramFreq.SetDefaultValue( "5e3" );
AgilentEEsof::DFParam paramPhase = ADD_MODEL_PARAM( Phase );
paramPhase.SetDefaultValue( "0" );
AgilentEEsof::DFParam paramSR = ADD_MODEL_PARAM( SampleRate );
paramSR.SetDefaultValue( "1e6" );
return true;
}
#endif
bool SineGenerator::Setup()
{
bool bStatus = true;
if ( SampleRate > 0 )
{
//Use TimedCircularBuffer::SetSampleRate method to set the output sample
rate in Setup()
output.SetSampleRate( SampleRate );
}
else
{
POST_ERROR( "SampleRate must be greater than 0." );
bStatus = false;
}
return bStatus;
}
bool SineGenerator::Run()
{
bool bStatus = true;
return bStatus;
}
351
SystemVue - Users Guide
TimedDFModel::CalculateLatency(). The input samples are downsampled by Factor.
For each firing (run), only the Phase th sample among Factor input samples is sent to
the output. As a result, to make the behavior causal, the time stamp of the first
output sample should be delayed by Phase * input time step for causality.
//Modulator.h
#pragma once
#include "ModelBuilder.h"
#include "SystemVue\TimedDFModel.h"
#include "SystemVue\EnvelopeSignal.h"
class Modulator : public AgilentEEsof::TimedDFModel
{
DECLARE_MODEL_INTERFACE( Modulator )
virtual bool Run();
ERESULT PropagateCharacterizationFrequency();
double CarrierFrequency;
//Complex baseband I-Q signal
AgilentEEsof::DComplexCircularBuffer input;
//Envelope signal
AgilentEEsof::EnvelopeCircularBuffer output;
};
if ( sink_control_object.CollectData() )
{
//data collection code ...
}
352
SystemVue - Users Guide
3. In the New Project dialogue box choose Win32 under Visual C++ and then choose
Win32 Console Application. In this case we will call our first project
MyFirstLibrary. The New Project dialogue box should look like this:
6. Click Finish.
7. Click View > Property Manager, this should open Visual Studio Property
Manager.
8. In Property Manager, select the project you want to setup, in our case it is
MyFirstLibrary, and right click it. Select Add Existing Property Sheet:
All SystemVue Model classes must be derived from AgilentEEsof::DFModel with public access
#include "Adder.h"
DEFINE_MODEL_INTERFACE(Adder)
{
ADD_MODEL_INPUT(In1);
ADD_MODEL_INPUT(In2);
ADD_MODEL_OUTPUT(Out);
Gain = 0; // Default Value
ADD_MODEL_PARAM(Gain);
return true;
}
bool Adder::Initialize()
{
if (Gain ==0)
{
POST_ERROR("The value of Gain cannot be == 0");
return false;
}
return true;
}
bool Adder::Run()
{
Out = Gain * (In1 + In2);
return true;
}
Build the solution, using either the Debug or Release configuration by right clicking on the
solution and selecting Build Solution. A successful build should create <project
name>.dll in the Debug and Release directories respectively, in our case it will be
MyFirstLibrary.dll.
355
SystemVue - Users Guide
Using the Model in SystemVue
1. Start SystemVue using a Blank template
2. Click Tools > Library Manager....
3. In the Library Manager dialogue box, select Add From File.
4. Browse to your Project location and then into either the Debug or Release sub
directory (use the configuration that you chose to Build the project).
5. Change the File of Type to "SystemVue DLL Libraries (.dll)" and select the <project
name>.dll. In our case it will be MyFirstLibrary.dll.
6. Click Open. Scroll down to see that the library has been added and is shown in the
list.
7. Click Close.
8. Under Part Selector, in Current Library choose MyFirstLibrary Parts, this will
show the Adder that we have created.
10. Simulate the design. The design will give an expected error about the value of Gain
== 0. This is the error we have posted in our Initialize() method in Adder.cpp file
above.
11. Change the value of Gain to a non-zero value and successfully simulate the design.
SystemVue uses the DLL library name to name the Part, Model and Enum libraries. The model
builder DLLs that you load must have unique names. Please read Defining the Model Library
Properties (users) to override this default behavior.
356
SystemVue - Users Guide
1. Build the library with Debug configuration, load the library in SystemVue and create
the design using the Adder model as shown in figure below
2. Change the value of Gain parameter to a non-zero value and save the design.
3. Add the break points in Adder.cpp inside Visual Studio as shown below
357
SystemVue - Users Guide
4. Make sure that SystemVue is running, inside the Visual Studio click on Debug ->
Attach to Process... as shown below
5. In the Attach to Process dialogue box select SystemVue.exe instance that you
want to debug with and click Attach as shown below.
358
SystemVue - Users Guide
6. In the SystemVue instance, that is now attached to Visual Studio, start the
simulation. This will invoke the break point in Visual Studio inside
Adder::Initialize() function. Hit continue, and next break point will be in Run()
method, hit continue again, this will again stop inside Run() but for the next input
data point. Keep debugging in Visual Studio as you do for any other C++ code. Read
visual studio documentation to learn more about how Visual Studio debugger works.
7. Remove break point from inside Run() method and hit continue again, this will finish
the SystemVue simulation.
359
SystemVue - Users Guide
Quick start
This quick start section will cover building an example Visual Studio project shipped with
SystemVue, loading the newly built dll in SystemVue and running the simulation using
example workspaces. The later sections will cover:
setting up a new Visual Studio project (users) to build custom C++ models
writing C++ models (users)
debugging C++ models (users)
SystemVue is shipped with an example Visual Studio project in the directory C:\Program
Files\SystemVue2009.08\ModelBuilder\SystemVue Model Builder, where
C:\Program Files\SystemVue2009.08 is the directory where SystemVue is installed. This
project contains source code for several C++ models. Some of those model are shown in
the following table.
Warning
Before opening the examples in the above table, you must compile the example Visual Studio project and
load the generated Custom.dll file in SystemVue
2. UpSample Test containing instance U1. In this case, UpSample model from
Custom library was added to SystemVue built in part UpSample using Manage
Model (users) option.
3. FIR Test containing instance F1. In this case, the pre-existing FIR symbol was
hard-coded in the C++ model. Assigning the existing symbol to a model in C++
code is covered in the section Modifying Model Properties (users) in Data Flow
C++ models section.
361
SystemVue - Users Guide
3. Simulate each design, and observe the results.
362
SystemVue - Users Guide
Requirements
SystemVue must be installed on the machine where you will be building the Custom
C++ model library.
The SystemVue C++ Model Builder requires either:
Microsoft Visual C++ 2008 Express Edition (freely available from
Microsoft)
Microsoft Visual Studio C++ 2008 with SP1
363
SystemVue - Users Guide
C++ Built In Scalar Data Types: The C++ data types int, double, float,
std::complex<double>, std::complex<float>, bool, and char * are supported as
scalar parameters. Note that char * is used as scalar parameter to represent a
character string or file name type parameter.
C++ Built In Pointer Data Types: The C++ pointer data types int*, double*, and
std::complex<double>* are supported as array parameters. Each pointer data type
must be accompanied with an unsigned type data member to hold the size of array
set by the simulator.
SystemVue Matrix Data Type: The Matrix is supported for int, float, double,
std::complex<float> and std::complex<double> version of AgilentEEsof::Matrix.
SystemVue Built In Enumerations:
AgilentEEsof::QueryEnum: Possible values are AgilentEEsof::QUERY_NO and
AgilentEEsof::QUERY_YES.
AgilentEEsof::BooleanEnum: Possible values are
AgilentEEsof::BOOLEAN_FALSE and AgilentEEsof::BOOLEAN_TRUE.
AgilentEEsof::SwitchEnum: Possible values are AgilentEEsof::SWITCH_OFF
and AgilentEEsof::SWITCH_OFF.
AgilentEEsof::FixedPointEnums::Sign: Possible values are
AgilentEEsof::FixedPointEnums::UNSIGNED and
AgilentEEsof::FixedPointEnums::TWOS_COMPLEMENT.
AgilentEEsof::FixedPointEnums::QuantizationMode: Possible values are
AgilentEEsof::FixedPointEnums::ROUND
AgilentEEsof::FixedPointEnums::ROUND_ZERO,
AgilentEEsof::FixedPointEnums::ROUND_MINUS_INFINITY,
AgilentEEsof::FixedPointEnums::ROUND_INFINITY,
AgilentEEsof::FixedPointEnums::ROUND_CONVERGENT,
AgilentEEsof::FixedPointEnums::TRUNCATE, and
AgilentEEsof::FixedPointEnums::TRUNCATE_ZERO.
AgilentEEsof::FixedPointEnums::OverflowMode: Possible values are
AgilentEEsof::FixedPointEnums::SATURATE,
AgilentEEsof::FixedPointEnums::SATURATE_ZERO,
AgilentEEsof::FixedPointEnums::SATURATE_SYMMETRICAL,
AgilentEEsof::FixedPointEnums::WRAP, and
AgilentEEsof::FixedPointEnums::WRAP_SIGN_MAGNITUDE.
Note
User Defined Enumerations: A user defined C++ enum can also be used as a
parameter, the enumeration type needs to be specified when adding such an
enumeration for proper type conversions. The details will be given in later sections.
C++ Built In Data Types as Uni-rate Inputs/Outputs: The C++ data types int,
double, and std::complex<double> are supported as uni-rate inputs/outputs.
C++ Built In Pointer Data Types as Multi-rate Inputs/Outputs: The C++
pointer data types int*, double*, and std::complex<double>* are supported as
multi-rate inputs/outputs. For these data types an unsigned type rate variable may
be added to specify the rate; the default rate for each input/output using these data
types is "1".
SystemVue CircularBuffer Data Types: SystemVue supports highly effecient built
in CircularBuffer data types to implement inputs/outputs for better performance and
ease of coding. It is highly recommended to use the CircularBuffer data types as
inputs/outputs instead of C++ built in data types. The CircularBuffer data types are
multi-rate in nature; to implement a uni-rate model use rate=1.
SystemVue CircularBufferBus Data Types: A bus of CircularBuffer inputs/outputs.
The CircularBufferBus data types are the only way to implement a bus input or bus
output.
SystemVue TimedCircularBuffer<T> Data Types: The templated
TimedCircularBuffer<T> data types are similar to CircullarBffer data types but they
are also able to access time stamps, and to set/get sample rate. TimedCircularBuffer
should only be use inside TimedDFModel (users).
SystemVue EnvelopeCircularBuffer Data Types: Inherits from
TimedCircularBuffer< EnvelopeSignal > and uses a private member double
m_dFc to store the characterization frequency associated with the envelope signal.
Please read Envelope Signal Type for more details.
The following CircularBuffer<T> data types are predefined using typedefs and are only
supported types for use as inputs/outputs:
For more details about the SystemVue matrix data type AgilentEEsof::Matrix<T> see the
section SystemVue Matrix Data Type
Note
CircularBuffer< T > data types are only designed to be used as inputs/outputs and not for any other
purpose.
CircularBuffer< T > data types are the most efficient way to implement inputs/outputs; it is highly
recommended that they are used instead of the built in C++ data types.
The [] and IsConnected() must not be used outside Run() (users) method of your model.
The CircularBufferBus data types are the only way to implement a bus type input or
output. The size of the Bus can be accessed using the size_t GetSize() method. An
individual CircularBuffer can be accessed using the [] operator. To access the jth data
sample of the ith input connected to the bus use input[i][j]. For example, input[0][2] can
be used to access 3rd data sample (indexed by 2) in the first multi-rate input (indexed by
0) connected to the bus input. The outputs can be accessed similarly.
double GetTime( size_t iIndex, unsigned long long iCount ) const: Get the
time stamp at the iCount th firing of the model and the iIndex th sample of the
buffer. Use this method in TimedDFModel::Run() to get the time stamp of a particular
sample.
bool SetSampleRate( double dSampleRate ): Set the sample rate, dSampleRate,
and the corresponding time step ( 1/dSampleRate ) of the model's input (or output)
represented by this circular buffer. Use this method in TimedDFModel::Setup().
Return false if dSampleRate is not greater than 0.
bool SetTimeStep( double dTimeStep ): Set the time step, dTimeStep, and the
corresponding sample rate ( 1/dTimeStep ) of the model's input (or output)
represented by this circular buffer. Use this method in TimedDFModel::Setup().
Return false if dTimeStep is not greater than 0.
void SetStartTime( double dStartTime ): Set the start time of the output. Use
this method in TimedDFModel::CalculateLatency(). See Overriding Latency
Calculation.
double GetSampleRate() const: Get the sample rate.
double GetTimeStep() const: Get the time step.
double GetStartTime() const: Get the start time.
Analytic signal is naturally associated with timing information — it requires time stamp to obtain the real
baseband form or to convert to another characterization frequency. As a result, EnvelopeCircularBuffer is
designed to inherit from TimedCircularBuffer in order to access the timing information. For the same
reason, models that use envelope signal are usually inherited from AgilentEEsof::TimedDFModel.
The computational behavior such as overflow, quantization, effect of integer word length
(which could be negative or larger than word length) is similar to that of SystemC TM 2.2 .
SystemVue also provides an arbitrary precision fixed point data type
AgilentEEsof::FixedPointValue. The data stored in AgilentEEsof::FixedPointValue does
not lose bit-width precision and/or location of binary point i.e. no overflow or quantization
handling is performed on an object of AgilentEEsof::FixedPointValue.
Warning
An object of AgilentEEsof::FixedPoint and AgilentEEsof::FixedPointValue cannot be used as an input or an
output, use AgilentEEsof::FixedPointCircularBuffer or AgilentEEsof::FixedPointCircularBufferBus instead.
AgilentEEsof::FixedPoint Constructors
The AgilentEEsof::FixedPoint provides
AgilentEEsof::FixedPoint Mutators
The AgilentEEsof::FixedPoint provides following mutators to set fixed point parameters
where
368
SystemVue - Users Guide
eSgin could be FixedPointEnums::TWOS_COMPLEMENT OR
FixedPointEnums::UNSIGNED .
qm specifies the quantization mode, possible values are. Note that
"FixedPointEnums" is a nested namespace inside AgilentEEsof namespace
(AgilentEEsof::FixedPointEnums)
FixedPointEnums::ROUND - Rounding to Plus infinity.
FixedPointEnums::ROUND_ZERO - Rounding to Zero.
FixedPointEnums::ROUND_MINUS_INFINITY - Rounding to Minus infinity.
FixedPointEnums::ROUND_INFINITY - Rounding to infinity.
FixedPointEnums::ROUND_CONVERGENT - Convergent rounding.
FixedPointEnums::TRUNCATE - Truncation.
FixedPointEnums::TRUNCATE_ZERO - Truncation to zero.
om specifies the overflow mode, possible values are. Note that "FixedPointEnums" is
a nested namespace inside AgilentEEsof namespace (AgilentEEsof::FixedPointEnums)
FixedPointEnums::SATURATE - Saturation
FixedPointEnums::SATURATE_ZERO - Saturation to Zero.
FixedPointEnums::SATURATE_SYMMETRICAL - Symmetrical saturation.
FixedPointEnums::WRAP - Wrap-around.
FixedPointEnums::WRAP_SIGN_MAGNITUDE - Sign magnitude wrap-around.
nb is used to provide number of saturation bits for FixedPointEnums::WRAP and
FixedPointEnums::WRAP_SIGN_MAGNITUDE Overflow modes.
where
AgilentEEsof::FixedPointValue
SystemVue also provides an arbitrary precision fixed point data type
AgilentEEsof::FixedPointValue. The data stored in AgilentEEsof::FixedPointValue does
not lose bit-width precision and/or location of binary point i.e. no overflow or quantization
handling is performed on an object of AgilentEEsof::FixedPointValue. The objects of
FixedPointValue and FixedPoint works seamlessly for all binary operations except bitwise
operations such as AND (&), OR(|), XOR(^) which works only with FixedPoint type. The
major difference between FixedPoint and FixedPointValue are as follows.
371
SystemVue - Users Guide
Method Description
Matrix() Constructor - creates empty matrix.
Matrix(size_t nRows, size_t nCols) Constructor - creates uninitialized nRows x nCols matrix.
Matrix(const Matrix & matrix) Copy Constructor.
~Matrix() Destructor.
void Resize( size_t nRows, size_t nCols) Resize matrix to nRows x nCols.
size_t NumRows() const Return the number of rows.
size_t NumColumns() const Return the number of columns.
size_t NumElements() const Return the number of matrix elements.
void SetMaxElements( size_t iMaxElements) Set the maximum number of elements the matrix can hold.
bool Zero() Set all elements to zero.
bool Zero(Matrix* pReference) Resize based on dimensions of a reference matrix and set all
elements of resized matrix to zero.
bool operator == (const Matrix & matrix) const Return TRUE if this matrix is equal to another one.
bool operator != (const Matrix & matrix) const Return TRUE if this matrix is not equal to another one.
Matrix& operator = (const Matrix& matrix) Assignment operator (copy contents of right hand side
operand to left hand side operand).
template <typename T2> void CopyFrom(const Copy iSize elements from address pData to this matrix.
T2* pData, size_t iSize)
template <typename T2> void CopyTo(T2* Copy the first iSize matrix elements to address pData.
pData, size_t iSize) const
T& operator() ( size_t iRow, size_t iCol) Return a reference to the matrix element at row iRow and
column iCol.
T operator() ( size_t iRow, size_t iCol) const Return the matrix element at row iRow and column iCol.
T& operator() ( size_t iIndex) Return a reference to the iIndex matrix element (elements
stored in column major form).
T operator() ( size_t iIndex) const Return the iIndex matrix element (elements stored in column
major form).
Matrix& operator-() Negate matrix.
template<typename S> Matrix& operator+= (S Add scalar to each matrix element.
scalar)
template<typename M> Matrix& operator+= Matrix addition.
(const Matrix<M>& matrix)
template<typename S> Matrix& operator-= (S Subtract scalar from each matrix element.
scalar)
template<typename M> Matrix& operator-= Matrix subtraction.
(const Matrix<M>& matrix)
template<typename S> Matrix& operator*= (S Multiply each matrix element with a scalar.
scalar)
template<typename T2> Matrix& operator*= Matrix multiplication.
(const Matrix<T2>& matrix)
bool diagonal(T data) Make this matrix a diagonal one with all diagonal elements
set to data.
bool identity() Make this matrix an identity one.
T* GetBuffer() Get access to the internal storage array. Matrix elements are
stored in column major form.
const T* GetBuffer() const Get access to the internal storage array (const version).
Matrix elements are stored in column major form.
void Swap(Matrix* pMatrix) Swap contents with another matrix.
In addition, the following matrix related functions are defined in the AgilentEEsof
namespace:
372
SystemVue - Users Guide
Function Description
template <typename M1, typename M2, typename M3> Matrix<M1> Return sum of matrices mx1 and
operator + (const Matrix<M2> &mx1, const Matrix<M3> &mx2) mx2.
template <typename M1, typename M2, typename M3> Matrix<M1> Return sum of matrix mx1 and
operator + (const Matrix<M2> &mx1, const M3 &mx2) scalar mx2.
template <typename M1, typename M2, typename M3> Matrix<M1> Return sum of scalar mx2 and
operator + (const M3 &mx2, const Matrix<M2> &mx1) matrix mx1.
template <typename M1, typename M2, typename M3> Matrix<M1> Return difference of matrices mx1
operator - (const Matrix<M2> &mx1, const Matrix<M3> &mx2) and mx2 (mx1 - mx2).
template <typename M1, typename M2, typename M3> Matrix<M1> Return matrix mx1 minus scalar
operator - (const Matrix<M2> &mx1, const M3 &mx2) mx2.
template <typename M1, typename M2, typename M3> Matrix<M1> Return scalar mx2 minus matrix
operator - (const M3 &mx2, const Matrix<M2> &mx1) mx1.
For more details see comments in the shipped header file Matrix.h.
SystemVue envelope signal can represent EITHER a real signal x(t) OR an analytic
signal xc(t) exp(j 2 π fc t) (which is equivalent to a complex envelope signal xc(t) with
associated constant fc). The choice of representation is based on the characterization
frequency fc associated with the envelope signal.
If fc = 0, SystemVue treats the envelope signal as a real signal x(t). If fc > 0, SystemVue treats the
envelope signal as an analytic signal xa (t) = xc(t) exp(j 2 π fc t) (or equivalently a complex envelope
signal xc(t) with associated fc).
For more detailed discussion about SystemVue envelope signal, we refer the users to
Envelope Signal (sim).
374
SystemVue - Users Guide
Sub-Network Models
A sub-network model is used to abstract a model or group of models to something easier
to use and manage from a users perspective. This type of model hides implementation
details that may confuse the user or distract from the readability of a simulation topology.
For example, a user may want to simulate the effects of a non-linear filter. Models exist
for filters and non-linear blocks. However, there is no non-linear filter model. A new sub-
network model can be created out of the two existing models. The parameters from these
two models can be abstracted to only reveal parameters that user would be interested in
entering for this type of sub-network model.
PartList
Schematic
Equations
Parameters
Notes
All of these attributes are interrelated except for the Notes which serve as documentation
or help for the Sub-Network model.
Or
375
SystemVue - Users Guide
1. Right click on a folder in the workspace tree to bring up the right click menu.
2. Select the 'Add >' submenu.
3. Select the 'Designs >' submenu
4. Now select 'Add User Model...'
5. The design will be added under the folder that was initially right clicked
Note
If you create the new design in the wrong folder, simply drag it to the folder of interest.
Validation Types
376
SystemVue - Users Guide
Type Comment
Floating point 1.0, 1e-6, etc. are valid entries
number
Warn if negative Posts a warning if the value is < 0
Warn if non- Posts a warning if the value is < 1
positive
Positive integer Only numbers like 1, 2, 3, ... are allowed
<None> No validation will be performed
Text The parameter is a string; any text is valid
Warning Always generates a warning
Error if negative Posts an error if the value is < 0
Error if non- Posts an error if the value is < 1
positive
Error Always generates an error
Filename Brings up a browse button for file selection as well option for manual a text entry
Integer Any integer value
Complex number Complex number in RI MathLang syntax, e.g. X + j*Y. Real and integer values supported
by default
Integer array Fully defined MxN array of integers with comma delimited columns and semi-colon
delimited rows
Floating point Fully defined MxN array of integer or real numbers with comma delimited columns and
array semi-colon delimited rows
Complex array Fully defined MxN array of integer, real or complex numbers with comma delimited
columns and semi-colon delimited rows
Enumeration Allows definition of arbitrary user-defined labels and options for assigning values to the
parameter of interest
Note
An array parameter may be specified as a scalar number without any delimiters as in MyArray0=2.345. It
may be a one-dimensional vector as in MyArray1=[2, 3, -4].
Two-dimensional arrays are specified row over column as MyArray2=[1, 2, 3; 4, 5, 6] where the first
three parts form the first row.
Higher dimensions are created by appending nested versions of 2-D representations separated by semi-
colons e.g.
MyArray3=[[1, 2; 3, 4; 5, 6]; [-1, -2; -3, -6; -5, -4]].
This is a 3-D array consisting of 2 separate 3x2 2-D arrays such that matrix size is 2x3x2.
The process of defining an enumerated parameter starts with the selection of this
validation type followed by selection of the context sensitive Edit Enumeration button
which appears adjacent to the other parameter editing buttons. Clicking this button will
invoke the Enter List of Enumerated Parameter Values dialog box.
377
SystemVue - Users Guide
an existing library, or a newly created enumeration library, name and description.
Upon accepting the enumeration list, the corresponding drop-down menu is created under
the Default Values column for this parameter in the main Parameter tab. Note that the
first entry of the enumeration table will be treated as the initial default value regardless of
the state number associated with it. In this example, the first entry was 1:Inverting
Behavior, which despite its state number being 1, not 0, was picked as the default in the
Parameters main tab. The user can set a different default state prior to leaving this tab.
The final column of the Parameter entry table allows the user to set up Boolean conditions
for establishing a clean functional approach to parameter definitions - by allowing
conditional deactivation and hiding of parameters.
MathLang (algorithm) syntax can be used to set up conditions of indivisibility of one
parameter based on current values assigned to other parameters.
One example is shown in the Amplifier part of the Algorithm Design library. This built-in
component has a total of 11 parameters as shown in the model view which can be
imported from the library into any workspace.
Observe that the parameters TOIout, dBc1out, PSat, GCSat, RappS and GComp all have
conditions of inactivity defined based on the value of GCType. For instance, TOIout is to be
hidden and its assigned value ignored if GCType is not in the set {1, 3, 4, 6}. The
378
SystemVue - Users Guide
corresponding behavior can be observed when placing an instance of the part on a
schematic and invoking its Properties dialog box.
Setting GCType to a non-member e.g. 2:1dBc hides the parameter from view even on the
Properties table.
Note
Defining Hide Conditions refers strictly to the table view of parameters and not the visibility of selected
parameters on the schematic. Parameters that are hidden by condition are barred from schematic display
even if they had the Show button checked prior to concealment.
As you simulate this design in the workspace, the default parameter values will be used in
the simulation. When you use this design as a model in a part, the part parameters
override these default parameter values.
When a simulation is run, a model tree is instantiated that corresponds to the topology of
the network you are simulating. This is called the run-time hierarchy. In contrast, when
you are editing designs in the workspace, you are working in design-time. The difference
will become apparent shortly.
Each part in your top level design references a model, and an instance of that model is
created and set as a "child" of the top-level design when a simulation is run. If one of
these children corresponds to a subnetwork model, then each model inside the
subnetwork design is instantiated as well, recursively. It is easy to see why this sort of
instantiation is necessary - you can have two parts in your top-level design that point to
the same model, and they may have different values for their parameters.
Suppose we have a workspace as shown here (ie. this is the design-time hierarchy):
and suppose that TopLevel contains 2 instances of SubNetwork, ie. TopLevel has 2 parts
called Part1 and Part2 whose models are both "SubNetwork". When you run a simulation
on TopLevel, the following run-time model hierarchy is constructed:
Note that the Equations and Parameters of TopLevel are visible to the model instances of
Part1 and Part2, but only at run-time!
It is important to note that when you are looking at the design called SubNetwork (ie. in
design-time), and in its schematic you are using parameters defined in the Parameters tab
of SubNetwork, the values you see at design-time will correspond to the "Default" values
of the parameters as defined in the Parameters tab. This is because you are editing the
Model called SubNetwork, but that model can be instantiated many times in your top-level
network, and each instance can have different values for the parameters. Since you are
editing the design-time model, it has no way of knowing what the values passed to it will
be at run-time, and thus just shows the default values that are defined at design-time.
380
SystemVue - Users Guide
Creating a MetaSystem
To create a MetaSystem, click/drag the mouse to outline the tokens to be included in the
new MetaSystem and then select Tokens|Create MetaSystem from the menu or click the
Create MetaSystem button on the toolbar. The selected subsystem will be represented by
a single MetaSystem token like token 3 on the picture. As you can see, it has become an
equivalent of a sub-network with one input port and one output port.
When preparing a subsystem for import into SystemVue you need to leave stimulating
sources and all the sinks out of the MetaSystem. Those connections will become ports
which will allow you to place it within your SystemVue design. Of course, the whole
MetaSystem could be a signal source in which case it would only have output connections.
MetaSystems are automatically saved with the parent system file (svu), and may also be
saved to a separate file.
Only connected MetaSystem inputs and outputs are translated into the APG inputs and outputs.
Therefore you must connect even the optional inputs and outputs before you create an APG DLL - if you
want those inputs and outputs to be available in the resulting model.
APG Setup
Select Tools|Auto Program Generation (APG)|Build MetaSystem DLL from the menu and
then click on the MetaSystem token. The following APG dialog window will appear.
381
SystemVue - Users Guide
The Comments field is helpful for annotating your APG. The comments can be
entered directly or imported from a text file.
Click on the Select Output File button to select the name and folder for the APG DLL.
Make sure to uncheck the Auto Replace MetaSystem checkbox.
Click on the Label DLL I/O Ports button to identify the input and output connections.
By default the labels indicate which tokens within the main design they are connected
to.
Click Finish to begin the build process. If successful, at the end you will see a
message with the location of your APG DLL.
If you forgot to uncheck the Auto Replace MetaSystem checkbox, the APG will replace your original
MetaSystem. Select Edit|Undo from the menu to restore it.
Very rarely you might see APG fail with a message "Cannot create APG SVA file." To troubleshoot,
launch APG Setup again and click on the Select Output File button to select a different name for your
APG. If the APG must have the same name, you need to save your system, then exit and restart
SystemVue 2007.
Supported C Compilers
SystemVue 2007 APG Option requires a compatible Microsoft C compiler. Two supported
compilers are
These compilers require the use of Custom APG Build as described below.
The C source files are named ~apgtmp.c and ~apgtmp1.c. They are not human
readable.
The module definition file is named ~apgtmp.def.
The two APG libraries are named ApgLibPC.lib and ApgUtlPC.lib. They were
created using Microsoft Visual C++ .NET, which limits the available linking options.
The DLL being built should be named ~apgtmp.dll.
You may want to append the compiler output to APGBUILD.LOG.
382
SystemVue - Users Guide
In addition to setting the enviroment for the compiler, you may need to add include
directories using /I option and list additional libraries for the linker. Please see the
Microsoft Visual C++ User's Guide for details on using the command line compiler.
For example, this script works with Microsoft Visual C++ 2008 Express Edition.
Computing rate ratios for a multi-rate system can be a challenge. A Math Language
(users) script can assist you with this task.
383
SystemVue - Users Guide
System Rate is the SystemVue 2007 system sample rate. This is the sample rate of
the time based simulator that runs inside the model. The default value is the variable
Sample_Rate which represents the sample rate of the data flow simulator.
The multi-rate properties of the subsystem must be expressed as integer ratios.
Therefore an integer is assigned to the System Rate and each of the inputs and
outputs of the subsystem. For instance, if the token rate of the MetaSystem input is
the same as the system sample rate but the token rate of the output is 1/3 of the
system sample rate, then the System Rate Ratio and the input Rate Ratio could both
be 3, and thus the output Rate Ratio would be 1. Note that the rate ratios can be
entered as formulas or variables computed using a Math Language (users) script.
Temperature is only used if your subsystem contains tokens dependent on thermal
noise.
After you click OK the APG sub-network model (users) will be placed on the Workspace
Tree (users).
You can also create a library of these models - simply right click and select Copy To from
384
SystemVue - Users Guide
the popup menu.
The part must be properly connected according to its multi-rate properties. You will
probably want to set the system rate in the Data Flow Analysis (sim) in order to obtain
results compatible with the SystemVue 2007 simulation.
Since SystemVue uses a different random number generator, your SystemVue 2007 simulations that have
random signal and noise sources may not produce exactly identical results even when the random seed is
fixed.
The APG DLL is used during the simulation run, so it must remain in the same location.
Continuing Development
You don't have to abandon your SystemVue 2007 design after importing it into
SystemVue. As long as the number of inputs and outputs and their multi-rate properties
remain the same, you can go back to modify the MetaSystem - change parameters and
even add new tokens - and then simply re-generate the APG, overwriting your old DLL.
You don't even have to close the SystemVue session - just make sure the simulation is not
running. Your SystemVue design will continue working.
If you change the number of inputs or outputs or their multi-rate properties, you will need
to re-import the APG DLL and modify your SystemVue design accordingly.
385
SystemVue - Users Guide
The X-parameter model is a generalized circuit model that includes nonlinear effects.
The data for this model is contained in a Generalized MDIF file. A non-linear circuit
simulation technique called Harmonic Balance is needed to make sense of X-parameter
data.
Validation Limits
1. Spectrasys simulation using single X-parameters part with single tone or 2-tone
stimulus has been compared with equivalent simulation in ADS, all results are
consistent.
2. Spectrasys simulation using cascaded X-parameters parts with single tone or 2-tone
stimulus has been compared with equivalent simulation in ADS, results are consistent
with reasonable (negligible) difference (e.g. less than a few tenth of a dB at
fundamental frequency and can be slightly higher for mixing terms < -50dBm) due to
the difference in underlying computational algorithms (e.g convergence criteria).
Performance Limits
If simulation speed becomes an issue (most likely due to convergence), use Circuit_Link
(rfdesign) with X_parameters part to control the convergence criteria directly.
Operational Limits
Caution
Currently, X-parameter models are not allowed in the LO chain for RF LINK simulations only.
Noise
Note
Currently, the X-parameter parts do not support self generated device noise. However, any external noise
appearing at the X-parameter ports will be amplified by the small-signal gain specified in the X-parameter
file.
Caution
If the characterizing tones are not swept in frequency or power there will be noting to interpolate or
extrapolate since all frequency and power levels will appear to be constant.
Note
Highest accuracy will only be achieved when the X-parameters are extracted with the exact number of
carriers, frequencies, and power levels of interest.
During an X-parameter simulation all input carriers are sorted by power level. The largest
input signal maps to the 1st X-parameter tone and the 2nd largest input signal maps to
the 2nd X-parameter tone, etc. until all the large signal tones have been mapped. For
example, if an X-parameter file was characterized with two tones, the first one fixed in
frequency and power, and the second swept in power and frequency then during the
simulation the largest power input tone would map to the fixed X-parameter tone and the
next input carrier would map to the swept characterizing tone.
Caution
If the X-parameter file was only characterized with one tone and two tones are being used in the
simulation the resulting simulation will be a one tone large signal analysis with a single small signal not
the traditional two tone analysis.
Note
Neither datasets nor any other type of workspace tree object is created during this automatic import
process. X-parameter file data is cached to improve simulation performance.
Caution
Using *File > Import > GMDIF File ... will import a generic GMDIF file and create a dataset on the
workspace tree. However, X-parameter files imported in this manner will not be used during an X-
parameter part simulation.
For more information on the X-parameter file format see X-parameter GMDIF Format
(users).
387
SystemVue - Users Guide
Select the X-Params part from the part selector located in the RF Design library.
Note
When the X-Params model is placed the schematic symbol contains no pins. This is because the X-
parameter file has not yet been selected (and of course, has not been read); the number of ports cannot
be determined until the file is actually read.
388
SystemVue - Users Guide
At this time the number of ports is resolved and the schematic symbols changes
appropriately because a specified X-parameter file has been selected.
Also, one or two additional (optional) tab pages may appear: A User Parameters tab may
appear, if the X-parameter file has any User Variables defined.
These parameters are defined by the file. You may NOT add, delete, or rename the User
Variables, but you can change their values to any floating point number. (Equations are
not permitted for values.)
A Details page displays a summary of the info from the X-Paramters .mdf file.
389
SystemVue - Users Guide
For more information on the X-Params model properties see X-Parameter Part (rfdesign).
Add an Analysis
Add the desired analysis.
Caution
If the X-parameter file has been characterized with a single DC voltage the internal interpolation and
extrapolation algorithms can only use this single bias point so all interpolated or extrapolated DC bias
voltages will all be at the same DC bias voltage. Consequently, specifying a DC bias voltage on the part
becomes irrelevant.
Note
Highest circuit simulation accuracy will be achieved when all circuit level components such as X-
parameters are placed together in a single Circuit Link component. Complex circuit level interactions
between cascaded circuit components may be missed in during the system simulation.
This bridge points to a design and contains parameters most often needed to control
circuit level convergence criteria. A nonlinear circuit simulation technique called harmonic
balance uses this criteria to simulate the linear and nonlinear characteristics of the circuit.
These results are passed to the Spectrasys for spectral creation and path measurement
calculations.
Caution
The accuracy of cascaded circuit components will be increased when all circuit level components are
combined in a single Circuit_Link (rfdesign) component.
Note
Since the link uses a one tone characterization technique then the first tone in the X-parameter file should
also be swept to include frequency response. If a two or more tone X-parameter file is used and the first
tone is NOT swept then the frequency response will be constant.
Convergence Issues
The X-parameter model is a circuit level component. A non-linear circuit simulation
technique called Harmonic Balance is needed to make sense of X-parameter data. Under
high nonlinear conditions harmonic balance may be unable to converge to an accurate
solution. In these cases, convergences parameters can be tweaked to optimize
convergence for the given circuit problem.
By default when XPARAMS models are combined with system behavioral models in the
same design each of the XPARAMS models will use the same generic default convergence
criteria. This model provides no mechanism for the user to change the convergence
391
SystemVue - Users Guide
criteria. When XPARAMS model(s) are placed in a Circuit_Link (rfdesign) design the the
entire design will all have common convergence criteria that can be controlled by the user.
Theory of Operation
Traditional S-Parameters
At high RF frequencies terminal voltages and currents are difficult to measure. Scattering
parameters, or S-parameters are ratios of power flow amplitudes and phases in a circuit
which are much easier to measure at these frequencies. However, S-parameters only
characterize the linear behavior of RF devices.
X-Parameter Basics
Unlike S-parameters, X-parameters characterize the linear and non-linear circuit behaviors
of RF components in a more robust and complete manner. In effect, X-parameters are the
mathematically correct super-set of S-parameters, applicable to both large-signal and
small-signal conditions, for linear and nonlinear components. X-parameters are cascade-
able just like S-parameters so higher levels of integration can be simulated or
characterized.
A simplified non-linear output spectrum from a single input spectrum is shown in the
following figure.
The incident waves A1 and A2 and the resultant reflected B1 and B2 waves are shown for
a simple nonlinear 2 port device.
392
SystemVue - Users Guide
X-parameter data can either be extracted by special network analyzers such as Agilent's
NVNA network analyzer or specialized simulation software such as Agilent's Advanced
Design System (ADS). When an X-parameter file is extracted from a nonlinear device the
user must supply the following extractions parameters and boundaries:
Notation:
Extracted Data
Specialized hardware or simulation software extracts a text file containing the dependent
data based on the independent input parameters listed in the prior section. The extracted
output consists of several pieces of information for each input carrier. Every port is
examined across a specified range of harmonics of the input carriers. Each piece of the
contributing resultant output spectrum is characterized and saved in the extracted file.
Examining the Reflected B 2 spectrum for the 1 characterizing input tone we get:
394
SystemVue - Users Guide
To account for large and small signal effects a 'Quasi-Linear' system is created by
internally generating a small signal at frequencies slightly different than the characterizing
carrier frequencies. These small signals combined with the large characterizing signals
produce new frequencies. By linear superposition the output frequencies and amplitudes
can be determined for all small signal inputs in a real system.
The following figure illustrates the resulting spectrum from a single large signal
characterization tone and small signal at the input.
395
SystemVue - Users Guide
396
SystemVue - Users Guide
X – Zoom – use the zoom tool (zoom to mouse rectangle)
Z – Zoom to fit – Maximize the view
Tab – Select the next marker.
Shift+Tab – Select the previous marker.
Enter – Bring up the Marker Properties window. If no marker is selected, it brings up
the Graph Properties instead.
Delete – Delete the currently selected marker.
Shift+Delete – Delete all markers (you are asked to confirm the deletion before
deleting the markers).
Arrow Keys – The up, down, left, and right arrow keys have several functions,
based on the currently selected marker's style.
Standard Marker – Move the reference frequency left or right on the graph.
Peak Marker – Move to the next peak (if any).
Valley Marker – Move the marker to the next valley (if any).
Bandwidth Marker – Move the relative markers to increase or decrease the
bandwidth. This changes the delta values of the child relative markers, so each
arrow key action does not always move the marker by a single data point.
Delta Marker – Increase or decrease the relative delta. This changes the dB
Down value of the marker, so each arrow key action does not always move the
marker by a single data point.
Ctrl+Arrow Keys – Pan (scroll) the chart up, down, left, or right.
Shift+Arrow Keys – Move the marker up or down to the next trace on the graph (if
any).
Ctrl+Shift+S – Change the current marker's style to Standard.
Ctrl+Shift+P – Change the current marker's style to Peak.
Ctrl+Shift+V – Change the current marker's style to Valley.
Ctrl+Shift+B – Change the current marker's style to Bandwidth.
Ctrl+Shift+L – Change the current marker's style to Delta Left.
Ctrl+Shift+R – Change the current marker's style to Delta Right.
LiveReport Keystroke Commands
A – All Zoom - zoom to page
P – Pan - use the pan (scrolling) tool
X – Zoom - use the zoom tool (zoom to mouse rectangle)
W – Zoom to Width
Z – Zoom to fit - Maximize the view
Tab – switch to next window
Shift+Tab – switch to previous window
1, 2, 3, 4, 5, ... – switch to nth window (zooms to fit specified window)
Schematic Keystroke Commands
Enter – Bring up part properties or place parts moved using the arrow keys
A – Places an adder (Add)
B – Bits (Source: Bits)
C – Const (Source: Const)
D – Delay
Shift+D – DownSample
G – Gain
I – DataPort (input)
M – MathLang
O – DataPort (output)
P – Use the Pan (scrolling) tool
R – Ramp (source)
S – Sink
Shift+S – SineGen
U – Upsample
W – 90 degree WIRES (Shift+W for any angle wires)
Shift+W – Angled WIRE
X – Zoom - use the zoom tool (zoom to mouse rectangle)
Z – Zoom to show all parts (zoom to fit)
Shift+Z – Zoom to show all parts (with extra margin)
* – Mpy (multiply)
F4 – Rotate the text origin of part parameters
397
SystemVue - Users Guide
If the schematic has RF (Spectrasys) parts on it, the following key / part associations are
used.
Enter – Bring up part properties or place parts moved using the arrow keys
A – Places an ammeter (CURRENT_PROBE)
B – BLOCK (two-port)
C – CAPQ (capacitor with Q)
Shift+C – CAPACITOR (ideal)
G – GROUND
I – INPUT Port
L – INDQ (inductor with Q)
Shift+L – INDUCTOR (ideal)
O – OUTPUT port
P – Use the Pan (scrolling) tool
Q – SQUARE_BLOCK (attached to a design)
R – RESISTOR
S – SIGNAL_GROUND
V – Voltage TEST_POINT
W – 90 degree WIRES (Shift+W for any angle wires)
Shift+W – Angled WIRE
X – Zoom - use the zoom tool (zoom to mouse rectangle)
Z – Zoom to show all parts (zoom to fit)
Shift+Z – Zoom to show all parts (with extra margin)
F4 – Rotate the text origin of part parameters
1, 2, 3, ..., 0 – Place 1-port, 2-port, ..., 10-port
398
SystemVue - Users Guide
Appendix B - Menus
Action Menu (users)
Edit Menu (users)
Equations Menu (users)
File Menu (users)
Graph Menu (users)
Help Menu (users)
LiveReport Menu (users)
Notes Menu (users)
PartList Menu (users)
Schematic Menu (users)
Scripts Menu (users)
Tools Menu (users)
View Menu (users)
Window Menu (users)
Action Menu
Use this menu to calculate variables or to access the Create Part, Design, or Source
wizards.
3. Show Line Numbers – Shows / hides line numbers in the equations window.
4. Show Folding – Shows / hides the folding bar in the equations window (next to line
numbers). When enabled, the folding bar can be used to expand/contract blocks of
code, such as if / then / else sections.
5. Equation Wizard – Runs the Equation Wizard.
6. Run Equations – Executes the equation block.
7. Show Equation Errors – Helps diagnose equation errors.
8. Snapshot – Create a dataset with static variables that capture the current state of
the equation block. Use it save reference variables, such as when the equation block
is dependent on an analysis that gets re-run and you want to keep around old results
in the workspace.
9. Properties – Shows the Equation's Properties dialog box
File Menu
Use this menu to open, close, save, or print designs. You can also import or export files,
and exit.
400
SystemVue - Users Guide
1. New – Close the current workspace and open a new workspace. If you select the
Allow Multiple Open Workspaces option on the General Global Options page, the
current workspace remains open.
2. Open – Opens a new workspace.
3. Close Workspace – Close the current workspace.
4. Save – Save the current workspace. If the current file has not been previously
saved, you will be prompted for a file name.
5. Save As – Save the current workspace into a new file.
6. Save All Workspaces – Save all loaded workspaces.
7. Page Setup – Select printer and settings.
8. Print – Print the active window.
9. Export – Display a submenu allowing access to all of the Export options.
Bitmap (Active Window) – Export the active window.
Bitmap (Entire Screen) – Export the entire screen, including any applications
outside the window.
XML File – Export the published properties to an XML file.
10. Import – Display a submenu allowing access to all of the Import commands.
M-File – Import an M-file.
Directory of M-Files – Import all M-files in a directory
S-Data file - Import an S Parameter file in Touchstone format.
SPICE File – Import a SPICE file.
XML – Import an XML file.
CITI File – Import a Common Instrumentation Transfer and Interchange (CITI)
file.
11. Send as Email – Send the current workspace as an email attachment using your
email program.
Graph Menu
Use this menu to specify various graph settings. To open: Click the Graph button on the
menu. (This menu appears only when a graph window is active.)
1. Show Vertex Symbols – Show or hide the vertex symbols on the trace.
2. Marker Values On Right -- Place marker values on the right of the graph.
Show Vertical Marker Lines – Show or hide the vertical marker lines.
401
SystemVue - Users Guide
3.
4. Mark All Traces -- Place markers on all traces.
5. Checkpoint -- Remove all current checkpoint traces if there are any. Create one if
there are none.
6. Marker Properties – Open the Marker Properties window.
7. Marker Style – Display a submenu allowing easy access to commonly used marker
styles.
8. Standard (Fixed Frequency) – Place a maker on the graph at the sport where you
clicked.
9. Peak – Place a marker at the highest point on the trace.
10. Valley – Place a marker at the lowest point on the trace.
11. Bandwidth – Placer a marker on the trace to indicate bandwidth.
12. Delta (On Left) – Place a marker left of the trace to indicate the relative offset
specified in the Marker Properties window.
13. Delta (On Right) – Place a marker right of the trace to indicate the relative offset
specified in the Marker Properties window.
14. Delete Marker – Delete the currently selected marker.
15. Delete All Markers – Delete all the markers on the current graph; it prompts
yes/no before actually deleting the markers.
16. Graph Properties – Open the Graph Properties window.
See Also
Graphs (users)
Types of Graphs (users)
Graph Properties (users)
Graph Toolbar (users)
Using Markers on Graphs (users)
Tables (users)
Help Menu
Use this menu to check for the latest update, get quick access to the Agilent Web site, or
get help.
To open: Click the Schematic button on the menu. This menu appears only when a
schematic window is active.
In order for the Note menu to reveal, the Notes page must be the current selected window (either open or
minimized) in the SystemVue workspace area.
PartList Menu
The PartList has a single item:
Properties – Open the Properties window.
Schematic Menu
Use this menu to set component and schematic options.
To open: Click the Schematic button on the menu. This menu appears only when a
schematic window is active.
403
SystemVue - Users Guide
404
SystemVue - Users Guide
1. Copy to Script Processor – Copies the script to the Script Processor window.
2. Run – Executes the script.
3. Properties – Shows the Script's Properties dialog box
Tools Menu
Use this menu provides access some common design tools or change the global options.
405
SystemVue - Users Guide
406
SystemVue - Users Guide
Appendix C - Toolbars
Annotation Toolbar (users)
Dataset Toolbar (users)
Equation Toolbar (users)
Graph Toolbar (users)
LiveReport Toolbar (users)
Main Toolbar (users)
Notes Toolbar (users)
Schematic Toolbar (users)
Script Toolbar (users)
Spectrasys Toolbar (users)
Annotation Toolbar
Use this toolbar to add basic drawing objects, such as lines, circles, or arrows, to a design
or to modify the selected annotations by changing the color, dashed line style, etc.
To open: Click the Annotation button ( ) from any design window toolbar, e.g.
schematic window toolbar.
407
SystemVue - Users Guide
408
SystemVue - Users Guide
15. Toggle Vertical Marker Lines – Show or hide dashed vertical marker lines at every
marker position.
16. Delete Marker – Delete the selected marker.
17. Delete all Markers – Delete all markers on the current graph.
18. Marker Properties – Display the Marker Properties window.
19. Standard Marker – drop a standard marker or convert a selected marker to
standard.
20. Peak Marker – Change marker style to Peak.
21. Valley Marker – Change marker style to Valley.
22. Bandwidth Marker – Change marker style to Bandwidth and insert two Delta
markers.
23. Delta Marker (On Right) – Place a new Delta marker on the left side of the
selected marker.
24. Delta Marker (On Left) – Place a new Delta marker on the right side of the selected
marker.
See Also
Graphs (users)
Types of Graphs (users)
Using Markers on Graphs (users)
Graph Menu (users)
Graph Properties (users)
LiveReport Toolbar
Use this toolbar to change the LiveReport and adjust its settings. The LiveReport toolbar
automatically displays when you have a LiveReport active.
To open: Click View on the menu and select Main from the Tools menu.
OR
411