State Estimation and Attack Reconstruction of Picking Robot for a Cyber-Physical System

. A novel method based on the unknown input observer is proposed to reconstruct sensor attacks and estimate system states for fruit and vegetable picking robot cyber-physical systems. By fully considering the nonlinear characteristics of the articulated fruit and vegetable picking robot system as well as the infuences of external disturbances, the generalized system model is established and the unknown input observer is designed to reduce false positives and false negatives in the agricultural cyber-physical system. In view of the agricultural production environment, a digital prototype model is established for manipulators of picking robot with three joints. Following the Lagrange method, dynamic equations of the manipulator system are established and transformed into a corresponding state-space model, where the nonlinearity and unknown input information are taken into account. Ten, the original system is converted into a generalized system through state augmentations based on the generalized system theory. Furthermore, an H ∞ unknown input observer is designed to estimate the system state and reconstruct sensor attacks, accommodating nonlinear characteristics and external disturbance efects of the system. Te asymptotic stability of the dynamic error system is proved via the Lyapunov function. By simulation and comparison with an existing method, the results demonstrate that the proposed method reconstructs sensor attacks and estimates system states efectively.


Introduction
In recent years, the cyber-physical system (CPS), a novel intelligent system based on the technical integration of control, computer, and communication, has been widely used in power system [1], intelligent transportation [2], product manufacture [3], industrial control [4], etc. and has broad development prospects. Specifcally, CPS technologies applied in the industrial feld lay the foundation for the industrial cyber-physical system (ICPS) [5]. On the other hand, the integration of the CPS into agriculture can be referred to as the agriculture cyberphysical system (ACPS) [6], which is typifed by the intelligent ACPS [7]. In addition to completing the picking task, the CPS picking robots can also collect data and feed it back to the control end through sensors to monitor the crop growth environment. CPS mobile robots are interconnected with each other, and the crop information collection becomes more reliable. Fruit and vegetable picking is a typical labor-intensive work and the most laborious link in the agricultural production chain [8].
Te robot plays an important role in robot CPS, serving as a medium between information and physical world [9,10]. Te agricultural CPS robots realize the interconnection, in addition to completing the high-efciency picking operation; they can also rely on sensors to collect data and feed it back to monitor the growth of crops. In reference to robot CPS for agricultural picking, the end of robots will directly touch fruits and vegetables, so they are usually equipped with soft fngers to protect produce from scratches, thereby improving the picking quality. Nevertheless, agricultural production features obvious timeliness and seasonality, and the working environment is complex and changeable. When multiple robots in the CPS are networked for cooperative picking works, they have to not only tolerate impacts of environmental temperature and humidity, varying targets, obstacles, etc. but also defend network attacks for actuators and sensors in the case of frequent information exchanges [11]. Terefore, the communication network of picking robot CPS must be secured to ensure smooth implementation of picking works. Especially in busy harvest seasons, once the CPS sufers from network attacks, multiple robots may be unable to transmit accurate data information, which would directly afect the progress of agricultural production. Under the circumstances, it has great signifcance to fgure out efcient methods on the attack detection and state estimation for picking robot CPS and to further recognize and address these attacks, so as to improve the production efciency and promote sound development of the agricultural industry.
Notice that CPS is susceptible to network attacks and transmission errors during its operation, which will degrade the system performance. Typical attacks include data injection attack [12], denial-of-service (DoS) attack [13], and replay data attack [14]. Moreover, the wireless fading induced data package losses can also reduce the system efciency [15]. Considering the safety of CPS, researchers have paid much attention to the detection of various attacks and proposed many efective methods. To name a few, Lee et al. [16] devised an elastic all-distribution type of state assessment scheme to protect sensors from attacks for linear dynamic systems. For the cyber-physical system under actuator and sensor attacks, Lu and Yang [17] investigated the event-triggered secure observer-based control method. In order to detect virtual data injection attacks for information physics systems, Zhao et al. [18] proposed an attack detection scheme by a subspace identifcation technique and verifed its efectiveness based on a fight vehicle model. Hong et al. [19] proposed another attack detection method based on a residual system for industrial information physics systems. With a view to the detection of attacks from reference signals, Lucia et al. [20] took full advantage of command controller to propose a novel distributed control architecture. Te fruit and vegetable picking CPS features high nonlinearity, and its actuators and sensors are susceptible to network attack signals under the infuence of agricultural working environments [21][22][23]. Regarding CPS safety results, analytical model-based state estimation methods have constantly played a signifcant role, in which the observer and flter methods are the most typical, and some appealing results have been achieved [24][25][26][27][28][29][30]. Lu and Yang [31] Proposed a switched observer to detect attacks on sensors in information physics systems. Lv et al. [32] proposed a sliding mode observer to detect attacks on CPS. Ao et al. [33] designed an adaptive observer with online parameters to estimate attacks on states and sensors for the CPS. Palleti et al. [34] devised a fault detection method based on the Kalman flter for CPS to enhance their safety.
Te abovementioned studies mainly focused on the attack detection for industrial CPS, but few results were concerned with the attack reconstruction and state estimation for the agricultural CPS. In addition, most of the attack reconstruction methods proposed in these studies are mainly adaptive observer, disturbance observer, sliding mode observer, etc. In reference to system states and sensor attack detection for the CPS of fruit and vegetable picking robots, the crux consists in determining the state vector through the dynamic model of typical joints, as well as designing the observer for sensor attack reconstruction through the state-space equation.
Te main contributions of this paper are listed as follows. (1) For the frst time, the sensor attack is studied for the fruit and vegetable picking robot CPS. Te generalized system model is established by fully considering the nonlinear characteristics of the articulated fruit and vegetable picking robot system as well as the infuences of external disturbances. (2) Te unknown input observer is designed for the system state estimation and sensor attack reconstruction, and simulation verifcation is carried out. For the fruit and vegetable picking robot CPS, the designed observer with unknown inputs can be found to outperform those existing ones. For example, the adaptive observer proposed in [24] requires the bounded real lemma to be satisfed, while the sliding mode observer designed in [25] would give rise to discontinuous terms, hence yielding estimation results subject to vibrations. (3) A reconstruction method is proposed for system states and sensor attack of the picking robot CPS, reducing false positives and false negatives for the fault diagnosis system in agricultural harvesting equipment.

Dynamic Model
Modeling methods of the manipulator dynamic mainly include the Newton-Euler formula [35] and Lagrange equation [36]. For the fruit and vegetable picking manipulator, its input is the torque provided by the driving motor, and the output is the ofset angle of the rod relative to the base surface or to the previous rod. Using the Lagrange equation, the closed model of a system dynamic can be established, and the relationship can be clearly described between the generalized force, generalized velocity, and generalized acceleration.
Tis paper considers the three-dimensional structure of a picking manipulator, as shown in Figure 1. Te main components include the base, waist, big arm, forearm, and other parts, and the manipulator has six degrees of freedom. All joints in the manipulator are of rotational type, and each joint uses a servo motor as the input power source. Te sensors can monitor internal states of the manipulator as well as external picking environment information. Te base is fxed on a moving platform. Te connecting rod between waist joints, big arm, and forearm have lengths of 50 mm, 650 mm, and 420 mm, respectively. Te maximum steering angles of the waist joint, shoulder joint, and elbow joint can go up to 360 degrees, 90 degrees, and 90 degrees, respectively. Specialized picking tasks for diferent fruits and vegetables can be realized by reftting diferent types of end efectors [37].
Te structure of the picking manipulator is schematically shown in Figure 2. It is assumed that the connecting rod and joint are rigid elements. Te manipulator parameter is listed in Table 1.

Mathematical Problems in Engineering
End components of the waist, big arm, and forearm have total masses of m 1 , m 2 , and m 3 in kg, respectively. Centroids of the waist connecting rod, big arm, and forearm are d 1 , d 2 , and d 3 apart from the rotation center of the joint, measured in m. Te gravity acceleration is vertically downward.
In a picking manipulator system, joint variables include the angle q ∈ R n , the angular velocity _ q∈ R n , and angular acceleration € q∈ R n . Te motor torque is τ ∈ R n . Ten, we obtain Te kinetic energy of the lumbar joint can be obtained as (2) Te kinetic energy of the big arm can be obtained as In practical working processes, joint frictions and environment disturbances will always afect the mechanical picking arm. So, the practical dynamic model should be written as follows [35]: where M(q) ∈ R n×n is the symmetric and positive defnite inertia matrix and C(q, _ q) ∈ R n×n is the centrifugal and Coriolis term matrix.
being the viscous friction coefcient matrix and F d being the dynamic friction term. G(q) ∈ R n represents the gravity vector. J T (q) denotes the geometric Jacobian matrix, so J T (q)h results in the generalized interaction forces. τ d is the disturbance to the system. Te dynamics model of the picking system is written in the form of the state space, and an observer is designed to estimate its faults. Te state vector of the system is expressed Te system input is the motor torque u � τ ∈ R n , while its output is the angle of the manipulator y � q ∈ R n . According to equation (12) and the system state vector, we can obtain Ten, the analytical model of the system can be described as follows: where Mathematical Problems in Engineering 5

State Estimation and Attack Reconstruction
From equation (14), the state-space equation of the picking robot CPS can be listed as follows: where x(t) ∈ R n is the state vector; u(t) ∈ R m is the system control input vector; w(t) ∈ R w denotes the system unknown input; v s (t) ∈ R q denotes the sensor attacks; and y(t) ∈ R p represents the output. Initial states of the system x(0) � x 0 .
An errorless system should have v s (t) � 0. In the attack detection, if the residual signal exceeds the threshold, the system can be identifed with attacks. Coefcient matrices When the actuator failure is not considered, it can be assumed that C 0 is full rank in the row. F 0 , D 0 , and H 0 are matrices with full column rank, and their dimensions satisfy the following conditions: Assumption 1. Te nonlinear function satisfes the Lipschitz condition, and then we can have Remark 1. Te Lipschitz assumption given in this paper is reasonable, and similar assumptions are made as in [28,30]. Te system features a noteworthy nonlinearity. In the following proposed attack construction method, nonlinear parts are all treated under the Lipschitz condition. A more accurate system model needs to be established for considering the nonlinear part of the system that violates the Lipschitz condition.
When the actuator attacks are not considered, the system can be afected by unknown inputs and y(t) changes, which means the sensor attacks and noise exist simultaneously in the system [20]. Assuming d(t) is a noise signal, rank(G d ) � l, equation (14) can be transformed into Let Ten, we can obtain results as follows:

Augmented Transformation of System State.
In this section, we use the augmented transformation method to estimate states of the system without considering actuator attacks. Te augmented state vector of the system is shown as follows: x � Let Ten, equation (16) can be transformed into Terefore, the system state equation can be augmented to be Lemma 1. Tere are matrices T ∈ R (n+q)×(n+q) and H ∈ R (n+q)×p such that satisfying TE + HC � I n+q .
Proof of Lemma 1. Given C ∈ R p×(n+q) , E ∈ R (n+q)×(n+q) , and is a matrix with full column rank. From the equation T H Ω � I n+q , the following equation can be obtained: is an arbitrary matrix, so we can obtain the following results: □

H ∞ Unknown Input Observer Design.
Te unknown input observer is designed based on the system state shown by equation (25). Te observer is given as follows: In equation (29), ε(t) ∈ R n+q is the observer state, x(t) ∈ R n+q is the estimation of the augmented state vector, and y(t) is the estimation of y(t). Te coefcient matrices P, N, J, T, H, F, C have appropriate dimensions, and these matrices need to be known. In this way, system (29) serves as an observer of system (25) in a certain sense. We can defne the observer error as e(t) � x(t) − x(t). For the case of w(t) � 0, the error approaches zero, while for w(t) ≠ 0, we can solve Mathematical Problems in Engineering 7 From equations (27) and (29), We can have In equation (32), we assume that the coefcient matrices P ∈ R (n+q)×(n+q) and N ∈ R (n+q)×p satisfy the following conditions: Ten, equation (32) turns out to be Substituting (27) into (33), we can obtain When the arbitrary matrix K satisfes K � N− PH, we can determine and from equation (33): Lemma 2. For the case of w(t) � 0, there are two positive defnite matrices W and X 0 , equation (34) can be asymptotically stable if the following conditions are satisfed.

(40)
If the dynamic error system is stable, the following conditions must be satisfed: According to Δf � f(x(t), u(t)) − f(x(t), u(t)) and the Lipschitz condition, there are constants such that Terefore, Equation (41) is equivalent to the following form: Δf ,

Mathematical Problems in Engineering
Te asymptotically stable condition of the error system is that _ V(t) is a negative defnite function, so Q < 0, and it can be proved.
Te conditions can be determined from the error dynamics equation and under the satisfed assumptions to make the system stable. For the observer, we can determine □ Theorem 1. Assume the following LMI: For positive defnite matrices X ∈ R (n+q)×(n+q) and M ∈ R (n+q)×p , (49) has a solvable solution. Let K � X − 1 M. Ten, (29) is a meaningful observer.
Proof of Teorem 1. X is a positive defnite matrix. Consider the Lyapunov function as follows: From equation (34), it can be known that Terefore, and in which According to (36) and (37) and K � X − 1 M, a result can be obtained by the transformation: Considering equation (50), if Φ 1 < 0, then Terefore, Mathematical Problems in Engineering 9

t)e(t)dt. (54)
Equation (54) is equivalent to the following form: Under the prerequisite that the initial condition is zero, we can obtain (56) So, the theorem is proved.

Simulation Verification
In this section, numerical simulations are carried out to verify the efectiveness of the proposed method. Te base material is steel, and the waist, arm, and forearm material are all made of aluminum alloy 6061. Te model parameters of the manipulator are listed in Table 2. Coefcient matrices are calculated as follows: From equations (43) where w(t) is the unknown input, and the nonlinear term is set to be f 0 (x(t), u(t)) � 80 cos (5t) + 0.1.
Te feasible solution of LMI equation (49) can be obtained by simulation software, and λ � 3. Te Mincx function is used to fnd the minimum value of c. Terefore, Simulation results are shown in Figures 3-8, in which Figures 3-5 demonstrate some system state estimations exclusive of actuator attacks. In these fgures, solid lines represent actual system states, while dotted lines represent their estimated values. Figures 6-8 show distributions of the actual and estimated values of sensor attacks. It can be seen from Figures 3-5 that the estimations of system states gradually approximate their actual values, indicating good performances of the designed observer. In the simulation, the dimension of the system variable is six, and the dimension of the augmented system is seven. Te data of the seventh dimension refer to the attack signal of the sensor. Figure 3 shows the actual signal and estimation signal of the rotation angle variable of one joint, and Figures 4 and 5 show the actual signal and estimation signal of the angular velocity of two joints. Figures 6-8 show the reconstruction of three kinds of sensor attack signals. In Figure 6, the attack signal is an abrupt constant form, in Figure 7, the attack signal is a ramp function form, and in Figure 8, the attack signal is the form of trigonometric function. Tese three kinds of attack signals are used to better test the reconstruction performance of the system for sensor attack signals. Signifcantly, it can be seen from Figures 6-8 that the designed observer can efectively suppress the infuence of system nonlinearities and external disturbances over attack detection, indicative of a good performance in sensor attack detection.

Discussion
Fruit and vegetable picking robot CPS can alleviate the insufciency of agricultural labor and appreciably improve productivity. As a typical ACPS, it would be up against complicated and changeable agricultural production environments, whereupon how to efectively handle the attacks on sensors for the picking success has become a crux in developing agricultural picking robot cyber-physical system. In contrast to a less requirement for precision in practical applications of the picking robots, high reliability is however quite needed. Terefore, the development of novel picking robot CPS requires their attack reconstruction systems to have excellent robustness and real-time performance. It is exactly the above consideration that makes the present study have practical signifcance.
In the context of agricultural production, this paper involves the widely used picking robot CPS, for which the sensor attacks are considered on the basis of the dynamic Mass of big arm 7.9 kg m l3 Mass of forearm 9.8 kg m 1 Mass of waist joint end parts 5.57 kg m 2 Mass of shoulder joint end parts 6.38 kg m 3 Masses of elbow joint end parts 4.29 kg d 1 Distance from waist joint rotation center to the centroid of waist connecting rod 0.12 m d 2 Distance from shoulder joint rotation center to the centroid of big arm 0.25 m d 3 Distance from elbow joint rotation center to the centroid of forearm 0.  model. Such a model contributes to the formulation of statespace equations, which is a mature method at present. Besides, this paper directly embeds the CAD model data of the three-joint robot in simulative verifcation, which can thus provide a novel method on sensor attack detection for picking robot cyber-physical system, so as to facilitate the development of fault diagnosis systems for agricultural gathering equipment. Simulation results demonstrate that estimated values approach real states very well, suggesting the feasibility of the proposed method. In particular, the formulation of state equations defnes a 6-D state vector, representing rotation angles and angular velocities for the three joints.
Te displacement and velocity of joints can directly characterize the picking state of robots, so the proposed method conforms to realistic scenes and thus has practical applications. Nevertheless, the system features a noteworthy nonlinearity, which increases the difculty in modeling such a nonlinear system [38]. In the proposed attack construction method, nonlinear parts are all treated under the Lipschitz qualifcation. In the future work, the nonlinearity of the system will be considered in more depth, involving those violating the Lipschitz condition [39]. Further, the mechanical arm system will be fully considered in terms of other local nonlinearities, joint frictions, the coupling of rigidity and fexibility in connecting rods, etc., so as to establish a more practical attack model for the system and propose a more efective attack construction method.

Conclusions
In this paper, an unknown input observer-based method is proposed to address estimations of system states and sensor attack reconstruction for fruit and vegetable picking robot CPS. Based on the dynamic model of the system, the statespace model following the actual working condition is established, with the system nonlinearity and external disturbance taken into account. Using the generalized system theory, sensor attacks of the picking robot cyber-physical system are treated as parts of system state variables, thus in favour of sensor attack estimations. Simulation results have shown the efectiveness of the proposed method and demonstrated that the designed observer performs well in sensor attack reconstruction. Future works will be conducted to further test the practical performance of the proposed method using actual picking robot CPS. More to the point, the future work will focus on the operation state of the cyber-physical system as well as the mechanism of their attack occurrences, so as to underpin the design of complicated picking equipment. Tese contents need to be studied in the future.

Data Availability
Te data that support the fndings of the study are available from the corresponding author upon request.

Conflicts of Interest
Te authors declare that there are no conficts of interest regarding the publication of this paper.