CN106992879A - A kind of computational methods of CAN load factor - Google Patents

A kind of computational methods of CAN load factor Download PDF

Info

Publication number
CN106992879A
CN106992879A CN201710150546.9A CN201710150546A CN106992879A CN 106992879 A CN106992879 A CN 106992879A CN 201710150546 A CN201710150546 A CN 201710150546A CN 106992879 A CN106992879 A CN 106992879A
Authority
CN
China
Prior art keywords
message
length
bit
transmission
load factor
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.)
Granted
Application number
CN201710150546.9A
Other languages
Chinese (zh)
Other versions
CN106992879B (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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN201710150546.9A priority Critical patent/CN106992879B/en
Publication of CN106992879A publication Critical patent/CN106992879A/en
Application granted granted Critical
Publication of CN106992879B publication Critical patent/CN106992879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • 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
    • 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/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of CAN load factor, including:Judge the type of each CAN message, and determine therefrom that the length of each potential field in CAN message data frame;The length of each potential field in CAN message data frame based on determination, determines each CAN message data flow length;Emulate each CAN message filling bit length;The CAN message filling bit length of CAN message data flow length and calculating based on determination transmits bit stream length to determine that each CAN message is actual;Judge each CAN message transmission types, and determine therefrom that the value in the transmission cycle of CAN message;Different modes is selected according to each CAN message length to determine the total inorganic nitrogen of each CAN message occupancy;The total inorganic nitrogen that each CAN message takes in the network segment is summed, to draw the CAN load factor of the whole network segment.The computational methods of the present invention are the bus load taken comprising CAN message data stream transmitting, and comprising the shared bus load of filler transmission, the accuracy of calculating is high.

Description

A kind of computational methods of CAN load factor
Technical field
Patent of the present invention is related to automobile controller LAN (Controller Area Network, abbreviation CAN) network and led to Believe technical field, and in particular to a kind of computational methods of CAN load factor.
Background technology
With car networking, vehicle intellectualized development, the electric system applied on automobile increasingly increases.With Transinformation content increases in CAN network, and total inorganic nitrogen is dramatically increased, when total inorganic nitrogen is too high, will cause priority Low message transmissions time delay is long, in addition occur lose message situation, it is bad in network communications environment, for example once in a while by During to electromagnetic interference, because erroneous frame increases and causes the risk of network blockage to significantly increase.So now must be by the CAN nets Network is divided into multiple subnets.If however, subnet is designed to that excessively, the cost per unit of gateway will be increased, and information passes through net Extra message transmissions time delay will be brought when closing forwarding.To sum up, CAN network total inorganic nitrogen is vehicle Network Topology Design Important restrictions condition.
It is well known that network topology belongs to conceptual phase, it is the basis of follow-up all-network design.If network is opened up Flutter design unreasonable, changed in vehicle development later stage network topology, then network service matrix design, each ECU can be brought to lead to Believe the great variety of the work such as Software for Design, or even do over again completely, so Network Topology Design must make every effort to accurate, and CAN nets The risk of the more high then project later stage change network topology of the accuracy that network total inorganic nitrogen is calculated is smaller.
Bit stream in CAN communication message is encoded using non-return-to-zero (NRZ) method.I.e. in the whole position time, bit level will It is " dominant ", otherwise it is " recessiveness ".The characteristics of this coding is to realize that simple and expense is low, and it has the disadvantage to work as continued presence During multiple identical informations, because synchronizing information is lacked clocking error will be caused to accumulate.CAN message is defined for this ISO 11898 Frame starting (SOF), the method filled by position of arbitration field, controlling filed, data fields and CRC sequence encodes.No matter When, it is just automatic that a complement code is inserted in bit stream as long as CAN transmitters detect the position for having 5 continuous discre values in bit stream Position.When there is more continuous discre value in CAN message data flow, bit stream is actually transmitted in CAN network after message filling Digit it is more than the digit of CAN message data flow, the bus load that takes also increases when message is transmitted.
(the publication number of patent document 1:CN102111286A;Publication date:On June 29th, 2011) one kind is disclosed in control office Management node is according to each node in the method that the running status of whole network is monitored in the net network structure of domain, the computational methods The data frame number of transmission calculates the network load in a time cycle;The network load is calculated by below equation Arrive:Network load=(the data frame number that is sent within N number of time cycle of digit × all-network node per frame data it With)/(N × time cycle × bus standard bit rate), but the computational methods are not involved with CAN message data stream transmitting When, the shared bus load of filler transmission.
(the name of document of non-patent literature 1:Commercial car CAN network total inorganic nitrogen forecasting research based on mathematical statistics, comes From the Chinese automobile Engineering society nd Annual Meeting collection > of < 2016) and (name of document of non-patent literature 2:Offroad vehicle CAN network bus Load factor simulation study, from < offroad vehicle technology branch Annual Conference collection of thesis > in 2016) CAN load can be achieved The prediction of rate, and consider during prediction the shared bus load of filler transmission.However, the institute of non-patent literature 1 State method analysis sample come from the existing 5 sections of different brands of in the market commercial car product CAN network random test Data, it, which analyzes sample, has certain limitation, i.e., for the commercial car for the 5 sections of brands chosen, and this method predicts the outcome Deviation between measured result is smaller, and for other brands commercial car, this method predict the outcome with measured result it Between deviation can increased.Non-patent literature 2 is using CAN network simulation software CANoe to the total of offroad vehicle CAN network message Linear load rate has carried out full digital trigger technique research, and its simulation object is certain specific defined network topology of vehicle and communication square Battle array.Need to re-establish full digital trigger technique model when simulation object changes, i.e., the emulation mode is with strong points, versatility is It is not enough.
The content of the invention
For above-mentioned technical problem, the present invention provides a kind of computational methods of CAN load factor, and the computational methods are bag The bus load that data stream transmitting containing CAN message takes, and include the shared bus load of filler transmission.
The technical solution adopted by the present invention is:
Embodiments of the invention provide a kind of computational methods of CAN load factor, for each net in CAN network The total inorganic nitrogen of section is calculated, and the calculating of the total inorganic nitrogen of each network segment comprises the following steps:
S100:Judge the type of each CAN message in the network segment, and determine therefrom that the length of each potential field in CAN message data frame;
S200:The length of each potential field in CAN message data frame based on determination, determines each CAN message data flow length;
S300:Emulate the filling bit length of each CAN message;
S400:The CAN message filler determined based on the step S200 CAN message data flow length determined and step S300 Length transmits bit stream length to determine that each CAN message is actual;S500:Judge each CAN message transmission types, and determine therefrom that CAN The value in the transmission cycle of message;
S600:Different modes is selected according to each CAN message length to determine the total inorganic nitrogen of each CAN message occupancy;
S700:The total inorganic nitrogen that each CAN message takes in the network segment is summed, to show that the CAN of the whole network segment is total Linear load rate.
Alternatively, each CAN message data flow length is determined based on following formula (1):
Wherein, LmFor CAN message data flow length, unit is position;LiFor i-th of potential field length of CAN message data frame, Unit is bit;
The actual transmission bit stream length of each CAN message is determined by following formula (2):
#L=Lm+Lstuff (2)
Wherein, L is the length of the actual transmission bit stream of CAN message, and unit is bit;LstuffFor the length of CAN message filler Degree, unit is bit.
Alternatively, the emulation of the filling bit length of each CAN message is comprised the following steps in step S300:
S301:The potential field of CAN message frame in the communication matrix file of the network segment, which is defined, to form CAN message data flow simultaneously It is stored in two-dimensional array MEG1;
S302:CAN message data flow fill rule as defined in CAN protocol in MEG1 is filled to form CAN reports Text filling bit stream is simultaneously stored in 2-D data MEG2;
S303:The CAN message data flow length for subtracting MEG1 with MEG2 CAN message filling bit stream length tries to achieve CAN reports Text filling bit length.
Alternatively, step S301 is specifically included:
(1) SOF, SRR, IDE, RTR, R0, R1 for taking the fixed position information that begins in CAN message frame are added into empty CAN to report In literary data flow;
(2) CAN that the ID and DLC of message are read from the communication matrix file of the network segment and is added after being handled through step (1) In message data stream;
(3) the defined signal in CAN message data fields chooses random number from its span, and reserved bit is defined as 1, and related content is added in the CAN message data flow after being handled through step (2);
(4) CRC sequences are calculated according to CRC algorithm and added in the CAN message data flow after being handled through step (3).
Alternatively, the operation (1) in step S301 is repeated to (4) 1000 times, to form 1000 emulation CAN messages Data flow;
In step S303, to the filler of 1000 CAN messages obtained by 1000 emulation CAN message data flows The mathematic expectaion of the emulation data of length is solved, using solving result as the CAN message of emulation filling bit length.
Alternatively, step S500 is specifically included:
S501:If certain CAN message transmission types is preiodic type, cycle C that sends of the CAN message is equal to the message The transmission cycle;
S502:If certain CAN message transmission types is event mode, the CAN message sends cycle C and takes 1s;
S503:If certain CAN message transmission types is preiodic type after event, the transmission cycle C of the CAN message is equal to should The transmission cycle of CAN message;
S504:If certain CAN message transmission types is cycle+event mode, the transmission cycle C of the CAN message is by following Formula (3) is determined:
Wherein, C is the transmission cycle of CAN message, and unit is s, c1For the transmission of the CAN message defined in communication matrix Cycle, unit is s, c2In transmission cycle when being sent for the CAN message because of event generation, estimated by 1s.
Alternatively, step S600 is specifically included:
When CAN message length is less than or equal to 8 byte, determine that the bus that CAN message takes is born using following formula (4) Load rate:
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, L For the length of the actual transmission bit stream of CAN message, unit is bit, and C is the transmission cycle of CAN message, and unit is s;
When CAN message length is more than 8 byte, the bus load that CAN message takes is determined using following formula (5) Rate:
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, ML is CAN message length, and unit is byte, and lg is the length of the actual transmission bit stream of the CAN network single frames message of 8 bytes, list Position is bit, and C is the transmission cycle of CAN message, and unit is s.
Alternatively, the CAN load factor of the whole network segment is determined based on following formula (6):
Wherein, Busload (T) is the CAN load factor of the whole network segment, BusloadiFor i-th report of the whole network segment The CAN load factor of text, n is the quantity of the CAN message of the whole network segment.
Prior art generally have ignored the shared bus load of filler transmission when calculating CAN load factor, lead Cause there is larger deviation between CAN load factor result of calculation and measured result, add project development later stage network and set Count the event risk and cost risk of change tape.A small number of CAN load factor computational methods are although it is contemplated that filler transmission Shared bus load, but its accuracy associates larger with specific vehicle, and versatility is not enough.The CAN that the present invention is provided The computational methods of total inorganic nitrogen are the bus load taken comprising CAN message data stream transmitting, and transmit institute comprising filler The bus load of occupancy, the accuracy of calculating is high.In addition, the CAN network that the computational methods are applied to any vehicle communicates, it is general Property is strong.Verified by real vehicle, the deviation < between the CAN load factor result of calculation and measured result of this computational methods ± 1%, network design quality is effectively improved, while reducing the development time, development cost is reduced, practical function is notable.
Brief description of the drawings
Fig. 1 is the flow chart of the computational methods of the CAN load factor of the present invention.
Fig. 2 is the schematic diagram of CAN standard frame formats.
Fig. 3 is the schematic diagram of CAN Extended Superframe Formats.
Fig. 4 is CAN message position filling exemplary plot.
Fig. 5 is that CAN message fills bit length simulated program flow chart.
Fig. 6 transmits exemplary plot for the CAN long messages of target complete address connection management.
Embodiment
To make the technical problem to be solved in the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and tool Body embodiment is described in detail.
The computational methods for the CAN load factor that the present invention is provided are used to bear the bus of each network segment in CAN network Load rate is calculated, and whether reasonable divides to assess the CAN network segments of vehicle.The CAN network segments number of vehicle determined based on vehicle, Generally 1-10, depending on the traffic between the quantity and each ECU of ECU in the vehicle.Each network segment has different names Claim, such as power CAN, chassis CAN, comfortable CAN.The CAN network of each vehicle can include multiple network segments, and each network segment can be with Including multiple nodes, each node can send a plurality of message, can also receive message from other nodes.
As shown in figure 1, the method calculated the total inorganic nitrogen of each network segment in CAN network that the present invention is provided It may include following steps:
S100:Judge the type of each CAN message in the network segment, and determine therefrom that the length of each potential field in CAN message data frame;
S200:The length of each potential field in CAN message data frame based on determination, determines each CAN message data flow length;
S300:Emulate the filling bit length of each CAN message;
S400:The CAN message filler determined based on the step S200 CAN message data flow length determined and step S300 Length transmits bit stream length to determine that each CAN message is actual;
S500:Judge each CAN message transmission types, and determine therefrom that the value in the transmission cycle of CAN message;
S600:Different modes is selected according to each CAN message length to determine the total inorganic nitrogen of each CAN message occupancy;
S700:The total inorganic nitrogen that each CAN message takes in the network segment is summed, to show that the CAN of the whole network segment is total Linear load rate.
This above steps is described in detail below with reference to Fig. 2 to Fig. 6.
S100:Judge the type of each CAN message in the network segment, and determine therefrom that the length of each potential field in CAN message data frame
According to the difference of identifier field length, CAN message data frame is divided into two classes:Standard frame and extension frame.Two kinds of CAN reports Literary data frame is comprising 7 predefined potential fields, respectively frame starting (SOF), arbitration field, controlling filed, data fields, cyclic redundancy Verify field (CRC), response (ACK) and frame end (EOF).Two kinds of CAN message data frame formats only arbitrate field difference, other All same.CAN standard frame formats are as shown in Fig. 2 CAN Extended Superframe Formats are as shown in Figure 3.
Every field length definition is shown in Table 1 in two kinds of CAN message data frames, and wherein data fields are by the transmission data in data frame Composition, its length is determined by the data length code (DLC) in controlling filed, can be 0~8 byte, 8 are contained per byte Position.
Every field length definition in 1 two kinds of CAN message data frames of table
S200:The length of each potential field in CAN message data frame based on determination, determines each CAN message data flow length
Each CAN message data flow length is determined based on following formula (1):
Wherein, LmFor CAN message data flow length, unit is position;LiFor i-th of potential field length of CAN message data frame, Unit is position, and value is defined referring to upper table 1.
S300:Emulate the filling bit length of each CAN message
Defined according to ISO 11898, frame starting (SOF), arbitration field, controlling filed, data fields and the cyclic redundancy of CAN message The method that verification sequence is filled by position is encoded.No matter when, as long as CAN transmitters, which are detected in bit stream, 5 continuous identifications The position of value, it is just automatic that a complementing bits is inserted in bit stream.Filling example in CAN message position is as shown in Figure 4.Intend the CAN reports of transmission Literary data flow be 010000000000111110001111 (totally 24), then use position filling after bit stream for 010000010000011111010001111 (totally 27).
In the field encoded using position filling mode, the value of some is constant all the time, is shown in Table 2.
Constant in the potential field for the method coding that table 2 is filled using position
After the definition of the communication matrix of each network segment of CAN network is completed, identifier (ID), the data length code of each message (DLC) reserved bit and in data fields is constant, only the defined signal in message data and CRC (CRC) sequence is variable, and its data flow is different with transmission information difference.According to each network segment communicating matrix, obtained by emulation Each message filling bit length is obtained, simulated program flow is as shown in Figure 5.Flow shown in Fig. 5 is the present invention to the CAN in certain network segment The flow chart of the calculating of the total inorganic nitrogen of message.The total inorganic nitrogen of other network segments in CAN network may be based on shown in Fig. 5 The flow gone out is obtained.
As shown in figure 5, after opening the CAN communication matrix file of certain network segment, first counting the CAN message quantity that the network segment is defined And be stored in after variable Nm, then the filling bit length of every message is tried to achieve one by one.
The beginning condition setting of emulation is I=1, and J=0, I is the I frame CAN messages in certain network segment, and J is simulation times.
I frame CAN message datastream functions are initially formed, the function of the function is:Defined according to the potential field of message frame Form CAN message data flow and be stored in two-dimensional array MEG1, specifically include:
(1) by the empty CAN message number for taking the fixed position information (SOF, SRR, IDE, RTR, R0, R1) that begins to add initialization According in stream.
(2) message ID and DLC and the CAN message data added after being handled through step (1) are read from communication matrix file In stream.
(3) the defined signal in message data chooses random number from its span, and reserved bit is defined as 1, And add related content in the CAN message data flow after being handled through step (2).The data fields definition of every message not phase Together, the 1st byte of such as certain message data is engine speed, and 2-3 bytes are actual torque, and remaining byte is without fixed Justice, then engine speed and actual torque are defined signal.
(4) CRC sequences are calculated according to CRC algorithm and added in the CAN message data flow after being handled through step (3).
By above-mentioned steps (1) to (4), the data flow of the CAN message can be formed.
To improve accuracy of simulation, 1000 emulation is carried out for every message, that is, has repeated above-mentioned steps (1) extremely (4), after every progress is once emulated, J plus 1, that is, assigns J=J+1, then judges whether the J values after assignment again are more than 1000, simulated program is continued executing with if it is not greater, then returning, if it is greater, then forming I frames CAN message filling bit stream Function, the function of the function is:CAN message data flow fill rule as defined in CAN protocol in MEG1 is filled shape Bit stream is filled into CAN message and is stored in 2-D data MEG2.So, by 1000 emulation, 1000 emulation CAN can be formed Message data stream.
I frames CAN message filling bit length subfunction is finally calculated, the function of the function is:Filled out with MEG2 CAN message The CAN message data flow length that bit stream length subtracts MEG1 is filled, and solves the mathematic expectaion of 1000 emulation data and is used as the CAN Message fills bit length.In this way, completing to fill the 1st frame CAN message in the network segment emulation of bit length, afterwards, I=is assigned I+1, when I is less than Nm, continues simulation flow, to be emulated to every frame CAN message filling length in the network segment, when I is more than During Nm, the network segment CAN communication matrix file is closed, terminates the emulation of the filling bit length to each CAN message of the network segment.
S400:The CAN message filler determined based on the step S200 CAN message data flow length determined and step S300 Length transmits bit stream length to determine that each CAN message is actual
Each actual transmission bit stream length of CAN message is determined by following formula (2):
#L=Lm+Lstuff (2)
Wherein, L is the length of the actual transmission bit stream of CAN message, and unit is position;LmFor the length of CAN message data flow, list Position is position (bit);LstuffFor the length of CAN message filler, unit is position.
S500:Judge each CAN message transmission types, and determine therefrom that the value in transmission cycle C of CAN message
Conventional CAN message transmission types have 4 kinds, are respectively:Preiodic type and cycle+thing after preiodic type, event mode, event Part type.
1) C is equal to the transmission cycle of the message if message transmission types are preiodic type.
If 2) message transmission types be event mode (including request when send and trigger when send two kinds), because event with Function is defined related and occurred at random, it is difficult to prediction, and its transmission frequency is relatively low in advance, to CAN load effect Less, so sending cycle C equal to empirically determined 1s calculating by message when calculating.
If 3) message transmission types are preiodic type after event, it is equal to the message by maximum computation of Period, the i.e. C of sending The transmission cycle.
If 4) message transmission types are cycle+event mode, the calculating such as formula (3) in the transmission cycle (C) of CAN message It is shown.
Wherein, C is the transmission cycle of CAN message, and unit is s, c1For the transmission of the CAN message defined in communication matrix Cycle, unit is s, c2In transmission cycle when being sent for the CAN message because of event generation, estimated by 1s.
S600:Different modes is selected according to each CAN message length to determine the total inorganic nitrogen of each CAN message occupancy
(1) when CAN message length is less than or equal to 8 byte, it can be transmitted using single frames CAN message, single frames CAN message Total inorganic nitrogen calculate as shown in formula (4).
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, L For the length of the actual transmission bit stream of CAN message, unit is bit, and C is the transmission cycle of CAN message, and unit is s.
(2) when CAN message length is more than 8 byte, the referred to as long message of CAN network.Long message can not use a list Only CAN data frames encapsulation, it is necessary to be split as several small packets, then passed one by one to it using single data frame Send.And recipient allows for receiving these single data frames, then parse each packet and reformulate raw information. Split into data fields of the single CAN data frame packets containing 8 bytes.Due to the single data of those reformulation long messages Frame is had to be recognized one by one, can correctly recombinated, therefore the first byte of data fields is defined as sequence of data packet Numbering, i.e., one CAN data frame can only at most transmit the raw information of 7 bytes.
In order to transmit a multipacket message, it is necessary to set up virtual link between sending node and receiving node.This is virtual Connection management is divided into two kinds:Specify destination address connection and the connection of target complete address.Because the connection of target complete address is not required to The management function of data traffic control and connection closed is provided, it is simple and easy to apply, so the extensive use in vehicle.
In the connection management of target complete address, if some node will broadcast a long message, it first has to transmission one Bar air announcements message (TP.CM_BAM), which is used to set up, to be connected, and it is long that the message includes the numbering for the long message that will be broadcasted, message Degree and the bag number that it is encapsulated by subpackage, the resource distributed accordingly so as to receiving node needed for reception message and reconstructed file.Then Data transfer message (TP.DT) can be used to send the data of correlation.
CAN long messages transmission example is as shown in Figure 6 in the connection management of target complete address.Sending node, which is sent out, send parameter Group # is 65260 message, and the message length is that 17 bytes are transmitted, it is necessary to be packed as 3 bags, then sends 1 first TP.CM_BAM messages set up connection, then retransmit 3 packets that 3 TP.DT messages transmission are split, as transmit length For the information of 17 bytes, need to send the CAN message that 4 length are 8 bytes altogether.
The present invention is calculated such as formula (5) institute using the total inorganic nitrogen of the CAN long messages of target complete address connection management Show.
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, ML is CAN message length, and unit is byte, and lg is the length of the actual transmission bit stream of the CAN network single frames message of 8 bytes, list Position is bit, and C is the transmission cycle of CAN message, and unit is s.
S700:The total inorganic nitrogen that each CAN message takes in the network segment is summed, to show that the CAN of the whole network segment is total Linear load rate
The CAN load factor of the whole network segment can be determined based on following formula (6):
Wherein, Busload (T) is the CAN load factor of the whole network segment, BusloadiFor i-th report of the whole network segment The CAN load factor of text, n is the quantity of the CAN message of the whole network segment.
【Embodiment】
Network segment communicating speed in the present embodiment is 250Kbit/s, and its CAN communication matrix is shown in Table 3, wherein each CAN message Data fields content it is defined, without reserved bit.Wherein " S " represents to send, and " R " represents to receive.
The network segment CAN communication matrix of table 3
As shown in Table 3,3 messages, respectively M1, M2 and M3, the CAN of the network segment are had in the network segment of the present embodiment The calculation procedure of load factor is as follows:
1. judging each CAN message type, and determine therefrom that every field length in CAN message data frame.
Message M1 is standard frame, and it is 12 that it, which arbitrates field,;Message M1 length is 6 bytes, and its data fields is 48.
Message M2 is extension frame, and it is 32 that it, which arbitrates field,;Message M2 length is 8 bytes, and its data fields is 64.
Message M3 is extension frame, and it is 32 that it, which arbitrates field,;Message M3 length is 30 bytes, because message length (30 byte) More than 8 bytes, so needing to use host-host protocol to be split as some small packets, the length of each packet is 8 words Section.For M3, this step calculates the length of the small data packets after splitting, and its data fields is 64.
The potential field length of each message is shown in Table 4 in the network segment of the present embodiment.
Each message potential field length in the network segment of table 4
2. calculate each CAN message data flow length.
Available, the message M1 data flow length L using above-mentioned formula (1)m=92;Message M2 data flow length Lm= 128;The data flow length L of small data packets after message M3 fractionationsm=128.
3. each CAN message filling bit length of emulation.
The emulation of bit length simulated program is filled according to above-mentioned steps S300 CAN message to try to achieve:Message M1 filling bit length Spend Lstuff=13;Message M2 filling bit length Lstuff=19;The filling bit length L of TP messages after message M3 fractionationsstuff It is worth for 20.
4. calculating the actual transmission bit stream length of each CAN message, the length is CAN message data flow length and filling bit length Sum.
Available, the message M1 actual transmission bit stream length L=105 according to above-mentioned formula (2);Message M2 actual transmission Bit stream length L=147;The actual transmission bit stream length average of TP messages after message M3 fractionations is the CAN nets of 148, i.e. 8 bytes The length lg=148 of the actual transmission bit stream of network single frames message.
5. judging each CAN message transmission types, and determine therefrom that the value in the transmission cycle (C) of CAN message.
Message M1 transmission types are event+preiodic type, and the transmission cycle of its CAN message is calculated using above-mentioned formula (3).Its Middle C1=1000ms=1s, C2=1s,
Message M2 transmission types are preiodic type, then C=20ms=0.02s.
Message M3 transmission types are preiodic type after event, then C=100ms=0.1s.
6. different CAN load factor calculation formula are selected according to CAN message length.
Message M1 message length is less than or equal to 8 bytes, calculates its total inorganic nitrogen using above-mentioned formula (4), its bus Load factor Bussload1For:
Message M2 message length is less than or equal to 8 bytes, calculates its total inorganic nitrogen using above-mentioned formula (4), its bus Load factor Bussload2For:
Message M3 message length is more than 8 bytes, calculates its total inorganic nitrogen using above-mentioned formula (5), its bus load Rate Bussload3For:
7. the total inorganic nitrogen summation that each CAN message takes in pair network segment, is loaded with the CAN for drawing the whole network segment Rate.
Understood according to above-mentioned formula (6), the CAN load factor Bussload of the whole network segmentTFor message M1, M2 and M3 Total inorganic nitrogen sum, i.e. BussloadT=0.08%+2.87%+3.47%=6.42%.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art For, on the premise of principle of the present invention is not departed from, some improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (8)

1. a kind of computational methods of CAN load factor, it is characterised in that for the bus to each network segment in CAN network Load factor is calculated, and the calculating of the total inorganic nitrogen of each network segment comprises the following steps:
S100:Judge the type of each CAN message in the network segment, and determine therefrom that the length of each potential field in CAN message data frame;
S200:The length of each potential field in CAN message data frame based on determination, determines each CAN message data flow length;
S300:Emulate the filling bit length of each CAN message;
S400:Bit length is filled based on the step S200 CAN message data flow length determined and step the S300 CAN message determined To determine the actual transmission bit stream length of each CAN message;
S500:Judge each CAN message transmission types, and determine therefrom that the value in the transmission cycle of CAN message;
S600:Different modes is selected according to each CAN message length to determine the total inorganic nitrogen of each CAN message occupancy;
S700:The total inorganic nitrogen that each CAN message takes in the network segment is summed, born with the CAN for drawing the whole network segment Load rate.
2. the computational methods of CAN load factor according to claim 1, it is characterised in that each CAN message data Length is flowed to determine based on following formula (1):
L m = Σ i = 1 7 L i - - - ( 1 )
Wherein, LmFor CAN message data flow length, unit is position;LiFor i-th of potential field length of CAN message data frame, unit For bit;
The actual transmission bit stream length of each CAN message is determined by following formula (2):
#L=Lm+Lstuff (2)
Wherein, L is the length of the actual transmission bit stream of CAN message, and unit is bit;LstuffFor the length of CAN message filler, list Position is bit.
3. the computational methods of CAN load factor according to claim 2, it is characterised in that to each in step S300 The emulation of the filling bit length of CAN message comprises the following steps:
S301:The potential field of CAN message frame in the communication matrix file of the network segment defines to form CAN message data flow and store In two-dimensional array MEG1;
S302:CAN message data flow fill rule as defined in CAN protocol in MEG1 is filled and to form CAN message and fills out Fill bit stream and be stored in 2-D data MEG2;
S303:The CAN message data flow length for subtracting MEG1 with MEG2 CAN message filling bit stream length is tried to achieve CAN message and filled out Fill bit length.
4. the computational methods of CAN load factor according to claim 3, it is characterised in that step S301 is specifically included:
(1) SOF, SRR, IDE, RTR, R0, R1 that the fixed position information that begins is taken in CAN message frame are added into empty CAN message number According in stream;
(2) CAN message that the ID and DLC of message are read from the communication matrix file of the network segment and is added after being handled through step (1) In data flow;
(3) the defined signal in CAN message data fields chooses random number from its span, and reserved bit is defined as 1, and Related content is added in the CAN message data flow after being handled through step (2);
(4) CRC sequences are calculated according to CRC algorithm and added in the CAN message data flow after being handled through step (3).
5. the computational methods of CAN load factor according to claim 4, it is characterised in that
The operation (1) in step S301 is repeated to (4) 1000 times, to form 1000 emulation CAN message data flows;
In step S303, to the filling bit length of 1000 CAN messages obtained by 1000 emulation CAN message data flows The mathematic expectaions of emulation data solved, using solving result as the CAN message of emulation filling bit length.
6. the computational methods of CAN load factor according to claim 1, it is characterised in that step S500 is specifically included:
S501:If certain CAN message transmission types is preiodic type, transmission cycle C of the CAN message is equal to the transmission of the message Cycle;
S502:If certain CAN message transmission types is event mode, the CAN message sends cycle C and takes 1s;
S503:If certain CAN message transmission types is preiodic type after event, the transmission cycle C of the CAN message is equal to the CAN The transmission cycle of message;
S504:If certain CAN message transmission types is cycle+event mode, the transmission cycle C of the CAN message presses following formula (3) determine:
C = 1 1 c 1 + 1 c 2 - - - ( 3 )
Wherein, C is the transmission cycle of CAN message, and unit is s, c1For the transmission cycle of the CAN message defined in communication matrix, Unit is s, c2In transmission cycle when being sent for the CAN message because of event generation, estimated by 1s.
7. the computational methods of CAN load factor according to claim 1, it is characterised in that step S600 is specifically included:
When CAN message length is less than or equal to 8 byte, the bus load that CAN message takes is determined using following formula (4) Rate:
B u s s l o a d = L B a u d * c * 100 % - - - ( 4 )
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, and L is The length of the actual transmission bit stream of CAN message, unit is bit, and C is the transmission cycle of CAN message, and unit is s;
When CAN message length is more than 8 byte, the total inorganic nitrogen that CAN message takes is determined using following formula (5):
B u s s l o a d = ( 1 + C e i l ( M L 7 ) ) * I s B a u d * c * 100 % - - - ( 5 )
Wherein, Busload is the total inorganic nitrogen of CAN message, and Baud is CAN network traffic rate, and unit is bit/s, and ML is CAN message length, unit is byte, and lg is the length of the actual transmission bit stream of the CAN network single frames message of 8 bytes, and unit is Bit, C are the transmission cycle of CAN message, and unit is s.
8. the computational methods of CAN load factor according to claim 7, it is characterised in that the CAN of the whole network segment Load factor is determined based on following formula (6):
B u s s l o a d ( T ) = Σ i = 1 n Bussload i - - - ( 6 )
Wherein, Busload (T) is the CAN load factor of the whole network segment, BusloadiFor i-th message of the whole network segment CAN load factor, n is the quantity of the CAN message of the whole network segment.
CN201710150546.9A 2017-03-14 2017-03-14 Method for calculating load rate of CAN bus Active CN106992879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710150546.9A CN106992879B (en) 2017-03-14 2017-03-14 Method for calculating load rate of CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710150546.9A CN106992879B (en) 2017-03-14 2017-03-14 Method for calculating load rate of CAN bus

Publications (2)

Publication Number Publication Date
CN106992879A true CN106992879A (en) 2017-07-28
CN106992879B CN106992879B (en) 2020-09-18

Family

ID=59411631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710150546.9A Active CN106992879B (en) 2017-03-14 2017-03-14 Method for calculating load rate of CAN bus

Country Status (1)

Country Link
CN (1) CN106992879B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110011888A (en) * 2019-04-17 2019-07-12 珠海广通汽车有限公司 A kind of modular CAN network load factor optimization method and device
CN110808894A (en) * 2019-11-05 2020-02-18 东软睿驰汽车技术(沈阳)有限公司 Data transmission method and device based on CAN bus
CN111211954A (en) * 2019-12-04 2020-05-29 一汽解放汽车有限公司 Method and device for determining load rate of CANFD bus
CN111245776A (en) * 2019-10-10 2020-06-05 中国第一汽车股份有限公司 Vehicle-mounted data transmission method, device, equipment and storage medium
CN111327499A (en) * 2018-12-14 2020-06-23 北京宝沃汽车有限公司 Method and device for sending message and automobile
CN111464396A (en) * 2020-04-02 2020-07-28 昆易电子科技(上海)有限公司 CAN bus load rate abnormity early warning method and electronic equipment
CN112009531A (en) * 2020-09-09 2020-12-01 株洲中车时代电气股份有限公司 Train data transmission method for initial operation of self-adaptive stranded wire type train bus and computer readable medium
CN112087418A (en) * 2020-07-23 2020-12-15 北京经纬恒润科技股份有限公司 Method and device for calculating message data filling bits
CN112187605A (en) * 2020-09-30 2021-01-05 西安热工研究院有限公司 Method for calculating PROFIBUS-DPV0 bus load rate
CN114422293A (en) * 2022-02-21 2022-04-29 重庆长安汽车股份有限公司 CAN bus communication quality optimization method and storage medium
CN114500155A (en) * 2022-02-14 2022-05-13 奇瑞商用车(安徽)有限公司 CANFD bus load rate calculation method
CN114827046A (en) * 2022-03-22 2022-07-29 西北工业大学 Bus load rate processing method and device and computer readable storage medium
CN115242575A (en) * 2021-04-22 2022-10-25 广州汽车集团股份有限公司 CANFD network-based message processing method, device, equipment and storage medium
CN115633044A (en) * 2022-07-20 2023-01-20 广州汽车集团股份有限公司 Message processing method and device, electronic equipment and storage medium
CN115664887A (en) * 2022-10-20 2023-01-31 东风汽车股份有限公司 Method for calculating load rate of CAN bus of whole vehicle
CN115967656A (en) * 2022-12-22 2023-04-14 阿维塔科技(重庆)有限公司 Load rate determining method and device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070008904A1 (en) * 2005-06-09 2007-01-11 Ramesh P E Controller area network performance parameters measurement
CN104378260A (en) * 2014-11-18 2015-02-25 中联重科股份有限公司 CAN bus load rate testing method, device and system
CN105141447A (en) * 2015-07-28 2015-12-09 湖南三一智能控制设备有限公司 CAN (Controller Area Network) bus load rate monitoring method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070008904A1 (en) * 2005-06-09 2007-01-11 Ramesh P E Controller area network performance parameters measurement
CN104378260A (en) * 2014-11-18 2015-02-25 中联重科股份有限公司 CAN bus load rate testing method, device and system
CN105141447A (en) * 2015-07-28 2015-12-09 湖南三一智能控制设备有限公司 CAN (Controller Area Network) bus load rate monitoring method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张丽波等: "基于数理统计的商用车CAN网络总线负载率预测研究", 《2016中国汽车工程学会年会论文集》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327499A (en) * 2018-12-14 2020-06-23 北京宝沃汽车有限公司 Method and device for sending message and automobile
CN110011888A (en) * 2019-04-17 2019-07-12 珠海广通汽车有限公司 A kind of modular CAN network load factor optimization method and device
CN110011888B (en) * 2019-04-17 2023-05-19 珠海广通汽车有限公司 Modularized CAN network load rate optimization method and device
CN111245776A (en) * 2019-10-10 2020-06-05 中国第一汽车股份有限公司 Vehicle-mounted data transmission method, device, equipment and storage medium
CN110808894B (en) * 2019-11-05 2021-08-31 东软睿驰汽车技术(沈阳)有限公司 Data transmission method and device based on CAN bus
CN110808894A (en) * 2019-11-05 2020-02-18 东软睿驰汽车技术(沈阳)有限公司 Data transmission method and device based on CAN bus
CN111211954A (en) * 2019-12-04 2020-05-29 一汽解放汽车有限公司 Method and device for determining load rate of CANFD bus
CN111211954B (en) * 2019-12-04 2021-11-12 一汽解放汽车有限公司 Method and device for determining load rate of CANFD bus
CN111464396A (en) * 2020-04-02 2020-07-28 昆易电子科技(上海)有限公司 CAN bus load rate abnormity early warning method and electronic equipment
CN112087418B (en) * 2020-07-23 2022-08-09 北京经纬恒润科技股份有限公司 Method and device for calculating message data filling bits
CN112087418A (en) * 2020-07-23 2020-12-15 北京经纬恒润科技股份有限公司 Method and device for calculating message data filling bits
CN112009531A (en) * 2020-09-09 2020-12-01 株洲中车时代电气股份有限公司 Train data transmission method for initial operation of self-adaptive stranded wire type train bus and computer readable medium
CN112009531B (en) * 2020-09-09 2021-10-22 株洲中车时代电气股份有限公司 Train data transmission method for initial operation of self-adaptive stranded wire type train bus and computer readable medium
CN112187605A (en) * 2020-09-30 2021-01-05 西安热工研究院有限公司 Method for calculating PROFIBUS-DPV0 bus load rate
CN115242575A (en) * 2021-04-22 2022-10-25 广州汽车集团股份有限公司 CANFD network-based message processing method, device, equipment and storage medium
CN115242575B (en) * 2021-04-22 2023-10-03 广州汽车集团股份有限公司 Packet processing method, device, equipment and storage medium based on CANFD network
CN114500155A (en) * 2022-02-14 2022-05-13 奇瑞商用车(安徽)有限公司 CANFD bus load rate calculation method
CN114500155B (en) * 2022-02-14 2024-04-05 奇瑞商用车(安徽)有限公司 CANFD bus load rate calculation method
CN114422293A (en) * 2022-02-21 2022-04-29 重庆长安汽车股份有限公司 CAN bus communication quality optimization method and storage medium
CN114422293B (en) * 2022-02-21 2023-03-31 重庆长安汽车股份有限公司 CAN bus communication quality optimization method and storage medium
CN114827046A (en) * 2022-03-22 2022-07-29 西北工业大学 Bus load rate processing method and device and computer readable storage medium
CN115633044A (en) * 2022-07-20 2023-01-20 广州汽车集团股份有限公司 Message processing method and device, electronic equipment and storage medium
CN115633044B (en) * 2022-07-20 2024-01-19 广州汽车集团股份有限公司 Message processing method and device, electronic equipment and storage medium
CN115664887A (en) * 2022-10-20 2023-01-31 东风汽车股份有限公司 Method for calculating load rate of CAN bus of whole vehicle
CN115967656A (en) * 2022-12-22 2023-04-14 阿维塔科技(重庆)有限公司 Load rate determining method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN106992879B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN106992879A (en) A kind of computational methods of CAN load factor
Lin et al. WSN01-1: frame aggregation and optimal frame size adaptation for IEEE 802.11 n WLANs
EP3703316B1 (en) Frame aggregation in a wireless network
CN102696181B (en) Method and apparatus for generating, transmitting, and receiving a data frame in a wireless communication system
Zhai et al. Performance of wireless LANs based on IEEE 802.11 MAC protocols
CN109479213A (en) Support the user equipment and method of data prediction
CN102497649B (en) Satellite network route establishing method based on reliability assurance
CN105024940A (en) Link adaptation-based heterogeneous network TCP congestion control method
CN106102084B (en) Wireless sensor network end-to-end time delay upper bound appraisal procedure based on retransmission feedback
Deinlein et al. 5G-Sim-V2I/N: towards a simulation framework for the evaluation of 5G V2I/V2N use cases
Arif et al. Evaluation of the Minstrel-HT Rate Adaptation Algorithm in IEEE 802.11 n WLANs.
CN110312226A (en) Transmit the method and communication device of data
Park et al. An extended TCP/IP protocol for real-time local area networks
Kafetzakis et al. A novel effective capacity-based framework for providing statistical QoS guarantees in IEEE 802.11 WLANs
CN105007596A (en) Method for designing WSANs (Wireless Sensor and Actuator Networks) packet loss decision device based on QoS (Quality of Service)
CN111147514A (en) Communication frame suitable for real-time Ethernet session layer and design method
CN102088715B (en) Packet segmentation method and equipment
Miorandi et al. A wireless extension of Profibus DP based on the Bluetooth radio system
Yokotani et al. Proposals for packet processing and performance evaluation of IoT devices
Rezha et al. Extending CAN bus with ISA100. 11a wireless network
CN108196917A (en) The data-interface adaptation method of heavy haul train dynamics simulation software
CN106911807B (en) A kind of vehicle-mounted CAN FD network design space search methods perceived safely
CN111601343B (en) Frame aggregation method, terminal device and computer storage medium
Alonso et al. Throughput of self-organizing time division multiple access MAC layer for vehicular networks based on measured SNR time-series
Bakhtin et al. Control traffic transmission period minimization for routing in resource constrained MANET

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