**3. Modeling**

It is necessary to design the mathematical model of the proposed sensor that is possible to do through the interpretation of the problematic described in chapters

**Figure 3.** *Scheme of the optimal path.*

**Figure 4.** *Heat transfer in temperature sensor scheme.*

above, moreover the mathematical analysis summarized previously helped to get the understanding of the static behavior and dynamic response of the sensor/transducer system.

In **Figure 4** is depicted a first order system based in a thermal system owing to the heating transfer has the characteristic to not have overshoots and not faster response time. Hence, Th represents the temperature of the thermal focus HT, which is bigger than Tl (temperature of the body s) whereby heat is transferred from HT to LT. Furthermore, K is the thermal resistivity, A is the section area crossed by the heating transfer and db its thickness.

Therefore, a temperatures sensor can be modeled by a first order system due to the heat transfer behavior and that model can be explained by Eq. (8) [12].

$$\Theta(t) = \Theta\_f \left( 1 - e^{-\frac{t}{RC}} \right) \tag{8}$$

Eq. (9) is obtained after the Laplace transformation in Eq. (8), in which *Kp* is the proportional gain, *L* is the sensor delay in temperature measurement, *τ* is the sensor response time for the temperature measurement [12].

$$\frac{T^\*}{U(\mathbb{S})} = \frac{K\_p e^{LS}}{\pi \mathbb{S} + 1} \tag{9}$$

In second side, for a second order model, such as described in **Figure 5**, in which, X0 means the displacement registered by the sensor and X1 means the real displacement because of the mass M and the overshoots are depending of K and β (deformation coefficient and damping coefficient), it means that a sensor with second order response can be depicted by **Figure 5**.

Therefore, by Eq. (10) is possible to model a second order system according to understand its dynamic in time domain [12].

*Perspective Chapter: Optimal Analysis for the Correlation between Vibration and Temperature… DOI: http://dx.doi.org/10.5772/intechopen.107622*

$$M\left(\frac{d^2X\_1}{dt^2} - \frac{d^2X\_0}{dt^2}\right) = KX\_0 + \beta \frac{dX\_0}{dt} \tag{10}$$

By Laplace domain, it is obtained the following model due to interpret the experimental data as second order response, which is given by Eq. (11) [12].

$$\text{MS}^2X\_1(\text{S}) = X\_0(\text{S}) \left[ \text{K} + \beta \text{S} + \text{MS}^2 \right] \tag{11}$$

Thereby, Eq. (12) summarizes the parameters for a vibration sensor in Laplace domain [12].

$$\frac{X\_0(\mathcal{S})}{\mathcal{S}^2 X\_1(\mathcal{S})} = \frac{M}{K} \frac{\frac{K}{M}}{\mathcal{S}^2 + \frac{\beta}{M}\mathcal{S} + \frac{K}{M}}\tag{12}$$

The mathematical models for sensors described in paragraphs above are enhanced by adaptive models achieved from experimental analysis and the improvement of their physical parameters also can be achieved from dynamic and geometry properties by dependence of the material of the designed sensor (nanostructures).

Such as for example, the theoretical model of the temperature sensor is given by Eq. (9) that was compared by the polynomial analysis of Eq. (1) and the coefficients of the theoretical model can be compared with the MF parameters from Eq. (9), which were obtained by the measured temperature data. Moreover, for the context of the vibration sensor, its theoretical model given by Eq. (12) also was compared with the experimental information described by the parameters Eq. (9) from Eq. (1). In this context, Eq. (13) is the model of the temperature sensor, in which, its parameter "k" is the temperature sensor gain and "τ" is its response time, this expression is achieved as a consequence of the parameters correlation from Eqs. (1) and (9).

$$\text{Gs} = \frac{k}{\pi \text{S} + 1} \tag{13}$$

It is known the Zero Order Hold (ZOH) by Eq. (14).

*Chaos Monitoring in Dynamic Systems – Analysis and Applications*

$$\mathcal{G}(zoh(\mathcal{S})) = \frac{1 - e^{-jwT\_s}}{jw} \tag{14}$$

That is equivalent to Eq. (15) in Laplace domain.

$$G(zoh(\mathcal{S})) = \frac{1 - e^{-ST\_r}}{\mathcal{S}} \tag{15}$$

Looking for the digital model by Z transform in Eq. (16), which is achieved from Eq. (15).

$$\mathbf{H}\left(\mathbf{Z}\left\{\frac{\mathbf{k}}{\pi\mathbf{S}+\mathbf{1}}\right\}\right) = \mathbf{G}(Zoh)\mathbf{Z}\left\{\frac{\mathbf{k}}{\pi\mathbf{S}+\mathbf{1}}\right\}\tag{16}$$

Replacing the ZOH in last Eq. (16) is obtained Eq. (17).

$$E\left(Z\left\{\frac{k}{\pi S + 1}\right\}\right) = Z\left\{\frac{1 - e^{-ST\_r}}{S}\right\} Z\left\{\frac{k}{\pi S + 1}\right\} \tag{17}$$

It is known *<sup>z</sup>* <sup>¼</sup> *<sup>e</sup>ST<sup>s</sup>* to replace in last Eq. (17) according to obtain Eq. (18)**.**

$$H\left(Z\left\{\frac{k}{\pi\mathcal{S}+1}\right\}\right) = (1-Z^{-1})Z\left\{\frac{1}{\mathcal{S}}\left(\frac{k}{\pi\mathcal{S}+1}\right)\right\}\tag{18}$$

Eq. (19) is obtained reducing Eq. (18).

$$H\left(Z\left\{\frac{k}{\tau \mathcal{S} + 1}\right\}\right) = k\left(1 - Z^{-1}\right)Z\left\{\frac{1}{\mathcal{S}}\left(\frac{\frac{1}{\tau}}{\mathcal{S} + \frac{1}{\tau}}\right)\right\} \tag{19}$$

By Z transform in Eq. (19) is obtained Eq. (20).

$$H\left(Z\left\{\frac{k}{\tau S + 1}\right\}\right) = k\left(1 - Z^{-1}\right)Z\left\{\frac{1}{S}\left(\frac{\frac{1}{\tau}}{S + \frac{1}{\tau}}\right)\right\}\tag{20}$$

Therefore, by Z transform is achieved the digital model of the proposed temperature sensor that is given by Eq. (21), because of Z transform in Eq. (20).

$$H\left(Z\left\{\frac{k}{\tau S + 1}\right\}\right) = \frac{kZ^{-1}\left(1 - e^{-\frac{T\_s}{\tau}}\right)}{1 - e^{-\frac{T\_s}{\tau}}Z^{-1}}\tag{21}$$

By other side, the Tustin model is given by Eq. (22), in which "*Ts*" is the sampling time.

$$\mathcal{S} = \frac{2}{T\_s} \frac{Z - 1}{Z + 1} \tag{22}$$

Hence, the digital model of first order transfer function of the proposed temperature sensor (because of Tustin reduction) is given by Eq. (23) that was obtained replacing in Eq. (13) the Eq. (22).

*Perspective Chapter: Optimal Analysis for the Correlation between Vibration and Temperature… DOI: http://dx.doi.org/10.5772/intechopen.107622*

$$H(Z) = \frac{T\_s Z + T\_s}{(2\pi + T\_s)Z + (T\_s - 2\pi)}\tag{23}$$

Eqs. (21) and (23) are the digital model for the transfer function of the proposed sensor, for which **Figure 6** shows the comparisons among the theoretical model of the temperature measurement for the operating combustion motor with the experimental temperature measurement, which were obtained and processed by the proposed temperature sensor. The blue color curve is the theoretical result based in heat transfer (Eq. (9)) from the surface motor to the sensor surface, the red color curve is the measurement data obtained by the execution of Eq. (21) in the processor of the temperature sensor, while the green color curve is the measurement data obtained by the execution of Eq. (23) in the processor of the temperature sensor. The error achieved by the measurement data represented by the red color curve was 0.5 percent approximately, and the error obtained by the measurement data represented by the green color curve was 0.9 percent approximately. For both contexts, the error analysis was made by the comparison of the measurement data with the theoretical curve (blue color).

Therefore, it can be possible to choose Eq. (23) in order to be the base of the temperature monitoring algorithm for the proposed sensor, also because it has more simple expression for the programming in comparison with Eq. (21), which has not simple elements for the programming and it can cause consequences in the computing time. However, the result is much better by the programming of Eq. (21) because it produced less error than the measurement by the processing of Eq. (23), moreover the consequence in the computing time is solved by the short response time of the sensor owing to the nanostructures characteristics of the sample that received the IR signal of the measured temperature.

In order to compare the theoretical measurement with the experimental data of the combustion motor vibration surface, there were achieved the parameters of the second order system for the proposed vibration sensor by comparison of the Eqs. (1), (7) and (12), in similar context to the temperature sensor (described in paragraphs above), it was analyzed the digital equation by Z transform and Tustin reduction according to compare with the theoretical result that is given by the blue color curve

**Figure 6.** *Theoretical curve (blue) versus experimental curves (red and green) for the measurement temperature analysis.*

**Figure 7.** *Theoretical curve (blue) versus experimental curves (red and green) for the measurement vibration analysis.*

and showed in **Figure 7**. The experiment was made by measuring the vibration of the combustion motor surface while it was pushed the accelerator due to keep stability of the RPM (Revolution Per Minute) and the red color curve is the data from the experimental measurement evaluated by the processor of the proposed sensor and the algorithm executed was supported by the Z transform, nevertheless, the green color curve was achieved by the experimental data that was evaluated by the Tustin model (reduction). Hence the less error value was obtained by the model based in Z transform even though the complication in its programming (in comparison of the model based by Tustin) was not a problem, because of the short response time of the sensor surface based in nanostructures.

Thus, the error for both models were less than 1 percent (Error of 0.5 percent for Z transform and 1.8 percent for Tustin reduction) and for the operating work of the combustion motor there was not necessity to use digital model expressions for the algorithms analysis of the transduction, even though the sampling time was around 200 uS (less value than the minimal response time: 2mS), hence it was continued the analysis by Laplace domain. However, it can be used for high values of operating work, maybe for future applications.

The mathematical model of sensors are evaluated also as part of a control system for vibration and temperature analysis of a combustion motor, in which was necessary to identify the system and to keep a good performance of the vibration control for a combustion motor. Therefore, an interesting evaluation is given by PID (Proportional Integral Derivative) control as part of the identification system of the combustion motor, and the physical variables (vibration and pressure) are measured by the designed sensor.

**Figure 8** shows the adaptive cascade algorithm that is represented by a block diagram to suit the measured signal received from the vibration motor. The input signal is given by the IR measured signal U1 that is adjusted by the matrix weights W1 and M1, controlled by C1 over the sensor/transducer P1.

The response signal U2 (electrical value of the IR signal measured from the surface motor) is controlled by C2 and adjusted by M2, W2 due to obtain the temperature transduced as a consequence to know the function P2, moreover U3 (which also is U2) *Perspective Chapter: Optimal Analysis for the Correlation between Vibration and Temperature… DOI: http://dx.doi.org/10.5772/intechopen.107622*

in concurrent time is compensated by C3 and adapted by M3, W3 in order to achieve the vibration response of the designed sensor as a consequence to know the transfer function P3.

The internal controller PID in block diagram scheme is depicted by **Figure 9**, which as necessary for the identification system of the combustion motor parameters that are part of the motor adaptive control. The input signal In(S) gives information of the desired value in temperature and vibration of the motor surface, Con(S) is the PID control (parameters), Pt(S) is the transfer function of the plant (motor surface), S(S) is the transfer function of the designed sensor, and Y(S) is the response signal.

**Figure 9.** *PID controller used for the identification system.*

Eq. (24) is obtained as a result of the algebra analysis from the block diagram above.

$$(In(\mathcal{S}) - \mathcal{S}(\mathcal{S})Y(\mathcal{S}))Con(\mathcal{S})Pt(\mathcal{S}) = Y(\mathcal{S})\tag{24}$$

Thus, the transfer function obtained from the reduction of Eq. (24) is given by Eq. (25).

$$\frac{Y(S)}{In(S)} = \frac{Con(S)Pt(S)}{1 + S(S)Con(S)Pt(S)}\tag{25}$$

In Eq. (26), it is generalized the transfer function for temperature/vibration combustion internal control, in which *KS* is the gain parameter of the designed sensor, *τ<sup>s</sup>* is the response time of the sensor. *KP* is the controller proportional gain, *KD* is the Controller derivative gain, *KI* is the Controller integral gain. *Kpt* is the gain parameter of the plant (combustion motor), *τpt* is the plant response time.

$$
\left(\frac{K\_S}{\tau\_t \mathbf{S} + \mathbf{1}}\right) \left(K\_P + K\_D \mathbf{S} + \frac{K\_I}{\mathbf{S}}\right) \left(\frac{K\_{pt}}{\tau\_{pt} \mathbf{S} + \mathbf{1}}\right) + \mathbf{1} = \mathbf{0} \tag{26}
$$

The reduction from the equation is given by Eq. (27), for which was decided a Proportional Derivative (PD) controller due to achieve a fast control response under the vibration motor.

$$\left(\tau\_t \tau\_{pt} \mathbf{S}^2 + \left(\tau\_t + \tau\_{pt} + K\_s K\_D K\_{pt}\right) \mathbf{S} + \left(K\_s K\_p K\_{pt} + \mathbf{1}\right) = \mathbf{0} \tag{27}$$

In Eq. (28) is organized Eq. (27) as a polynomial in second descending order.

$$\mathbf{S}^2 + \frac{\left(\mathbf{\tau}\_s + \mathbf{\tau}\_{pt} + K\_s K\_D K\_{pt}\right)}{\mathbf{\tau}\_s \mathbf{\tau}\_{pt}} \mathbf{S} + \frac{\left(K\_s K\_p K\_{pt} + \mathbf{1}\right)}{\mathbf{\tau}\_s \mathbf{\tau}\_{pt}} = \mathbf{0} \tag{28}$$

The control parameters can be obtained by different methodologies such as the stability analysis, furthermore the comparison with the theoretical model of the system dynamic given by Eq. (29) [3, 12], in which *ω*<sup>0</sup> is the natural frequency for the system and є is the damping effect.

$$\mathbf{S}^2 + (2\varepsilon a v\_0)\mathbf{S} + a v\_0^2 = \mathbf{0} \tag{29}$$

Hence, the control parameters *Kp* and *KI*, can be obtained by the comparison of the coefficients from Eqs. (28) and (29), from which are proposed the following Eqs. (30) and (31) that are functions of *τs*,*τpt*,*Ks*,*Kpt*,*ω*<sup>0</sup> and є.

$$\frac{\left(\tau\_t + \tau\_{pt} + K\_\prime K\_D K\_{pt}\right)}{\tau\_t \tau\_{pt}} = 2\varepsilon\alpha\rho\_0\tag{30}$$

$$\frac{\left(K\_s K\_p K\_{pt} + \mathbf{1}\right)}{\tau\_s \tau\_{pt}} = a \mathbf{o}\_0^{\;2} \tag{31}$$

Also, Eq. (32) is the proportional parameter of the PD controller obtained from Eq. (31).

*Perspective Chapter: Optimal Analysis for the Correlation between Vibration and Temperature… DOI: http://dx.doi.org/10.5772/intechopen.107622*

$$K\_P = \frac{\alpha \alpha^2 \tau\_t \tau\_{pt} - 1}{K\_s K\_{pt}} \tag{32}$$

Finally, the derivative gain is obtained from Eq. (30) and showed by Eq. (33).

$$K\_D = \frac{2\epsilon\alpha\rho\_0\tau\_s\tau\_{pt} - \tau\_s - \tau\_{pt}}{K\_sK\_{pt}} \tag{33}$$

After to obtain the control parameters, it is possible to warrant the influence of the designed sensor in the stability of the system, thus, analyzing Lyapunov stability from equation previous, for which Eq. (34) is the complement of Eq. (17) in which U(S) is the input excitation signal and R(S) is the small displacement in Laplace domain.

$$\mathbf{S}^2 + \frac{\left(\tau\_t + \tau\_{pt} + K\_s K\_D K\_{pt}\right)}{\tau\_s \tau\_{pt}} \mathbf{S} + \frac{\left(K\_s K\_p K\_{pt} + \mathbf{1}\right)}{\tau\_s \tau\_{pt}} = \frac{U(\mathbf{S})}{R(\mathbf{S})}\tag{34}$$

Eq. (35) is a reduction from Eq. (34) but in time domain.

$$\frac{d^2r(t)}{dt^2} + \frac{\left(\tau\_s + \tau\_{pt} + K\_i K\_D K\_{pt}\right)}{\tau\_s \tau\_{pt}} \frac{\mathrm{d}r(t)}{\mathrm{d}t} + \frac{\left(K\_i K\_p K\_{pt} + 1\right)}{\tau\_s \tau\_{pt}} r(t) = \mathfrak{u}(t) \tag{35}$$

In addition, preparing variable changes and showed by Eq. (36).

$$\mathbf{y}(t) = \frac{\mathbf{d}r(t)}{dt} \tag{36}$$

Eq. (37) is achieved replacing the Eqs. (36) and (34) in Eq. (35), for u(t) null:

$$\frac{d\mathbf{y}(t)}{dt} = -\frac{\left(\boldsymbol{\tau}\_{\boldsymbol{s}} + \boldsymbol{\tau}\_{\boldsymbol{p}t} + \mathbf{K}\_{\boldsymbol{s}} \mathbf{K}\_{D} \mathbf{K}\_{\boldsymbol{p}t}\right)}{\boldsymbol{\tau}\_{\boldsymbol{s}} \boldsymbol{\tau}\_{\boldsymbol{p}t}} \mathbf{y}(t) - \frac{\left(\mathbf{K}\_{\boldsymbol{s}} \mathbf{K}\_{\boldsymbol{p}} \mathbf{K}\_{\boldsymbol{p}t} + \mathbf{1}\right)}{\boldsymbol{\tau}\_{\boldsymbol{s}} \boldsymbol{\tau}\_{\boldsymbol{p}t}} \mathbf{r}(t) = \mathbf{0} \tag{37}$$

Organizing the last equation by energy analysis, *E r*, *y* , in order to find the Lyapunov equation, which is positive and can achieve the first Lyapunov condition given by Eq. (38).

$$E(r, y) = \mathbf{0.5}(y(t))^2 + \mathbf{0.5} \frac{\left(K\_i K\_p K\_{pt} + \mathbf{1}\right)}{\tau\_s \tau\_{pt}} \left(r(t)\right)^2 = \mathbf{0} \tag{38}$$

Looking for the second Lyapunov condition by the inequality (39).

$$\frac{\mathrm{d}E(r(t), y(t))}{dt} \le 0 \tag{39}$$

Therefore, the inequality (40) is obtained replacing Eq. (38) in the inequality (39).

$$r\_s v(t) \frac{\mathbf{d}\mathbf{y}(t)}{dt} + \frac{\left(K\_s K\_p K\_{pt} + 1\right)}{\tau\_s \tau\_{pt}} r(t) \frac{\mathbf{d}r(t)}{dt} \le \mathbf{0} \tag{40}$$

Also, replacing Eqs. (36) and (37) in the inequality (40) is obtained the inequality (41).

$$y(t)\left(-\frac{\left(\tau\_s + \tau\_{pt} + K\_s K\_D K\_{pt}\right)}{\tau\_s \tau\_{pt}} y(t) - \frac{\left(K\_s K\_p K\_{pt} + 1\right)}{\tau\_s \tau\_{pt}} r(t)\right) + \frac{\left(K\_s K\_p K\_{pt} + 1\right)}{\tau\_s \tau\_{pt}} r(t) y(t) \le 0 \tag{41}$$

Finally, it is obtained the inequality (42) due to achieve the second Lyapunov condition, moreover while *τ<sup>s</sup>* is small the control system get better stability, it can be possible by sensors with short response time such as the sensors based in nanostructure (as it is designed the proposed sensor of this research).

$$-\frac{\left(\tau\_s + \tau\_{pt} + K\_s K\_D K\_{pt}\right)}{\tau\_s \tau\_{pt}} \mathcal{y}(t)^2 \le 0 \tag{42}$$

All the analysis was made in Laplace domain, because the response time is enough bigger than the sampling time of both systems "temperature and vibration" by the processor of the advanced sensor. Furthermore, the robustness and short response time of the sensors based in nanostructures give possibility to execute complicated algorithms, however this computing task can be prioritized for future analysis.
