Device and method for estimating communication response time between different controllers of a vehicle
By applying a deterministic scheduling method in the communication process between different controllers of a vehicle, and using a data transmitter, estimator and result data processor to measure or estimate the communication response time, the problem of difficult estimating message processing and sending time in the prior art is solved, and high-precision task offset setting and real-time system execution time controllability is achieved.
Patent Information
- Application Number
- CN202111368902.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-08
- Filing Date
- 2021-11-18
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-11-18
AI Technical Summary
In the communication process between different controllers of a vehicle, existing event-based scheduling methods are difficult to ensure execution time in real-time systems, and it is difficult to estimate message processing and sending time, making it difficult to set accurate task offsets.
By applying a deterministic scheduling method during communication between different controllers of a vehicle, a communication response time close to the actual consumed time is measured or estimated using a data transmitter, an estimator, and a resultant data processor to determine the start point offset of the application with high accuracy.
It realizes the high-precision estimation of communication response time during the communication between different controllers of the vehicle, ensures the accuracy of the starting point offset of the application, and improves the controllability of execution time in the real-time system.
Smart Images

Figure CN114629583B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to and the benefit of Korean Patent Application No. 10-2020-0170111, filed on December 8, 2020, which is hereby incorporated by reference for all purposes as if set forth herein. Technical Field
[0003] Exemplary embodiments of the present disclosure relate to a device and method for estimating communication response time between different controllers of a vehicle, and more specifically, to a device and method for estimating communication response time between different controllers of a vehicle, which can estimate the communication response time close to the actual consumed time (e.g., actual message processing and sending time) when a deterministic scheduling method is applied during communication between different controllers of the vehicle, thereby determining the starting point offset of the application with high accuracy. Background Art
[0004] As vehicle functions increase, many controllers (eg, microcontrollers (MCUs) and central processing units (CPUs)) for electronic control units (ECUs) are installed in each vehicle.
[0005] Such controllers transmit / receive data (eg, control information and sensing information) required for a specific system (eg, a braking system, a steering system, or a transmission system) by communicating with each other, thereby performing functions of the corresponding system.
[0006] At this time, data is transmitted through the vehicle's communication system (eg, CAN, LIN, or Ethernet).
[0007] At this time, it is difficult for the existing event (or interrupt) based application execution method to guarantee the execution time in the real-time system because the execution time varies depending on the size and processing speed of the data (or message). An example of the existing event based application execution method includes a method in which the second controller executes the second application when data processed by the first application executed by the first controller is sent and received by the second controller.
[0008] Therefore, in order to overcome the disadvantages of the existing event-based scheduling method (i.e., it is difficult to correct the execution time in a real-time system), it is necessary to apply a deterministic scheduling method. However, in order to apply the deterministic scheduling method, it is necessary to set an accurate task offset. In order to set an accurate task offset for the deterministic scheduling method, it is necessary to estimate the message processing and sending time. However, when the message processing and sending time are not estimated, it is difficult to specify the offset.
[0009] Furthermore, since such message processing and sending times are difficult to estimate in a multi-controller environment like recent vehicles, it is even more difficult to specify the offset.
[0010] For example, when an offset greater than the actual elapsed time (e.g., actual message processing and sending time) is specified in communication processing, the available time of the controller may be reduced. Conversely, when an offset less than the actual elapsed time is specified, problems such as data synchronization errors may occur during data synchronization processing.
[0011] Therefore, there is a need for a technology for estimating the communication response time (e.g., the time required to send / receive data) between different controllers of a vehicle, which technology can determine the starting point offset of an application with high accuracy by measuring or estimating the communication response time that is close to the actual consumed time (e.g., the actual message processing and sending time during the communication process) when a deterministic scheduling method is applied during communication between different controllers of the vehicle.
[0012] The related art of the present disclosure is disclosed in Korean Patent Application Publication No. 10-2020-0026508 (published on March 11, 2020, entitled “Method for designing a network device and controller for collision avoidance”). Summary of the invention
[0013] Various embodiments relate to an apparatus and method for estimating the communication response time between different controllers of a vehicle, which, when a deterministic scheduling method is applied during communication between different controllers of the vehicle, can measure or estimate the communication response time that is close to the actual consumed time (e.g., the actual message processing and sending time), thereby determining the starting point offset of the application with high accuracy.
[0014] In one embodiment, an apparatus for estimating communication response time between different controllers of a vehicle may include: a data transmitter configured to measure an actual message response time required after a first controller sends a message to a second controller until a response message is received from the second controller; an estimator configured to receive a size of a message from the data transmitter of the first controller and reflect the received size according to a specified estimation logic to estimate the message response time; and a result data processor configured to correct an estimation parameter used by the estimator when estimating the message response time based on a difference between the actual message response time and the estimated message response time obtained by the estimator, and update the existing estimation parameters of the estimator with the corrected estimation parameters.
[0015] The apparatus may further include a host configured to receive an actual message response time of the message and an estimated message response time acquired by the estimator from a result data processor of the first controller, and execute a function of the result data processor to replace the result data processor.
[0016] The message response time may include a communication response time calculated by adding a transmission time of the message and a response time of the message, the communication response time indicating a time consumed for communication between the first controller and the second controller.
[0017] The communication response time may correspond to a time calculated by subtracting a message response time consumed by the second controller from a message response time measured by the first controller.
[0018] When a message processed by an application of the first controller is sent to the second controller, according to the deterministic scheduling method, a message sending time corresponding to 1 / 2 of the estimated communication response time may be reflected to set a start offset of the application to be executed by the second controller. In addition, when a message processed by an application of the second controller is resent to an application of the first controller, according to the deterministic scheduling method, a message response time corresponding to 1 / 2 of the estimated communication response time may be reflected to set a start offset of the application to be executed by the first controller.
[0019] In order to estimate the communication response time close to the actual communication response time, the estimator may repeatedly perform the estimation of the message response time and the updating of the estimation parameters.
[0020] The time values between the first controller and the second controller may have the same time stamp synchronized by PTP (Precision Time Protocol).
[0021] In one embodiment, a method for estimating the communication response time between different controllers of a vehicle may include: measuring, by a data transmitter, an actual message response time required from a first controller sending a message to a second controller until a response message is received from the second controller; receiving, by an estimator, the size of a message from the data transmitter of the first controller, and reflecting the received size according to a specified estimation logic to estimate the message response time; and correcting, by a result data processor, an estimation parameter used by the estimator when estimating the message response time based on a difference between the actual message response time and the estimated message response time obtained by the estimator, and updating the existing estimation parameters of the estimator with the corrected estimation parameters.
[0022] The method may further include executing the function of the result data processor by the host instead of the result data processor. When executing the function of the result data processor, the host may receive the actual message response time of the message from the result data processor of the first controller and the estimated message response time obtained by the estimator, correct the estimation parameter used by the estimator when estimating the message response time based on the difference between the two, and send the corrected estimation parameter to the result data processor.
[0023] The result data processor may correct an estimation parameter used by the estimator when estimating the message response time based on a difference between the communication response times included in the message response time. The communication response time may indicate a time consumed for communication between the first controller and the second controller and calculated by adding the message sending time and the message response time.
[0024] The communication response time may be a time calculated by subtracting a message response time consumed by the second controller from a message response time measured by the first controller.
[0025] When a message processed by an application of the first controller is sent to the second controller, according to the deterministic scheduling method, a message sending time corresponding to 1 / 2 of the estimated communication response time may be reflected to set a start offset of the application to be executed by the second controller. In addition, when a message processed by an application of the second controller is resent to an application of the first controller, according to the deterministic scheduling method, a message response time corresponding to 1 / 2 of the estimated communication response time may be reflected to set a start offset of the application to be executed by the first controller.
[0026] In order to estimate the communication response time close to the actual communication response time, the estimator may repeatedly perform the estimation of the message response time and the updating of the estimation parameters.
[0027] According to an embodiment of the present disclosure, when a deterministic scheduling method is applied during communication between different controllers of a vehicle, an apparatus and method for estimating the communication response time between different controllers of a vehicle can measure or estimate a communication response time that is close to the actual consumed time (e.g., the actual message processing and sending time during communication processing), thereby determining the starting point offset of the application with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a diagram illustrating a schematic configuration of an apparatus for estimating a communication response time between different controllers of a vehicle according to an embodiment of the present disclosure.
[0029] Figure 2 is a diagram for describing a method for estimating communication response time between different controllers of a vehicle according to an embodiment of the present disclosure.
[0030] Figure 3A and Figure 3B is a diagram for describing the difference between a conventional event-based scheduling method and a deterministic scheduling method according to the present embodiment. DETAILED DESCRIPTION
[0031] Hereinafter, an apparatus and method for estimating a communication response time between different controllers of a vehicle will be described with reference to the accompanying drawings through various exemplary embodiments.
[0032] It should be noted that these drawings are not accurate to scale and may exaggerate the thickness of lines or the size of components for the convenience and clarity of description only. In addition, the terms used herein are defined by considering the functions of the present invention and may be changed according to the habits or intentions of the user or operator. Therefore, the definition of terms should be made according to the overall disclosure set forth herein.
[0033] Figure 1 is a diagram illustrating a schematic configuration of an apparatus for estimating a communication response time between different controllers of a vehicle according to an embodiment of the present disclosure.
[0034] refer to Figure 1 , the apparatus for estimating the communication response time between different controllers of a vehicle according to the present embodiment includes a first controller 100, a second controller 200 and a host 300. The first controller 100 includes a result data processor 110, an estimator 120, a data transmitter 130 and a communication stack A 140, the second controller 200 includes a data response unit 210 and a communication stack B 220, and the host 300 includes a result data transmitter / receiver 310, a result data analyzer 320 and a parameter corrector 330.
[0035] The controller 100 transmits data to the second controller 200 .
[0036] The second controller 200 receives data from the first controller 100 , processes the received data, and then transmits data (or a response message) regarding the processed data to the first controller 100 .
[0037] For example, when the first controller 100 transmits data (or a message) through the data transmitter 130 included therein, the data is transmitted to the second controller 200 through the communication stack A 140 and an external communication network (e.g., Ethernet), and the data response unit 210 of the second controller 200 receives the data (or the message) through the communication stack B 220. Then, when the second controller 200 processes the data through the data response unit 210 included therein and then generates and transmits a response message (or response data), the response message is transmitted to the first controller 100 through the communication stack B 220 of the second controller 200 and the external communication network (e.g., Ethernet), and the data transmitter 130 of the first controller 100 receives the data through the communication stack A 140.
[0038] In other words, the data transmitter 130 of the first controller 100 periodically repeats the transmission process X to transmit data to the second controller 200. At this time, the size of the data may be different each time. The data response unit 210 of the second controller 200 is activated in response to the received data and performs the response process Y to transmit the response data (or response message) to the first controller 100.
[0039] The result data processor 110 of the first controller 100 measures (collects) the time required to perform the transmission process X and the response process Y (ie, X+Y execution time) or the message response time.
[0040] The estimator 120 of the first controller 100 receives the size of data to be transmitted through the transmission process X, and estimates the time required to perform the transmission process X and the response process Y (ie, X+Y execution time) or the message response time.
[0041] At this time, the estimation parameters of the estimator 120 include a weight W and a bias b.
[0042] For reference, the estimator 120 of the first controller 100 may perform the estimation logic by using any known technique. For example, the back propagation method and the gradient descent method may be used as the estimation logic. The back propagation method and the gradient descent method are widely used for error correction in neural networks as the basis of deep learning.
[0043] The gradient descent method is an optimization algorithm for finding a first-order approximation, and its basic idea is to calculate the gradient (slope) of a function and repeat the steps in the opposite direction of the gradient (slope) of the function until a local minimum is found. At this time, the starting value used as the initial value of the estimated parameters W and b can be obtained by a predetermined number of measurements, and even by performing at least two measurements, the size x of the data can be set differently to obtain the estimated parameters W and b. However, a predetermined number of measurements can be performed to obtain an average value.
[0044] The host 300 receives the actual time (i.e., actual X+Y execution time) or actual message response time required to perform the sending process X and the response process Y measured by the result data processor 110 of the first controller 100, the estimated time (i.e., estimated X+Y execution time) or estimated message response time obtained by the estimator 120, and the data size x, corrects the estimated parameters W and b based on the difference therebetween, and then sends the corrected estimated parameters W and b to the first controller 100 to update the estimated parameters W and b of the estimator 120.
[0045] More specifically, the host 300 receives the actual time required to perform the sending process X and the response process Y (i.e., the actual X+Y execution time) or the actual message response time, the estimated time (i.e., the estimated X+Y execution time) or the estimated message response time obtained by the estimator 120, and the data size x from the result data processor 110 of the first controller 100 through the result data transmitter / receiver 310.
[0046] Furthermore, the host 300 compares and analyzes the actual X+Y execution time or the actual message response time received from the result data processor 110 with the estimated X+Y execution time or the estimated message response time acquired through the estimator 120 through the result data analyzer 320 .
[0047] At this time, since the time (or application processing time) required for each controller to generate a response message during the actual X+Y execution time and the estimated X+Y execution time is basically a fixed time, the only difference in the message sending time or message response time through Ethernet, that is, the difference in the communication response time, occurs.
[0048] Based on the comparison and analysis results, the host 300 corrects the estimated parameters W and b used when the estimator 120 estimates the X+Y execution time (or message response time) through the parameter corrector 330. Then, the host 300 transmits the corrected estimated parameters W and b to the first controller 100 through the result data transmitter / receiver 310, and updates the existing estimated parameters W and b of the estimator 120.
[0049] Therefore, the estimator 120 can estimate a more accurate X+Y execution time (i.e., an X+Y execution time close to the actual X+Y execution time) by using the corrected estimation parameters W and b. That is, the estimator 120 can basically estimate a communication response time close to the actual communication response time (i.e., the time consumed for sending / receiving data) obtained by adding the message transmission time and the message response time via Ethernet.
[0050] More specifically, when it is assumed that an AUTOSAR (Automotive Open System Architecture) classic platform runs on the MCU used for the first controller 100, and an adaptive platform or a self-produced platform runs on the CPU used for the second controller 200, tasks can be periodically executed by the AUTOSAR OS, and the Runnable (interface form of a thread) of the data transmitter 130 can be repeatedly run in the first controller 100.
[0051] In addition, the message transmission / reception process in the first controller 100 through Ethernet passes through many communication related stacks (e.g., Com, SoAd, TcpIp, EthIf, Ethernet, etc.). When receiving a message through Ethernet, the second controller 200 generates an interrupt to perform a task, and the data response unit 210 is operated by the task.
[0052] Similarly, the message sending / receiving processing in the second controller 200 via Ethernet can also pass through the relevant communication stack, and the difference between the execution time T1 required for the data transmitter 130 to operate and send the message and the execution time T2 required for the data response unit 210 to operate and send the response message can be calculated, so as to calculate the time T3 (i.e., the communication response time) required to send / receive data (or message) in addition to the time required for the second controller 200 to generate a response message.
[0053] For reference, in this embodiment, the time values between the first and second controllers 100 and 200 are synchronized by the Precision Time Protocol (PTP, which is the IEEE 1588 standard time transfer protocol for precise synchronization between networks), so that the first controller 100 and the second controller 20 can operate with the same timestamp, and deterministic scheduling performed at a fixed offset position is applied to each Runnable.
[0054] Figure 2 is a diagram for describing a method for estimating communication response time between different controllers of a vehicle according to an embodiment of the present disclosure.
[0055] First, the message response time (response time T1) measured by the first controller 100 ranges from “from the Runnable call time 1 of the data transmitter 130 to the measurement result sending time 11 of the data transmitter 130”, and the message response time (response time T2) consumed by the second controller 200 ranges from “from the Runnable call time 6 of the data response unit 210 to the response message sending time 8 of the data response unit 210”.
[0056] In the present embodiment, the “communication response time” corresponds to a time obtained by subtracting the “message response time T2 consumed by the second controller 200 ” from the “message response time T1 measured by the first controller 100 ”.
[0057] When it is assumed that the message transmission time and the message response time are equal to each other, the estimated message transmission time is "communication response time / 2", and the estimated message response time is "communication response time / 2". At this time, the time value of "message response time T2 measured by the second controller 200" can be included in the data of the response message.
[0058] The data transmitter 130 may provide the size of the message (or data) to the estimator 120 before transmitting the message so that the estimator 120 may estimate the communication response time (ie, data transmission / reception time).
[0059] The estimator 120 transmits the estimated communication response time (ie, data transmission / reception time) to the result data processor 110 .
[0060] In addition, when receiving the response message, the data transmitter 130 transmits the response message to the result data processor 110. At this time, the data transmitter 130 may measure the actual communication response time and transmit the measured communication response time to the result data processor 110. Therefore, the result data processor 110 of the first controller 100 may measure the actual communication response time (or data transmission / reception time) or collect the actual communication response time measured by the data transmitter 130.
[0061] As a result, the data processor 110 receives the measured actual communication response time (or the communication response time collected from the data transmitter), estimates the communication response time and the data size by the estimator 120, and compares and analyzes the actual communication response time and the estimated communication response time according to the data size.
[0062] The result data processor 110 corrects the estimation parameters W and b used by the estimator 120 when estimating the communication response time based on the comparison and analysis results, and updates the estimation parameters W and b of the estimator 120 with the corrected estimation parameters W and b. By repeatedly correcting and updating the estimation parameters W and b in this manner, the estimator 120 can estimate a more accurate communication response time that is close to the actual communication response time by using the corrected estimation parameters W and b.
[0063] However, in the present embodiment, the result data processor 110 may transmit the actual communication response time, the estimated communication response time, and the data size to the host 300 to correct the estimated parameters W and b of the estimator 120. Then, the result data processor 110 may receive the corrected estimated parameters W and b from the host 300 and update the estimated parameters W and b of the estimator 120.
[0064] Figure 3A and Figure 3B is a diagram for describing the difference between a conventional event-based scheduling method and a deterministic scheduling method according to the present embodiment.
[0065] Figure 3A is a diagram for describing a traditional event-based scheduling method, and Figure 3B is a diagram for describing the deterministic scheduling method according to the present embodiment.
[0066] refer to Figure 3A , the conventional event-based scheduling method is based on the assumption that the result data (or message) processed by the application A of the first controller 100 is sent to the application B of the second controller 200, and the result data (or message) processed by the application B of the second controller 200 that has received the result data (or message) from the first controller is sent to the application C of the first controller 100. In this case, the sending time Rs and the response time Rr become flexible according to the size of the data (or message). As a result, the response time T1 of the message response time also becomes flexible according to the sending time Rs and the response time Rr.
[0067] However, referring to the embodiment Figure 3B , when the result data (or message) processed by the application A of the first controller 100 is transmitted to the application B of the second controller 200, the transmission time Rs' is estimated and added to the processing time WCET_A of the application A to set the offset B. In addition, when the result data (or message) processed by the application B of the second controller 200 is retransmitted to the application C of the first controller 100, the response time Rr' is estimated and added to the processing time WCET_B of the application B to set the offset C.
[0068] As described above, the apparatus and method according to an embodiment of the present disclosure can measure or estimate a communication response time that is close to the actual consumed time (e.g., the actual message processing and sending time during communication processing), and thus determine the starting point offset of the application with high accuracy, so that deterministic scheduling can be applied during communication between different controllers of the vehicle.
[0069] Although the present disclosure has been disclosed with reference to the embodiments shown in the accompanying drawings, the embodiments are for illustrative purposes only, and those skilled in the art will appreciate that various modifications and other equivalent embodiments may be made. Therefore, the true technical scope of the present disclosure should be defined by the following claims. In addition, for example, the embodiments described in this specification may be implemented with methods or processes, devices, software programs, data streams or signals. Although features are discussed only in a single context (e.g., discussed only in a method), the features discussed may be implemented in another type (e.g., a device or program). The device may be implemented with suitable hardware, software or firmware. The method may be implemented in a device such as a processor, which generally refers to a processing device including a computer, a microprocessor, an integrated circuit or a programmable logic device. The processor also includes a communication device, such as a computer, a cellular phone, a personal digital assistant (PDA) and another device that facilitates information communication between end users.
[0070] Although exemplary embodiments of the present disclosure have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions may be made without departing from the scope and spirit of the present disclosure as defined in the appended claims. Therefore, the true technical scope of the present disclosure should be defined by the following claims.
Claims
1. A device for estimating communication response time between different controllers of a vehicle, the device comprising: A data transmitter configured to measure an actual message response time required after a first controller sends a message to a second controller until a response message is received from the second controller; an estimator configured to receive a size of the message from a data transmitter of the first controller and reflect the received size according to a specified estimation logic to estimate the message response time; as well as A result data processor is configured to correct the estimation parameters used by the estimator when estimating the message response time based on the difference between the actual message response time and the estimated message response time obtained by the estimator, and update the existing estimation parameters of the estimator with the corrected estimation parameters.
2. The apparatus according to claim 1, further comprising a host, wherein the host is configured to receive an actual message response time of the message and the estimated message response time obtained by the estimator from a result data processor of the first controller, and execute a function of the result data processor to replace the result data processor.
3. The device according to claim 1, wherein: The message response time includes a communication response time calculated by adding a transmission time of the message and a response time of the message, the communication response time indicating a time consumed for communication between the first controller and the second controller.
4. The device according to claim 3, wherein: The communication response time corresponds to a time calculated by subtracting a message response time consumed by the second controller from a message response time measured by the first controller.
5. The device according to claim 1, wherein: When a message processed by an application of the first controller is sent to the second controller, reflecting a message sending time corresponding to 1 / 2 of the estimated communication response time to set a start offset of the application to be executed by the second controller according to a deterministic scheduling method, Wherein, when the message processed by the application of the second controller is resent to the application of the first controller, according to the deterministic scheduling method, the message response time corresponding to 1 / 2 of the estimated communication response time is reflected to set the starting offset of the application to be executed by the first controller.
6. The device according to claim 1, wherein: In order to estimate the communication response time close to the actual communication response time, the estimator repeatedly performs the estimation of the message response time and the updating of the estimation parameters.
7. The device according to claim 1, wherein: The time values between the first controller and the second controller have the same time stamp synchronized by a precision time protocol.
8. A method for estimating communication response time between different controllers of a vehicle, the method comprising: measuring, by a data transmitter, an actual message response time required after a first controller sends a message to a second controller until a response message is received from the second controller; receiving, by an estimator, a size of the message from the data transmitter of the first controller, and reflecting the received size according to a specified estimation logic to estimate the message response time; as well as Through a result data processor, based on the difference between the actual message response time and the estimated message response time obtained by the estimator, the estimation parameters used by the estimator when estimating the message response time are corrected, and the existing estimation parameters of the estimator are updated with the corrected estimation parameters.
9. The method according to claim 8, further comprising performing the function of the result data processor by a host instead of the result data processor, in, When executing the function of the result data processor, the host receives the actual message response time of the message from the result data processor of the first controller and the estimated message response time obtained by the estimator, corrects the estimation parameters used by the estimator when estimating the message response time based on the difference between the two, and sends the corrected estimation parameters to the result data processor.
10. The method according to claim 8, wherein: the result data processor correcting the estimation parameter used by the estimator when estimating the message response time based on the difference between the communication response times included in the message response time, The communication response time indicates a time consumed for communication between the first controller and the second controller and is calculated by adding the message sending time and the message response time.
11. The method according to claim 10, wherein: The communication response time is a time calculated by subtracting a message response time consumed by the second controller from a message response time measured by the first controller.
12. The method according to claim 8, wherein: When a message processed by an application of the first controller is sent to the second controller, reflecting a message sending time corresponding to 1 / 2 of the estimated communication response time to set a start offset of the application to be executed by the second controller according to a deterministic scheduling method, Wherein, when the message processed by the application of the second controller is resent to the application of the first controller, according to the deterministic scheduling method, the message response time corresponding to 1 / 2 of the estimated communication response time is reflected to set the starting offset of the application to be executed by the first controller.
13. The method according to claim 8, wherein: In order to estimate the communication response time close to the actual communication response time, the estimator repeatedly performs the estimation of the message response time and the updating of the estimation parameters.
Citation Information
Patent Citations
Network apparatus for designing collision avoidance and Method for controlling the same
KR1020200026508A
A vehicle and method for controlling communication thereof
KR1020180077958A
Devices, methods, and apparatuses for computing round-trip time of a message
US20140253386A1