Abstract

In the real-time control of networked inverted pendulum visual servo control system (NIPVSCS), how to achieve safe and efficient image transmission is an important and challenging problem. Generally, the inverted pendulum images are directly transmitted via the network, while these images are not secure because they may be attacked by the hacker. To solve the problem, a fast image encryption method by combining image scaling and improved self-diffusion image encryption (ISDIE) algorithm is firstly proposed, which is employed to encrypt the captured images after they are scaled. The security performance of the proposed algorithm, the characteristics of different delays, and the control performance of the NIPVSCS are then analyzed. Finally, simulation and real-time control experiments confirm the feasibility and effectiveness of the proposed method.

1. Introduction

Networked inverted pendulum system is a typical experimental platform to verify control theory and algorithms in the automatic control field [14]. In the recent years, with the rapid development of visual technique, visual sensors (e.g., the industrial camera) are gradually integrated into industrial control systems for detection and control [58]. To provide theoretical and technical support for visual servo real-time control, networked inverted pendulum visual servo control system (NIPVSCS) has been constructed and real-time H control method has also been proposed [9].

The network brings convenience to the transmission of visual images; however, these images also face various cyber attacks. In the NIPVSCSs, there exist not only the attacks on visual images but also the attacks on nonvision information. Here, this paper focuses on the security of the images because the attack on the image will reduce the image reliability (i.e., integrity and authenticity) and then cause the inaccurate and incomplete state and control information [9, 10], leading to system performance degradation or even instability.

To improve the security of the image, the image encryption provides a possible path. However, unlike the nonreal-time image encryption (e.g., the image encryption algorithms for health information exchange and enterprise remote audit), the image must be encrypted and decrypted quickly to guarantee the stable operation of the NIPVSCS. Therefore, the current image encryption algorithms cannot be employed directly, and the novel image encryption algorithms need to be developed in term of two requirements: (1) the processing speed of the image encryption and decryption algorithms must be very fast and (2) the image encryption and decryption algorithms must be robustness against the attacks.

To solve the abovementioned problems, this paper proposes a fast image encryption method of the NIPVSCS. The main contributions include(1)A fast encryption method by combining the image scaling and an ISDIE algorithm is proposed to achieve secure and efficient transmission of the images.(2)The security performance of the proposed algorithm, the characteristics of different delays, and the control performance of the NIPVSCS are analyzed. Simulation and real-time control experiments show that the proposed method has good encryption and decryption effects and good robustness against the image noise attacks and shear attacks, while meeting real-time requirements of the NIPVSCS.

The previous works on the NIPVSCS and the image encryption will be reviewed, and the unique features of this paper are discussed.

2.1. Real-Time Control of the NIPVSCS

The NIPVSCS is the system where the images of the inverted pendulum are captured by visual sensors and the images are then transmitted to the image processing unit via the network, followed by the state information extracted from these images. The obtained state information is then used to achieve real-time control, which is attached to delay constraints including network-induced delay and image processing computational delay. Furthermore, some methods are proposed to overcome these two delays. For example, the finite-time stability analysis of uncertain network-based control systems under varying network delay was studied [11]. The stability analysis of the NCSs with the fixed time delay was discussed [12], and a new approach to the suboptimal control of nonlinear time-delay systems was presented [13]. In [14, 15], the time-varying delay and image processing computational delay are considered, and a closed-loop control system model is established and control strategy is used to achieve the stable of the control system. However, the abovementioned studies did not consider the image security (e.g., the leakage or corruption of information). In the NIPVSCS, since the state information is included in the images, it is crucial to protect these images.

In this paper, an NIPVSCS equipped with an image encryption unit is proposed to address the problem of image security. The control performance of the NIPVSCS is also analyzed under cyber attacks.

2.2. Image Encryption Algorithm

The image encryption algorithms, a common technique for image security, are usually used to protect image information from illegal acquisition. Recently, some image encryption algorithms have been developed. For example, according to the DNA encryption algorithm and the double-chaotic system, an image encryption-then-transmission system was presented [16]. An encryption method based on interleaved computer-generated holograms displayed by a spatial light modulator was proposed [17]. A hybrid image encryption scheme based on block compressive sensing was developed [18]. The image was encrypted by adopting the image encryption algorithm based on logistic map [19, 20]. However, the above proposed approaches induce the long encryption calculation delay that cannot meet the real-time requirements of the NIPVSCS.

In this paper, a fast image encryption method is developed to improve the security of the image and achieve real-time control of the NIPVSCS. The process of the fast image encryption method by combining image scaling and the ISDIE algorithm is provided and its security is then analyzed by simulation and real-time experiments.

3. The Proposed Framework

An image scaling and encryption unit is added to the pre-established NIPVSCS [21]. Figure 1 outlines the system framework that contains two parts: Part 1 is the NIPVSCS; Part 2 is the proposed fast encryption method combining image scaling and the ISDIE algorithm.

3.1. Part 1: The NIPVSCS

As can be seen from the left part of Figure 1, the NIPVSCS consists of the inverted pendulum (containing a cart, a swing rod, and a slide), the visual sensing devices (containing Aca640-120 gm industrial camera and a light source), the image scaling and encryption unit, the controller (containing a motion control card), and the actuator (containing servo driver and servo motor).

The operation of the NIPVSCS starts from the move of the swing rod. The real-time moving image of the inverted pendulum captured by the industrial camera is sent to the image scaling and encryption unit. In this unit, as shown in the right part of Figure 1, the inverted pendulum image is firstly scaled to reduce the amount of the image data, and the scaled image is then encrypted with an ISDIE algorithm to ensure image transmission security. Moreover, it can be seen from the right part of Figure 1 that the pixel values of each row of the image are confused to obtain a row confusing image, and the pixel values of each column of the image are confused to obtain a column confusing image, by implementing image encryption. Returning to the left part of Figure 1, the encrypted image is sent to the remote image processing unit through a network. In the remote image processing unit, the encrypted image is decrypted, and the state information of the cart and the pendulum is then extracted by using a series of image processing methods [2225], which will be sent to the controller. Finally, the actuator processes the corresponding control signals to achieve real-time stable control of the NIPVSCS.

Remark 1. Different from most previous research studies only verified in simulations, the new NIPVSCS is based on a real experimental platform that can be used to validate the theoretical methods. Moreover, compared with the NIPVSCS in [21], two new units are added into the new NIPVSCS, i.e., the image scaling and encryption unit and the remote image processing unit.

3.2. Part 2: The Fast Image Encrytion Method
3.2.1. Image Scaling

Due to the large amount of inverted pendulum image data, long delays will be generated during network transmission and image encryption/decryption. To solve these problems, a method of interpolation scaling is used. Specifically, before the image is encrypted and transmitted, the inverted pendulum image is scaled down to reduce the amount of image data. This is shown in the right part of Figure 1. The image scaling can be expressed as the pixel position transformation followed by the calculation of pixel values, which will be given in the following.

(1) Pixel Position Transformation. Let and to be the pixel coordinates of the original inverted pendulum image and the scaled image, respectively. The formula of pixel position transformation iswhere and are the number of columns of the original image and the scaled image, respectively; srcrows and are the number of rows of the original image and the scaled image, respectively; and and are the image scaling ratio in the horizontal direction and the vertical direction, respectively. The principle of scaling is shown in Figure 2.

Remark 2. To conveniently calculate the state information of the inverted pendulum in the scaled image, the equal scaling method is adopted, i.e., the same scaling ratio is taken in the horizontal and vertical directions, respectively.

Remark 3. To meet the real-time requirements of the NIPVSCS, we need to scale the image to a certain ratio before processing the inverted pendulum image to reduce the data amount of the original image. However, if the image scaling ratio is very small, it will lose a lot of image information, resulting in system performance degradation or even instability. Therefore, it is a trade-off between the image scaling ratio and system performance.
(2) Calculation of Pixel Values. To explain clearly, the gray values as a special case of the pixel values are concentrated. In Figure 2, the gray value of the coordinate in the scaled image is that of the coordinate in the original image. However, since the coordinates of the pixel point are often integers and could be nonintegers, the gray value of may not be directly obtained. Therefore, the bilinear interpolation method [26, 27] is used to calculate the gray value when the image is scaled, as shown in Figure 3.
In Figure 3, represents the gray value of the coordinate . Two linear equations hold as follows:Therefore, the gray value of can be calculated by

3.2.2. ISDIE Algorithm

The ISDIE algorithm includes two parts: the row confusion and column confusion. Before illustrating the ISDIE algorithm, is the size of the inverted pendulum image, and is the pixel value at the ith row and jth column in the inverted pendulum image, where and . In addition, we give the number to the kth inverted pendulum image frame, where . The ISDIE algorithm starts from the calculation of a regulation parameter by using the number of the kth inverted pendulum image frame.Step 1: record the number of the each inverted pendulum image frame to obtain the regulation parameter T, and it is calculated bywhere the divisor is set as 1000.The following are the procedures of row confusion and column confusion.(1)Row confusion:Step 2: to generate a pseudorandom state value as an encryption key, the logistic map [20, 21] is used as follows:where and . In this paper, and are set to guarantee the randomness of the state value.Step 3: then, is used to generate other two different row numbers bywhere is the ceil function and is the floor function and mod is a MOD function. To ensure that both and are different from , the operations need to be further done as follows. (i) If , will be done. (ii) If , will be done.Step 4: furthermore, are used to confuse the current ith row bywhere and is the boolean operator of xor.Step 5: to achieve the “one time and one secret” of the encryption algorithm, the chaotic map value needs to be updated bywhere donates the decimal part of .Step 6: from the 1st row to the Nth row, the loop through Steps 2–6 to encrypt the inverted pendulum image in the row direction.(2)Column confusion:After the row confusion is completed, two changes on the procedure of row confusion can lead to that of column confusion: (i) change as in (6)–(8) and (10); (ii) then, change (9) aswhere . Finally, the whole inverted pendulum image is encrypted in the row and column directions.

Remark 4. The traditional image encryption algorithms often take too long time to encrypt/decrypt the image so that the real-time requirement of the NIPVSCS could not be satisfied. In the context of the problem, by modifying the model of the image encryption algorithm in [21], the ISDIE algorithm is developed in this paper. To validate the efficiency of the ISDIE algorithm, the real-time experiments of the NIPVSCS running the above two algorithms are separately performed, whose results are shown in Table 1. From Table 1, it can be seen that the encryption time of the ISDIE algorithm is less than that of the algorithm in [21]. In this sense, the ISDIE algorithm is more suitable for the NIPVSCS. The experimental environment is Visual Studio 2010 and OpenCV2.4.11 with Intel Core i3-2120 CPU @ 3.30 GHz and 8.00 G RAM on Window XP.

Remark 5. Considering the insecurity issues of the network (e.g., information loss and information disclosure), the serial number of the inverted pendulum images, which are unrelated to the contents of the image, are adopted to update the encryption key. Using this technology with different keys, the ISDIE algorithm can resist the plaintext-choosing attack and recover the core information when the encrypted images are corrupted by image noise attacks or shear attacks.
Furthermore, the ISDIE Algorithm 1 can be summarized as follows.
For the received encrypted image, decryption and encryption are inverse processes, and the decryption process is as follows.(1)Column decryption:Step 1: to generate a pseudorandom state value as an encryption key, the logistic maps are used as (6). To accurately decrypt the image, and are set to guarantee the randomness of the state value.Step 2: create two auxiliary sequences and initialize them to 0, and the sequence is represented as follows:Step 3: fill the auxiliary sequence withif , then and if , then . Furthermore, and .Step 4: to achieve the “one time and one secret” of the encryption algorithm, the chaotic map value needs to be updated bywhere denotes the decimal part of and the value of T is the same as the value of T in Step 1.Step 5: from column 1 to column N, the loop steps 1–4 to fill the auxiliary sequence.Step 6: set and decrypted image bywhere .Step 7: from the Nth column to the 1st column, the loop through Step 6 decrypts the inverted pendulum image in the column direction.(2)Row decryptionAfter the column decryption is completed, two changes on the procedure of columns decryption can lead to that of rows decryption: (i) change as in (12)–(16); (ii) then, change (17) aswhere . Finally, the whole inverted pendulum image is decrypted in the row and column directions.

Input: The original inverted pendulum image
Output: The encrypted image
(1) to with the stepsize of 1 do
(2) For to with the stepsize of 1 do
(3)  , ,
(4)  If , end if
(6)  If , end if
(7)  For to with the stepsize of 1 do end for
(8)  
(9) End for
(10) For to with the stepsize of 1 do
(11)  , ,
(12)  If , end if
(13)  If , end if
(14)  For to with the stepsize of 1 do end for
(15)  
(16) End for

4. Experiments Analysis

4.1. Security Analysis of the ISDIE Algorithm

The security of the ISDIE algorithm mainly involves two aspects, i.e., key confidentiality and image robustness. The former strives for the attackers unavailable to the original key. The latter focuses on the decryption robustness against the attacks. The detailed analysis is discussed as below.

4.1.1. Analysis of Key Confidentiality

In the context of key confidentiality, three types of common attacks are considered. The first is the brute-force attacks, which attempts to traverse all possible keys for the intercepted ciphertext. The second, which can be viewed as an improvement of the first, adopts the statistical methods to obtain the distribution characteristics of the ciphertext so that the amount of searching messages or keys is reduced. Going further than both the above attacks, the plaintext is used for the comparison with the ciphertext in the third type of the attack.

(1) Brute-Force Attacks. To cope with brute-force attacks, the key used to encrypt the inverted pendulum image requires a sufficiently large key space and high sensitivity to key changes. In this paper, a test is carried out to prove that the ISDIE algorithm can meet the above two requirements. In our test, three decrypted images using different keys infinitely close to the initial one are obtained in Figure 4. As can be seen in Figure 4, the key is hypersensitive in the decryption process and the key space of the encryption algorithm is more than . Therefore, the space is large enough to resist brute-force attacks.

(2) Statistical Attacks. To quantify the ability of coping with statistical attacks, the histogram of the images, the correlation of the pixels, and information entropy are adopted from different perspectives.

The histogram of the images is to describe the quality distribution characteristics [28]. The histograms of the original and encrypted images are shown in Figure 5. As can see from Figure 5(a), the gray-scale distribution of the original image is nonuniform and the characteristics peaks are clear. Conversely, the histogram of the encrypted image is uniform enough, as shown in Figure 5(b). This confirms the excellent property of resisting the statistical attack of the ISDIE algorithm.

The correlation of the pixels represents the randomness of the gray level. The correlation coefficients of each pair can be calculated bywhere and denote the values of two adjacent pixels in the image:where denotes the number of pairs of adjacent pixels.

The correlation of the encrypted and original image is shown in Figure 6 and Table 2. The correlation of the original is high and close to 1. In contrast, the correlation of the encrypted image is low and close to 0, which indicates that encrypted pixels are distributed randomly.

Information entropy is used to reflect the randomness and unpredictability of the image gray value. The inverted pendulum image is 256 gray level and the ideally result should be 8. If the information entropy is closer to 8, the randomness is better. Table 2 shows the information entropy at different image scaling ratios. From Table 2, it is known that entropies are close to 8, so the proposed algorithm has a good property of information entropy.

(3) Differential Attacks. Two indicators, the Number of Pixels Change Rate (NPCR) and the Unified Average Changing Intensity (UACI), are used to measure the ability of resisting differential attack. The ideal values of NPCR and UACI are 99.61% and 33.46%, respectively [16, 29], and the real result values of the ideal image encryption algorithm should be close to the ideal values. They can be calculated bywhere and denote the gray value of two images, is a matrix, and when , then or , and and are the width and height of the inverted pendulum image, respectively.

To compare the performance, we randomly change the gray value of one pixel of the inverted plaintext image and repeat it 500 times. The NPCR and UACI are obtained, as shown in Figure 7, by the proposed algorithm, where it can be found that the proposed scheme can resist differential attack effectively.

4.1.2. Analysis of Image Robustness

The above confirms the key confidentiality of ICDIE algorithm. Next, we will take into account the security issues about the disrupted image. Specifically, in the NIPVSCS, the images are vulnerable to the common image noise and shear attacks. Therefore, the image encryption algorithms for the NIPVSCS must be able to withstand common image attacks. To measure the robustness of the encryption algorithm against image attacks, some attack experiments on the ICDIE algorithm are conducted, and the corresponding decryption effect are analyzed. The results are shown in Figure 8.

4.2. Delay Analysis of the Proposed Fast Encryption Method Used in the NIPVSCS

In the NIPVSCS, the delay is a key factor affecting system stability [11]. In this paper, the NIPVSCS delays are mainly composed of network transmission delay, image encryption and decryption delay, and image processing computational delay. To analyze the delays of the NIPVSCS, real-time statistics on network transmission delay and image encryption and decryption computational delay under different image scaling ratios are firstly obtained, and then the total system delay in the NIPVSCS under different image scaling ratios is calculated.

4.2.1. Network Transmission Delay under Different Image Scaling Ratios

To obtain the network transmission delay, 2000 image frames are transmitted under different image scaling ratios in the NIPVSCS. The delay of each image frame is recorded and finally taken as an average. The results are shown in Table 3.

From Table 3, it can be seen that network transmission delay gradually decreases as the image scaling ratio decreases. This shows that scaling the inverted pendulum image can effectively reduce network transmission delay in the NIPVSCS.

4.2.2. Image Encryption and Decryption Delay under Different Image Scaling Ratios

The time of the inverted pendulum image encryption and decryption under different image scaling ratios is recorded in Figure 9. It can be seen that the encryption and decryption delay decreases as the image scaling ratio decreases.

4.2.3. Total System Delay under Different Image Scaling Ratios

We denote by the total delay from the visual sensor to the controller, where are, respectively, the lower and upper bounds of . We record under different image scaling ratios in Figure 10 and and in Table 4.

From Figure 10 and Table 4, it can be seen that the lower and upper bounds of the total delay decreases as the image scaling ratio decreases, respectively. In Table 4, is lower than the real-time requirement of the NIPVSCS when the image scaling ratio is 30%, 40%, 50%, and 70%.

4.3. Secure Control Analysis of the Proposed Fast Encryption Method Used in the NIPVSCS

From [11, 14], it is known that the NIPVSCS will be unstable when the upper bound of the total delay is greater than or equal to 38 ms in real-time control environment. To analyze the feasibility of the proposed fast encryption method in the NIPVSCS, the real-time control experiment is firstly carried out under no attack. The result is shown in Figure 11.

Figure 11 shows that the cart position and the pendulum angle fluctuate in a very small range when the image scaling ratio is 70%, 50%, and 40%, while the NIPVSCS is stable. However, the system control curve is diverging (i.e., the NIPVSCS is unstable) when the image scaling ratio is 30%. The distinction between the theoretical and real-time results may be caused by three aspects: (i) the difference of the linear model and nonlinear model of the plant; (ii) as the image scaling decreases, the image processing errors gradually increase; (iii) the unknown noise being overlooked. In the practical applications, a larger image scaling ratio should be selected to achieve real-time control when the delay requirements of system stability control are met.

Next, to verify the robustness of the ISDIE algorithm against image noise and shear attack, some real-time control experiments under the noise attack and shear attack are carried out, respectively. In this experiment, the image is scaled to 50%. The results are shown in Figure 12. As can be seen from Figure 12, the NIPVSCS can still remain stable even if the image is disrupted by image noise attacks. This shows the good robustness of the ISDIE algorithm against image noise attack NIPVSCS.

5. Conclusions

This paper addresses the problem of safe and efficient transmission of image in the NIPVSCS. Specifically, we have developed a fast encryption method combining image scaling and ISDIE algorithm, where the captured images are encrypted after they are scaled. We have evaluated our method by using the simulation and real-time experiments. The proposed method can guarantee the key confidentiality and image robustness and meet the real-time control requirements of the NIPVSCS with some certain image scaling ratio. However, the scaled inverted pendulum image will reduce image quality to some extent and cause image processing errors. Therefore, considering the effect of image processing error caused by image scaling on the stability of the NIPVSCS is a very valuable future work. Moreover, the fast encryption method can be successfully used for a fast motion control system, i.e., NIPVSCS security and stability control, which can further provide technical support for remote vision robot control, aircraft control, and other applications.

Data Availability

The experimental data used to support the findings of this study have not been made available since these data are related to the personal privacy of each volunteer involved in the experiment.

Conflicts of Interest

The authors declare that there are no conflicts of interest.

Acknowledgments

This work was supported in part by the National Science Foundation of China (Grant nos. 61773253 and 61833011) and Key Project of Science and Technology Commission of Shanghai Municipality (Grant no. 16010500300).