# System reliability analysis with four limit states

Hello,

I am trying to perform System Reliability Analysis using MCS of a four component series system.

Although the analysis runs perfectly when I define the define the model as the ‘minimum’ of two limit states, it does not when I define four limit states.

systemseriesfailure.m (1.9 KB)

Regards,

Hi,

Perhaps you could clarify how it is actually not working? And what results would you expect?

Hello,

I am trying to perform Monte Carlo Simulation for a series system of four limit states.

As it is a series system, I am defining the series model form a text string as a ‘min’ of the four limit states.

Unfortunately, it’s only working for when I put in two limit states in the string.
If I put in all the four, I get an error that ‘Dimension argument is not supported when
two input arrays are provided.’

Regards

The code that you attached is defined for two limit states only, so it still works. Thus I am going to assume that you define your combined four limit state functions like this that gives you the error (slightly edited for conciseness):

``````...
fullsystem.mString = 'min(limState1, limState2, limState3, limState4)';
...
``````

I think, the problem is that the MATLAB function `min` does not work like that. You can check the documentation (`help min`), but here’s one possible solution based on how it works for your case:

If you have four vectors that you want to put as input into the function then you need to combine them first into a single matrix and then operate the `min` on a particular dimension (either row-wise or column-wise).

So given four vectors `limState1, limState2, limState3, limState4`, you can write:

``````...
fullsystem.mString = 'min([limState1, limState2, limState3, limState4], [], 2)';
...
``````

in which all the limit states are combined into a four-column matrix and uses it as the first argument, then find the minimum along each row (2nd-dimension in MATLAB convention). The middle argument is set empty.

You can substitute each of `limState1`, etc. above with the actual expression of your limit states.

Hopefully, this solves your problem.

1 Like

Thank you so much. This totally solves my problem.

1 Like

You’re welcome