JP5507513B2 - Vehicle control device - Google Patents

Vehicle control device Download PDF

Info

Publication number
JP5507513B2
JP5507513B2 JP2011198524A JP2011198524A JP5507513B2 JP 5507513 B2 JP5507513 B2 JP 5507513B2 JP 2011198524 A JP2011198524 A JP 2011198524A JP 2011198524 A JP2011198524 A JP 2011198524A JP 5507513 B2 JP5507513 B2 JP 5507513B2
Authority
JP
Japan
Prior art keywords
control
key identifier
unique
keyid
storage unit
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
JP2011198524A
Other languages
Japanese (ja)
Other versions
JP2013061724A (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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems 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 Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2011198524A priority Critical patent/JP5507513B2/en
Publication of JP2013061724A publication Critical patent/JP2013061724A/en
Application granted granted Critical
Publication of JP5507513B2 publication Critical patent/JP5507513B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、車両制御装置に関する。   The present invention relates to a vehicle control device.

自動車のエンジン制御装置は、クランク角センサ信号などの入力に基づき、燃料量や噴射タイミングを制御する。また、ブレーキ制御装置は、ブレーキペダル、車速、車両状態などの入力に基づき、ブレーキを制御する。   An automobile engine control device controls the amount of fuel and the injection timing based on an input such as a crank angle sensor signal. The brake control device controls the brake based on inputs such as a brake pedal, a vehicle speed, and a vehicle state.

車両が高機能化するにともなって、車両の安全性に対する要求が高まり、自動車制御の分野では、様々な安全規格が検討されている。安全性の確保に関しては、デバイスの異常の有無を監視し、異常を検出したときは、車両が危険な状態に至る前に、そのデバイスに関わる機能を一部または全部停止し、車両の安全を確保するのが一般的である。   As vehicles become more sophisticated, demands for vehicle safety have increased, and various safety standards have been studied in the field of automobile control. To ensure safety, the device is monitored for abnormalities, and when an abnormality is detected, some or all of the functions related to the device are stopped before the vehicle reaches a dangerous state. It is common to secure.

車両制御装置は、マイコンが実行するソフトウェアによって制御処理を実施する。そのため、制御ソフトウェアに対する安全性が求められている。下記特許文献1には、制御ソフトウェアの監視に関して、特定の許可した装置のみが制御ソフトウェアを実行することを許可する技術が記載されている。   The vehicle control device performs control processing by software executed by a microcomputer. Therefore, safety for control software is required. Japanese Patent Application Laid-Open No. 2004-228561 describes a technology that permits only a specific authorized device to execute the control software with respect to the control software monitoring.

特開平7−244584号公報Japanese Patent Laid-Open No. 7-244484

上記特許文献1に記載されている技術では、固有情報や暗号鍵を用いて、制御ソフトウェアの実行可否を判定している。しかし、このような手法を実装すると、メモリ容量を比較的多く消費する。車両制御装置は一般に、搭載するメモリ容量に対する制約が大きいため、メモリ容量を多く消費するような手法は望ましくない。   In the technique described in Patent Document 1, whether or not the control software can be executed is determined using unique information and an encryption key. However, when such a method is implemented, a relatively large memory capacity is consumed. In general, since a vehicle control apparatus has a large restriction on a memory capacity to be mounted, a method that consumes a large memory capacity is not desirable.

本発明は、上記のような課題を解決するためになされたものであり、メモリ容量の消費を抑えつつ、制御ソフトウェアの不正実行を防止することを目的とする。   The present invention has been made to solve the above-described problems, and an object thereof is to prevent unauthorized execution of control software while suppressing consumption of memory capacity.

本発明に係る車両制御装置は、制御処理を指定する処理ID毎に鍵識別子を保持しており、制御処理を呼び出す際に指定された鍵識別子を用いて処理IDを算出し、その処理IDに対応する鍵識別子と、制御処理を呼び出す際に指定された鍵識別子とが一致する場合に限り、その制御処理を実施する。   The vehicle control apparatus according to the present invention holds a key identifier for each process ID that designates a control process, calculates a process ID using the key identifier designated when calling the control process, and sets the process ID as the process ID. Only when the corresponding key identifier matches the key identifier specified when calling the control process, the control process is executed.

本発明に係る車両制御装置によれば、暗号鍵などの複雑な手法を用いることなく、制御ソフトウェアの不正実行を防止することができる。これにより、メモリ使用容量を抑えつつ、車両制御装置の安全性を高めることができる。   The vehicle control device according to the present invention can prevent unauthorized execution of control software without using a complicated method such as an encryption key. Thereby, the safety | security of a vehicle control apparatus can be improved, suppressing memory usage capacity.

実施形態1に係る車両制御装置100の構成図である。1 is a configuration diagram of a vehicle control device 100 according to Embodiment 1. FIG. フラッシュROM112が格納するデータを示す図である。It is a figure which shows the data which flash ROM112 stores. RAM113が格納するデータを示す図である。It is a figure which shows the data which RAM113 stores. フラッシュROM112とRAM113が格納している各データの詳細を示す図である。It is a figure which shows the detail of each data which flash ROM112 and RAM113 have stored. CPU111が制御プログラム1121を実行する処理フローである。This is a processing flow in which the CPU 111 executes the control program 1121. ステップS501の詳細を示す図である。It is a figure which shows the detail of step S501. ステップS504のうち制御パラメータをチェックする処理を示す図である。It is a figure which shows the process which checks a control parameter among step S504. ステップS505の詳細を示す図である。It is a figure which shows the detail of step S505.

<実施の形態1>
図1は、本発明の実施形態1に係る車両制御装置100の構成図である。車両制御装置100は、車両の動作を制御する装置である。ここでは車両が備えるモータ200を制御する例を示したが、制御対象はこれに限られるものではない。
<Embodiment 1>
FIG. 1 is a configuration diagram of a vehicle control device 100 according to Embodiment 1 of the present invention. The vehicle control device 100 is a device that controls the operation of the vehicle. Although the example which controls the motor 200 with which a vehicle is provided was shown here, the control object is not restricted to this.

車両制御装置100は、マイクロコントローラ110、インバータ120、センサ131〜133を備える。マイクロコントローラ110は、インバータ120を制御するための制御プログラムを実行する演算装置である。インバータ120は、直流電力を所望周波数の交流電力に変換してモータ200を駆動する装置である。センサ131〜133は、モータ200を駆動する駆動電流または電圧を検出してマイクロコントローラ110に通知する。   The vehicle control device 100 includes a microcontroller 110, an inverter 120, and sensors 131 to 133. The microcontroller 110 is an arithmetic device that executes a control program for controlling the inverter 120. The inverter 120 is a device that drives the motor 200 by converting DC power into AC power having a desired frequency. The sensors 131 to 133 detect a driving current or voltage for driving the motor 200 and notify the microcontroller 110 of it.

マイクロコントローラ110は、CPU(Central Processing Unit)111、フラッシュROM(Read Only Memory)112、RAM(Random Access Memory)113、AD変換器114、インバータ制御部115を備える。   The microcontroller 110 includes a CPU (Central Processing Unit) 111, a flash ROM (Read Only Memory) 112, a RAM (Random Access Memory) 113, an AD converter 114, and an inverter control unit 115.

CPU111は、フラッシュROM112が格納しているプログラムを実行する。フラッシュROM112は、後述の図2で説明するプログラムおよびデータを格納する。RAM113は、CPU111がプログラムを実行する際に一時的にデータを格納するメモリ装置である。AD変換器114は、センサ131〜133の検出結果をアナログ信号からデジタル値に変換してCPU111に出力する。インバータ制御部115は、インバータ120を介してモータ200を制御する。   The CPU 111 executes a program stored in the flash ROM 112. The flash ROM 112 stores programs and data described later with reference to FIG. The RAM 113 is a memory device that temporarily stores data when the CPU 111 executes a program. The AD converter 114 converts the detection results of the sensors 131 to 133 from analog signals to digital values and outputs them to the CPU 111. The inverter control unit 115 controls the motor 200 via the inverter 120.

以下では、記載の便宜上、プログラムを動作主体として説明する場合があるが、プログラムを実際に実行するのはCPU111などの演算装置であることを付言しておく。   Hereinafter, for convenience of description, the program may be described as an operation subject, but it is added that the program is actually executed by an arithmetic device such as the CPU 111.

図2は、フラッシュROM112が格納するデータを示す図である。フラッシュROM112は、制御プログラム1121、KEYIDテーブル1122、パラメータテーブル1123、固有IDテーブル1124を格納する。これらの他にも、AD変換器114を駆動するAD変換器ドライバソフトウェア、インバータ制御部115を駆動するインバータ制御部ドライバソフトウェア、タスクや割り込みを制御するオペレーティングシステムなどを格納することもできる。   FIG. 2 is a diagram showing data stored in the flash ROM 112. The flash ROM 112 stores a control program 1121, a KEYID table 1122, a parameter table 1123, and a unique ID table 1124. In addition to these, AD converter driver software that drives the AD converter 114, inverter control unit driver software that drives the inverter control unit 115, an operating system that controls tasks and interrupts, and the like can also be stored.

制御プログラム1121は、センサ131〜133の検出結果を用いてモータ200を制御するプログラムである。制御プログラム1121は、複数の制御処理を記述することができる。CPU111は、制御プログラム1121が記述している制御処理のうちいずれを起動するかを、KEYIDによって指定する。   The control program 1121 is a program that controls the motor 200 using the detection results of the sensors 131 to 133. The control program 1121 can describe a plurality of control processes. The CPU 111 designates which of the control processes described by the control program 1121 is to be activated by KEYID.

KEYIDテーブル1122は、CPU111が制御プログラム1121を起動する際に指定する識別子(KEYID)を保持するテーブルである。パラメータテーブル1123は、制御プログラム1121が制御処理を実施する際に用いる制御パラメータを保持するテーブルである。固有IDテーブル1124は、制御プログラム1121毎に固有のIDを保持するテーブルである。これら各テーブルの詳細は、後述の図4で説明する。   The KEYID table 1122 is a table that holds an identifier (KEYID) designated when the CPU 111 activates the control program 1121. The parameter table 1123 is a table that holds control parameters used when the control program 1121 performs control processing. The unique ID table 1124 is a table that holds a unique ID for each control program 1121. Details of these tables will be described later with reference to FIG.

本発明に係る「制御部」「処理ID算出部」は、CPU111と制御プログラム1121が相当する。同等の機能を、回路デバイスなどのようなハードウェアを用いて実現することもできる。   The “control unit” and “processing ID calculation unit” according to the present invention correspond to the CPU 111 and the control program 1121. Equivalent functions can also be realized using hardware such as circuit devices.

図3は、RAM113が格納するデータを示す図である。RAM113は、AD変換器114およびセンサ131〜133の状態を記憶しておく状態バッファ1131を格納する。RAM113は、その他にも制御プログラム1121が動作する際に用いるデータを一時的に格納するスタックなどを保持することができる。   FIG. 3 is a diagram illustrating data stored in the RAM 113. The RAM 113 stores a state buffer 1131 that stores the states of the AD converter 114 and the sensors 131 to 133. In addition, the RAM 113 can hold a stack for temporarily storing data used when the control program 1121 operates.

図4は、フラッシュROM112とRAM113が格納している各データの詳細を示す図である。以下、各データの用途などについて説明する。   FIG. 4 is a diagram showing details of each data stored in the flash ROM 112 and the RAM 113. Hereinafter, the use of each data will be described.

KEYIDテーブル1122が格納しているKEYIDは、制御処理毎に固有の値である。CPU111は、制御プログラム1121を起動するとき、いずれの制御処理を起動しようとしているかを指定するため、KEYIDを併せて指定する。図4では、3種類の制御処理に対応する3種類のKEYIDを例示したが、これに限られるものではない。   The KEYID stored in the KEYID table 1122 is a unique value for each control process. When starting the control program 1121, the CPU 111 specifies KEYID together in order to specify which control process is to be started. In FIG. 4, three types of KEYID corresponding to the three types of control processing are illustrated, but the present invention is not limited to this.

パラメータテーブル1123は、制御処理内で用いられる制御パラメータを、制御処理毎に記述している。ここでは、制御パラメータが規定範囲内に収まっているか否かをチェックするために用いる上限値と下限値を制御パラメータとして保持している例を示しているが、これに限られるものではない。例えば、制御処理の動作モードを制御パラメータとして記述しておき、動作モードを切り替えることができる。   The parameter table 1123 describes the control parameters used in the control process for each control process. Here, an example is shown in which an upper limit value and a lower limit value used for checking whether or not a control parameter is within a specified range are held as control parameters, but the present invention is not limited to this. For example, the operation mode of the control process can be described as a control parameter, and the operation mode can be switched.

固有IDテーブル1124は、制御プログラム1121を起動する際に指定されたKEYIDに基づき、制御処理の番号を算出する際に用いる識別子である。制御処理の番号とは、制御プログラム1121が記述している各制御処理を識別するための番号である。この制御処理番号のことを、本明細書では処理IDと呼ぶ。処理IDは、KEYIDテーブル1122およびパラメータテーブル1123がそれぞれ格納している各データを照会する際に用いられる。詳細は後述する。   The unique ID table 1124 is an identifier used when calculating the number of the control process based on the KEYID specified when starting the control program 1121. The control process number is a number for identifying each control process described by the control program 1121. This control process number is referred to as process ID in this specification. The process ID is used when inquiring each data stored in the KEYID table 1122 and the parameter table 1123, respectively. Details will be described later.

固有IDの値は、制御プログラム1121毎に設けることができる。ここでは制御プログラム1121を1つのみ例示したため、固有IDの値も1つである。   The unique ID value can be provided for each control program 1121. Since only one control program 1121 is illustrated here, the unique ID value is also one.

状態バッファ1131は、AD変換器114およびセンサ131〜133の状態が正常であるか否かを示す状態値を、処理ID毎に格納する。すなわち、ある制御処理については正常範囲である値が、別の制御処理においては異常である場合もあり得るので、制御処理毎に状態値を保持することとした。   The state buffer 1131 stores a state value indicating whether or not the state of the AD converter 114 and the sensors 131 to 133 is normal for each processing ID. That is, a value that is in a normal range for a certain control process may be abnormal in another control process, and thus the state value is held for each control process.

図5は、CPU111が制御プログラム1121を実行する処理フローである。本制御処理は、周期的に実行してもよいし、例えばセンサ131〜133の検出結果を取得する際などに実行してもよい。以下、図5の各ステップについて説明する。   FIG. 5 is a processing flow in which the CPU 111 executes the control program 1121. This control process may be executed periodically, for example, when acquiring detection results of the sensors 131 to 133. Hereinafter, each step of FIG. 5 will be described.

(図5:ステップS500)
CPU111は、KEYIDとセンサ検出値を指定して、制御プログラム1121を起動する。KEYIDの値は、制御プログラム1121を呼び出す他の処理などから指定される。センサ検出値は、センサ131〜133の検出結果をAD変換器114がデジタル値に変換したものである。
(図5:ステップS501)
制御プログラム1121は、起動時に受け取ったKEYIDを処理IDに変換する。本ステップの詳細は、後述の図6で説明する。処理IDは、制御プログラム1121が記述している制御処理を指定するIDである。すなわち、制御プログラム1121を呼び出すときは、KEYIDを指定することにより、間接的に制御処理番号(処理ID)を指定することになる。
(図5:ステップS501:補足)
本処理フローでは、制御処理を不正に呼び出すことを防止するため、処理IDそのものを用いて制御処理を呼び出すのではなく、制御プログラム1121を呼び出すときにはKEYIDを指定し、これを処理IDに変換することにより間接的に制御処理を指定する。これにより、処理IDそのものを秘匿することができる。
(図5:ステップS502)
制御プログラム1121は、起動時に受け取ったKEYIDが正しい値であるか否かをチェックする。具体的には、ステップS501で算出した処理IDに対応するKEYIDをKEYIDテーブル1122から読み出し、起動時に受け取ったKEYIDと一致するか否かを確認する。両者が一致すれば、起動時に受け取ったKEYIDは正常である。両者が一致しない場合、起動時に受け取ったKEYIDは不正な値である。
(図5:ステップS502:補足)
制御プログラム1121を呼び出すときに指定したKEYIDが不正な値である場合、原則として制御処理を実施することはできない。ただし、KEYIDを処理IDに変換する処理によっては、偶然に正しい処理IDが得られる可能性がある。そこで本ステップでは、ステップS501で算出した処理IDを用いて、あらかじめKEYIDテーブル1122に格納しておいた正しいKEYIDを照会し、KEYIDを2重にチェックすることとした。本ステップの具体例は、後述の図6で改めて説明する。
(図5:ステップS503)
KEYIDが正常であればステップS504へ進み、正常でなければステップS505へ進む。
(図5:ステップS504)
制御プログラム1121は、通常の制御処理を実施する。本ステップの詳細は、後述の図7で説明する。
(図5:ステップS505)
制御プログラム1121は、異常処理を実施する。本ステップの詳細は、後述の図8で説明する。
(図5:ステップS506)
制御プログラム1121は、状態バッファ1131に格納されている、AD変換器114および各センサの状態値をリターンする。本ステップの具体例は、後述の図6で改めて説明する。
(FIG. 5: Step S500)
The CPU 111 activates the control program 1121 by specifying the KEYID and the sensor detection value. The value of KEYID is specified by other processing that calls the control program 1121. The sensor detection value is obtained by converting the detection result of the sensors 131 to 133 into a digital value by the AD converter 114.
(FIG. 5: Step S501)
The control program 1121 converts the KEYID received at startup into a process ID. Details of this step will be described later with reference to FIG. The process ID is an ID that designates a control process described by the control program 1121. That is, when the control program 1121 is called, the control process number (process ID) is indirectly specified by specifying the KEYID.
(FIG. 5: Step S501: Supplement)
In this process flow, in order to prevent the control process from being called illegally, the control process is not called using the process ID itself, but when calling the control program 1121, the KEYID is designated and converted to the process ID. The control process is specified indirectly by. Thereby, process ID itself can be concealed.
(FIG. 5: Step S502)
The control program 1121 checks whether the KEYID received at startup is a correct value. Specifically, the KEYID corresponding to the process ID calculated in step S501 is read from the KEYID table 1122, and it is confirmed whether or not it matches the KEYID received at the time of activation. If they match, the KEYID received at startup is normal. If they do not match, the KEYID received at startup is an incorrect value.
(FIG. 5: Step S502: Supplement)
If the KEYID specified when calling the control program 1121 is an invalid value, the control process cannot be executed in principle. However, depending on the process of converting the KEYID into the process ID, there is a possibility that a correct process ID is obtained by chance. Therefore, in this step, the correct KEYID stored in advance in the KEYID table 1122 is inquired using the process ID calculated in step S501, and the KEYID is checked twice. A specific example of this step will be described again with reference to FIG.
(FIG. 5: Step S503)
If KEYID is normal, the process proceeds to step S504, and if not normal, the process proceeds to step S505.
(FIG. 5: Step S504)
The control program 1121 performs normal control processing. Details of this step will be described later with reference to FIG.
(FIG. 5: Step S505)
The control program 1121 performs abnormality processing. Details of this step will be described later with reference to FIG.
(FIG. 5: Step S506)
The control program 1121 returns the state values of the AD converter 114 and each sensor stored in the state buffer 1131. A specific example of this step will be described again with reference to FIG.

図6は、ステップS501の詳細を示す図である。以下、図6の各ステップについて説明する。   FIG. 6 is a diagram showing details of step S501. Hereinafter, each step of FIG. 6 will be described.

(図6:ステップS5011)
制御プログラム1121は、起動時に受け取ったKEYIDと、固有IDテーブル1124が格納している固有IDとを足す。例えば、KEYIDが0xFFFCである場合、図4で示したデータ例では固有IDは0x0004なので、これらを足すと0x10000となる。
(図6:ステップS5012)
制御プログラム1121は、ステップS5011で算出した結果の下位16ビット分を処理IDとしてリターンする。上記例の場合、0x10000の下位16ビット分である0x0000が処理IDとなる。
(FIG. 6: Step S5011)
The control program 1121 adds the KEYID received at startup and the unique ID stored in the unique ID table 1124. For example, when KEYID is 0xFFFC, the unique ID is 0x0004 in the data example shown in FIG.
(FIG. 6: Step S5012)
The control program 1121 returns the lower 16 bits of the result calculated in step S5011 as a process ID. In the case of the above example, 0x0000, which is the lower 16 bits of 0x10000, is the process ID.

以上、ステップS501の詳細を説明した。次に、処理IDとKEYIDの対応関係について補足する。   The details of step S501 have been described above. Next, it supplements about the correspondence of process ID and KEYID.

制御プログラム1121は、図5のステップS502において、処理IDの値をキーとしてKEYIDテーブル1122を照会する。上記例では、処理IDは0x0000であるので、KEYIDテーブル1122の0番目の値を照会する。図4に示したデータ例では0番目のKEYIDは0xFFFCであるので、起動時に受け取ったKEYIDが0xFFFCであればそのKEYIDは正常であるということになる。   In step S502 of FIG. 5, the control program 1121 inquires the KEYID table 1122 using the value of the process ID as a key. In the above example, since the process ID is 0x0000, the 0th value in the KEYID table 1122 is inquired. In the data example shown in FIG. 4, since the 0th KEYID is 0xFFFC, if the KEYID received at startup is 0xFFFC, the KEYID is normal.

ステップS5011の処理内容によっては、制御プログラム1121の起動時に受け取ったKEYIDが不正な値であっても、ステップS5011において正常な処理IDに変換される場合がある。例えば、ステップS5011においてKEYIDを3で除算した余りを処理IDとする場合、ステップS5011の処理結果は0から2のいずれかの値となる。図4のデータ例では、正常な処理IDは0x0000〜0x0002の範囲であるため、偶然に正しい処理IDが得られる可能性がある。   Depending on the processing contents of step S5011, even if the KEYID received when the control program 1121 is started is an incorrect value, it may be converted to a normal processing ID in step S5011. For example, when the remainder obtained by dividing KEYID by 3 in step S5011 is used as the process ID, the process result in step S5011 is any value from 0 to 2. In the data example of FIG. 4, since a normal process ID is in the range of 0x0000 to 0x0002, there is a possibility that a correct process ID is obtained by chance.

かかる事態を防止するため、図5のステップS502において、処理IDをキーにしてKEYIDテーブル1121を照会することにより、あらかじめ格納しておいたKEYIDを用いて制御プログラム1121が呼び出されたか否かをチェックすることとした。これにより、ステップS5011で算出した処理IDが偶然正しい値となっても、KEYIDが正しくない限りは制御処理を起動することができない。   In order to prevent such a situation, in step S502 of FIG. 5, by checking the KEYID table 1121 using the process ID as a key, it is checked whether or not the control program 1121 is called using the previously stored KEYID. It was decided to. Thereby, even if the process ID calculated in step S5011 accidentally becomes a correct value, the control process cannot be started unless the KEYID is correct.

なお、KEYIDテーブル1122、パラメータテーブル1123、状態バッファ1131は、処理IDをキーにして照会されるため、これらテーブルは処理ID毎にデータを保持していることになる。   Since the KEYID table 1122, the parameter table 1123, and the status buffer 1131 are inquired using the process ID as a key, these tables hold data for each process ID.

図7は、ステップS504のうち制御パラメータをチェックする処理を示す図である。以下、図7の各ステップについて説明する。   FIG. 7 is a diagram showing processing for checking a control parameter in step S504. Hereinafter, each step of FIG. 7 will be described.

(図7:ステップS5041)
制御プログラム1121は、処理IDをキーにして、状態バッファ1131が格納している状態値を読み出す。図4のデータ例では、処理IDが0x0000であれば状態値は「故障」であり、処理IDが0x0001であれば状態値は「正常」である。
(図7:ステップS5042)
ステップS5041で読み出した状態値が「正常」であればステップS5043へ進み、「正常」でなければ本処理フローを終了する。
(図7:ステップS5043)
制御プログラム1121は、処理IDをキーにして、パラメータテーブル1123から下限値と上限値を読み出す。図4のデータ例では、処理IDが0x0001であれば、下限値は0x0080、上限値は0x2000である。
(図7:ステップS5044)
制御プログラム1121は、センサ131〜133の検出値が、ステップS5043で読み出した下限値と上限値の範囲内にあるか否かをチェックする。検出値が閾値の範囲内にある場合は、センサ検出値は正常であり、本処理フローを終了する。閾値の範囲内になければ、状態バッファ1131を書き換えるため、ステップS5045へ進む。
(図7:ステップS5045)
制御プログラム1121は、状態バッファ1131を書き換えるに先立ち、起動時に受け取ったKEYIDが正常であるか否かをチェックする。チェック手順はステップS502と同様である。KEYIDが正常であればステップS5046へ進み、正常でなければ本処理フローを終了する。
(図7:ステップS5045:補足)
本発明では、状態バッファ1131の内容が安全性や信頼性などの観点から重要であると仮定している。そこで、プログラムが暴走したときなどに、不正なアドレスへ処理がジャンプすることによって、KEYIDとは全く関連のない処理がRAM130の内容を書き換えてしまうことを防止するため、本ステップにおいてKEYIDを改めてチェックすることとした。状態バッファ1131が不正に書き換えられることを防止する以外に、例えばフラッシュROM112を書き換えるときなどの重要な処理を実行する前にも本ステップと同様にKEYIDをチェックすることにより、制御処理の安全性を向上させることができる。その他の例としては、モータ200を危険な回転速度まで上げるときなどの危険度の高い処理を実行する前に、KEYIDをチェックすることが考えられる。すなわち、KEYIDをチェックする処理は、制御処理を起動するときの他、制御処理中において重要な処理を実施する前にも実施することが有用である。
(図7:ステップS5046)
制御プログラム1121は、処理IDに対応する状態バッファ1131の状態値を「故障」に更新する。
(図7:ステップS5047)
制御プログラム1121は、本処理フローを終了すると、通常の制御処理を実施する。
(FIG. 7: Step S5041)
The control program 1121 reads the state value stored in the state buffer 1131 using the process ID as a key. In the data example of FIG. 4, if the process ID is 0x0000, the state value is “failure”, and if the process ID is 0x0001, the state value is “normal”.
(FIG. 7: Step S5042)
If the state value read in step S5041 is “normal”, the process proceeds to step S5043, and if it is not “normal”, the process flow ends.
(FIG. 7: Step S5043)
The control program 1121 reads the lower limit value and the upper limit value from the parameter table 1123 using the process ID as a key. In the data example of FIG. 4, if the process ID is 0x0001, the lower limit value is 0x0080 and the upper limit value is 0x2000.
(FIG. 7: Step S5044)
The control program 1121 checks whether or not the detection values of the sensors 131 to 133 are within the range between the lower limit value and the upper limit value read in step S5043. If the detection value is within the threshold range, the sensor detection value is normal and the process flow ends. If it is not within the threshold range, the process proceeds to step S5045 to rewrite the state buffer 1131.
(FIG. 7: Step S5045)
Prior to rewriting the status buffer 1131, the control program 1121 checks whether or not the KEYID received at startup is normal. The check procedure is the same as in step S502. If the KEYID is normal, the process proceeds to step S5046. If the KEYID is not normal, the process flow ends.
(FIG. 7: Step S5045: Supplement)
In the present invention, it is assumed that the contents of the status buffer 1131 are important from the viewpoints of safety and reliability. Therefore, in order to prevent processing that has nothing to do with KEYID from rewriting the contents of RAM 130 by jumping to an illegal address when the program runs away, check KEYID again in this step. It was decided to. In addition to preventing the status buffer 1131 from being rewritten illegally, the KEYID is checked in the same way as this step before executing an important process such as when the flash ROM 112 is rewritten. Can be improved. As another example, it is conceivable to check the KEYID before executing a process with a high degree of danger such as when the motor 200 is increased to a dangerous rotational speed. In other words, it is useful to execute the process of checking the KEYID before starting an important process during the control process, as well as when starting the control process.
(FIG. 7: Step S5046)
The control program 1121 updates the state value of the state buffer 1131 corresponding to the process ID to “failure”.
(FIG. 7: Step S5047)
The control program 1121 executes normal control processing when this processing flow ends.

図8は、ステップS505の詳細を示す図である。以下、図8の各ステップについて説明する。   FIG. 8 is a diagram showing details of step S505. Hereinafter, each step of FIG. 8 will be described.

(図8:ステップS5051)
制御プログラム1121は、固有IDとKEYIDをエラー管理モジュールに通知し、エラー履歴として記録する。エラー履歴を残すことにより、故障要因を特定するときの手がかりに有効である。エラー管理モジュールは、エラーID毎にエラー履歴を残し、エラーID毎の所定の異常処理を起動する。例えばモータ異常の場合は、モータ200を停止する処理を実行する。
(図8:ステップS5051:補足その1)
本ステップにおいてKEYIDを通知するのは、どのようなKEYIDを用いているときにエラーが発生したのかを特定したいからである。KEYIDを通知することにより、例えば、不正なKEYIDを指定して制御処理を起動しようとしたのか、それともプログラムの暴走によって不正なアドレスへ処理がジャンプしたことによりKEYIDが空のままであったのか、といったエラー原因の詳細を特定することができる。ここで通知するKEYIDは、制御処理を呼び出す際に指定されたKEYIDでもよいし、処理IDを算出する際に用いられたKEYIDでもよいし、これら双方でもよい。
(図8:ステップS5051:補足その2)
本ステップにおいて固有IDを通知するのは、正しい固有IDが用いられたか否かをチェックする意義がある。例えば、固有IDテーブル1124が破損していれば固有IDの値も破損していると考えられる。本ステップにおいて固有IDを通知することにより、エラー原因の詳細を特定することができる。
(FIG. 8: Step S5051)
The control program 1121 notifies the error management module of the unique ID and KEYID and records them as an error history. By leaving an error history, it is effective as a clue when specifying the cause of failure. The error management module leaves an error history for each error ID and starts a predetermined abnormality process for each error ID. For example, when the motor is abnormal, a process for stopping the motor 200 is executed.
(FIG. 8: Step S5051: Supplement 1)
The reason for notifying the KEYID in this step is that it is desired to specify what kind of KEYID is used and the error has occurred. By notifying the KEYID, for example, whether an attempt was made to start the control process by specifying an invalid KEYID, or whether the KEYID remained empty because the process jumped to an illegal address due to a program runaway, The details of the error cause can be specified. The KEYID notified here may be the KEYID designated when calling the control process, the KEYID used when calculating the process ID, or both of them.
(FIG. 8: Step S5051: Supplement 2)
The notification of the unique ID in this step has the significance of checking whether or not the correct unique ID has been used. For example, if the unique ID table 1124 is damaged, it is considered that the unique ID value is also damaged. By notifying the unique ID in this step, the details of the error cause can be specified.

<実施の形態1:まとめ>
以上のように、本実施形態1に係る車両制御装置100は、パラメータテーブル1123上で処理ID毎に制御パラメータを保持している。これにより、処理の内容が同一で制御パラメータのみが異なる制御処理については、同じ制御プログラム1121を異なるKEYIDで起動することにより、制御プログラム1121を共通化することができる。したがって、制御プログラム1121を格納するための記憶容量を抑えることができる。
<Embodiment 1: Summary>
As described above, the vehicle control device 100 according to the first embodiment holds the control parameter for each process ID on the parameter table 1123. As a result, the control program 1121 can be shared by activating the same control program 1121 with different KEYIDs for control processes having the same process contents but different control parameters only. Therefore, the storage capacity for storing the control program 1121 can be suppressed.

また、本実施形態1に係る車両制御装置100は、制御処理を起動する際に指定したKEYIDと、KEYIDを用いて算出した処理IDをキーにしてKEYIDテーブル1122から読み出したKEYIDとを照合する。これにより、不正なKEYIDを指定して制御処理を呼び出すことを防止し、制御処理のセキュリティを高めることができる。   Further, the vehicle control device 100 according to the first embodiment collates the KEYID specified when starting the control process with the KEYID read from the KEYID table 1122 using the process ID calculated using the KEYID as a key. As a result, it is possible to prevent the control process from being called by specifying an unauthorized KEYID, and to increase the security of the control process.

また、本実施形態1に係る車両制御装置100は、制御処理を呼び出す際に指定したKEYIDと、固有IDテーブル1124が格納している固有IDとを用いて、処理IDを算出する。これにより、処理IDや固有IDは車両制御装置100の外部に出力されないことになるので、制御処理のセキュリティを高めることができる。   Further, the vehicle control device 100 according to the first embodiment calculates a process ID using the KEYID specified when calling the control process and the unique ID stored in the unique ID table 1124. As a result, the process ID and the unique ID are not output to the outside of the vehicle control device 100, so that the security of the control process can be increased.

また、本実施形態1において、固有IDの値は、車両制御装置100毎に異なる値とすることができる。これにより、車両制御装置100を解析した得た固有IDは他の車両制御装置100上では無効な値となるので、車両制御装置100個々のセキュリティを高めることができる。同様に、固有IDの値は、制御処理を呼び出す側と申し合わせた上で、例えば制御処理を呼び出す毎に変更したり、制御処理を実行している途中で変更したりしてもよい。これにより、固有IDを解析することを困難にすることができる。   In the first embodiment, the value of the unique ID can be different for each vehicle control device 100. As a result, the unique ID obtained by analyzing the vehicle control device 100 becomes an invalid value on the other vehicle control devices 100, so that the security of each vehicle control device 100 can be enhanced. Similarly, the value of the unique ID may be changed every time the control process is called after having agreed with the side that calls the control process, or may be changed during the execution of the control process. This makes it difficult to analyze the unique ID.

<実施の形態2>
実施形態1では、固有IDとKEYIDを用いて処理IDを算出しているが、固有IDを設けないようにしてもよい。固有IDを設けない場合は、KEYIDと所定の値、例えば0x000Cを加算して処理IDを求める、などの変換規則を適宜設ければよい。
<Embodiment 2>
In the first embodiment, the process ID is calculated using the unique ID and the KEYID, but the unique ID may not be provided. When the unique ID is not provided, a conversion rule such as adding KEYID and a predetermined value, for example, 0x000C to obtain the process ID, may be provided as appropriate.

この場合は、制御処理毎にその変換規則を設け、その変換規則を制御プログラム1121内などに記述しておけばよい。例えば、ある制御処理についてはKEYIDと0x000Cを加算して処理IDとする、別の制御処理についてはKEYIDを0x0003で割った余りを処理IDとする、などが考えられる。   In this case, the conversion rule may be provided for each control process, and the conversion rule may be described in the control program 1121 or the like. For example, for a certain control process, KEYID and 0x000C are added to form a process ID, and for another control process, the remainder obtained by dividing KEYID by 0x0003 is used as the process ID.

100:車両制御装置、110:マイクロコントローラ、111:CPU、112:フラッシュROM、1121:制御プログラム、1122:KEYIDテーブル、1123:パラメータテーブル、1124:固有IDテーブル、113:RAM、1131:状態バッファ、114:AD変換器、115:インバータ制御部、120:インバータ、131〜133:センサ、200:モータ。   100: Vehicle control device, 110: Microcontroller, 111: CPU, 112: Flash ROM, 1121: Control program, 1122: KEYID table, 1123: Parameter table, 1124: Unique ID table, 113: RAM, 1131: Status buffer, 114: AD converter, 115: inverter control unit, 120: inverter, 131-133: sensor, 200: motor.

Claims (9)

車両の制御処理を実施する制御部と、
前記制御処理を指定する処理IDを算出する処理ID算出部と、
前記処理ID算出部が前記処理IDを算出するために用いる鍵識別子を前記処理ID毎に格納する鍵識別子記憶部と、
を備え、
前記処理ID算出部は、
前記制御部が前記制御処理に対する呼び出しを受け取る際に前記鍵識別子を併せて受け取り、その鍵識別子を用いて前記処理IDを算出し、
前記制御部は、
前記処理ID算出部が算出した前記処理IDに対応する前記鍵識別子を前記鍵識別子記憶部から読み出し、
前記鍵識別子記憶部から読み出した前記鍵識別子と、前記制御処理に対する呼び出しを受け取る際に受け取った前記鍵識別子とが一致する場合は、前記処理ID算出部が算出した前記処理IDに対応する前記制御処理を実施し、一致しない場合は実施しない
ことを特徴とする車両制御装置。
A control unit for performing a vehicle control process;
A process ID calculating unit for calculating a process ID for designating the control process;
A key identifier storage unit that stores, for each process ID, a key identifier used by the process ID calculation unit to calculate the process ID;
With
The processing ID calculation unit
The control unit also receives the key identifier when receiving a call to the control process, calculates the process ID using the key identifier,
The controller is
The key identifier corresponding to the process ID calculated by the process ID calculation unit is read from the key identifier storage unit,
When the key identifier read from the key identifier storage unit matches the key identifier received when receiving a call to the control process, the control corresponding to the process ID calculated by the process ID calculation unit A vehicle control device that performs processing and does not perform processing that does not match.
前記制御処理において用いる制御パラメータを前記処理ID毎に格納する制御パラメータ記憶部を備え、
前記制御部は、
前記処理ID算出部が算出した前記処理IDに対応する前記制御パラメータを前記制御パラメータ記憶部から読み出し、その制御パラメータを用いて前記制御処理を実施する
ことを特徴とする請求項1記載の車両制御装置。
A control parameter storage unit that stores control parameters used in the control process for each process ID;
The controller is
The vehicle control according to claim 1, wherein the control parameter corresponding to the process ID calculated by the process ID calculation unit is read from the control parameter storage unit, and the control process is performed using the control parameter. apparatus.
前記制御パラメータ記憶部は、
前記制御処理において用いる変数が正常であるか否かを判定するために用いる閾値を前記制御パラメータとして格納しており、
前記制御部は、
前記処理ID算出部が算出した前記処理IDに対応する前記閾値を前記制御パラメータ記憶部から読み出し、その閾値を用いて、前記変数が正常であるか否かを判定する
ことを特徴とする請求項2記載の車両制御装置。
The control parameter storage unit
A threshold value used to determine whether or not a variable used in the control process is normal is stored as the control parameter;
The controller is
The threshold value corresponding to the process ID calculated by the process ID calculation unit is read from the control parameter storage unit, and whether or not the variable is normal is determined using the threshold value. 3. The vehicle control device according to 2.
前記制御処理毎に固有の固有識別子を格納する固有識別子記憶部を備え、
前記処理ID算出部は、
前記制御部が前記制御処理に対する呼び出しを受け取る際に受け取った前記鍵識別子と、前記固有識別子記憶部が格納している前記固有識別子とを用いて、前記処理IDを算出する
ことを特徴とする請求項1記載の車両制御装置。
A unique identifier storage unit for storing a unique identifier unique to each control process;
The processing ID calculation unit
The process ID is calculated using the key identifier received when the control unit receives a call to the control process and the unique identifier stored in the unique identifier storage unit. Item 2. The vehicle control device according to Item 1.
前記固有識別子は、前記制御処理を記述した制御プログラム毎に固有な値を有する
ことを特徴とする請求項4記載の車両制御装置。
The vehicle control device according to claim 4, wherein the unique identifier has a unique value for each control program describing the control process.
前記固有識別子は、前記車両制御装置毎に固有な値を有する
ことを特徴とする請求項4記載の車両制御装置。
The vehicle control device according to claim 4, wherein the unique identifier has a value unique to each vehicle control device.
前記制御部は、
前記制御処理を実施する前に、前記鍵識別子記憶部から読み出した前記鍵識別子と、前記制御処理に対する呼び出しを受け取る際に受け取った前記鍵識別子とが一致するか否かを検証し、さらに、
前記制御処理を実施している間にも、前記鍵識別子記憶部から読み出した前記鍵識別子と、前記制御処理に対する呼び出しを受け取る際に受け取った前記鍵識別子とが一致するか否かを検証する
ことを特徴とする請求項1記載の車両制御装置。
The controller is
The control process before performing the said key identifier read from the key identifier storage unit, verifies whether said key identifier received in receiving a call to said control processing are the same, further,
Verifying whether or not the key identifier read from the key identifier storage unit matches the key identifier received when receiving a call to the control process even during the execution of the control process. The vehicle control device according to claim 1.
前記制御部は、
前記制御処理内で異常が発生したときは、前記固有識別子を上位装置に通知する
ことを特徴とする請求項記載の車両制御装置。
The controller is
The vehicle control device according to claim 4 , wherein, when an abnormality occurs in the control process, the unique identifier is notified to a host device.
前記制御部は、
前記制御処理内で異常が発生したときは、前記制御処理に対する呼び出しを受け取る際に受け取った前記鍵識別子を上位装置に通知する
ことを特徴とする請求項1記載の車両制御装置。
The controller is
2. The vehicle control device according to claim 1, wherein when an abnormality occurs in the control process, the key identifier received when receiving a call to the control process is notified to a host device.
JP2011198524A 2011-09-12 2011-09-12 Vehicle control device Active JP5507513B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011198524A JP5507513B2 (en) 2011-09-12 2011-09-12 Vehicle control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011198524A JP5507513B2 (en) 2011-09-12 2011-09-12 Vehicle control device

Publications (2)

Publication Number Publication Date
JP2013061724A JP2013061724A (en) 2013-04-04
JP5507513B2 true JP5507513B2 (en) 2014-05-28

Family

ID=48186362

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011198524A Active JP5507513B2 (en) 2011-09-12 2011-09-12 Vehicle control device

Country Status (1)

Country Link
JP (1) JP5507513B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61195427A (en) * 1985-02-26 1986-08-29 Mitsubishi Electric Corp Program identifier
JPH06208516A (en) * 1992-10-27 1994-07-26 Toshiba Corp Security circuit

Also Published As

Publication number Publication date
JP2013061724A (en) 2013-04-04

Similar Documents

Publication Publication Date Title
JP5163807B2 (en) Microcomputer mutual monitoring system and microcomputer mutual monitoring method
JP5867495B2 (en) Electronic control unit
JP6754743B2 (en) In-vehicle electronic control unit and its abnormal processing method
KR101326316B1 (en) Method and device for monitoring a functionality of an engine controller of an internal combustion engine
US8954801B2 (en) Microcomputer and method of operation thereof
CN109997140B (en) Low power embedded device using write-once register slave device sleep state accelerated secure boot
WO2017009634A1 (en) Electronic control units for vehicles
US9778642B2 (en) Protection unit for a programmable data-processing system
US9221492B2 (en) Method for operating an electrical power steering mechanism
JP6955858B2 (en) Control device
US20220300612A1 (en) Security processing device
JP6007677B2 (en) Safety control system and processor of safety control system
JP5507513B2 (en) Vehicle control device
JP5233634B2 (en) Field communication system and field communication method
JP6502211B2 (en) Vehicle control device
JP2024041711A (en) Information processing apparatus, control method of information processing apparatus, and program
US9286244B2 (en) Method and device for monitoring an unauthorized memory access of a computing device, in particular in a motor vehicle
Schneider et al. Safety element out of context-a practical approach
JP5453984B2 (en) RAM diagnostic device and program thereof
KR20120127057A (en) Method for preventing tuning of electronic control unit, apparatus applied to the same
JP2016091554A (en) Method of operating control device
JP2012174198A (en) Abnormality detection device and abnormality detection program
JP2011126327A (en) On-vehicle controller
JP6524989B2 (en) Operation guarantee method of arithmetic unit
US20220360992A1 (en) Control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130731

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140219

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: 20140311

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140319

R150 Certificate of patent or registration of utility model

Ref document number: 5507513

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250