-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.m
72 lines (68 loc) · 2.56 KB
/
Main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Program Name : Fault Tree Reliability Analysis Of Underwater Glider %
% Author : Koorosh Aslansefat %
% Version : 1 %
% Description : Reliability of Diffrent sub-system %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Clear Section
% Clear
clear all
close all
clc
%%
% Run Simulation Model
sim('Glider_FTA.mdl');
%%
% Plot Total Reliability
s=figure(1);
set(s,'Color','w');
plot(tout,Y.signals.values,'-.b','LineWidth',3)
hold on
plot(tout,Y1.signals.values,'-.m','LineWidth',3)
title('\fontsize{13}Reliability Comparison Between AUV and AUG')
xlabel('\fontsize{11}Time (hr)')
ylabel('\fontsize{11}Total System Reliability')
hleg = legend('\fontsize{11}AUG','\fontsize{11}AUV',...
'Location','SouthWest');
set(hleg,'FontAngle','italic','TextColor',[.3,.2,.1])
hold off
%% 2
s=figure(2);
set(s,'Color','w');
plot(tout,Reliability.signals(1,1).values,'-.b','LineWidth',3)
title('\fontsize{13}Reliability Comparison of Power Sys. of AUV and AUG')
xlabel('\fontsize{11}Time (hr)')
ylabel('\fontsize{11}System Reliability')
hold on
plot(tout,Reliability1.signals(1,6).values,'-.m','LineWidth',3)
hleg = legend('\fontsize{11}AUG','\fontsize{11}AUV',...
'Location','SouthWest');
set(hleg,'FontAngle','italic','TextColor',[.3,.2,.1])
hold off
%% 3
s=figure(3);
set(s,'Color','w');
plot(tout,Reliability.signals(1,10).values,'-.b','LineWidth',3)
title('\fontsize{13}Reliability Comparison of Navigation Sys. of AUV and AUG')
xlabel('\fontsize{11}Time (hr)')
ylabel('\fontsize{11}System Reliability')
hold on
plot(tout,Reliability1.signals(1,1).values,'-.m','LineWidth',3)
hleg = legend('\fontsize{11}AUG','\fontsize{11}AUV',...
'Location','SouthWest');
set(hleg,'FontAngle','italic','TextColor',[.3,.2,.1])
hold off
%% 4
s=figure(4);
set(s,'Color','w');
plot(tout,Reliability.signals(1,6).values,'-.b','LineWidth',3)
title('\fontsize{13}Reliability Comparison of Computer Sys. of AUV and AUG')
xlabel('\fontsize{11}Time (hr)')
ylabel('\fontsize{11}System Reliability')
hold on
plot(tout,Reliability1.signals(1,2).values,'-.m','LineWidth',3)
hleg = legend('\fontsize{11}AUG','\fontsize{11}AUV',...
'Location','SouthWest');
set(hleg,'FontAngle','italic','TextColor',[.3,.2,.1])
hold off