You are on page 1of 5

Experiment NO.

- 6
 AIM - Write a program to evaluate reliability of the K-out-of –m system with s un- identical and
s- identical components.

 Matlab code –

1. For identical elements –


clc
m = input (‘ enter no.of identical elements in the system =’);
p = input (‘ enter reliability of each element = ’);
k =input (‘enter no of elements required for certain application =’);
x=0;
A=[];
for i = k:m
A(i-k+1) = factorial(m)/(factorial(i)*factorial(m-i))*(P^i)*((1-p)^(m-i))
end
for i =k:m
x = A(i-k+1)+x;
end
R = x;
2. For un - identical elements -
disp(‘for system with unidentical elements’);
n= input(‘enter no. of elements =’);
r=input(‘enter no. of essential elements=’);
p= zeros(1,n); for i=1:n
disp(‘for element’);
i
p(1,i) = input(‘enter reliability of this component’);
end
s=0;
for i= r:n
s=s+ (factorial(n)/(factorial(i)*factorial(n-i))*(p(1,i)^i)*((1-p(1,i))^(n-i)));
end
disp(‘reliability of system = ’);
s
 Output –

1. Enter no. of identical elements in the system = 6


Enter reliability of each element = 0.8
Enter no. of elements required for certain application = 4
A =0.2458
A =0.2458 0.3932
A = 0.2458 0.3932 0.2621
R = 0.9011
2. Enter the no. of un- identical components =5
Enter the no. of essential elements = 3
for element I = 1
Enter reliability of this component = 0.95
for element I = 2
Enter reliability of this component = 0.85
for element I = 3
Enter reliability of this component = 0.80
for element I = 4
Reliability of this system = 0.92
Experiment NO. - 7

 AIM - Write a program to calculate reliability of complex system:


a. Bridge network
b. 7 node network
c. 9 node network

 Matlab code –

clc
pr1 = input (‘ Enter the reliability of element r1=’);
pr2 = input (‘ Enter the reliability of element r2=’);
pr3 = input (‘ Enter the reliability of element r3=’);
pr4 = input (‘ Enter the reliability of element r4 =’);
pr5 = input (‘ Enter the reliability of element r5 =’);
R1 = (1-(1-pr1)*(1-pr2))*(1-(1-pr3)*(1-pr4))
R2 = 1-(1-pr1*pr3)*(1-pr2*pr4) R
= pr5*R1 + (1- pr5)*R

 Output –

Enter the reliability of element r1=0.8


Enter the reliability of element r2=0.75
Enter the reliability of element r3=0.85
Enter the reliability of element r4=0.9
Enter the reliability of elementr5=0.7
R1 =
0.9457
R2 =
0.9060
R=
0.9
Experiment NO. - 7

 AIM - Write a program to calculate reliability of complex system:


1. Bay’s Decomposition method
2. Event space method
 Matlab code –
1. Bays Decomposition Theorem:

clc
pa=input('enter the reliability of element a:');
pb=input('enter the reliability of element b:');
pc=input('enter the reliability of element c:');
pd=input('enter the reliability of element d:');
pe=input('enter the reliability of element e:');
R1=(1-(1-pa)*(1-pc))*(1-(1-pb)*(1-pd))
R2=1-(1-pa*pb)*(1-pc*pd)
R=pe*R1+(1-pe)*R2
 OUTPUT :
enter the reliability of element a: 0.8
enter the reliability of element b: 0.75
enter the reliability of element c: 0.85
enter the reliability of element d: 0.9
enter the reliability of element e: 0.7
R1 = 0.9457
R2 =0.9060
R3=0.9338

2. Event Space Method –


clc;
e=input('Enter the number of elements\n');
p=input('Enter the probability of success');
q=1-p;
s=zeros(1,e);
rel2=0;
rel3=0;
for k=1:e-1
for l=k+1:e
s=zeros(1,e);
s(1,k)=1;
s(1,l)=1;
a=s(1,1);
d=s(1,2);
c=s(1,3);
b=s(1,4);
f=s(1,5);
if (((a==1) & (b==1)) | ((d==1) & (f==1)))
rel3=rel3+(p^2*q^3);
else
rel2=rel2+(p^3*q^2);
end
end
end

rel10=p^5;
rel1=5*p^4*q;
rel4=0;
rel5=0;
rel=rel0+rel1+rel2+rel3;
disp(rel)

 Output –
Enter the number of elements=6

Enter the probability of success =98

rel =6.189e+10

You might also like