# Problems in the time-dependent reliability calculation with MCS

Dear all,
I have problems getting the time-dependent reliability with MCS, so I cannot get the results in other researchers’ papers.
And the version of uqlab is 2.0.
The MCS involves the following steps.
(1) Generate the random vector sample y and employ the EOLE method to generate the stochastic process vector samples.
(2) Substitute the samples into the performance functions for calculations.
(3) Repeat the above steps until the number of samples reaches a given number ns; then we can obtain the time-dependent system reliability.

The code I used is:

``````% Random variable
clc;
clear all;
n=10^5;
mu=[800 700];
sigma=[800*0.1 700*0.15];
p=sobolset(length(mu),'Skip',10^5);
P1=p(1:n,:);
for i=1:length(mu)
x(:,i)=norminv(P1(:,i),mu(i),sigma(i));
end

% Random Field
nt=501;
delta_t=10/(nt-1);
uqlab;
RFInput.Type = 'RandomField';
RFInput.Corr.Family = 'Gaussian';
RFInput.Corr.Length = 1/sqrt(2);
RFInput.Mean=90;
RFInput.Std=90*0.25;
RFInput.Mesh= linspace(0,10,nt)';
myRF = uq_createInput(RFInput);
yf=uq_getSample(myRF,n,'Sobol');

G1=@(x,t,Yt) x(:,1).*exp(-0.0005*t)-1/8*Yt*5^2;

G2=@(x,t,Yt) x(:,2).*exp(-0.0005*t)-1/2*Yt*5;

g1=G1(x,RFInput.Mesh',yf);

g2=G2(x,RFInput.Mesh',yf);

g=min(g1,g2);

t_end=1:1:10;
t_endpoint=floor(t_end/delta_t+1);

for j = 1 : length(t_endpoint)
for i = 1:n
yp(i)=min(g(i,1:t_endpoint(j)));
end
pf(j)=length(find(yp<=0))./n;
disp([num2str(t_end(j)),'th failure probability is ',num2str(pf(j))])
end
``````

The paper cited is as follows:

``````Jiang C, Wei X P, Huang Z L, et al. An Outcrossing Rate Model and Its Efficient Calculation
for Time-Dependent System Reliability Analysis[J]. Journal of Mechanical Design, 2017, 139(4): 041402.
``````

Try to implement the first numerical case, however, the results obtained are quite different from those in this paper.

``````%Ref results
beta=[3.161 3.026 2.93 2.855 2.793 2.739 2.692 2.65 2.612 2.577];
pf_Ref=normcdf(-beta);
``````

I have tried multiple cases, but none of them could match the results of the original paper.
I would be grateful for any insight on this topic, thank you.

1 Like