# Integrating Equation-Based Models and Bayesian Networks

Τεχνίτη Νοημοσύνη και Ρομποτική

7 Νοε 2013 (πριν από 4 χρόνια και 8 μήνες)

74 εμφανίσεις

1

Integrating Equation-Based Models and Bayesian Networks
Dave Brown

Equation-based models and Bayesian networks are not mutually exclusive methods of
modeling and simulation. Based on the development of the Netica library for Extend, the two
methods can now be used simultaneously within the same environment. When modeling
complex systems, the problem is usually broken down into smaller, simpler subsystems that are
constructed, tested and then integrated into the final complex model or simulation. This
approach lends itself to creation of integrated models where each component to be modeled is
individually evaluated to determine which modeling method would be best under the particular
circumstances. Several models were constructed to demonstrate the utility of this approach with
integrated models that contain both equation-based elements and Bayesian networks working
together to create a single simulation.
Another problem in modeling and simulation has been how to mix models that have
different levels of fidelity and resolution. Some approaches to multi-resolution modeling are to
use inputs to the model that are represented as random variables, probability distributions defined
over their range of potential values, or Monte Carlo simulation. Because Bayesian networks are
distributions, this method works well in an integrated modeling environment. This approach is
demonstrated by integrating Bayesian network subsystems that are of different fidelity and
resolution from other equation-based sub-models.

2

An example of this approach is the integration of an equation-based F-16 radar model
with a Bayesian network B-26 radar cross section model. A second radar cross section of a 1/15
scale model of a Boeing 737 commercial aircraft is also constructed from unclassified test data.
These models were constructed and validated from two entirely different sets of measured data
using two different methods. As such, these models have completely different fidelities and
resolutions. To simulate a radar tracking engagement, the equation-based motion model is added
to the other models. The motion model allows the aircraft to fly across the viewing angle of the
radar. As the aircraft moves, both the range and aspect angle of the target to the radar changes
between each radar sweep. Example simulation tracks of each aircraft are shown in Figure 1.
0
5
10
15
20
25
30
35
40
-40 -20 0 20 40 60 80
XRange (NM)
YRange (NM)
1/15 scale B737 No Detection
1/15 scale B737 Detection
B26 No Detection
B26 Detection

3

The radar begins to detect the B-26 just inside the maximum radar display range of 80 NM. The
real world phenomenon of target scintillation, where the target returns fade in and out near the
maximum detection range, is observed on the B-26 track. Once the B-26 moves closer to the
radar, the return is so strong that a continuous track is maintained even as the aspect changes.
The much smaller model of the Boeing 737 aircraft is harder to detect. The target is visible on
the display for only a short time. In this case, the target is detected not as a function of range, but
of changing aspect angle. The radar detects the aircraft as the target aspect shifts to the left side
of the aircraft where a higher radar cross section exists. The target detection is lost as the aspect
angle moves to the rear quarter which has a much lower cross section even though the target
continues to get closer to the radar. Although it is impossible to obtain test data to validate this
integrated simulation, the results match the real world experience of the author in operating air-
Another example of an engineering trade application where a system with a validated
equation-based model exists uses a small robotic vehicle that can be easily modified so that
model predictions can be compared to test data. The problem looks at replacement of the two
electric motors with a different pair of motors. The problem is to predict the speed of the vehicle
system with the new motors. Instead of building a new equation-based model of the motor, a
Bayesian network model is created from test data of RPM of the motor at various torque loads
and power settings. The Bayesian network model is then substituted for the existing motor
model in the robotic vehicle model. The test vehicle was also modified with the new motors to
compare actual vehicle performance to the integrated model prediction. Due to a difference in
physical size, it was also necessary to change the drive system from gears to a belt and pulley

4

system. These parameters were entered into the model so that the model parameters matched the
configuration of the test vehicle. The test technique for testing the motors and the vehicle system
were different resulting in the Bayesian network motor model having a different fidelity and
resolution than the equation-based system model.
The equation-based model and the Bayesian network model were both used to predict the
performance of the car under four different sets of conditions. The mean of the prediction
distribution is compared to the mean of the test data for both the baseline equation-based model
and the modified integrated model with the error shown in Figure 2.
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
Alkaline, Pwr 8, No
Sled
Ni-Cd, Pwr 8, No
Sled
Alkaline, Pwr 8,
Sled Attached
Alkaline, Pwr 5, No
Sled
Average
Absolute Percent Error
Baseline Model
Modified Model

Figure 2. Robotic Vehicle Model Prediction Error

5

As can be seen in Figure 2, the average error over the four conditions tested is approximately the
same. The distributions of the test samples all fell within the limits of the predictive distributions
created by the models. The average error of approximately 5% is within the accuracy of the test
methods used to collect the performance data.
Another example uses a Bayesian network to control an elevator. Although earlier
research showed that there was a strong advantage to constructing control elements using
Bayesian networks, it would be very difficult to accurately model the physical components of the
elevator with a Bayesian network. The elevator simulation includes a random people generator
that assigns passengers to different floors and simulated desires to move to a different floor. The
elevator itself is constructed with measured delay times for movement, door open and close and
maximum capacity based on measurements from the elevator in the Science and Technology
Building II at George Mason University. Additionally, the Extend M&S package has an
animation capability allowing visualization of elevator operation. All of these factors support
use of an equation-based approach to construct a model of the elevator. Research showed that
using a rule-based approach with an equation model for the control logic is difficult and time
consuming to construct. An integrated simulation, in which control is provided by the Bayesian
network and the other components of the elevator use an equation-based approach, provided a
superior solution with respect to speed of construction and simplicity.
A similar simulation was constructed of a home heating system. The baseline house with
all its heat loss mechanisms such as the walls, windows, doors and roof are modeled with
equation-based elements. The heating system is also an equation-based model. The model is
modified by replacing the single setting thermostat with a programmable thermostat that allows

6

the temperature to change automatically four times per day. The programmable thermostat,
which controls the heating system, is modeled using both an equation-based model and a
Bayesian network. The outside temperature is varied over a 24 hour period using temperature
data for the Washington DC area for the month of January. Each model is run using a Monte
Carlo simulation with the results shown in Figure 3.

0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
6 7 8 9 10 11 12
Fuel (gallons)
Probability
Baseline
Modifed Equation
Modified Bayes Net

Figure 3. Home Heating System Simulation

The programmable thermostats result in an average decrease in fuel consumption of
approximately one gallon per day as compared to the baseline fixed temperature thermostat.
Because the thermostat was a simple model requiring very few elements to construct, both
models had similar outputs and took about the same amount of time to construct.

7

This approach can also be used to simulate business process reengineering. This example
looks at screening of loan applications for approval or disapproval. The baseline process uses
two humans to screen loan applications to determine whether to approve them or route them to a
second, more thorough review for final determination. The baseline model is modified so that
this initial screening process is replaced by a computer screening that conducts the initial review.
The modified model uses a rule-based approach to route the loan applications based on a simple
set of screening rules. The simplified rules identify any application that fails to meet a specified
threshold value in several areas and routes any flagged applications for the second review by a
human. A Bayesian network model is also created that uses a file of previous loan cases to
calculate the node probabilities. The Bayesian network is implemented so that it routes
applications whose attributes indicated less than a 75% probability of repayment for the second,
human review. The results of running the baseline model as compared to the two modified
versions of the model over a 40 hour work period are presented in the simulations of Figure 4.
0
50
100
150
200
250
Loan Application Screen
Aplications per Person per Week
Human Screen
Rule Screening
Bayes Net Screen

Figure 4. Loan Application Screening Simulation

8

The rule-based screening process resulted in a process that was 18% less productive than the
baseline human screening process. By contrast, the Bayesian network model resulted in a 103%
improvement in productivity. This simulation demonstrates the importance of the use of
modeling and simulation when considering process changes. Although one would expect the
introduction of automation to improve the productivity of a process, this example shows that this
is not always the case. In this case, complex interactions caused unintended consequences by
routing a higher number of applications to the second, more labor intensive screening.
Another business process simulation is a virtual representation of the electrical repair
shop at an automotive center. The baseline simulation routes cars to one of three mechanics
using a first in, first out routing process. The simulation is modified by recording reported
symptoms that owners report when dropping off their cars for repair. Not all reports are
accurate. The modified model uses a rule-based approach to route the cars based on a simple set
of diagnostic rules that evaluate the reported symptoms. Cars are then routed to the mechanic
best suited to make the repair of the fault based on the diagnosis. The model was modified again
by replacing the rule-based procedures with a Bayesian network to diagnose the most likely
problem. Probability distributions for the network were learned from previous car repair cases.
Again, the cars are routed to the mechanics best suited to make the repair. The average weekly
gross income for all three simulations is presented in Figure 5.

9

0
5000
10000
15000
20000
25000
30000
35000
Routing Process
\$
First In/First Out
Rule_Routing
Bayes Net Routing

Figure 5. Car Electrical Repair Simulation Gross Weekly Revenue

Both of the diagnostic routing procedures demonstrated improved performance over the baseline
simulation. The Bayesian network routing demonstrated a higher increase in weekly revenue
with a 24% improvement as compared to the rule-based routing at 19%.
An influence diagram was created as part of an air defense network to decide whether to
fire a weapon in response to a radar contact. A Bayesian network created using human judgment
for node probabilities was modified into the influence diagram by the addition of a utility node
and a decision node. The utilities were set so that optimal decisions were made by firing at
targets determined to be hostile while not firing at neutral or friendly targets. The network was
tested by integrating it with the radar/radar cross section model described earlier. The equation-
based model determined some of the node states based on the motion and target aspect of
aircraft. Other states were generated by random number generators set to likely values of the

10

type of aircraft. Random errors and missing values were also added to the inputs. A second
version of the baseline influence diagram was created by adding arcs from the node “Identity” to
nodes “EW” and “Kinematics”. This was done to allow the network to include the airspeed of
the target and whether the radar was on in determining if the contact was hostile. The
probabilities and utilities were then learned from the simulation.
A comparison of the two simulations is presented in Figure 6.
0
50
100
150
200
250
MIG-29 Missile Boeing Airbus F-14
Aircraft
Engagements
Baseline Shoot
Baseline No_Shoot
Simulation-Trained Shoot
Simulation-Trained No_Shoot

Figure 6. Air Defense Test Results

As can be seen from the test results of Figure 6, the simulation-trained network provided much
better decisions and target identifications than the human-judgment baseline. The baseline
network correctly identified and recommended firing at all incoming missiles, but also
recommended firing at 34% of friendly and 10% of neutral aircraft. It also recommended

11

shooting at 75% of MIG-29 aircraft based solely on aircraft type. The test results demonstrated
that the network had difficulty in determining the type of aircraft and a flaw in logic by using
aircraft type as the primary determinate of whether it was hostile. Additional arcs were added to
change the logic to observe aircraft actions in determining hostile intent. A decision policy was
implemented that non-friendly aircraft flying towards the radar position at speeds greater than
500 knots with their targeting radar on were considered hostile. By learning the probabilities and
utilities from the simulation, the simulation-trained network provided much better decisions
during tests recommending firing only at missiles and MIG-29s demonstrating hostile intent.
Provided that the simulation is an accurate representation of the real world, this example
demonstrates a method for accurately training and testing of very complex influence diagrams.
The six examples presented above demonstrate that Bayesian networks and equation-
based models can be used together to form an integrated simulation methodology. Because there
is no single method that is optimal in all circumstances, the integration of both types of models
allows the model builder to choose different approaches for different subsystems, selecting the
best approach for each subsystem. Previous research demonstrated the capability to rapidly and
accurately build Bayesian network models from data allowing the construction of new, complex
models and simulations that are not feasible using a single method. The ability to build rapid and
inexpensive Bayesian network models also improves the capabilities of the modeling and
simulation community to quickly conduct trade studies to determine if a proposed change to an
existing system results in the desired outcome.
The radar tracking and robotic vehicle examples demonstrate that this technique can
accommodate the requirement for constructing mixed-fidelity, mixed resolution models.

12

Measurement error in the data used to construct the Bayesian network will be represented by a
higher spread of values in a constructed Bayesian network. The resolution of a Bayesian
network is primarily a function of the number of bins used for continuous variables. A Bayesian
network constructed from a data set contains both a central tendency and spread that incorporates
uncertainties from both the fidelity of the data and the resolution of the network. Using this data
with a Monte Carlo method in the equation models allows the calculation of probability
distribution as the output. This output provides not only a most likely answer, but the range of
possible values that could possibly occur along with a probability for each possible range of
answers. This approach provides a more complete solution to an engineering trade study than
conventional sensitivity analysis.
The research also demonstrated the use of complex simulations to train influence
diagrams. This approach allowed the network to test the outcomes of the decision options for
different combinations of inputs. The network learned the probabilities and utilities from the
results of each simulation. After many simulations, the network learned which decisions resulted
in the most favorable outcomes. Provided the simulation is an accurate representation of the real
world, the trained and tested influence diagram can then be used as either a decision aid or
autonomous decision system. This approach may be particularly useful in future unmanned
vehicle control systems where a high degree of autonomy is required. The examples provided
above demonstrate the feasibility and utility of integrating Bayesian networks and equation-
based models. The exploitation of this new capability should lead to multiple follow-on research
projects. This approach may prove fruitful in a number of scientific disciplines that make use of
models and simulations.