3.1. Dynamics equations of homeostasis

Consider a living organism, whose state is described by n variables, q ¼ {q1, …, qn}. These variables can describe both behavioral and physiological or neurophysiological features and we consider them as coordinates of the abstract state space of the system.<sup>2</sup> As we have mentioned in Section 1.4, living organisms are somehow able to evaluate their level of discomfort or stress (see Ref. [1] for comprehensive discussion), so we consider this feature as additional scalar variable, S, and will call S as stress-index (S-index). It is a typical phenomenological variable, which cannot be directly measured,<sup>3</sup> but it should be emphasized that although S corresponds to the "feeling" quantity, it is an objective feature of the living beings [1].

In experiments with living organisms, many parameters that influence on the system's behavior are out of control, which leads to considerable deviations in numerical values of the experimental results. It means that small differences in the values of the experimental data became insignificant and the state of a system should be described by a domain of points rather than a single point in the state space. This kind of uncertainty does not have stochastic nature and L. Zadeh has introduced for its notion of the fuzzy sets [13] and theory of possibility [14–16].

We assume that the dynamics of the living systems satisfies causality principle in the form (see Ref. [1] for details):

• "If, at the time t þ dt, the system is located in the vicinity of the point x, then at the previous time t, the system could be near the point x′ ≈x−x\_′ dt, or near the point x″ ≈x−x\_ ″ dt, or near the point x‴≈x−x\_‴dt, or …, and so on, for all possible values of the velocity x\_. "

<sup>2</sup> We assume that the state space has trivial local topology, which means that any inner point of any small domain in the space belongs to the space as well.

<sup>3</sup> The phenomenological variables, which cannot be directly measured, are widely used in physics, for example "mechanical action" of the physical systems, order parameter of the superfluid phase transition, and so on.

where <sup>x</sup> <sup>¼</sup> {q;S}. Since velocities {q\_;S\_} cannot be precisely obtained, we describe them by the function Posðq\_;S\_; <sup>q</sup>;S;tÞ, <sup>4</sup> which indicates possibility that the system has velocities {q\_;S\_} near the point {q;S} at the time t. The most possible velocities satisfy

$$\text{Pos}(\dot{\mathfrak{q}}, \dot{\mathfrak{S}}; \mathfrak{q}, \mathbf{S}, t) = 1 \tag{1}$$

and only this case will be considered in this chapter.

It has been shown in Ref. [17] that if a system's evolution satisfies the causality principle, the system's state space has trivial local topology, and if state can be described by a compact fuzzy set, then the most possible system's trajectories {qðtÞ, SðtÞ} satisfy the generalized Lagrangianlike equations

$$
\frac{d}{dt}\frac{\partial L}{\partial \dot{q}\_i} - \frac{\partial L}{\partial q\_i} = \frac{\partial L}{\partial S}\frac{\partial L}{\partial \dot{q}\_i},\tag{2a}
$$

$$\frac{dS}{dt} = L(\dot{\boldsymbol{q}}, \boldsymbol{q}, \boldsymbol{S}, t), \tag{2b}$$

where <sup>L</sup>ðq\_;q;S;t<sup>Þ</sup> is the solution of Eq. (1) with respect to <sup>S</sup>\_. (We will call <sup>L</sup>ðq\_;s;S;t<sup>Þ</sup> as "most possible S-Lagrangian" or S-Lagrangian for short. The equations of motion (2a) and (2b) are more general than the common Lagrangian equations. Since these equations can describe the dynamics of sets, they can be differential inclusion instead differential equations. The second extension is dependence of the Lagrangian on S-variable<sup>5</sup> (S-Lagrangian). In this case, the Lagrangian equations of motion acquire a non-zero right side, proportional to the derivative of the S-Lagrangian with respect to S. It has been shown in Ref. [17] that the equations of motion with S-Lagrangian lost time reversibility, the energy and momentum are not conserved even in closed systems. Note that S-Lagrangian is not an invariant under the addition of a function which is a total derivative with respect to time.<sup>6</sup> It should be emphasized that the derivation of these equations in Ref. [17] does not depend on any specific properties of the system or its Lagrangian. This means that Eqs. (2a) and (2b) give a reasonable method of applying the Lagrangian approach to non-physical systems. So, we believe that the dynamics of homeostasis can be described by Eqs. (2a) and (2b) with appropriate choice of the S-Lagrangian Lðq\_;q;S;tÞ.

Attempting to decrease stress and proximity to death is a basic feature of the living organisms. It is important that this feature exists already on a single-cell level (see Ref. [1] for comprehensive discussion). Deviation of the system's parameters from their ground values leads to increasing discomfort and the organisms try to decrease discomfort by generating the protection mechanisms. These mechanisms, in turn, generate the system's activity (see Section 1.3 or

<sup>4</sup> It should be emphasized that the function Posðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> cannot be identified with any probability density <sup>ρ</sup>ðq\_;S\_; <sup>q</sup>;S;tÞ, because it has different mathematical features. Actually, Posðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> is a function, while <sup>ρ</sup>ðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> is a functional [17]. <sup>5</sup> In the classical mechanics, S-variable is nothing more than common mechanical action.

<sup>6</sup> In the classical mechanics, S-variable is nothing more than common mechanical action.

[1]), which can be described by time derivatives of the variables, q\_. Following the discovery of homeostasis W. Cannon [3], we assume that homeostasis results from a tendency of the organisms to decrease the stress and avoid death and that the dynamics of the stress is determined by competition between damage and the protection mechanisms. So we write

$$\frac{dS}{dt} = L(\dot{\boldsymbol{q}}, \boldsymbol{q}, S, t) = -P(\dot{\boldsymbol{q}}, \boldsymbol{q}, S) + I(\boldsymbol{q}, S, t),\tag{3}$$

where function Iðs;S;tÞ describes increasing of stress by deviation of the system's parameters, while Pðq\_;q;SÞ corresponds to decreasing of stress by the protection mechanisms.

Experimental observations of homeostatic behavior (see Ref. [1] and references there) show that functions Iðq;S;tÞ and Pðq\_;q;SÞ should satisfy the following:


Below, we consider time intervals, which is much shorter than the time of relevant changes in environmental conditions, so that we can neglect time dependence in Eq. (3) and write

$$L(\dot{\boldsymbol{q}}, \boldsymbol{q}, \boldsymbol{S}) = -P(\dot{\boldsymbol{q}}, \boldsymbol{q}, \boldsymbol{S}) + I(\boldsymbol{q}, \boldsymbol{S}),\tag{4}$$

and will call Iðq;SÞ as Injure and Pðq\_;q;SÞ as Protection for short.

By using Eq. (4), we rewrite Eqs. (2a) and (2b) as

where <sup>x</sup> <sup>¼</sup> {q;S}. Since velocities {q\_;S\_} cannot be precisely obtained, we describe them by the

It has been shown in Ref. [17] that if a system's evolution satisfies the causality principle, the system's state space has trivial local topology, and if state can be described by a compact fuzzy set, then the most possible system's trajectories {qðtÞ, SðtÞ} satisfy the generalized Lagrangian-

> <sup>−</sup> <sup>∂</sup><sup>L</sup> ∂qi

where <sup>L</sup>ðq\_;q;S;t<sup>Þ</sup> is the solution of Eq. (1) with respect to <sup>S</sup>\_. (We will call <sup>L</sup>ðq\_;s;S;t<sup>Þ</sup> as "most possible S-Lagrangian" or S-Lagrangian for short. The equations of motion (2a) and (2b) are more general than the common Lagrangian equations. Since these equations can describe the dynamics of sets, they can be differential inclusion instead differential equations. The second extension is dependence of the Lagrangian on S-variable<sup>5</sup> (S-Lagrangian). In this case, the Lagrangian equations of motion acquire a non-zero right side, proportional to the derivative of the S-Lagrangian with respect to S. It has been shown in Ref. [17] that the equations of motion with S-Lagrangian lost time reversibility, the energy and momentum are not conserved even in closed systems. Note that S-Lagrangian is not an invariant under the addition of a function which is a total derivative with respect to time.<sup>6</sup> It should be emphasized that the derivation of these equations in Ref. [17] does not depend on any specific properties of the system or its Lagrangian. This means that Eqs. (2a) and (2b) give a reasonable method of applying the Lagrangian approach to non-physical systems. So, we believe that the dynamics of homeostasis can be described by Eqs. (2a) and (2b) with appropriate choice of the S-Lagrangian

Attempting to decrease stress and proximity to death is a basic feature of the living organisms. It is important that this feature exists already on a single-cell level (see Ref. [1] for comprehensive discussion). Deviation of the system's parameters from their ground values leads to increasing discomfort and the organisms try to decrease discomfort by generating the protection mechanisms. These mechanisms, in turn, generate the system's activity (see Section 1.3 or

It should be emphasized that the function Posðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> cannot be identified with any probability density <sup>ρ</sup>ðq\_;S\_; <sup>q</sup>;S;tÞ, because it has different mathematical features. Actually, Posðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> is a function, while <sup>ρ</sup>ðq\_;S\_; <sup>q</sup>;S;t<sup>Þ</sup> is a functional [17]. <sup>5</sup>

In the classical mechanics, S-variable is nothing more than common mechanical action.

In the classical mechanics, S-variable is nothing more than common mechanical action.

<sup>¼</sup> <sup>∂</sup><sup>L</sup> ∂S ∂L ∂q\_i

d dt ∂L ∂q\_i

dS

point {q;S} at the time t. The most possible velocities satisfy

and only this case will be considered in this chapter.

<sup>4</sup> which indicates possibility that the system has velocities {q\_;S\_} near the

Posðq\_;S\_; <sup>q</sup>;S;tÞ ¼ <sup>1</sup> (1)

dt <sup>¼</sup> <sup>L</sup>ðq\_;q;S;tÞ, (2b)

; (2a)

function Posðq\_;S\_; <sup>q</sup>;S;tÞ,

152 Lagrangian Mechanics

like equations

Lðq\_;q;S;tÞ.

4

6

$$-\frac{d}{dt}\frac{\partial P}{\partial \dot{q}\_i} + \frac{\partial}{\partial q\_i}[P - I] = \frac{\partial P}{\partial \dot{q}\_i}\frac{\partial}{\partial S}[P - I] \tag{5a}$$

$$\frac{dS}{dt} = -P(S, \dot{\boldsymbol{q}}, \boldsymbol{q}) + I(\boldsymbol{q}, S). \tag{5b}$$

Equations (5a) and (5b) are the main dynamic equations of homeostasis. It should be noted that Sindex

$$\mathcal{S} = \mathcal{S}\_0 + \int\_0^t [-P(\mathcal{S}(t'), \dot{\mathfrak{q}}(t'), \mathfrak{q}(t')) + I(\mathfrak{q}(t'), \mathcal{S}(t'))]dt' \tag{6}$$

is not function of a state but depends on the system's history.

For small-to-moderate activity, we can expand <sup>P</sup>ðq\_;q;S<sup>Þ</sup> with respect to <sup>q</sup>\_. We have7 :

<sup>7</sup> Summating on the repeated indices (Einstein summation) is assumed.

$$P\simeq A(\mathfrak{x},\xi,\mathbb{S}) + a\_{\mathrm{i}}(\mathfrak{x},\xi,\mathbb{S})\,\dot{\xi}\_{\mathrm{i}} + \frac{1}{2}m\_{\mathrm{i}\natural}(\mathfrak{x},\xi,\mathbb{S})\dot{\mathfrak{x}}\_{\mathrm{j}}\,\dot{\mathfrak{x}}\_{\mathrm{i}},\tag{7}$$

where we designate by the Latin symbol: x the variables with zero linear terms in Eq. (7) and by the Greek symbol: ξ the variables with non-zero linear terms8 and keep in Eq. (7) only the terms with lowest order on ξ\_ and x\_. For reasons that will be clarified later, we will refer to x as stationary variables (C-variables) and ξ as running variables (R-variables).

The term Aðx;ξ;SÞ corresponds to short-term compensation of stress (e.g., by immediate releasing of the endorphins ("endogenous morphine"), which are quickly produced in natural response to pain [1]). The other terms correspond to long-term protection by generating the activity.<sup>9</sup> In the last terms, matrix mij determines character rates of changing of the variables x: small mii corresponds to the fast-changing variables, while large mjj corresponds to the slowchanging ones. The function aðx;ξ;SÞ determines the behavior of the R-variables (see page 13)).

Therefore, Eqs. (5a) and (5b) take the form:

$$\left(m\_{i\bar{j}}\ddot{\mathbf{x}}\_{\dot{j}} + \left(\mathcal{W}\frac{\partial m\_{i\bar{j}}}{\partial \mathbf{S}} - \frac{\partial \mathcal{W}}{\partial \mathbf{S}} m\_{i\dot{\bar{j}}}\right)\dot{\mathbf{x}}\_{\dot{j}} = -\frac{\partial}{\partial \mathbf{x}\_{\dot{i}}}(\mathcal{W} - a\_{\bar{j}}\dot{\boldsymbol{\xi}}\_{\dot{j}}),\tag{8a}$$

$$
\Delta\Omega\_{ij}^{-1}\dot{\xi}\_{j} + \frac{\partial a\_{i}}{\partial \mathbf{x}\_{j}}\dot{\mathbf{x}}\_{j} = \frac{\partial W}{\partial \mathbf{S}}a\_{i} - W\frac{\partial a\_{i}}{\partial \mathbf{S}} - \frac{\partial W}{\partial \xi\_{i}},\tag{8b}
$$

$$\frac{dS}{dt} = -\frac{1}{2} m\_{i\dot{\jmath}} \dot{\mathbf{x}}\_{\dot{\jmath}} \dot{\mathbf{x}}\_{i} + \left( \mathcal{W}(\mathbf{x}, \xi, \mathcal{S}) - a\_{\dot{\jmath}} \dot{\xi}\_{\dot{\jmath}} \right). \tag{8c}$$

where we designated

$$\mathcal{W}(\mathbf{x}, \xi, \mathbf{S}) = I(\mathbf{x}, \xi, \mathbf{S}) \neg A(\mathbf{x}, \xi, \mathbf{S}). \tag{9}$$

$$
\Omega\_{ij}^{-1} = \frac{\partial a\_i}{\partial \xi\_j} - \frac{\partial a\_j}{\partial \xi\_i} + a\_i \frac{\partial a\_j}{\partial S} - a\_j \frac{\partial a\_i}{\partial S} \,. \tag{10}
$$

and in the first approximation with respect to x\_ and ξ\_ we have omitted in Eqs. (8a) and (8b) the terms that are proportional to <sup>o</sup>ðx\_ <sup>k</sup>x\_j;x\_ <sup>k</sup> \_ ξjÞ.

Since Ω<sup>−</sup><sup>1</sup> ij is an antisymmetric matrix, <sup>Ω</sup><sup>−</sup><sup>1</sup> ij <sup>¼</sup> <sup>−</sup>Ω<sup>−</sup><sup>1</sup> ji , Eq. (11b) may include the rotation of Rvariables in the {ξ} subspace. This means that even in the ground state, where C-variables possess stationary stable points <sup>x</sup>\_ <sup>c</sup> <sup>¼</sup> <sup>0</sup>;S\_ <sup>c</sup> ¼ 0, R-variables are functions of time (this is why we refer to these variables as running variables).

By using Eq. (8b), Eqs. (8a) and (8c) can be rewritten as

<sup>8</sup> In order to ensure that P would increase along with increasing activity, the matrix mij should be positively defined. 9 Interestingly, various human activities, for example, aerobic exercise, stimulate the release of endorphins as well [18].

Fuzzy Logic and *S*‐Lagrangian Dynamics of Living Systems: Theory of Homeostasis http://dx.doi.org/10.5772/66473 155

$$m\_{i\bar{j}}\ddot{\mathbf{x}}\_{\bar{j}} + \left[\mathcal{W}\frac{\partial m\_{i\bar{j}}}{\partial \mathcal{S}} - \frac{\partial \mathcal{W}}{\partial \mathcal{S}} m\_{i\bar{j}} + \frac{\partial}{\partial \mathbf{x}\_{i}} \left(a\_{l}\Omega\_{lk}\frac{\partial a\_{k}}{\partial \mathbf{x}\_{\bar{j}}}\right)\right] \dot{\mathbf{x}}\_{\bar{j}} = -\frac{\partial \mathcal{U}}{\partial \mathbf{x}\_{i}},\tag{11a}$$

$$\dot{\xi}\_{\dot{j}} = \mathcal{Q}\_{\dot{j}\dot{j}} \left( \frac{\partial W}{\partial \mathcal{S}} a\_{\dot{j}} - W \frac{\partial a\_{\dot{j}}}{\partial \mathcal{S}} - \frac{\partial a\_{\dot{j}}}{\partial \mathbf{x}\_{k}} \dot{\mathbf{x}}\_{k} \right), \tag{11b}$$

$$\frac{dS}{dt} = -\frac{1}{2} m\_{\dot{\eta}} \dot{\mathbf{x}}\_{\dot{\jmath}} \dot{\mathbf{x}}\_{i} + \left( a\_{i} \Omega\_{\dot{\eta}} \frac{\partial a\_{\dot{\jmath}}}{\partial \mathbf{x}\_{k}} \right) \dot{\mathbf{x}}\_{k} + \mathcal{U}(\mathbf{x}, \xi, \mathcal{S}), \tag{11c}$$

where

<sup>P</sup>≃Aðx;ξ;SÞ þ aiðx;ξ;S<sup>Þ</sup> <sup>ξ</sup>\_

stationary variables (C-variables) and ξ as running variables (R-variables).

Therefore, Eqs. (5a) and (5b) take the form:

terms that are proportional to <sup>o</sup>ðx\_ <sup>k</sup>x\_j;x\_ <sup>k</sup> \_

possess stationary stable points <sup>x</sup>\_ <sup>c</sup> <sup>¼</sup> <sup>0</sup>;S\_

refer to these variables as running variables).

ij is an antisymmetric matrix, <sup>Ω</sup><sup>−</sup><sup>1</sup>

By using Eq. (8b), Eqs. (8a) and (8c) can be rewritten as

where we designated

154 Lagrangian Mechanics

Since Ω<sup>−</sup><sup>1</sup>

8

9

mijx€<sup>j</sup> þ W

Ω<sup>−</sup><sup>1</sup> ij \_ ξ<sup>j</sup> þ ∂ai ∂x<sup>j</sup>

dS dt <sup>¼</sup> <sup>−</sup> 1 2

> Ω<sup>−</sup><sup>1</sup> ij <sup>¼</sup> <sup>∂</sup>ai ∂ξ<sup>j</sup> − ∂aj ∂ξ<sup>i</sup> þ ai ∂aj <sup>∂</sup><sup>S</sup> <sup>−</sup>aj

∂mij <sup>∂</sup><sup>S</sup> <sup>−</sup> ∂W <sup>∂</sup><sup>S</sup> mij

<sup>x</sup>\_<sup>j</sup> <sup>¼</sup> <sup>∂</sup><sup>W</sup>

and in the first approximation with respect to x\_ and ξ\_ we have omitted in Eqs. (8a) and (8b) the

ij <sup>¼</sup> <sup>−</sup>Ω<sup>−</sup><sup>1</sup>

variables in the {ξ} subspace. This means that even in the ground state, where C-variables

In order to ensure that P would increase along with increasing activity, the matrix mij should be positively defined.

Interestingly, various human activities, for example, aerobic exercise, stimulate the release of endorphins as well [18].

ξjÞ.

mijx\_jx\_<sup>i</sup> þ

<sup>x</sup>\_<sup>j</sup> <sup>¼</sup> <sup>−</sup> <sup>∂</sup> ∂x<sup>i</sup>

> <sup>∂</sup><sup>S</sup> <sup>−</sup> ∂W ∂ξ<sup>i</sup>

<sup>W</sup>ðx;ξ;SÞ−ajξ\_

<sup>∂</sup><sup>S</sup> ai−<sup>W</sup> <sup>∂</sup>ai

<sup>ð</sup>W−ajξ\_

j 

Wðx;ξ;SÞ ¼ Iðx;ξ;SÞ−Aðx;ξ;SÞ: (9)

∂ai

<sup>i</sup> þ 1 2

where we designate by the Latin symbol: x the variables with zero linear terms in Eq. (7) and by the Greek symbol: ξ the variables with non-zero linear terms8 and keep in Eq. (7) only the terms with lowest order on ξ\_ and x\_. For reasons that will be clarified later, we will refer to x as

The term Aðx;ξ;SÞ corresponds to short-term compensation of stress (e.g., by immediate releasing of the endorphins ("endogenous morphine"), which are quickly produced in natural response to pain [1]). The other terms correspond to long-term protection by generating the activity.<sup>9</sup> In the last terms, matrix mij determines character rates of changing of the variables x: small mii corresponds to the fast-changing variables, while large mjj corresponds to the slowchanging ones. The function aðx;ξ;SÞ determines the behavior of the R-variables (see page 13)).

mijðx;ξ;SÞx\_jx\_i; (7)

<sup>j</sup>Þ; (8a)

; (8b)

: (8c)

<sup>∂</sup><sup>S</sup> : (10)

ji , Eq. (11b) may include the rotation of R-

<sup>c</sup> ¼ 0, R-variables are functions of time (this is why we

$$
\Delta U = W \left( 1 + a\_{\dot{\beta}} \Omega\_{\dot{\beta}\dot{\varepsilon}} \frac{\partial a\_k}{\partial \mathcal{S}} \right) + a\_{\dot{\beta}} \Omega\_{\dot{\beta}\dot{\varepsilon}} \frac{\partial W}{\partial \xi\_k}. \tag{12}
$$

Equations (11a) and (11c) represent dynamic equations of homeostasis for the systems with temperate activity.

#### 3.2. Behavior near the stable states

In order for the running variables to not disturb the ground state, Sc ¼ 0, x<sup>c</sup> ¼ const:, we should assume that

$$\frac{\partial}{\partial \mathbf{x}\_{k\varepsilon}} a\_j(\mathbf{x}\_{\varepsilon}, \xi, \mathbf{S}\_{\varepsilon}) = 0; \ \frac{\partial}{\partial \mathbf{S}\_{\varepsilon}} a\_j(\mathbf{x}\_{\varepsilon}, \xi, \mathbf{S}\_{\varepsilon}) = 0; \ \frac{\partial}{\partial \xi\_k} W(\mathbf{x}\_{\varepsilon}, \xi, \mathbf{S}\_{\varepsilon}) = 0. \tag{13}$$

(see Eqs. (11a) and (12)).

Stable states of Eqs. (11a) and (11c) are defined by

$$\mathcal{W}(\mathfrak{x}\_{\mathfrak{c}}, \mathcal{S}\_{\mathfrak{c}}) = \ = \ \mathbf{0}, \tag{14a}$$

$$\frac{\partial W}{\partial \mathbf{x}\_{\mathrm{ci}}} = \mathbf{0}.\tag{14b}$$

There are two types of solutions for Eqs. (14a) and (14b), which could be called as ground states (GSSs) and as local stable states (LSSs). At GSS, the injure reaches its global minimum Iðxc1;Sc1Þ ¼ 0 that leads to

$$A(\mathfrak{x}\_{\ell 1}, \mathbb{S}\_{\ell}) = 0.\tag{15}$$

In order for Eq. (15) to be valid for any set of xc<sup>1</sup> that satisfy Eq. (14a), the function AðSc;xc1Þ should be factorized as

$$A(\mathbf{x}\_{\rm c1}, \mathbf{S}) = S\Psi(\mathbf{x}\_{\rm c1}, \mathbf{S}),\tag{16}$$

given that Ψðxc1;SÞ≠0 (see Eq. (22)).

Unlike at LSS, where the system remains injured

$$I(\mathfrak{x}\_{\ell2}, \mathfrak{S}\_{\ell2}) > 0,\tag{17}$$

S-index is non-zero, because

$$A(\mathbf{x}\_{\ell2}, \mathbf{S}\_{\ell2}) > 0 \Rightarrow \mathbf{S}\_{\ell2} > 0. \tag{18}$$

This means that near LSS, the system is stressed, but its state is stable.

Consider the case where mij ¼ mijðx;SÞ and W ¼ Wðx;SÞ, a ¼ aðξÞ. If deviations from the stable state

$$
\mathbf{y} = \mathbf{x} \mathbf{-} \mathbf{x}\_c,\tag{19a}
$$

$$
\Delta w = \text{S-S}\_c,\tag{19b}
$$

are small, we can expand Eqs. (11a) and (11c) with respect to y and w. In the first-order approximation, we obtain<sup>10</sup>

$$
\ddot{y}\_i + \gamma\_c \dot{y}\_i = -\mathsf{K}\_{\dot{\eta}} y\_j,\tag{20a}
$$

$$
\dot{\boldsymbol{w}} = -\boldsymbol{\gamma}\_c \boldsymbol{w}.\tag{20b}
$$

where

$$\mathcal{V}\_{\boldsymbol{c}} = -\frac{\partial W\_{\boldsymbol{c}}}{\partial \mathcal{S}\_{\boldsymbol{c}}},$$

$$K\_{i\boldsymbol{j}} = m\_{ik}^{-1}(\mathfrak{x}\_{\boldsymbol{c}}, \mathcal{S}\_{\boldsymbol{c}}) \frac{\partial^2 W\_{\boldsymbol{c}}}{\partial \mathfrak{x}\_{\boldsymbol{c}k} \partial \mathfrak{x}\_{\boldsymbol{c}\boldsymbol{j}}}.$$

Equations (20a) and (20b) are simple and can be easily solved:

$$\mathcal{Y}\_{j} = e^{-\gamma\_{c}t/2} \sum\_{\alpha} (\mathcal{Q}\_{j\alpha} e^{i\omega\_{a}t} + \mathcal{Q}\_{j\alpha}^{\*} e^{-i\omega\_{a}t}),\tag{21a}$$

$$w = w\_0 e^{\gamma\_s t}.\tag{21b}$$

where

$$
\omega\_a = \sqrt{\lambda\_a - \frac{\mathcal{V}\_c^2}{4}},
$$

w0;Qj<sup>α</sup> are constants and λα are eigenvalues of the matrix, Kij. We see that in order for the stationary state, xc, to be stable, it needs to be

<sup>10</sup>The terms that are proportional to w in Eq. (20a) and to y in Eq. (20b) have vanished because of conditions (14a) and (14b).

Fuzzy Logic and *S*‐Lagrangian Dynamics of Living Systems: Theory of Homeostasis http://dx.doi.org/10.5772/66473 157

$$\frac{\partial W\_{\varepsilon}}{\partial \mathbb{S}\_{\varepsilon}} < 0. \tag{22}$$

Additionally, matrix Kij should be positively defined. The ground states correspond to zero damage and S-index, while the disturbed stationary states correspond to the local minimums of Wðx;SÞ.

Consider the behavior of R-variables near the ground state with a ¼ aðξÞ. In accordance with Eqs. (11b) and (14a), we have

$$
\dot{\xi}\_i = -\gamma\_c(\mathfrak{x}\_c, \mathfrak{S}\_c) \mathcal{Q}\_{\vec{\eta}}(\xi) \; a\_{\vec{\eta}}(\xi), \tag{23}
$$

so the behavior of the R-variables is determined by the function aðξÞ. <sup>11</sup> It is convenient to present ξ in the form ξðtÞ ¼ ξðtÞnðtÞ, where ξðtÞ and nðtÞ are the scalar and vector functions, respectively, with jnj ≡1. Then Eq. (23) takes the form

$$
\dot{\xi} = -\gamma\_c n\_i \Omega\_{\vec{\eta}} \, a\_{\vec{\eta}}, \tag{24a}
$$

$$\dot{m}\_i = -\frac{\mathcal{V}\_c}{\mathcal{\xi}} \left( \mathcal{Q}\_{i\dot{\jmath}} \, a\_{\dot{\jmath}} - n\_i (n\_k \mathcal{Q}\_{k\dot{\jmath}} a\_{\dot{\jmath}}) \right). \tag{24b}$$

If a ¼ ϕðξÞξ, where ϕðξÞ is a scalar function, these equations are simplified:

$$
\dot{\xi} = \mathbf{0},
\tag{25a}
$$

$$
\dot{m}\_i = -\frac{\mathcal{V}\_c \mathcal{O}}{\mathcal{S}} \mathcal{Q}\_{\dot{\imath}i} n\_{\dot{\jmath}}.\tag{25b}
$$

Therefore, in this case, ξ ¼ ξ<sup>0</sup> ¼ const:.

In the case of two R-variables, we can write ξ as

$$\mathcal{L} = \mathcal{E}\_0 \begin{bmatrix} \cos \varphi \\ \sin \varphi \end{bmatrix},\tag{26}$$

which implies that ϕ ¼ ϕð cos φ; sin φÞ, and Eq. (25b) takes the form

$$\frac{d\phi}{dt} = -\frac{\mathcal{V}\_c \phi}{\mathcal{\xi}\_0} \left( \cos \phi \frac{\partial \rho}{\partial \sin \phi} - \sin \phi \frac{\partial \rho}{\partial \cos \phi} \right)^{-1}. \tag{27}$$

Therefore,

Iðxc2;Sc2Þ > 0; (17)

y ¼ x−xc; (19a)

w ¼ S−Sc; (19b)

w\_ ¼ −γcw: (20b)

; (20a)

Þ; (21a)

: (21b)

Aðxc2;Sc2Þ > 0 ) Sc<sup>2</sup> > 0: (18)

S-index is non-zero, because

156 Lagrangian Mechanics

approximation, we obtain<sup>10</sup>

state

where

where

10

(14b).

This means that near LSS, the system is stressed, but its state is stable.

Consider the case where mij ¼ mijðx;SÞ and W ¼ Wðx;SÞ, a ¼ aðξÞ. If deviations from the stable

are small, we can expand Eqs. (11a) and (11c) with respect to y and w. In the first-order

<sup>i</sup> ¼ −Kijyj

∂Wc ∂Sc ;

ik <sup>ð</sup>xc;Sc<sup>Þ</sup> <sup>∂</sup><sup>2</sup>Wc

∂xck∂xcj :

<sup>i</sup>ωα<sup>t</sup> <sup>þ</sup> <sup>Q</sup>� jαe −iωαt

−γ<sup>c</sup> t

ffiffiffiffiffiffiffiffiffiffiffiffiffi λα− γ2 c 4

;

y€<sup>i</sup> þ γcy\_

γ<sup>c</sup> ¼ −

w ¼ w0e

r

w0;Qj<sup>α</sup> are constants and λα are eigenvalues of the matrix, Kij. We see that in order for the

The terms that are proportional to w in Eq. (20a) and to y in Eq. (20b) have vanished because of conditions (14a) and

ωα ¼

Kij <sup>¼</sup> <sup>m</sup><sup>−</sup><sup>1</sup>

−γ<sup>c</sup> t=2 ∑ α ðQjαe

Equations (20a) and (20b) are simple and can be easily solved:

stationary state, xc, to be stable, it needs to be

yj ¼ e

<sup>11</sup>Note that because matrix Ωij is antisymmetric, R-variables exist only if there are at least two R-variables.

$$\mathcal{L}\_1 = \mathcal{L}\_0 \cos \left( \phi(t) \right), \tag{28a}$$

$$
\xi\_2 = \xi\_0 \sin \left( \phi(t) \right). \tag{28b}
$$

where function φðtÞ should be obtained from Eq. (27).

#### 3.3. Simulation results

For easy visualization of the typical behavior of systems with homeostasis, we consider a system with two C-variables and two R-variables: x ¼ {x1;x2}, ξ ¼ {ξ1;ξ2} and mij ¼ miδij with constant m1≪m2, making x<sup>1</sup> fast and x<sup>2</sup> slow variables. In order to clarify the influence of Cvariables and S-index upon the homeostatic behavior, we choice also W ¼ Wðx;SÞ and a simplest form of a

$$a = \begin{bmatrix} a\_{01} & 0 \\ 0 & a\_{02} \end{bmatrix} \begin{bmatrix} \xi\_1 \\ \xi\_2 \end{bmatrix},\tag{29}$$

with constant a01; a02. In this case, Eqs. (11a), (11b) and (11c) are simplified and we have12

$$
\Delta m\_i \ddot{\mathbf{x}}\_i - \frac{\partial W}{\partial \mathbf{S}} \ m\_i \dot{\mathbf{x}}\_i = -\frac{\partial W}{\partial \mathbf{x}\_i} \tag{30a}
$$

$$
\dot{\xi}\_i = \frac{\partial W}{\partial \mathcal{S}} \Omega\_{\text{ij}} a\_{\text{j}},\tag{30b}
$$

$$\frac{dS}{dt} = -\frac{1}{2}m\_i\dot{\mathbf{x}}\_i^2 + \mathcal{W}(\mathbf{x}, \mathbf{S}).\tag{30c}$$

Conditions (i)–(iii) on page 8 allow us to choose the functions <sup>I</sup>ðx;S<sup>Þ</sup> and <sup>A</sup>ðx;S<sup>Þ</sup> in the form13

$$I(\mathfrak{x}, \mathbb{S}) = \mathfrak{O}\_1(\mathbb{S}) I(\mathfrak{x}),\tag{31a}$$

$$A(\mathbf{x}, \mathbf{S}) = \mathbf{S} \Phi\_2(\mathbf{S}) \Gamma(\mathbf{x}),\tag{31b}$$

where Φ1ðSÞ and Φ2ðSÞ are monotonically increasing and decreasing functions of S, respectively, with {Φ1ð0Þ, <sup>Φ</sup>2ð0Þ} <sup>&</sup>gt; 0 and <sup>J</sup>ðx<sup>Þ</sup> <sup>≥</sup> <sup>0</sup>;Γðxc<sup>Þ</sup> <sup>&</sup>gt; 0.<sup>14</sup>

Results of the simulation are shown in Figures 1 and 2 for the different initial conditions.

<sup>12</sup>There is no summation on i.

<sup>13</sup>Generally speaking, both <sup>I</sup>ðx;S;ξ<sup>Þ</sup> and <sup>A</sup>ðx;S;ξ<sup>Þ</sup> may depend on <sup>R</sup>-variables far from the stable states, but here we have neglected this opportunity.

<sup>14</sup>Simulation shows that the qualitative behavior of <sup>x</sup>ðtÞ, <sup>S</sup>ðtÞ, and <sup>ξ</sup>ðt<sup>Þ</sup> weakly depends upon the concrete choice of the functions Φ1ðSÞ, Φ2ðSÞ and JðxÞ, ΓðxÞ if they satisfy conditions (i)–(iii). For results are shown below we have used <sup>Φ</sup>1ðSÞ¼ð<sup>1</sup> <sup>þ</sup> <sup>b</sup>S<sup>k</sup> <sup>Þ</sup>; <sup>Φ</sup>2ðSÞ¼ð<sup>1</sup> <sup>þ</sup> <sup>c</sup>S<sup>n</sup><sup>Þ</sup> −1 ; with b ¼ c ¼ 1 and k ¼ n ¼ 2.

In Figure 1A, light injuring of the system causes the main ground state to be slightly disturbed. We see that the fast and slow C-variables<sup>15</sup> quickly find their stable points. Injure (Figure 1A, row 4) and S-index (Figure 1A, row 5) approach zero, while the R-variables (Figure 1A, rows 6 and 4) remain running. Therefore, in this case, homeostasis cares for the injury, fully reduces the stress (S-index becomes zero), and returns the system to its main ground state. Interestingly,16 in spite of the fact that injury and protection can quickly oscillate, S-index approaches zero much more smoothly and does not "feel" the quick alteration of the injure parameter (Figure 1A, row 4).

In Figure 1B, the initial perturbation was somewhat stronger, resulting in the system being unable to return to the main ground state. However, after further trials, homeostasis finds another non-distressing (zero S-index) ground state (Figure 1B, rows 1 and 2), where injury and distress are vanished, as well (Figure 1B, rows 4 and 5).

In Figure 1C, the initial perturbation was more stronger, so protection (Figure 1C, row 3) cannot fully reduce injury and distress. Nevertheless, homeostasis finds the region of Cvariables where the system is stable (Figure 1C, rows 1 and 2), because protection was able to compensate the injury, but, unlike the previous case, the protection mechanisms should be permanently running. So the system remains damaged and distressed (Figure 1C, rows 4 and 5).

Figure 2 shows a situation where the system was heavily injured. We see that protection (Figure 2A, row 3) failed to compensate for the injury (Figure 2A, row 4) and after short-time damage and stress drastically increasing (Figure 2A, rows 4 and 5), C-variables leave the lifecompatible region (Figure 2A, rows 1 and 2) and the system inevitably moves toward death or destruction. We see that crossover to this way can be very sharp. Moreover, in this situation, the behavior of R-variables differs considerably from the behavior near the stable states. The system appears to be "crying" in response to the dangerous situation (Figure 2A, row 6). Interestingly, a similar situation occurs in the case of an initially strongly stressed system, although the initial injury was small (Figure 2B).

It should be emphasized that the decreased protection observed in Figures 1A and B and Figure 2 is different. In Figure 1, the protection mechanism has done the work and the system returns to its ground state with zero stress and injury, unlike the situation observed in Figure 2 where protection fails to compensate for the injury and slows down due to the stress level becoming too high.

If a system has a "latent time" between consequent actions ("time of decision making"), differential equations (11a)–(11c) should be replaced by finite-difference equations. Although Eqs. (11a) and (11c) are deterministic equations, the system imitates random trial-and-error behavior if the latent time is not very small (Figure 3). It should be noted that such a pseudochaotic behavior of finite-difference equations' solution is quite typical for many nonlinear

ξ<sup>1</sup> ¼ ξ<sup>0</sup> cos ðφðtÞÞ, (28a)

ξ<sup>2</sup> ¼ ξ<sup>0</sup> sin ðφðtÞÞ: (28b)

; (29)

<sup>∂</sup><sup>S</sup> <sup>Ω</sup>ijaj; (30b)

<sup>i</sup> þ Wðx;SÞ: (30c)

Iðx;SÞ ¼ Φ1ðSÞJðxÞ, (31a)

Aðx;SÞ ¼ SΦ2ðSÞΓðxÞ, (31b)

(30a)

where function φðtÞ should be obtained from Eq. (27).

For easy visualization of the typical behavior of systems with homeostasis, we consider a system with two C-variables and two R-variables: x ¼ {x1;x2}, ξ ¼ {ξ1;ξ2} and mij ¼ miδij with constant m1≪m2, making x<sup>1</sup> fast and x<sup>2</sup> slow variables. In order to clarify the influence of Cvariables and S-index upon the homeostatic behavior, we choice also W ¼ Wðx;SÞ and a

> <sup>a</sup> <sup>¼</sup> <sup>a</sup><sup>01</sup> <sup>0</sup> 0 a<sup>02</sup> ξ<sup>1</sup>

mix€i<sup>−</sup> <sup>∂</sup><sup>W</sup>

ξ\_ <sup>i</sup> <sup>¼</sup> <sup>∂</sup><sup>W</sup>

dS dt <sup>¼</sup> <sup>−</sup> 1 2 mix\_ 2

tively, with {Φ1ð0Þ, <sup>Φ</sup>2ð0Þ} <sup>&</sup>gt; 0 and <sup>J</sup>ðx<sup>Þ</sup> <sup>≥</sup> <sup>0</sup>;Γðxc<sup>Þ</sup> <sup>&</sup>gt; 0.<sup>14</sup>

−1

<sup>Þ</sup>; <sup>Φ</sup>2ðSÞ¼ð<sup>1</sup> <sup>þ</sup> <sup>c</sup>S<sup>n</sup><sup>Þ</sup>

with constant a01; a02. In this case, Eqs. (11a), (11b) and (11c) are simplified and we have12

<sup>∂</sup><sup>S</sup> mix\_<sup>i</sup> <sup>¼</sup> <sup>−</sup>

Conditions (i)–(iii) on page 8 allow us to choose the functions <sup>I</sup>ðx;S<sup>Þ</sup> and <sup>A</sup>ðx;S<sup>Þ</sup> in the form13

where Φ1ðSÞ and Φ2ðSÞ are monotonically increasing and decreasing functions of S, respec-

Generally speaking, both Iðx;S;ξÞ and Aðx;S;ξÞ may depend on R-variables far from the stable states, but here we have

Simulation shows that the qualitative behavior of xðtÞ, SðtÞ, and ξðtÞ weakly depends upon the concrete choice of the functions Φ1ðSÞ, Φ2ðSÞ and JðxÞ, ΓðxÞ if they satisfy conditions (i)–(iii). For results are shown below we have used

; with b ¼ c ¼ 1 and k ¼ n ¼ 2.

Results of the simulation are shown in Figures 1 and 2 for the different initial conditions.

ξ2 

> ∂W ∂x<sup>i</sup>

3.3. Simulation results

158 Lagrangian Mechanics

simplest form of a

12

13

14

There is no summation on i.

neglected this opportunity.

<sup>Φ</sup>1ðSÞ¼ð<sup>1</sup> <sup>þ</sup> <sup>b</sup>S<sup>k</sup>

<sup>15</sup>Figure 1A, rows 1 and 2 correspondingly.

<sup>16</sup>This is quite typical for the considered situation.

Figure 1. Homeostasis for different initial conditions. Here, x<sup>1</sup> and x<sup>2</sup> are C-variables and ξ<sup>1</sup> and ξ<sup>2</sup> are R-variables. (A) Light injury. (B) The system cannot return to the main ground state, but finds another comfortable state without damage and distress. (C) Homeostasis cannot fully compensate for injury and distress, but some discomforting stable state exists.

finite-difference equations and it was widely discussed in the literature. A particular example of such a behavior was considered in Ref. [17] and a general explanation of this phenomenon can be found in Ref. [19].
