# Modeling and Analysis of Online Delay of Nonperiodic CAN Message

Authors: Dafang Wang; Bowen Yang; Yi Jin; Ji Qi; Nannan Li
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

In order to analyze the online communication delay of nonperiodic CAN message, the mathematical model of average on-line delay is established based on M/G/1 queuing theory and an experimental platform is designed to analyze the delay of CAN communication, with which the on-line delays of messages with a different ID are tested at different load ratios. The results show that the model is very close to the actual situation indicating the high accuracy of the model. In the results, for the same message, the average and maximum online delays both increase with the raise of load ratio. At the same load ratio, the maximum on-line delay increases with the decrease of the message priority, and the average on-line delay remains almost unchanged.


---

## Body

## 1. Introduction

The vehicle distributed real-time control system is a specific application of distributed real-time control system, which is a closed-loop feedback control system consisting of a sensor, a controller, and an actuator on a real-time network. Its network medium is generally shared by several control loops which is obviously different from the traditional mode. This type of networked control mode is superior to the traditional point-to-point centralized control mode, because of its sharing of information resources, much decrease of connecting wiring harness, digitization and modularization of control assembly and components, and being easier to expand and maintain as well as high efficiency, reliability, and flexibility, and so forth [1–9]. On the other hand, the use of networked control impacts on system performance. References [10–14] analyze the relationship between network-induced delays and system performance, introducing network-induced delay in the system modeling, considering the network-induced delays and random data missing occurrence, analyzing the problem of stability control under a different network-induced latency, pointing out that it is necessary to consider network-induced delays in the choice of control algorithms.In the network control system, apart from the transmission of the time-triggered periodic message, the event-triggered nonperiodic message is suggested to be taken into account. The generation of nonperiodic message is not related to time and as a result its transmission delay cannot be analyzed according to the transmission mode of periodic message. Nonperiodic message generally is not the regular input and output information in the network control system. Its generating frequency is much lower than the periodic one. If this type of message is sent as periodic message, the load of the network will get greatly increased. However, this type of message is usually some detection data of the system, like the warning message. Therefore, the request for the reliability and real-time performance is much higher than the periodic one. For example, considering the warning signal of the battery in the monitoring system of an electric vehicle, the sensor sends a binary warning signal when the battery breaks down. If this message could not be sent to the monitoring center in time, the consequence caused is more serious than the transmission problems caused by regular controlling information (like rotate speed, electricity, etc.). Therefore, there is a high necessity to analyze the transmission delay of nonperiodic message.Nowadays, the mainstream bus of the vehicle distributed real-time control system is Controller Area Network (CAN) bus. The delay of CAN communication can be divided into four parts: generating delay, queue delay, transmission delay, and receiving delay [15]. Considering that the queue delay and transmission delay are related to the process of message transferring on the bus, these two parts should be defined as on-line delays. In order to obtain the communication delay of nonperiodic CAN message, two problems need to be figured out. First of all, what kinds of laws are the generating process of nonperiodic message consistent with? Secondly, what characteristics dose the queue process possess when the nonperiodic message with specific generating laws transmits on the CAN network? Scholars around the world have already done some research work on the communication delay of nonperiodic CAN message [15–32].References [15–19] take the nonperiodic message as periodic one and consider the minimum value of interval time between two transmissions of the message frame as its period. References [20–23] utilize a dynamic priority strategy to enhance the real-time performance of nonperiodic message. Reference [24] adopts the time-triggered mode and analyzes the scheduling and real-time problems of CAN. Reference [25] builds an experimental platform for analyzing the real-time performance of CAN. Reference [26] assumes that the occurrence of error frame accords with Poisson process and analyzes the influence on network-induced delays caused by error frames; nevertheless, there is only theoretical analysis but no experimental data. Reference [27] analyzes the waiting time and the length of the queue of messages applying the M/M/1 queuing process but does not provide corresponding experimental data. References [28, 29] do not differentiate between periodic and nonperiodic messages and uniformly adopt an M/G/1 queuing process to establish the mathematical model of average delay. Reference [30] puts forward a buffered estimation method aimed at the System on Chip (SoC) based on a priority-ranked queuing model and builds a buffered queuing model. The queue is an M/G/1 queue with several different client levels and non-preemptive arbitration. A mathematical model of average waiting time is deduced, which can provide some reference value for us to build the average waiting time model of the nonperiodic message on CAN bus.In this paper, a mathematical model of average on-line delay of nonperiodic message is built using the queuing theory. Moreover, on-line delays of messages with different priorities at different load ratios are tested separately. After analyzing and contrasting the measured and theoretical values, basic characteristics and laws of the on-line delay of nonperiodic CAN message are acquired.


## 2. Basic Introductions about Online Delay of Nonperiodic CAN Message Modeling

### 2.1. Markov Process and Poisson Process

In classical mechanics, the track at a given momentt can be solved using the state at some moment t0<t without knowing the state before moment t0. Such principle can be adopted in systems following probability rules but not decisive rules, which means when the state of the process at moment t=t0 is known, the state at moment t(t>t0) dose not correlate with the state before moment t=t0. Such feature that there is no relationship between “future” and “past” with the knowledge of “present” is called Markov property or nonaftereffect property. A process possessing this property is usually called a Markov process.A Markov process is an important type of random process in both theory and in practical applications. It is widely applied in network simulation [31].As for a Markov process, the following definitions should be given.A random process{X(t),t∈T} is present; if considering any n moments ti of the parameters, i=1,2,…,n,t1<t2<⋯<tn,
(1)P{X(tn)<xn∣X(t1)=x1,X(t2)=x2,…,X(tn-1)=xn-1}=P{X(tn)<xn∣X(tn-1)=xn-1}
then this random process {X(t),t∈T} can be called a Markov process. The property shown by expression (1) is named Markov property or nonaftereffect property.The value ofX(t) in the Markov process {X(t),t∈T} is called state. X(t)=x means that the process is in a state x at a moment t, and the whole value set in the process
(2)E={x:X(t)=x,t∈T}
is called state space. If both the parameter set T and the state space E are discrete Markov processes, it can be called a Markov chain.A Poisson process is defined as follows.If the counting process{N(t),t≥0} that takes nonnegative integer value meets the following conditions:(1)
N(0)=0;(2)
having independent increment;(3)
for any0≤s<t, N(t)-N(s) is accorded with the Poisson distribution whose parameter is λ(t-s),
(3)P{N(t)-N(s)=k}=[λ(t-s)]kk!e-λ(t-s),k=0,1,2,…,Then the random process{N(t),t≥0} is called a (homogeneous) Poisson process whose parameter (or average ratio, intensity) is λ.The following processes are typical cases of Poisson process. During the time interval[0,t).(1)
The number of customers arriving at a supermarketN(t).(2)
The number of machines breaking down in a workshopN(t).(3)
The number of error codes in a communication systemN(t).SupposeN(t) to be the number of times of event happening during the interval [0,t), {N(t),t≥0} to be a Poisson process with a parameter λ and τ1,τ2,…,τn to be the moment of the event happening the 1st, 2nd, …, n time. tk represents the waiting time until the event happens the k time, and Tk(k≥1) represents the separation distance between the k-1 and the k appearance,
(4)Tk=τk-τk-1,k=1,2,…,n,τ0=0.As can be proved, the variables in the interval sequence{Tn,n=1,2,…,n} are all independent and identically distributed random variables, which are changed by exponential distribution with a parameter λ,
(5)pt=P{Tn=t}={λe-λtt≥00t<0λ>0.


### 2.2. Queuing and Serving Process

Queuing is a common phenomenon in our daily life. For example, people queue up to wait for buses when on and off duty and customers line up to shop in the stores. Obviously, the queue consists of two parties. One party asks for getting service and the other party tries to provide service. The people or things (like equipments) that require service are generally called customers and the service staff or service agency that provide service is called service staff or service counter. Then the customers and the service counter form a queuing and serving system, which can also be called a stochastic service system.A queuing system is determined by many conditions. While for the sake of simplicity, 3~5 English letters with diagonal lines between them are usually used to indicate a queuing system. The first letter represents the distribution pattern of input variables, the second one represents the distribution pattern of the service time, the third one represents the number of service counter, and the forth one represents the capacity of service system. Sometimes a fifth letter may be used to represent the customer number in the customer source. M/M/1 means that the input process is a Poisson current, the service time follows a negative exponential distribution, and the system has only one service counter. The M/M/1 queuing and serving system has a quite good Markov property at any moment. M/G/1 means that the input process is a Poisson current, the service time is independent and follows a probability distribution, and the system has only one service counter, whereas M/G/1 queuing and serving system has the Markov property only at some special random moments but not any moment. These random moments are called regeneration points which means that the system restarts since the moment. Utilizing regeneration points, a common queuing and serving system can be turned into a Markov chain and get solved with relevant methods. This kind of method is called imbedding Markov chain approach [32].In an M/G/1 queuing and serving process, the customers arrive in Poisson current whose parameter isλ(λ>0), which means the sequence {Ti,i≥1} showing interval time of adjacent arrival is independent and is accorded with negative exponential distribution.The sequence{χi,i≥1} of the service time that customers need is independent and follows a general distribution G(t),t≥0, and 0<1/μ=∫0∞tdG(t) is taken as the average service time. There is only one service counter in the system. When a customer arrives, he can accept service at once if the counter is free. Otherwise, he should wait in line and accept service according to the arrival order. He leaves the new system as soon as the service ends. In addition, the arrival process and the service process are still independent of each other.SetN(t) to be the number of customers in the system (the queue length) at the moment t. In an M/G/1 queuing system, considering that the service time follows a general distribution, the service for a customer who is accepting his service at an optional moment t could be unfinished. Because the remaining service time distribution does not have the no-memory property any more since the moment t, the queue length {N(t),t≥0} does not have Markov property consequently. However, if Nn+ is set to be the number of the customers left in the system when the customer n finishes his service and leaves, which means the rest queue length, n≥1, it can be proved that the sequence {Nn+,n≥1} is a Markov chain and should be called an imbedding Markov chain of the queue length process {N(t),t≥0}. It can also be proved that the necessary and sufficient condition of the chain {Nn+,n≥1} being positive recurrence is ρ=λ/μ<1. When the chain {Nn+,n≥1} is positive recurrence, it is acknowledged that the sequence {Nn+,n≥1} owns the only stationary distribution,
(6)pj+=limn→∞P(Nn+=j)>0,j=0,1,2,….As can be proved, whenρ<1, the limit of the n-step transition probability of the imbedding Markov chain always exists and is a positive value which does not depend on the initial state. That is to say, it is a stationary distribution. When ρ≥1, no matter how large the positive integer m is, the probability of the number of customers left in the system ≤m as the customer n finishes his service and leaves is always tending to 0 (n→∞). This indicates that the queue will get longer and longer and the system cannot reach a statistical balance. In an M/G/1 queuing system, if ρ=λ/μ<1, then the generating function of the stationary distribution pj+, j≥0 is
(7)P+(z)=(1-ρ)(1-z)g(λ(1-z))g(λ(1-z))-z,|z|<1.Thereinto,g(λ(1-z))=∫0∞e-λ(1-z)tdG(t).Assume that customers get served according to the first-come-first-serve (FCFS) rule and setWq(t) and W(t) to represent the waiting and stay time distribution under the statistical balance; the inverse Laplace transforms of them are
(8)wq(s)=∫0∞e-stdWq(t),w(s)=∫0∞e-stdW(t).Then the specific expressions ofwq(s) and w(s) in an M/G/1 queuing system are deduced under the condition ρ<1.Apparently, under a statistical balance, the number of customers left in the system as a customer finishes his service and leaves equals the number of customers reaching the system during his stay, which means(9)pj+=P(jcustomersarriveduringhisstay)=∫0∞(λt)jj!e-λtdW(t),j=0,1,2,….Therefore,(10)P+(z)=∑j=0∞zjpj+=∫0∞e-λt∑j=0∞(λtz)jj!dW(t)=∫0∞e-λ(1-z)tdW(t)=w(λ(1-z)).According to the formula (7) and (10), it can be deduced that
(11)(1-ρ)(1-z)g(λ(1-z))g(λ(1-z))-z=w(λ(1-z)).Sets=λ(1-z) and the following expression can be obtained:
(12)w(s)=s(1-ρ)g(s)s-λ[1-g(s)].The stay timeW equals waiting time Wq plus service time χ, which means W=Wq+χ. Moreover, Wq and χ are independent of each other. Therefore,
(13)w(s)=wq(s)·g(s).According to the formula (12) and (13), the following expression can be obtained:
(14)wq(s)=s(1-ρ)s-λ[1-g(s)].Based on the formula (14), utilize the inverse Laplace transform,
(15)Wq(t)=∑n=0∞(1-ρ)ρnG^(n)(t),t≥0.Thereinto,G^(t)=μ∫0t[1-G(x)]dx represents the equilibrium distribution of service time G(t), and G^(n)(t) is the n-fold convolution of G^(t), n≥1.According to the formula (15), under the condition ρ<1, the average waiting time of the M/G/1 system is supposed to be
(16)W-q=λE[χ2]2(1-ρ).Thereinto,χ represents the random variable of service time.Formula (16) expresses the average waiting time deduced under the FCFS rules which can be divided into two parts,
(17)W-q=ρW-q+λE[χ2]2.Apparently, the first part on the right side of the equal sign in the formula (17) means the waiting time of customers existing in the queue when a new customer arrives, and the second part represents the current customer’s average rest service time when a new customer arrives. Under the FCFS rules, it can be deduced that when a new customer arrives, the current customer’s rest service time is supposed to be
(18)W-e=λE[χ2]2.Because the average stay time equals average waiting time plus average service time, the average stay time is(19)W-=1μ+λE[χ2]2(1-ρ).


## 2.1. Markov Process and Poisson Process

In classical mechanics, the track at a given momentt can be solved using the state at some moment t0<t without knowing the state before moment t0. Such principle can be adopted in systems following probability rules but not decisive rules, which means when the state of the process at moment t=t0 is known, the state at moment t(t>t0) dose not correlate with the state before moment t=t0. Such feature that there is no relationship between “future” and “past” with the knowledge of “present” is called Markov property or nonaftereffect property. A process possessing this property is usually called a Markov process.A Markov process is an important type of random process in both theory and in practical applications. It is widely applied in network simulation [31].As for a Markov process, the following definitions should be given.A random process{X(t),t∈T} is present; if considering any n moments ti of the parameters, i=1,2,…,n,t1<t2<⋯<tn,
(1)P{X(tn)<xn∣X(t1)=x1,X(t2)=x2,…,X(tn-1)=xn-1}=P{X(tn)<xn∣X(tn-1)=xn-1}
then this random process {X(t),t∈T} can be called a Markov process. The property shown by expression (1) is named Markov property or nonaftereffect property.The value ofX(t) in the Markov process {X(t),t∈T} is called state. X(t)=x means that the process is in a state x at a moment t, and the whole value set in the process
(2)E={x:X(t)=x,t∈T}
is called state space. If both the parameter set T and the state space E are discrete Markov processes, it can be called a Markov chain.A Poisson process is defined as follows.If the counting process{N(t),t≥0} that takes nonnegative integer value meets the following conditions:(1)
N(0)=0;(2)
having independent increment;(3)
for any0≤s<t, N(t)-N(s) is accorded with the Poisson distribution whose parameter is λ(t-s),
(3)P{N(t)-N(s)=k}=[λ(t-s)]kk!e-λ(t-s),k=0,1,2,…,Then the random process{N(t),t≥0} is called a (homogeneous) Poisson process whose parameter (or average ratio, intensity) is λ.The following processes are typical cases of Poisson process. During the time interval[0,t).(1)
The number of customers arriving at a supermarketN(t).(2)
The number of machines breaking down in a workshopN(t).(3)
The number of error codes in a communication systemN(t).SupposeN(t) to be the number of times of event happening during the interval [0,t), {N(t),t≥0} to be a Poisson process with a parameter λ and τ1,τ2,…,τn to be the moment of the event happening the 1st, 2nd, …, n time. tk represents the waiting time until the event happens the k time, and Tk(k≥1) represents the separation distance between the k-1 and the k appearance,
(4)Tk=τk-τk-1,k=1,2,…,n,τ0=0.As can be proved, the variables in the interval sequence{Tn,n=1,2,…,n} are all independent and identically distributed random variables, which are changed by exponential distribution with a parameter λ,
(5)pt=P{Tn=t}={λe-λtt≥00t<0λ>0.


## 2.2. Queuing and Serving Process

Queuing is a common phenomenon in our daily life. For example, people queue up to wait for buses when on and off duty and customers line up to shop in the stores. Obviously, the queue consists of two parties. One party asks for getting service and the other party tries to provide service. The people or things (like equipments) that require service are generally called customers and the service staff or service agency that provide service is called service staff or service counter. Then the customers and the service counter form a queuing and serving system, which can also be called a stochastic service system.A queuing system is determined by many conditions. While for the sake of simplicity, 3~5 English letters with diagonal lines between them are usually used to indicate a queuing system. The first letter represents the distribution pattern of input variables, the second one represents the distribution pattern of the service time, the third one represents the number of service counter, and the forth one represents the capacity of service system. Sometimes a fifth letter may be used to represent the customer number in the customer source. M/M/1 means that the input process is a Poisson current, the service time follows a negative exponential distribution, and the system has only one service counter. The M/M/1 queuing and serving system has a quite good Markov property at any moment. M/G/1 means that the input process is a Poisson current, the service time is independent and follows a probability distribution, and the system has only one service counter, whereas M/G/1 queuing and serving system has the Markov property only at some special random moments but not any moment. These random moments are called regeneration points which means that the system restarts since the moment. Utilizing regeneration points, a common queuing and serving system can be turned into a Markov chain and get solved with relevant methods. This kind of method is called imbedding Markov chain approach [32].In an M/G/1 queuing and serving process, the customers arrive in Poisson current whose parameter isλ(λ>0), which means the sequence {Ti,i≥1} showing interval time of adjacent arrival is independent and is accorded with negative exponential distribution.The sequence{χi,i≥1} of the service time that customers need is independent and follows a general distribution G(t),t≥0, and 0<1/μ=∫0∞tdG(t) is taken as the average service time. There is only one service counter in the system. When a customer arrives, he can accept service at once if the counter is free. Otherwise, he should wait in line and accept service according to the arrival order. He leaves the new system as soon as the service ends. In addition, the arrival process and the service process are still independent of each other.SetN(t) to be the number of customers in the system (the queue length) at the moment t. In an M/G/1 queuing system, considering that the service time follows a general distribution, the service for a customer who is accepting his service at an optional moment t could be unfinished. Because the remaining service time distribution does not have the no-memory property any more since the moment t, the queue length {N(t),t≥0} does not have Markov property consequently. However, if Nn+ is set to be the number of the customers left in the system when the customer n finishes his service and leaves, which means the rest queue length, n≥1, it can be proved that the sequence {Nn+,n≥1} is a Markov chain and should be called an imbedding Markov chain of the queue length process {N(t),t≥0}. It can also be proved that the necessary and sufficient condition of the chain {Nn+,n≥1} being positive recurrence is ρ=λ/μ<1. When the chain {Nn+,n≥1} is positive recurrence, it is acknowledged that the sequence {Nn+,n≥1} owns the only stationary distribution,
(6)pj+=limn→∞P(Nn+=j)>0,j=0,1,2,….As can be proved, whenρ<1, the limit of the n-step transition probability of the imbedding Markov chain always exists and is a positive value which does not depend on the initial state. That is to say, it is a stationary distribution. When ρ≥1, no matter how large the positive integer m is, the probability of the number of customers left in the system ≤m as the customer n finishes his service and leaves is always tending to 0 (n→∞). This indicates that the queue will get longer and longer and the system cannot reach a statistical balance. In an M/G/1 queuing system, if ρ=λ/μ<1, then the generating function of the stationary distribution pj+, j≥0 is
(7)P+(z)=(1-ρ)(1-z)g(λ(1-z))g(λ(1-z))-z,|z|<1.Thereinto,g(λ(1-z))=∫0∞e-λ(1-z)tdG(t).Assume that customers get served according to the first-come-first-serve (FCFS) rule and setWq(t) and W(t) to represent the waiting and stay time distribution under the statistical balance; the inverse Laplace transforms of them are
(8)wq(s)=∫0∞e-stdWq(t),w(s)=∫0∞e-stdW(t).Then the specific expressions ofwq(s) and w(s) in an M/G/1 queuing system are deduced under the condition ρ<1.Apparently, under a statistical balance, the number of customers left in the system as a customer finishes his service and leaves equals the number of customers reaching the system during his stay, which means(9)pj+=P(jcustomersarriveduringhisstay)=∫0∞(λt)jj!e-λtdW(t),j=0,1,2,….Therefore,(10)P+(z)=∑j=0∞zjpj+=∫0∞e-λt∑j=0∞(λtz)jj!dW(t)=∫0∞e-λ(1-z)tdW(t)=w(λ(1-z)).According to the formula (7) and (10), it can be deduced that
(11)(1-ρ)(1-z)g(λ(1-z))g(λ(1-z))-z=w(λ(1-z)).Sets=λ(1-z) and the following expression can be obtained:
(12)w(s)=s(1-ρ)g(s)s-λ[1-g(s)].The stay timeW equals waiting time Wq plus service time χ, which means W=Wq+χ. Moreover, Wq and χ are independent of each other. Therefore,
(13)w(s)=wq(s)·g(s).According to the formula (12) and (13), the following expression can be obtained:
(14)wq(s)=s(1-ρ)s-λ[1-g(s)].Based on the formula (14), utilize the inverse Laplace transform,
(15)Wq(t)=∑n=0∞(1-ρ)ρnG^(n)(t),t≥0.Thereinto,G^(t)=μ∫0t[1-G(x)]dx represents the equilibrium distribution of service time G(t), and G^(n)(t) is the n-fold convolution of G^(t), n≥1.According to the formula (15), under the condition ρ<1, the average waiting time of the M/G/1 system is supposed to be
(16)W-q=λE[χ2]2(1-ρ).Thereinto,χ represents the random variable of service time.Formula (16) expresses the average waiting time deduced under the FCFS rules which can be divided into two parts,
(17)W-q=ρW-q+λE[χ2]2.Apparently, the first part on the right side of the equal sign in the formula (17) means the waiting time of customers existing in the queue when a new customer arrives, and the second part represents the current customer’s average rest service time when a new customer arrives. Under the FCFS rules, it can be deduced that when a new customer arrives, the current customer’s rest service time is supposed to be
(18)W-e=λE[χ2]2.Because the average stay time equals average waiting time plus average service time, the average stay time is(19)W-=1μ+λE[χ2]2(1-ρ).


## 3. Modeling for Online Delay of Nonperiodic CAN Message

The average on-line delay time of nonperiodic message in a CAN bus system can be figured out with the knowledge of queuing theory. The CAN bus communication system is taken as a queuing and serving system. Each node that sends information frame is the generation source of information. According to the analysis in Section2 as well as some relevant introductions in [28, 30], the nonperiodic message’s generation process on each node is a Poisson process. The intervals of the node’s request correspond to the customers’ arrival intervals, the transmission time of the bus after node’s request corresponds to the service time in queuing theory, and the CAN bus corresponds to a service staff. As a result, the system can be described to be a queuing model which is shown in Figure 1, and n nodes can be taken as the arrival sequence of n customers.Figure 1
CAN bus queuing and serving model.The features of the queuing model include the following ones.(1)
n arriving currents in the queuing model share one public queue and the queue network is open loop.(2)
Customers have grade identification and the priorities are1,2,…,n from high to low. The service mechanism adopts non-preemptive discrimination with priorities.(3)
The arrivals of customers are all Poisson arrivals, and the speed of the arrivals areλ1,λ2,…,λn.(4)
To enhance the adaptability of the model, it is assumed that the service time follows a general random distribution. The average service time for customers in different levels is1/μ1,1/μ2,…,1/μn.In conclusion, the response time model for nonperiodic messages in a CAN bus system can be taken as a non-preemptive priority M/G/1 queue.Meanwhile, the following instructions for message transmitting in CAN bus are put forward.(1)
For real-time information, there is no local queuing delay, which means that there is no sending buffer for the message with the same ID.(2)
Considering the transmission process of the protocol frame with the priorityi and the uniqueness of identifier of CAN protocol frame, and there are no local queues, the time from a CAN message’s reaching the network queue to getting sent successfully consists of two parts. One part is called blocking time that represents the remaining transmission time of the message who is getting transmitted as the frame arrives at the network. Another part is the interference time of the protocol frames with higher priority reaching the network during this period of time.(3)
According to the message priority, the message with the highest priority is called class 1 message and the one with a higher priority is called class 2 message. And so on, the message with the lowest priority should be classn message.Firstly, considering class 1 message, which means the average queue delay problems of highest priority messages.When a class 1 message requests to pass the bus and transmit, its average waiting timeWq1- is expressed as follows.(1) When a message requests to transmit, the remaining transmission time of the messages (regardless of its priority class) who are transmitting through the bus is supposed to be(20)Wq1-=We-.Thereinto,Wq1- represents the average waiting time of the class 1 message which means the time quantum from requesting for transmission to taking the bus and We- represents the average remaining time of the messages who are transmitting when the class 1 message reaches.According to the formula (18), the average remaining service time of the current customer is supposed to be
(21)We¯=∑i=1nλiE(χi2)2.Thereinto,n represents the sum of message categories, λi represents the request speed of class i message, and χi represents the transmission time of class i message which is a random variable.Then, take class 2 message into consideration, which means the average queue delay problems of higher priority messages.When a class 2 message requests to pass the bus to transmit, its average waiting timeWq2- is expressed as follows.(1)
We- is the remaining time of the messages (regardless of its priority class) who are taking the bus to transmit when the message requests for transmission.(2)
The total transmission time of class 1 messages in the queue before the message’s arrivalW2b- is supposed to be
(22)W2b¯=λ1Wq1¯μ1=ρ1Wq1¯.(3)
The total transmission time of class 1 messages that reach during the message’s waiting periodW2a- is supposed to be
(23)W2a¯=λ1Wq2¯μ1=ρ1Wq2¯.According to the formula (20), (22), and (23), it can be deduced that the waiting time of class 2 message Wq2¯ is to be
(24)Wq2¯=We¯+W2b¯+W2a¯=Wq1¯+ρ1Wq1¯+ρ1Wq2¯,Wq2¯=Wq1¯(1+ρ1)(1-ρ1).Finally, consider the average queue delay problem of the classi message.When a classi message requests to transmit through the bus, its average waiting time Wqi¯ is derived in the following possibilities:(1)
We¯ is the remaining time of the messages (regardless of its priority class) who are taking the bus to transmit when the message requests for transmission.(2)
Before the mentioned classi message arrives, the total transmission time of messages with priorities higher than i is defined as Wib¯:
(25)Wib¯=∑j=1i-1λjWqj¯μj=∑j=1i-1ρjWqj¯.(3)
During the waiting period of the mentioned classi message, the total transmission time of the arriving messages whose priorities are higher than i, is defined as Wia¯:
(26)Wia¯=∑j=1i-1λjWqi¯μj=∑j=1i-1ρjWqi¯.
According to the formulas (25), and (26), it can be deduced that the waiting time of class i message Wqi¯ is to be
(27)Wqi¯=We¯+Wib¯+Wia¯=We¯+∑j=1i-1ρjWqj¯+∑j=1i-1ρjWqi¯,Wqi¯=Wq(i-1)¯(1-∑j=1i-2ρj+ρi-1)(1-∑j=1i-1ρj).Then consider the transmission delay of messages, the on-line delay is supposed to be(28)Wi¯=1μi+Wqi¯
which is corresponding to the customer’s average sojourn time in the queuing theory. In this paper, extended data frame is adopted. The first part of the right side of formula (28) can be computed according to the following expression:
(29)1μi=(67+8sm+⌈⌊(54+8sm)/4⌋2⌉)τbit+ρcons.Thereinto,sm represents the byte numbers included in the data field of message m, which should be an integer between 0 and 8. All eight bytes of data field are used in the paper, so the value should be 8. ρcons represents a constant related to electrical specifications of physical media of a bus and the value for per meter length of shielded twisted-pair cable could be 5 ns. τbit represents the time that is needed for a data bit to transmit on the transmission medium. The Baud rate of the network in this paper is 250 kbit/s, so the value for τbit should be 4 μs.


## 4. Testing Analysis of Communication Delay of Nonperiodic CAN Message

The trigger process of actual working conditions are simulated under the circumstance of taking the external event trigger mode as the trigger mode of nonperiodic CAN messages. The specific way to carry out is described concisely. Firstly, a pulse signal whose interval is an index distribution with a parameterλ is built. Then the pulse signal is plussed to the external interrupt interface of the singlechip and trigger CAN messages according to the level of fluctuation of the interface. Finally, the communication delay of nonperiodic CAN message at different load ratios is analyzed by changing the value of parameter λ.


### 4.1. Topological Structure Design of Test Platform

In order to test and verify the above-mentioned mathematical model for online delay during the process of periodic messages transmitting in the bus, an experimental platform is developed and designed to test the communication delay of CAN message, which is shown in Figure2. Meanwhile, Figure 3 is a real photograph of using the experimental platform.Figure 2
The experimental platform for testing the communication delay of CAN message.Figure 3
Using the experimental platform to test communication delay of CAN.The experimental platform consists of computer network node system and network-induced delays testing system. The node system is made up of 5 CAN controller nodes. All nodes are designed by ourselves and the structures are exactly the same. The testing system is used to track the sending and receiving process of CAN message. The system uses a CAN network analyzer SE70000 from company NEC to finish the test, with which the sending and receiving process of message, recording the sending and receiving moment of message, recording the message ID, and counting the average and peak load ratio of the bus and some other functions can be realized.


### 4.2. Testing Results of Online Delay at Different Load Ratios

The test and analysis is carried out on the experimental platform for testing communication delay of CAN message which is shown in Figure2. The on-line delays of messages with a different ID at different load ratios are tested in an actual communication process and are compared with the theory model for on-line delay which is built in Section 3.


#### 4.2.1. Testing Results of Online Delay at a Load Ratio 13.33%

The load ratio being 13.33% is measured by SE70000. Under such working condition, the data of network part measured in real time is shown in Table1.Table 1
Partial data that is monitored by network-induced delays testing system at a load ratio 13.33%.
ID
Receiving moment (ms)
ID
Receiving moment (ms)
0x11111115
20,736.30
0x11111111
20,791.45
0x11111114
20,739.95
0x11111114
20,793.95
0x11111111
20,744.25
0x11111111
20,801.05
0x11111112
20,756.50
0x11111114
20,802.75
0x11111111
20,758.65
0x11111112
20,803.35
0x11111114
20,765.55
0x11111114
20,804.75
0x11111115
20,767.10
0x11111113
20,808.45
0x11111114
20,770.75
0x11111114
20,818.35
0x11111111
20,776.25
0x11111114
20,819.95
0x11111112
20,787.70
0x11111113
20,832.05Every actual receiving moment of message with a different ID is obtained. Apparently, the difference between two receiving moments of the same message is the actual receiving interval. The difference between the actual receiving interval and the actual trigger interval is the queue delay in the transmission process. The transmission delay in the transmission process of message with different ID can be tested with an oscilloscope. The sum of the measured transmission delay and the queue delay should be the on-line delay of message. The measured on-line delays data of messages with a different ID at a load ratio 13.33% are shown in Figure4. The abscissa of the figure represents the sending times of message. 300 sets of data are tested totally, which means that the message with a same ID transmits for 300 times. And the ordinate represents the on-line delay size of transmission process with a different ID. After statistics and analysis, the average on-line delays of messages with different ID are acquired as well, which are shown in Table 2.Table 2
Comparison between the measured and theoretical average on-line delay value at a load ratio 13.33%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.58267
0.60833
4.22%
0x11111112
0.6035
0.61069
1.18%
0x11111113
0.58467
0.61326
4.66%
0x11111114
0.58767
0.61607
4.61%
0x11111115
0.58583
0.61915
5.38%Figure 4
Measured on-line delays of messages with a different ID at a load ratio 13.33%.In Table2, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 2, the maximal difference value between the theoretical value and the measured value is 5.38%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


#### 4.2.2. Testing Results of Online Delay at a Load Ratio 27.64%

The measured on-line delays data of messages with a different ID at a load ratio 27.64% are shown in Figure5. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 3.Table 3
Comparison between the measured and theoretical average on-line delay value at a load ratio 27.64%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.62733
0.64866
3.29%
0x11111112
0.63633
0.65837
3.35%
0x11111113
0.64967
0.66995
3.03%
0x11111114
0.654
0.68391
4.37%
0x11111115
0.64567
0.70095
7.89%Figure 5
Measured on-line delays of messages with a different ID at a load ratio 27.64%.In Table3, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 7.89%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


#### 4.2.3. Testing Results of Online Delay at a Load Ratio 37.92%

The measured on-line delays data of messages with a different ID at a load ratio 37.92% are shown in Figure6. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 4.Table 4
Comparison between the measured and theoretical average on-line delay value at a load ratio 37.92%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.63083
0.68898
8.44%
0x11111112
0.6805
0.71152
4.36%
0x11111113
0.66217
0.741
10.64%
0x11111114
0.68333
0.7806
12.46%
0x11111115
0.681
0.83556
18.50%Figure 6
Measured on-line delays of messages with a different ID at a load ratio 37.92%.In Table4, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 18.50%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


### 4.3. Analysis for Testing Data of On-Line Delay

Charts are drawn to show the measured average and maximal values of on-line delays of messages at different load ratios based on Tables2 to 4 and Figures 4 to 6, which are shown in Figures 7 and 8.Figure 7
Average on-line delays of messages with a different ID at different load ratios.Figure 8
Maximal on-line delays of messages with a different ID at different load ratios.The analysis results are given based on Tables2 to 4 and Figures 7 to 8. (1)
The average on-line delay values calculated with the mathematical model is very close to the measured ones for the messages with all priorities at three kinds of load ratios. The maximal error is 18.50%, indicating that the theoretical model is reasonable.(2)
For the same message, the measured average and maximal on-line delays are both increasing with the increase of load and reaching speed, which means that it conforms to the law that on-line delay increases when the load increases.(3)
To the same load, the priority has little impact on the average on-line delay. This phenomenon indicates that the queue delay for nonperiodic message comes from no arbitration delay mostly, which is in line with the characteristic of small trigger probability in the same phase position for nonperiodic message.(4)
The on-line delay of message consists of queue delay and transmission delay. For the extended frame message whose data field is 8 bytes, the length of a single frame is generally the same and the difference of transmission delay is small. Queue delay consists of arbitration delay and no arbitration delay. The arbitration delay means the delay of the message with a lower priority caused by the one with a higher priority when two messages are sent simultaneously, which includes the arbitration delay in the nodes and the one on the bus. The arbitration delay is related to the message priorities. The no-arbitration delay is a delay for the message frame because of there having been other message frames transmitting on the bus (no matter the priority of the message is high or low). The no-arbitration delay is independent of the message priorities. At a low load ratio, the probability for several messages triggering at a same phase position is extremely small. That is to say, priority has little influence on the maximal on-line delay value. While at a high load ratio, the probability for several messages triggering at the same phase position increases, which is to say, priority has a large influence on the maximal on-line delay value. Therefore, the priority affects the maximal on-line delay value a little at a low load ratio but a lot at a high load ratio. This result indicates that the probability of messages with a different ID getting triggered at the same time increases with the increase of load, which results in the message with a high priority getting arbitration and then reducing the on-line delay.(5)
In a few cases, the on-line delay of the message with a higher priority is higher than that with a lower priority at the same load ratio. This is because the transmission cycle is different for each message. Then the collision chance of some higher priority message is great, making the no-arbitration delay of higher priority message high.(6)
In a few cases, for the same message, the maximal on-line delay decreases with the increase of the load ratio. That is because the probability of collision is related to message’s transmission interval and transmission phase. The increase of the load does not guarantee more collision chances of multiple messages at the same time. Consequently, the condition of low on-line delay at a high load ratio for a message could happen.(7)
The average on-line delay can reflect the trend of load ratio affecting on-line delay better than the maximal one.


## 4.1. Topological Structure Design of Test Platform

In order to test and verify the above-mentioned mathematical model for online delay during the process of periodic messages transmitting in the bus, an experimental platform is developed and designed to test the communication delay of CAN message, which is shown in Figure2. Meanwhile, Figure 3 is a real photograph of using the experimental platform.Figure 2
The experimental platform for testing the communication delay of CAN message.Figure 3
Using the experimental platform to test communication delay of CAN.The experimental platform consists of computer network node system and network-induced delays testing system. The node system is made up of 5 CAN controller nodes. All nodes are designed by ourselves and the structures are exactly the same. The testing system is used to track the sending and receiving process of CAN message. The system uses a CAN network analyzer SE70000 from company NEC to finish the test, with which the sending and receiving process of message, recording the sending and receiving moment of message, recording the message ID, and counting the average and peak load ratio of the bus and some other functions can be realized.


## 4.2. Testing Results of Online Delay at Different Load Ratios

The test and analysis is carried out on the experimental platform for testing communication delay of CAN message which is shown in Figure2. The on-line delays of messages with a different ID at different load ratios are tested in an actual communication process and are compared with the theory model for on-line delay which is built in Section 3.


### 4.2.1. Testing Results of Online Delay at a Load Ratio 13.33%

The load ratio being 13.33% is measured by SE70000. Under such working condition, the data of network part measured in real time is shown in Table1.Table 1
Partial data that is monitored by network-induced delays testing system at a load ratio 13.33%.
ID
Receiving moment (ms)
ID
Receiving moment (ms)
0x11111115
20,736.30
0x11111111
20,791.45
0x11111114
20,739.95
0x11111114
20,793.95
0x11111111
20,744.25
0x11111111
20,801.05
0x11111112
20,756.50
0x11111114
20,802.75
0x11111111
20,758.65
0x11111112
20,803.35
0x11111114
20,765.55
0x11111114
20,804.75
0x11111115
20,767.10
0x11111113
20,808.45
0x11111114
20,770.75
0x11111114
20,818.35
0x11111111
20,776.25
0x11111114
20,819.95
0x11111112
20,787.70
0x11111113
20,832.05Every actual receiving moment of message with a different ID is obtained. Apparently, the difference between two receiving moments of the same message is the actual receiving interval. The difference between the actual receiving interval and the actual trigger interval is the queue delay in the transmission process. The transmission delay in the transmission process of message with different ID can be tested with an oscilloscope. The sum of the measured transmission delay and the queue delay should be the on-line delay of message. The measured on-line delays data of messages with a different ID at a load ratio 13.33% are shown in Figure4. The abscissa of the figure represents the sending times of message. 300 sets of data are tested totally, which means that the message with a same ID transmits for 300 times. And the ordinate represents the on-line delay size of transmission process with a different ID. After statistics and analysis, the average on-line delays of messages with different ID are acquired as well, which are shown in Table 2.Table 2
Comparison between the measured and theoretical average on-line delay value at a load ratio 13.33%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.58267
0.60833
4.22%
0x11111112
0.6035
0.61069
1.18%
0x11111113
0.58467
0.61326
4.66%
0x11111114
0.58767
0.61607
4.61%
0x11111115
0.58583
0.61915
5.38%Figure 4
Measured on-line delays of messages with a different ID at a load ratio 13.33%.In Table2, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 2, the maximal difference value between the theoretical value and the measured value is 5.38%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


### 4.2.2. Testing Results of Online Delay at a Load Ratio 27.64%

The measured on-line delays data of messages with a different ID at a load ratio 27.64% are shown in Figure5. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 3.Table 3
Comparison between the measured and theoretical average on-line delay value at a load ratio 27.64%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.62733
0.64866
3.29%
0x11111112
0.63633
0.65837
3.35%
0x11111113
0.64967
0.66995
3.03%
0x11111114
0.654
0.68391
4.37%
0x11111115
0.64567
0.70095
7.89%Figure 5
Measured on-line delays of messages with a different ID at a load ratio 27.64%.In Table3, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 7.89%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


### 4.2.3. Testing Results of Online Delay at a Load Ratio 37.92%

The measured on-line delays data of messages with a different ID at a load ratio 37.92% are shown in Figure6. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 4.Table 4
Comparison between the measured and theoretical average on-line delay value at a load ratio 37.92%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.63083
0.68898
8.44%
0x11111112
0.6805
0.71152
4.36%
0x11111113
0.66217
0.741
10.64%
0x11111114
0.68333
0.7806
12.46%
0x11111115
0.681
0.83556
18.50%Figure 6
Measured on-line delays of messages with a different ID at a load ratio 37.92%.In Table4, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 18.50%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


## 4.2.1. Testing Results of Online Delay at a Load Ratio 13.33%

The load ratio being 13.33% is measured by SE70000. Under such working condition, the data of network part measured in real time is shown in Table1.Table 1
Partial data that is monitored by network-induced delays testing system at a load ratio 13.33%.
ID
Receiving moment (ms)
ID
Receiving moment (ms)
0x11111115
20,736.30
0x11111111
20,791.45
0x11111114
20,739.95
0x11111114
20,793.95
0x11111111
20,744.25
0x11111111
20,801.05
0x11111112
20,756.50
0x11111114
20,802.75
0x11111111
20,758.65
0x11111112
20,803.35
0x11111114
20,765.55
0x11111114
20,804.75
0x11111115
20,767.10
0x11111113
20,808.45
0x11111114
20,770.75
0x11111114
20,818.35
0x11111111
20,776.25
0x11111114
20,819.95
0x11111112
20,787.70
0x11111113
20,832.05Every actual receiving moment of message with a different ID is obtained. Apparently, the difference between two receiving moments of the same message is the actual receiving interval. The difference between the actual receiving interval and the actual trigger interval is the queue delay in the transmission process. The transmission delay in the transmission process of message with different ID can be tested with an oscilloscope. The sum of the measured transmission delay and the queue delay should be the on-line delay of message. The measured on-line delays data of messages with a different ID at a load ratio 13.33% are shown in Figure4. The abscissa of the figure represents the sending times of message. 300 sets of data are tested totally, which means that the message with a same ID transmits for 300 times. And the ordinate represents the on-line delay size of transmission process with a different ID. After statistics and analysis, the average on-line delays of messages with different ID are acquired as well, which are shown in Table 2.Table 2
Comparison between the measured and theoretical average on-line delay value at a load ratio 13.33%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.58267
0.60833
4.22%
0x11111112
0.6035
0.61069
1.18%
0x11111113
0.58467
0.61326
4.66%
0x11111114
0.58767
0.61607
4.61%
0x11111115
0.58583
0.61915
5.38%Figure 4
Measured on-line delays of messages with a different ID at a load ratio 13.33%.In Table2, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 2, the maximal difference value between the theoretical value and the measured value is 5.38%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


## 4.2.2. Testing Results of Online Delay at a Load Ratio 27.64%

The measured on-line delays data of messages with a different ID at a load ratio 27.64% are shown in Figure5. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 3.Table 3
Comparison between the measured and theoretical average on-line delay value at a load ratio 27.64%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.62733
0.64866
3.29%
0x11111112
0.63633
0.65837
3.35%
0x11111113
0.64967
0.66995
3.03%
0x11111114
0.654
0.68391
4.37%
0x11111115
0.64567
0.70095
7.89%Figure 5
Measured on-line delays of messages with a different ID at a load ratio 27.64%.In Table3, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 7.89%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


## 4.2.3. Testing Results of Online Delay at a Load Ratio 37.92%

The measured on-line delays data of messages with a different ID at a load ratio 37.92% are shown in Figure6. After statistics and analysis, the average on-line delays are acquired as well, which are shown in Table 4.Table 4
Comparison between the measured and theoretical average on-line delay value at a load ratio 37.92%.
ID
Measured average online delay (ms)
Theoretical average online delay (ms)
Difference
0x11111111
0.63083
0.68898
8.44%
0x11111112
0.6805
0.71152
4.36%
0x11111113
0.66217
0.741
10.64%
0x11111114
0.68333
0.7806
12.46%
0x11111115
0.681
0.83556
18.50%Figure 6
Measured on-line delays of messages with a different ID at a load ratio 37.92%.In Table4, the theoretical average on-line delay is computed according to the formula (28). As can be seen in Table 3, the maximal difference value between the theoretical value and the measured value is 18.50%, which indicates that the theoretical average on-line delay model is practicable and has a high accuracy.


## 4.3. Analysis for Testing Data of On-Line Delay

Charts are drawn to show the measured average and maximal values of on-line delays of messages at different load ratios based on Tables2 to 4 and Figures 4 to 6, which are shown in Figures 7 and 8.Figure 7
Average on-line delays of messages with a different ID at different load ratios.Figure 8
Maximal on-line delays of messages with a different ID at different load ratios.The analysis results are given based on Tables2 to 4 and Figures 7 to 8. (1)
The average on-line delay values calculated with the mathematical model is very close to the measured ones for the messages with all priorities at three kinds of load ratios. The maximal error is 18.50%, indicating that the theoretical model is reasonable.(2)
For the same message, the measured average and maximal on-line delays are both increasing with the increase of load and reaching speed, which means that it conforms to the law that on-line delay increases when the load increases.(3)
To the same load, the priority has little impact on the average on-line delay. This phenomenon indicates that the queue delay for nonperiodic message comes from no arbitration delay mostly, which is in line with the characteristic of small trigger probability in the same phase position for nonperiodic message.(4)
The on-line delay of message consists of queue delay and transmission delay. For the extended frame message whose data field is 8 bytes, the length of a single frame is generally the same and the difference of transmission delay is small. Queue delay consists of arbitration delay and no arbitration delay. The arbitration delay means the delay of the message with a lower priority caused by the one with a higher priority when two messages are sent simultaneously, which includes the arbitration delay in the nodes and the one on the bus. The arbitration delay is related to the message priorities. The no-arbitration delay is a delay for the message frame because of there having been other message frames transmitting on the bus (no matter the priority of the message is high or low). The no-arbitration delay is independent of the message priorities. At a low load ratio, the probability for several messages triggering at a same phase position is extremely small. That is to say, priority has little influence on the maximal on-line delay value. While at a high load ratio, the probability for several messages triggering at the same phase position increases, which is to say, priority has a large influence on the maximal on-line delay value. Therefore, the priority affects the maximal on-line delay value a little at a low load ratio but a lot at a high load ratio. This result indicates that the probability of messages with a different ID getting triggered at the same time increases with the increase of load, which results in the message with a high priority getting arbitration and then reducing the on-line delay.(5)
In a few cases, the on-line delay of the message with a higher priority is higher than that with a lower priority at the same load ratio. This is because the transmission cycle is different for each message. Then the collision chance of some higher priority message is great, making the no-arbitration delay of higher priority message high.(6)
In a few cases, for the same message, the maximal on-line delay decreases with the increase of the load ratio. That is because the probability of collision is related to message’s transmission interval and transmission phase. The increase of the load does not guarantee more collision chances of multiple messages at the same time. Consequently, the condition of low on-line delay at a high load ratio for a message could happen.(7)
The average on-line delay can reflect the trend of load ratio affecting on-line delay better than the maximal one.


## 5. Conclusion

In this paper, a Poisson process is adopted to simulate the reaching process of nonperiodic message in vehicle network system and a mathematical model is built to analyze the average on-line delay of nonperiodic real-time CAN message based on queuing theory. In addition, the reliability of the model is tested and verified with the measured data. For the messages with each priority at different load ratios, the values of average on-line delays which are computed by the mathematical model are very close to the measured values. That is to say, the theoretical model is quite reasonable. To the same message, the measured average and maximal on-line delays are both increasing with the increase of load and reaching speed, which means that it conforms to the law that on-line delay increases when the load increases. To the same load, the priority has little impact on the average on-line delay. This phenomenon indicates that the queue delay for nonperiodic message comes from no arbitration delay mostly, which is in line with the characteristic of small trigger probability in the same phase position for nonperiodic message. The priority affects the maximal on-line delay value a little at a low load ratio but a lot at a high load ratio. This result indicates that the probability of the messages with a different ID getting triggered at the same time increases with the increase of load ratio, which results in the message with a low priority losing arbitration and then increasing the on-line delay.



---

*Source: 637621-2013-11-19.xml*