[comp.binaries.ibm.pc.d] updated help file for tutsim

keithe@tekgvs.LABS.TEK.COM (Keith Ericson) (02/21/89)

Since submitting TUTSIM to Rahul I've improved the help file document.
Once again - don't blame Applied i for any misteaks in thsi file: thay
didn't creat it and arenn't responsibul for it (or them, depending on
how it all works out). -  kde

Begin TUTSIM.HLP, Second Version:








			T U T S I M   System Simulator




TUTSIM is "a program for Engineering Design and Optimization by Simulation of
continuous dynamic systems"  created by the TWENTE UNIVERSITY of TECHNOLOGY,
Enschede, The Netherlands.  Copyright 1982, 1983 by the North American
Distributor, APPLIED i.  "TUTSIM" is a trademark of APPLIED I.  The following
message is printed on the distribution diskette label:
 
	TUTSIM  IBM PC  DEMONSTRATION DISK
	Dynamic System Design Tool, By Simulation
	Copyright 1982, 1983 by APPLIED i.
	All Resale Rights reserved.  Permission is granted to copy the
	ENTIRE contents of this disk for distribution by non-profit clubs
	or non-profit private exchange.  Please mark "Copyright APPLIED i".
	Duplication of parts or individual files is prohibited.
 
As of the time of this release (approx. 1983) APPLIED i provided TUTSIM for in
IBM-PC, CP/M and APPLE formats.  TUTSIM requires 64k bytes of RAM, DOS Version
1.1 or later, CGA (or better) display, and EPSON with Graphtrax for hardcopy.
 
APPLIED i is listed on the diskette envelope as
 
	APPLIED i
	200 California Ave., Suite 214
	Palo Alto CA  94306
	(415) 325 4800
 
Current status of APPLIED i is not known to me.  I am not now nor have I ever
been associated with APPLIED i except as an intrigued user of the TUTSIM demo
system.
 
The following is merely a summary to use as a guide  in using TUTSIM, not a
program specification.  Any errors, don't blame Applied i: they didn't generate
this documentation.
 
Various trademarks apply,     Keith Ericson        Standard disclaimers apply,
You know what they are.       February, 1989        We all know what they are.




TUTSIM Command Summary
 
CS -	Change Model Structure
CP -	Change Model Parameters
CB -	Change Output Blocks and Ranges
CT -	Change Timing Data
 
SD -	Start Simulations, graphical output to Display
SN -	Start Simulations, numerical output to Display
SNP -	Start Simulations, numerical output to Printer
SP -	Start Simulations, print-plot output to Display
SPP -	Start Simulations, print-plot output to Printer
 
PD -	Proceed, output like SD
PN -	Proceed, output like SN
PNP -	Proceed, output like SNP
PP -	Proceed, output like SD
PPP -	Proceed, output like SPP
 
	The output interval may be specified following an S or a P command as
	in SD:10 which will provide one output point for each 10 calculations
 
L -	List model data to display
LP -	List model data to printer
TT -	Type timing data to display
TB -	Type output blocks and ranges
V -	Show last calculated value of a block to be specified
VP -	Like V, but output to the printer
CL -    Clear the graphics screen
GD -    Draw a grid on the graphics screen
MG -    Switch to graphics screen (return with <CR>)
HC -    Print a hardcopy of the graphics screen
DF -    Save a copy of the simulation model in a file
I -     Replace initial conditions of history blocks by outputs
A -     Abort TUTSIM and return to DOS
H -     Print the HELP message
E -     Restart
 
TUTSIM FUNCTION BLOCK
~~~~~~ ~~~~~~~~ ~~~~~
Tutsim models are built of interconnected function blocks.  A "GENERIC" function
block would assume the following form:
 
 
			   |   Parameters
			   |   param1, param2,..,paramN
			   V
INPUTS:		+-----------------------+
   i1	------->|			|
   i2	------->|	GENERIC		|
	   .	|			+------> Output, U(t)
	   .	|			|
   iN	------->|			|
		+-----------------------+
 
Source functions blocks (CON (constant), NOI (noise), PLS (pulse)) and the TIM
(time) blocks take no inputs.  Most of the other function blocks require at
least one input.
 
Not all function blocks require parameters.  Parameters are entered during
"Parameter Entry" or "Parameter Change" operations; unspecified parameters
default to zero in almost all cases.


 
ENTERING THE MODEL
~~~~~~~~ ~~~ ~~~~~
Model entry from the keyboard is initiated by responding with a "K" to the
initial "INPUT FROM?" query (or after giving the "E" command).  A Model consists
of an interconnected system of function blocks (the "structure"), the function
block parameter specifications, output block and timing specifications.  You
will be prompted for each of these functions in that order in what is known as
the "Console Model Entry Dialog."
 
STRUCTURE ENTRY
~~~~~~~~~ ~~~~~
You are first prompted for the Structure of the Model, specifying the blocks
used and their interconnection(s).
 
The format is
 
	BlockNumber, BlockName, InputBlocksList
 
BlockNumber is a user-specified number (integer) assigned the function block
being added to the model. Note: Block 0 (zero) is reserved and unavailable for
user specification.  It is the simulation timing information.
 
BlockName specifies the current block as one of the Tutsim function blocks.
(See summary/description, below.)
 
InputBlocksList is a comma-separated list of block numbers whose outputs
comprise this block's inputs.  With most blocks the inputs are summed to provide
the block's input value; a negative block number serves to negate (that is, it
inverts, or multiplies by -1) the output from that block prior to the input
summation.
 
Blocks are deleted by entering
 
	BlockNumber,D
 
Blocks are replaced by entering a new block specification for an existing
BlockNumber.
 
Structure entry is terminated with a <CR>-only line.
 
MODEL PARAMETERS
~~~~~ ~~~~~~~~~~
After entering the structure you're prompted for the parameters of each the
function blocks.  The format is
 
	BlockNumber, ParameterList
 
ParameterList is a comma-separated list of values to be assigned to the
respective parameters of block BlockNumber.  To review the parameters for a
given block enter just the BlockNumber and no paramters.
 
Undefined parameter values assume a value of zero (0). This is usually not a
problem, but in the case of ATT (attenuators) the result will be a division by
zero, not a "good thing."
 
When entering or changing parameters the current block parameters can be
reviewed by entering the BlockNumber (only) followed by a <CR>.
 
Parameter entry is terminated with a <CR>-only line.


 
PLOT BLOCK AND RANGES
~~~~ ~~~~~ ~~~ ~~~~~~
Following parameter entry you'll be prompted for the Plotblocks and Range
Information, specifying which block outputs are to be plotted and the scale
factor for each.  Tutsim prompts for the X-axis (usually the time axis)
beginning and ending points and also prompts for as many as four (4) Y-axis
outputs per run.  Block 0 is an implied output reserved for the time scale;
assign its output to X1 and provide the t-min and t-max parameters to specify
the time-axis beginning and ending values.  (The display can be saved and
"overdrawn" on subsequent runs, if desired; but there are only four colors
available.)
 
The format for specifying a plot block and range is
 
	BlockNumber,PlotMinimum,PlotMaximum
 
When changing plot blocks and ranges you can review the current specifications
by entering <CR> to the first prompt.  Thereafter, entering <CR> will retain the
previous plot block values.  Delete a plot block specification by entering "D"
in response to the prompt.
 
A PLOTBLOCK specification dialog might look like this (first two columns, below,
only. Column 3 is not actually typed in):
 
TUTSIM           USER
PROMPT---+   +-RESPONSE-+              +---------DESCRIPTION--------------+
         |   |          |              |                                  |
         V   V          V              V                                  V
 
	X1:  0,0,200 <CR>              The X-axis is Block 0, the timing
			               information of the simulation
 
	Y1:  1,-1.,9.<CR>              The output of Block 1 is plotted and
                                       scaled from -1 to 9 on the Y-axis
 
	Y2:  3,-1.,1.<CR>              The output of Block 3 is plotted, scaled
                                       from -1 to 1 on the y-axis
 
	Y3:  4,0,20<CR>                The output of Block 4 is plotted, scaled
                                       from 0 to 20 on the y-axis
 
	Y4:  <CR>                      the PLOTBLOCKS dialog is terminated
 
 
TIMING INFORMATION
~~~~~~ ~~~~~~~~~~~
Finally, you're prompted for the Timing Information to specify the stepsize and
total simulation time.  Format is
 
	Delta,FinalTime
 
The ratio of FinalTime/Delta determines the number of calculations. Too small of
a ratio can lead to instability in the computations due to inexact integrations:
a reasonable ratio is 500.  Then try doubling the ratio until successive runs
show no differences greater than an acceptable limit.
 
When changing the timing information, review the current values by entering
<CR>; you must enter a pair of values to terminate the timing information input
(type in the old ones to retain them).


 
RUNNING THE SIMULATION
~~~~~~~ ~~~ ~~~~~~~~~~
When the model structure, function block parameters, plot information and timing
information have all been entered TUTSIM returns to command mode.  You can now
run the simulation, save the model description (to disk file), or modify the
model structure, function block parameters, plotblock specifications or timing
information.  (A summary of commands is available by entering "H <CR>.")
 
The simulation is initiated with one of the "S" commands (see the command
summary at the beginning of this document for the variations). The simulation
run can be interrupted (strike the spacebar) and returned to command mode.  You
can then change the model structure ("CS"), change parameters ("CP"), change the
output blocks ("CB") or change the timing specifications ("CT").  Specific
information or numerical values can be printed if desired (the "L", "T" and "V"
commands).  Finally, the run be continued with one of the "P" commands.
 
The graphics screen can be cleared with "CL"; a grid can be plotted on the
graphics screen with "GD"; the graphics screen displayed  with "MG" (return to
terminal mode with a <CR>); or the graphics screen printed to the printer with
"HC" (hardcopy).
 
The current Model specification (structure, parameters, etc) can be saved to as
disk file with the "DF" command.  You'll be prompted for a file name to be
written on the current drive/(sub)directory.
 
STARTING OVER
~~~~~~~~ ~~~~
From command mode "E" will erase the current model and allow entry of a new one,
either from a disk file or from the keyboard.
 
TERMINATING TUTSIM
~~~~~~~~~~~ ~~~~~~
From command mode "A" will abort TUTSIM and return to DOS.


 
FUNCTION BLOCKS AVAILABLE IN TUTSIM
~~~~~~~~ ~~~~~~ ~~~~~~~~~ ~~ ~~~~~~
The available Blocks are listed below, along with the number of inputs, number
of parameters, and a short description.
 
	For logical functions,	input values > 0 are TRUE
				input values <=0 are FALSE
				output TRUE = 1
				output FALSE = 0
 
	Note: "SOI" means "Sum Of (all) Inputs
===============================================================================
Name	Number
of	  of
Block	Inputs	Parameter	Function
------------------------------------------------------------------------------ 
ABS	1-40	none		Absolute value of SOI
AND	2-40	none		Logical AND of inputs
ATT	1-40	A		Attenuator: U(t)=SOI/A
FIX	1-40	none		Truncated Integer value of SOI
ORR	2-40	none		Logical inclusive-OR of inputs
ADL	1-40	Ic		Algebraic delay unit; Ic is the initial
				condition:
				U(0)=Ic      U(t)=SOI, t>0
CON	none	C		Constant; C is the output value
COS 	1-40	none		Cosine of SOI
SIN 	1-40	none		Sine of SOI
DEL 	1-40	N,Td,Ic		Delay function
				N=number of previous values stored;
				Td=time delay; Ic=Initial condition
				U(t)=Ic,        0<=t<Td
				    =SOI(t-Td), t>=Td
DIV	2	none		Divide; output is I1/I2
EUL	1-40	Ic		Integrator, using Euler integration
EXP	1-40	none		Exponentiation; output is e to the SOI power
FIO	1-40	K,T,Ic		First Order Function Block; output is
				the solution to the equation
				U(s)=K*(1/(1+sT))*SOI(s)
 
	The pole-zero plot of the FIO transfer function is
 
				| jOmega
				|
				|
		------X---------+----------- s->
		      |<---T--->|
				|
				|
 
FNC	1-40	variable,	Function block: arbitrary piecewise-linear
		2-100 pairs	function described by (x,y) pairs with
				x(i) <= x(i+1); the number of (x,y) pairs
				is specified as the last value on the
				structure input line; U(t)=F(SOI)
FND	1-40	P		Replicate an FNC block output; P is the
				original FNC block number
GAI	1-40	G		Gain block: U(t)=G*SOI
GSQ	1-40	P		Square conductance:
				U=sign(SOI)*ABS(SOI/P)^.5;
				(useful primarily in hydraulics)



FUNCTION BLOCKS AVAILABLE IN TUTSIM, Continues
===============================================================================
Name	Number
of	  of
Block	Inputs	Parameter	Function
------------------------------------------------------------------------------ 
INT	1-40	Ic		Integrator, using Adams-Bashworth
				second-order integration
LIM	1-40	Min,Max		Limiter; output is SOI restricted
				to the range (Min..Max), inclusive
LMI	1-40	Ic,Min,Max	INT function with Min..Max limiting
LME	1-40	Ic,Min,Max	EUL function with Min..Max limiting
LOG	1-40	none		natural logarithm of SOI
				(unrecoverable error if SOI <= 0)
MAX	1-40	none		output is the maximum of input values
MIN	1-40	none		output is the minimum of input values
MUL	2-40	none		Multiply; output is product of inputs
NOI	none	none		Noise; output is a uniformly distributed
				pseudo random variable in the range
				(-1..+1), inclusive
PID	1-40	K,Ti,Td,a	Proportional Derivative controller;
		Ici,Icd		U(t) is the solution to the transfer
				function
 
	U(s)/SOI(s)=K[(1/(sTi))+(1+sTd/(1+saTd)], Ti>Td, a<1
 
				This block is for use by the experienced modeler
PLS	none	T1,T2,P		Pulse generator;
				U(t)=P for T1<=t<=T2
				     0 otherwise
PWR	1-40	P		Power; output=SOI^P; SIO must be >=0;
				use MUL for integer P (faster)
REL	4	P		Relational operator; selects inputs I1,
				I2 or I3 by comparing I4 with P:
					U=I1 if I4>P
					U=I2 if I4=P
					U=I3 if I4<P
				Equality is a floating point test; enter
				P as integer and use FIX on I4 to allow
				a range of floating point values to test
				as equal.
RSQ	1-40	P		Square resistance: U=P*SOI*ABS(SOI);
				(primarily useful in hydraulics)
SPL	1-40	P		Sample and hold; P is the sampling
				interval (and should be >0):
				U(t)=SOI for t=nP, n integer
				    =U(t-1) otherwise
SQT	1-40	none		Square root; output= SOI^.5
SUM	1-40	none		Summation; output is SOI
================================================================================
		End of Documentation - Description of Tutsim Simulator