Help Contents | Module Library
Arbitrary Dynamic System Response
An EngineersToolbox Calculation Module

Background Information
The Arbitrary Dynamic System Response module implements a fourth-order parameterized Runge-Kutta numerical integration algorithm to solve a set of differential equations of the form x' = f(t,x).  The module uses fifth-order approximations to calculate both the relative and absolute error in the fourth-order solution and adapts the time step to minimize the error. 

System differential equations must be defined in the standard state-space convention and entered in text format into an input editor.  Because the module parses the input equations and converts them to equivalent mathematical expressions, the user is not limited to a set of predefined dynamic systems or input conditions. For a basic understanding of module input parameters and system editor syntax, it is recommended that you first look at the provided example problems.

 

Main Input Form
The main input form defines basic input parameters such as simulation start and end times, solution tolerances, and problem dimension.  The form also serves as the main control panel for the simulation definition and operation. The system equation editor can be opened by clicking on the 'Edit Equations' button.  Advanced simulation parameters such as intermediate times steps and individual tolerances can be added or modified by clicking on the 'Advanced Parameters' button.  The simulation is started by clicking the 'Calculate' button.

 

Figure 1. Arbitrary Dynamic System Response module input form

 

Input Parameters

Start Time, End Time
The module integrates the differential equations from t = to (start time) to t = tf  (end time).

Adaptive Time Step
If an adaptive time step is selected, the numerical integration algorithm will vary the time step as required to try and meet the specified solution tolerances.

Absolute Tolerance (Default)
If the estimated error ei in the value of a state-space variable xi is greater than the specified absolute tolerance, the adaptive time step algorithm will attempt to improve the solution accuracy by reducing the time step.  The default value entered in this field is applicable to all state-space variables.  To define the absolute tolerance for a specific variable, use the Advanced Parameters input form.

Relative Tolerance (Default)
If the ratio of the estimated error to the value of the state-space variable, that is, ei/xi, is greater than the specified relative tolerance, the adaptive time step algorithm will attempt to improve the solution accuracy by reducing the time step. The default value entered in this field is applicable to all state-space variables.  To define the relative tolerance for a specific variable, use the Advanced Parameters input form.

Fixed Time Step
If a fixed time step is specified, all adaptive time step features are disabled.

Problem Dimension
The number of state-space variables, or system order, must be explicitly specified in the problem dimension field.

 

Output Parameters

Max Number of Time Steps
This field defines the size of the internal data arrays used to store the simulation results.

Display Every n Time Steps
This field specifies the times steps for which results will be displayed to the screen.

Plot Every n Time Steps
This field specifies the times steps for which results will be stored and plotted.

Only Plot Specified Intermediate Time Steps
If this option is selected,  results will only be saved and plotted for to (start time), tf (end time), and the intermediate time steps specified on the Advanced Parameters form.

 

System Differential Equations

To solve a system of differential equations using the Arbitrary System Dynamic Response module, the equations must be expressed in the standard state-space convention and entered into the input editor shown in Figure 2.  The system input editor understands a simple syntax consisting of the familiar mathematical operators and functions listed in Table 1 and Table 2.  Reserved variables such as state-space variables, state-space derivatives, output variables, and the integration variable are shown in Table 3.

 

Figure 2. State-space equation editor


 

Table 1.  Supported mathematical operators

Operator Description
+ Addition
- Subtraction or unary minus sign.
* Multiplication
/ Division
^ Exponential
% Modulus

 

Table 2. Supported mathematical functions

Function Description
abs(x) absolute value of x
acos(x) arc cosine of x
asin(x) arc sine of x
atan(x) arc tangent of x
cos(x) cosine of x
cosh(x) hyperbolic cosine of x
exp(x) ex where e is the base of natural logarithms
log(x) base 10 logarithm of x
ln(x) natural logarithm of x
sign(x) sign of x
sin(x) sine of x
sinh(x) hyperbolic sine of x
sqrt(x) square root of x
tan(x) tangent of x
tanh(x) hyperbolic tangent x
u(x,x0) the unit step function u(x-x0)
round(x) value of x rounded to the nearest integer value
floor(x) value of x rounded up to the next integer value
ceil(x) value of x rounded down to the next integer value
random(x) random number from 0.0 to x

 

Table 3.  Linear System Time Response system differential equations

Variable Description Requirements
x[n] State-space variables The number of state-space variables defined in the input equations must match the problem dimension specified in the main input form.
dx[n] State-space derivatives All state-space derivatives must be defined.
x0[n] State-space initial values All state-space variables must have corresponding initial values defined.
y[n] Output variables Output variables must be assigned to generate plotted and tabulated output.  Output variable subscripts must start at 1 and subscripts cannot be skipped.  For example, you cannot define y[1] and y[3] without defining y[2].
t Integration variable  

 

 

 

Advanced Input Parameters
The advanced input parameters form shown in Figure 3 allows for fine-grained control of the simulation.

Absolute Tolerances, Relative Tolerances
State variable tolerances can be individually specified using this form.

Intermediate Time Steps
Intermediate time steps can be defined to obtain solutions at specific times.  Note that all intermediate times steps outside the range from to (start time) to tf (end time) are ignored.

 

Figure 3. Advanced simulation parameters input form

 

 

Output:
The module calculates the time response of the dynamic system due to the specified input.  Results are tabulated and plotted using standard ETB output facilities as shown in Figures 4 and 5.

 

Figure 4. Plotted results.

 

Figure 5. Tabulated results.


Example Problems

Example 1 - Harmonic Excitation of an Undamped SDOF System

 

 

References
Shampine L. (1994) Numerical Solution of Ordinary Differential Equations,  Capman and Hall (London).
Forsythe, G.E., Malcom M.A., Moler, C.B. (1977) Computer Methods for Mathematical Computations, Prentice-Hall Inc. (New Jersey).
Woods, R. L., Lawrence, K. L. (1997), Modeling and Simulation of Dynamic Systems, Prentice-Hall Inc. (New Jersey).
 

Help Contents | Module Library
Copyright © 2001-2008 Engrasp, Inc.  All rights reserved.