OCCUPANCY RATE CALCULATION DEVICE AND OCCUPANCY RATE CALCULATION METHOD
20200396171 ยท 2020-12-17
Assignee
Inventors
Cpc classification
H04L47/30
ELECTRICITY
H04L47/2441
ELECTRICITY
International classification
Abstract
An occupancy rate calculating device and an occupancy rate calculating method which can facilitate calculation of an occupancy rate of a transmission channel are provided. A relay includes a transmission buffer configured to receive message frames that are divided into groups based on transmission cycles so as to assign the message frames the groups. The relay further includes a control unit configured to count, for each group, kinds of the message frames received at the transmission buffer, calculates, based on a number of counts counted for each group and the transmission cycle of this group, an occupancy rate of a transmission channel by this group, and add up the calculated occupancy rates for the respective groups to calculate an occupancy rate as a whole.
Claims
1. An occupancy rate calculation device comprising: a reception unit configured to receive a plurality of kinds of communication data that are divided into groups based on transmission cycles, so as to assign the plurality of kinds of communication data to the groups; a count unit configured to count the kinds of the communication data received at the reception unit for a time period given for each of the groups; and a calculation unit configured to calculate an occupancy rate of a transmission channel occupied by the communication data based on a number of counts counted by the count unit and the transmission cycle.
2. The occupancy rate calculation device as claimed in claim 1, wherein the calculation unit is configured to: calculate an occupancy rate for each of the groups; add up the occupancy rates calculated for the respective groups; and calculate an occupancy rate as a whole.
3. The occupancy rate calculation device as claimed in claim 1, wherein the reception unit is provided with buffer regions each corresponding to each of the groups.
4. The occupancy rate calculation device as claimed in claim 1, wherein the group is given such that one group is given for one transmission cycle.
5. The occupancy rate calculation device as claimed in claim 1, wherein the group is given such that one group is given for a predetermined range of transmission cycles.
6. An occupancy rate calculation method that is executed by an occupancy rate calculation device configured to calculate an occupancy rate of a transmission channel, the method comprising: a receiving step of receiving a plurality of kinds of communication data that are divided into groups based on transmission cycles so as to receive for each of the groups; a counting step of counting, for each of the groups, the kinds of the communication data received in the receiving step for a time period given for each of the groups; and a calculating step of calculating the occupancy rate of the transmission channel occupied by the communication data based on a number of counts counted in the counting step and the transmission cycle.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0010]
[0011]
[0012]
[0013]
DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS
[0014] In the following, one embodiment of the present invention will be explained with reference to the drawings.
[0015] The vehicle communication network 1 is installed in a vehicle such as an automobile and includes a plurality of ECUs 10 and a relay 20 that are connected to a bus B, as shown in
[0016] Herein, the ECU is an electronic control unit and is configured to control various on-vehicle devices. To this end, on-vehicle devices as loads (not shown in
[0017] The ECU 10 generally includes a microcomputer having a CPU (Central Processing Unit) and memory such as ROM (Read-Only Memory) and RAM (Random-Access Memory), and a communication circuit and such. By executing a control program stored in the ROM, the CPU controls the load connected thereto and performs the entire control of the ECU.
[0018] The relay 20 functions to relay communication between the vehicle communication network 1 and a vehicle communication network of a different system. Further, the relay 20 includes the occupancy rate calculation device.
[0019] In this embodiment, the relay 20 includes the occupancy rate calculation device, and this is because the relay 20 can receive all message frames transmitted through the bus B. Hence, the function of the occupancy rate calculation device may be provided to any device other than the relay 20 that can receive all message frames transmitted through the bus B.
[0020] As shown in
[0021] The control unit 21 is constituted of a microcomputer having a CPU and memory such as ROM and RAM. The control unit 21 controls each of the inbox 22, the routing buffer 23, the transmission buffer 24 and the outbox 25 to perform the entire control of the relay 20. Further, the control unit 21 performs an operation for calculating an occupancy rate of the transmission channel of the vehicle communication network 1 based on the message frames stored in the transmission buffer 24.
[0022] The inbox 22 is constituted of three inboxes, namely, inboxes 22a-22c. The inbox 22 receives a message frame inputted from the ECU 10 on the transmission side and temporarily stores the message frame. Although
[0023] The routing buffer 23 is configured to divide the message frames received by the relay 20 into groups in advance according to the transmission cycle, and assign the message frames stored in the inbox 22 to transmission buffers 24a-24c according to the groups.
[0024] The transmission buffer 24 is constituted of three transmission buffers, namely, the transmission buffers 24a-24c. The transmission buffer 24 is provided in number that corresponds to the number of the groups provided in advance in the grouping.
[0025] The outbox is configured to transmit the message frame stored in the transmission buffer 24 to the ECU 10 on the reception side at a predetermined timing.
[0026] Next, a method for calculating an occupancy rate in the relay 20 having the above-mentioned configuration will be explained with reference to
[0027] Firstly, the transmission cycle of the message frame that is transmitted by each ECU 10 is determined (step S11). The transmission cycle of the message frame may appropriately be determined in accordance with characteristics and specification and such of a load to be connected to the ECU 10. Thus, in this embodiment, an object for which an occupancy rate is calculated is the message frame that is transmitted at a constant cycle.
[0028] Next, the message frames are divided into groups based on the transmission cycle determined in step S11 (step S12). In this embodiment, one group is provided for one transmission cycle. For example, when the transmission cycle of 20 ms (millisecond) corresponds to the message frames having message IDs of 1 and 2, the transmission cycle of 30 ms corresponds to the message frames having message ID of 3, and the transmission cycle of 50 ms corresponds to the message frames having message ID of 4, then three groups will be provided since there are three transmission cycles. That is, the plurality of message frames (plurality of kinds of communication data) having different message IDs is divided into groups based on the transmission cycle.
[0029] Next, the transmission buffer is set in the relay 20 according to the number of groups provided in the grouping in step S12. For example, the memory regions of the transmission buffer 24 provided in the relay 20 are divided according to the number of groups (step S13). Further, a rule of a routing table of the routing buffer 23 is changed according to the grouping. These settings of and changes in the relay 20 can be performed by changing software that is executed by the control unit 10 of the relay 20, for example.
[0030] In the manner described above, the routing buffer 23 and the transmission buffer 24 of the relay 20 are prepared.
[0031] Next, an operation for calculating an occupancy rate of the vehicle communication network 1 (occupancy rate calculation method) using the relay 20 in which the setting is completed according to the flowchart of
[0032] Firstly, the received message frames are stored in the transmission buffer 24 of an object based on the IDs of the received message frames (step S21). In this step, by using the routing buffer 23, the message frames stored in the inbox 22 are assigned to one of the transmission buffers 24a-24c according to the grouping defined in the flowchart of
[0033] Herein, the time period for storing the message frame (hereinafter called, storage time period) in the transmission buffer 24 in step S21 differs for the respective transmission buffers 24a-24c. This is because of the difference in the transmission cycles of the message frames stored in the respective transmission buffers 24a-24c. In this embodiment, the storage time period is set to be less than the transmission cycle corresponding to each transmission buffer 24a-24c. For example, if the message frame having the transmission cycle of 20 ms is to be stored in the transmission buffer 24a, then the above-mentioned storage time period is set to be less than 20 ms. This is to avoid from receiving the message frames having the same ID several times.
[0034] Next, the control unit 21 counts the kinds of the message frames stored in the transmission buffer 24 (step S22). In this step, for each transmission buffer 24a-24c, the control unit 21 counts the IDs (i.e., kinds) of the message frames stored in each transmission buffer 24a-24c. For example, when one message frame having the message ID of 1 and one message frame having the message ID of 2 are stored in the transmission buffer 24a, the count value of the transmission buffer 24a is 2. That is, the control unit 21 functions as a count unit that counts the kinds of the communication data received at the reception unit for a time period given for each group.
[0035] Then, the control unit 21 calculates the occupancy rate based on the count value counted in step S22 and the transmission cycle (step S23). An equation for calculating the occupancy rate is shown below as equation (1). That is, the control unit 21 functions as a calculation unit configured to calculate the occupancy rate of the bus B (transmission channel) by the message frames based on the number of counts and the transmission cycle.
[0036] In equation (1), 1000 msec is unit time (i.e., per 1 second), freq is the transmission cycle, maxframesize is a maximum value of the message frame, count is the count value obtained by counting in step S22. The transmission cycle is known for the group corresponding to each transmission buffer 24a-24c. By dividing the product (i.e., multiplication together of these values) by 1000 msec and multiplying the obtained value by 100, the occupancy rate of the bus B by this group per 1 second is calculated. By adding up the occupancy rates by the respective groups, the occupancy rate of the entire system is calculated.
[0037] As is clear from the explanation described above, step S21 functions as receiving step, step S22 functions as counting step, and step S23 functions as calculating step.
[0038] According to this embodiment, the relay 20 includes the transmission buffer 24 configured to receive, by assigning to groups, the message frames that have been divided into groups based on the transmission cycle. The relay 20 further includes the control unit 21 configured to count, for each group, the kinds of the message frames received at the transmission buffer 24 for the time period given for each group, calculate, based on the number of counts for each group and the transmission cycle of this group, the occupancy rate of the transmission channel by this group, and add up the calculated occupancy rates for the respective groups to calculate the occupancy rate as a whole.
[0039] With the relay 20 configured as described above, the message frames are divided into groups based on the transmission cycle, thus the occupancy rate can be calculated easily using the number of counts counted during the counting time period and the known transmission cycle. Further, since the occupancy rate can be calculated in a lump for each group, the occupancy rate can be calculated easily without listing all the on-vehicle devices that are connected to the network. Consequently, it is possible to easily make determination of whether an additional on-vehicle device due to design change and such needs to be connected or not.
[0040] Further, since the transmission buffer 24a-24c is provided for each group, the counting for each group can be performed by reading out from each transmission buffer 24a-24c, thereby allowing to correctly and easily perform the counting.
[0041] Further, in the embodiment described above, one group is given for one transmission cycle, however, one group may be given for a predetermined range of transmission cycles. For example, one group may be given for the transmission cycles of 20 ms-30 ms. By doing so, the occupancy rate can be calculated for a certain range in a lump. Thus, the occupancy rate can be calculated more rapidly.
[0042] When the grouping is performed for the range of transmission cycles, the storage time period in the transmission buffer 24 in step S21 falls within the range as: max cycle<storage time period<minimum cycle2. For example, for the group for the range of the transmission cycles of 20 ms-30 ms, the storage time period is 30 ms<storage time period<40 ms. By doing so, the message frame with the message ID having the transmission cycle within the range for one group will certainly be stored once.
[0043] Further, in this embodiment, during the preparation shown in
[0044] Assigning of the message IDs in the manner as described above can facilitate the grouping of the message frames to be transmitted from the ECU (i.e., the on-vehicle device) that is added at a later time. In addition, by pre-setting the routing buffer 23 to perform such assignment, the occupancy rate can be calculated without changing the setting of the routing buffer 23 even when there is an addition of the ECU.
[0045] For example, assuming that the message IDs of 001-010 are assigned for the message IDs in the group for the transmission cycles of 20 ms-30 ms, and the message IDs of 001-004 are presently being used. In this case, when one message frame out of the message frames to be transmitted from the ECU that is added in a later time has the transmission cycle of 20 ms-30 ms, this message frame can be assigned with the message ID of 005. By doing so, there is no need to change the setting of the routing buffer 23.
[0046] The embodiment has been described in association with the vehicle communication network 1, however, the present invention is not limited to this. The present invention can be applied to other moving objects such as a ship and an aircraft.
[0047] The present invention is not limited to the embodiment described above. That is, various changes and modifications may be made by a person skilled in the art with conventional knowledge without departing from the scope of the present invention. Embodiments with such changes and modifications are of course within the scope of the present invention as long as they include the configuration of the occupancy rate calculation device and the occupancy rate calculation method of the present invention.
LIST OF REFERENCE SIGNS
[0048] 10 ECU [0049] 20 relay [0050] 21 control unit (count unit, first calculation unit, second calculation unit) [0051] 24 transmission buffer (reception unit)