APMonitor
Encyclopedia
APMonitor, or "Advanced Process Monitor", is a modeling language for differential
Differential equation
A differential equation is a mathematical equation for an unknown function of one or several variables that relates the values of the function itself and its derivatives of various orders...

 and algebraic (DAE) equations. It is used for describing and solving representations of physical systems in the form of implicit DAE models. APMonitor is suited for large-scale problems and allows solutions of dynamic simulation, moving horizon estimation, and nonlinear control. APMonitor does not solve the problems directly, but calls appropriate external solvers.

Applications in APMonitor modeling language

Many physical systems have been simulated with APMonitor. Some of these include cell culture
Cell culture
Cell culture is the complex process by which cells are grown under controlled conditions. In practice, the term "cell culture" has come to refer to the culturing of cells derived from singlecellular eukaryotes, especially animal cells. However, there are also cultures of plants, fungi and microbes,...

s, chemical reactor
Chemical reactor
In chemical engineering, chemical reactors are vessels designed to contain chemical reactions. The design of a chemical reactor deals with multiple aspects of chemical engineering. Chemical engineers design reactors to maximize net present value for the given reaction...

s, distillation columns
Fractionating column
A fractionating column or fractionation column is an essential item used in the distillation of liquid mixtures so as to separate the mixture into its component parts, or fractions, based on the differences in their volatilities...

, solid oxide fuel cells, infectious disease spread, oscillator, and space shuttle launch
Space Shuttle
The Space Shuttle was a manned orbital rocket and spacecraft system operated by NASA on 135 missions from 1981 to 2011. The system combined rocket launch, orbital spacecraft, and re-entry spaceplane with modular add-ons...

. Models for a direct current (DC) motor, blood glucose response of an insulin dependent patient, and pendulum motion are listed below.

Direct current (DC) motor


Model motor
Parameters
! motor parameters (dc motor)
v = 36 ! input voltage to the motor (volts)
rm = 0.1 ! motor resistance (ohms)
lm = 0.01 ! motor inductance (henrys)
kb = 6.5e-4 ! back emf constant (volt·s/rad)
kt = 0.1 ! torque constant (N·m/a)
jm = 1.0e-4 ! rotor inertia (kg m²)
bm = 1.0e-5 ! mechanical damping (linear model of friction: bm * dth)

! load parameters
jl = 1000*jm ! load inertia (1000 times the rotor)
bl = 1.0e-3 ! load damping (friction)
k = 1.0e2 ! spring constant for motor shaft to load
b = 0.1 ! spring damping for motor shaft to load
End Parameters

Variables
i = 0 ! motor electrical current (amperes)
dth_m = 0 ! rotor angular velocity sometimes called omega (radians/sec)
th_m = 0 ! rotor angle, theta (radians)
dth_l = 0 ! wheel angular velocity (rad/s)
th_l = 0 ! wheel angle (radians)
End Variables

Equations
lm*$i - v = -rm*i - kb *$th_m
jm*$dth_m = kt*i - (bm+b)*$th_m - k*th_m + b *$th_l + k*th_l
jl*$dth_l = b *$th_m + k*th_m - (b+bl)*$th_l - k*th_l

dth_m = $th_m
dth_l = $th_l
End Equations
End Model

Blood glucose response of an insulin dependent patient


! Model source:
! A. Roy and R.S. Parker. “Dynamic Modeling of Free Fatty
! Acids, Glucose, and Insulin: An Extended Minimal Model,”
! Diabetes Technology and Therapeutics 8(6), 617-626, 2006.
Model human
Parameters
p1 = 0.068 ! 1/min
p2 = 0.037 ! 1/min
p3 = 0.000012 ! 1/min
p4 = 1.3 ! mL/(min·µU)
p5 = 0.000568 ! 1/mL
p6 = 0.00006 ! 1/(min·µmol)
p7 = 0.03 ! 1/min
p8 = 4.5 ! mL/(min·µU)

k1 = 0.02 ! 1/min
k2 = 0.03 ! 1/min
pF2 = 0.17 ! 1/min
pF3 = 0.00001 ! 1/min
n = 0.142 ! 1/min
VolG = 117 ! dL
VolF = 11.7 ! L

! basal parameters for Type-I diabetic
Ib = 0 ! Insulin (µU/mL)
Xb = 0 ! Remote insulin (µU/mL)
Gb = 98 ! Blood Glucose (mg/dL)
Yb = 0 ! Insulin for Lipogenesis (µU/mL)
Fb = 380 ! Plasma Free Fatty Acid (µmol/L)
Zb = 380 ! Remote Free Fatty Acid (µmol/L)

! insulin infusion rate
u1 = 3 ! µU/min

! glucose uptake rate
u2 = 300 ! mg/min

! external lipid infusion
u3 = 0 ! mg/min
End Parameters

Intermediates
p9 = 0.00021 * exp(-0.0055*G) ! dL/(min*mg)
End Intermediates

Variables
I = Ib
X = Xb
G = Gb
Y = Yb
F = Fb
Z = Zb
End Variables

Equations
! Insulin dynamics
$I = -n*I + p5*u1

! Remote insulin compartment dynamics
$X = -p2*X + p3*I

! Glucose dynamics
$G = -p1*G - p4*X*G + p6*G*Z + p1*Gb - p6*Gb*Zb + u2/VolG

! Insulin dynamics for lipogenesis
$Y = -pF2*Y + pF3*I

! Plasma Free Fatty Acid (FFA) dynamics
$F = -p7*(F-Fb) - p8*Y*F + p9 * (F*G-Fb*Gb) + u3/VolF

! Remote FFA dynamics
$Z = -k2*(Z-Zb) + k1*(F-Fb)
End Equations
End Model

Pendulum motion


Model pendulum
Parameters
m = 1
g = 9.81
s = 1
End Parameters

Variables
x = 0
y = -s
v = 1
w = 0
lam = m*(1+s*g)/2*s^2
End Variables

Equations
x^2 + y^2 = s^2
$x = v
$y = w
m*$v = -2*x*lam
m*$w = -m*g - 2*y*lam
End Equations
End Model

See also

  • AMPL
    AMPL
    AMPL, an acronym for "A Mathematical Programming Language", is an algebraic modeling language for describing and solving high-complexity problems for large-scale mathematical computation AMPL, an acronym for "A Mathematical Programming Language", is an algebraic modeling language for describing and...

  • ASCEND
    ASCEND
    ASCEND is a free, open source, mathematical modelling system developed at Carnegie Mellon University since the late 1978. ASCEND is an acronym which stands for Advanced System for Computations in ENgineering Design. Its main uses have been in the field of chemical process modelling although its...

  • EMSO
    EMSO simulator
    EMSO simulator is an equation-oriented process simulator with a graph­i­cal interface for modeling com­plex dynamic or steady-state processes. It is CAPE-OPEN compliant. EMSO stands for Environment for Mod­el­ing, Sim­u­la­tion, and Opti­miza­tion...

  • GAMS
    General Algebraic Modeling System
    The General Algebraic Modeling System is a high-level modeling system for mathematical optimization. GAMS is designed for modeling and solving linear, nonlinear, and mixed-integer optimization problems. The system is tailored for complex, large-scale modeling applications and allows the user to...

  • MATLAB
    MATLAB
    MATLAB is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages,...

  • Modelica
    Modelica
    Modelica is an object-oriented, declarative, multi-domain modeling language for component-oriented modeling of complex systems, e.g., systems containing mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents.The free Modelica languageis...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK