CN116055248A - Message transmission time prediction method for automobile CANFD network - Google Patents
Message transmission time prediction method for automobile CANFD network Download PDFInfo
- Publication number
- CN116055248A CN116055248A CN202310073116.7A CN202310073116A CN116055248A CN 116055248 A CN116055248 A CN 116055248A CN 202310073116 A CN202310073116 A CN 202310073116A CN 116055248 A CN116055248 A CN 116055248A
- Authority
- CN
- China
- Prior art keywords
- message
- transmission
- network
- weight ratio
- bit
- 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.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 200
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000004044 response Effects 0.000 claims abstract description 16
- 239000011159 matrix material Substances 0.000 claims description 34
- 239000010410 layer Substances 0.000 claims description 33
- 239000002356 single layer Substances 0.000 claims description 16
- 239000013598 vector Substances 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000010276 construction Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 7
- 238000004458 analytical method Methods 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 claims description 6
- 102000009142 CRC domains Human genes 0.000 claims description 3
- 108050000006 CRC domains Proteins 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 238000013461 design Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 239000002355 dual-layer Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40143—Bus networks involving priority mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/147—Network analysis or design for predicting network behaviour
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to a message transmission time prediction method for an automobile CANFD network, which belongs to the field of automobile control networks and comprises the following steps: s1: analyzing network characteristics according to the network topology structure and node transmission characteristics, network transmission messages and signal quantity, constructing a double-layer CANFD network message transmission model, and calculating the weight ratio of each transmission logic of the message; s2: constructing a binary sequence model, calculating the filling bit distribution mean value of the message to obtain single message transmission time, and estimating the network message transmission time according to the single message transmission time and the weight ratio of each transmission logic of the message. The invention calculates the average value of the message transmission time by optimizing the logic weight ratio of each message transmission, thereby realizing the prediction of the message transmission time, calculating the worst response time and improving the network utilization rate.
Description
Technical Field
The invention belongs to the field of automobile control networks, and relates to a message transmission time prediction method for an automobile CANFD network.
Background
The CAN bus is the most commonly used communication mode in the vehicle bus, while the CANFD network is relatively early developed, in consideration of the problems of hardware cost, architecture updating iteration and the like, CANFD is also recently used in intelligent network-connected automobiles, and the aim is to expand functions of network equipment in the vehicle and increase bandwidth and transmission speed of the network under the new function of network-connected automobiles. With the increase of new functions of intelligent network-connected automobiles, the requirements on the communication instantaneity and stability among ECUs are more severe, and when new functions are added by automobile part suppliers and whole factories, reverse development design is often adopted for saving cost, and after new messages are added in an old network, the communication performance of the network is verified.
ECU communication under the new function of the network-connected automobile has higher and higher requirements on real-time performance and stability, and the mutual influence among the ECU communication is not considered from the system angle by the method, so that potential design defects of a network communication matrix are difficult to find in a design simulation stage. When all changes are loaded to the vehicle-mounted network, a new communication protocol needs to be released in a development stage, and in the process, the real-time performance of the system is directly or indirectly influenced, and the potential design defect may cause the reduction of the real-time performance of the network, so that the control requirement of the vehicle network cannot be met, a certain function cannot be realized or is invalid, and the stability of the network is influenced.
Disclosure of Invention
Therefore, the present invention aims to provide a message transmission time estimation method for an automotive CANFD network, which constructs a message transmission model of a double-layer CANFD network, calculates the weight ratio of each transmission logic of a message, estimates the transmission time of the message in the transmission model, and improves the utilization rate of the network.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a message transmission time prediction method for an automobile CANFD network comprises the following steps:
s1: analyzing network characteristics according to the network topology structure and node transmission characteristics, network transmission messages and signal quantity, constructing a double-layer CANFD network message transmission model, and calculating the weight ratio of each transmission logic of the message;
s2: constructing a binary sequence model, calculating the filling bit distribution mean value of the message to obtain single message transmission time, and estimating the network message transmission time according to the single message transmission time and the weight ratio of each transmission logic of the message.
Further, the network layer transmission logic is divided into E according to the network topology structure i Seed, i is 1 to 5, E 1 For internal transmission of network segments, E 2 For single layer network to single layer network transmission, E 3 For single-layer network to double-layer network transmission, E 4 For transmission of a double-layer network to a single-layer network, E 5 Transmitting the double-layer network to the double-layer network;
dividing network layer transmission logic into F according to node transmission characteristics j Seed, j is 1 to 4,F 1 For single-node to single-node transmission, F 2 For single-node to multi-node transmission, F 3 For multi-node to single-node transmission, F 4 For multi-node to multi-node transmissions.
Further, E i The weight ratio of the seed transmission logic is valued by adopting a hierarchical analysis method according to F j Class message importance level, constructing a judgment matrix A and calculating F j The weight ratio of the class message in the network; according to E i Seed message pair F j Importance level of class message and construction of judgment matrix B j For F 1 ,F 2 ,F 3 ,F 4 Sequentially constructing a judgment matrix B 1 ,B 2 ,B 3 ,B 4 Calculate E i Seed message relative to F j Weight ratio of class message, and obtaining E in network by approximate solution of eigenvector of judgment matrix i Weight ratio of transmission logic.
Further, the step S1 specifically includes the following steps:
s11: construction F j Relationship judgment matrix of class transmission message: the transmission types are compared pairwise to obtain an importance scale a of each transmission type αβ α, β=1, 2,3,4, constructing a judgment matrix a:
wherein the first column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 1 A scale of importance of the phase comparison; the second column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 2 A scale of importance of the phase comparison; the third column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 3 A scale of importance of the phase comparison; the fourth column of vectors represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 4 A scale of importance of the phase comparison;
s12: find F j Weight ratio of class transmission messages in the network: each column vector of the judgment matrix A is normalized,obtaining the element a' αβ For a' by summing the rows:obtain W= [ W ] 1 W 2 W 3 W 4 ] T Wherein W is 1 Represents F 1 ,F 2 ,F 3 ,F 4 Class transmission mode and F 1 The sum of the importance ratio of class phase ratio is normalized to the vector W>Obtaining a eigenvector approximation solution W A =[W 1 A W 2 A W 3 A W 4 A ] T Is F of j Weight ratio, W, of class messages in network 1 A ,W 2 A ,W 3 A ,W 4 A Respectively represent F 1 ,F 2 ,F 3 ,F 4 The weight ratio of the class message transmission mode;
s13: build pair F j Class messages, E i Relation judgment matrix B for seed transmission message j The method comprises the steps of carrying out a first treatment on the surface of the Wherein the matrix B is determined 1 For F 1 Class transfer messages, E i The importance of the seed transmission logic is compared in pairs, including judging the scale b xy X, y=1, 2,3,4,5, the importance increases sequentially from 1 to 5, the value is selected according to the network characteristic; same reason pair F 2 、F 3 、F 4 Class message sequentially constructing judgment matrix B 2 ,B 3 ,B 4 ;
S14: e is calculated i Seed transport message relative to F j Weight ratio of classes, solving matrix B j Is a eigenvector approximation solution of (2)Wherein->Respectively for F j In other words, E 1 ~E 5 The weight ratio of the seed transmission message;
s15: according to F j Weight ratio W of class transmission message in network A ,E i Seed transport message relative to F j Weight ratio of classesObtaining E i Weight ratio of the seed message transmission logic, wherein +.>Respectively represent E 1 ,E 2 ,E 3 ,E 4 ,E 5 Weight ratio of message transmission logic: />
Further, when the transmitting node detects 5 bit streams of the same polarity in the transmitted bit stream, inserting a bit of opposite polarity as a padding; the average value of the filling bit number distribution is the byte length L of the data field g When the values are different, the distribution mean value of the message filling numberIn a Canfd network standard frame, the bits involved in padding include a frame start, an arbitration field, a control field, a data field, a CRC field, and a length of (43+8l g )/(47+8L g ) A bit; message bit number->After adding the padding bit number, the total bit number of the message +.>
Further, the estimating the network message transmission time in step S2 specifically includes the following steps:
s21: construction of binary sequence model to G (S f D) from a binary sequence S of M d bits f (f∈[1,M]) The composition M is a random number greater than 10000; the binary sequence consists of a series of data messages, and comprises a frame start, an arbitration domain, a control domain, a data domain, a CRC domain, a response field and a frame end of the messages;
s22: determining the value of a binary sequence model data message, wherein a frame start bit, a remote transmission request bit, an identifier extension bit, a CANFD format mark, a reserved bit, a bit rate switch and an error state mark are all dominant, and the value is 0;
s23: generating a binary sequence;
s24: the probability lambda of the number of padding bits N is counted N ,λ N Obeying normal distribution; the method comprises two cases, wherein the first case participates in filling 43+8Lg bits in total, and the filling bit numberByte length L of data field g G is 0-64, which means that the data field length of the message is 0-64 bytes; the second case, where the transmission byte exceeds 16 bytes, has a CRC of 21 bits, taking part in the padding for a total of 47+8L g Bit, fill bit->To sum up->Respectively counting data field byte length L g The probability lambda of the message stuffing digit when 0-64 bytes N ;
S25: calculating the mean value of the filling bit distribution According to the probability distribution of the filling bit number, the filling bit number average value +.>Number of bits per binary sequence data message +.>After adding the filling bit number average value, the total bit number of the message is +.>CANFD employs two bit rates: the BRS bit in the control field to the ACK field are variable rate, the rest of the message is the rate for the original CAN bus, and tau is used c To represent variable rate, denoted by τ f To represent fixed rate, then the message transmission time average valueWherein d' c Bit number, d 'representing variable rate' f The number of bits of the message representing the fixed rate,and d '=d' c +d' f ;
S26: calculation E i The weight ratio of the seed message transmission logic; adopting a layering analysis method to select E i The optimal weight ratio of the seed transmission logic;
s27: estimating the transmission time of a network control process message;
s28: the padding bits increase the maximum transmission time of the CANFD message assuming a total number of bits C for the worst message transmission for message frame m m ThenSegment calculation of 16 bytes of data field, with default Canfd data field having bytes greater than 16, i.e. L g More than or equal to 16, the CRC field of the CRC field is 26 bits; knowing the worst total number of bits in the CANFD message, the worst transmission time of the message is determined based on the two variable rates defined in S25Wherein->The function representation returns the maximum integer less than or equal to a/b, resulting in t= (39+10l) g )τ c +(31)τ f The method comprises the steps of carrying out a first treatment on the surface of the Calculating worst response time R according to worst transmission time T i 。
Further, step S29 calculates worst response time R according to worst transmission time T i Comprising the following steps:
s291: first selecting a single message frame m from a collection of message frames that requires calculation of the worst response time i 。
S292: at the time of selecting message frame m i Then, it is necessary to calculate that the priority is not higher than the message frame m i Blocking time caused by other frames of (a) and recording m i Time of blocking B i 。
S293: establishing arbitration sets, i.e. message frames m i At the wait time B i After the blocking time, arbitrating with other frames in the set.
At the mostIn bad case, all message frames in the set have priority over message frame m i Is of high priority and therefore is involved in and in message frame m i Is to be used in the future). In message frame m i Before sending out, it is recorded how many times other frames with high priority are sent out respectively.
S294: according to CANFD's arbitration principle, the smaller the ID, the higher the priority, and then the minimum ID frame needs to be picked, meaning that the minimum ID frame will win arbitration. The transmission time T of the minimum ID frame on the bus is then calculated next. At this time if the minimum ID frame is exactly message frame m i Then certify message frame m i Winning arbitration and sending successful, terminating the loop and returning time B, which has been waiting i At this time B i I.e. message frame m i Is the worst response time of (a).
S295: if the minimum ID frame is not message frame m i Then describe message frame m i Failed in participating in the arbitration of this round, then loop is returned, m i And continuing to wait for the next bus to be idle and then participating in arbitration again.
S296: finally, deleting the successful message frame in the aggregate frame, judging whether each high priority frame has entered the next period to need to be transmitted again, and if so, re-joining the arbitration aggregate to perform arbitration.
The invention has the beneficial effects that: the invention calculates the average value of the message transmission time by optimizing the logic weight ratio of each message transmission, thereby realizing the prediction of the message transmission time, calculating the worst response time and improving the network utilization rate.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and other advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the specification.
Drawings
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in the following preferred detail with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of the internal message transmission logic of the network segment according to the present invention;
fig. 2 is a schematic diagram of message transmission logic of a single layer network to a single layer network according to the present invention;
FIG. 3 is a schematic diagram of message transmission logic of a single layer network to a multi-layer network according to the present invention;
FIG. 4 is a schematic diagram of message transmission logic of a multi-layer network to a single-layer network according to the present invention;
FIG. 5 is a schematic diagram of message transmission logic from a multi-layer network to a multi-layer network according to the present invention;
FIG. 6 is a graph of the calculation E according to the present invention i A service flow chart of the seed message transmission logic weight ratio;
FIG. 7 is a flow chart of a process for estimating the transmission time of a CANFD standard frame message according to the present invention;
fig. 8 is a worst case of bit stuffing.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to limit the invention; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numbers in the drawings of embodiments of the invention correspond to the same or similar components; in the description of the present invention, it should be understood that, if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc., that indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, it is only for convenience of describing the present invention and simplifying the description, but not for indicating or suggesting that the referred device or element must have a specific azimuth, be constructed and operated in a specific azimuth, so that the terms describing the positional relationship in the drawings are merely for exemplary illustration and should not be construed as limiting the present invention, and that the specific meaning of the above terms may be understood by those of ordinary skill in the art according to the specific circumstances.
The invention constructs a message transmission model of a double-layer CANFD network, and supposes that a first layer of CANFD network is called network CANFD1, a second layer of CANFD network is called network CANFD2, and the two layers of networks are formed by gateway connection. The transmission bandwidth of the network ranges from 1 Mbps to 5Mbps, the specific transmission bandwidth is determined according to the network characteristics, and each layer of network comprises n nodes respectively.
The dual-layer CANFD network message transmission model can be divided into E according to the network topology i A seed network layer transmission logic; according to the node transmission characteristics, can be divided into F j Class transmission type.
Fig. 1 is a schematic diagram of internal message transmission logic of a network segment.
As shown in FIG. 1, the packet of network CANFD1 returns to CANFD1 through the gateway, E 1 A seed network layer transmission logic; wherein comprises F 1 Class single node to single node transmission, F 2 Class single node to multi-node transmission, F 3 Quasi-multi-node to single node transmission, F 4 The message is transmitted by quasi-multi-node to multi-node.
Fig. 2 is a schematic diagram of message transmission logic of a single layer network to a single layer network.
As shown in FIG. 2, the message of network CANFD1 is transmitted to network CANFD2 through gateway, which is E 2 A seed network layer transmission logic; wherein comprises F 1 Class single node to single node transmission, F 2 Quasi-single node to multi-node transmission,F 3 Quasi-multi-node to single node transmission, F 4 The message is transmitted by quasi-multi-node to multi-node.
Fig. 3 is a schematic diagram of message transmission logic of a single layer network to a dual layer network.
As shown in FIG. 3, the message of network CANFD1 is transmitted to two networks CANFD1 and CANFD2, which are E 3 A seed network layer transmission logic; wherein comprises F 2 Class single node to multi-node transmission, F 4 The message is transmitted by quasi-multi-node to multi-node.
Fig. 4 is a schematic diagram of message transmission logic of a multi-layer network to a single-layer network.
As shown in FIG. 4, the messages of networks CANFD1 and CANFD2 are analyzed by gateway processing to obtain a new message which is transmitted to CANFD1, which is E 4 A seed network layer transmission logic; wherein comprises F 3 Quasi-multi-node to single node transmission, F 4 The message is transmitted by quasi-multi-node to multi-node.
Fig. 5 is a schematic diagram of message transmission logic of a multi-layer network to a multi-layer network.
As shown in FIG. 5, the messages of networks CANFD1 and CANFD2 are processed by the gateway to obtain new messages which are transmitted to CANFD1 and CANFD2, respectively, E 5 A seed network layer transmission logic; wherein only F is 4 The message is transmitted by quasi-multi-node to multi-node.
FIG. 6 is calculation E i A service flow chart of message transmission logic weight ratio. As shown in fig. 6, the specific steps are as follows:
F as shown in Table 1 j Importance comparison table for class transmission type, which compares transmission types in pairs, e.g. F 1 Class transmission mode and F 2 The importance scale is a compared with the transmission mode 12 The method comprises the steps of carrying out a first treatment on the surface of the Then F 2 Class transmission mode ratio F 1 The importance scale is a compared with the transmission mode 21 =1/a 12 The method comprises the steps of carrying out a first treatment on the surface of the Wherein a is αβ (α, β=1, 2,3, 4) is a judgment scale, taking 1 to 4, the importance of which increases sequentially from 1 to 4, and the specific value is selected according to the network characteristics.
TABLE 1
And constructing a judgment matrix A according to the relation of transmission type importance comparison.
Step 2, find F j Weight ratio of class transmission messages in the network.
The first column vector of the judgment matrix A represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 1 In contrast, its importance is scaled. Each column vector of the judgment matrix A is normalized,obtaining the element a' αβ For a' by summing the rows: />Obtain W= [ W ] 1 W 2 W 3 W 4 ] T Wherein W is 1 Represents F 1 ,F 2 ,F 3 ,F 4 Class transmission mode and F 1 Class-to-importance ratio. Normalization of vector W>Obtaining a eigenvector approximation solution W A =[W 1 A W 2 A W 3 A W 4 A ] T Is F of j Weight ratio, W, of class messages in network 1 A ,W 2 A ,W 3 A ,W 4 A Respectively represent F 1 ,F 2 ,F 3 ,F 4 Weight ratio of class message transmission mode.
Step 3, constructBuild pair F j Class messages, E i Relation judgment matrix B for seed transmission message j (j=1, 2,3, 4). For example, F 1 Class transfer messages, E i The importance of five kinds of transmission logics are compared in pairs to construct a judgment matrix B 1 . Such as E 1 Seed transmission mode and E 2 The importance scale is b compared with the transmission mode 12 The method comprises the steps of carrying out a first treatment on the surface of the Then E 2 Seed transmission mode ratio E 1 The importance scale is b compared with the transmission mode 21 =1/b 12 The method comprises the steps of carrying out a first treatment on the surface of the Wherein b xy (x, y=1, 2,3,4, 5) is a judgment scale, 1 to 5 is taken, the importance of 1 to 5 is increased in sequence, and the specific value is selected according to the network characteristics.
TABLE 2
Transmission logic | E 1 | E 2 | E 3 | E 4 | E 5 |
E 1 | 1 | b 12 | b 13 | b 14 | b 15 |
E 2 | b 21 | 1 | B 23 | b 24 | b 25 |
E 3 | b 31 | b 32 | 1 | b 34 | b 35 |
E 4 | b 41 | b 42 | B 43 | 1 | b 45 |
E 5 | b 51 | b 52 | b 53 | b 54 | 1 |
Constructing a judgment matrix B according to the relation of transmission logic importance degree comparison 1 。
Repeating the step 3 for F 2 、F 3 、F 4 Class message sequentially constructing judgment matrix B 2 ,B 3 ,B 4 。
Step 4, solving E i Seed transport message relative to F j Weight ratio of classes. Repeating the step 2, and sequentially solving the matrix B j Is a eigenvector approximation solution of (2)Such as matrix B 1 Is an approximation solution to the calculated eigenvector of (2)Respectively for F 1 Class messages, E i Weight ratio of transmission message.
Step 5, calculating E i Weight ratio of message transmission logic. According to F in step 2 j Weight ratio W of class message in network A Step 4E i Seed transport message relative to F j Weight ratio of classesObtaining E i Weight ratio of message transmission logic. /> Respectively represent E 1 ,E 2 ,E 3 ,E 4 ,E 5 Weight ratio of message transmission logic. />
Fig. 7 is a flow chart of a service for estimating the transmission time of CANFD standard frame messages. As shown in fig. 7, the specific steps are as follows:
s2-1: construction of binary sequence model to G(s) f D) from a binary sequence S of M d bits f (f∈[1,M]) The composition M is a random number greater than 10000. The binary sequence consists of a series of data messages, including the frame start, arbitration domain, control domain, data domain, CRC domain, response field and frame end of the messages.
S2-2: the value Of the binary sequence model data message is determined, wherein a Frame Start Bit (Start Of Frame, SOF), a remote transmission request Bit (Remote Request Substitution, RRS), an identifier extension Bit (Identifier Extension flag, IDE), a CANFD format flag (FD Format indicator, FDF), a reserved Bit (RES), a Bit Rate Switch (BRS) and an error status flag (Error State Indicator, ESI) are all dominant and take on the value Of 0.
S2-3: a binary sequence is generated.
S2-4: the probability lambda of the number of padding bits N is counted N ,λ N Obeys normal distribution. In the CANFD protocol, when the transmission data is 16 bytes or less, the CRC is 17 bits, and when the transmission data exceeds 16 bytes, the CRC is 21 bits, so that it is divided into two cases, the first case involving the padding of 43+8lg bits in total, the number of padding bitsByte length L of data field g And g is 0-64, which means that the data field length of the message is 0-64 bytes. The second case, where the transmission byte exceeds 16 bytes, is a CRC of 21 bits, which takes part in the padding for a total of 47+8L g Bit, fill bit->In conclusion, the method comprises the steps of,respectively counting data field byte length L g The probability lambda of the message stuffing digit when 0-64 bytes N 。
S2-5: calculating the mean value of the filling bit distribution According to the probability distribution of the filling bit number, the filling bit number average value +.>Number of bits per binary sequence data packetAfter adding the filling bit number average value, the total bit number of the message is +.>Because of the variable rates in CANFD communication protocols, CANFD employs two bit rates: the variable rate from BRS bits in the control field to ACK field (with CRC delimiter) and the remaining fraction of the message is the rate for the original CAN bus, so τ is used c To represent variable rate, denoted by τ f To represent the fixed rate, the message transmission time average value +.>Wherein d' c Representing the number of bits at variable rate, d' f Number of bits of message representing fixed rate, and d '=d' c +d' f . As shown in table 3, the data field length is respectively 0-64 bytes, and the average value of the distribution of the padding bits and the average value of the transmission time of a single message are obtained.
S2-6: calculation E i Weight ratio of message transmission logic. Adopting a layering analysis method to select E i The optimal weight ratio of the message transmission logic.
S2-7: and estimating the transmission time of the network control process message. E is calculated according to a layering analysis method i The weight ratio of the seed message transmission logic, thereby obtaining E i Number of seed messages [ eta omega ] P1 ηω P2 ηω P3 ηω P4 ηω P5 ]η represents the number of all messages involved in the network control process. Message transmission time average matrixG is 0-64 according to the byte length of the message data field. The estimated time T of the control process is obtained as follows.
S2-8: the worst case for bit stuffing is shown in fig. 8, since bit stuffing affects the transmission time of the message.
The padding bits increase the maximum transmission time of the CANFD message assuming a total number of bits C for the worst message transmission for message frame m m Then
For ease of calculation, here 16 bytes of the data field are segmented, with the direct default Canfd data field having a byte count greater than 16, i.e., L g 16, its CRC field takes 4+21+1=26 (bits). Knowing the worst total bit number of CANFD message, the worst transmission time of message can be obtained according to two variable rates defined by S2-5>Wherein->The function representation returns the maximum integer less than or equal to a/b, and the T is calculated to finally obtain T= (39+10L) g )τ c +(31)τ f . And calculating the worst response time according to the worst transmission time T. The worst response time can be calculated by the message transmission time, and is set as Q for calculating the message frame m under the specific message set i Worst response time Q on CAN bus. The algorithm core idea presented in this patent is to simulate the transmission process of the entire CANFD message frame on the CAN bus. To accurately analyze the latency of the CANFD contention band, an algorithm is described. />
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.
Claims (7)
1. A message transmission time prediction method for an automobile CANFD network is characterized by comprising the following steps of: the method comprises the following steps:
s1: analyzing network characteristics according to the network topology structure and node transmission characteristics, network transmission messages and signal quantity, constructing a double-layer CANFD network message transmission model, and calculating the weight ratio of each transmission logic of the message;
s2: constructing a binary sequence model, calculating the filling bit distribution mean value of the message to obtain single message transmission time, and estimating the network message transmission time according to the single message transmission time and the weight ratio of each transmission logic of the message.
2. The message transmission time estimation method for automotive CANFD network of claim 1, wherein: dividing the network layer transmission logic into E according to the network topology structure i Seed, i is 1 to 5, E 1 For internal transmission of network segments, E 2 For single layer network to single layer network transmission, E 3 For single-layer network to double-layer network transmission, E 4 For transmission of a double-layer network to a single-layer network, E 5 Transmitting the double-layer network to the double-layer network;
dividing network layer transmission logic into F according to node transmission characteristics j Seed, j is 1 to 4,F 1 For single-node to single-node transmission, F 2 For single-node to multi-node transmission, F 3 Is multi-nodeTo single node transmission, F 4 For multi-node to multi-node transmissions.
3. The message transmission time estimation method for automotive CANFD network according to claim 2, wherein: e (E) i The weight ratio of the seed transmission logic is valued by adopting a hierarchical analysis method according to F j Class message importance level, constructing a judgment matrix A and calculating F j The weight ratio of the class message in the network; according to E i Seed message pair F j Importance level of class message and construction of judgment matrix B j For F 1 ,F 2 ,F 3 ,F 4 Sequentially constructing a judgment matrix B 1 ,B 2 ,B 3 ,B 4 Calculate E i Seed message relative to F j Weight ratio of class message, and obtaining E in network by approximate solution of eigenvector of judgment matrix i Weight ratio of transmission logic.
4. The message transmission time estimation method for automotive CANFD network according to claim 3, wherein: the step S1 specifically comprises the following steps:
s11: construction F j Relationship judgment matrix of class transmission message: the transmission types are compared pairwise to obtain an importance scale a of each transmission type αβ α, β=1, 2,3,4, constructing a judgment matrix a:
wherein the first column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 1 A scale of importance of the phase comparison; the second column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 2 A scale of importance of the phase comparison; the third column vector represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 3 A scale of importance of the phase comparison; the fourth column of vectors represents F 1 ,F 2 ,F 3 ,F 4 Class messages and F 4 A scale of importance of the phase comparison;
s12: find F j Weight ratio of class transmission messages in the network: each column vector of the judgment matrix A is normalized,obtaining the element a' αβ For a' by summing the rows:obtain W= [ W ] 1 W 2 W 3 W 4 ] T Wherein W is 1 Represents F 1 ,F 2 ,F 3 ,F 4 Class transmission mode and F 1 The sum of the importance ratio of class phase ratio is normalized to the vector W>Obtaining a feature vector approximation solutionNamely, find F j Weight ratio, W, of class messages in network 1 A ,W 2 A ,W 3 A ,W 4 A Respectively represent F 1 ,F 2 ,F 3 ,F 4 The weight ratio of the class message transmission mode;
s13: build pair F j Class messages, E i Relation judgment matrix B for seed transmission message j The method comprises the steps of carrying out a first treatment on the surface of the Wherein the matrix B is determined 1 For F 1 Class transfer messages, E i The importance of the seed transmission logic is compared in pairs, including judging the scale b xy X, y=1, 2,3,4,5, the importance increases sequentially from 1 to 5, the value is selected according to the network characteristic; same reason pair F 2 、F 3 、F 4 Class message sequentially constructing judgment matrix B 2 ,B 3 ,B 4 ;
S14: e is calculated i Seed transmission message phaseFor F j Weight ratio of classes, solving matrix B j Is a eigenvector approximation solution of (2)Wherein->Respectively for F j In other words, E 1 ~E 5 The weight ratio of the seed transmission message;
s15: according to F j Weight ratio W of class transmission message in network A ,E i Seed transport message relative to F j Weight ratio of classesObtaining E i Weight ratio of the seed message transmission logic, wherein +.>Respectively represent E 1 ,E 2 ,E 3 ,E 4 ,E 5 Weight ratio of message transmission logic:
5. the message transmission time estimation method for automotive CANFD network of claim 1, wherein: when the transmitting node detects 5 bit streams with the same polarity in the transmitted bit stream, inserting a bit with opposite polarity as a filling; the average value of the filling bit number distribution is the byte length L of the data field g When the values are different, the distribution mean value of the message filling numberIn a CANFD network standard frame, the bits involved in padding include frame start, arbitration, control, data, CRC field, lengthIs (43+8L) g )/(47+8L g ) A bit; message bit number->After adding the padding bit number, the total bit number of the message +.>
6. The message transmission time estimation method for automotive CANFD network of claim 5, wherein: the estimating the network message transmission time in step S2 specifically includes the following steps:
s21: construction of binary sequence model to G (S f D) from a binary sequence S of M d bits f (f∈[1,M]) The composition M is a random number greater than 10000; the binary sequence consists of a series of data messages, and comprises a frame start, an arbitration domain, a control domain, a data domain, a CRC domain, a response field and a frame end of the messages;
s22: determining the value of a binary sequence model data message, wherein a frame start bit, a remote transmission request bit, an identifier extension bit, a CANFD format mark, a reserved bit, a bit rate switch and an error state mark are all dominant, and the value is 0;
s23: generating a binary sequence;
s24: the probability lambda of the number of padding bits N is counted N ,λ N Obeying normal distribution; the method comprises two cases, wherein the first case participates in filling 43+8Lg bits in total, and the filling bit numberByte length L of data field g G is 0-64, which means that the data field length of the message is 0-64 bytes; the second case, where the transmission byte exceeds 16 bytes, has a CRC of 21 bits, taking part in the padding for a total of 47+8L g Bit, fill bit->To sum up->Respectively counting data field byte length L g The probability lambda of the message stuffing digit when 0-64 bytes N ;
S25: calculating the mean value of the filling bit distributionAccording to the probability distribution of the filling bit number, the filling bit number average value +.>Number of bits per binary sequence data packetAfter adding the filling bit number average value, the total bit number of the message is +.>CANFD employs two bit rates: the BRS bit in the control field to the ACK field are variable rate, the rest of the message is the rate for the original CAN bus, and tau is used c To represent variable rate, denoted by τ f To represent fixed rate, then the message transmission time average valueWherein d' c Bit number, d 'representing variable rate' f Number of bits of message representing fixed rate, and d '=d' c +d' f ;
S26: calculation E i The weight ratio of the seed message transmission logic; adopting a layering analysis method to select E i The optimal weight ratio of the seed transmission logic;
s27: estimating the transmission time of a network control process message;
s28: the padding bits increase the maximum transmission time of the CANFD message assuming a total number of bits C for the worst message transmission for message frame m m ThenSegment calculation of 16 bytes of data field, with default Canfd data field having bytes greater than 16, i.e. L g More than or equal to 16, the CRC field of the CRC field is 26 bits; knowing the worst total number of bits in the CANFD message, the worst transmission time of the message is determined based on the two variable rates defined in S25Wherein->The function representation returns the maximum integer less than or equal to a/b, resulting in t= (39+10l) g )τ c +(31)τ f The method comprises the steps of carrying out a first treatment on the surface of the Calculating worst response time R according to worst transmission time T i 。
7. The message transmission time estimation method for automotive CANFD network of claim 1, wherein: step S29 of calculating worst response time R according to worst transmission time T i Comprising the following steps:
s291: first selecting a single message frame m from a collection of message frames that requires calculation of the worst response time i ;
S292: computing priority no higher than message frame m i Blocking time caused by other frames of (a) and recording m i Time of blocking B i ;
S293: establishing arbitration sets, i.e. message frames m i At the wait time B i After blocking time, arbitrating with other frames in the set;
in the worst case, all message frames in the set have priority over message frame m i Is of high priority and all need to participate in and message frame m i Is to be used in the competition of (1); in message frame m i Before sending out, recording the number of times of sending other frames with high priority respectively;
s294: selecting the minimum ID frame, calculating the transmission time T of the minimum ID frame on the busThe method comprises the steps of carrying out a first treatment on the surface of the If the minimum ID frame is exactly message frame m i Attestation message frame m i Winning arbitration and sending successful, terminating the loop and returning time B, which has been waiting i At this time B i I.e. message frame m i Worst response time of (2);
s295: if the minimum ID frame is not message frame m i Return to circulation, m i Continuing to wait for the next bus to be idle and then participating in arbitration again;
s296: and deleting the successful message frames in the aggregate frames, judging whether the next period is entered for each high priority frame so as to need to be transmitted again, and if so, re-joining the arbitration aggregate to perform arbitration.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310073116.7A CN116055248A (en) | 2023-01-17 | 2023-01-17 | Message transmission time prediction method for automobile CANFD network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310073116.7A CN116055248A (en) | 2023-01-17 | 2023-01-17 | Message transmission time prediction method for automobile CANFD network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116055248A true CN116055248A (en) | 2023-05-02 |
Family
ID=86117920
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310073116.7A Pending CN116055248A (en) | 2023-01-17 | 2023-01-17 | Message transmission time prediction method for automobile CANFD network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116055248A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150063120A1 (en) * | 2013-08-29 | 2015-03-05 | Mentor Graphics Corporation | Controller area network (can) worst-case message latency with priority inversion |
US20180152364A1 (en) * | 2016-11-25 | 2018-05-31 | Hyundai Motor Company | Method and apparatus for analyzing signal delay time based on controller area network burst analysis |
US20200136965A1 (en) * | 2018-10-29 | 2020-04-30 | Ten-D Energies, Inc. | Robustness enhancing router for controller area networks |
CN112637003A (en) * | 2020-12-04 | 2021-04-09 | 重庆邮电大学 | Message transmission time estimation method for automobile CAN network |
CN113824614A (en) * | 2021-09-23 | 2021-12-21 | 北京理工大学 | Method and system for determining message loop time delay of vehicle-mounted network communication system |
-
2023
- 2023-01-17 CN CN202310073116.7A patent/CN116055248A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150063120A1 (en) * | 2013-08-29 | 2015-03-05 | Mentor Graphics Corporation | Controller area network (can) worst-case message latency with priority inversion |
US20180152364A1 (en) * | 2016-11-25 | 2018-05-31 | Hyundai Motor Company | Method and apparatus for analyzing signal delay time based on controller area network burst analysis |
US20200136965A1 (en) * | 2018-10-29 | 2020-04-30 | Ten-D Energies, Inc. | Robustness enhancing router for controller area networks |
CN112637003A (en) * | 2020-12-04 | 2021-04-09 | 重庆邮电大学 | Message transmission time estimation method for automobile CAN network |
CN113824614A (en) * | 2021-09-23 | 2021-12-21 | 北京理工大学 | Method and system for determining message loop time delay of vehicle-mounted network communication system |
Non-Patent Citations (4)
Title |
---|
BOMU CHEON等: "The CAN FD network performance analysis using the CANoe", 《2013 44TH INTERNATIONAL SYMPOSIUM ON ROBOTICS (ISR 2013)》, 2 January 2014 (2014-01-02) * |
MA, WENHONG等: "Efficient AUTOSAR-Compliant CAN-FD Frame Packing with Observed Optimality", 《PROCEEDINGS OF THE 2021 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE 2021)》, 16 July 2021 (2021-07-16) * |
丁雪飞: "纯电动车整车CAN网络实时调度算法的研究", 《硕士学位论文全文数据库》, 16 December 2015 (2015-12-16) * |
王璐杰;张凤登;刘鲁平;吴俊鹏;: "CAN FD总线报文响应时间研究", 软件导刊, no. 01, 15 January 2020 (2020-01-15) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112637003B (en) | Message transmission time estimation method for automobile CAN network | |
US20170163744A1 (en) | Network for transporting Ethernet and time sensitive data | |
CN106992879B (en) | Method for calculating load rate of CAN bus | |
CN104170291B (en) | Method and network node for handling Precision Time Protocol | |
US10958504B1 (en) | Systems and methods for operations, administration and maintenance (OAM) in the physical coding sublayer (PCS) | |
US9397900B2 (en) | Methods and apparatus for sharing counter resources between CoS/priority or/and between EVC/VLAN to support frame loss measurement | |
CN111211954A (en) | Method and device for determining load rate of CANFD bus | |
CN111404815B (en) | Constrained routing method based on deep learning | |
CN113676422A (en) | Node matching method and device | |
CN112217683A (en) | Cross-heterogeneous-chain data reachability processing method, system, medium, device and terminal | |
Qushtom et al. | A scalable two-tier pbft consensus for blockchain-based iot data recording | |
CN116055248A (en) | Message transmission time prediction method for automobile CANFD network | |
CN113438182B (en) | Credit-based flow control system and flow control method | |
CN112422234A (en) | Data management service method for self-adaptive deep learning based on time perception | |
CN111667264A (en) | Block data transmission method and device, electronic equipment and nonvolatile computer storage medium | |
CN116546499A (en) | Mobile terminal identity authentication method based on lightweight Bayesian fault tolerance | |
Gottapu et al. | Performance analysis of collision alleviating distributed coordination function protocol in congested wireless networks–a Markov chain analysis | |
CN116846826A (en) | High-reliability self-adaptive network-on-chip router micro-architecture | |
Prakash et al. | Throughput analysis of IEEE 802.11 b WLAN under a non-saturated condition | |
Zhou et al. | Tsengine: Enable efficient communication overlay in distributed machine learning in wans | |
CN110555764B (en) | Method and system for block chain consistency under decentralized environment | |
CN115378788A (en) | Block chain performance self-adaptive optimization method based on hierarchical consensus and reinforcement learning | |
CN113923105B (en) | Internet of things equipment fault monitoring method and system based on block chain | |
Hasnaoui et al. | An implementation of a proposed modification of CAN protocol on CAN fieldbus controller component for supporting a dynamic priority policy | |
CN115271724A (en) | Grouping Byzantine fault-tolerant algorithm based on dynamic trust model |
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 |