Journal of Computational Information Systems 9: 18 (2013) 7517 7523 Available at http://www.jofcis.com The Research of Delay Characteristics in CAN Bus Networked Control System Yi WANG 1, Liren HE 2, Ming SU 3, 1 College of Physics and Electronics Science, Guizhou Normal University, Guiyang 550001, China 2 College of Science, Guizhou University, Guiyang 550025, China 3 College of Mechanical and Electrical Engineering, Guizhou Normal University, Guiyang 550001, China Abstract The network induced delay seriously effect the real-time and stability of CAN bus networked control systems. In this article, the structure of CAN bus NCS was analyzed, meanwhile studied the cause and integral part of delay. Then adopted TrueTime to build simulation model of CAN bus NCS. Discussed the effects of CAN bus network delay on performance of control system in three cases. Then drew a conclusion that reduce the proportion of forward delay of CAN bus network can effectively improved the performance of CAN bus NCS. Keywords: CAN Bus; Network Delay; Control Performance; Real-time; Stability 1 Introduction CAN bus is a serial communication network which could effectively support a distributed implementation control. It has form an international standard (ISO 11898), then become a standardized protocol. It has been widely used in industrial control, engineering vehicles, marine equipment, small aircraft and other fields. Meanwhile it has achieve the share of information and resources, simplify wiring, coordination and control, improve the overall performance of system in vehicle. However, introduction of CAN bus network also brings some uncertainty, the biggest problem is system performance degradation and even instability that bring out by network delay. Therefore, in order to ensure the real-time and stability of CAN bus control system, it is necessary to do a depth theoretical study on delay problem of CAN bus control system. In paper [1], the stability of the delay networked control system(ncs) was studied. In case of no more than one sample delay effects, a discrete model of the NCS was built, and analysis stability of the model. Project supported by the National Nature Science Foundation of China (No. 61262007), Guizhou Science and Technology Department School Cooperation Project (No. [2013]7001), Guiyang Science and Technology Department Platform for innovation plan (No. 2012303). Corresponding author. Email address: summing629@163. com (Ming SU). 1553 9105 / Copyright 2013 Binary Information Press DOI: 10.12733/jcisP5802 September 15, 2013
7518 Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 And in paper [2], in order to solve the delay issues in NCS, adopt the random delay modeling method to expressed delay that under different load conditions as interval variables. And verified the effectiveness of the algorithm by means of numerical simulation. While in article [3], the network delay issues in the NCS was analyzed. And it has proposed a delay compensation strategy of segmentation dynamic matric to compensate delay in network transmission. Paper [4] considered the network induced delay as fundamental factors of decrease or even instability in system performance. So, it put forward an adaptive PID control method based on BP neural network compensation, which could achieve the online adaptive compensation network delay without changing the control parameter of existing PID controller. Based on the analysis of the delay issue in the NCS, paper [5] pointed out that network induced delay is the main factors of performance degradation or even instability in NCS. Then discussed and summarized the findings of delay problem. At last, this paper mainly studies the effects of forward and feedback delay in the CAN bus NCS to the performance of control system. Then draw a conclusion that there are some reference value of the design of vehicle CAN bus NCS. 2 The Relationship Between Delay of CAN Bus Control System and Sampling Period CAN bus control system is a real-time closed-loop feedback control system that transport data through CAN bus network. The typical structure of control system is shown in Fig. 1. Fig. 1: CAN Bus NCS Structure Due to the intervention of CAN bus network, the delay of data transmission is inevitable [6]. From control perspective, the network delay will lagged the phase of system, deteriorated the system performance, narrowed the range of stability of system, or even caused system instability. And from the scheduling perspective, the information will not arrive on time or even discard. CAN bus network delay could do an important impact on the performance of control system, so it is the factors that can not be ignored during the analysis and design of vehicle CAN bus NCS. As the presence of network delay also increases the complexity of NCS research, the analysis and model of existing control theory can not be applied directly to the vehicle CAN bus NCS [7, 8]. Base on size, the CAN bus network delay can be divided into long delay and short delay. If the delay τ [0, τ max ], and τ max is less than the sampling period T, that is τ max < T, then claimed the delay of the network as the short delay. If the delay τ [0, τ max ], and τ max is greater than T, that is τ max > T, then claimed the delay of the network as the long delay. For the long delay, it can convert into a short delay by selecting the sampling period and use an appropriate scheduling algorithm. Therefore, this article only study the short delay that less than one sampling period.
Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 7519 In the CAN bus network control system, as the delay τ is less than one sampling period, the relationship between the control object and the controller is expressed as the state equation: { ẋ(t) = Ax(t) + Bu(t) (1) y(t) = Cx(t) u(t) = Kx(t τ) (2) In the equation, x R n, u R m, y R l, represent the state, input and output variables of the system. And A R n n, B R n m, C R l n, K R m n, represent the state matrix of the system. The discrete-time state equation of the upper equation is: { x((k + 1)T ) = Φx(t) + Γ0 (τ) u(kt ) + Γ 1 (τ) u((k 1)T ) y(t) = Cx(kT ) (3) Meanwhile: Φ = e AT, Γ 0 (τ) = T τ e As Bds, Γ 0 1 (τ) = T T τ eas Bds. Define the augmented state vector: [ ] x(kt ) Z(kT ) = u((k 1)T ) (4) Then, the closed-loop system can be expressed as: Z((k + 1)T ) = Φ Z(kT ) (5) And Φ = [ Φ Γ0 (τ)k Γ 1 (τ) k 0 ] (6) When the formula (6) in the spectral radius is less than 1 [9], the formula (5) is stable, which can draw the following relationship: max{ 1 2 1 kt, 0} < τ T < min{ 1, 1} (7) kt The formula (7) is the constraint relationship between delay and sampling period. From the formula, the smaller the sampling period, the larger the allowable stability range of delay. It also shows that, in the case of a stable system, the sampling period is small means that the large amount of data transmitted over the network will increase the network transmission delay. 3 Delay Model of CAN Bus Control System In the CAN bus NCS, the transmit sequence of information is transmitted sequentially in accordance with the SensorController Actuator Controlled object. As shown in Fig. 2.
7520 Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 Fig. 2: Delay Model of CAN Bus Control System The whole process, that from sensor sample to actuator act in the plant, constitute the signal flow of control system. In the ideal sampling control system, it is often assumed that the signal stream transfer process is instantaneous [10]. But due to the introduce of CAN bus network in forward and feedback channels, delay in the control loop is inevitable. So the transmission of signal stream is delayed. That is: sensor act the sample to the output need a processing time; based on the sensors signal, the controller need a calculate time to the control amount signal; and actuator led the control amount applied to controlled object has a drive time; then during the information transmit in the CAN bus network, there is a transmission time. Therefore, the delay of the CAN bus NCS can be divided into implementation process delay and network transmission delay. The implementation process delay produced in the running process of sensors, controllers and actuators. Include the delay τ s of sensors sampled data and complete the initialization of CAN controller; after receive the packet, the time τ c that controller calculate the amount of control signal and converts it into a CAN message that identifies required; and the computation time τ a that actuators receives CAN messages and translate them into the plant signals. Network transmission delay consist by the feedback delay τ sc that from sensor to controller and the forward delay τ ca that from controller to actuator. Thus, the total delay of CAN bus control system can be expressed as: τ = τ sc + τ ca + τ s + τ c + τ a (8) The delay of execution process vary depends on the overall performance of each node, and select a high speed processor and optimization algorithm could reduce the execution impact of delay to a minimal extent. Therefore, during the analysis and design of CAN bus NCS, the delay of execution process is consist by τ sc and τ ca. The total delay of the CAN bus NCS can be expressed as the sum of forward delay τ ca and feedback delay τ sc. τ = τ sc + τ ca (9) 4 The Impact of Delay on CAN Bus NCS In order to analysis impact of forward delay τ ca and feedback delay τ sc on control performance of CAN Bus NCS, adopt sensors, controllers, actuators, interference, DC motor and CAN bus to build a closed-loop control system, as shown in Fig. 3. Use the sensor to sample the speed of
Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 7521 DC motor and process, then sent information to the controller via CAN bus network, and the controller calculates the control amount, at last sent the message to actuator. Interference node is used to produce periodic and non-periodic signal, and regulate traffic load on the network. Fig. 3: CAN Bus Network Close-loop Control System TrueTime, which was developed by LUND University, has a strong simulation capabilities. It often used to study effect of time uncertainty such as network transmission delay on the control performance, and can also be used on the simulation of multi-scheduling algorithm in the NCS. The TrueTime mainly includes four functional modules: real-time kernel module (TrueTime Kernel), network communication module (TrueTime Network), wireless network module (TrueTime Wireless Network), and battery module (TrueTime Battery). The TrueTime Kernel is used for analog the sensors, controllers and actuators and other control elements, include A/D and D/A conversion, outer channel and the network interface. The TrueTime Kernel execute operations in accordance with the user-defined tasks, often use MATLAB or C++ to write the execute code. TrueTime Network is used to simulate a variety of networks, the optional parameters includes the number of nodes, network number, network type (optional media access control protocol includes: CSMA/CD, CSMA/CA, TDMA, FDMA, ROUND ROBIN), the pretreatment and subsequent processing delay, packet loss rate. TrueTime Network is driven by a event mode, while the news come in/out from the network, then execute. The main steps of established real-time NCS by the TrueTime is: (1). Established real-time CAN bus network structure diagram of the control system through the Simulink module; (2). Initialized the kernel module, set the number of input and output, real-time scheduling algorithm, etc. (3). Set other parameters, and create individual tasks, then execute simulation. Fig. 4 is CAN bus NCS simulation model build by using the the TrueTime Kernel. Select stepper motor as control plant, mathematical model is shown as follow: G(s) = 1000 s(s + 3) Select four Kernel modules respectively as the sensor, controller, actuator and interfering node. The network module adopt CAN protocol (CSMA/AMP) to achieve communication. Select unit step signal as a system input, then simulate network delay effect performance of control system in three case: τ = 0, τ ca >> τ sc, and τ ca << τ sc. As shown in Fig. 5. Through the simulation results: (1). When the delay of CAN bus NCS is 0, that is: τ = 0. The rise time of system step response and overshoot are relatively small, which is consistent with the results of theoretical analysis. (10)
7522 Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 Fig. 4: The Simulation Model of CAN Bus NCS Fig. 5: Simulation Result of Delay in Vehicle CAN Bus NCS (2). When the vehicle CAN bus NCS forward delay τ ca is less than feedback delay τ sc, performance of the system is better than the situation that forward delay is greater than feedback delay, and the greater the forward delay, the greater system overshoot. 5 Conclusion While the network was shared by sensor, controller, actuator, and controlled object, based on the characteristics of CAN bus NCS, analysis effect of network delay on performance of control system. And established discrete mathematical model of the CAN bus NCS, given the relationship of CAN bus control system delay and sampling period under a stable conditions. Simulation results shown that forward delay τ ca has a greater effect than feedback delay τ sc in the CAN bus NCS. With the increase of τ ca, the overshoot of system increases and the rise time becomes longer. So during the design of CAN bus NCS, minimize the forward delay could improve the performance of CAN bus NCS. The conclusion has some reference value to design of CAN bus NCS. Acknowledgement This work was financially supported by the National Natural Science Foundation of China (Grant No. 61262007), Guizhou Science and Technology Department School Cooperation Project (Qian
Y. Wang et al. /Journal of Computational Information Systems 9: 18 (2013) 7517 7523 7523 Bureau No. [2013] 7001) and Guiyang Science and Technology Department Platform for innovation plan (2012303). References [1] ZHAO Hua-zheng, Stability Analysis of Networked Control Systems with Time Delay, Science Technology and Engineering 12(2) (2012) 342-344. [2] Chen Meng-wei, Jing Chao-yong, Zhu Jing-li, etc, Design of Stochastic Interval Delay Controllers of Networked Control Systems, Journal of Guangdong University of Technology 29(1) (2012) 59-63. [3] ZHU Kong Yang, Compensating strategy based on dynamic matrix control for networked control system, Microcomputer & Its Applications 12 (2010) 75-77. [4] Huang Jinhua, Liu Jiqing, Self-adapting compensation study to the network-induced delay of networked control system, xjournal of Jiangsu University of Science and Technology (Natural Science Edition) 23(4) 2009 335-337. [5] GUO Ge, JIA Er-na, Delays in networked control systems:analysis and preview, Control and Decision 24(1) (2009) 1-6. [6] Xiaoqian Guo, Bin Wu, The Impact of Time-delay on Networked Control System and Stability Region Analysis of PID Controllers, 2010 International Conference on Computer, Mechatronics, Control and Electronic Engineering (CMCE), Changchun, 2010, pp. 163-166. [7] Zhou Hai, Heng Qing-hai, Liu Yin, Analysis and Simulation of Network Control System Delay Based on Truetime, Industrial Control Computer 25(2) 2012 29-35. [8] XU Lin, LEI Hong, RU Jingyu, Research on Predictive Control of Stochastic Network-induced Delay for Network Control Systems, 2011 Chinese Control and Decision Conference (CCDC), Tianyuan, 2011, pp. 929-932. [9] JING Nan, WANG Lin, AN Bai-yue, Analysis and policy of network latency in CAN control system, Computer Engineering and Design 30(20) 2009 4599-4602. [10] Deng Rui, Tang Xian-ming, Yu Jin-shou, Analysis of Delay Compensation in NCS based on TrueTime Tool Box, Industrial Control Computer 23(2) 2010 24-26.