UQWorld

Enrichment - LHS

Hi,

Thanks for the wonderful UQ tool -Uqlab. I was trying to set up a reliability problem using Polynomial Chaos Kriging(PCK) with the inclusion of dependency using copulas. I am having a major challenge with LHS enrichment. Without the copula function , everything seems to work fine but when I introduce the Vine copula section (iOpts); I get an error message as shown below - appreciate your assistance . Below is my written line of code with the inclusion of D-Vine which produces error. First is the error and then the written line of code in Matlab.
error message :

Index in position 1 exceeds array bounds (must not exceed 1).
Error in uq_enrichLHS (line 62)
copulaNonConst.Parameters = current_input.Copula.Parameters(indNonConst,indNonConst);
Error in Enrichmentest (line 18)
X4=uq_enrichLHS(X,20);

Matlab Code
uqlab
MOpts.mString = ‘2822-(46.8 X(:,1))-(369 X(:,2))+(540 X(:,3))-(13.74 (X(:,1).^2))+(15*(X(:,2).^2))-(764*(X(:,3).^2))’;
MOpts.isVectorized = 1;
myModel = uq_createModel(MOpts);
iOpts.Marginals(1).Type = ‘Weibull’;
iOpts.Marginals(1).Parameters = [3.598 1.958];
iOpts.Marginals(2).Type = ‘Lognormal’;
iOpts.Marginals(2).Parameters = [2.308 0.1778];
iOpts.Marginals(3).Type = ‘Weibull’;
iOpts.Marginals(3).Parameters = [0.3197 1.841];
iOpts.Copula.Type = ‘DVine’;
iOpts.Copula.Structure = [1 2 3];
iOpts.Copula.Families = {‘Clayton’,‘Clayton’,‘Independent’};
iOpts.Copula.Rotation = [0,270,0];
iOpts.Copula.Parameters = {0.04,0.05,[]};
myInput=uq_createInput(iOpts);
X=uq_getSample(40,‘LHS’);
X4=uq_enrichLHS(X,20);
X5=[X;X4];
Y=uq_evalModel(X5);
Xval=uq_getSample(100,‘MC’);
Yval=uq_evalModel(Xval);
MetaOpts.Type=‘Metamodel’;
MetaOpts.MetaType=‘PCK’;
MetaOpts.Mode=‘Optimal’;
MetaOpts.ExpDesign.X=X5;
MetaOpts.ExpDesign.Y=Y;
MetaOpts.PCE.Degree=1:20;
MetaOpts.Kriging.Optim.Method=‘HGA’;
MetaOpts.ValidationSet.X=Xval;
MetaOpts.ValidationSet.Y=Yval;
myPCK=uq_createModel(MetaOpts);
ISOpts.Type = ‘Reliability’;
ISOpts.Method = ‘IS’;
ISOpts.Simulation.MaxSampleSize=100000;
ISAnalysis = uq_createAnalysis(ISOpts);
uq_print(ISAnalysis);
uq_display(ISAnalysis)
uq_print(myPCK)
YPCK = uq_evalModel(myPCK,Xval);
uq_figure
uq_plot(Yval, YPCK, ‘+’)
hold on
uq_plot([min(Yval) max(Yval)], [min(Yval) max(Yval)], ‘k’)
hold off
axis equal
axis([min(Yval) max(Yval) min(Yval) max(Yval)])
xlabel(’ Ytrue ’)
ylabel(’ YPCK ’)