Analysis on Real time Perception Technology of Wireless Sensor Network in CPS

. Cyber Physical Systems (CPS) combines physical and computing systems tightly. Node operating systems (OS) are fundamental units in CPS. There are still many problems unsolved when designing CPS especially CPS node OS in aspects of predictability, reliability, robustness, etc. Aiming at the problem, this paper proposes the effective shortest time priority algorithm and the adaptive shortest time priority algorithm. Experimental results show that, compared with the traditional FIFO (advanced first in first out) and LSF (least slack first) algorithm, the algorithm proposed in this paper effectively reduce the deadline miss ratio, as a result, the real-time performance of the CPS are effectively improved.


Introduction
Cyber and physical system (CPS) is a complex system, which contains the network and the physical environment.CPS is closely integrated with many technologies, such as computing, communication and control.The system must be aware of the constraints caused by environmental changes in real time.At present, the CPS application in the medical, military and other related countries and people's livelihood in important areas, has a very important role, which is a higher requirement for real-time performance of the system.Therefore, the research of CPS real-time scheduling algorithm can meet the requirements of high real-time performance of CPS system, and it is also conducive to accelerate the construction of information in various fields [1-7] .
Since CPS have diverse computational and resource characteristics, they are complicated and there are still many research challenges.One example is how to describe architecture of cyber physical systems.In this paper, we propose a 4-layer architecture for CPS.
This layer is at the bottom of CPS architecture including a large number of CPS nodes on which node operating systems are running.This layer is directly responsible for the interaction with physical systems.Nodes collect physical data.They not only transmit data up to the upper layer, but also accept feedback data.They control physical operations of reactors.Node operating system controls interaction devices and other hardware facilities of nodes to complete the feedback loop.
2)Data Internet Layer This layer should receive sensor data and send control data seamlessly to ensure information two-way exchange within horizontal and vertical systems transparently.
3) Information Integrating Layer The data collected from lower layers are different in types and formats.Even some data are uncertain.So CPS must do the corresponding work (data cleaning, data reorganizing, data fusion, etc) to pick out useful information from raw data.Meanwhile, this layer also transforms the reverse interaction information to corresponding control data for distribution to the lower layer.

4)Application Service Layer
This layer is the interface layer between CPS and upper applications.It could encapsulate all functions from lower layers as various services to provide to applications as interface specifications or standards.
Real time scheduling is an important part of real-time system [6][7][8] and it is also a critical part of CPS system, which is the key to guarantee the real-time task.It is also a widely studied problem.In the current research, a lot of real-time scheduling methods are proposed for various task types.But in the CPS, important parameters of realtime tasks with the release time and deadline will be more dependent on nodes in the CPS location and migration time and other factors.Therefore, traditional real-time scheduling algorithms of the physical factors influence considered insufficient, easy to cause the system overload operation, which makes the real-time task deadline missed.The system's real-time perceiving performance is seriously affected, causing major production safety hazards as well as economic losses.In view of these problems, this paper proposes a CPS realtime scheduling algorithm considering the physical environment factors.

The real time scheduling model of CPS
In this paper, we propose a real-time scheduling algorithm for the mobile real-time service node (CPS), which has many nodes in the network.This paper proposes a CPS real-time scheduling algorithm, which enable the system to achieve the maximum deadline satisfaction rate.Therefore, based on the real-time scheduling algorithm under CPS network framework of the mobile real-time service node, the model is describe as follow:

DMR
Rate of meeting deadline(DMR=tasks of meeting deadline/all of tasks) In the real time CPS of the mobile node, in the absence of task conflict, the real-time task DMR is the relaxation time of Ti, which is more than that of the realtime service node.Real time task DMR Ti is the probability that the relaxation time of Ti is greater than that of real-time service nodes.Given As distribution of In case of conflict between the two real time tasks, the paper will give the FIFO (first in first service), LST (shortest time priority), and ELST (CPS effective shortest time first) algorithm to calculate the average DMR:

Improved effective LSF algorithm
Effective LSF algorithm is an optimal algorithm in realtime scheduling algorithm.However, when the real-time tasks are scheduled in CPS system, DMR is needed to consider factors of the physical environment.In the realtime service CPS, the real-time service node migration time is one of the physical factors that need to be considered.Therefore, the effective shortest relaxation time of the real-time service node is considered.Therefore, when the real-time task is scheduled, the task with the most short time of slack time is first scheduled.We can use   ( ,m )) ( 1) 1 ( 1) The deadline meet ratio of task B following task A is: (1 e ) dt As we assume m1 and e1 are evenly distributed on [0,M] and [0, E], respectively, mean DMR of m2 is computed as: Therefore, FIFO and ELSF algorithm to meet the deadline rate is the same.It can be concluded that the ELSF algorithm cannot effectively improve the real-time performance, so the optimization of ELSF algorithm is studied in this paper, Let p be the probability of DMR of firstly scheduled T1.And then let q be the probability of DMR of the secondly scheduled T2.Experimental results show that the ELSF algorithm and LSF algorithm have different performance in the case of both information and physical factors (ei and mi), regardless of the specific gravity of the information factor, and the traditional LSF algorithm is better than the ELSF algorithm in the special condition.From the simulation results of Figure 3, the ELSF scheduling algorithm can show better performance when the information factor of CPS is relatively large.On the other hand, the traditional LSF algorithm has better performance than the ELSF algorithm when the physical factors are more than the information factor.However, in the above two cases,the optimization of the algorithm ELSF are able to exhibit better performance.The optimal ELSF scheduling algorithm can crease the DMR by up to 20% compared to other ways.
i l : slack time of the task i T (exponential distribution average 1/ l ).
i e : execution time of task i T (evenly distributed on [0, E]).
slack time of i T .Calculation methods are as follows: As the distribution function of Ti l be t e l l -, the distribution function of ,Ti e lsf l >0 is below.

( 7 )
It can be concluded from the results of the ELSF, average deadline meet ratio( ) of T2.In addition to ELSF, the other parameters are the same as the FIFO algorithm and C algorithm except

Fig 1 .
Fig 1. (a)When cyber factor is quite big in comparison to physical factor.(b)Whencyber factor is quite small in comparison to physical factor.