Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7036664B2 - Control device and log acquisition device that perform log recording with time stamp - Google Patents
[go: Go Back, main page]

JP7036664B2 - Control device and log acquisition device that perform log recording with time stamp - Google Patents

Control device and log acquisition device that perform log recording with time stamp Download PDF

Info

Publication number
JP7036664B2
JP7036664B2 JP2018097535A JP2018097535A JP7036664B2 JP 7036664 B2 JP7036664 B2 JP 7036664B2 JP 2018097535 A JP2018097535 A JP 2018097535A JP 2018097535 A JP2018097535 A JP 2018097535A JP 7036664 B2 JP7036664 B2 JP 7036664B2
Authority
JP
Japan
Prior art keywords
time
time stamp
log
control device
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018097535A
Other languages
Japanese (ja)
Other versions
JP2019205016A (en
Inventor
哲夫 中野
一 芹沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Astemo Ltd
Original Assignee
Hitachi Astemo Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Astemo Ltd filed Critical Hitachi Astemo Ltd
Priority to JP2018097535A priority Critical patent/JP7036664B2/en
Publication of JP2019205016A publication Critical patent/JP2019205016A/en
Application granted granted Critical
Publication of JP7036664B2 publication Critical patent/JP7036664B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Description

本発明は、車両内の複数の装置で時刻を同期する機能を有したシステムに係り、タイムスタンプ付きのログ記録を行う制御装置およびログ取得装置に関する。 The present invention relates to a system having a function of synchronizing time with a plurality of devices in a vehicle, and relates to a control device and a log acquisition device for recording a log with a time stamp.

従来、図10に示すように車両内の複数の制御装置(ナビ901、走行支援装置902、エンジン903、ブレーキ904)の間を通信インタフェース経由で接続し、それらの制御装置に搭載したタイマの時刻を同期させ、ログを取得する際に同期したタイマの時刻を用いてタイムスタンプを付与することが知られている。 Conventionally, as shown in FIG. 10, a plurality of control devices (navigation 901, travel support device 902, engine 903, brake 904) in the vehicle are connected via a communication interface, and the time of a timer mounted on those control devices is connected. It is known that a time stamp is given by using the time of the synchronized timer when the log is acquired.

上記のように取得したタイムスタンプ付きのログを外部のログ取得装置114を用いてログを取得し、そのログを用いて複数の制御装置が連携したシステム全体での動作の分析を行っている。上記のタイムスタンプを付与したログの取得を行うシステムとしては、例えば特許文献1に記載されたデータ処理システムが提案されている。 The log with the time stamp acquired as described above is acquired by using an external log acquisition device 114, and the operation of the entire system in which a plurality of control devices are linked is analyzed using the log. As a system for acquiring the log with the above time stamp, for example, the data processing system described in Patent Document 1 has been proposed.

また、図11に示すように複数の車両1001及び車両1002において、時刻を含む車両の情報をそれぞれの車両において記録し、例えば事故が起きた際に記録した自車両の
記録情報1003および相手車両の記録情報1004を用いて事故の解析を行うことが知られている。上記のシステムとしては、例えば特許文献2に記載された運転情報処理装置が提案されている。
Further, as shown in FIG. 11, in a plurality of vehicles 1001 and 1002, vehicle information including the time is recorded in each vehicle, and for example, the recorded information 1003 of the own vehicle and the other vehicle recorded when an accident occurs. It is known to analyze an accident using the recorded information 1004. As the above system, for example, the operation information processing apparatus described in Patent Document 2 has been proposed.

これらのシステムにおいて、複数の機器または複数の車両にて取得したログにて動作の解析を行う場合には、各々のログに付与されたタイムスタンプに基づいて、ログに記録された事象を発生順にたどることで動作分析を行う。ただし、複数の装置あるいは複数の車両において記録したログのタイムスタンプの付き合わせを行う為に、それぞれの装置に備えたタイマの時刻がそろっている必要があり、その為に事前に装置間のタイマの時刻を揃える処理すなわち時刻同期処理を実施する。 In these systems, when analyzing the operation using logs acquired by multiple devices or multiple vehicles, the events recorded in the logs are sorted in the order of occurrence based on the time stamps given to each log. Perform motion analysis by tracing. However, in order to match the time stamps of the logs recorded in multiple devices or multiple vehicles, it is necessary that the timers provided for each device have the same time, and for that purpose, the timers between the devices must be the same. The process of aligning the time of the above, that is, the time synchronization process is performed.

例えば複数の車両にまたがるようなシステムの場合には、基準となる時刻を外部から、例えばGPS(Global Positioning System)電波あるいは標準周波数報時電波などを受信した上で、その受信した時刻に基づいて時刻同期処理を行う。つまり上記のような時刻同期処理を行った上で、ログを取得しタイムスタンプの付与を行っている。 For example, in the case of a system that spans multiple vehicles, the reference time is set based on the received time after receiving, for example, GPS (Global Positioning System) radio waves or standard frequency reporting radio waves. Perform time synchronization processing. That is, after performing the time synchronization process as described above, the log is acquired and the time stamp is added.

特開2015-35158号公報JP-A-2015-35158 特許第3861811号公報Japanese Patent No. 3861811

上記したシステムにおいては、タイムスタンプを付与したログを記録する為に、予め外部から基準となる時刻の受信処理や、装置間の通信にて時刻情報を配信することで時刻同期の処理を行う必要がある。また、GPSや標準周波数報時電波などの受信により時刻を受信する場合には分単位の時間を要する場合もあり、時刻を取得して装置間で時刻同期処理を完了するまでに相当の時間を要する。これらの処理が完了するまでの間は、ログの記録が開始できないあるいはログを記録した場合であっても正しいタイムスタンプを付与することが出来ないという課題がある。ひいてはそれらのログを用いた動作解析にも支障が生ずる。 In the above system, in order to record a log with a time stamp, it is necessary to perform time synchronization processing by receiving reference time from the outside in advance and distributing time information by communication between devices. There is. In addition, it may take minutes to receive the time by receiving GPS or standard frequency radio waves, and it takes a considerable amount of time to acquire the time and complete the time synchronization process between the devices. It takes. Until these processes are completed, there is a problem that log recording cannot be started, or even if the log is recorded, a correct time stamp cannot be given. As a result, there is a problem in the operation analysis using those logs.

本発明の目的は、時刻同期が完了する前に記録したログにおいても正しいタイムスタンプを付与することを実現した、タイムスタンプ付きログ記録を行う制御装置およびログ取得装置を提供することにある。 An object of the present invention is to provide a control device and a log acquisition device for performing log recording with a time stamp, which can give a correct time stamp even to a log recorded before the time synchronization is completed.

上記課題を解決するために本発明は、車両に搭載される機器と通信する為の通信部と、前記車両に搭載されるタイマと、前記車両に搭載されるログ情報を保存するための記録部と、前記通信部を用いて基準時刻を保有した基準時刻保持装置と時刻同期処理を行い、時刻同期されたタイムスタンプを前記ログ情報に付与して記録する制御部を備えたタイムスタンプ付きログ記録を行う制御装置において、前記制御部は、装置が起動後の初めての時刻同期処理の完了以前に記録するログの記録情報には、前記タイマのタイマ値を元に時刻同期されていないタイムスタンプを仮付与し、時刻同期処理が完了後の何れかの時点で、時刻同期処理で得られた情報を用いて、前記仮付与したタイムスタンプを時刻同期されたタイムスタンプに修正し記録することを特徴とする。 In order to solve the above problems, the present invention has a communication unit for communicating with a device mounted on a vehicle, a timer mounted on the vehicle, and a recording unit for storing log information mounted on the vehicle. And, log recording with a time stamp provided with a control unit that performs time synchronization processing with a reference time holding device that holds a reference time using the communication unit, and adds and records a time stamp synchronized with the time to the log information. In the control device that performs The feature is that the temporarily assigned time stamp is corrected to the time-synchronized time stamp and recorded by using the information obtained in the time synchronization process at any time after the time synchronization process is completed. And.

本発明によれば、時刻同期処理が完了する以前であっても、ログに正しいタイムスタンプを付与して記録を行う制御装置、あるいは正しいタイムスタンプが付与されたログの取得装置を提供することが出来る。それによって、それらの制御装置で取得されたログを用いた解析が容易になる。 According to the present invention, it is possible to provide a control device for adding a correct time stamp to a log and recording the log even before the time synchronization process is completed, or a device for acquiring a log with the correct time stamp. You can. This facilitates analysis using the logs acquired by those control devices.

実施例1の制御装置の構成図Configuration diagram of the control device of the first embodiment 実施例1のタイムスタンプ算出処理の説明図Explanatory diagram of time stamp calculation processing of Example 1 実施例1のレート偏差算出処理の説明図Explanatory drawing of rate deviation calculation processing of Example 1 実施例1の動作の説明図Explanatory drawing of operation of Example 1 実施例1のログ記録内容の説明図Explanatory drawing of log recording contents of Example 1 実施例1のタイムスタンプ修正処理の説明図Explanatory drawing of time stamp correction processing of Example 1 実施例1のログ取得装置にて取得するログ内容の説明図Explanatory diagram of log contents acquired by the log acquisition device of the first embodiment 実施例2の伝送遅延時間算出処理の説明図Explanatory drawing of transmission delay time calculation process of Example 2 実施例2のタイムスタンプ修正処理の説明図Explanatory drawing of time stamp correction processing of Example 2 車両内のシステムの構成図Configuration diagram of the system in the vehicle ログ記録を利用する状況の説明図Explanatory diagram of the situation of using log recording

以下本発明の実施例を、図面を用いて説明する。 Hereinafter, examples of the present invention will be described with reference to the drawings.

図1~図7は実施例1の説明図である。図1は制御装置の構成図である。図2はタイムスタンプ算出処理の説明図、図3はレート偏差算出処理の説明図である。図4は動作の説明図、図5はログ記録内容の説明図である。図6はタイムスタンプ修正処理の説明図、図7はログ取得装置にて取得するログ内容の説明図である。 1 to 7 are explanatory views of the first embodiment. FIG. 1 is a configuration diagram of a control device. FIG. 2 is an explanatory diagram of the time stamp calculation process, and FIG. 3 is an explanatory diagram of the rate deviation calculation process. FIG. 4 is an explanatory diagram of the operation, and FIG. 5 is an explanatory diagram of the log recording contents. FIG. 6 is an explanatory diagram of the time stamp correction process, and FIG. 7 is an explanatory diagram of the log contents acquired by the log acquisition device.

実施例1は、時刻同期処理よりも以前に付与されたタイムスタンプを、時刻同期処理で取得したパラメータを用いて修正を行う場合の例である。 The first embodiment is an example in which the time stamp given before the time synchronization process is corrected by using the parameters acquired in the time synchronization process.

まず図1を用いて実施例1の制御装置の構成を説明する。この図1にて示す各種の制御装置は、図10に示したように車両内に設置された制御装置の代表的な構成図を示すものである。制御装置の構成は、車両101と、車両内に設置された第一制御装置102と、時刻信号を受信する為のアンテナ103と、受信した信号から時刻情報を取得する時刻取得部104と、第一制御装置の時刻同期処理の制御を行う制御部105と、通信インタフェース106と、前記通信インタフェース106が接続された通信バス107と、第二制御装置108と、通信インタフェース109と、第二制御装置の時刻同期処理およびログ取得処理を制御する制御部110と、自装置にて備えるローカルタイマ111と、ログ記録部112と、第二制御装置と同等の構成から成る第三制御装置113と、車両の外部から接続して第二制御装置108あるいは第三制御装置113に記録されたログを取得する為のログ取得装置114と、通信インタフェース115と、ログ取得装置の制御部116と、取得したログを格納するログ蓄積部117から構成されている。 First, the configuration of the control device of the first embodiment will be described with reference to FIG. The various control devices shown in FIG. 1 show typical configuration diagrams of the control devices installed in the vehicle as shown in FIG. 10. The control device consists of a vehicle 101, a first control device 102 installed in the vehicle, an antenna 103 for receiving a time signal, a time acquisition unit 104 for acquiring time information from the received signal, and a first control device. (1) A control unit 105 that controls the time synchronization process of the control device, a communication interface 106, a communication bus 107 to which the communication interface 106 is connected, a second control device 108, a communication interface 109, and a second control device. A control unit 110 that controls time synchronization processing and log acquisition processing, a local timer 111 provided in the own device, a log recording unit 112, a third control device 113 having the same configuration as the second control device, and a vehicle. The log acquisition device 114 for acquiring the log recorded in the second control device 108 or the third control device 113 by connecting from the outside, the communication interface 115, the control unit 116 of the log acquisition device, and the acquired log. It is composed of a log storage unit 117 for storing.

図1に示した構成では、第一制御装置102が時刻同期の基準となるマスターとなり、第二制御装置108及び第三制御装置113は自身の時刻をマスターの時刻に合わせるスレーブの役割を持っている。第一制御装置102の時刻取得部104としては例えば、GPSの受信器や標準周波数報時電波の受信器であって、受信した時点での標準時刻を取得する。更に時刻取得部104はその内部にタイマを備え、取得した標準時刻を内部のタイマに設定し、一旦設定後は内部タイマが自律的に時を刻む。制御部105からの時刻の取得要求があった場合には、内部タイマを元に時刻情報を出力する。またGPS等からの標準時刻の受信は定期的に行い、その都度内部タイマの値を更新する。さらに第一制御装置102は時刻取得部104の時刻を、制御部105の制御により、通信インタフェース106を介して取得した時刻情報を配信することで時刻同期の処理を行う。 In the configuration shown in FIG. 1, the first control device 102 serves as a master that serves as a reference for time synchronization, and the second control device 108 and the third control device 113 have the role of a slave that adjusts its own time to the master time. There is. The time acquisition unit 104 of the first control device 102 is, for example, a GPS receiver or a standard frequency reporting radio wave receiver, and acquires a standard time at the time of reception. Further, the time acquisition unit 104 is provided with a timer inside, and the acquired standard time is set in the internal timer, and once set, the internal timer autonomously ticks the time. When there is a time acquisition request from the control unit 105, the time information is output based on the internal timer. In addition, the standard time is received from GPS or the like on a regular basis, and the value of the internal timer is updated each time. Further, the first control device 102 performs time synchronization processing by distributing the time of the time acquisition unit 104 via the communication interface 106 under the control of the control unit 105.

一方第二制御装置108のローカルタイマ111は、例えば装置が起動した時点から計時を開始し自律的に時を刻むものであって、制御部110からの要求に応じてその時点のタイマ値を出力する。第一制御装置102から送信された時刻情報は、通信インタフェース109を介して受信され、制御部110ではその受信した時刻情報とローカルタイマ111を用いてタイムスタンプを生成し、ログ記録部112にログの記録を行う。 On the other hand, the local timer 111 of the second control device 108 starts timing at the time when the device is started and automatically ticks the time, and outputs the timer value at that time in response to the request from the control unit 110. do. The time information transmitted from the first control device 102 is received via the communication interface 109, the control unit 110 generates a time stamp using the received time information and the local timer 111, and logs to the log recording unit 112. Make a record of.

なお、制御装置が起動後のローカルタイマ111は、起動時から計時を開始するものであっても、例えば別途保存された以前のタイマ値を読み込みその値から続けて計時するようなものであってもどちらでも構わない。また、通信バス107としては、CAN(Controller Area Network)やEthernet、あるいはFlexRayなどの車両内の機器の通信バスである。 It should be noted that the local timer 111 after the control device is started is such that even if the timer starts counting from the time of starting, for example, the previous timer value saved separately is read and the time is continuously measured from that value. It doesn't matter which one. The communication bus 107 is a communication bus for devices in the vehicle such as CAN (Control Area Network), Ethernet, or FlexRay.

次に図2~図4を用いて、第二制御装置108における時刻同期されたタイムスタンプの生成手順について説明する。なお、一般的な時刻同期の処理手順としてはIEEE Std 802.1AS規格やIEE Std 1588規格などがあり、以下の説明はこれらの処理手順と類似の処理手順となっている。 Next, a procedure for generating a time-synchronized time stamp in the second control device 108 will be described with reference to FIGS. 2 to 4. In addition, as a general time synchronization processing procedure, there are IEEE Std 802.1AS standard, IEEE Std 1588 standard, and the like, and the following description is a processing procedure similar to these processing procedures.

まず、第一制御装置102の制御部105は、時刻同期の開始を示すSycnメッセージ201を送信し、さらにそのメッセージを送信した時点の時刻T1を時刻取得部104から取得する。また第二制御装置108では前記のSyncメッセージ201を受信した時点のローカルタイマ111のタイマ値T2を記録する。次に第一制御装置102は先ほどSyncメッセージを送信した時点の時刻T1の値を、Followupメッセージ202に格納して送信する。第二制御装置108では受信したFollowupメッセージに格納されたT1の値を取得し記録する。配信された時刻T1の値や、受信したタイマの時刻T2の値は、図4に示すように、時刻同期処理の履歴として記録する。上記のSyncメッセージおよびFollowupメッセージの送信は繰返し行い、その都度最新の時刻がマスター側からスレーブ側に配信される。 First, the control unit 105 of the first control device 102 transmits a Sysn message 201 indicating the start of time synchronization, and further acquires the time T1 at the time of transmitting the message from the time acquisition unit 104. Further, the second control device 108 records the timer value T2 of the local timer 111 at the time when the Sync message 201 is received. Next, the first control device 102 stores the value of the time T1 at the time when the Sync message is transmitted in the Followup message 202 and transmits the value. The second control device 108 acquires and records the value of T1 stored in the received Followup message. The value of the delivered time T1 and the value of the received timer time T2 are recorded as a history of the time synchronization process as shown in FIG. The above Sync message and Follow-up message are repeatedly transmitted, and the latest time is delivered from the master side to the slave side each time.

一旦SyncメッセージおよびFollowupメッセージの受信が行われた以降に、第二制御装置108にてログの記録が発生しタイムスタンプの付与が必要となった際に、その制御部110はその時点のタイムスタンプ値を以下のように算出する。 When a log is recorded by the second control device 108 and a time stamp needs to be assigned after the Sync message and the Follow-up message have been received, the control unit 110 has a time stamp at that time. Calculate the value as follows.

まずログの記録が発生した時点でのローカルタイマ111からタイマ値T3を取得する。さらに図4に示す時刻同期履歴から直近に受信があった履歴情報を用いて、このタイマ値T3とT2の差分(T3-T2)を算出する。これにより、先にSyncメッセージを受信した時点からの経過時間が求められる。ただしこの経過時間はローカルタイマ111で計測された時間である為、ローカルタイマ111の時間の進み方が、本来の時間の進み方よりも早いあるいは遅い場合がある。その為、タイマの時間の進み方を補正する為の係数、すなわちレート偏差R(詳細は後述)を乗じる。この補正後の経過時間を配信された時刻T1に加算することで、タイムスタンプの値を求める。すなわち、以下の式によりログの記録が発生した時点のタイムスタンプの値を算出する。なお上述のように計算に用いる配信時刻T1、及び受信時のタイマ値T2はログ記録が発生する以前の最も直近の配信時刻を用いる。
タイムスタンプ時刻TL=配信時刻T1+(経過時間(T3-T2)×レート偏差R) …式1
First, the timer value T3 is acquired from the local timer 111 at the time when the log recording occurs. Further, the difference (T3-T2) between the timer values T3 and T2 is calculated by using the history information of the latest reception from the time synchronization history shown in FIG. As a result, the elapsed time from the time when the Sync message is first received can be obtained. However, since this elapsed time is the time measured by the local timer 111, the time advance of the local timer 111 may be faster or slower than the original time advancement. Therefore, a coefficient for correcting the progress of the timer time, that is, a rate deviation R (details will be described later) is multiplied. The value of the time stamp is obtained by adding the elapsed time after this correction to the delivered time T1. That is, the value of the time stamp at the time when the log recording occurs is calculated by the following formula. As described above, the delivery time T1 used for the calculation and the timer value T2 at the time of reception use the most recent delivery time before the log recording occurs.
Timestamp time TL = delivery time T1 + (elapsed time (T3-T2) x rate deviation R) ... Equation 1

上記の式1においてレート偏差Rは、タイマの時間の進み方を補正する為の係数であるがその求め方について以下に説明する。ローカルタイマ111はその時計の進み方が、ママスター側の進み方と必ずしも一致しない。そこで、そのローカルタイマの進み方に対するマスター側の進み方の比率を表したものがレート偏差Rである。 In the above equation 1, the rate deviation R is a coefficient for correcting how the timer advances, and how to obtain it will be described below. The advance of the clock of the local timer 111 does not always match the advance of the master. Therefore, the rate deviation R represents the ratio of the advance of the master side to the advance of the local timer.

図3はレート偏差Rを算出する手順の説明図であり、同図を用いてその手順について述べる。既に図2において説明した時刻の配信と同様にして、第一制御装置はSyncメッセージ301を送信し、さらにそのメッセージを送信した時点の時刻T1aを後続するFollowupメッセージ302に格納して送信する。一方第二制御装置では、Syncメッセージを受信した時点でのローカルタイマ111のタイマ値T2aと、後続するFollowup302に格納されたT1aの値を、図4に示す時刻同期履歴の例えば履歴情報401として記録する。同図に示す例では初めに受けたT1aの値が00時10分0.000秒であり、T2aの値が60秒だった場合の例を示している。 FIG. 3 is an explanatory diagram of the procedure for calculating the rate deviation R, and the procedure will be described with reference to the figure. Similar to the delivery of the time already described with reference to FIG. 2, the first control unit transmits the Sync message 301, and further stores the time T1a at the time of transmitting the message in the subsequent Followup message 302 and transmits the message. On the other hand, in the second control device, the timer value T2a of the local timer 111 at the time of receiving the Sync message and the value of T1a stored in the subsequent Followup 302 are recorded as, for example, history information 401 of the time synchronization history shown in FIG. do. In the example shown in the figure, an example is shown in which the value of T1a initially received is 00:10: 0.00 and the value of T2a is 60 seconds.

SyncメッセージおよびFollowupメッセージは繰返し行われ、上記と同様にSyncメッセージ303、Followupメッセージ304が送信され、受信した第二制御装置側で1回目と同様に送信時刻T1bと受信時刻T2bを履歴情報402として記録する。
2回目以降にSyncメッセージ、Followupメッセージが受信された場合に、第二制御装置側では、前回の配信時刻と今回の配信時刻の差すなわち経過時間(T1b-T1a)を計算する。さらに、前回の受信時刻と今回の差すなわちローカルタイマの経過時間(T2b-T2a)を計算し、以下の計算式にてレート偏差Rを求める。
レート偏差R=経過時間(T1b-T1a)÷経過時間(T2b-T2a) …式2
The Sync message and the Follow-up message are repeated, and the Sync message 303 and the Follow-up message 304 are transmitted in the same manner as described above. Record.
When the Sync message and the Follow-up message are received from the second time onward, the second control device side calculates the difference between the previous delivery time and the current delivery time, that is, the elapsed time (T1b-T1a). Further, the difference between the previous reception time and the current time, that is, the elapsed time of the local timer (T2b-T2a) is calculated, and the rate deviation R is obtained by the following formula.
Rate deviation R = elapsed time (T1b-T1a) ÷ elapsed time (T2b-T2a) ... Equation 2

例えば図4に示す例では、履歴情報402の記録時に、履歴情報401を用い配信時刻の経過時間を計算する。同図に示す例では、配信時刻の経過時間は(10分20.000秒-10分0.000秒)より経過時間は20.0000秒となる。またローカルタイマの経過時間は(79.980秒-60.000秒)より19.980秒となる。さらにこれらの比であるレート偏差は(20.0000秒÷19.980秒)より1.001すなわち100.1%となる。つまり第二制御装置のローカルタイマが1秒進む間に、基準となる時刻は1.001秒進んでいることを示している。したがってこのレート偏差をローカルタイマの経過時間に積算することで、基準となる時刻の経過時間に換算することができる。上記のレート偏差は時刻同期のメッセージを受信する都度に計算を行い、タイムスタンプ値を求める際には常に最新の値を用いるものである。 For example, in the example shown in FIG. 4, when the history information 402 is recorded, the elapsed time of the delivery time is calculated using the history information 401. In the example shown in the figure, the elapsed time of the delivery time is 20.000 seconds from (10 minutes 20.000 seconds-10 minutes 0.000 seconds). The elapsed time of the local timer is 19.980 seconds from (79.980 seconds-60.000 seconds). Further, the rate deviation, which is a ratio of these, is 1.001, that is, 100.1% from (20.0000 seconds ÷ 19.980 seconds). That is, it indicates that the reference time is advanced by 1.001 seconds while the local timer of the second control device is advanced by 1 second. Therefore, by integrating this rate deviation with the elapsed time of the local timer, it can be converted into the elapsed time of the reference time. The above rate deviation is calculated each time a time synchronization message is received, and the latest value is always used when obtaining the time stamp value.

次に図5を用いて第二制御装置におけるログへのタイムスタンプの付与の動作について説明する。 Next, the operation of adding a time stamp to the log in the second control device will be described with reference to FIG.

同図はログの記録内容の一例を示すもので501aないし505aはタイムスタンプの修正前の記録内容を示し、501bないし505bはタイムスタンプ修正後の記録内容を示している。また記録する内容としてはタイムスタンプの値、タイムスタンプの種別、タイムスタンプの修正の要否、ログの記録情報から成っている。 The figure shows an example of the recorded contents of the log, where 501a to 505a show the recorded contents before the time stamp is corrected, and 501b to 505b show the recorded contents after the time stamp is corrected. The contents to be recorded consist of the value of the time stamp, the type of the time stamp, the necessity of correcting the time stamp, and the recorded information of the log.

同図において501aは一回目の時刻同期のメッセージを受信する以前に発生したログである。この場合タイムスタンプの値として、ローカルタイマ111のタイマ値を暫定で記録し、タイマスタンプの種別としてローカル時刻であることを同時に記録する。またこのタイムスタンプ値は時刻同期処理完了後に修正が必要となる為、修正要否情報として修正が必要である旨を記録する。 In the figure, 501a is a log generated before receiving the first time synchronization message. In this case, the timer value of the local timer 111 is provisionally recorded as the value of the time stamp, and the local time is simultaneously recorded as the type of the timer stamp. In addition, since this time stamp value needs to be corrected after the time synchronization process is completed, it is recorded that the correction is necessary as the correction necessity information.

次に502aは時刻同期のSyncメッセージを受信した際のログである。タイムスタンプ値としてはFollowupメッセ時にて受信した時刻値を記録し、タイムスタンプ値としては時刻同期済みの時刻であることを記録する。またタイムスタンプの修正は不要であるため、修正要否情報として不要である旨を記録する。 Next, 502a is a log when a Sync message of time synchronization is received. As the time stamp value, the time value received at the time of the Followup message is recorded, and as the time stamp value, it is recorded that the time is synchronized. In addition, since it is not necessary to correct the time stamp, it is recorded that it is not necessary as correction necessity information.

503aは一回目の時刻同期メッセージ受信後のログである。この時点ではレート偏差がまだ一度も計算されていないため、ログ記録501aの場合と同様にタイムスタンプ値としてローカルタイマの値を記録する。その他の項目についてもログ記憶501aと同様に記録する。 Reference numeral 503a is a log after receiving the first time synchronization message. At this point, since the rate deviation has never been calculated, the value of the local timer is recorded as the time stamp value as in the case of log recording 501a. Other items are also recorded in the same manner as in the log storage 501a.

504aは2回目の時刻同期のSyncメッセージを受信した際のログであり、ログ記録502aと同様に記録を行う。 Reference numeral 504a is a log when the Sync message of the second time synchronization is received, and recording is performed in the same manner as the log recording 502a.

505aは時刻同期完了しレート偏差の計算も終了後のログ記録であり、2回目の時刻同期メッセージで受信した配信時刻と、その際に計算されたレート偏差を元に図2に示した手順にてタイムスタンプ値を計算して記録する。タイムスタンプ値としては時刻同期済みの時刻であることを記録する。またタイムスタンプの修正は不要であるため、修正要否情報として不要である旨を記録する。 Reference numeral 505a is a log recording after the time synchronization is completed and the calculation of the rate deviation is completed. The procedure shown in FIG. 2 is based on the delivery time received in the second time synchronization message and the rate deviation calculated at that time. And calculate and record the time stamp value. Record that the time is synchronized as the time stamp value. In addition, since it is not necessary to correct the time stamp, it is recorded that it is not necessary as correction necessity information.

続いて、タイムスタンプの修正動作について説明する。ログ記録501a、503aは上記したように時刻同期が完了する以前のログである為、一時的にローカルタイマの値をタイムスタンプとして記録してある為その修正を行う。 Subsequently, the operation of correcting the time stamp will be described. Since the log records 501a and 503a are logs before the time synchronization is completed as described above, the value of the local timer is temporarily recorded as a time stamp, and therefore the correction is performed.

まず図6を用いて、時刻同期のメッセージを受信する以前のログ記録のタイムスタンプの時刻算出手順について説明する。既に図2にて説明したのと同様にして、第一制御装置102から一回目のSyncメッセージ601、及びFollowupメッセージ602が送信され、受信した第二制御装置108では、送信時刻T1cと受信時のローカルタイマ111の値T2cを図4に示す時刻同期履歴として記録する。 First, with reference to FIG. 6, a procedure for calculating the time of the time stamp of the log recording before receiving the time synchronization message will be described. The first Sync message 601 and the Follow-up message 602 are transmitted from the first control device 102 in the same manner as already described with reference to FIG. 2, and the second control device 108 that has received the transmission time T1c and the time of reception. The value T2c of the local timer 111 is recorded as the time synchronization history shown in FIG.

上記の時刻同期メッセージが配信される以前に発生したログのタイムスタンプ値は以下のように算出する。まずログに記録されたローカルタイマ値T4cと、その後に発生した時刻同期メッセージ受信時のローカルタイマ値を図4の時刻同期履歴を用いて、このタイマ値の差分(T2c-T4c)すなわち時刻同期メッセージの受信時点からの遡行時間算出する。さらにこの遡行時間にレート偏差を積算し基準となる時刻の時間の遡行量に換算する。この時用いるレート偏差の値は2回目の時刻同期メッセージの受信時に算出した値を用いる。そしてこの補正後の遡行時間を、配信された時刻から減算することでタイムスタンプの値を求めることが出来る。すなわち、以下の式により時刻同期メッセージを受信する以前のタイムスタンプの値を算出する。
時刻同期完了以前のタイムスタンプ時刻TLc=配信時刻T1c-(遡行時間(T2c-T4c)×レート偏差R) …式3
The time stamp value of the log generated before the above time synchronization message is delivered is calculated as follows. First, the difference between the local timer value T4c recorded in the log and the local timer value when the time synchronization message generated after that is received is the difference between the timer values (T2c-T4c), that is, the time synchronization message. Calculate the retroactive time from the time of reception. Furthermore, the rate deviation is integrated into this retroactive time and converted into the retroactive amount of the time as the reference time. As the value of the rate deviation used at this time, the value calculated at the time of receiving the second time synchronization message is used. Then, the value of the time stamp can be obtained by subtracting the retroactive time after this correction from the delivered time. That is, the value of the time stamp before receiving the time synchronization message is calculated by the following formula.
Time stamp time before the completion of time synchronization Time TLc = Delivery time T1c- (retroactive time (T2c-T4c) x rate deviation R) ... Equation 3

例えば図5に示したログを例に説明を行う。この例では第二制御装置108の制御部110は、2回目の時刻同期メッセージを受信しレート偏差の計算が完了し、タイムスタンプの修正に必要なパラメータが用意できた後に、ログ記録の内で修正要とされているログ記録501a、およびログ記録503aを抽出し修正を行う。 For example, the log shown in FIG. 5 will be described as an example. In this example, the control unit 110 of the second control device 108 receives the second time synchronization message, completes the calculation of the rate deviation, prepares the parameters necessary for correcting the time stamp, and then records the log. The log record 501a and the log record 503a that are required to be corrected are extracted and corrected.

ログ記録501aはそのタイムスタンプ値(30.000秒)と、図4の時刻同期履歴に記録された履歴情報401より一回目の時刻同期メッセージを受信した際のローカルタイマ値(60.000秒)より遡行時間(60.000秒-30.000秒)として30.000秒を算出する。更にその遡行時間に2回目の時刻同期の履歴情報402よりその際のレート偏差100.1%を積算(30.000×1.001)し30.030秒を得る。最後に履歴情報401より第一回目の配信時刻(00時10分0.000秒)から上記の積算値(30.030秒)を減算して、タイムスタンプ値として00時9分29.970秒を得る。この得られたタイムスタンプ値を新たな値として、修正されたログ情報501bを記録する。 The log recording 501a has the time stamp value (30.000 seconds) and the local timer value (60.000 seconds) when the first time synchronization message is received from the history information 401 recorded in the time synchronization history of FIG. 30.000 seconds is calculated as the retroactive time (60.000 seconds-30.000 seconds). Further, the rate deviation of 100.1% at that time is integrated (30.000 × 1.001) from the history information 402 of the second time synchronization in the retroactive time to obtain 30.030 seconds. Finally, the above integrated value (30.030 seconds) is subtracted from the first delivery time (00:10:0.000 seconds) from the history information 401, and the time stamp value is 00: 09: 29.970 seconds. To get. The corrected log information 501b is recorded with the obtained time stamp value as a new value.

また、ログ記録503aは既に一回目の時刻同期メッセージの受信後であり、レート偏差が未計算の時のログであるため、レート偏差の値のみを2回目の時刻同期メッセージの受信時に計算した値を用いて、タイムススタンプの補正を行う。つまりタイムスタンプ値(70.000秒)と図4の時刻同期履歴に記録された履歴情報401より一回目の時刻同期メッセージを受信した際のローカルタイマ値(60.000秒)から経過時間(70.000秒-60.000秒)として10.000秒を算出する。更にその経過時間に2回目の時刻同期の履歴情報402よりその際のレート偏差100.1%を積算(10.000×1.001)し10.010秒を得る。最後に履歴情報401より第一回目の配信時刻(00時10分0.000秒)から上記の積算値(10.010秒)を加算して、タイムスタンプ値として00時10分10.010秒を得る。この得られたタイムスタンプ値を新たな値として、修正されたログ情報503bを記録する。これらの修正済みのログ記録にはタイムスタンプ種別として修正後の時刻を示す情報を付加し、また修正要否情報としては修正済みを示す情報を付加する。 Further, since the log record 503a is a log when the rate deviation has not been calculated because it has already been received after the first time synchronization message, only the value of the rate deviation is calculated when the second time synchronization message is received. Is used to correct the time stamp. That is, the elapsed time (70) from the local timer value (60.000 seconds) when the first time synchronization message is received from the time stamp value (70.000 seconds) and the history information 401 recorded in the time synchronization history of FIG. 10.000 seconds is calculated as .000 seconds-60.000 seconds). Further, the rate deviation of 100.1% at that time is integrated (10.000 × 1.001) from the history information 402 of the second time synchronization in the elapsed time to obtain 10.010 seconds. Finally, the above integrated value (10.010 seconds) is added from the first delivery time (00:10:0.000 seconds) from the history information 401, and the time stamp value is 00:10: 10.010 seconds. To get. The corrected log information 503b is recorded with the obtained time stamp value as a new value. Information indicating the corrected time is added to these corrected log records as a time stamp type, and information indicating corrected is added as correction necessity information.

なおログ記録503aの修正は上記の説明では一回目の時刻同期メッセージの受信時の配信時刻からの経過時間を加算する手順にて説明を行ったが、2回目の時刻同期メッセージの配信時刻からの遡行時間を減算する手順で行っても、同一の値が算出可能である。 The modification of the log record 503a was described in the above description by the procedure of adding the elapsed time from the delivery time at the time of receiving the first time synchronization message, but from the delivery time of the second time synchronization message. The same value can be calculated even if the procedure of subtracting the retroactive time is performed.

上記したように第二制御装置108のログ記録部112に記録されたログ記録は、車両の外部から接続したログ取得装置114によりその内容を読み出される。また第三制御装置113に記録されたログ記録も同様に読みだされ、ログ取得装置114のログ蓄積部117に蓄積される。これら蓄積されたログを用いて、各制御装置間のタイムスタンプ情報を付き合わせて解析することで、装置間の連携動作の解析が可能となる。 As described above, the log record recorded in the log recording unit 112 of the second control device 108 is read out by the log acquisition device 114 connected from the outside of the vehicle. Further, the log record recorded in the third control device 113 is also read out in the same manner and stored in the log storage unit 117 of the log acquisition device 114. By using these accumulated logs and analyzing the time stamp information between each control device, it is possible to analyze the cooperative operation between the devices.

図7にログ取得装置114のログ蓄積部117に格納した、第二制御装置108のログ内容を示す。各制御装置から取得しログ蓄積部117に格納する内容としては、装置種別1101、タイムスタンプ1102、タイムスタンプ種別1103、ログの記録情報1104等から成る。第三制御装置113のログ内容についても上記と同様の内容で蓄積される。タイムスタンプ種別1103は、ログに付与されたタイムスタンプが修正された時刻情報であるか否かを示す情報である。既に述べたようにタイムスタンプの修正は、そのログが記録された時点よりも以降の時刻同期情報を用いて行っているため、本来のタイムスタンプの算出に比較して、わずかながらも時刻値の精度が劣る可能性がある。そこで、このタイムスタンプ種別1103にて修正後の時刻であることを示すことによって、修正されたタイムスタンプとそうで無いものでその時刻精度の違いを表すことができる。それによって、これらのログのタイムスタンプを元に複数の装置間の連携動作の解析を行う場合に、事象の発生順序の正確さの違いを念頭に置いた上で、解析者がログの分析を行うことが可能となる。 FIG. 7 shows the log contents of the second control device 108 stored in the log storage unit 117 of the log acquisition device 114. The contents acquired from each control device and stored in the log storage unit 117 include device type 1101, time stamp 1102, time stamp type 1103, log recording information 1104, and the like. The log contents of the third control device 113 are also accumulated with the same contents as described above. The time stamp type 1103 is information indicating whether or not the time stamp given to the log is the corrected time information. As already mentioned, the time stamp is corrected using the time synchronization information after the time when the log was recorded, so the time value is slightly higher than the original time stamp calculation. The accuracy may be inferior. Therefore, by indicating that the time is the corrected time by the time stamp type 1103, it is possible to express the difference in the time accuracy between the corrected time stamp and the non-corrected time stamp. As a result, when analyzing the cooperative operation between multiple devices based on the time stamps of these logs, the analyst analyzes the logs, keeping in mind the difference in the accuracy of the event occurrence order. It will be possible to do.

なお上記したタイムスタンプの修正は、例えば図5を用いた説明の場合には、2回目の時刻同期メッセージを受信しレート偏差の計算が完了した際に実施するように説明をおこなった。ただし、この修正は必ずしもその時点で実施する必要は無く、修正に必要な情報が得られた後であれば何時行ってもかまわない。 In the case of the explanation using FIG. 5, for example, the above-mentioned correction of the time stamp is described so as to be performed when the second time synchronization message is received and the calculation of the rate deviation is completed. However, this modification does not necessarily have to be performed at that time, and may be performed at any time after the information necessary for the modification is obtained.

例えば、このタイムスタンプの修正処理を、ログ取得装置114からのログ読出しの際に行っても良い。その場合には制御装置が通常動作中にタイムスタンプの修正の為に処理負荷が上昇することを避けることができるため、装置の電力消費を抑える効果や処理の安定性を損なわないという効果が期待できる。あるいは、ログ情報だけでなく図4に示した時刻同期履歴の情報をログ取得装置114側で読出し、タイムスタンプの修正処理をログ取得装置側で行ってもかまわない。この場合であっても上記と同様に制御装置側の処理負荷を低減する効果が得られる。 For example, this time stamp correction process may be performed when the log is read from the log acquisition device 114. In that case, since it is possible to prevent the processing load from increasing due to the correction of the time stamp during normal operation of the control device, the effect of suppressing the power consumption of the device and the effect of not impairing the processing stability are expected. can. Alternatively, not only the log information but also the time synchronization history information shown in FIG. 4 may be read out on the log acquisition device 114 side, and the time stamp correction process may be performed on the log acquisition device side. Even in this case, the effect of reducing the processing load on the control device side can be obtained in the same manner as described above.

上記した実施例ではレート偏差の値を、時刻同期メッセージを第二制御装置にて受信するごとにその経過時間をもとに計算するように説明を行ったが、必ずしも毎回実施する必要は無く、複数回の受信ごとにその際の複数回の受信に要した経過時間を元に計算を行ってもかまわない。またレート偏差の値を第二制御装置にて算出する場合を例に説明を行ったが、このレート偏差の値を事前に測定し固定の値として保持しておき、その値を用いてもかまわない。その場合には2回目の時刻同期メッセージの受信を待つことなく、タイムスタンプの付与が可能となるため、例えば図5のログ記録503aのタイムスタンプ値は、ローカルタイマ値を記録することなく、その記録当初から正しいタイムスタンプの記録が可能である。 In the above embodiment, the rate deviation value is calculated based on the elapsed time each time the time synchronization message is received by the second control device, but it is not always necessary to calculate the rate deviation value. For each multiple receptions, the calculation may be performed based on the elapsed time required for the multiple receptions at that time. In addition, the explanation was given using the case where the value of the rate deviation is calculated by the second control device as an example, but the value of this rate deviation may be measured in advance and held as a fixed value, and that value may be used. do not have. In that case, the time stamp can be added without waiting for the reception of the second time synchronization message. Therefore, for example, the time stamp value of the log recording 503a in FIG. 5 is the time stamp value without recording the local timer value. It is possible to record the correct time stamp from the beginning of recording.

さらに、ローカルタイマ111の計時精度が十分に高いものであってその影響が無視できるレベルの場合には、レート偏差は必ずしも考慮する必要は無い。その場合には上記した各算出の手順においてレート偏差Rの値を100%(1.000…)として計算するのと同等の処理となる。 Further, when the timing accuracy of the local timer 111 is sufficiently high and its influence is negligible, the rate deviation does not necessarily have to be considered. In that case, the process is equivalent to calculating the rate deviation R value as 100% (1.000 ...) in each of the above calculation procedures.

また、上記した例では時刻同期以前のログに付与する仮のタイムスタンプとして、ローカルタイマ111のタイマ値として説明を行ったが、この値は必ずしもローカルタイマの値そのものである必要はなく、タイマ値に何らかの変換処理を行った値であっても良く、時刻同期完了後に正しいタイムスタンプに修正が可能となるようなものであればかまわない。 Further, in the above example, the timer value of the local timer 111 is described as a temporary time stamp given to the log before the time synchronization, but this value does not necessarily have to be the value of the local timer itself, and the timer value. It may be a value that has undergone some conversion processing, and may be any value as long as it can be corrected to the correct time stamp after the time synchronization is completed.

以上説明したように本実施例では、1回目の時刻同期メッセージを受信する以前のログであっても、一旦ローカルタイマのタイマ値を記録し時刻同期メッセージの受信後にその情報を用いてタイムスタンプの修正が可能となり、時刻同期以前のログの活用性が向上する。 As described above, in this embodiment, even if the log is before the first time synchronization message is received, the timer value of the local timer is once recorded, and after the time synchronization message is received, the information is used for the time stamp. Correction is possible, and the utilization of logs before time synchronization is improved.

次に実施例2を図8、図9を用いて説明する。なお、同一の機能を有する部分に関しては説明を省略する。実施例2は図1に示した制御装置におけるタイムスタンプの付与に際して、時刻同期メッセージの配信に要する伝送遅延時間を加えて補正を行う場合の例である。実施例2は伝送遅延の補正を行う以外の点については実施例1に示したものと同様の動作を行うものである。また車両内の通信バス107として遅延時間の測定を行うものの例として、例えばEthernet等がある。 Next, Example 2 will be described with reference to FIGS. 8 and 9. The description of the parts having the same function will be omitted. The second embodiment is an example in which the time stamp in the control device shown in FIG. 1 is corrected by adding the transmission delay time required for the delivery of the time synchronization message. The second embodiment performs the same operation as that shown in the first embodiment except that the transmission delay is corrected. Further, as an example of the communication bus 107 in the vehicle that measures the delay time, there is, for example, Ethernet.

まず図8を用いて伝送遅延時間の測定手順について説明する。第二制御装置108は遅延時間を測定する為の要求であるDelayReqメッセージ701を送信し、更にその送信時のローカルタイマ111のタイマ値T5を記録する。そのメッセージを受信した第一制御装置102ではDelayReqメッセージ701を受信した時刻T6を格納した応答メッセージDelayRes702を返信する。さらに、その返信時刻T7を格納したDelayRes_Followupメッセージ703を送信する。第二制御装置108ではDelayResメッセージ702を受信した際のローカルタイマのタイマ値T8を記録する。さらに後続するDelayRes_Followupメッセージ703を受信し、格納された時刻T7を取得する。 First, the procedure for measuring the transmission delay time will be described with reference to FIG. The second control device 108 transmits the DelayReq message 701, which is a request for measuring the delay time, and further records the timer value T5 of the local timer 111 at the time of the transmission. Upon receiving the message, the first control device 102 returns a response message, DayRes702, which stores the time T6 at which the DayReq message 701 is received. Further, the DelayRes_Followup message 703 storing the reply time T7 is transmitted. The second control device 108 records the timer value T8 of the local timer when the DeliveryRes message 702 is received. Further, the subsequent DelayRes_Followup message 703 is received, and the stored time T7 is acquired.

第二制御装置108では、これらの時刻T5ないし時刻T8の値を用いて以下のように伝送遅延時間を算出する。まず、第二制御装置108側でDelayReqメッセージを送信してから、DelayResメッセージを受信するまでの経過時間、すなわちタイマ値T8とT5の差分(T8-T5)を計算する。ただしこの経過時間はローカルタイマ111で計測された時間である為、その進み方を補正する為にレート偏差Rを乗じて、基準となる時刻の経過時間に換算する。なお、レート偏差Rの値は、図3を用いて既に説明したのと同様の手順にて、SyncメッセージおよびFollowupメッセージを複数回受信し、その間の第一制御装置102側での経過時間と第二制御装置108側での経過時間の比より算出している。また第一制御装置102でのDelayReqメッセージを受信してからDelayResメッセージを送信するまでの経過時間として、時刻T7とT6の差分(T7-T6)を計算する。これら第二制御装置108側での経過時間と、第一制御装置102側での経過時間の差が、DelayReqメッセージとRelayResメッセージの往復に要した遅延時間となる。最後に往復の遅延時間を2で割ることで伝送延時間を求める。すなわち以下の式により、通信バス107を介したメッセージの伝達時の伝送遅延時間TDを算出する。
伝送遅延時間TD=((レート偏差R×(T8-T5))―(T7-T6))÷2 …式4
In the second control device 108, the transmission delay time is calculated as follows using the values of the time T5 to the time T8. First, the elapsed time from the transmission of the DelayReq message on the second control device 108 side to the reception of the DelayRes message, that is, the difference between the timer values T8 and T5 (T8-T5) is calculated. However, since this elapsed time is the time measured by the local timer 111, it is converted into the elapsed time of the reference time by multiplying it by the rate deviation R in order to correct the progress. As for the value of the rate deviation R, the Sync message and the Follow-up message are received a plurality of times by the same procedure as already described with reference to FIG. (Ii) It is calculated from the ratio of the elapsed time on the control device 108 side. Further, the difference (T7-T6) between the times T7 and T6 is calculated as the elapsed time from the reception of the DelayReq message by the first control device 102 to the transmission of the DelayRes message. The difference between the elapsed time on the second control device 108 side and the elapsed time on the first control device 102 side is the delay time required for the round trip between the DelayReq message and the ReleaseRes message. Finally, the transmission extension time is obtained by dividing the round-trip delay time by 2. That is, the transmission delay time TD at the time of transmitting a message via the communication bus 107 is calculated by the following formula.
Transmission delay time TD = ((rate deviation R × (T8-T5))-(T7-T6)) ÷ 2 ... Equation 4

次に、時刻同期メッセージが配信される以前に発生したログのタイムスタンプ値の修正方法について図9を用いて説明する。修正方法としては、配信された時刻に伝送遅延時間を加算することで、伝送遅延の補正を行った配信時刻を得るものである。具体的には、既に述べた例と同様に第一制御装置102はSyncメッセージ801を送信し、更に継続して前記メッセージの送信時刻T1dを後続するFollowupメッセージ802に格納して送信する。第二制御装置108ではそのSyncメッセージを801受信した際のローカルタイマ111の値T2dを記録するとともに、Followupメッセージ802に格納された時刻T1dを取得する。ただし、この時刻T1dの配信時に伝送遅延時間TDの時間を要しているため、その分の時間を加算する。すなわち伝送遅延時間を加算した時刻(T1d+TD)を配信された時刻とみなして、タイムスタンプ時刻の算出を行う。Syncメッセージ801以前に発生したログに記録されたローカルタイマ値T4dと、その後に発生した時刻同期メッセージ受信時のローカルタイマ値の差分(T2d-T4d)すなわち時刻同期メッセージの受信時点からの遡行時間算出する。さらにこの遡行時間にレート偏差を積算し基準となる時刻の時間の遡行量に換算する。そしてこの補正後の遡行時間を、上記の補正された配信時刻(T1d+TD)から減算することでタイムスタンプの値を求めることが出来る。すなわち、以下の式により時刻同期メッセージを受信する以前のタイムスタンプの値TLdを算出する。
時刻同期完了以前のタイムスタンプ時刻TLd=配信時刻T1+伝送遅延TD-(遡行時間(T2d-T4d)×レート偏差R) …式5
Next, a method of correcting the time stamp value of the log generated before the time synchronization message is delivered will be described with reference to FIG. As a correction method, the delivery time with the correction of the transmission delay is obtained by adding the transmission delay time to the delivery time. Specifically, the first control device 102 transmits the Sync message 801 as in the above-described example, and continuously stores the transmission time T1d of the message in the subsequent Followup message 802 and transmits the message. The second control device 108 records the value T2d of the local timer 111 when the Sync message 801 is received, and acquires the time T1d stored in the Followup message 802. However, since the transmission delay time TD is required at the time of delivery at this time T1d, the time for that amount is added. That is, the time stamp time is calculated by regarding the time (T1d + TD) to which the transmission delay time is added as the delivered time. Difference between the local timer value T4d recorded in the log generated before the Sync message 801 and the local timer value when the time synchronization message generated after that is received (T2d-T4d), that is, the retroactive time calculation from the time when the time synchronization message is received. do. Furthermore, the rate deviation is integrated into this retroactive time and converted into the retroactive amount of the time as the reference time. Then, the time stamp value can be obtained by subtracting the corrected retroactive time from the corrected delivery time (T1d + TD). That is, the value TLd of the time stamp before receiving the time synchronization message is calculated by the following formula.
Time stamp time before the completion of time synchronization Time TLd = Delivery time T1 + Transmission delay TD- (retroactive time (T2d-T4d) x rate deviation R) ... Equation 5

上記のタイムスタンプの修正処理は、遅延時間TDの算出、レート偏差Rの算出およびマスター側からの時刻の配信が行われ、修正に必要な情報がそろった時点あるいはそれ以降のどこかの時点で行う。 In the above time stamp correction process, the delay time TD is calculated, the rate deviation R is calculated, and the time is distributed from the master side. conduct.

また、修正が不要なタイムスタンプについては、同様に式1に示したタイムスタンプ時刻の計算に用いる配信時刻T1を、伝送遅延を加算した値(T1+TD)に置き換えることで算出が可能である。 Further, the time stamp that does not need to be corrected can be calculated by replacing the delivery time T1 used for calculating the time stamp time shown in Equation 1 with a value (T1 + TD) to which the transmission delay is added.

上記した実施例では、伝送遅延時間をDelayReq、RelayRes、DelayRes_Followup各メッセージを用いて算出を行ったが、予め別の手段でこの伝送遅延時間を測定したうえで記録しておき、その事前の記録値を用いてもかまわない。 In the above-described embodiment, the transmission delay time is calculated using each message of DelayReq, ReleaseRes, and DelayRes_Followup, but the transmission delay time is measured and recorded by another means in advance, and the recorded value in advance. You may use.

また、レート偏差の算出はSyncメッセージおよびFollowupメッセージを複数回受信し、その間の第一制御装置側での経過時間と第二制御装置側での経過時間の比を算出を行うように説明したが、これに用いる通信メッセージはDelayResメッセージおよびDelayRes_Folloupメッセージで代用することも可能である。 Further, in the calculation of the rate deviation, it was explained that the Sync message and the Follow-up message are received multiple times, and the ratio of the elapsed time on the first controller side and the elapsed time on the second controller side during that period is calculated. , The communication message used for this can be replaced with a DevayRes message and a DelayRes_Folloop message.

また実施例1と同様に、タイムスタンプの修正処理は必要な情報が揃った後であれば、必ずしもその時点で行う必要は無く、外部からのログの読出し時に実施しても、またログを読みだした先のログ取得装置で行っても良く、それによって制御装置の負荷を低減することができる。さらにログ取得装置が読み出すログの内容として、タイムスタンプ値が修正されたものか否かを示す情報を付加することで、ログ解析者に対してタイムスタンプの正確さに関しての情報を提供することが出来る点も同様である。 Further, as in the first embodiment, the time stamp correction process does not necessarily have to be performed at that time as long as the necessary information is available, and even if the time stamp is corrected when the log is read from the outside, the log is read again. It may be performed by the log acquisition device, which can reduce the load on the control device. Furthermore, by adding information indicating whether or not the time stamp value has been corrected to the contents of the log read by the log acquisition device, it is possible to provide the log analyst with information on the accuracy of the time stamp. The same is true for what you can do.

以上説明したように本実施例では、時刻同期処理が行われる以前のログであっても正しいタイムスタンプを付与することができ、さらに伝送遅延時間を加味することでより精度の高いタイムスタンプの付加が可能となりログの活用性が向上する。 As described above, in this embodiment, a correct time stamp can be added even to the log before the time synchronization process is performed, and a more accurate time stamp can be added by adding the transmission delay time. Is possible and the utilization of logs is improved.

なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 The present invention is not limited to the above-described embodiment, and includes various modifications. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to the one including all the described configurations. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Further, it is possible to add / delete / replace a part of the configuration of each embodiment with another configuration.

101:車両
102:第一制御装置
103:アンテナ
104:時刻取得部
105:制御部
106:通信インタフェース
107:通信バス
108:第二制御装置
109:通信インタフェース
110:制御部
111:ローカルタイマ
112:ログ記録部
113:第三制御装置
114:ログ取得装置
115:通信インタフェース
116:制御部
117:ログ蓄積部
101: Vehicle 102: First control device 103: Antenna 104: Time acquisition unit 105: Control unit 106: Communication interface 107: Communication bus 108: Second control device 109: Communication interface 110: Control unit 111: Local timer 112: Log Recording unit 113: Third control device 114: Log acquisition device 115: Communication interface 116: Control unit 117: Log storage unit

Claims (6)

車両に搭載された制御装置であって、タイムスタンプ付きログ記録を行う制御装置において、
前記制御装置は、
前記車両の内部かつ前記制御装置の外部に搭載された通信部であって、基準時刻を保有した基準時刻保持装置と通信する為の通信部と、
イマと、
グ情報を保存するための記録部と、
前記通信部を用いて前記基準時刻保持装置との間で時刻同期処理を行い、時刻同期されたタイムスタンプを前記ログ情報に付与して前記記録部に記録する制御部を備え、
前記制御部は、前記制御装置が起動後の初めての時刻同期処理の完了以前に前記記録部に記録するログの記録情報には、前記タイマのタイマ値を元に時刻同期されていないタイムスタンプを仮付与し、
少なくとも2回の時刻同期処理が完了後の何れかの時点で、時刻同期処理で得られた情報を用いて前記タイマのタイマ値を補正するとともに前記補正したタイマ値を用いて前記仮付与したタイムスタンプを時刻同期されたタイムスタンプに修正して前記記録部に記録することを特徴とするタイムスタンプ付きログ記録を行う制御装置。
In a control device mounted on a vehicle and performing log recording with a time stamp,
The control device is
A communication unit mounted inside the vehicle and outside the control device for communicating with a reference time holding device having a reference time.
With a timer
A recording unit for saving log information and
It is provided with a control unit that performs time synchronization processing with the reference time holding device using the communication unit, adds a time-synchronized time stamp to the log information, and records the time stamp in the recording unit .
The control unit sets a time stamp that is not time-synchronized based on the timer value of the timer in the log recording information recorded in the recording unit before the completion of the first time synchronization process after the control device is started. Temporarily grant,
At some point after the completion of at least two time synchronization processes, the timer value of the timer is corrected using the information obtained in the time synchronization process, and the corrected timer value is used to temporarily assign the timer value. A control device for performing log recording with a time stamp , wherein the time stamp is corrected to a time stamp synchronized with the time and recorded in the recording unit.
請求項1に記載のタイムスタンプ付きログ記録を行う制御装置において、
前記制御部は、前記基準時刻保持装置から時刻同期処理にて受信した基準時刻を元に時刻同期処理を行うものであって、
前記基準時刻保持装置から基準時刻を受信する際の伝送遅延時間と、
前記基準時刻保持装置と前記タイマとの時間の進み方の差の、
いずれか一方あるいは双方の情報をもとに、タイムスタンプの修正を行うことを特徴とするタイムスタンプ付きログ記録を行う制御装置。
In the control device that performs log recording with a time stamp according to claim 1.
The control unit performs time synchronization processing based on the reference time received from the reference time holding device in the time synchronization processing.
The transmission delay time when receiving the reference time from the reference time holding device, and
The difference in the time advance between the reference time holding device and the timer,
A control device that performs log recording with a time stamp, which is characterized in that the time stamp is corrected based on the information of either one or both.
請求項1又は請求項2のいずれかに記載のタイムスタンプ付きログ記録を行う制御装置において、
前記制御部は、外部に接続したログ取得装置からのログ呼び出し時に、前記タイムスタンプの修正を行うことを特徴とするタイムスタンプ付きログ記録を行う制御装置。
In the control device that performs log recording with a time stamp according to claim 1 or claim 2.
The control unit is a control device that performs log recording with a time stamp, which is characterized in that the time stamp is corrected when a log is called from a log acquisition device connected to the outside.
請求項1乃至請求項3のいずれか1項に記載のタイムスタンプ付きログ記録を行う制御装置において、
前記制御部は、外部に接続したログの取得装置へログの記録情報とタイムスタンプ情報とを送信するものであって、
前記タイムスタンプ情報にタイムスタンプが修正されたものか否かを示すタイムスタンプ種別情報を付加して送信することを特徴するタイムスタンプ付きログ記録を行う制御装置。
In the control device that performs log recording with a time stamp according to any one of claims 1 to 3.
The control unit transmits log recording information and time stamp information to an externally connected log acquisition device.
A control device for performing log recording with a time stamp, which comprises adding time stamp type information indicating whether or not the time stamp has been corrected to the time stamp information and transmitting the time stamp information.
車両に搭載された制御装置であって、タイムスタンプ付きログ記録を行う制御装置において、
前記制御装置は、
前記車両の内部かつ前記制御装置の外部に搭載された通信部であって、基準時刻を保有した基準時刻保持装置と通信する為の通信部と、
イマと、
グ情報を保存するための記録部と、
前記通信部を用いて基準時刻を保有した前記基準時刻保持装置との間で時刻同期処理を行い、時刻同期されたタイムスタンプを前記ログ情報に付与して前記記録部に記録する制御部を備え、
前記制御部は、前記制御装置が起動後の初めての時刻同期処理の完了以前に前記記録部に記録するログの記録情報には、前記タイマのタイマ値を元に時刻同期されていないタイムスタンプを仮付与し、
さらに仮付与したタイムスタンプの修正に必要となる情報を時刻同期履歴情報として記録し、
前記車両の外部に接続されたログ取得装置へログ記録情報とともに前記時刻同期履歴情報を送信することを特徴とするタイムスタンプ付きログ記録を行う制御装置。
In a control device mounted on a vehicle and performing log recording with a time stamp,
The control device is
A communication unit mounted inside the vehicle and outside the control device for communicating with a reference time holding device having a reference time.
With a timer
A recording unit for saving log information and
A control unit that performs time synchronization processing with the reference time holding device that holds the reference time using the communication unit, adds a time stamp synchronized with the time to the log information, and records the time stamp in the recording unit . Prepare,
The control unit sets a time stamp that is not time-synchronized based on the timer value of the timer in the log recording information recorded in the recording unit before the completion of the first time synchronization process after the control device is started. Temporarily grant,
Furthermore, the information necessary for correcting the temporarily assigned time stamp is recorded as time synchronization history information.
A control device for performing log recording with a time stamp, characterized in that the time synchronization history information is transmitted together with log recording information to a log acquisition device connected to the outside of the vehicle .
請求項5に記載のタイムスタンプ付きログ記録を行う制御装置に接続し、
前記制御装置内に記録されたログ記録情報を取得するログ取得装置であって、
ログ記録情報とともに時刻同期履歴情報を前記制御装置より取得し、
前記制御装置から取得した前記時刻同期履歴情報を用いて、ログ記録情報に仮付与されたタイムスタンプの修正を行うことを特徴とするログ取得装置。
Connect to the control device that performs log recording with a time stamp according to claim 5.
A log acquisition device that acquires log recording information recorded in the control device.
The time synchronization history information is acquired from the control device together with the log recording information, and the time synchronization history information is acquired from the control device.
A log acquisition device characterized in that the time stamp temporarily assigned to the log recording information is corrected by using the time synchronization history information acquired from the control device.
JP2018097535A 2018-05-22 2018-05-22 Control device and log acquisition device that perform log recording with time stamp Active JP7036664B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018097535A JP7036664B2 (en) 2018-05-22 2018-05-22 Control device and log acquisition device that perform log recording with time stamp

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018097535A JP7036664B2 (en) 2018-05-22 2018-05-22 Control device and log acquisition device that perform log recording with time stamp

Publications (2)

Publication Number Publication Date
JP2019205016A JP2019205016A (en) 2019-11-28
JP7036664B2 true JP7036664B2 (en) 2022-03-15

Family

ID=68727382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018097535A Active JP7036664B2 (en) 2018-05-22 2018-05-22 Control device and log acquisition device that perform log recording with time stamp

Country Status (1)

Country Link
JP (1) JP7036664B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7452397B2 (en) * 2020-11-27 2024-03-19 株式会社デンソー Electronic control device, time information provision method, time information provision program, and electronic control system
CN116701338A (en) * 2023-08-07 2023-09-05 金舟远航(北京)信息产业有限公司 Log time correction method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003344572A (en) 2002-05-22 2003-12-03 Mitsubishi Electric Corp Vehicle electronic device and vehicle time adjustment system
JP2011257300A (en) 2010-06-10 2011-12-22 Yazaki Corp In-vehicle recording apparatus and time correction method for in-vehicle recording apparatus
JP2015035158A (en) 2013-08-09 2015-02-19 ルネサスエレクトロニクス株式会社 Data processing system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06318896A (en) * 1993-05-10 1994-11-15 Toshiba Corp Wireless communication system
US20070185689A1 (en) * 2006-02-07 2007-08-09 Sigcom, Inc. Systems and methods for event detection and logging in access control points

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003344572A (en) 2002-05-22 2003-12-03 Mitsubishi Electric Corp Vehicle electronic device and vehicle time adjustment system
JP2011257300A (en) 2010-06-10 2011-12-22 Yazaki Corp In-vehicle recording apparatus and time correction method for in-vehicle recording apparatus
JP2015035158A (en) 2013-08-09 2015-02-19 ルネサスエレクトロニクス株式会社 Data processing system

Also Published As

Publication number Publication date
JP2019205016A (en) 2019-11-28

Similar Documents

Publication Publication Date Title
US9374214B2 (en) Communication apparatus, communication system, and communication method
CN113110160A (en) Time synchronization method and device of domain controller, domain controller and storage medium
US7139525B2 (en) Time synchronization system, satellite system applied to the time synchronization system, ground system applied in the time synchronization system, time synchronization method and a computer-readable recording medium with a program
KR20180136488A (en) Wireless communication system, wireless terminal, and time synchronization method
EP4044466A1 (en) Synchronization method and device
US5276659A (en) Clock synchronous system for a network station
CN112821974A (en) High-precision time synchronization method and device for vehicle-mounted ECU
JP7036664B2 (en) Control device and log acquisition device that perform log recording with time stamp
CN113992472A (en) Working method and system of FlexRay bus IP core
US20220085968A1 (en) Communication system, communication device, and program
US9698933B2 (en) Communication device and communication method
CN117320144A (en) Primary and secondary clock time synchronization method and system based on wireless communication
US11438857B2 (en) Transmission device, time transmission system, and delay measurement method
CN117062222A (en) Fusion positioning method, device and system, computer-readable storage medium
CN115567143B (en) High-precision time synchronization method, device, system and medium for data acquisition system
US20250007637A1 (en) Time synchronization apparatus, system, and method
CN107666360B (en) Train system time synchronization control method and device
CN120658338A (en) Time synchronization method and device and time synchronization system of intelligent driving system
CN110109155B (en) A Two-way Time Correction Method Without Application Software Interruption on the Satellite
CN119583000A (en) Vehicle network time synchronization method, device, storage medium and electronic device
CN119652459A (en) A method and system for synchronizing and correcting time stamps of satellite-borne radar measurement data
CN118713786A (en) A clock synchronization system and method
CN117294378A (en) A clock synchronization method, device and system
CN110138487B (en) Time noise transfer characteristic measurement method and network node
CN120935312B (en) Self-correction time synchronization device and method for satellite-borne high-resolution imaging system

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180523

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20201020

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20201023

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210713

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210909

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220208

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220303

R150 Certificate of patent or registration of utility model

Ref document number: 7036664

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250