# Four-Branch Function

**URL:** <https://uqworld.org/t/four-branch-function/59>\
**Category:** Benchmarks\
**Tags:** 2-dimension, test-function, reliability\
**Created:** [January 25, 2019, 2:01pm UTC](https://uqworld.org/t/four-branch-function/59 "2019-01-25T14:01:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![damarginal](https://uqworld.org/user_avatar/uqworld.org/damarginal/32/73_2.png) [@damarginal](https://uqworld.org/u/damarginal)\
**Post date:** [January 25, 2019, 2:01pm UTC](https://uqworld.org/t/four-branch-function/59/1 "2019-01-25T14:01:20Z")

</div>

The 2-dimensional four-branch function is a common benchmark problem in reliability analysis (Schueremans and van Gemert, 2005; Echard et al., 2011; Schöbi et al., 2017). The function describes the failure of a series system with four distinct limit state components.

## Description

The mathematical formulation of the four-branch function reads:

f(\mathbf{x},p) = \min \begin{Bmatrix} 3 + 0.1(x\_1 - x\_2)^2 - \frac{x\_1 + x\_2}{\sqrt{2}}\\ 3 + 0.1(x\_1 - x\_2)^2 + \frac{x\_1 + x\_2}{\sqrt{2}}\\ (x\_1 - x\_2) + \frac{p}{\sqrt{2}}\\ (x\_2 - x\_1) + \frac{p}{\sqrt{2}} \end{Bmatrix}

where the input variables \mathbf{x} = \{x\_1, x\_2\} are modeled as two independent Gaussian random variables and p is a constant parameter. The default constant parameter value is 6.

The failure event is defined as f(\mathbf{x}) \leq 0 and the failure probability P\_f = \mathbb{P}[f(\mathbf{x}) \leq 0]. Figure 1 and 2 show the surface and contour plot of the four-branch function, respectively. In Figure 2, the limit state function (f(\mathbf{x}) = 0) is shown.

![fourBranchSurface](https://uqworld.org/uploads/default/original/1X/3d4f590028b036ba69ca5c7f9ab21a9bf8e27577.png)  
**Figure 1** : Surface plot of the four-branch function.

![fourBranchContour](https://uqworld.org/uploads/default/original/1X/0585787f060d7fb4a4aa7d24d8b8228afcfbb877.png)  
**Figure 2** : Contour plot of the four-branch function. The limit state function is also shown.

## Inputs

The two input variables are modeled as independent Gaussian random variables.

| No | Variable | Distribution | Parameters |
| --- | --- | --- | --- |
| 1 | x\_1 | Gaussian | \mu\_{x\_1} = 0  
\sigma\_{x\_1} = 1 |
| 2 | x\_2 | Gaussian | \mu\_{x\_2} = 0  
\sigma\_{x\_2} = 1 |

## Constant parameter

The default value of the constant parameter p is 6.

## Reference values

Some reference values for the failure probability P\_f from the literature are shown in the table below.

| Method | N | \hat{P}\_f | \text{COV}[\hat{P}\_f] | Source |
| --- | --- | --- | --- | --- |
| MCS | 10^8 | 4.460 \times 10^{-3} | 1.5\% | Schöbi et al. (2017) |
| MCS | 10^6 | 4.416 \times 10^{-3} | 0.15\% | Echard et al. (2011) |
| IS | 1469 | 4.9 \times 10^{-3} | - | Echard et al. (2011) |

## Resources

The vectorized implementation of the four-branch function in MATLAB as well as the script file with the model and probabilistic inputs definitions for the function in UQLAB can be downloaded below:

[uq\_fourBranch.zip](https://uqworld.org/uploads/default/original/1X/d4193178f68b40a564ef11f6cb331d21093428c5.zip) (2.5 KB)

The contents of the file are:

| Filename | Description |
| --- | --- |
| `uq_fourBranch.m` | vectorized implementation of the four-branch function |
| `uq_Example_fourBranch.m` | definitions for the model and probabilistic inputs in UQLab |
| `LICENSE` | license for the function (BSD 3-Clause) |

## References

- B. Echard, N. Gayton, and M. Lemaire, “AK-MCS: An active learning reliability method combining Kriging and Monte Carlo simulation”, _Reliability Engineering and System Safety_, vol. 33, no. 2, pp. 145-154, 2011. [DOI:10.1016/j.strusafe.2011.01.002](https://doi.org/10.1016/j.strusafe.2011.01.002)
- R. Schöbi, B. Sudret, and S. Marelli, “Rare event estimation using polynomial-chaos Kriging,” _Journal of Risk Uncertainty in Engineering System, Part A: Civil Engineering_, vol. 3, no. 2, 2017. [DOI:10.1061/AJRUA6.0000870](https://doi.org/10.1061/AJRUA6.0000870)
- L. Schueremans and D. van Gemert, “Benefit of splines and neural networks in simulation based structural reliability analysis,” _Structural Safety_, vol. 27, no. 3, 2005. [DOI:10.1016/j.strusafe.2004.11.001](https://doi.org/10.1016/j.strusafe.2004.11.001)
