Qualitative and Quantitative Comparative Analysis of Results of Numerical Simulation of Cyber-Physical Biosensor Systems Vasyl Martsenyuka, Andriy Sverstiukb, Oksana Bahrii-Zaiatsb, Aleksandra Kłos-Witkowskaa a University of Bielsko-Biala, Willowa St., 2, Bielsko-Biala, 43-300, Poland b I. Horbachevsky Ternopil National Medical University, maidan Voli, 1, Ternopil, 46002, Ukraine Abstract The article deals with the qualitative and quantitative comparative analysis of the results of numerical modeling of mathematical models of cyber-physical biosensor systems on rectangular and hexagonal lattices using lattice differential equations. The main focus is on the mathematical description of the discrete population dynamics and the dynamic logic of the studied models. The lattice differential equations with delay are proposed to simulate antigen- antibody interaction within rectangular and hexagonal biopixels. Appropriate spatial operators have been used to model the interaction between biopixels similar to the phenomenon of diffusion. The paper presents the results of numerical simulations in the form of phase plane images and lattice images of the probability of antigen to antibody binding in the biopixels of cyber-physical biosensor systems for antibody populations relative to antigen populations. The obtained experimental results make it possible to carry out a qualitative and quantitative comparative analysis of the stability of mathematical models of cyber-physical immunosensory systems on hexagonal and rectangular lattices using lattice differential equations. It is concluded that at a constant delay [0, 0.25) value for the model on the hexagonal lattice and [0, 0.22) when using a rectangular lattice, respectively, the solutions of the mathematical models studied tend to non-identical endemic states, which in this case are stable foci. The results of the phase diagrams of antigen populations, antibodies and lattice images of the likelihood of antigen binding to antibodies in the biopixels of cyber-physical biosensor systems conclude that at a constant delay value 0.25 (in the case of a hexagonal lattice) and 0.23 (in the case of a rectangular lattice), Hopf bifurcation occurs and all subsequent trajectories correspond to stable boundary cycles for all pixels. The obtained experimental results make it possible to perform a qualitative and quantitative comparative analysis of the stability of mathematical models of cyber-physical biosensor systems on hexagonal and rectangular lattices using lattice differential equations. Keywords 1 Cyber-physical system, biosensor, continuous dynamics, differential equations, dynamic logic 1. Introduction Problem statement. Nowadays, the concept of creating cyber-physical systems (CPS) for various spheres of technology interaction with human activity is actively developing. CPS are considered as intelligent systems, in which external devices, processors, physical objects, network equipment are integrated. The main purpose of CPS creation is to monitor the behavior of physical objects as components of such systems in real time. These are systems in which cybernetic means (measuring, computing, control, executive, communication) interact with physical processes in arbitrary objects [1]. Analysis of known research results. Cyber-physics of the system are identified with the manifestation of the fourth industrial revolution that is taking place in the modern world [2]. Thus, there is also the ITTAP’2022: 2nd International Workshop on Information Technologies: Theoretical and Applied Problems, November 22–24, 2022, Ternopil, Ukraine EMAIL: vmartsenyuk@ath.bielsko.pl (A.1); sverstyuk@tdmu.edu.ua (A.2); bagrijzayats@tdmu.edu.ua (A.3); awitkowska@ath.bielsko.pl (A.4) ORCID: 0000-0001-5622-1038 (A.1); 0000-0001-8644-0776 (A. 2); 0000-0002-5533-3561 (A. 3); 0000-0003-2319-5974 (A.4) ©️ 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) physical possibility of using Internet of Things (IoT) technologies where signals from sensors and measuring instruments need to be used. Thus, more publications are emerging in the literature [3], which attract attention to modern concepts and offer new innovative solutions. A. Plattser proposed an approach based on «dynamic logic», where cyber-physical systems are described and analyzed [4], [5]. In these works, there are hybrid programs (HP) in a simple programming language with simple semantics. HP allow the programmer to access directly the real values of variables representing real values and determine their dynamics. A model of an immunosensor is proposed based on a system of differential equations with time delay on a hexagonal lattice. The presented main result consists of conditions of local asymptotic stability of an endemic state. To obtain this result, the method of Lyapunov functionals is used. It combines the general approach to constructing Lyapunov functionals for predator-prey models and differential equations with time delay on a hexagonal lattice. A numerical example shows the influence of time delays on stability, namely, the transition from a stable focus to a limit cycle through a Hopf bifurcation occurs [6]. In the work [7] it is considered the delayed antibody-antigen competition model for two- dimensional array of biopixels. Stability research uses approach of Lyapunov functions [8-10]. Numerical simulations are used in order to investigate qualitative behavior when changing the value of time delay and diffusion. It was shown that when increasing the value of time delay, we transit from steady state through Hopf bifurcation, increasing period and finally to chaotic behavior. The increase of diffusion causes an appearance of chaotic solutions also [11-12]. The goal of the work. Perform qualitative and quantitative comparative analysis of results of numerical modeling of mathematical models of cyber-physical biosensory systems on rectangular and hexagonal lattice using lattice differential equations. The investigated models have the capabilities to control and calculate signals of object control in various branches of the national economy, in particular in medicine and fully reveal their potential in the development of cyber-physical biosensor systems. Setting objectives. When analyzing the results of numerical modeling of mathematical models of cyber-physical biosensory systems on a rectangular and hexagonal lattice using lattice differential equations, it is necessary to take into account spatial-temporal properties of devices in which they are used. With respect to spatial organization, the models examined should be based on certain discrete structures, which will take into account the interaction of biosensor pixels. In continuous space, models must describe processes known as population dynamics. That is why the problem is the analysis of the results of numerical modeling of mathematical models of cyber-physical biosensory systems on a rectangular and hexagonal lattice using lattice differential equations. Results of the research. With the increasing pace of life and the need for more accurate methods of monitoring different parameters, interest in biosensors is growing in science and industry. Biosensors are alternatives to known measurement methods characterized by poor selectivity, high cost, poor stability, slow response and can often only be performed by highly trained personnel. This is a new generation of sensors that use a biological material in the design that provides very high selectivity and allows fast and simple measurements [13]. Cellular biosensors can be used to quantify body infection by certain electrochemical or optical phenomena [14]. describes a cell biosensor that uses electrochemical impedance spectroscopy. This biosensor is designed to count human CD4 + cells. The probing region of this biosensor includes electrode pixels, each of which is compared to the size of the CD4 + cell that is entangled by the electrode pixels. They find themselves by observing informative changes per pixel. The «On» or «Off» state of the electrode pixel indicates that one CD4 + cell is detected. Thus, in order to calculate the CD4 + cells, it is necessary to sum the electrode pixels in the «On» state. This general approach to quantitative cell detection is used to model imunosensornea of a system that is based on the phenomenon of fluorescence. Immunosensor [15] is a subgroup of biosensors in which an immunochemical reaction is associated with a transducer. The principle of operation of all immunosensors is specific molecular recognition of antigens by antibodies to form a stable complex. 2. Cyber-physical biosensor system (CPBSS) The definition of the term «Cyber-Physical Sensor System (CPSS)» is given in [16]. This definition was introduced for industrial applications of sensors. The common definition of CPSS provides for «a higher degree of combination, distribution of the system, use of built-in systems in the field of automation and compliance with existing standards». The approach was used to characterize CPBSS (see Fig. 1), which allows to perform its numerical simulation. According to [16], definitions and schemes for the CPBSS are used to define the CPBSS. CPBSS converts physically measured immunological indicators into digital information, which allows to carry out signal processing in time using certain algorithms. Also interact with your internal data, own capabilities, requirements, and internal tasks in terms of propagating to the same or higher level of the hierarchy. CPBSS (external rectangle in Fig. 1) is based on the concept of cyber-physical system (CPS) taking into account the peculiarities of intelligent immunosensor. With additional skills (dashed line in Fig. 1), the sensor expands to CPBSS. This provides more diagnostic information about the object of research. Figure 1: Functional scheme of CPВSS CPBSS refers to highly intellectual of information systems. They use an accessible set of interfaces that provide fast and reliable status information and internal system data that should be available to other СPS. According to [16] the CPBSS as a self-organizing system, requires comprehensive knowledge of its own dynamic structure and infrastructure of the common system. For this purpose, it is necessary to define types of imunosensory devices, taking into account their functional application. For example, immunosensors can be used to assess critical conditions in cardiovascular disease, insulin values in blood glucose measurement, and quantify certain Pharmactic compounds. Work [16] proposes a common structure for the CPBSS. When this scheme is used in the case of biosensors, three directions of viocremes can be used: general information on the immunosensor; measurements of immunological indicators and skills, conversion of units and calibration; interaction with other immunosensors. Thus, certain methods for describing the immunosensor are contemplated. CPBSS research uses the R programming language Despite the wide variety of programming languages used in CPS development (Assembly, C, C++, D, Java, JavaScript, Python, Ada, etc. [17]), R is now widely used in many machine learning and data visualization industries. 3. Continuous dynamics of studied CPBSS. A mathematical description is used for the continuous dynamics of the studied CPBSS using differential equations with lag. 3.1. A mathematical model of CPBSS on a hexagonal lattice with used lattice differential equations with lag The CPBSS model based on hexagonal lattice from used lattice differential equations is considered. At that, cubic coordinate system [18] is used for numbering of biopixelive (𝑖, 𝑗, 𝑘), 𝑖, 𝑗, 𝑘 = ̅̅̅̅̅̅̅̅ −𝑁, 𝑁, 𝑖 + 𝑗 + 𝑘 = 0 Lets denote 𝑉𝑖,𝑗,𝑘 (𝑡) as antigen concentration, 𝐹𝑖,𝑗,𝑘 (𝑡) - the antibody concentration in the biopixels (𝑖, 𝑗, 𝑘); 𝑖, 𝑗, 𝑘 = ̅̅̅̅̅̅̅̅ −𝑁, 𝑁, 𝑖 + 𝑗 + 𝑘 = 0. The model is based on such biological assumptions for an arbitrary biopixel (𝑖, 𝑗, 𝑘). 1. Antigens are detected, bind, and finally neutralized by antibodies with some probability velocity ϒ > 0. 2. It is assumed that when colonies of antibodies are absent, colonies of antigens are regulated by a logistic equation with a delay: 𝑉𝑖,𝑗,𝑘 (𝑛 + 1) = (1 + 𝛽 − 𝛿𝑣 𝑉𝑖,𝑗,𝑘 (𝑛 − 𝑟))𝑉𝑖,𝑗,𝑘 (𝑛), (1) where 𝛽 and 𝛿𝑣 – positive numbers, and 𝑟 > 0 mean latency of the negative responce of the antigens’ colonies. 3. The fertility rate 𝛽 > 0 for the antigen population is introduced. 4. Antigens are neutralized by antibodies at a certain probability rate ϒ > 0. 5. The population of antigens tries to reach a certain limit of saturation with a speed 𝛿𝑣 > 0. 6. The diffusion of antigens from six adjacent pixels is considered (𝑖 + 1, 𝑗, 𝑘 − 1), (𝑖 + 1, 𝑗 − 1, 𝑘), (𝑖, 𝑗 − 1, 𝑘 + 1), (𝑖 − 1, 𝑗, 𝑘 + 1), (𝑖 − 1, 𝑗 + 1, 𝑘) and (𝑖, 𝑗 + 1, 𝑘 − 1) (Figure 2) with diffusion speed 𝐷∆−2 , where 𝐷 > 0 – coefficient of diffusion; ∆> 0 – distance between two adjacent pixels. 7. The constant mortality of antibodies 𝜇𝑓 > 0 is introduced. 8. As a result of the immune response the antibody density increases with a probabilistic velocity 𝜂ϒ. 9. The antibody population is approaching a certain level of saturation with a speed 𝛿𝑓 > 0. 10. The immune response occurs with some constant delay in a time τ> 0. Figure 2: Hexagonal lattice, which binds six neighboring pixels in the model of the biopixels using the 𝐷 𝐷 𝐷 cubic coordinates:1, 3, 5, 8, 9, 11 – (∆−2 𝑉𝑖,𝑗,𝑘 (𝑡)) ; 2 – (∆−2 𝑉𝑖+1,𝑗,𝑘−1 (𝑡)) ; 4 – (∆−2 𝑉𝑖+1,𝑗−1,𝑘 (𝑡)); 6 – 𝐷 𝐷 𝐷 𝐷 (∆−2 𝑉𝑖,𝑗−1,𝑘+1 (𝑡)) ; 7 - (∆−2 𝑉𝑖−1,𝑗,𝑘+1 (𝑡)); 10 -(∆−2 𝑉𝑖−1,𝑗+1,𝑘 (𝑡)); 12 (∆−2 𝑉𝑖,𝑗+1,𝑘−1 (𝑡))  On this basis we consider a very simple construction of the late antigen-antibody model for the hexagonal biopixel array, which is based on the known Marchuk model [19-21] and uses the spatial operator 𝑆̂ proposed in [22]. 𝑑𝑉𝑖,𝑗,𝑘 (𝑡) = (𝛽 − 𝛾 𝐹𝑖,𝑗,𝑘 (𝑡 − 𝜏) − 𝛿𝑣 𝑉𝑖,𝑗,𝑘 (𝑡 − 𝜏)) 𝑉𝑖,𝑗,𝑘 (𝑡) + 𝑆̂{𝑉𝑖,𝑗,𝑘 } 𝑑𝑡 𝑑𝐹𝑖,𝑗,𝑘 (𝑡) 𝑑𝑡 = (−𝜇𝑓 + 𝜂𝛾 𝑉𝑖,𝑗,𝑘 (𝑡 − 𝜏) − 𝛿𝑓 𝐹𝑖,𝑗,𝑘 (𝑡)) 𝐹𝑖,𝑗,𝑘 (𝑡) (1) The model (1) is defined by the initial functions (2): (2) 0 0 𝑉𝑖,𝑗,𝑘 (𝑡) = 𝑉𝑖,𝑗,𝑘 (𝑡) ≥ 0, 𝐹𝑖,𝑗,𝑘 (𝑡) = 𝐹𝑖,𝑗,𝑘 (𝑡) ≥ 0, 𝑡 ∈ [−𝜏, 0), 𝑉𝑖,𝑗,𝑘 (0), 𝐹𝑖,𝑗,𝑘 (0) > 0. For the hexagonal array, discrete diffusion is used for the spatial operator. 𝐷Δ−2 [𝑉𝑖+1,𝑗,𝑘−1 + 𝑉𝑖+1,𝑗−1,𝑘 + 𝑉𝑖,𝑗−1,𝑘+1 + 𝑉𝑖−1,𝑗,𝑘+1 + 𝑉𝑖−1,𝑗+1,𝑘 + 𝑉𝑖,𝑗+1,𝑘 − 6𝑛𝑉𝑖,𝑗,𝑘 ] 𝑆̂{𝑉𝑖,𝑗,𝑘 } = { 𝑖, 𝑗, 𝑘 ∈ ̅̅̅̅̅̅̅̅̅̅̅̅̅ −𝑁 + 1, 𝑁 − 1, 𝑖+𝑗+𝑘 =0 Each colony is exposed to antigens produced in six adjacent biopixels, which are separated by equal distances Δ. 3.2. A mathematical model of CPBSS on a rectangular lattice with used lattice differential equations with lag The mathematical model of CPBSS on a rectangular lattice with used lattice differential equations with delay is considered in [23] is as follows: 𝑑𝑉𝑖,𝑗 (𝑡) = (𝛽 − 𝛾 𝐹𝑖,𝑗 (𝑡 − 𝜏) − 𝛿𝑣 𝑉𝑖,𝑗 (𝑡 − 𝜏)) 𝑉𝑖,𝑗 (𝑡) + 𝑆̂{𝑉𝑖,𝑗 } 𝑑𝑡 𝑑𝐹𝑖,𝑗 (𝑡) = (−𝜇𝑓 + 𝜂𝛾 𝑉𝑖,𝑗 (𝑡 − 𝜏) − 𝛿𝑓 𝐹𝑖,𝑗 (𝑡)) 𝐹𝑖,𝑗 (𝑡) 𝑑𝑡 The names and numerical values of the corresponding model values (4) are given above. Model (4) is defined by initial functions (5): 0 0 𝑉𝑖,𝑗 (𝑡) = 𝑉𝑖,𝑗 (𝑡) ≥ 0, 𝐹𝑖,𝑗 (𝑡) = 𝐹𝑖,𝑗 (𝑡) ≥ 0, 𝑡 ∈ [−𝜏, 0), 𝑉𝑖,𝑗 (0), 𝐹𝑖,𝑗 (0) > 0. For a square array 𝑁 ⨯ 𝑁 the following discrete diffusion is used for a spatial operator 𝑆̂{𝑉𝑖,𝑗 }. 𝐷Δ−2 [𝑉1,2 + 𝑉2,1 + 𝑉𝑖,𝑗−1 − 2𝑛𝑉1,1 ] 𝑖, 𝑗 = 1 𝐷Δ−2 [𝑉2,𝑗 + 𝑉1,𝑗−1 + 𝑉1,𝑗+1+ + 𝑉𝑖,𝑗+1 − 3𝑛𝑉𝑖,𝑗 ] 𝑖 = 1, 𝑗 ∈ ̅̅̅̅̅̅̅̅̅̅ 2, 𝑁 − 1 𝐷Δ−2 [𝑉1,𝑁−1 + 𝑉2,𝑁 − 2𝑛𝑉1,𝑁 ] 𝑖, 𝑗 ∈ ̅̅̅̅̅̅̅̅̅̅ 2, 𝑁 − 1 −2 ̅̅̅̅̅̅̅̅̅̅ 𝐷Δ [𝑉𝑖−1,𝑁 + 𝑉𝑖+1,𝑁 + 𝑉𝑖,𝑁−1 − 3𝑛𝑉𝑖,𝑁 ] 𝑖 ∈ 2, 𝑁 − 1, 𝑗 = 𝑁 𝐷Δ−2 [𝑉𝑁−1,𝑁 + 𝑉𝑁,𝑁−1 − 2𝑛𝑉𝑁,𝑁 ] 𝑖 = 𝑁, 𝑗 = 𝑁 𝑆̂{𝑉𝑖,𝑗 } = 𝐷Δ−2 [𝑉𝑁−1,𝑗 + 𝑉𝑁,𝑗−1 + 𝑉𝑁,𝑗+1 + 𝑉𝑖,𝑗+1 − 3𝑛𝑉𝑁,𝑗 ] 𝑖 = 𝑁, 𝑗 ∈ ̅̅̅̅̅̅̅̅̅̅ 2, 𝑁 − 1 𝐷Δ−2 [𝑉𝑁−1,1 + 𝑉𝑁,2 − 2𝑛𝑉𝑁,1 ] 𝑖 = 𝑁, 𝑗 = 1 ̅̅̅̅̅̅̅̅̅̅ DΔ−2 [𝑉𝑖−1,1 + 𝑉1+1,1 + 𝑉𝑖,2 − 3𝑛𝑉𝑖,1 ] 𝑖 ∈ 2, 𝑁 − 1, 𝑗=1 −2 ̅̅̅̅̅̅̅̅̅̅ 𝐷Δ [𝑉𝑖−1,𝑗 + 𝑉𝑖+1,𝑗 + 𝑉𝑖,𝑗−1 + 𝑉𝑖,𝑗+1 − 4𝑛𝑉𝑖,𝑗 ] 𝑖, 𝑗 ∈ 2, 𝑁−1 { Each colony is exposed to antigens produced in four adjacent biopixels. Two colonies are considered in each direction, which are separated by equal distances ∆. 4. Dynamic logical simulation of CPBSS using the example of a mathematical model of CPBSS on a hexagonal lattice with used lattice differential equations with lag In order to model the dynamic logic of the studied CPBSS, the syntax proposed by A. Platzer for the common CPS is used [4]. For modelling CPS the programming language of hybrid programs (HP) is used, because it has more features than differential equations. The first level of HP are dynamic programs that are defined by the following grammar 𝑎 ∷= 𝑉𝑖,𝑗,𝑘 (𝑛 + 1) = 𝑉𝑖,𝑗,𝑘 (𝑛)𝑒𝑥𝑝{𝛽 − ϒ𝐹𝑖,𝑗,𝑘 (𝑛 − 𝑟) − 𝛿𝑣 𝑉𝑖,𝑗,𝑘 (𝑛 − 𝑟)} + 𝑆̂{𝑉𝑖,𝑗,𝑘 (𝑛)}, 𝐹𝑖,𝑗,𝑘 (𝑛 + 1) = 𝐹𝑖,𝑗,𝑘 (𝑛)𝑒𝑥𝑝 {−𝑓 + 𝜂ϒ𝑉𝑖,𝑗,𝑘 (𝑛 − 𝑟) − 𝛿𝑓 𝐹𝑖,𝑗,𝑘 (𝑛)} &Ф𝑡 . (7) where Ф𝑡 is an evolutionary domain constraint in the form of a formula for the logic of the first order of real arithmetic Ф𝑡 ≝ 𝑉 𝑚𝑖𝑛 ≤ 𝑉𝑖,𝑗,𝑘 (𝑛) ≤ 𝑉 𝑚𝑎𝑥 ∧ 𝐹 𝑚𝑖𝑛 ≤ 𝐹𝑖,𝑗,𝑘 (𝑛) ≤ 𝐹 𝑚𝑎𝑥 ∧ 𝑖, 𝑗, 𝑘 = ̅̅̅̅̅̅̅̅ −𝑁, 𝑁 ∧ 𝑛 > 0, 𝑖 + 𝑗 + 𝑘 = 0 (8) The functioning of the biopixel (𝑖 + 𝑗 + 𝑘) is determined by two states, with respect to fluorescence. Namely, 𝑠𝑓𝑙 is a state of fluorescence and 𝑠𝑛𝑜𝑛 𝑓𝑙 is one of the non-fluorescence states. The use of the first order of semantics of logic and the satisfaction ratio 𝑠| = 𝐿 for the first-order formula 𝐿 of real arithmetic and state 𝑠 can be determined for some pixels (𝑖, 𝑗, 𝑘); 𝑖, 𝑗, 𝑘 = ̅̅̅̅̅̅̅̅ −𝑁, 𝑁, 𝑖 + 𝑗 + 𝑘 = 0 states 𝑠𝑓𝑙 and 𝑠𝑛𝑜𝑛 𝑓𝑙 as 𝑠𝑓𝑙 | = 𝑘𝑓𝑙 𝑉𝑖,𝑗,𝑘 (𝑛)𝐹𝑖,𝑗,𝑘 (𝑛) ≥ 𝜃𝑓𝑙 , 𝑠𝑛𝑜𝑛 𝑓𝑙 | = 𝑘𝑓𝑙 𝑉𝑖,𝑗,𝑘 (𝑛)𝐹𝑖,𝑗,𝑘 (𝑛) < 𝜃𝑓𝑙 . (9) Discrete changes occur in computer programs when they accept new values for variables. This situation occurs when a fluorescence phenomenon occurs in a pixel (𝑖, 𝑗, 𝑘); 𝑖, 𝑗, 𝑘 = ̅̅̅̅̅̅̅̅−𝑁, 𝑁, 𝑖 + 𝑗 + 𝑘 = 0. The state 𝑠𝑓𝑙,𝑖,𝑗,𝑘 ≔ 1 is assigned a value of 1 to the variable 𝑠𝑓𝑙,𝑖,𝑗,𝑘 . This leads to a discrete, jump-like change, as the value 𝑠𝑓𝑙,𝑖,𝑗,𝑘 does not change smoothly, but rapidly when it suddenly changes from 1 to 𝑠𝑓𝑙,𝑖,𝑗,𝑘 , causing a discrete jump of values 𝑠𝑓𝑙,𝑖,𝑗,𝑘 . In this way, we obtain a discrete model of change 𝑠𝑓𝑙,𝑖,𝑗,𝑘 ≔ 1, except for the model of change. 5. Results of numerical simulation of the mathematical model of CPBSS Numerical experiments based on computer simulation were carried out taking into account an integer natural number N that characterizes the number of pixels in the hexagonal lattice. The model 𝑚𝑙 0.8 𝑚𝑙 (1)–(3) 𝑁 = 4 and values of 𝛽 = 2𝑚𝑖𝑛1 , ϒ= 2 , 𝑓 = 1𝑚𝑖𝑛1, 𝜂 = , 𝛿𝑣 = 0.5 , 𝛿𝑓 = 𝑚𝑖𝑛∙𝑚𝑘𝑔 ϒ 𝑚𝑖𝑛∙𝑚𝑘𝑔 𝑚𝑙 𝑛𝑚2 0.5 𝑚𝑖𝑛∙𝑚𝑘𝑔, 𝐷 = 0.2 𝑚𝑖𝑛 , Δ= 0.3𝑛𝑚. 5.1. Results of numerical simulation of the mathematical model of CPBSS on hexagonal lattice with used lattice differential equations with lag The long-term behavior of the model (1)–(3) at 𝜏 = 0.05, 𝜏 = 0.25, 𝜏 = 0.287, with a set of parameter values as shown above (Fig. 3 (a–c)) was analyzed. We observe qualitative changes in the behavior of biopixelive and CPBSS models on the hexagonal lattice as a whole. a) b) c) Figure 3: Results of numerical simulation system (1) at а) – 𝜏 = 0.05, b) – 𝜏 = 0.25, c) – 𝜏 = 0.287. Image of phase planes in coordinates Vi, j ,k , Fi, j ,k  for a pixel (0,0,0) and its six adjacent pixels. Marking: – indicates initial state, ○ – identical steady state, ● – nonidentical steady state Figures 4 (a) and 5 (a) show the results of numerical modeling of grating images of antigens and antibodies, respectively, in pixels of system (1)-(3) at 𝜏 = 0.05, which corresponds to a stable focus. With 𝜏 = 0.25 a less pronounced (Fig. 4(b) and Fig. 5 (b)), and with 𝜏 = 0.287 (c) a more pronounced running wave of antibodies, which is presented in Figures 4 (c) and 5 (c). а) b) c) Figure 4: Lattice images of antigens in system pixels (1) at 𝜏 = 0.05 (а), 𝜏 = 0.25 (b), 𝜏 = 0.287(c) а) b) c) Figure 5: Lattice images of antibodies in system pixels (1) at 𝜏 = 0.05 (а), 𝜏 = 0.25 (b), 𝜏 = 0.287(c) For the computer simulation of the CPBSS model under study, lattice graphs were used, showing for each pixel the probability of antigens contacting antibodies as 𝑉𝑖,𝑗,𝑘 х𝐹𝑖,𝑗,𝑘 in 𝜏 = 0.05, 𝜏 = 0.25, 𝜏 = 0.287, which are shown in Figure 6 (a–c). а) b) c) Figure 6: Lattice images of the probability of antigen binding to antibodies in system pixels (1) at 𝜏 = 0.05 (а); 𝜏 = 0.25 (b); 𝜏 = 0.287 (c) By analyzing phase diagrams of antigen populations, antibodies (Fig. 3 a) and lattice images of the probability of antigen-antibody linkages in CPBSS biopixels (Fig. 6 a), it can be concluded that in 𝜏 = 0.05 solving the system (1) tends to be identical to the endemic state, which in this case is a sustained focus. Such dependencies are observed for all biopixelives of the CPBSS model on the hexagonal lattice using lattice differential equations with lag at 𝜏 ∈ [0,0.25) (Fig. 3 a, 4 a). By analyzing phase diagrams of antigen populations, from the antibodies (Fig. 3 b) lattice images of the probability of antigen- antibody links in CPBSS biopixels (Fig. 6 b), it can be concluded that in the emerging Hopf bifurcation and all further paths correspond to stable limit cycles for all points (Fig. 3 b, 6 b). To theorize the occurrence of Hopf bifurcation, it is necessary to calculate a suitable pair of purely imaginary solutions to the characteristic equation of the linearized system (1). Numerical simulation results are consistent with theoretical results based on Hopf bifurcation theorem [24]. At the same time, the solution of the system (1) seeks a stable limit cycle with two local extremes (one local maximum and one local minimum) in the cycle. 5.2. Results of numerical simulation of the mathematical model of CPBSS on a rectangular lattice with used lattice differential equations with lag Computer simulations were implemented for different values. The long-term behavior of the model (4)–(6) is analyzed at 𝜏 = 0.05, 𝜏 = 0.22, 𝜏 = 0.23, 𝜏 = 0.2865 with a set of parameter values, which are presented above (Fig. 3–10). We see qualitative changes in the behavior of biopixelive and CPBSS models in general. a) b) c) d) Figure 7: The phase plane plots of the system (3) or antibody populations 𝐹𝑖,𝑗 , relative to populations of antigens 𝑉𝑖,𝑗 , as a result of numerical simulations at 𝜏 = 0.05 (а), 𝜏 = 0.22 (b), 𝜏 = 0.23 (c), 𝜏 = 0.2865 (d). Marking: – indicates initial state, ○ – identical steady state, ● – nonidentical steady state Figures 8, 9 show the result of computer modeling of the discrete dynamics of the CPBSS in the form of lattice images of antigens and antibodies in the pixels of the system under study. These images are the first step in investigating the dynamic logic of a cyber-physical biosensor system on a rectangular lattice using lattice differential equations with a delay. а) b) c) d) Figure 8: Lattice images of antigens in system pixels (1) at 𝜏 = 0.05 (а), 𝜏 = 0.22 (b), 𝜏 = 0.23(c), 𝜏 = 0.2865(d) а) b) c) d) Figure 9: Lattice images of antibodies in system pixels (1) at 𝜏 = 0.05 (а), 𝜏 = 0.22 (b), 𝜏 = 0.23(c), 𝜏 = 0.2865(d) Figures 8 (a) and 9 (a) show the results of numerical modeling of grating images of antigens and antibodies in pixels of system (1) at 𝜏 = 0.05, which corresponds to a stable focus. At 𝜏 = 0.22 it is less pronounced (Fig. 8 (b) and Fig. 9 (b)), and at 𝜏 = 0.23, 𝜏 = 0.2865 it is more pronounced running wave of antibodies, which is presented in Figures 8 (c, d) and 9 (c, d) Lattice graphs were used as the next step in the numerical simulation of CPBSS on a rectangular lattice. First, the corresponding graphs are constructed, on which for each pixel the probability of antigens contact with antibodies 𝑉𝑖,𝑗,𝑘 х𝐹𝑖,𝑗,𝑘 , as in 𝜏 = 0.05, 𝜏 = 0.22, 𝜏 = 0.23, 𝜏 = 0.2865 are shown in Figure 10 (a–d). а) b) с) d) Figure 10: Lattice images of the probability of antigen binding to antibodies in system pixels (4) at 𝜏 = 0.05 (а), 𝜏 = 0.22 (b), 𝜏 = 0.23 (c), 𝜏 = 0.2865 (d) By analyzing phase diagrams of antigen populations from antibodies (Fig. 3 a), it can be concluded that when 𝜏 = 0.05 the system (4) is solved, it tends to be identical to the endemic state, which in this case is a steady focus. Changing the value changes the qualitative behavior of pixels and the entire immunosensor. For example, [0,0.22] paths corresponding to a stable node for all points are observed (Fig. 3 (a, b)). At a value close to 0.23 min., Hopf bifurcation occurs and further paths correspond to stable elipse- shaped limit cycles for all points (Fig. 3 (c)). For values   0.2865 we observe chaotic behavior relative to (Fig. 3 (d)). 5.3. Qualitative and quantitative comparative analysis of results of numerical simulation of mathematical models of cyberphysical biosensory systems on hexagonal and rectangular lattice using lattice differential equations By comparing the results of numerical modeling of the studied mathematical models of cyberphysical biosensory systems in the form of phase diagrams of antigen populations, by antibodies (Fig. 3 a, 7 a) and lattice images of the probability of antigen connections to antibodies in CPBSS biopixels (Fig. 6 a, 10 a), it can be concluded that in   0,05 the solution of the system (1) and (4) are resistant to non-endemic states. A similar relationship is observed for all biopixelives of the CPBSS model on the hexagonal lattice at τ  [0, 0.25) (Fig. 3 a, 6 a), and in the case of using a rectangular lattice identical, the endemic state was observed at   [0, 0.22 ] (Fig. 7 a, 10 a). According to the obtained results of phase diagrams of antigen populations, according to antibodies (Fig. 3 b) and lattice images of the probability of antigens binding to antibodies in CPBSS biopixels, it can be concluded that in τ  0,25 (in the case of hexagonal grating (Fig. 3 b, 4 b)) and 0.23 (in the case of rectangular grating) (Fig. 7 b, 10 b)) Hopf bifurcation occurs and all further paths correspond to steady limit cycles for all points (Fig. 3 b, 6 b, 7 b, 10 b). As the results of the numerical analysis showed, the probabilities of antigen-antibody connections in the biopixels of the models under study vary according to the laws of discrete dynamics. Analyzing the obtained results, it was concluded that when the value changes qualitatively the behavior of biopixelive and CPBSS changes. 6. Conclusions In the work we carried out qualitative and quantitative comparative analysis of models of CPBSS on rectangular and hexagonal lattice using lattice differential equations, for which purpose the general scheme of cyber-physical and sensory system proposed in the work was used [16]. The basic model was modified taking into account the features of biosensors, which are considered in the form of biopixel arrays. Each biopixel is seen as a cyber-physical system in order to account for the continuous dynamics of the immunological response. Lattice images in biopixels change according to the laws of discrete dynamics. The developed models take into account the interaction of biopixelive with each other by diffusion of antigens. The mathematical description of CPBSS contains the discrete population dynamics, which is combined with dynamic logic, which is used for discrete events. The work uses a class of lattice differential equations with time lag, which model the interaction of antigens and antibodies in biopixels. Spatial operators model diffusion type interaction between biopixels. Dynamic mathematical modeling is not enough to simulate discrete dynamics in biosensors. To address this disadvantage, the dynamic logic syntax that has been proposed for cyber-physical Platzer systems has been used to describe the discrete states of biopixel as a result of fluorescence. The results of the numerical simulation obtained in the work allow to analyze the stability and compare the studied models taking into account the time delay. 7. References [1] E. A. Lee, “Cyber physical systems: Design challenges,” Center for Hybrid and Embedded Software Systems, EECS University of California, Berkeley, CA 94720, USA, Tech. Rep. UCB/EECS-2008-8, 2008, p. 10. doi: 10.1109/ISORC.2008.25. [2] J. Lee, B. Bagheri, and H.-A. Kao, “A cyber-physical systems architecture for industry 4.0-based manufacturing systems,” Manufacturing Letters, 3(2015) 18–23. doi:10.1016/j.mfglet.2014.12.001. [3] K.-D. Kim and P. R. Kumar, “Cyber–physical systems: A perspective at the centennial,” Proceedings of the IEEE, vol. 100, no. Special Centennial Issue, 2012, pp. 1287–1308. doi: 10.1109/jproc.2012.2189792. [4] A. Platzer, “Differential dynamic logic for hybrid systems.,” J. Autom. Reas., vol. 41, no. 2, 2008, pp. 143–189. doi:10.1007/s10817-008-9103-8. [5] A. Platzer, Logical Foundations of Cyber-Physical Systems. Springer International Publishing, 2018. doi: 10.1007/978- 3-319-63588-0. [6] V.Martsenyuk, A.Sverstiuk, I. Gvozdetska, Using Differential Equations with Time Delay on a Hexagonal Lattice for Modeling Immunosensors, Cybernetics and Systems Analysis, 2019, 55(4), pp. 625–637. doi:10.1007/s10559-019-00171-2. [7] V. Martsenyuk , A. Klos-Witkowska, A. Sverstiuk, Stability Investigation of Biosensor Model Based on Finite Lattice Difference Equations, Springer Proceedings in Mathematics and Statistics, 2020, 312, pp. 297–321. doi:10.1007/978-3-030-35502-9_13. [8] V. Martsenyuk, Construction and study of stability of an antitumoral immunity model, Cybernetics and Systems Analysis, 40(5), (2004), pp. 778–783. doi:10.1007/s10559-005-0017-8. [9] A. Nakonechnyj, V. Marzenyuk, Problems of controllability for differential Gompertzian dynamics equations, Kibernetika i Sistemnyj Analiz, 2004, 40(2), pp. 123–133. [10] Martsenyuk, V.P., On stability of immune protection model taking into account damage of target organ: The degenerate Liapunov functionals method, Cybernetics and Systems Analysis, 2004, (1), pp. 126–136. doi:10.1023/B:CASA.0000028109.69242.38 [11] V. Martsenyuk, A. Sverstiuk, O. Bahrii-Zaiats, Yu. Rudyak, B. Shelestovsky, Software complex in the study of the mathematical model of cyber-physical systems, ICT&ES 2nd International Workshop Information-Communication Technologies & Embedded Systems, 12 November, 2020 Mykolaiv, Ukraine. p. 87-97. [12] V.Martsenyuk, A.Klos-Witkowska, A.Sverstiuk, O.Bahrii-Zaiats, M.Bernas, K.Witos, Intelligent Big Data system based on scientific machine learning of cyber-physical systems of medical and biological processes, in: The Fourth International Workshop on Computer Modeling and Intelligent Systems (CMIS-2021). 27 of April 2021, Zaporizhzhia, Ukraine. pp. 34-48. doi:10.32782/cmis/2864-4. [13] V. Martsenyuk, I. Andrushchak, P. Zinko, A. Sverstiuk, On Application of Latticed Differential Equations with a Delay for Immunosensor Modeling, Journal of Automation and Information Sciences (2018) 55-65. doi: 10.1615/JAutomatInfScien.v50.i6.50. [14] X. Jiang and M. G. Spencer, Electrochemical impedance biosensor with electrode pixels for precise counting of CD4+ cells: A microchip for quantitative diagnosis of HIV infec- tion status of AIDS patients, Biosensors and Bioelectronics, 2010; 25(7): 1622–1628. doi:10.1016/j.bios.2009.11.024. [15] P. B. Luppa, L. J. Sokoll, and D. W. Chan, Immunosensors- principles and applications to clinical chemistry, Clinica Chimica Acta, 2001, vol. 314, no. 1, pp. 1–26. doi:10.1016/S0009- 8981(01)00629-5. [16] C. Berger, A. Hees, S. Braunreuther, and G. Reinhart, “Characterization of cyber-physical sensor systems,” Procedia CIRP, 2016, vol. 41, pp. 638–643. doi: 10.1016/j.procir.2015. 12.019. [17] P. Soulier, D. Li, J. R. Williams, “A survey of language- based approaches to cyber-physical and embedded system development,” Tsinghua Science and Technology, vol. 20, no. 2, pp. 130–141, 2015. doi: 10.1109/TST.2015.7085626. [18] Internet resource: https://www.redblobgames.com/grids/hexagons/. [19] C. C. McCluskey, “Complete global stability for an SIR epidemic model with delay — distributed or discrete,” Nonlinear Analysis: Real World Applications, 2010, vol. 11, no. 1, pp. 55–59. doi:10.1016/j.nonrwa.2008.10.014. [20] A. Nakonechny and V. Marzeniuk, “Uncertainties in medical processes control,” Lecture Notes in Economics and Mathematical Systems, 2006, vol. 581, pp. 185–192. doi:10.1007/3-540-35262- 7_11. [21] V. Marzeniuk, “Taking into account delay in the problem of immune protection of organism,” Nonlinear Analysis: Real World Applications, 2001, vol. 2, no. 4, pp. 483–496. doi.org/10.1016/S1468-1218(01)00005-0. [22] A. Prindle, P. Samayoa, I. Razinkov, T. Danino, L. S. Tsim- ring, and J. Hasty, “A sensing array of radically coupled genetic ‘biopixels’,” Nature, 2011, vol. 481, no. 7379, pp. 39–44. doi:10.1038/nature10722. [23] V. Martsenyuk, A. Klos-Witkowska, A. Sverstiuk, Stability, bifurcation and transition to chaos in a model of immunosensor based on lattice differential equations with delay, Electronic Journal of Qualitative Theory of Differential Equations, 2018(27), р. 1-31. doi:10.14232/ejqtde.2018.1.27. [24] . Hofbauer, G. Iooss, A Hopf bifurcation theorem for difference equations approximating a differential equation, Monatshefte fur Mathematik, 1984, Vol. 98(2), p. 99-113. doi: 10.1007/BF01637279.