You are on page 1of 19

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/227687522

Comparison of Dynamic System Modeling


Methods

Article in Systems Engineering · June 2009


DOI: 10.1002/sys.20118

CITATION READS
S
256
15

2 authors:

A. Terry Bahill Ferenc


The University of Arizona Szidarovszky
203 PUBLICATIONS 4,588 CITATIONS University of Pécs
370 PUBLICATIONS
SEE SEECITATIONS
2,656
PROFILE PROFILE

Some of the authors of this publication are also working on these related
projects:

Tradeoff Decisions in System Design View project

Modeling the Science of Baseball View


project

All content following this page was uploaded by A. Terry Bahill on 18 June
2019.

The user has requested enhancement of the downloaded file.


Regular Paper

Comparison of Dynamic
System Modeling Methods
A. Terry Bahill* and Ferenc Szidarovszky

Systems and Industrial Engineering, University of Arizona, Tucson, AZ 85721-0020

Received 24 January 2008; Revised 26 March 2008; Accepted 26 June 2008, after one or more revisions
Published online 3 October 2008 in Wiley InterScience (www.interscience.wiley.com)
DOI 10.1002/sys.20118

ABSTRACT
This paper compares state-equation models to state-machine models. It compares continu-
ous system models to discrete system models. The examples were designed to b e at the
same level of abstraction. This paper models these systems with the following methods: the
state-space approach of Linear Systems Theory, set-theoretic notation, block diagrams, use
cases, UML diagrams and SysML diagrams. This is the first paper to use all of these
modeling methods on the same examples. © 2008 Wiley Periodicals Inc. Syst Eng 12: 183–
200, 2009

Key words: model-based systems engineering; UML; SysML; linear systems theory

1. INTRODUCTION There are two types of systems: static and dynamic.


In a static system, the outputs depend only on the
System design can be requirements based, function present values of the inputs, whereas in a dynamic
based, or model based. Model-based system engineer- system the outputs depend on the present and past
ing and design has an advantage of executable models values of the inputs [Botta, Bahill, and Bahill, 2006].
that improve efficiency and rigor. One of the earliest In computer design, these two basic types of systems
developments of this technique was Wymore’s [1993] are called combinational and sequential.
book entitled Model-Based System Engineering, al- Combinational systems do not require memory
though the phrase Model-Based System Design was in devices; hence they are called memoryless. Sequential
the title and topics of Rosenblit’s [1985] Ph.D. disser- systems require mem- ory to capture the state
tation. Model-based systems engineering depends on behavior. In combinatorial sys- tems, the output
having and using well-structured models that are depends only on the present inputs, whereas in
appro- priate for the given problem domain. sequential systems the output depends on the
sequence of previous inputs. In mechanical engi-
neering, these two types of systems are called static
and dynamic. Static systems are described with
*Author to whom all correspondence should be addressed (e-mail: algebraic equations and the outputs depend only on
terry@sie.arizona.edu; szidar@sie.arizona.edu). the present values of the inputs, whereas dynamic
Systems Engineering Vol 12, No. 3, 2009
systems are described with differential or difference
© 2008 Wiley Periodicals, Inc. equations and the system behavior depends on the
history of the inputs. This paper only considers
183 dynamic systems.
184 BAHILL AND SZIDAROVSZKY

The purpose of this paper is to compare and best with UML diagrams and others with block dia-
contrast several systems engineering methods for grams, depending on the problem and the
modeling two different types of dynamic systems and backgrounds of the engineers involved. So, although
eventually to explain systems composed of both types one system could use all of these methods, in this
of systems. paper we will discuss each method separately.
The motivation for this paper was to show how the Section 2 of this paper examines state-equation sys-
SysML diagrams fit in with traditional modeling tems and uses as an example a simple spring, mass,
meth- ods. The paper is intended to assist a modeler dashpot system. Section 3 examines state-machine sys-
in under- standing the pros and cons of different tems and uses as an example a simple spelling
modeling methods as they apply to different classes checker. Most real-world systems are modeled as
of problems. Some dynamic systems are modeled best either state- equation systems or state-machine
with state equations while others are modeled best systems. However, there are physical systems where
with state machines. State-equation systems are both types of models are useful together: for example,
modeled with differential or difference equations. For systems using water, because the heat flow equations
example, a baseball’s movement can be modeled with are different depending on whether H2O is in its
state equa- tions for position, linear velocity, and liquid, solid or gas state. Section 4 presents a problem
angular velocity all as functions of time. In contrast, where the selection of the preferred modeling
state-machine sys- tems focus less on physical approach is not clear.
variables and more on logical attributes. Therefore,
2. STATE-EQUATION SYSTEMS
these systems have mem- ory and are modeled with
finite state machines. Most digital computer systems First, we will look at an example from the field of
are modeled best with state Linear Systems Theory. In particular, we will use a
machines. method called the state-space approach.
Newton [1687] was the first to apply equations to
model and understand state-equation systems. Much 2.1. Continuous Systems
later, during World War II, the use of feedback This section is based on Szidarovszky and Bahill
produced a dramatic improvement in system design. [1998] and Ogata [2004]. Consider the mechanical
In this pe- riod, because the primary purpose of system illustrated in Figure 1. Assume an ideal
dynamic system design was to stabilize the firing of spring, mass and dashpot, and frictionless wheels.
guns on naval ships, the field was called fire control Assume initial condi- tions are zero and do a small
systems. After the war the frequency response signal analysis. Create a state-space model for this
techniques for solving differen- tial equations were system.
developed. Later, in the 1960s, the state-space In general, the systems engineer gets models from
techniques bloomed and they are still the dominant the domain experts. For this system, assume w e are
method [Szidarovszky and Bahill, 1998]. Typical given these models: fk  kx, fb  b dx/dt  bx, and
fm  ma  mx. We will use SI units: the spring constant
state-equation systems include analog comput- ers as (k) has units of N/m, the damping coefficient (b) has
well as electrical, mechanical, hydraulic, pneu- matic, units of Ns/m, and the mass (m) has units of kg.
thermal, economic, chemical and biological systems. Now, let us define the input, output and states. The
Turing [1936] was the first to model and explain force f(t) is applied to the system and it produces a
state-machine systems. His Turing Machine (a state displacement x(t). Define f(t) as the input u and the
machine with a memory) could solve all solvable se-
quential logic problems. The field came to be known displacem ent x as the output. From the diagram
as finite state machines. The digital computer is the f t  mx  bx  k x, which can be rewritten as
x 1/mkx  bx  f t). The system is of second
pre- eminent example of state-machine systems.
The methods that will be used in this paper to order, so we need to select two statevariables. Let us
choose the position x and the velocity x . So that we
model these systems include the state-space approach have
of Lin- ear Systems Theory (for both continuous and
discrete systems) [Szidarovszky and Bahill, 1998],
Wymorian set-theoretic notation [Wymore, 1993],
block diagrams, use cases, UML diagrams [OMG
UML, 2007; Fowler, 2004] and SysML diagrams
[OMG SysML , 2007 SysML, 2007].
In designing complex systems, such as an airplane
or an automobile, it might be necessary to use all of Figure 1. SpringMassDashpot system.
these methods together. Some parts might be continu-
ous while others are discrete. Some might be modeled
Systems Engineering DOI 10.1002/sys
COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 185

u  f t  input, 2.1.1. Block Diagrams


x1  x  position, Block diagrams, as shown in Figure 2, are used to
x2  x  velocity. illustrate state-equation systems [Buede, 2000].

The state equations then become 2.2. Discrete-Time Systems



x1  x 2, Unlike the previous continuous-time system, for
physi- cal systems containing computers we are only
 k b inter- ested in the system’s behavior at discrete time
x2   x1  m x2  u.
1 m m intervals. Many other physical systems can also be
For the output variable we choose modeled as discrete systems [Wymore, 1993], if we
assume a fast enough sampling rate. For discrete
y  x1  output systems, we have as a good approximation

Rewriting the state equations and the output equation xt  h  xt
in matrix form, we obtain h  Axt  But,

  0 implying that
1  0
x1  x1  
x   
k  b x
   1  u, xt  h  xt  h Axt 
 2     2   But.
 m m m  That is,
x  xt  h  I  hAxt 
y  1 0 1x .
2 
hBut,
These equations are in the
standard form of  in which case we have
x  Ax  Bu,  1 h  0
x0  0
0
y  Cx  Du xt  h   hk hb
xt   h  ut,
 
 m 1  m  
m
with
t  0.
 0 1 0
    C  1 0, D  0. yt  1 0xt,
A k , B   ,
b 1

 m m   
m If we write this as

xt  h  Px 
Qu

Figure 2. Block diagram of the SpringMassDashpot system.

Systems Engineering DOI 10.1002/sys


186 BAHILL AND SZIDAROVSZKY

and if asymptotic stability of the corresponding discrete sys-


tem for all h.
a12 We usually choose h to be small. But how small
a b 
A   11 a  , B  1 b2, should it be? Assume that  < 0. The discrete system
a21 22  
will be asymptotically stable if h is sufficiently small.
then in general Condi tion (ii) can be rewritten as
1  2h  h22  2  1, that is, h2  2  2 or
1  ha11 h < 2 / 2  2, where the right-hand side is posi-
P  ha12  hb 
, Q   1. tive.
 ha21 1  ha22 hb2 
In the case of nonlinear systems we have the same
There are also systems that are inherently discrete conclusions, except instead of the matrix A, we use
without computer control. For instance, if you bor- the Jacobian of the continuous system.
rowed B0 dollars from a bank and agreed to pay
interest of r percent per month and make n monthly 2.3. Wymorian Notation
payments of amount P, then the balance B that you
will owe can be written as Bt  h  1  rBt  Next, we can put this SpringMassDashpot system into
Pt, where h is 1 month. Wymorian set-theoretic notation [Wymore, 1993]. Wy-
more uses, for example, the symbol p2 for a
2.2.1. Stability of Continuous and Discrete Systems particular value of the second input, x2 for a
It is well known that if you start with a continuous particular value of the second state variable, and y2
system and add sensors, a digital processor, and actua- for a particular value of the next state of the second
tors to make it discrete, then the discrete system will state variable, etc. Thus, Wymore’s y is not the same
be closer to instability than the continuous system. as the output y in the above equations. Comments are
Consider a continuous system enclosed in /* markers */. Let us name the system
 Zsmd. Then
xt  Axt  But Zsmd = {SZsmd, IZsmd, OZsmd, NZsmd, RZsmd}
where
and its discrete counterpart SZsmd = RLS ^ 2, /*There are 2 state variables
and they take values from the set of real
xt  h  xt  h[Axt  But]. num- bers, R .*/
IZsmd = RLS, /*The input values will be real
For the continuous system the coefficient matrix is numbers.*/
A, while for the discrete system it is I + hA, where h OZsmd = RLS, /*The output values will be real
is the step size in the time scale. Let 1, 2, . . . , n be numbers.*/
the eigenvalues of A, then the eigenvalues of the NZsmd = {((x, p), y): x  SZsmd; p  IZsmd; y
sp ond in g
corre- discrete sy stem are 1 +  SZsmd;
h1, 1  h2, . . . , 1  hn. Assume now that if x = (x1, x2) then
    j is an eigenvalue of A. The condition for
y = [y1, y2] = [(x1 + hx2), (- hkx1/m +
asymptotic stability is that  be negative. The corre-
(1 – hb/m)x2 + hp/m)]}, /*The
sponding condition for the discrete system is that 1 
state equation. Remember p is a
h  j be inside the unit circle, which happens if
value of the input.*/
and only if 1  h2  h2  1.
RZsmd = S1Zsmd. /*The output is the first state
In summary, to be stable variable.*/

(i) for a continuous system  < 0, Please note that with Wymorian notation a system
(ii) for a discrete system 1  h2  h2  1. can be described with a dumb typewriter: It does not
require a computer, a word processor, a drawing pro-
Notice that (ii) implies (i). If (ii) is true, then gram, an equation editor, subscripts, superscripts, or
|1  h|  1, that is, –1 < 1 + h < 1, which can be even italic and boldface fonts.
written as –2/h <  < 0. However, notice that (i) does
not imply (ii). So the asymptotic stability of the 2.4. UML Representation
discrete system implies that the corresponding
continuous sys- tem is also asymptotically stable. There are no appropriate UML diagrams for state-
However, the asymp- totic stability of the continuous equa- tion systems.
system does not imply

Systems Engineering DOI 10.1002/sys


COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 187

2.5. OMG SysML Model SysML is supported by the OMG XMI 2.1 model
interchange standard for UML 2 modeling tools. It has
The OMG Systems Modeling Language (OMG
also been conceptually aligned with the ISO 10303
SysML) was created as systems engineering exten-
STEP AP233 (http://www.ap233.org/) data
sions to the Unified Modeling Language (UML).
interchange standard for systems engineering tools.
SysML reduces UML’s software-centric restrictions
SysML sup- ports model management concepts that
and adds two new types of diagrams: Requirement
include views and viewpoints, which extend UML’s
diagrams to help manage requirements, and Parametric
capabilities and are architecturally aligned with IEEE-
diagrams to help with performance and quantitative
Std-1471-2000.
analysis. SysML was designed to model large complex
The SysML can use state equations to specify con-
systems such as an automobile. Requirement diagrams
straints on properties of the system and its
are used to efficiently capture functional, performance
and interface requirements, and Parametric diagrams environment using the block definition diagram (bdd)
are used to precisely define performance and mechani- and the para- metric diagram (par) [OMG SysML,
cal constraints such as maximum acceleration, curb 2007].
weight, air conditioning capacity, and interior cabin First, we define the input and output of our Spring-
noise. SysML also enhanced the semantics and greatly MassDashpot system. The input is a flow port: energy
increased the usage of UML’s Activity diagram, Block flows through this port. It is the force applied to the
Definition diagram, and Internal Block diagram. mass. The output is the position of the mass: It is a
This section is written at the nuts and bolts level. It standard port. Inputs and outputs are often shown on
shows complete, detailed use of SysML constructs. an internal block diagram (ibd).
However, it does not present top-down descriptions of Next, we want to show the components of our
large complex systems. It does not address the massive SpringMassDashpot system. We do this in a block
concurrency and interfaces of large complex systems. definition diagram, as shown in Figure 3. The block
Most examples of large complex systems do not give a for
complete model at the nuts and bolts level. They each component can be further elaborated to shows
usually discuss the top-level and then drive down to its functions, interfaces and properties. In Figure 3,
the bottom on only a few traces: They only show we
slivers of the whole system. A nice example that spans only see examples of some of the properties of
the whole hierarchy is the Hybrid SUV example the
[OMG SysML, 2007; Friedenthal, Moore, and blocks, such as the position of the Mass. The
Steiner, 2007]. It is impossible to show a complete applied force is labeled Fixed Reference.
example of a highly complex highly parallel system. In SysML diagrams the header has four fields: the
Therefore, this paper does not discuss the hierarchy of type of diagram (in this case, bdd standing for block
systems: This paper models only simple systems, but definition diagram), the type of model element that
its coverage is com- plete. All of the examples are the diagram represents (package), the name of the
deliberately at the same level of abstraction [Mellor et model element described in the diagram (Mechanical
al., 2004; Bahill et al., 2008]. System),
and the fourth field is user defined and can, for
example,
state the purpose of the diagram (Components of
SpringMassDashpot system). The arrow with a black
diamond head indicates a composition relationship.
Table I explains the roles and abbreviations shown
in Figures 3–7.

Figure 3. Block definition diagram (bdd) showing the components of the Mechanical System.

Systems Engineering DOI 10.1002/sys


188 BAHILL AND SZIDAROVSZKY

Table I. Explanation of Role Names Now we want to show how these general equations
can be instantiated to a particular SpringMassDashpot
system. The top part of Figure 5 is based on the blocks
of Figure 3, and the bottom part is based on the con-
straints of Figure 4. The interconnections show the
bindings of the parameters.
The parametric diagram of Figure 5 shows how the
parameters from each of the equations can be
bound together to create a complex network of
equations. The constraint blocks that were specified in
the bdd of Figure 4 are bound to one another to create
Next, we want to present the constraints or a network of the state equations that bind the
equations that describe our mechanical system. parameters together. Although not explicitly shown
The bdd of Figure 4 defines the state equations in here, the parametric diagram enables the properties of
the <<constraint>> blocks. These state equations for the SysML design models, such as the spring constant
this smd Analysis Context may have originally been of the spring, to be unambiguously associated with
specified in an analysis library. This enables the same the parameters of the equations. In this way, the
equations to be reused for many different contexts. “system design model” and the “system analysis
The arrows with solid (black) diamond endings are model” can be fully integrated. The full power of this
compo- sition relationships, which means that the approach becomes apparent as many different analysis
smd Analysis Context comprises the models related to performance, reliability, mass
FirstStateEquation, the Second- StateEquation, and properties, etc. are integrated with the system design
the OutputEquation. The arrow with a white (open) model that may be defined via activity diagrams,
diamond head indicates an aggregation relationship internal block diagrams, etc.
between the smd AnalysisContext and the Each property that is constrained by the parametric
SpringMassDashpot block from Figure 3. In the pa- equations may include values, including probability
rameter lists, on the left of the colon are the distributions, with units and dimensions. The dimen-
parameters, or names as they appear in the equation, sion represents the fundamental quantity type. For ex-
and on the right of the colon are their units. ample, the width of an object may have a dimension
of

Figure 4. Block definition diagram (bdd) defining constraints for the mechanical system.

Systems Engineering DOI 10.1002/sys


COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 189

Figure 5. Parametric diagram (par) using nested part notation showing the state-space equations for a particular SpringMass-
Dashpot system.

length and units of feet or meters. The assignment of Figure 6 presents an alternative parametric diagram
units and dimensions is accomplished by typing the with the same content but a different notation. Figure
property with a value type that includes the applicable 5 uses nested part notation. For example, the
dimensions and units. A fully compliant SysML tool parameter b in the second state equation is bound to
can check to confirm the compatibility of the units and the damping- Coef, which is drawn as a box inside of
dimensions of its properties, and avoid significant is- the Dashpot, which is in turn drawn as a box inside of
sues that have occurred when the units have been im- the Spring- MassDashpot, whereas Figure 6 uses dot
properly matched. notation, which specifies the path down through the
A parametric diagram is not an equation solver like nested part hierarchy to the property. For example,
MATLAB or Mathematica. It does not define inde- “smd.b1.damp- ingCoef” specifies that the
pendent and dependent variables. It merely shows dampingCoef is a property of the Dashpot “b1”,
bind- ings, or equality. For example, the parametric which is part of the SpringMass- Dashpot “smd”. The
diagram of Figure 5 shows that dx1/dt is equal to the abbreviations smd and b1 were introduced in Figures
velocity of the mass. It does not tell you how to solve 3 and 4. These part names are separated with periods
for it. In contrast, an equation solver might state or “dots.”
something like, to update x1 start with the initial State equations are always tightly coupled: They
position and integrate x2 using Adams-Moulton or are usually thought of as a matrix. In SysML,
Runge-Kutta integration routines. constraints can be composed of more than one
equation. Therefore, our bdd could be composed as
shown in Figure 7.
Systems Engineering DOI 10.1002/sys
190 BAHILL AND SZIDAROVSZKY

Figure 6. Parametric diagram (par) using dot notation showing the state-space equations for a particular SpringMassDashpot
system.

Figure 7. Block definition diagram (bdd) for the mechanical system, with two equations in one constraint of the
StateEquation.

Systems Engineering DOI 10.1002/sys


COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 191

3. STATE-MACHINE SYSTEMS Postcondition: The whole document has been


checked for violations of this spelling rule.
3.1. Spelling Checker Specific Requirements
Functional Requirements:
State-machine systems are studied in traditional digital The system shall check a document and find viola-
logic books such as Katz [1993] and in contemporary tions of the spelling rule “i before e except after
object-oriented books such as Blaha and Rumbaugh c.”
[2005]. The following is problem 3-11 from Chapman, The system shall signal a violation until turned
Bahill, and Wymore [1992]. Design a system for off by the Author.
detect- ing spelling errors. Or, more simply, create a
Nonfunctional Requirements: The system
state machine to implement the spelling rule “i before
shall ignore numbers, blank spaces, and
e except after c.” If a word violates this rule, your
punctua- tion.
system should stop processing words and produce an
Author/owner: Terry Bahill
error signal. When the human acknowledges the
Last changed: January 1, 2007
mistake and turns off the error signal, your system
should resume processing words. For example, the
3.2.1. Define Input Ports, Output Ports, and Their
words piece and receive are correct so your system
Legal Values
should continue processing words. However, weird
There are two input ports: the character stream and the
violates this rule, so your system should stop and wait
human reset.
for human action. You may assume that bizarre
sequences such as “ceie” will go undetected, and that Input Port 1 = {a-z, A-Z}, This port accepts
Professor Lucien Duckstein will not use it. Describe lowercase and uppercase letters, and there is
your inputs, outputs, and states. Label your states with no difference between uppercase and lower-
meaningful names. Assume the system starts in a reset case letters. Numbers, spaces, and punctua-
state. State all assumptions you make. Finally, tion will be ignored. We will label the inputs
describe how you will test your system. “c” for the character c, “e” for the character
3.2. The Use Case Approach e, “i” for the character i, and “other” for any
other character. We are using lowercase
Name: Check Spelling letters for the inputs and uppercase letters in
Iteration: 1.4 the state names.
Derived from: Problem 3-11 of Chapman, Ba- Input Port 2 = {humanReset, HR}, The human
hill, and Wymore [1992]
Brief description: The system scans a either presses the reset button or he does not
document and implements the spelling rule (HR).
“i before e except after c.”
There is one output port: the error signal.
Added value: Author gets a more professional
document. Output Port = {OK, error}. Items in braces { } are le-
gal values for that port.
Level: Low
Scope: The document being processed Inputs of state-machine systems should be simple.
Primary actor: Author Typical input ports are switches that can be open or
Supporting actor: Document (We are not using closed. Inputs should not be described as having mem-
a dictionary) ory. For example, in this spelling checker you should
Frequency: Many times per day not describe the input as “c received then e received
Precondition: A document must be open. then i received.” However, such a description could be
Trigger: Author asks the system to check the the name of a state. Inputs should be named with
spelling. nouns or noun phrases.
Main Success Scenario: Most systems not only have many inputs, but also
1a. System scans the document one letter at a time. have many kinds of inputs. Each different kind of
If it finds a spelling-rule violation, it turns on input may be designated as an input port. There is
the error signal and waits for Author to sometimes a question as to whether a model should
respond. have one input with multiple input values or multiple
2. Author resets the system [repeat at step 1]. input ports with fewer input values. Inputs that can
Alternate Flows: occur simultane- ously must be assigned to different
1b. System reaches the end of the document [exit input ports. Inputs that have different values and
use case]. cannot occur simultane-

Systems Engineering DOI 10.1002/sys


192 BAHILL AND SZIDAROVSZKY

ously can be allowed in the legal value set for one C Then E, /* This means the letter c was read and
port. An input port has a set of allowed values each of immediately after there was an e. */
which is possible individually, but no two can occur E Received,/* This means the letter e (upper or
simulta- neously. Input ports are interfaces. lower case) was read from the document. */
Input ports are not UML events. An event is an E Then I. /* This means the letter e was read and
occurrence that has a location in time and space. In immediately after there was an i. */
state machine diagrams, events are the inputs that
cause transitions between states. Events should be 3.3. UML/SysML State Machine Diagram
named with verbs or verb phrases. Typically, the first
letter of the first word is lowercase, the first letters of The UML/SysML state machine (sm) diagram in Fig-
subsequent words are uppercase, and there are no ure 8 nicely describes the system states. This diagram
spaces between the words: this is called lower camel must be accompanied by text such as that given above
case. Events may be composed of Boolean describing the inputs, outputs and states.
expressions and guard condi- tions.
In classical state machines, the transitions between 3.3.1. Construction Hints
When creating a state machine model, it usually helps
states were labeled with the current values for the to start with the main success scenario. In this case,
input, success is paradoxically detecting errors. So our two
e. g. (c, HR), where HR means No humanReset. In main success scenarios are detecting the sequences ei
UML state machine diagrams, these transitions are and cie. So first, we constructed the states Start, E
labeled as events, e.g., “c received [HR].” Things in Received, and E Then I and their associated
square brackets [ ] are guard conditions. transitions. Then we constructed the branch with the
In other words, classical state machines track the states Start, C Received, C Then I, and C Then I Then
values of all input ports at all times, whereas UML E. After this, we added all other possible transitions.
3.2.2. Assumptions
state machines only show important changes of input While doing this we discovered the need for another
The
values. of assumptions is not written at the beginning
list state, C Then E. As a final step, we ensured that all
of the project. It is started at the beginning of design states have all of the necessary transition out of them.
and finished at the end of testing. In this state machine diagram, it looks like there is
only one input port. This results from the
 Bizarre sequences such as “ceie” will go unde- assumption that the human would not press the reset
tected. button unless the error signal was on; i.e., the input
 Professor Lucien Duckstein will not use the humanReset (HR) would only be activated from the
spell- ing checker. error states: C Then I Then E and E Then I. Without
 The system should ignore numbers, blank this assumption each arrow would have to have two
spaces, and punctuation.
 The system will not distinguish between upper inputs specified; e.g., the arrow from Start to C
and lower case letters. Received would be labeled “(c, HR)”, where HR
 The Author will not press the reset button unless means Not HR and there would have to be
the error signal is on. humanReset arrows from states C Received, C Then I,
 The human reset input port has priority over the C Then E, and E Received back to Start.
character stream input port. A weakness of the above model is that it does not
consider blank spaces or punctuation. Therefore, it
3.2.3. Define the States would flag this sentence as an error.
Concurrency and hierarchies will not be used. The Over the last 30 years, we have evaluated thousands
following seven states were determined during of solutions to this problem. They all have strengths
thought- ful reasoning with much iteration. and weaknesses. Here is a higher-level solution
suggested by a reviewer. “I would define states called
Start, /* This is where we start. */ ‘start’, ‘scan’ and ‘error processing’. A scan state
C Received,/* This means the letter c (upper or would tran- sition to error processing if an error is
lower case) was read from the document. */ detected, and certain actions would be performed. The
C Then I, /* This means the letter c was read and completion of the error processing actions would
immediately after there was an i. */ result in a transition back to the scan state. A reset
C Then I Then E, /* This means a c was read, then would take you back to the start state from either the
an i and immediately after an e was read.*/ scan or error processing state. There are many
sophisticated features of a state machine that could be
applied if desired.”
Systems Engineering DOI 10.1002/sys
COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 193

Figure 8. State machine (sm) diagram for the spelling checker.

3.4. Other UML and SysML Diagrams 3.5. Wymorian Notation


Would any other UML diagrams be useful in Here is one possible Wymorian solution. Because this
describing this system? An activity diagram could be is problem 3-11 of Chapman, Bahill, and Wymore
used to describe the algorithm. A sequence diagram [1992], let us name it Z11.
would have three objects at the top: the Author, the
Document, and the Spelling Checker. The Spelling Z11 = (SZ11, IZ11, OZ11, NZ11, RZ11), where
Checker would go through the document letter by SZ11 = {Start, C Received, C Then I, E Received,
letter and would occa- sionally send a message to the C
Author. This does not sound useful, nor do timelines, Then E, C Then I Then E, E Then I}, /* There is
class diagrams, or de- ployment diagrams. The
one state variable that can take on one of 7
SysML extensions to the UML would classify Input
values.
Port 1 as a flow port because the characters {a-z, A-
*/
Z} flow through this port, Input Port 2 (the human
IZ11 = I1Z11 I2Z11, /* There are two input ports.
reset) as a standard port, and the Output Port as a
standard port. */
Our design process starts with the use cases: The I1Z11 = ALPHABET = {a-z, A-Z}, /* This port
requirements and everything else follows. accepts lowercase and uppercase letters, and
Therefore, the dependencies in Figure 9 show that, for there is no difference between uppercase and
example, the requirement Find Violations refines the lowercase letters. Numbers, spaces and punc-
use case Check Spelling. If, instead, the customer tuation will be ignored. We will label the in-
gave us all of the requirements and then we wrote the puts “c” for the character c, “e” for the
use cases, then the arrow’s direction would show that character e, “i” for the character i, and
the use case refines the requirements. “other” for any other character. We are using
lower- case letters for the inputs and
uppercase letters
Systems Engineering DOI 10.1002/sys
194 BAHILL AND SZIDAROVSZKY

in the state names. DC means we don’t care Notice that in Wymorian modeling a system must have
about the value.*/ both an input port and an output port.
I2Z11 = {humanReset, HR}, /* Either the human
3.5.1. Alternative Wymorian Solution
presses the reset button or he does not (HR). */ It is often convenient to manipulate the values of the
/* There is one output port, the error signal. */ inputs, states, next states, and outputs. When this is
OZ11 = {OK, error}, done, we will use p1 and p2 for particular values of
/* Each entry in the next state function is of the the first and second inputs, x for a particular value of
form ((present state, (input1, input2)), next the state, y for a value of the next state, and q for a
state).*/ value of the output. Using this notation, we can write
NZ11 = {((Start, (c, HR)), C Received), the follow- ing NZ11, which is more eloquent than
the NZ11 above.
((Start, (e, HR )), E Received), NZ11 = {((x, p), y): x  SZ11; p I1Z11; y SZ11;
((Start, (i, HR)), Start), {if p2 = humanReset, then y = Start}
((Start, (other, HR)), Start),  {((Start, (p1, HR)), y):
((Start, (DC, humanReset)), Start), if p1  {c, e}, then y = Start,
else if p1 = c, then y = C Received,
((C Received, (c, HR)), C Received),
else y = E Received}
((C Received, (e, HR )), C Then E),  {((C Received, (p1, HR), y):
if p1 = c, then y = C Received,
((C Received, (i, HR)), C Then I), else if p1 = i, then y = C Then I,
((C Received, (other, HR)), Start), else if p1 = e, then y = C Then E,
((C Received, (DC, humanReset)), Start),
else y = Start} 
((C Then I, (c, HR)), C Received),  {((C Then I, (p1, HR), y):
((C Then I, (e,HR )), C Then I Then E), if p1 = c, then y = C Received,
else if p1 = e, then y = C Then I Then E,
((C Then I, (i, HR)), Start), else y = Start}
((C Then I, (other, HR)), Start),  {etc.}.
((C Then I, (DC, humanReset)), Start), where  represents the union of sets.

((C Then I Then E, (c, HR)), C Then I Then E), ((C 3.6. Testing the Spelling Checker
Then I Then E, (e, HR )), C Then I Then E), The easiest way to test the system might be to build
((C Then I Then E, (i, HR)), C Then I Then E), one and run it on a list of words that you know are
((C Then I Then E, (other, HR)), C Then I Then correct, such as the dictionary of a computer spell
program, and also on a list of known incorrect words.
E),
For a paper and pencil test of your paper and pencil
((C Then I Then E, (DC, humanReset)), Start), state machine, you could use the following words.
((C Then E, (c, HR)), C Received),
Correct: field, percent, believe, tiniest, piece, de-
((C Then E, (e, HR)),
 E Received), cide, receive
((C Then E, (i, HR)), Start), Incorrect: handkercheif, yeild
Exceptions that proof the rule: their, height,
((C Then E, (other, HR)), Start),
being, sufficiently, weird
((C Then E, (DC, humanReset)), Start),
These exceptions should also be flagged as errors.
((E Received, (c, HR)), C Received),
Do we have enough words? Do we have the right
((E Received, (e, HR)),
 E Received), words? Have we exercised every arrow on the state
diagram? Have we exercised some paths many times?
((E Received, (i, HR)), E Then I),
Can you suggest a more systematic way of testing this
((E Received, (other, HR)), Start)}, system?
((E Received, (DC, humanReset)), Start), We could use a dozen words from the dictionary
((E Then I, (c, HR)), E Then I), that contain the several correct variations of i’s, e’s,
and c’s
((E Then I, (e, HR)), E Then I),
((E Then
Systems I, (i, HR)),
Engineering E Then
I),
DOI 10.1002/sys
((E Then I, (other, HR)), E Then I),
((E Then I, (DC, humanReset)), Start)},
COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 195

Figure 9. Requirements diagram for the Spelling Checker.

Figure 10. Activity diagram (act) for the batter in a baseball game.

Systems Engineering DOI 10.1002/sys


196 BAHILL AND SZIDAROVSZKY

and make sure that they were accepted as correct. bilities, we will model the exact same thing with both
Then transpose all of the ie’s and ei’s and make sure an activity diagram and a state machine diagram.
that they were then flagged as incorrect.
If we actually built our system, we could use other 4.2. An Equivocal Problem Domain
techniques to help validate it. For example, if we built
our spelling checker and tested it on 100,000 words, 4.2.1. The Activity Diagram
we could record the number of times each state was Now we want to discuss a model for the batter in a
en- tered. If we found a state that was never entered, game of baseball. For the batter, the pitch can be
we might suggest that it was a mistake. Likewise, if divided into thirds. During the first third of the pitch,
we found a state that was entered 100,000 times, we the batter gathers sensory information. During the
might suggest that it was either a start-state or a second third, he or she must compute where and when
mistake. States that are entered for all or no test the ball will make contact with the bat and then
trajectories are always suspicious. decide whether to swing, duck, or take the pitch.
We conclude this problem with the following During the final third of the pitch, the batter is
anony- mous poem. swinging the bat and can do almost nothing to alter its
trajectory. The activity dia- gram of Figure 10 is very
My Spelling Checker useful for describing the batter’s actions during the
I have a spelling checker, pitch. Computing where and when has been modeled
It came with my PC. with equations [Bahill and Karnavas, 1993] and the
It plainly marques four my revue, swing of the bat has also been modeled with
Miss steaks eye can knot sea. equations [Watts and Bahill, 2000]. Therefore,
I’ve run this poem threw it, SysML block definition and parametric dia- grams
I’m sure your pleased too no; could be used to describe these equations. These
Its letter perfect in it’s would be the only actions in this diagram that are
weigh, My check her tolled described this way. We do not have equations that
me sew. describe wait for the pitch or gather sensory informa-
tion.
4. STATE-EQUATION VERSUS In this activity diagram for the batter, the hourglass
STATE-MACHINE SYSTEMS shape is a Timing signal. In the Enterprise
Architecture (EA) tool, this is a specialization of the
4.1. Comparison Accept signal. It seems that a UML sequence diagram
Section 2 of this paper presented state equation and a use case would also be useful in describing the
models. Section 3 presented state-machine models. behavior of the batter. The SysML block definition
Table II gives a general comparison. This table is not and parametric diagrams would be good for
rigorous or mathematical; instead, it is informal and describing the dynamics
heuristic. of the batter.
Next, we want to show a system that is modeled The activity diagram has evolved. In 1967, Jim
best with a combination of state equations and state Long developed a technique for representing system
ma- chines. However, to illustrate different modeling logic that incorporated functions, inputs, outputs, and
possi- control in a single hierarchical set of diagrams
Table II. Comparison of State-Equation Systems and State-Machine Systems
[Long, 2002].

Systems Engineering DOI 10.1002/sys


COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 197

This developed into the extended functional flow batter must block out all distractions and concentrate
block diagram, which, with the addition of the on the ball. During the second third, he or she must
colored Petri- net token concept, was the basis for the com- pute where and when the ball will make contact
SysML activity diagram [Bock, 2006]. with the bat and then decide whether to swing, duck
A good model is a simplified representation of one or take the pitch. During the final third of the pitch,
aspect of a real system: models are successful because the batter is swinging the bat and can do almost
they do not consider all the complexity of the real nothing to alter its trajectory. The state machine
system. As with all successful models, the example of diagram of Figure 11 is very useful for describing the
Figure 10 only models one aspect of the batter’s batter’s behavior during the pitch. Computing where
behav- ior. The actual batter is doing many other tasks and when the ball will cross the plate has been
in parallel [Bahill and LaRitz, 1984; McHugh and modeled with equations [Bahill and Karnavas, 1993]
Bahill, 1985; Bahill and Karnavas, 1992, 1993; Watts and the swing of the bat has also been modeled with
and equations [Watts and Bahill, 2000]. SysML block
Bahill, 2000; Bahill and Baldwin, 2003, 2004, definition and parametric diagrams could be used to
2007; Bahill, Baldwin, and Venkateswaran, 2005;
describe these equations. These would be the only
Bahill, Botta, and Daniels, 2006; Baldwin, Bahill, and
states in this diagram that are described this way. We
Nathan, 2007]. Including many tasks in the same
do not have equations that describe waiting for the
model is detrimental to understanding [Mellor et al.,
4.2.2. The State Machine Diagram pitch or gathering sensory information.
2004].
Now we want to discuss another model for the batter It seems that a UML activity diagram, sequence
in a game of baseball. For the batter, the pitch can be diagram and a use case would also be useful in
divided into thirds. During the first third of the pitch, describ- ing the behavior of the batter. The SysML
the batter gathers sensory information. In this state, block defini- tion and parametric diagrams would be
the good for describing the dynamics of the batter.

Figure 11. State machine diagram (sm) for the batter in a baseball game.

Systems Engineering DOI 10.1002/sys


198 BAHILL AND SZIDAROVSZKY

4.2.3. Which is the Best Model, the Activity or the tions are used to describe the dynamics of the system.
State Machine Diagram? Parametric diagrams show how the parameters from
Maybe we could answer this question by explaining if each of the equations can be bound together to create
waiting for the pitch, gathering sensory information, a complex network of equations. Requirements
computing where and when, and swinging the bat are diagrams show the requirements and their
states or actions. But there is no clear answer to this relationships to each other, to use cases and to test
dilemma. If we were to expand the model upward to cases. So, although we described each of these
include learning how to swing the bat and how to methods separately in this pa- per, in the design of
compute where and when the ball will cross the plate, complex systems, it may be neces- sary to combine
then we might want to use the state machine diagram. many of these methods in the same model or design.
However, if we were to expand the model downward
to include how the batter predicts time to contact and
6. CONCLUSIONS
how he uses the spin on the ball to predict the spin-
induced deflection of the ball, then we might want to Model-based System Engineering is a relatively new
use the activity diagram. What about the transitions? concept in system design. It requires good consistent
Transi- tions between states are triggered by events. rigorous simulatable models. A good model is a
Pitch Is Released certainly sounds like an event, but simpli- fied representation of one aspect of a real
First Third Of Pitch Is Over does not. The final thing system: Models are successful because they do not
that might influence our choice is that the batter is not simultane- ously consider all the complexity of the
likely to make decisions in parallel; therefore, the real system. Simple models are easier to understand
activity dia- gram loses its forte. In conclusion, in and solve than models that are more complex. Each
many cases it will not be clear whether an activity problem domain requires an appropriate modeling
diagram or a state machine diagram would be best. method. This paper presented state-equation and state-
Creating rules for making such a decision is clearly machine problem domains. Most importantly, all of
outside the scope of this paper. the examples were at the same level of abstraction. It
presented continuous system and discrete system
5. MIXED MODELS problem domains. It used the following methods for
modeling systems: the state- space approach of Linear
For some systems, it might be necessary to use several Systems Theory, set-theoretic notation, block
modeling methods. To understand neurological sys- diagrams, use cases, UML diagrams, and SysML
tems, we make models at different levels of diagrams. The main conclusion of this paper is that
abstraction; for example, we model neurons, neural Model-based System Engineering requires correct
networks and the resulting behavior. The Hodgkin- models that are appropriate to the particular problem
Huxley equations for the voltage potential across a domain. The systems engineer must first care- fully
neural membrane use differential equations, whereas study the problem in order to understand which
most models for artifi- cial neural networks use modeling method will be most suitable. One method
difference equations; and, then, models of the will not work for all problems. For some problems,
behavior of neurological networks usually use state two methods may work equally well, but usually there
machines. Combining all three of these levels in the is a best method. The method must be chosen for the
same model is difficult, and few people try. So we do par- ticular problem.
not find such mixed models for the brain.
ACKNOWLEDGMENT
However, in designing complex systems, such as an
air traffic control system or a communications Sandy Friedenthal, a Principal System Engineer at
network, it might be necessary to use all of these Lockheed Martin and co-organizer of the SysML,
methods to- gether. The design might start with the made major contributions to the SpringMassDashpot
use cases that model the required system behavior and SysML section. We thank Sparx Systems for
capture the requirements. Then by thinking about providing a site license for Enterprise Architect.
concepts in the problem domain, we identify the
classes. Sequence diagrams then show the interactions
between these classes, and they help us to find the REFERENCES
operations (func- tions) of the classes. Block A.T. Bahill and D.G. Baldwin, The vertical illusions of bat-
definition diagrams show system structure as ters, Baseball Res J 32 (2003), 26–30.
components along with their prop- erties, constraints, A.T. Bahill and D.G. Baldwin, “The rising fastball and other
parameters, and relationships. State machine diagrams perceptual illusions of batters,” Biomedical engineering
describe event-based behavior in a part of the life
cycle of a class or a block. State-equa-
Systems Engineering DOI 10.1002/sys
COMPARISON OF DYNAMIC SYSTEM MODELING METHODS 199

principles in sports, George Hung and Jani Pallis rial, June 25, 2007, http://www.omgsysml.org/INCOSE-
(Editors), Springer, New York, 2004, pp. 257–287. 2007-OMG-SysML-Tutorial.pdf, accessed March 2008.
A.T. Bahill and D.G. Baldwin, Describing baseball pitch R.H. Katz, Contemporary logic design, Benjamin/Cum-
movement with right-hand rules, Comput Biol Med 37 mings, Redwood City, CA, 1993.
(2007), 1001–1008. J. Long, Relationships between common graphical repre-
A.T. Bahill and W.J. Karnavas, “Bat Selector,” U. S. Pat. sentations in systems engineering, http://www.vitech-
5,118,102, June 2, 1992. corp.com/whitepapers/files/200701031634430.CommonG
A.T. Bahill and W.J. Karnavas, The perceptual illusion of raphicalRepresentations_2002.pdf, accessed March 7, 2008.
baseball’s rising fastball and breaking curve ball, J Exper D.E. McHugh and A.T. Bahill, Learning to track predictable
Psychol: Hum Perception Performance 19 (1993), 3–14. target waveforms without a time delay, Investigative
A.T. Bahill and T. LaRitz, Why can’t batters keep their eyes Ophthalmol Vis Sci 26 (1985), 932–937.
on the ball, Amer Scientist 72 (May–June 1984), 249– S.J. Mellor, K. Scott, A. Uhl, and D. Weise, MDA distilled:
253. Principles of model driven architecture, Addison-Wesley,
A.T. Bahill, D.G. Baldwin, and J. Venkateswaran, Predicting Reading, MA, 2004.
a baseball’s path, Amer Scientist 93(3) (May–June I. Newton, The philosophiae naturalis principia
2005), mathematica, 1687.
218–225. K. Ogata, System dynamics, 4th edition, Prentice Hall,
A.T. Bahill, R. Botta, and J. Daniels, The Zachman Engle-
framework populated with baseball models, J Enterprise wood Cliffs, NJ, 2004.
Architecture OMG SysML, OMG Systems Modeling Language, The Of-
2(4) (2006), 50–68. ficial OMG SysML site, http://www.omgsysml.org/,
A.T. Bahill, F. Szidarovszky, R. Botta, and E.D. Smith, Valid 2007.
models require defined levels, Int J Gen Syst 37(5) OMG UML, Unified Modeling Language, UML Resource
(2008), 553–571. Page, http://www.uml.org/, 2007.
D.G. Baldwin, A.T. Bahill, and A. Nathan, Nickel and dime J.W. Rosenblit, A conceptual basis for model-based system
pitches, Baseball Res J 35 (2007), 25–29. design, PhD dissertation in Computer Science, Wayne
M. Blaha and J. Rumbaugh, Object-oriented modeling and State University, Detroit, MI, 1985 (published by Univer-
design with UML, 2nd edition, Pearson, Prentice Hall, sity Microfilms International, Ann Arbor, MI).
Englewood Cliffs, NJ, 2005. SysML—Open Source Specification Project,
C. Bock, SysML and UML 2 support for activity modeling, http://www.sysml.org/, 2007.
Syst Eng 9(2) (2006), 160–186. F. Szidarovszky and A.T. Bahill, Linear systems theory, 2nd
R. Botta, Z. Bahill, and A.T. Bahill, When are observable edition, CRC Press, Boca Raton, FL, 1998.
states necessary? Syst Eng 9(3) (2006), 228–240. A. Turing, On computable numbers with an application to
D.M. Buede, The engineering design of systems: Models the Entscheidungsproblem, Proc London Math Soc
and methods, Wiley, New York, 2000. XLII (1936), 239–265 [correction: Proc London Math
W.L. Chapman, A.T. Bahill, and W. Wymore, Engineering Soc
modeling and design, CRC Press, Boca Raton, FL, 1992. XLIII (1937), 544–546].
M. Fowler, UML distilled: A brief guide to the standard R.G. Watts and A.T. Bahill, Keep your eye on the ball:
object Curve balls, knuckleballs and fallacies of baseball,
modeling language, 3rd edition, Addison-Wesley, Read- ing, Freeman,
MA, 2004. New York, 2000.
S. Friedenthal, A. Moore, and F. Steiner, OMG Systems A.W. Wymore, Model-based systems engineering, CRC
Modeling Language, (OMG SysML
A. Terry Bahill ),is INCOSE Tuto-
a Professor Press, BocaatRaton,
of Systems Engineering FL, 1993. of Arizona in Tucson. He
the University
received his Ph.D. in electrical engineering and computer science from the University of California,
Berkeley, in 1975. His research interests are in the fields of system design, systems engineering,
modeling physiological systems, eye-hand-head coordination, human decision-making, and systems
engineering theory. He has tried to make the public appreciate engineering research by applying his
scientific findings to the sport of baseball. Bahill has worked with BAE Systems in San Diego, Hughes
Missile Systems in Tucson, Sandia Laboratories in Albuquerque, Lockheed Martin in Eagan MN,
Boeing in Kent WA, Idaho National Engineering and Environmental Laboratory in Idaho Falls, and
Raytheon Missile Systems in Tucson. For these companies he presented seminars on Systems
Engineering, worked on system development teams, and helped them describe their Systems
Engineering Process. He holds a U.S. patent for the Bat Chooser, a system that computes the Ideal Bat
Weight for individual baseball and softball batters. He received the Sandia National Laboratories Gold
President’s Quality Award. He is a Fellow of the Institute of Electrical and Electronics Engineers (IEEE),
of Raytheon and of the International Council on Systems Engineering (INCOSE). He is the Founding
Chair Emeritus of the INCOSE Fellows Selection Committee. His picture is in the Baseball Hall of
Fame’s exhibition “Baseball as America.” You can view this picture at
http://www.sie.arizona.edu/sysengr/.

Systems Engineering DOI 10.1002/sys


200 BAHILL AND SZIDAROVSZKY

Ferenc Szidarovszky has been a professor of Systems and Industrial Engineering at the University of
Arizona in Tucson since 1987. He was born in Budapest, Hungary and received his B.S., M.S., and
Ph.D. in numerical techniques from the Eötvös University of Sciences in Budapest. He received a
second Ph.D. in economics from the Budapest University of Economic Sciences in 1977. He was an
assistant and an associate professor in the Department of Numerical Analysis and Computer Sciences of
the Eötvös University of Sciences. He served as the Acting Head of the Department of Mathematics and
Computer Sciences of the University of Horticulture and Food Industry. He was a professor with the
Institute of Mathematics and Computer Sciences of the Budapest University of Economic Sciences. He
is vice president of NOAH, a company consulting on applications of neural networks to natural
resource management. He also presents courses world wide on game theory, multiple criteria decision
making, and conflict resolution.

Systems Engineering DOI 10.1002/sys

View publication stats

You might also like