#### Abstract

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 influences 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. Then, the original system is converted into a generalized system through state augmentations based on the generalized system theory. Furthermore, an unknown input observer is designed to estimate the system state and reconstruct sensor attacks, accommodating nonlinear characteristics and external disturbance effects of the system. The 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 effectively.

#### 1. 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. Specifically, CPS technologies applied in the industrial field 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 cyber-physical system (ACPS) [6], which is typified 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].

The robot plays an important role in robot CPS, serving as a medium between information and physical world [9, 10]. The agricultural CPS robots realize the interconnection, in addition to completing the high-efficiency 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 fingers 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]. Therefore, 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 suffers from network attacks, multiple robots may be unable to transmit accurate data information, which would directly affect the progress of agricultural production. Under the circumstances, it has great significance to figure out efficient 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 efficiency 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 efficiency [15]. Considering the safety of CPS, researchers have paid much attention to the detection of various attacks and proposed many effective 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 identification technique and verified its effectiveness based on a flight 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. The fruit and vegetable picking CPS features high nonlinearity, and its actuators and sensors are susceptible to network attack signals under the influence of agricultural working environments [21–23]. Regarding CPS safety results, analytical model-based state estimation methods have constantly played a significant role, in which the observer and filter methods are the most typical, and some appealing results have been achieved [24–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 filter for CPS to enhance their safety.

The 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.

The main contributions of this paper are listed as follows. (1) For the first time, the sensor attack is studied for the fruit and vegetable picking robot CPS. The generalized system model is established by fully considering the nonlinear characteristics of the articulated fruit and vegetable picking robot system as well as the influences of external disturbances. (2) The unknown input observer is designed for the system state estimation and sensor attack reconstruction, and simulation verification 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 satisfied, 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.

#### 2. 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 offset 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.

This paper considers the three-dimensional structure of a picking manipulator, as shown in Figure 1. The 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. The sensors can monitor internal states of the manipulator as well as external picking environment information. The base is fixed on a moving platform. The connecting rod between waist joints, big arm, and forearm have lengths of 50 mm, 650 mm, and 420 mm, respectively. The 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 different fruits and vegetables can be realized by refitting different types of end effectors [37].

The structure of the picking manipulator is schematically shown in Figure 2. It is assumed that the connecting rod and joint are rigid elements. The manipulator parameter is listed in Table 1.

End components of the waist, big arm, and forearm have total masses of , , and in kg, respectively. Centroids of the waist connecting rod, big arm, and forearm are , , and apart from the rotation center of the joint, measured in *m*. The gravity acceleration is vertically downward.

In a picking manipulator system, joint variables include the angle , the angular velocity , and angular acceleration . The motor torque is . Then, we obtain

The kinetic energy of the lumbar joint can be obtained as

The kinetic energy of the big arm can be obtained as

The total kinetic energy of the end element of the big arm can be obtained as

The kinetic energy of the forearm can be obtained as

The kinetic energy of the end element of the forearm can be obtained as

The potential energy of a picking manipulator can be obtained as

The Lagrange equation is derived from the above equations.

Given the standard form of the Lagrange equation:

Based on equation (9), the dynamic equation of picking manipulators can be written in the following form:where , , and are matrices of corresponding dimensions, respectively. In more detail,

In practical working processes, joint frictions and environment disturbances will always affect the mechanical picking arm. So, the practical dynamic model should be written as follows [35]:where is the symmetric and positive definite inertia matrix and is the centrifugal and Coriolis term matrix. includes and , with being the viscous friction coefficient matrix and being the dynamic friction term. represents the gravity vector. denotes the geometric Jacobian matrix, so results in the generalized interaction forces. is the disturbance to the system.

The dynamics model of the picking system is written in the form of the state space, and an observer is designed to estimate its faults. The state vector of the system is expressed as . The system input is the motor torque , while its output is the angle of the manipulator .

According to equation (12) and the system state vector, we can obtain

Then, the analytical model of the system can be described as follows:where

#### 3. State Estimation and Attack Reconstruction

From equation (14), the state-space equation of the picking robot CPS can be listed as follows:where is the state vector; is the system control input vector; denotes the system unknown input; denotes the sensor attacks; and represents the output. Initial states of the system . An errorless system should have . In the attack detection, if the residual signal exceeds the threshold, the system can be identified with attacks. Coefficient matrices , , , , , in the state equation have appropriate dimensions, and , , , , , are given conditions, while is a vector function. When the actuator failure is not considered, it can be assumed that is full rank in the row. , , and are matrices with full column rank, and their dimensions satisfy the following conditions:

*Assumption 1. *The nonlinear function satisfies the Lipschitz condition, and then we can have

*Remark 1. *The Lipschitz assumption given in this paper is reasonable, and similar assumptions are made as in [28, 30]. The 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 affected by unknown inputs and changes, which means the sensor attacks and noise exist simultaneously in the system [20]. Assuming is a noise signal, , equation (14) can be transformed intoLetThen, we can obtain results as follows:

##### 3.1. Augmented Transformation of System State

In this section, we use the augmented transformation method to estimate states of the system without considering actuator attacks. The augmented state vector of the system is shown as follows:

Let

Then, equation (16) can be transformed into

Therefore, the system state equation can be augmented to be

Lemma 1. *There are matrices and such thatsatisfying*

*Proof of Lemma 1. *Given , , and is a full column rank matrix, is a matrix with full column rank. From the equation , the following equation can be obtained: , where is an arbitrary matrix, so we can obtain the following results:

##### 3.2. Unknown Input Observer Design

The unknown input observer is designed based on the system state shown by equation (25). The observer is given as follows:

In equation (29), is the observer state, is the estimation of the augmented state vector, and is the estimation of . The coefficient matrices , , , , , , 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 define the observer error as . For the case of , the error approaches zero, while for , we can solve

We can have

In equation (32), we assume that the coefficient matrices and satisfy the following conditions:

Then, equation (32) turns out to be

Substituting (27) into (33), we can obtain

When the arbitrary matrix *K* satisfies *K* = *N*−*PH*, we can determine and from equation (33):

Lemma 2. *For the case of , there are two positive definite matrices and , equation (34) can be asymptotically stable if the following conditions are satisfied.*

*Proof of Lemma 2. *Consider the Lyapunov function:where *X*_{0} is a positive definite and real symmetric matrix. Then, we can haveIf the dynamic error system is stable, the following conditions must be satisfied:According to and the Lipschitz condition, there are constants such thatTherefore,Equation (41) is equivalent to the following form:The asymptotically stable condition of the error system is that is a negative definite function, so , and it can be proved.

The conditions can be determined from the error dynamics equation and under the satisfied assumptions to make the system stable. For the observer, we can determine performance indicator , constant . Let

Theorem 1. *Assume the following LMI:**For positive definite matrices and , (49) has a solvable solution. Let . Then, (29) is a meaningful observer.*

*Proof of Theorem 1. * is a positive definite matrix. Consider the Lyapunov function as follows:From equation (34), it can be known thatTherefore,andin whichAccording to (36) and (37) and , a result can be obtained by the transformation:Considering equation (50), if , thenTherefore,Equation (54) is equivalent to the following form:Under the prerequisite that the initial condition is zero, we can obtainSo, the theorem is proved.

#### 4. Simulation Verification

In this section, numerical simulations are carried out to verify the effectiveness of the proposed method. The base material is steel, and the waist, arm, and forearm material are all made of aluminum alloy 6061. The model parameters of the manipulator are listed in Table 2.

Coefficient matrices are calculated as follows:

From equations (43) and (44), we can obtain results as follows:where is the unknown input, and the nonlinear term is set to be

The first sensor attack takes the following abrupt constant form:

The second sensor attack takes the following ramp function form:

The third sensor attack takes the following trigonometric function form:

The feasible solution of LMI equation (49) can be obtained by simulation software, and . The Mincx function is used to find the minimum value of . Therefore, according to , coefficient matrices can be obtained as follows:

Simulation results are shown in Figures 3–8, in which Figures 3–5 demonstrate some system state estimations exclusive of actuator attacks. In these figures, 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. The 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. These three kinds of attack signals are used to better test the reconstruction performance of the system for sensor attack signals. Significantly, it can be seen from Figures 6–8 that the designed observer can effectively suppress the influence of system nonlinearities and external disturbances over attack detection, indicative of a good performance in sensor attack detection.

#### 5. Discussion

Fruit and vegetable picking robot CPS can alleviate the insufficiency 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 effectively 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. Therefore, 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 significance.

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 model. Such a model contributes to the formulation of state-space equations, which is a mature method at present. Besides, this paper directly embeds the CAD model data of the three-joint robot in simulative verification, 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 defines a 6-D state vector, representing rotation angles and angular velocities for the three joints. The 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 difficulty in modeling such a nonlinear system [38]. In the proposed attack construction method, nonlinear parts are all treated under the Lipschitz qualification. 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 flexibility in connecting rods, etc., so as to establish a more practical attack model for the system and propose a more effective attack construction method.

#### 6. 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 state-space 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 effectiveness 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. These contents need to be studied in the future.

#### Data Availability

The data that support the findings of the study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

This research was funded by the National Natural Science Foundation of China (61703296), the Special Project for Tackling Key Common Technologies of Agricultural High-Quality Development in Hebei Province (21327214D), and the Food Processing Discipline Group of Hebei Agricultural University.