CARPATH

AMON

Equipment

FORC

Projects

JARP

IEEE

Courses

PHI

doFORC Test

Click here to download this page as PDF

In order to study smoothing methods it is of paramount importance to use made-up data where the true model is known. Certainly in the usual application no representation of the true underlying function or surface is known, but if a method approximates a variety of surface behavior faithfully, then we expect it to give reasonable results in other cases. Consequently, the implemented methods were tested for accuracy on artificial data sets constructed by adding Gaussian (normal) noise and/or outliers to different test functions.

Our test suite consists of 15 functions, some of them with multiple features and abrupt transitions. While all the test functions are continuous, some of them have a discontinuous derivative at one point, what make smoothing and the derivatives estimation quite challenging.

A dedicated GUI allows users to easily choose one of the functions, to add noise, outliers, and placement of the input points. Nodes placement can be varied from a regular grid to a complete spatial randomness.

As doFORC is mainly dedicated to FORC diagrams calculation, the test functions $f_{3},f_{4},f_{5},$ and $f_{6}$ provide FORCs for different types of Preisach distributions. For all other test functions the data can be generated either in a rectangular domain or in a FORC style in the $h_{\mathrm{applied}}\geq h_{\mathrm{reversal}}$ half-plane.

Test Functions
1 Probability density function (PDF) of the bivariate normal distribution:

$\begin{array}{l} {P_{\:{\mathrm{BVN}}}\left( x,y,\mu _x,\mu _y,\sigma _x,\sigma _y,\rho \right) =} \\ \qquad = \dfrac{1}{2\pi \sigma _x\sigma _y\sqrt{1-\rho ^{2}}}\;\exp \left\{ -\dfrac{1}{2\left( 1-\rho ^{2}\right) }\left[ \left( \dfrac{x-\mu _x}{\sigma _x}\right) ^{2}+\left( \dfrac{y-\mu _y}{\sigma _y}\right) ^{2}-2\rho \left( \dfrac{x-\mu _x}{\sigma _x}\right) \left( \dfrac{y-\mu _{y}}{\sigma _y}\right) \right] \right\} \end{array}$

$\rho = {\rm{cor}}\left( {x,y} \right) = $ correlation coefficient; $\; -1 < \rho < 1$

$\mu _x,\: \mu _y = $ means

$\sigma _x,\: \sigma _y = $ standard deviations; $\; \sigma _x > 0;\; \sigma _y > 0$
2 Lower cumulative distribution function (CDF) of the bivariate normal distribution:

$CDF_{\:{\mathrm{BVN}}}\left( x,y,\mu _x,\mu _y,\sigma _x,\sigma _y,\rho \right) = \displaystyle\int\limits_{ - \infty }^x {d\xi \int\limits_{ - \infty }^y {d\eta \cdot {P_{BVN}}\left( \xi ,\eta ,\mu _x,\mu _y,\sigma _x,\sigma _y,\rho \right)} } $
3 $\mathrm{Preisach}_{\:\mathrm{BVN}}\left( x\geq y,y,\mu _1,\mu _2,\sigma _1,\sigma _2,\rho \right) =1-\displaystyle\int\limits_{x}^{\infty }{d\xi \;\int\limits_{y}^{\xi }{d\eta \cdot {% P_{\;\mathrm{BVN}}}\left( {{\dfrac{{\xi -\eta }}{2}},{\dfrac{{\xi +\eta }}{2}% },\mu _1,\mu _2,\sigma _1,\sigma _2,\rho }\right) }}$

$\mu _1=$ mean of the coercive field distribution

$\mu _2=$ mean of the interaction field distribution

$\sigma _1=$ standard deviation of the coercive field distribution

$\sigma _2=$ standard deviation of the interaction field distribution
4 $\mathrm{Preisach}_{\:\mathrm{BVGN}}\left( x\geq y,y,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho ,\beta \right) =1-\displaystyle\int\limits_{x}^{\infty }{d\xi \;\int\limits_{y}^{\xi }{d\eta \cdot {P_{\;\mathrm{BVGN}}}\left( {{\dfrac{{% \xi -\eta }}{2}},{\dfrac{{\xi +\eta }}{2}},\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\beta \right) }}$

$\begin{array}{l} {{P_{\;\mathrm{BVGN}}}\left( u,\upsilon {,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\beta \right) =} \\ \qquad=\dfrac{1}{2^{\frac{1}{\beta }}\pi \sigma _{1}\sigma _{2}\sqrt{1-\rho ^{2}}% \;\Gamma \left( \dfrac{1}{\beta }\right) } \\ \qquad \times \exp \left\{ -\dfrac{1}{2}\left( \dfrac{1}{1-\rho ^{2}}\left[ \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) ^{2}+\left( \dfrac{\upsilon -\mu _{2}}{\sigma _{2}}\right) ^{2}-2\rho \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) \left( \dfrac{\upsilon -\mu _{2}}{% \sigma _{2}}\right) \right] \right) ^{\beta }\right\} \\[2ex] \qquad=\text{PDF of the bivariate generalized normal distribution}% \end{array}$

$\Gamma \left( z\right) = \text{gamma function}$

$\beta=\text{shape parameter; }\; \beta >0$

Observation: $P_{\,\mathrm{BVN}}$ is obtained as a particular case for $\beta =0$.
5

$\begin{array}{l} {\mathrm{Preisach}_{\:\mathrm{BVSN}}\left( x\geq y,y,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho ,\delta _{11},\delta _{12},\delta _{21},\delta _{22}\right) =} \\ \qquad = 1-\displaystyle\int\limits_{x}^{\infty }{d\xi \;\int\limits_{y}^{\xi }{% d\eta \cdot {P_{\;\mathrm{BVSN}}}\left( {{\dfrac{{\xi -\eta }}{2}},{\dfrac{{% \xi +\eta }}{2}},\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\delta _{11},\delta _{12},\delta _{21},\delta _{22}\right) }} \end{array}$

$\begin{array}{l} {{{P_{\;\mathrm{BVSN}}}\left( u,\upsilon {,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\delta _{11},\delta _{12},\delta _{21},\delta _{22}\right) }=} \\[1ex] \qquad = \dfrac{1}{2\pi \sigma _{1}\sigma _{2}\sqrt{1-\rho ^{2}}% \left[ \dfrac{1}{2}-\dfrac{1}{2\pi }\arccos \left( \widetilde{\rho }\right) % \right] } \\[1ex] \qquad \times \exp \left\{ -\dfrac{1}{2\left( 1-\rho ^{2}\right) }\left[ \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) ^{2}+\left( \dfrac{\upsilon -\mu _{2}% }{\sigma _{2}}\right) ^{2}-2\rho \left( \dfrac{u-\mu _{1}}{\sigma _{1}}% \right) \left( \dfrac{\upsilon -\mu _{2}}{\sigma _{2}}\right) \right] \right\} \\[1ex] \qquad \times \Phi \left[ \delta _{11}\left( u-\mu _{1}\right) +\delta _{11}\left( \upsilon -\mu _{2}\right) \right] \,\Phi \left[ \delta _{21}\left( u-\mu _{1}\right) +\delta _{21}\left( \upsilon -\mu _{2}\right) % \right] \\[3ex] \qquad = {{{P_{\;\mathrm{BVN}}}\left( u,\upsilon {,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho }\right) }}\dfrac{\Phi \left[ \delta _{11}\left( u-\mu _{1}\right) +\delta _{12}\left( \upsilon -\mu _{2}\right) \right] \,\Phi % \left[ \delta _{21}\left( u-\mu _{1}\right) +\delta _{22}\left( \upsilon -\mu _{2}\right) \right] }{\dfrac{1}{2}-\dfrac{1}{2\pi }\arccos \left( \widetilde{\rho }\right) } \\[2ex] \qquad = \text{PDF of the bivariate skew normal distribution}% \end{array}$

$\delta _{11},\delta _{12},\delta _{21},\delta _{22} = \text{skewness parameters}$

$\Phi \left( \tau \right) =\int\limits_{-\infty }^{\tau }\dfrac{1}{\sqrt{% 2\pi }}\exp \left( -\dfrac{t^{2}}{2}\right) dt=\dfrac{1}{2}\left[ 1+\operatorname{erf% }\left( \dfrac{\tau }{\sqrt{2}}\right) \right] = \text{CDF of the univariate standard normal distribution}$

$\widetilde{\rho }=\dfrac{\delta _{21}\delta _{11}{\sigma _{1}^{2}+}\delta _{22}\delta _{12}{\sigma _{2}^{2}+}\left( \delta _{12}\delta _{21}+\delta _{22}\delta _{11}\right) \sigma _{1}\sigma _{2}{\rho }}{\sqrt{\left( 1+\delta _{11}^{2}{\sigma _{1}^{2}+2}\delta _{11}\delta _{12}\sigma _{1}\sigma _{2}{\rho +}\delta _{12}^{2}{\sigma _{2}^{2}}\right) \left( 1+\delta _{21}^{2}{\sigma _{1}^{2}+2}\delta _{21}\delta _{22}\sigma _{1}\sigma _{2}{\rho +}\delta _{22}^{2}{\sigma _{2}^{2}}\right) }}$

Observation: $P_{\,\mathrm{BVN}}$ is obtained as a particular case for $\delta _{11}=\delta _{12}=\delta _{21}=\delta _{22} = 0$.
6

$\begin{array}{l} {\mathrm{Preisach}_{\:\mathrm{BVSHN}}\left( x\geq y,y,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho ,\alpha _{1},\alpha _{2}\right) =} \\ \qquad = 1- \displaystyle\int\limits_{x}^{\infty }{d\xi \;\int\limits_{y}^{\xi }{d\eta \cdot {P_{\;\mathrm{BVSHN}}}\left( {{\dfrac{{\xi -\eta }}{2}},{\dfrac{{\xi +\eta }}{2}},\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\alpha _{1},\alpha _{2}\right) }} \end{array}$

$\begin{array}{l} {{{P_{\;\mathrm{BVSHN}}}\left( u,\upsilon {,\mu _{1},\mu _{2},\sigma _{1},\sigma _{2},\rho },\alpha _{1},\alpha _{2}\right) =}} \\ \qquad =\dfrac{4}{\alpha _{1}\,\alpha _{2}}\dfrac{1}{2\pi \sigma _{1}\sigma _{2}\sqrt{1-\rho ^{2}}\;}\;\exp \left\{ -\dfrac{1}{2\left( 1-\rho ^{2}\right) }\left[ \left( \dfrac{2}{\alpha _{1}}\sinh \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) \right) ^{2}+\left( \dfrac{2}{\alpha _{2}}\sinh \left( \dfrac{\upsilon -\mu _{2}}{\sigma _{2}}\right) \right) ^{2}\right. \right. \\[2ex] \hspace{22em} \left. \left. -2\rho \left( \dfrac{2}{\alpha _{1}}\sinh \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) \right) \left( \dfrac{2}{\alpha _{2}}% \sinh \left( \dfrac{\upsilon -\mu _{2}}{\sigma _{2}}\right) \right) \right] \right\} \\ \qquad \times \cosh \left( \dfrac{u-\mu _{1}}{\sigma _{1}}\right) \,\cosh \left( \dfrac{\upsilon -\mu _{2}}{\sigma _{2}}\right) \\[2ex] \qquad =\text{PDF of the bivariate sinh-normal distribution}% \end{array}$

$\alpha \; _{i}=\text{shape parameters; }\; \alpha _{i} >0$

Observation: for $\alpha >2$ the $P_{\,\mathrm{BVSHN}}$ is multimodal.
7 $f_{7}\left( x,y,x_{c},y_{c}\right) =\tanh \left( x-x_{c}\right) \tanh \left( y-y_{c}\right) $
8 $f_{8}\left( x,y,x_{c},y_{c}\right) =\sin \left( x-x_{c}\right) \sin \left( y-y_{c}\right) $
9 $f_{9}\left( x,y,x_{c},y_{c}\right) =\operatorname{sinc} \left( x-x_{c}\right) \operatorname{sinc} \left( y-y_{c}\right) = \dfrac{\sin \left( x-x_{c}\right) }{x-x_{c}} \; \dfrac{\sin \left( y-y_{c}\right) }{y-y_{c}}$
10 $f_{10}\left( x,y,x_{c},y_{c}\right) =\sin \left( \sqrt{\left( x-x_{c}\right) ^{2}+\left( y-y_{c}\right) ^{2}}\right) \equiv \sin r$
Observation: $f_{10}$ is smooth except for a first derivative discontinuity at the point $\left( x_{c},y_{c}\right)$.
11 $f_{11}\left( x,y,x_{c},y_{c}\right) =\operatorname{sinc} \left( \sqrt{\left( x-x_{c}\right) ^{2}+\left( y-y_{c}\right) ^{2}}\right) \equiv \operatorname{sinc} r$
12 $f_{12}\left( x,y,x_{c},y_{c}\right) = \sqrt{\left( x-x_{c}\right) ^{2}+\left( y-y_{c}\right) ^{2}} \equiv r$
Observation: $f_{12}$ is smooth except for a first derivative discontinuity at the point $\left( x_{c},y_{c}\right)$.
13 $f_{13}\left( x,y,x_{c},y_{c}\right) =\exp \left[ -0.2\sqrt{\left( 15\left( x-x_{c}\right) \right) ^{2}+\left( 20\left( y-y_{c}\right) \right) ^{2}}% \right] \cos \left( \sqrt{\left( 15\left( x-x_{c}\right) \right) ^{2}+\left( 20\left( y-y_{c}\right) \right) ^{2}}\right) $
Observation: $f_{13}$ is smooth except for a first derivative discontinuity at the point $\left( x_{c},y_{c}\right)$.
14 $\begin{array}{l} {f_{14}\left( x,y,x_{c},y_{c}\right) =\left( 5^{3}\exp \left[ -5u\right] \exp \left[ -5\upsilon \right] \right) \left( \dfrac{1}{\left( 1+\exp \left[ -5u\right] \right) \left( 1+\exp \left[ -5\upsilon \right] \right) }\right)^{5} } \\[1ex] \hspace{7em} \times \left( \exp \left[ -5u\right] -\dfrac{2}{1+\exp \left[ -5u\right] }% \right) \left( \exp \left[ -5\upsilon \right] -\dfrac{2}{1+\exp \left[ -5\upsilon \right] }\right)% \end{array}$
where $u=x-x_{c}$; $\upsilon=y-y_{c}$
15 $\begin{array}{l} {f_{15}\left( x,y,x_{c},y_{c}\right) =3\left( u-1\right) ^{2}\exp \left[ -u^{2}-\left( \upsilon +1\right) ^{2}\right] -10\left( \dfrac{u}{5}% -u^{3}-\upsilon ^{5}\right) \exp \left[ -u^{2}-\upsilon ^{2}\right] } \\[1ex] \hspace{7em} -\dfrac{1}{3}\exp \left[ -\left( u+1\right) ^{2}-\upsilon ^{2}\right]% \end{array}$
where $u=x-x_{c}$; $\upsilon=y-y_{c}$