Professional Documents
Culture Documents
MATLAB Toolboxes
Computer Applications in CEE
Drs. Trani and Rakha
Civil and Environmental Engineering
Virginia Polytechnic Institute and State University
Spring 2000
1 of 31
Sample Toolboxes
Simulink
Fuzzy Logic
Neural Networks
Optimization
Controls
C/C++ compiler library
Real-time workshop
2 of 31
Simulink
3 of 31
4 of 31
Simulink Interface
5 of 31
6 of 31
7 of 31
Simulink Example
The following example illustrates the use of Simulink to
solve a two vehicle car-following problem. This problem
has been studied for the past 40 years in traffic flow
theory
x( t + ) fc = k ( x( t ) lc x( t ) fc )
where: k is a gain constant of the response process
8 of 31
9 of 31
Mux1
Xdot
s
Integrator
s
Integrator1
Mux
Mux
Distance Profiles
Speed LTU
2
k (Xdot_ltu - Xdot_ftu)
Xdot_ltu - Xdot_ftu
Constant
1
s
Integrator2
10 of 31
Time (s)
11 of 31
Time (s)
12 of 31
Mux1
Xdot
X
s
Integrator
s
Integrator1
Mux
Mux
Distance Profiles
Transport
Delay
Speed LTU
Xdot_ltu - Xdot_ftu
k (Xdot_ltu - Xdot_ftu)
1
Constant
1
s
Integrator2
13 of 31
Space (m)
Time (s)
Virginia Polytechnic Institute and State University
14 of 31
15 of 31
Input
a3
P
W1
RxQ
Z1xR
1
a1
n1
W2
Z1xQ
F2
n2
Z2xZ1
, a2
W3
Z2xQ
Z3xZ2
F3
n3
Z3xQ
Z1xQ F1
b1
Z1x1
b2
Z2xQ
Z2X1
b3
Z3xQ
Z3x1
16 of 31
17 of 31
Verify the accuracy of the model with the current stateof-the art
18 of 31
19 of 31
Modeling Approach
Training Data Set
Learning Module
Import Data
Data Normalization
Forward
Propagation
Compute
Error
Initialize connection
Weights
Configuration
Parameters
Change and
Update weights
YES
Error<
eg
NO
Number
of cycles > me
eg - maximum allowable error
me- maximum allowable iterations
NO
YES
End of learning
20 of 31
1
1
sum
1
b
1
w
1,1
Target
f1
1
1
1,1
2
1
sum
f2
2
b
1
f1
sum
f2
sum
sum
f1
sum
f2
sum
f1
sum
f2
2
1
Altitude
Mach
sum
f1
f2
Initial
Weight
sum
ISA Cond.
sum
f1
sum
f2
sum
f1
sum
f2
1
w
8,4
sum
f1
sum
n
sum
1
8
1
8
2
8,8
3
1
Fuel burn
f3
3
1
2
8
2
8
f2
2
8
21 of 31
ANN Data
The data sets used to develop and train the ANN are
shown below. Generalization of the ANN was conducted
using another (random) data set
Flight Phase
Takeoff and Climbout
Climb to Cruise Altitude
Cruise
Descent
22 of 31
Distance
Fuel
Cruise Specific
Air Range
Mean
Error (%)
Standard
Deviation (%)
Null Hypothesis
(t-test at = 0.01 )
0.377
1.026
0.305
0.190
Accept
Accept
-0.034
0.334
Accept
23 of 31
Flight Phase
Descent
Distance
Fuel
Mean
Error (%)
Standard
Deviation (%)
Null Hypothesis
(t-test at = 0.01 )
1.760
1.423
1.860
1.177
Accept
Accept
24 of 31
5000
Estimated Data
4000
3000
2000
1000
0
10
15
20
25
30
35
40
25 of 31
140
Frequency
120
100
80
60
40
20
0
-1.5
-1
-0.5
0
0.5
Specific Range Error (%)
1.5
26 of 31
Altitude (kft)
30
Climb
Descent
20
DFW
10
29.5
0
80 MIA
28
27.5
85
90
Longitude (deg)
29
28.5
27
26.5
95
100
Latitude (deg)
26
27 of 31
Distance
(nm) /
Time (hr)
Flight Manual
Fuel Burn
(lb)
Neural Net
Fuel Burn (lb)
Percent
Difference (%)
ROAaMDWb
280
448 / 1:08
6,457
6,546
1.37
310
448 / 1:10
6,360
6,330
0.46
MIAc-DFWd
310
972 / 2:24
11,851
11,865
0.12
350
972 / 2:13
11,510
11,544
0.29
290
352 / 0:57
5,298
5,260
0.71
330
352 / 0:58
5,343
5,429
1.61
290
518 / 1:20
6,990
7,047
0.80
330
518 / 1:21
7,009
7,082
1.04
Flight
ROA-LGAe
ATLf-MIA
28 of 31
29 of 31
[W31_cb_d,b31_cb_d,W32_cb_d,b32_cb_d,W33_cb_
d,b33_cb_d ]= trainlm(W31_cb_d,b31_cb_d,'logsig' ...
,W32_cb_d,b32_cb_d,'tansig',W33_cb_d,b33_cb_d,'pure
lin',P_cbd,Ta_cbd,tp);
%********************************
%
For Climb Fuel
**
%********************************
[W31_cb_f,b31_cb_f,W32_cb_f,b32_cb_f,W33_cb_f,b3
3_cb_f ]=initff(P1_cbf,nns,'logsig',nns2,'tansig' ...
,T1_cbf,'purelin');
% Taining of the neural networks using LavenbergMarquardt Alogrithm
[W31_cb_f,b31_cb_f,W32_cb_f,b32_cb_f,W33_cb_f,b3
3_cb_f ]=
trainlm(W31_cb_f,b31_cb_f,'logsig',W32_cb_f ...
Virginia Polytechnic Institute and State University
30 of 31
,b32_cb_f,'tansig',W33_cb_f,b33_cb_f,'purelin',P_cbf,
Ta_cbf,tp);
31 of 31