MATLAB Functions for the First, Second and Inverse First Order Reliability Methods Copyrighted by Erik Kostandyan, Contact: erik.kostandyan.reliability@gmail.com Contents Description... References:... Operational Instructions... Notes regarding ReliabilityByFORM.p, ReliabilityBySORM.p and InverseReliabilityByFORM.p codes... FORM Input... FORM Output... 3 SORM Input... 3 SORM Output... 3 Inverse FORM Input... 3 Inverse FORM Output... 4 Examples... 5 Ex.... 5 FORM / SORM Solution Ex.... 5 Inverse FORM Solution Ex.... 5 Ex.... 6 FORM / SORM Solution Ex.... 6 Ex. 3... 7 FORM / SORM Solution Ex. 3... 8 Inverse FORM Solution Ex. 3... 9 Ex. 4... 9 FORM / SORM Solution Ex. 4... 9 Ex. 5... 0 FORM / SORM Solution Ex. 5... 0 Inverse FORM Solution Ex. 5... Ex. 6... FORM / SORM Solution Ex. 6... Inverse FORM Solution Ex. 6... Description First Order Reliability Method (FORM) is a method of estimating the reliability index ( ), and failure function is approximated by its linear form. Second Order Reliability Method (SORM) approximates failure function by its quadratic form. FORM allows estimating invariant reliability index irrespective to the limit state function (safety margin) formulation. This index also known as the Hasofer and Lind reliability index (see []). Stochastic variables that construct limit state function are transformed to the standard normal stochastic variables. Based on these variables, the limit state function is transformed to the standardized domain. In standardized domain, the reliability index is defined as the shortest distance from the origin to the limit state function, and this solution is termed a design point in standardized domain. To find the shortest distance, the numerical differentiation with iterative algorithm is applied (see []), this method is incorporated by ReliabilityByFORM.p. The probability of failure is estimated approximately using the reliability index by: PFORM ( FORM ). Once the design point is estimated, SORM might be applied by ReliabilityBySORM.p at the design point, and probably of failure and reliability index by SORM might be estimated: P ( ). ReliabilityBySORM.p is based on [] suggested formula, where quadratic SORM SORM of the approximated failure function is rotated (via Gram Schmidt) such that alpha vector is on the first axis and the rest main curvatures are estimated based on Hessian matrix.
Inverse FORM is based on the FORM logic with some modification to incorporate search direction (see [3]). Output of the algorithm is a parameter under the interest. If more than parameter under the interest was set up (indicating multiple solutions), then the program estimates the shortest distance point in parameter space and reports those values as well as the line equation based on which multiple solutions might be found. References: [] H.O. Madsen, S. Krenk, N.C. Lind, Methods of structural safety. Prentice-Hall, Englewood Cliffs, London, 986. [] Hohenbichler, M. and Rackwitz, R. (988). Improvement Of Second Order Reliability Estimates by Importance Sampling. J. Eng. Mech.,4(), 95 99. [3] Der Kiureghian, Armen, Yan Zhang, and Chun-Ching Li. "Inverse reliability problem." Journal of engineering mechanics 0, no. 5 (994): 54-59. Operational Instructions Save Setup.m, LimitStateFunction.m, ReliabilityByFORM.p, ReliabilityBySORM.p, InverseReliabilityByFORM.p in the same folder. Open Setup.m and LimitStateFunction.m then modify them accordingly then save them and run Setup.m. Please see some examples below. Notes regarding ReliabilityByFORM.p, ReliabilityBySORM.p and InverseReliabilityByFORM.p codes The difference quotient in numerical differentiation is user adjustable, Absolute error_tolerance of limit state value in standardized domain for FORM is user adjustable, as well as for Inverse FORM, Maximum number of iterations in either function is set to 50,000. So if you see that result is reported on the 50,000 iteration, it means your problem has been stopped from looping. Try to change the difference quotient and error_tolerance and try again. If again the result is reported on the 50,000 iteration, it means your problem does not have a solution (at least mathematically). For the given vector X with marginal distributions, means, standard deviations, and linear correlation structures, Nataf transformation (Gaussian Copulas) is used to estimate the fictive correlation matrix, and then either the Cholesky or Eigen decomposition is used, this selection is user adjustable, If x is a vector of initial variables, x=[x(), x(),..., x(n)], with known input vectors {Mean vector, Standard Deviation vector, Correlation Matrix and Distribution vector}, then: o Set up for FORM/SORM: 'Constants' (Constant,Constant,Constant3) are any matrixes or vectors defined in Setup.m that could be declared into the Limit State Function, and FORM/SORM can be called interactively by any loop and results could be stored. o Set up for InverseFORM: 'Constants' are the same as for FORM/SORM set up, 'Parameter' is a Parameter (can be a vector) of the Limit State Function which we wish to find such that target reliability index is Target_HL_ReliabilityIndex in Setup.m. o o Limit State Function for FORM/SORM: 'Parameter' is not used and better to alway set to zero in Setup.m or turned it off. g={any expression with x(i) and Constants}, if Constants exist in Setup.m, otherwise g={any expression with x(i)}, and Constants are not used and better to set them to zero in Setup.m or turned them off. Limit State Function for InverseFORM: 'Parameter' is set to some inital guess in Setup.m. g={any expression with x(i), Parameter and Constants}, if Constants exist in Setup.m, otherwise g={any expression with x(i), Parameter} and Constants are not used and better to set them to zero in Setup.m or turned them off. Note: In any input vector keep the order of variables x(i) as they appear in the vector x=[x(), x(),..., x(n)], see below for the examples. FORM Input If x is a vector of initial variables, x=[x(), x(),..., x(n)], with Mean vector, Standard Deviation vector, Correlation Matrix, Distribution vector, then the defined Limit State Function has to be in the following format: LimitStateFunction: g={any expression with x(i) and may be Constants} defined in LimitStateFunction.m dz is the difference quotient in numerical differentiation,
error_tolerance an absolute error for limit states from adjacent iterations in standardized domain, Mean_X is Mean row vector, SD_X is Standard Deviation row vector, Dist_X is Distribution row vector: o for Normal=, LogNormal=, GumbelMax=3, WeibullMin=4, Uniform=5, Cor_X is Correlation Matrix, NatafTransform is a binary variable for the decomposition method in Nataf transformation: o NatafTransform=0 => Based on CholeskyDecomposition, o NatafTransform= => Based on EigenDecomposition. Constant, Constant, Constant3 any numerical values that should be considered in LimitStateFunction.m, FORM Output ProbabilityOfFailure_FORM = Probability Of Failure by FORM, HL_ReliabilityIndex = Hasofer-Lind Reliability Index, LimitStateFunctionValue for the final solution NumberOfIterations Alfa_Z = Unit Row Vector Values in Normalized Space, OmissionSensitivityFactor=relative importance on reliability index by assuming stochastic variable i is deterministic, DesignPoint_Z = Coordinates of Design Point in Normalized Space, DesignPoint_X = Coordinates of Design Point in Initial Space, GradientVector = Gradient Row Vector at the DesignPoint_Z. Sign is defined: o if sign= => Alfa_Z and DesignPoint_Z have same direction => B>0 o if sign=0 => Alfa_Z and DesignPoint_Z not same direction => B<0 SORM Input If x is a vector of initial variables, x=[x(), x(),..., x(n)], with Mean vector, Standard Deviation vector, Correlation Matrix, Distribution vector, then the defined Limit State Function has to be in the following format: LimitStateFunction: g={any expression with x(i) and may be Constants} defined in LimitStateFunction.m, DesignPoint_Z=Coordinates of Design Point in Normalized Space (can be found by FORM), dz is the difference quotient in numerical differentiation, Mean_X is Mean row vector, SD_X is Standard Deviation row vector, Dist_X is Distribution row vector: o for Normal=, LogNormal=, GumbelMax=3, WeibullMin=4, Uniform=5, Cor_X is Correlation Matrix, NatafTransform is a binary variable for the decomposition method in Nataf transformation: o NatafTransform=0 => Based on CholeskyDecomposition, o NatafTransform= => Based on EigenDecomposition. Constant, Constant, Constant3 any numerical values that should be considered in LimitStateFunction.m, SORM Output ProbabilityOfFailure_SORM = Probability Of Failure by SORM, SORM_ReliabilityIndex = SORM Reliability Index, Alfa_Z = Unit Row Vector Values in Normalized Space, GradientVector = Gradient Row Vector at the DesignPoint_Z, HessianMatrix = Hessian Matrix at the DesignPoint_Z. Inverse FORM Input If x is a vector of initial variables, x=[x(), x(),..., x(n)], with Mean vector, Standard Deviation vector, Correlation Matrix, Distribution vector, then the defined Limit State Function has to be in the following format: LimitStateFunction: g={any expression with x(i) and Parameter, and may be Constants} defined in LimitStateFunction.m dz is the difference quotient in numerical differentiation,
error_tolerance an absolute error for limit states from adjacent iterations in standardized domain, Mean_X is Mean row vector, SD_X is Standard Deviation row vector, Dist_X is Distribution row vector: o for Normal=, LogNormal=, GumbelMax=3, WeibullMin=4, Uniform=5, Cor_X is Correlation Matrix, NatafTransform is a binary variable for the decomposition method in Nataf transformation: o NatafTransform=0 => Based on CholeskyDecomposition, o NatafTransform= => Based on EigenDecomposition. Constant, Constant, Constant3 any numerical values that should be considered in LimitStateFunction.m, Parameter is what we would like to estimate in limit state function such that reliability index is equal to Target_HL_ReliabilityIndex. Parameter might be a vector, in this case indexing should be used in LimitStateFunction.m and Setup.m. Also, parameter values in Setup.m is the initial guess values. Target_HL_ReliabilityIndex, is a value that we are aiming for the reliability index. Inverse FORM Output DesignConstant estimated parameter or parameters (if more than one parameter was requested to be found then the closest to the origin form the parameter space is reported) DesignConstantEquation a line equation from which parameter(s) might be estimated, reported in equation format such as: size{parameters Space} i= C i Parameter i + Constant = 0, where Ci is constant(s). Iteration= number of iteration until the solution is found
Examples Ex. Limit state function 48x x 3600x 3 3 x ~ Normal( mean, sd 0.6) x ~ Normal( mean *0 ^ 7, sd 3*0 ^ 6) x ~ Normal( mean *0 ^ 5, sd *0 ^ 6) All x s are independent. FORM / SORM Solution Ex. LimitStateFunction: g=48*x()*x(3)-constant*x(); dz=0^-3; error_tolerance=0^-; Mean_X=[ *0^7 *0^-5]; SD_X=[0.6 3*0^6 *0^-6]; Dist_X=[ ]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=[3600]; Constant=0; Constant3=0; ProbabilityOfFailure_FORM = 8.54644077e-04 HL_ReliabilityIndex = 3.48868379488 LimitStateFunctionValue = -0.0059954083 NumberOfIterations = 5 Alfa_Z = 0.6030839643-0.74433898646-0.35533033863499 OmissionSensitivityFactor =.537748899.4830890566.06988940307806 DesignPoint_Z =.89894755404 -.4798997690 -.9573870874 DesignPoint_X =.0e+07 * 0.00000033934885.35633073 0.00000000000776 GradientVector =.0e+03 * -.6000000000674.557665867558.759647083999 sign = ProbabilityOfFailure_SORM = 8.99794684954836e-04 SORM_ReliabilityIndex = 3.456395366 Alfa_Z = 0.60308396407-0.74433898993-0.3553303386364 GradientVector =.0e+03 * -.59999999999855.557665867558.7596470880 HessianMatrix =.0e+0 * -0.000000036379788 0 0 0 0.8799999977673 0.8799999977673 0.000000036379788 Inverse FORM Solution Ex.
LimitStateFunction: g=parameter*x()*x(3)-constant*x(); dz=0^-3; error_tolerance=0^-; Mean_X=[ *0^7 *0^-5]; SD_X=[0.6 3*0^6 *0^-6]; Dist_X=[ ]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=[3600]; Constant=0; Constant3=0; Parameter=[]; Target_HL_ReliabilityIndex=3.4885707805633; DesignConstant = 47.99485083656593 DesignConstantEquation =.0e+04 * 0.0404648556979 -.5407954746 Iteration = 4 Ex. Limit state function x x x ~ Uniform( mean 50, sd 8.87) x ~ Weibull( mean.5, sd.5) or x ~ Exponential ( 0.08) x x Cor _ x x 0.5 x 0.5 0.5 0.5 FORM / SORM Solution Ex. LimitStateFunction: g=x()-x(); dz=0^-5; error_tolerance=0^-3; Mean_X=[50.5]; SD_X=[8.87.5]; Dist_X=[5 4]; Cor_X=[ 0.5; 0.5 ]; NatafTransform= see below; Constant=0; Constant=0; Constant3=0; Output for NatafTransform = 0 ProbabilityOfFailure_FORM = 0.0496965874 HL_ReliabilityIndex =.6595853075373 LimitStateFunctionValue = -9.44078658736e-05 NumberOfIterations = 6
Alfa_Z = -0.7804030876 0.655500077 OmissionSensitivityFactor =.598743937673.8678995858 DesignPoint_Z = -.89690070678.033907493458 DesignPoint_X = 9.85445670889757 9.85455969973 GradientVector =.56497998499050-8.9444350030955 sign = ProbabilityOfFailure_SORM = 0.0478875659933 SORM_ReliabilityIndex =.6773073457 Alfa_Z = -0.78003955560 0.6557898664 GradientVector =.563994094504-8.9444079766883 HessianMatrix = 9.77809607300300-3.8605899705760-3.8605899705760-5.5605984374605 Output for NatafTransform = ProbabilityOfFailure_FORM = 0.04969655990434 HL_ReliabilityIndex =.6595848976873 LimitStateFunctionValue = -9.38674605989e-05 NumberOfIterations = 6 Alfa_Z = -0.935055375899 0.363778698508 OmissionSensitivityFactor =.74953033403.0735846048504 DesignPoint_Z = -.5397578698 0.608008505757 DesignPoint_X = 9.8544953306964 9.8545895705667 GradientVector = 3.39930475574894-5.007634596009 sign = ProbabilityOfFailure_SORM = 0.04788904957576 SORM_ReliabilityIndex =.677883493 Alfa_Z = -0.93504995835 0.36378589860 GradientVector = 3.39836950986-5.00488838794 HessianMatrix = 9.66747870498 4.038009964355 4.038009964355-5.50556043058379 Ex. 3 Consider the beam: p The load p is uniformly distributed and the maximum bending moment is m 9 8 max pl. The failure condition is max F m m.
m F p, l, and are outcomes of uncorrelated Normally distributed variables P, L, and deviations: E[P] =.0 kn/m SD[P]= 0.4 kn/m E[L] = 4.0 m SD[L]= 0.4 m E[ ] = 5.0 knm SD[ ]= 0.4 knm M F M F M F with expected values and standard Calculate the reliability index, the annual probability of failure and the - values? 9 Given: Limit state function x x x 8 x ~ Normal( mean, sd 0.4) x ~ Normal( mean 4, sd 0.4) x ~ Normal( mean 5, sd 0.4) 3 3 FORM / SORM Solution Ex. 3 LimitStateFunction: g=x(3)-(9/8)*x()*(x()^); dz=0^-5; error_tolerance=0^-3; Mean_X=[ 4 5]; SD_X=[0.4 0.4 0.4] ; Dist_X=[ ]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=0; Constant=0; Constant3=0; ProbabilityOfFailure_FORM = 0.00487937506 HL_ReliabilityIndex = 3.050530355439 LimitStateFunctionValue =.655700534900e-04 NumberOfIterations = 3 Alfa_Z = 0.634495000490 0.69696364790740-0.373909503939 OmissionSensitivityFactor =.796783949.388897070470307.07659464980 DesignPoint_Z =.8833549545068.70036797847 -.30048909095437 DesignPoint_X =.75334988079 4.846800947999 4.5479804363686 GradientVector = -0.66069785873438-0.75065096440956 0.399999999967093 sign = ProbabilityOfFailure_SORM = 0.0005469094 SORM_ReliabilityIndex = 3.07454575304033 Alfa_Z = 0.6344307954540 0.6969668807-0.3739098600978 GradientVector = -0.66069785868989-0.7506506546883 0.400000000050 HessianMatrix = -0.0000088878497-0.09057668683 0-0.09057668683-0.06959365588 0 0 0-0.0000088878497
Inverse FORM Solution Ex. 3 LimitStateFunction: g=parameter*x(3)-(9/8)*x()*(x()^); dz=0^-5; error_tolerance=0^-3; Mean_X=[ 4 5]; SD_X=[0.4 0.4 0.4] ; Dist_X=[ ]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=0; Constant=0; Constant3=0; Parameter=[]; Target_HL_ReliabilityIndex=3.99; DesignConstant =.4944098495 DesignConstantEquation = 4.3580734466730-5.40843639538 Iteration = 6 Ex. 4 In reliability, assessment of a structural element the following limit state function (failure function) is used: g = R X Q where R is Strength with Log Normal distribution (μ= 400 kn/m, s=0 kn/m ) X is Model uncertainty with Normal distribution (μ=, s=0.) G is Annual maximum Load with Gumbel distribution (μ= 00 kn/m, s=30 kn/m ) The stochastic variables are considered independent. Calculate the reliability index, the annual probability of failure and the - values? Given: Limit state function x xx3 x ~ LogNormal ( mean 400, sd 0) x ~ Normal( mean, sd 0.) x ~ Gumbel( mean 00, sd 30) 3 FORM / SORM Solution Ex. 4 LimitStateFunction g=x()-x()*x(3); dz=0^-5; error_tolerance=0^-3; Mean_X=[400 00]; SD_X=[0 0. 30]; Dist_X=[ 3] Cor_X=[,0,0; 0,,0; 0,0,] NatafTransform=0 Constant=0; Constant=0; Constant3=0;
ProbabilityOfFailure_FORM = 5.9058987539738e-06 HL_ReliabilityIndex = 4.38033007534390 LimitStateFunctionValue = 4.0600439764434e-05 NumberOfIterations = 5 Alfa_Z = -0.5897769008 0.83065848640097 0.9458394873309 OmissionSensitivityFactor =.0880856047.04600904646974 3.083469374494 DesignPoint_Z = -0.696447643395595.39537958838 4.439065063063 DesignPoint_X =.0e+0 * 3.858377706773 0.0395379588 3.43856053577075 GradientVector =.0e+0 * 0.97985498336-0.343856054466 -.4705054670594 sign = ProbabilityOfFailure_SORM = 5.5405057948e-06 SORM_ReliabilityIndex = 4.3955784696504 Alfa_Z = -0.5897734385666 0.830667985453 0.94583845437900 GradientVector =.0e+0 * 0.979877957-0.3438560536778 -.47049897673 HessianMatrix = 0.964064383879304 0 0 0-0.00368683776-0.05553373 0-0.05553373-5.4866537398689 Ex. 5 Given: Limit state function x x x 3 4 3 x ~ LogNormal ( mean 400, sd 0) x ~ Normal( mean, sd 0.) x ~ Gumbel( mean 00, sd 30) FORM / SORM Solution Ex. 5 LimitStateFunction: g=(x()^constant)-(x()^constant)*(x(3)^constant3); dz=0^-4; error_tolerance=0^-3; Mean_X=[400 00]; SD_X=[0 0. 30]; Dist_X=[ 3]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=; Constant=; Constant3=4; ProbabilityOfFailure_FORM = 0.99999995074383 HL_ReliabilityIndex = -5.394468309443 LimitStateFunctionValue = -3.050499944947660e-04
NumberOfIterations = Alfa_Z = -0.066949938075775 0.45358949586 0.987303096 OmissionSensitivityFactor =.004873436795.00757687879 6.5366078605 DesignPoint_Z = 0.35680809380846-0.7739809859685-5.60859755668 DesignPoint_X =.0e+0 * 4.066876707848 0.00960904707 0.09953589759855 GradientVector =.0e+05 * 0.65945590375-0.35854897739633 -.437375683 sign = 0 ProbabilityOfFailure_SORM = 0.99999994794744 SORM_ReliabilityIndex = -5.3994303550 Alfa_Z = -0.0669537407957 0.453784448 0.9879655033 GradientVector =.0e+05 * 0.659589635308-0.3585399546473 -.43697054707445 HessianMatrix =.0e+05 * 0.06590336598 0 0 0-0.03886850043759-0.588439330 0-0.588439330-3.064807356876 Inverse FORM Solution Ex. 5 LimitStateFunction: g=parameter*(x()^constant)- (x()^constant)*(x(3)^constant3); dz=0^-4; error_tolerance=0^-3; Mean_X=[400 00]; SD_X=[0 0. 30]; Dist_X=[ 3]; Cor_X=[,0,0; 0,,0; 0,0,]; Constant=; Constant=; Constant3=4; Parameter=[]; Target_HL_ReliabilityIndex=3; DesignConstant =.37709990e+04 DesignConstantEquation =.0e+09 * 0.0005595799446-3.489886534869 Iteration = 4 Ex. 6 Given: Limit state function 377x x x x 4 4 3
x ~ LogNormal( mean 400, sd 0) x ~ Normal( mean, sd 0.) x ~ Gumbel( mean 00, sd 30) 3 x ~ Normal( mean 0, sd 3) 4 FORM / SORM Solution Ex. 6 LimitStateFunction: g=377*(x()^constant)+x(4)- (x()^constant)*(x(3)^constant3); dz=0^-4; error_tolerance=0^-3; Mean_X=[400 00 0]; SD_X=[0 0. 30 3]; Dist_X=[ 3 ]; Cor_X=eye(length(Mean_X)); Constant=; Constant=; Constant3=4; ProbabilityOfFailure_FORM = 0.003499694 HL_ReliabilityIndex =.99999679738766 LimitStateFunctionValue = -.09968678750e-04 NumberOfIterations = 8 Alfa_Z = -0.077474879900 0.4783455465686 0.985998673595-0.000000000663464 OmissionSensitivityFactor =.00989909566.0099088744 5.9968874540484.000000000000000 DesignPoint_Z = -0.3449908973 0.44350993006637.95799856043757-0.00000000990389 DesignPoint_X =.0e+0 * 3.9490738599888 0.0044350993007.37834589733680 0.9999999994088 GradientVector =.0e+09 * 0.3487573688336-0.6683058836975-4.457388659460 0.00000000999306 sign = ProbabilityOfFailure_SORM = 0.003889666938 SORM_ReliabilityIndex = 3.00736967963 Alfa_Z = -0.0775496686 0.478438896865 0.98599709065-0.000000000663504 GradientVector =.0e+09 * 0.3487556546496-0.6683073904807-4.4570595305347 0.00000000999306 HessianMatrix =.0e+09 * 0.0348543643954 0 0 0 0-0.0639964335633-0.85356558740 0 0-0.85356558740-5.53339774463 0 0 0 0 0 Inverse FORM Solution Ex. 6 dz=0^-4; error_tolerance=0^-3; Mean_X=[400 00 0]; SD_X=[0 0. 30 3];
Dist_X=[ 3 ]; Cor_X=eye(length(Mean_X)); Constant=; Constant=; Constant3=4; Parameter=[ ]; Target_HL_ReliabilityIndex=; DesignConstant = 0.709773045804 0.0000000054094 DesignConstantEquation =.0e+09 * 3.570535983089 0.00000009999743-0.953047047 Iteration = 6