CN109327367B - CAN FD bus message scheduling method based on offset - Google Patents

CAN FD bus message scheduling method based on offset Download PDF

Info

Publication number
CN109327367B
CN109327367B CN201811247781.9A CN201811247781A CN109327367B CN 109327367 B CN109327367 B CN 109327367B CN 201811247781 A CN201811247781 A CN 201811247781A CN 109327367 B CN109327367 B CN 109327367B
Authority
CN
China
Prior art keywords
message
time
messages
bus
delay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811247781.9A
Other languages
Chinese (zh)
Other versions
CN109327367A (en
Inventor
丁山
赵燕燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN201811247781.9A priority Critical patent/CN109327367B/en
Publication of CN109327367A publication Critical patent/CN109327367A/en
Application granted granted Critical
Publication of CN109327367B publication Critical patent/CN109327367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40039Details regarding the setting of the power status of a node according to activity on the bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40045Details regarding the feeding of energy to the node from the bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The invention discloses a CAN FD bus message scheduling method based on offset, which is used for transmitting a large amount of messages among nodes of a CAN FD bus with a plurality of nodes, reducing synchronous triggering of the messages by distributing the offset to the messages, reducing interference delay among the messages and ensuring that the messages are transmitted before a deadline. The messages are assigned the appropriate offset by the genetic algorithm, which involves the design of individual codes, population initialization, fitness functions, genetic algorithm crossover operators, selection operators, and mutation operators. The invention reduces the conflict and collision of the messages, ensures that each message has smaller worst case response time under the condition of ensuring that the messages are transmitted before the deadline, and improves the scheduling performance of the CAN FD system.

Description

CAN FD bus message scheduling method based on offset
Technical Field
The invention belongs to the technical field of bus message transmission, and relates to a CANFD bus message scheduling method based on offset.
Background
CAN is an internationally standardized serial communication protocol, and the bandwidth of the conventional CAN bus cannot meet the increasing bandwidth demand, so the CAN FD bus has been proposed and gradually widely used.
In the CAN FD network system, how to ensure the schedulability of the CAN FD network is a major problem in research. The CANFD bus, as an on-board network bus, has found application in thousands of automotive electronic systems. In an automobile control system, in order to solve the problem of real-time communication of a distributed system, control of dynamic information and a vehicle needs to be guaranteed. Therefore, an optimized software comprehensive scheduling mechanism needs to be designed, so that accurate, real-time and stable transmission of distributed functional signals is guaranteed.
To realize the intelligent networking of the automobile, more information needs to be interacted in an automobile body system, so that the punctual and reliable transmission of the information is ensured, the function of the automobile can be ensured, and more comfortable enjoyment is brought to people.
Disclosure of Invention
In order to solve the technical problems, the invention provides an offset-based CAN FD bus message scheduling method, which is used for designing a genetic algorithm to distribute offset to each message for periodic messages with different periods in a CAN FD system, so that the messages are triggered according to the distributed offset, thereby reducing the possibility of synchronous triggering among the messages and the interference delay among the messages, reducing the response time of the messages, ensuring that the messages are transmitted before the deadline, and improving the scheduling performance of the system.
The invention provides a CAN FD bus message scheduling method based on offset, which allocates one offset to each CAN FD bus message, schedules the message by using the offset, and leads the message to be triggered according to the allocated offset, wherein the offset represents the time interval from ECU starting to the first instance of the message being ready and starting to transmit.
In the CAN FD bus message scheduling method based on offset, the invention allocates proper offset to the periodic messages with different periods in the CAN FD bus through a genetic algorithm, and comprises the following steps:
step 1: initializing a population, namely generating an initial population by adopting a random population initializing method, wherein individuals in the population are represented by one-dimensional vectors consisting of offsets corresponding to CANFD messages;
step 2: calculating the fitness value of each individual according to the designed fitness function, and sequencing the individuals according to the sequence of the fitness values from small to large;
step 3: judging whether the maximum iteration number is met, if not, executing Step4, and if so, executing Step 7;
step 4: generating a random number p between 0 and 11If p is1If the probability is less than the crossover probability, performing crossover operation, otherwise, directly retaining the current parent individuals in the new population; performing cross operation, randomly generating a mask only containing 0 and 1, exchanging corresponding genes in the parent according to the mask, generating offspring and reserving the offspring with smaller fitness value;
step 5: generating a random number p between 0 and 12If p is2If the probability is less than the mutation probability, performing mutation operation, otherwise, executing Step 6; if variation occurs, randomly selectingTaking 10% of individuals in a population, randomly selecting genes at a plurality of positions for each individual, and changing the value of the genes;
step 6: selecting, sorting all the individuals of the parent population and the generated new population from small to large according to the fitness, selecting the first half of the better individuals as the parent population of the next iteration, and executing Step 3;
step 7: and (5) finishing the evolution, and decoding the optimal individual in the population to obtain the optimal solution.
In the method for scheduling the CAN FD bus message based on offset, Step1 specifically includes:
assuming that the CAN FD network has n CAN FD messages, sorting the n CAN FD messages from high to low according to priority, then randomly generating n numbers as offsets of the CAN FD messages, where the randomly generated offsets are non-negative integers smaller than the period of the corresponding CAN FD messages, and a one-dimensional vector composed of the n offsets is used as an individual in the population.
In the method for scheduling the CAN FD bus message based on offset, the fitness function in Step2 is expressed as follows:
Fitness(x)=max{RR}
wherein x represents an individual number, { RR } is a CAN FD message fiThe maximum value of the worst-case response time rate in the whole CAN FD network is used as a fitness function in genetic search;
RRi=WCRTi/Ti
wherein i represents the serial number of the CAN FD message, WCRTiAs CAN FD message fiEach CAN FD message fiAnd its period TiIs taken as the worst case response time rate RRi
WCRTiRefers to CAN FD message fiThe maximum time from the start of the ECU to the arrival of the transmission at the target ECU is comprised of three parts:
WCRTi=Ji+wi+Ci
wherein, JiFor queue jitter, CAN FD message f is indicated to be triggered from eventsiQueuing to message fiThe maximum time it takes to be ready and ready for transmission on the bus; w is aiFor queue delay, indicate FD message f from CANiTime interval from queuing in the message waiting queue to starting to transmit on the CAN bus; ciAs CAN FD message fiRepresents a CANFD message fiThe maximum time it takes from the ECU to transmit to the destination ECU;
in the offset-based CAN FD system model, it is assumed that each CAN FD message fiWithout queuing jitter, i.e. J i0; queue delay wiIncluding a blocking delay BiAnd interference delay Ii(ii) a Blocking delay BiIs referred to as a message fiF caused by low priority message occupying CAN bus when ready to sendiThe time of waiting; interference delay IiIs referred to as a message fiThe high priority messages win the time delay for arbitration to transmit on the bus in preparation for transmission.
In the CAN FD bus message scheduling method based on offset, the blocking delay BiCalculated by the following formula:
Figure BDA0001840926940000031
where k and i are the CAN FD message sequence number, PkIt indicates the priority, P, of the kth CAN FD messageiIs the priority of the ith CAN FD message, CkIs the transmission time of the kth CAN FD message.
In the CAN FD bus message scheduling method based on offset, interference delay IiIs divided into an ECUITime delays caused by internally high priority messages and other ECUsJMaximum time delay due to inter-high priority messages;
the IF function represents the time delay of a group of messages to a lower priority message over a period of time, the ECUIOf inner high priorityThe time delay caused by the message is calculated using an IF function at ST, t]In the interval (2), the ECUIGroup of message pair messages f of in-arrivaliThe resulting delay can be described by:
Figure BDA0001840926940000041
where ST represents the start time of the IF function, [ P ]i]Indicating a higher priority than PiAnd in [ ST, t]CAN FD frames arriving in the interval;
representing other ECUs by the maximum interference function MIFJWith internal priority higher than PiFrame pair fiFunction of the maximum time delay caused, denoted MJ[Pi](t) calculated by the following formula:
Figure BDA0001840926940000042
wherein hpJ(i) Is shown in ECUJWith internal priority higher than PiSet of frames of, LCMJIndicating ECUJAll priorities being higher than PiThe least common multiple of the period of the frame of (a); f. ofkWhich represents the k-th message and the k-th message,
Figure BDA0001840926940000043
indicating the time when the nth instance of the kth message occurs.
In the CAN FD bus message scheduling method based on offset, the message f is calculatediThe specific steps of the WCRT of (a) are as follows:
(1) calculating all possible IF functions in each ECU on the CAN FD bus, and then calculating the ECU except the ECUIAll other ECUs exceptJThe MIF function of (4);
(2) to this ECUIIF function and other ECUsJAnd blocking delay BSTPerforming a saturated addition operation, the purpose of which is to delay all possible messages fiThe transmitted element is added to the new interference function, and then the new interference function slope becomes 0 thOne moment is the earliest occurring idle time on the CAN bus;
(3) for the function obtained by the saturation addition operation, finding the time when the slope of the function is 0 for the first time, wherein the time is the first time when the CANFD bus enters the idle time, namely the message fiThe time at which a transmission CAN be made on the CAN FD bus for the first time;
(4) message fiTransmission time C on CAN FD busiAdding the result to the result obtained by the saturated addition operation;
(5) analyzing messages fiCandidate set of all possible critical moments WTiSelecting the maximum calculation result as the worst case response time;
through the steps, the message f is obtainediThe calculation formula of (a) is as follows:
Figure BDA0001840926940000051
wherein the content of the first and second substances,
Figure BDA0001840926940000052
indicating a message f after time STiTime of first arrival, BSTMessage f indicating arrival at time STiThe delay of the blocking of (a) is,
Figure BDA0001840926940000053
representing a message fiMessage pair f in the ECUiResulting in a time delay of MJ[Pi](t) represents message pairs f in other ECUsiThe resulting time delay.
Compared with the prior art, the invention has the following beneficial effects:
1. and (3) directly performing iterative optimization by using the maximum value of the worst response time rate of the final evaluation index as a fitness function in the iterative process of the genetic algorithm, so as to obtain a better optimization result.
2. By adopting a uniform hybridization mode, individuals are subjected to cross operation according to the situation of gene blocks, good gene patterns can be reserved, and more possible distribution schemes are increased.
3. The worst response time of the message in the system is reduced, the average delay time of the CAN FD bus is reduced, the scheduling performance of the system is improved, and the system is more reliable.
Drawings
FIG. 1 is a flow chart of a genetic algorithm for assigning offsets;
FIG. 2 is a chromosome schematic;
FIG. 3 is a schematic diagram of a crossover operation;
FIG. 4 is a schematic diagram of a variant operation;
FIG. 5 is a graph of an iteration of the genetic algorithm.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples.
In order to reduce the response time of the CAN FD bus message and improve the scheduling performance of the system, the invention provides an offset-based CAN FD bus message scheduling method. The method allocates a proper offset to each CAN FD bus message in the system by designing a genetic algorithm, uses the offsets to schedule the messages, triggers the messages according to the offsets, reduces interference delay among the messages, further reduces the worst response time of the messages, ensures that the messages are transmitted before a deadline, optimizes the maximum value of the worst response time rate of a message set, and improves the scheduling performance of the system. Where offset represents the time interval from the ECU (Electronic Control Unit) start-up to the first instance of the message being ready and beginning to be transmitted.
As shown in fig. 1, for periodic messages with different periods in the CAN FD bus, the proper offset is assigned to the messages by a genetic algorithm, which includes the following steps:
step 1: initializing a population, namely generating an initial population by adopting a random population initializing method, wherein individuals in the population are represented by one-dimensional vectors consisting of offsets corresponding to CANFD messages; the Step1 is specifically as follows:
assuming that the CAN FD network has n CAN FD messages, sorting the n CAN FD messages according to priority, then randomly generating n numbers as offsets of the CAN FD messages, where the randomly generated offsets are non-negative integers smaller than the period of the corresponding CAN FD message, and a one-dimensional vector composed of the n offsets is used as an individual in the population.
In specific implementation, assume the population size is N ind100, cross probability Pc0.95, probability of mutation Pm0.1, maximum number of iterations N gen100, iteration count counter Ncount
Assume that there are 10 CAN FD messages in the CAN FD network
Figure BDA0001840926940000061
The upper mark is the number of the ECU where the CAN FD message is located, and the lower mark is the priority number of the CAN FD message, because each message needs to be allocated with one offset, the individual length is N-10. The attributes of the CAN FD message also include transmission time C, period T, and deadline D. Therefore, 10 numbers are randomly generated as offsets of 10 CAN FD messages, and each random number is a non-negative integer smaller than the period T of the corresponding CAN FD message. The 10 random numbers form a one-dimensional array, each array index corresponds to the size of the priority of the CANFD message, the content of the array represents the offset of the corresponding CANFD message, and a specific example of the individual representation is shown in fig. 2.
Step 2: calculating the fitness value of each individual according to the designed fitness function, and sequencing the individuals according to the sequence of the fitness values from small to large; the fitness function in Step2 is expressed as follows:
Fitness(x)=max{RR} (1)
wherein x represents an individual serial number, { RR } is a CAN FD message fiThe maximum value of the worst-case response time rate in the whole CAN FD network is used as a fitness function in genetic search;
RRi=WCRTi/Ti(2)
wherein i represents the serial number of the CAN FD message, WCRTiAs CAN FD message fiEach CAN FD message fiAnd its period TiIs taken as the worst case response time rate RRi
WCRTiRefers to CAN FD message fiThe maximum time from the start of the ECU to the arrival of the transmission at the target ECU is comprised of three parts:
WCRTi=Ji+wi+Ci(3)
wherein, JiFor queue jitter, CAN FD message f is indicated to be triggered from eventsiQueuing to message fiThe maximum time it takes to be ready and ready for transmission on the bus; w is aiFor queue delay, indicate FD message f from CANiTime interval from queuing in the message waiting queue to starting to transmit on the CAN bus; ciAs CAN FD message fiRepresents a CANFD message fiThe maximum time it takes from the ECU to transmit to the destination ECU;
in the offset-based CAN FD system model, it is assumed that each CAN FD message fiWithout queuing jitter, i.e. J i0; queue delay wiIncluding a blocking delay BiAnd interference delay Ii(ii) a Blocking delay BiIs referred to as a message fiF caused by low priority message occupying CAN bus when ready to sendiThe time of waiting; interference delay IiIs referred to as a message fiThe high priority messages win the time delay for arbitration to transmit on the bus in preparation for transmission.
Further, the blocking delay BiCalculated by the following formula:
Figure BDA0001840926940000081
where k and i are the CAN FD message sequence number, PkIt indicates the priority, P, of the kth CAN FD messageiIs the priority of the ith CAN FD message, CkIs the transmission time of the kth CAN FD message.
Further, interference delay IiIs divided into the original ECUITime delays caused by internally high priority messages and other ECUsJMaximum time delay due to inter-high priority messages;
the IF function represents the time delay of a group of messages to a lower priority message over a period of time, the ECUIThe time delay caused by the message with high priority is calculated by using the IF function at ST, t]In the interval (2), the ECUIGroup of message pair messages f of in-arrivaliThe resulting delay can be described by:
Figure BDA0001840926940000082
where ST represents the start time of the IF function, [ P ]i]Indicating a higher priority than PiAnd in [ ST, t]CAN FD frames arriving in the interval;
representing other ECUs by the maximum interference function MIFJWith internal priority higher than PiFrame pair fiFunction of the maximum time delay caused, denoted MJ[Pi](t) calculated by the following formula:
Figure BDA0001840926940000083
wherein hpJ(i) Is shown in ECUJWith internal priority higher than PiSet of frames of, LCMJIndicating ECUJAll priorities being higher than PiThe least common multiple of the period of the frame of (a); f. ofkWhich represents the k-th message and the k-th message,
Figure BDA0001840926940000084
indicating the time when the nth instance of the kth message occurs.
Further, the message f is calculatediThe specific steps of the WCRT of (a) are as follows:
(1) calculating all possible IF functions in each ECU on the CAN FD bus, and then calculating the ECU except the ECUIAll other ECUs exceptJThe MIF function of (4);
(2) to this ECUIAnd an IF function ofHis ECUJAnd blocking delay BSTPerforming a saturated addition operation, the purpose of which is to delay all possible messages fiThe transmitted elements are added into a new interference function, and then the first moment when the slope of the new interference function becomes 0 is the earliest appearing idle time on the CAN bus;
(3) for the function obtained by the saturation addition operation, finding the time when the slope of the function is 0 for the first time, wherein the time is the first time when the CANFD bus enters the idle time, namely the message fiThe time at which a transmission CAN be made on the CAN FD bus for the first time;
(4) message fiTransmission time C on CAN FD busiAdding the result to the result obtained by the saturated addition operation;
(5) analyzing messages fiCandidate set of all possible critical moments WTiSelecting the maximum calculation result as the worst case response time;
through the steps, the message f is obtainediThe calculation formula of (a) is as follows:
Figure BDA0001840926940000091
wherein the content of the first and second substances,
Figure BDA0001840926940000092
indicating a message f after time STiTime of first arrival, BSTMessage f indicating arrival at time STiThe delay of the blocking of (a) is,
Figure BDA0001840926940000093
representing a message fiMessage pair f in the ECUiResulting in a time delay of MJ[Pi](t) represents message pairs f in other ECUsiThe resulting time delay.
Step 3: judging whether the maximum iteration number is reached, if N is reachedcount<NgenIf yes, executing Step4, otherwise, executing Step 7;
step 4: raw materialTo a random number p between 0 and 11If p is1<pcIf not, directly retaining the current parent individuals into the new population; performing cross operation, randomly generating a mask only containing 0 and 1 with the length of n, exchanging corresponding genes in a parent according to the mask to generate two filial generation individuals, calculating the fitness value of the filial generation individuals, and reserving the filial generation with a smaller fitness value; a specific example of the interleaving operation is shown in fig. 3.
Step 5: generating a random number p2 between 0 and 1, if p2< pm, performing mutation operation, otherwise, performing Step 6; if variation occurs, 10% of individuals in the population are randomly selected, and each individual randomly selects genes at a plurality of positions and changes the value of the genes; note that the new gene value is a non-negative integer less than the period of the corresponding CAN FD message and calculate the fitness value for each individual in the new population. One specific example of a mutation operation is shown in FIG. 4.
Step 6: selecting, sorting all the individuals of the parent population and the generated new population from small to large according to fitness values, selecting the first half of the better individuals as the parent population of the next iteration, and executing Step 3;
step 7: and (5) finishing the evolution, and decoding the optimal individual in the population to obtain the optimal solution. The convergence rate of the genetic algorithm and the search process are shown in fig. 5.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the scope of the present invention, which is defined by the appended claims.

Claims (6)

1. An offset-based CAN FD bus message scheduling method is characterized in that each CAN FD bus message is allocated with an offset, the messages are scheduled by using the offsets, the messages are triggered according to the allocated offsets, and the offsets represent time intervals from ECU starting to the first instance of the messages being ready and starting to be transmitted;
the method for allocating offset to the periodic messages with different periods in the CAN FD bus through a genetic algorithm comprises the following steps:
step 1: initializing a population, namely generating an initial population by adopting a random population initializing method, wherein individuals in the population are represented by a one-dimensional vector consisting of offsets corresponding to CAN FD messages;
step 2: calculating the fitness value of each individual according to the designed fitness function, and sequencing the individuals according to the sequence of the fitness values from small to large;
step 3: judging whether the maximum iteration number is met, if not, executing Step4, and if so, executing Step 7;
step 4: generating a random number p between 0 and 11If p is1If the probability is less than the crossover probability, performing crossover operation, otherwise, directly retaining the current parent individuals in the new population; performing cross operation, randomly generating a mask only containing 0 and 1, exchanging corresponding genes in the parent according to the mask, generating offspring and reserving the offspring with the minimum fitness value;
step 5: generating a random number p between 0 and 12If p is2If the probability is less than the mutation probability, performing mutation operation, otherwise, executing Step 6; if variation occurs, 10% of individuals in the population are randomly selected, and each individual randomly selects genes at a plurality of positions and changes the value of the genes;
step 6: selecting, sorting all the individuals of the parent population and the generated new population from small to large according to the fitness, selecting the first half of the better individuals as the parent population of the next iteration, and executing Step 3;
step 7: and (5) finishing the evolution, and decoding the optimal individual in the population to obtain the optimal solution.
2. The method according to claim 1, wherein Step1 is specifically:
assuming that the CAN FD network has n CAN FD messages, sorting the n CAN FD messages from high to low according to priority, then randomly generating n numbers as offsets of the CAN FD messages, where the randomly generated offsets are non-negative integers smaller than the period of the corresponding CAN FD messages, and a one-dimensional vector composed of the n offsets is used as an individual in the population.
3. The offset-based CAN FD bus message scheduling method of claim 1 wherein the fitness function in Step2 is expressed as follows:
Fitness(x)=max{RR}
wherein x represents an individual number, { RR } is a CAN FD message fiThe maximum value of the worst response time rate in the whole CANFD network is used as a fitness function in genetic search;
RRi=WCRTi/Ti
wherein i represents the serial number of the CAN FD message, WCRTiAs CAN FD message fiEach CAN FD message fiAnd its period TiIs taken as the worst case response time rate RRi
WCRTiRefers to CAN FD message fiThe maximum time from the start of the ECU to the arrival of the transmission at the target ECU is comprised of three parts:
WCRTi=Ji+wi+Ci
wherein, JiFor queue jitter, CAN FD message f is indicated to be triggered from eventsiQueuing to message fiThe maximum time it takes to be ready and ready for transmission on the bus; w is aiFor queue delay, indicate FD message f from CANiTime interval from queuing in the message waiting queue to starting to transmit on the CAN bus; ciAs CAN FD message fiTransmission time of (C), representing CAN FD message fiThe maximum time it takes from the ECU to transmit to the destination ECU;
in the offset-based CAN FD system model, it is assumed that each CAN FD message fiWithout queuing jitter, i.e. Ji0; queue delay wiIncluding a blocking delay BiAnd interference delay Ii(ii) a Blocking delay BiIs referred to as a message fiF caused by low priority message occupying CAN bus when ready to sendiThe time of waiting; interference delay IiIs referred to as a message fiThe high priority messages win the time delay for arbitration to transmit on the bus in preparation for transmission.
4. The offset-based CAN FD bus message scheduling method of claim 3 wherein blocking delay BiCalculated by the following formula:
Figure FDA0002658187940000031
where k and i are the CAN FD message sequence number, PkIt indicates the priority, P, of the kth CAN FD messageiIs the priority of the ith CANFD message, CkIs the transmission time of the kth CAN FD message.
5. The offset-based CAN FD bus message scheduling method of claim 4 wherein interference delay IiIs divided into an ECUITime delays caused by internally high priority messages and other ECUsJMaximum time delay due to inter-high priority messages;
the IF function represents the time delay of a group of messages to a low priority message over a period of time, the ECUIThe time delay caused by the message with high priority is calculated by using the IF function at ST, t]In the interval (2), the ECUIGroup of message pair messages f of in-arrivaliThe resulting delay can be described by:
Figure FDA0002658187940000032
where ST represents the start time of the IF function, [ P ]i]Indicating a higher priority than PiAnd in [ ST, t]A CANFD frame arriving within the interval;
representing other ECUs by the maximum interference function MIFJWith internal priority higher than PiFrame pair fiFunction of the maximum time delay caused, denoted MJ[Pi](t) calculated by the following formula:
Figure FDA0002658187940000033
wherein hpJ(i) Is shown in ECUJWith internal priority higher than PiSet of frames of, LCMJIndicating ECUJAll priorities being higher than PiThe least common multiple of the period of the frame of (a); f. ofkWhich represents the k-th message and the k-th message,
Figure FDA0002658187940000034
indicating the time when the nth instance of the kth message occurs.
6. The offset-based CAN FD bus message scheduling method of claim 5 wherein the calculation message fiThe specific steps of the WCRT of (a) are as follows:
(1) calculating all possible IF functions in each ECU on the CAN FD bus, and then calculating the ECU except the ECUIAll other ECUs exceptJThe MIF function of (4);
(2) to this ECUIIF function and other ECUsJAnd blocking delay BSTPerforming a saturated addition operation, the purpose of which is to delay all possible messages fiThe transmitted elements are added into a new interference function, and then the first moment when the slope of the new interference function becomes 0 is the earliest appearing idle time on the CAN bus;
(3) for the function obtained by the saturation addition operation, the time when the slope is 0 for the first time is found, the time is the first time when the CAN FD bus enters the idle time, namely the message fiThe time at which a transmission CAN be made on the CAN FD bus for the first time;
(4) message fiTransmission time C on CAN FD busiAdding the result to the result obtained by the saturated addition operation;
(5) analyzing messages fiCandidate set of all possible critical moments WTiSelecting the maximum calculation result as the worst case response time;
through the steps, the message f is obtainediThe calculation formula of (a) is as follows:
Figure FDA0002658187940000041
wherein the content of the first and second substances,
Figure FDA0002658187940000042
indicating a message f after time STiTime of first arrival, BSTMessage f indicating arrival at time STiThe delay of the blocking of (a) is,
Figure FDA0002658187940000043
representing a message fiMessage pair f in the ECUiResulting in a time delay of MJ[Pi](t) represents message pairs f in other ECUsiThe time delay caused is that EIT represents the time when the slope of the new interference function is 0 for the first time, namely the first time when the CAN FD bus enters the idle time, namely the message fiThe first time a transmission CAN be made on the CAN FD bus.
CN201811247781.9A 2018-10-25 2018-10-25 CAN FD bus message scheduling method based on offset Active CN109327367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811247781.9A CN109327367B (en) 2018-10-25 2018-10-25 CAN FD bus message scheduling method based on offset

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811247781.9A CN109327367B (en) 2018-10-25 2018-10-25 CAN FD bus message scheduling method based on offset

Publications (2)

Publication Number Publication Date
CN109327367A CN109327367A (en) 2019-02-12
CN109327367B true CN109327367B (en) 2020-11-03

Family

ID=65262978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811247781.9A Active CN109327367B (en) 2018-10-25 2018-10-25 CAN FD bus message scheduling method based on offset

Country Status (1)

Country Link
CN (1) CN109327367B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109861791B (en) * 2019-01-21 2021-12-07 广州小鹏汽车科技有限公司 Periodic data message transmission method, system, device and storage medium
CN110247958B (en) * 2019-05-23 2021-09-17 厦门理工学院 Vehicle-mounted CAN FD signal packaging method considering calculation and network cooperation
CN115001882B (en) * 2022-06-24 2023-08-08 广州汽车集团股份有限公司 Vehicle-mounted bus transceiver awakening method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154815A (en) * 2006-09-29 2008-04-02 霍尼韦尔国际公司 Dynamic economic burden distribution
CN103207772A (en) * 2013-04-07 2013-07-17 北京航空航天大学 Instruction prefetching content selecting method for optimizing WCET (worst-case execution time) of real-time task
US9419737B2 (en) * 2013-03-15 2016-08-16 Concio Holdings LLC High speed embedded protocol for distributed control systems
CN106878124A (en) * 2015-12-10 2017-06-20 现代自动车株式会社 Method and vehicle control device for controlling Large Copacity deagnostic communication in vehicle
CN107967171A (en) * 2017-12-01 2018-04-27 电子科技大学 Multi-workflow dispatching method based on genetic algorithm under a kind of cloud environment
CN108111366A (en) * 2016-11-25 2018-06-01 现代自动车株式会社 The method and apparatus of signal Analysis time delay

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11044260B2 (en) * 2016-04-01 2021-06-22 The Regents Of The University Of Michigan Fingerprinting electronic control units for vehicle intrusion detection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154815A (en) * 2006-09-29 2008-04-02 霍尼韦尔国际公司 Dynamic economic burden distribution
US9419737B2 (en) * 2013-03-15 2016-08-16 Concio Holdings LLC High speed embedded protocol for distributed control systems
CN103207772A (en) * 2013-04-07 2013-07-17 北京航空航天大学 Instruction prefetching content selecting method for optimizing WCET (worst-case execution time) of real-time task
CN106878124A (en) * 2015-12-10 2017-06-20 现代自动车株式会社 Method and vehicle control device for controlling Large Copacity deagnostic communication in vehicle
CN108111366A (en) * 2016-11-25 2018-06-01 现代自动车株式会社 The method and apparatus of signal Analysis time delay
CN107967171A (en) * 2017-12-01 2018-04-27 电子科技大学 Multi-workflow dispatching method based on genetic algorithm under a kind of cloud environment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A Genetic Algorithm for Minimizing Bandwidth Utilization by Packing CAN-FD Frame;Shan DING,Ruifeng HUANG;《2016 13th International Conference on Embedded Software and Systems (ICESS)》;20161231;第120-124页 *
A Genetic Algorithm for Packing CAN FD Frame with Real-Time Constraints;Shan Ding,Gang Zeng;《IEICE Trans. on Information and Systems》;20171010;第2505-2514页 *
Offset Assignment to Signals for Improving Frame Packing in CAN-FD;P.Joshi,S.S.Ravi,etc;《 2017 IEEE Real-Time Systems Symposium (RTSS)》;20171031;第167-177页 *

Also Published As

Publication number Publication date
CN109327367A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
CN113254197B (en) Network resource scheduling method and system based on deep reinforcement learning
CN109327367B (en) CAN FD bus message scheduling method based on offset
US8077618B2 (en) Using burst tolerance values in time-based schedules
US5615212A (en) Method, device and router for providing a contention-based reservation mechanism within a mini-slotted dynamic entry polling slot supporting multiple service classes
EP1867112B1 (en) Assigning resources to items such as processing contexts for processing packets
CN113613339B (en) Channel access method of multi-priority wireless terminal based on deep reinforcement learning
CN112996116B (en) Resource allocation method and system for guaranteeing quality of power time delay sensitive service
CN111211830A (en) Satellite uplink bandwidth resource allocation method based on Markov prediction
CN109617836B (en) Intelligent bandwidth allocation method and system for satellite data transmission
CN110708259A (en) Information-agnostic Coflow scheduling system capable of automatically adjusting queue threshold and scheduling method thereof
CN101414958A (en) Method and apparatus for scheduling business
US7843940B2 (en) Filling token buckets of schedule entries
CN109640290A (en) Service differentiating method, device and equipment based on EDCA mechanism in car networking
CN109639596A (en) A kind of Scheduling of Gateway method for vehicle-mounted CAN-CANFD hybrid network
CN111601398B (en) Ad hoc network medium access control method based on reinforcement learning
CN115499085A (en) Flexible Ethernet small-particle time slot allocation method and device
CN114301730B (en) Gateway scheduling method for vehicle-mounted Ethernet to CAN network
Ashjaei et al. Performance analysis of master-slave multi-hop switched ethernet networks
CN108768865B (en) Method for generating time-triggered service scheduling table supporting multicast service
CN109450817B (en) Mixed scheduling method for time-triggered Ethernet multi-service message transmission
CN115515244B (en) Comprehensive scheduling and resource allocation method for 5G new air interface down-mixed service
CN102594670B (en) Multiport multi-flow scheduling method, device and equipment
CN115022978A (en) Wireless network uplink scheduling method based on self-adaptive grouping and reinforcement learning
CN113098765B (en) Vehicle-mounted intelligent gateway and polling scheduling method thereof
CN109167713A (en) A kind of mixed scheduling method of CAN bus control network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant