You are on page 1of 9

Journal of Computational Information Systems 11: 15 (2015) 53635371

Available at http://www.Jofcis.com

Improvement of CAN-bus Transmission Reliability in


Automatic Knitting Machine
Wuyi MING 1 , Dili SHEN 2 , Dongmin LIU 2 , Zhi CHEN 3 , Min LIU 3 ,
Hao HUANG 3,
1 Department

of Electromechanical Science and Engineering, Zhengzhou University of Light Industry,


Zhengzhou 450002, China
2 College

3 DG-HUST

of Engineering, Zhongzhou University, Zhengzhou 450015, China

Manufacturing Engineering Institute, Guangdong Province Key Lab of Digital


Manufacturing Equipment, Dongguan 523808, China

Abstract
The CAN bus has been extended from the initial eld of automobile electronic application to industrial
automation, machine tool, measurement and control systems, building automation and other elds. To
improve the CAN-bus transmission reliability in automatic knitting machine, two methods are introduced
in this paper. On the one hand, one of the scheduling algorithm is improved. On the other hand, the
application layer protocol with response of the CAN bus is adopted. By experiments, the worse of residual
error rate (RER) of improvement is 7.9 109 , which is better than that (2.5 104 ) of original.
Keywords: CAN-bus; Reliability; Transmission Failure; Automatic Knitting Machine

Introduction

The Controller Area Network (CAN) bus was rst put forward by the German BOSCH company,
aiming at a kind of eld bus in automotive applications. CAN bus is one kind of eld bus which
is mainly used in research and development to solve the rapid growth of communication in vehicle
electronic system [1-4]. The CAN bus is mainly the implementation of car sharing in each part of
the micro controller and all kinds of sensor data communication and information. Because of its
good performance in the car, the CAN bus has been favor by many car manufacturers, to achieve
a wide range of applications in modern automobiles.
Distributed system based on the CAN bus has been extended from the initial eld of automobile
electronic application to industrial automation, machine tool, measurement and control systems,

This research is supported by the Science and Technology Planning Project of Zhengzhou in China under
Grant No. 141PPTGG354. In addition, Science and Technology Planning Project of Guangdong Province No.
2012B011300015 aid this study.

Corresponding author.
Email address: huanghaonhust1990@gmail.com (Hao HUANG).

15539105 / Copyright 2015 Binary Information Press


DOI: 10.12733/jcis14167
August 1, 2015

5364

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

building automation and other elds. In the application of the CAN bus in the engineering
case, there is no lack of use the CAN bus to construct a high reliable distributed real-time
system example [1, 5-7]. In this kind of engineering application, the CAN bus not only to meet
the response time of message under deadline requirements, but also to meet the transmission
reliability in the disturbance from the outside electromagnetic interference. However, because
of the widespread existence of noise in such application, errors must be reliably detected on
the network to prevent the transmission of data. Then, carrying the CAN bus products and
its quantity is very large, error may also occur frequently under low probability. There is an
interaction between bit stung and cyclic redundancy code of the CAN bus. However, in the
actual environment, some multi bit errors can not to be detected in this interaction. The CAN
bus protocol simulation shows that the residual error rate (RER) is 1.3107 . This rate, although
very small, is also unable to accept in the long running application, because the CAN bus is used
in the production of consumer goods, industrial automation or control system.
Literature [8] proposed one analysis method for the CAN bus schedulability, which can be used
to determine whether the message of the worst-case response time is less than the deadline. Literature [9] gives the system schedulable judging theorem and its design method. Literatures [10, 11]
point out that Electro-Magnetic Interference (EMI) is one of the most important factors of many
external interference factors causing error in the transmission of the CAN bus, and the probability of calculation of the worst response time is put forward. Literature [12] presents one new
scheduling algorithm for CAN bus, which is based on the original algorithm by introducing time
trigger mechanism. The above algorithms are improved only based on the scheduling algorithm
of CAN bus. However, the residual error rate of the CAN bus can decrease to a certain extent,
but there are still big risks out there in the application of control system based on it. Then, to
improve the CAN-bus transmission reliability in automatic knitting machine, two methods are
introduced in this paper. On the one hand, one of the scheduling algorithm is improved. On the
other hand, the application layer protocol with response of the CAN bus is adopted.

The Calculation Method of Residual Error Rate

The worst-case response time [13] of CAN bus message is dened as


Rm = Jm + m + Cm ,

(1)

where Jm is the queuing jitter time, m is the queuing delay time, and Cm is the transmission
time. Jm is equal to the long time from the message generated to entered into the queue. m is
equal to the long time from message entered the queue to started transmission. Cm is equal to
the long time transmitted on the CAN bus of one message. In addition, Cm can be dened as
Cm = (52 + 10Sm ) bit ,

(2)

where Sm is the data bytes of the message S. bit is the time of transmitted one bit information. According to the protocol, when the CAN bus occurs the transmission error caused by
the interference of external factors, the message will be automatically retransmits. Although the
mechanism can ensure the reliable transmission of the message, automatic retransmission means
that the worst response time may be extended. In order to describe the interference factors on
the worst-case response time eects, the Eq. (1) is modied by adding the retransmission time
of message (Em ).

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

(
Em = Am (t)

5365

)
max Cm + E

(3)

jhep(m)

In above equation, Am (t) is a stochastic process, expressed the occurrence times of message
retransmission in the time interval t under interference of external factors. Then, the Eq. (1) is
modied as below.
R m = Jm + m + C m + E m

(4)

In all kind of external interference, EMI is the most important one that cannot be ignored
[10]. There are various reasons for this, such as discharge, lightning, radar, mobile phone etc.
Therefore, it is very dicult for accurate measurement and prediction eect of EMI. Then, Broster
et al proposed Poisson stochastic arrival process, which is used to model CAN bus transmission
error [10, 11]. In the time interval t, the K error probability is:
et (t)K
p (K, t) =
K!

(5)

The worst-case response time (Rm|K ) of the message (m), appearing K times wrong, is dened
as follows:
(

P Rm|K = P K, Rm|K

K1

(
) (
)
p Rm|l p K l, Rm|K Rm|l

(6)

l=0

The residual error rate of message (m) is dened as follows:


m

(
)
P (f ail) = 1
p Rm|K

(7)

K=0

Improvement Measures

3.1

Time triggered scheduling strategy

Time that all nodes transmit at least one message in transmission system is dened for the system
cycle time. A system cycle time contains m basic cycle time contained by n time slices. And the
CAN information frame is send in a given time slices. The length of one slice can be variable.
It can be designed to transmit a message frames, which send a message frames with necessary
protection time. And it can also be designed to transmit multiple messages frames.
In this paper, we choose the rst way. Time slices, basic cycle time and system cycle time
correspond to dierent length of time. The system cycle time is the longest in here. Firstly, the
continuous time axis is divided into periodic system cycle time by end-to-end. Secondly, as the
system cycle time is called for a big time unit, it can be divided into more continuous basic cycle
time. At last, continuous n time slice (the minimum time unit) form a basic cycle time, which
make up the time structure for CAN bus in automatic knitting machine. The time structure can
be drawn as Fig. 1.

5366

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

Fig. 1: The time structure of CAN bus in automatic knitting machine


The basic cycle time can be used to transmit periodic information. In a shared time slice, it can
be used to transfer non periodic burst information. The all CAN frame information transmitted
to other nodes can adopt the standard or extended frame structure. If the system design by
this way, there will be no conict and be reliable in this communication mode. The scheduler
can be design by o-line for CAN bus transmitting system, which one information frame of one
node transmits in a xed time slice, and there is correspondence by one frame to one slice. Each
transmitted information frame must be sent in its assigned time slice, and it does not interfere
with the transmission of next new frame. Then, CAN automatic repeat frame is not allowed here
in this mode.
The key technology of time division multiplexing is to ensure that all of the nodes in the system
clock is synchronous, because there will inevitably be some drift in each local nodes clock. Then,
it must use the time drift control strategy in a basic cycle time period. In order to solve this
problem, the concept of the basic cycle time is introduced in the system. The basic cycle time
includes the synchronization message, which checks each nodes local timer and also contains the
necessary control information. This ensures that all nodes in the system are in control, then the
periodic messages are send within the stipulated time slice.
In this control system, there is at least a scheduler to schedule the sending time of all nodes.
This paper uses static scheduling method, in which the order of all the nodes is arrangement by
o-line design. In this way, the entire system conguration is designed by o-line in initialization.
When the system runs, information is sent according to the schedule table which is prescribed by
arrange order. The advantage of this method is relatively simple, easy to implement, because it
is oine design and occupy less system resources.

3.2

Application layer protocol with response

In order to improve the reliability of CAN bus transmission, the formulation of the communication
protocol must guarantee that the information on the CAN bus as little as possible. It means that
the message length is short as far as possible, and the number of packets of nodes should be
minimize to reduce the node load. Then this can avoid bus contention to ensure that there is no
loss of information in CAN bus.

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

5367

To make the message length as short as possible, the formulation of the communication protocol,
except the necessary reservation, must ensure that each bit of message transferred to other nodes
is the demand for the automatic knitting machine. In this machine, there are there are three
nodes, which are main control node (MCN), machine body node (MBN) and machine head node
(MHN). The mode of communication is point-to-point, and main control node is the master node;
other nodes are the slave nodes.
There are three types of message frame. The message frame are command frame (CF), data
frame (DF) and response frame (RF), respectively, which are shown as Table 1.
Table 1: Three types of message frame in automatic knitting machine
No.

Type

Direction

Length (Byte)

CF

MCN to MHN

Head motor, running direction, speed, and needle position

CF

MCN to MHN

Degree motor, The amount of rotation angle

CF

MCN to MHN

Head electromagnet

CF

MCN to MBN

Shaker motor, running direction, and needle position

CF

MCN to MBN

Roller motor, running speed

CF

MCN to MBN

Positioning motor of grasping device, needle position

CF

MCN to MBN

Moving motor of grasping device, run and position

CF

MCN to MBN

Body electromagnet

DF

MCN to MHN

Machining settings of knitting

10

DF

MCN to MBN

Machining settings of knitting

11

RF

MHN to MCN

Acknowledgment message, include check sum


and action execution results of MHN

12

RF

MHN to MCN

Acknowledgment message, include check sum


and action execution results of MBN

Content of frame

Command frame is sent from the MCN (master node) to MHN or MBN (slave nodes). Response
frame is sent from the MHN or MBN to MCN, when they receive the command information from
MHN. If the MCN does not receive the command frame within the prescribed time, it will resend
the command frame again. If the command frame is the third failing, the application layer will
notify the application. When date frame is sent, the response frame is not necessary. After
the end of data transmission, the validity of the data is done by the application verifying the
checksum.

Experimental Setup

To validate the proposed improvement measures, a few experiments of CAN bus communication
were conducted under the same conditions at which original results were obtained. The CAN

5368

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

bus communication experiments of automatic knitting machine were carried out by K-018 that
is made in China by Dongguan HPM Co., Ltd. Fig. 2 shows the photograph of the machine and
its three parts (MCN, MBN and MHN). The test methods include CAN bus testing instrument
and test software modal in the machine.

Fig. 2: a) Photograph of experiment of automatic knitting machine in process, b) MCN, c) MBN, d)


MHN

The experimental conditions of automatic knitting machine are presented in Table 2. The
number of CAN bus message is greater than 1.0 106 , in which this can test the bus transmission
reliability. There are two test cases. One is that all parts in machine run under the CAN bus
message (Case 1), another is that the parts are not run under the message (Case 2). In the case
2, the number of CAN bus message sent to another nodes can be reached maximum in limited
time. Then, the test results are more validation in this case.
Table 2: Three types of message frame in automatic knitting machine

No.

Test case

Message direction

Message type

Numbers

MCN to MHN

CF, DF

1.2 106

MCN to MBN

CF, DF

1.3 106

MHN to MCN

RF

2.4 106

MBN to MCN

RF

2.6 106

MCN to MHN

CF, DF

2.3 108

MCN to MBN

CF, DF

4.1 108

MHN to MCN

RF

4.6 108

MBN to MCN

RF

8.2 108

Results and Discussion

In this paper, the basic cycle time is 3,000s, and the system cycle time is 180,000s. Then there
are 60 basic cycles in one system cycle. In a system cycle time, one or more of three types of
message frame (CF, DF, and RF) are sent to other nodes in the automatic knitting machine.

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

5369

Message frames of CAN bus are arranged by a xed schedule table, which is listed in Table 3 for
the top 10 basic cycles in one system cycle time.
Table 3: Three types of message frame in automatic knitting machine
No.

Message schedule

No.

Message schedule

[m1, m4, m5]

[m3, m8, m12]

[m2, m6, m7]

[m1, m2, m3, m9, m10]

[m3, m8, m11]

[m4, m5, m6, m9, m10]

[m1, m4, m5]

[m7, m8, m9, m10]

[m2, m6, m7]

10

[m9, m10]

Note: The message No. (m1 m12) is named by the No. of Table 1.

In automatic knitting machine, the message RER in theory by Eq. (7) is shown in the second
column of Table 4. By experiment, the message RER of original and improvement are shown
in the third and fourth column of Table 4, respectively. The experimental data are the average
values of two experiments of test case 1 and test case 2, in which each of the test case is run three
times. Fig. 3 shows the comparison of the RER of theory, original and improvement.
Table 4: The residual error rate (RER) of theory, original and improvement
No.

Message No.

RER of theory
105

RER of original
4.1

RER of improvement

105

2.4 109

m1

1.5

m2

8.3 106

4.6 105

7.1 1010

m3

3.5 105

8.1 105

3.1 1010

m4

2.7 105

1.5 104

3.3 1011

m5

3.8 105

2.5 104

6.1 1011

m6

9.1 106

4.3 105

4.6 1011

m7

8.4 106

3.1 105

7.9 1011

m8

6.2 106

1.6 105

2.1 1010

m9

6.3 107

1.8 106

7.9 109

10

m10

4.7 107

1.6 106

5.1 109

11

m11

6.3 106

3.8 105

4.3 109

12

m12

4.4 106

1.2 105

2.1 109

Note: The message No. (m1 m12) is named by the No. of Table 1.

It can be drawn from the Table 4 and Fig. 3 that the RER of original is worse than that of
theory. This is may be that there are many external interference factors in the CAN bus of the
automatic knitting machine, especially EMI. In the machine, there are more than ten motors and
twenty electromagnets. Therefore, when the machine is running, EMI is produced from these
motors and electromagnets. If we do not take measures to shield EMI, the RER will be worse
than that of theory. For hardware, the photoelectric coupler, shielding line and other measures
are taken. However, there are still some defects in the design of hardware. Then, improvement
of CAN bus should be taken to resolve it.

5370

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

Fig. 3: Comparison of the residual error rate (RER) of theory, original and improvement (the horizontal
axis is the logarithm with base 10 of RER)

It also can be seen from the Table 4 and Fig. 3 that the RER of improvement is better than
that of original. By taken the two improvement measures in this paper, the RER has certain
change. On the one hand, by taken scheduling algorithm, the conict probability of CAN bus
message goes down. On the other hand, by taken the application layer protocol with response,
the resubmitted CAN bus message will be sent in the next cycle time by many times. However,
the RER of improvement in m9 and m10 is worse than that in m1 to m8. This is may be that
the schedule table is designed mainly focusing the CF, not the DF. The priority of CF is better
than that of DF. Then, we have taken measures to resubmit the DF in software application to
resolve it, because the DF is only use in opening machine.

Conclusions

The following conclusions can be drawn from the present study.


(1) To improve the CAN-bus transmission reliability in automatic knitting machine, two methods
are introduced in this paper. One is the scheduling algorithm by taken time schedule table,
another is the application layer protocol with response of the CAN bus.
(2) By experiments, the RER of improvement of all messages is better than that of original. The
worse of RER of improvement is 7.9 109 , which is better than that (2.5 104 ) of original.

W. Ming et al. /Journal of Computational Information Systems 11: 15 (2015) 53635371

5371

References
[1]

Su Yongfeng, Wang Jie. The applications of the CAN Bus on power systems integrated automation
[J]. Electrical Engineering, 2006, 9(1): 17-20.

[2]

Duan Xiaohong, Song Shouxin, Zhao Jiandong, Li Changcheng. Emergency vehicle dispatching
based on Shued Frog Leaping Algorithm [J]. Journal of Computational Information Systems,
2013, 24(9): 9875-9884.

[3]

Zhao Jiandong, Chen Xuzh, Duan Xiaohong, Shen Tong. Study on demand forecasting and allocation of expressway emergency vehicle resource. Journal of Computational Information Systems,
2014, 10(10): 4205-4215.

[4]

Li Penghua, Li Yinguo, Luo Dechao, Qiu Baomei. Assessment of vehicle emissions using quantum
SOM neural network [J]. Journal of Computational Information Systems, 2014, 4(10): 1429-1437.

[5]

Wang Yi, He Liren, Su Ming. The research of delay characteristics in CAN bus networked control
system [J]. Journal of Computational Information Systems, 2013, 18(9): 7517-7523.

[6]

Ma Liping, Zhang Weiguo. Design and realization of USB-CAN communication system based on
AT89C52 [J]. Journal of Computational Information Systems, 2012, 10(8): 4151-4158.

[7]

Yuan Gannan, Wang Fuyou, Wang JiajiaResearch on key technology in design of Can Bus network
in war ship navigation system [J]. Computer Measurement and Control, 2007, 15(6): 750-573.

[8]

Tindell K, Burns A, Wellings AJ. Calculating controller area network (CAN) message response
times [J]. Control Engineering Practice, 1995, 3(8): 1163-1169.

[9]

Liu luyuan, Wang Xiaoxin, Lv Weijie. A schedulable analysis and design and design method for
xed priority based on CAN and application in electric vehicle [J]. Manufacturing Automation,
2005, 27(4): 56-59.

[10] Broster I, Burms A, Rodriguez-Navas G. Probabilistic analysis of CAN with faults [C]. Austin,
Texas: The 23rd Real-time Systems Symposium, 2003.
[11] Broster I, Burms A, Rodriguez-Navas G. Timing analysis of real-time communication under electromagnetic interference [J]. Real-Time Systems, 2005, 30(1-2): 55-81.
[12] Lv Weijie, Liu Luyuan, Wang YiStudy and performance analysis of TT-FPS based on CAN Bus
[J]. Engineering science, 2006, 8(5): 45-48.
[13] K. W. Tindell, H. Hansson, A. J. Wellings. Analyzing real-time communications: Controller Area
Network (CAN) [A]. Proceedings of 15th IEEE Real-time systems symposium [C], San Juan,
Puerto Rico: IEEE Computer society 1994, 1994.

You might also like