I'm trying to simulate hysteresis and the its inverse for a control problem. This is a model found in [Tao & Kokotovic, Adaptive Control Systems with Actuator and Sensor Nonlinearities] to generalize many types of hysteresis but i can't seen to figure what the second if statement in equations 2 and 3 means. How to interpret it? How to implement it on Matlab?
More info: u(t) is output, v(t) is input; the rest of values is constant.
The hysteresis model utilizes 8 parameters: 4 slopes and 4 intersections.
Top parameters have $_t$, left $_l$, bottom $_b$ and right $_r$. Middle uses $_d$ and $_u$. Sorry for the blurred picture.
$m_x$ are the slopes
$c_x$ is where the figure intersects the origin.
$c_d$ and $c_u$ are defined interactively with $c_d = u(t-1) - m_t*v(t-1) ; c_u = u(t-1) - m_b*v(t - 1)$
$v_1$ is the upper left corner defined as $v_1 = \dfrac{c_t+m_l*c_l}{m_l-m_t}$
$v_2$ is the lower right corner defined as $v_2 = \dfrac{c_b+m_r*c_r}{m_r-m_b}$
$v_3$ is the upper right corner defined as $v_3 = \dfrac{c_t+m_r*c_r}{m_r-m_t}$
$v_4$ is the lower left corner defined as $v_1 = \dfrac{c_b+m_l*c_l}{m_l-m_b}$
$v_d$ and $v_u$ are defined as $v_d = \dfrac{c_d+m_l*c_l}{m_l-m_t} ; v_u\dfrac{c_u + m_r*c_r}{m_r-m_b}$