JP2008172896A - Controller of vehicular motor - Google Patents
Controller of vehicular motor Download PDFInfo
- Publication number
- JP2008172896A JP2008172896A JP2007002529A JP2007002529A JP2008172896A JP 2008172896 A JP2008172896 A JP 2008172896A JP 2007002529 A JP2007002529 A JP 2007002529A JP 2007002529 A JP2007002529 A JP 2007002529A JP 2008172896 A JP2008172896 A JP 2008172896A
- Authority
- JP
- Japan
- Prior art keywords
- motor
- control
- area
- vehicle
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、車両用電動機の制御装置、車両用電動機の制御方法、およびコンピュータが実行するためのプログラムに関し、詳細には、メモリのアクセス禁止領域へのデータの書き込みをソフトウェアで監視して、ソフトウェアの暴走を未然に防止することが可能な車両用電動機の制御装置、車両用電動機の制御方法、およびコンピュータが実行するためのプログラムに関する。 The present invention relates to a control device for a motor for a vehicle, a method for controlling a motor for a vehicle, and a program to be executed by a computer. More specifically, the software monitors the writing of data to an access-prohibited area of a memory. The present invention relates to a vehicular electric motor control device, a vehicular electric motor control method, and a program executed by a computer.
車両には、各種電動機が使用されている。例えば、車両に搭載される電動パワーステアリング装置では、操舵補助トルク(アシストトルク)を与える操舵補助モータ(アシストモータ)が使用されている。電動パワーステアリング装置は、操舵補助モータの駆動力を、減速機を介してギヤまたはベルト等の伝送機構により、ステアリングシャフトまたはラック軸に補助力を付与するようになっている。かかる電動パワーステアリング装置の制御装置は、操舵補助トルクを正確に発生させるため、モータ電流のフィードバック制御を行っている。フィードバック制御は、電流指令値とモータ電流検出値との差が小さくなるようにモータ印加電圧を調整するものであり、モータ印加電圧の調整は、一般的にPWM(パルス幅変調)制御のデューティー比の調整で行っている。 Various electric motors are used in the vehicle. For example, in an electric power steering apparatus mounted on a vehicle, a steering assist motor (assist motor) that gives steering assist torque (assist torque) is used. The electric power steering apparatus applies a driving force of a steering assist motor to a steering shaft or a rack shaft by a transmission mechanism such as a gear or a belt via a speed reducer. Such a control device for the electric power steering apparatus performs feedback control of the motor current in order to accurately generate the steering assist torque. In feedback control, the motor applied voltage is adjusted so that the difference between the current command value and the detected motor current value is small. Generally, the adjustment of the motor applied voltage is a duty ratio of PWM (pulse width modulation) control. It is done by adjusting.
電動パワーステアリングの制御装置は、CPU(中央演算装置)、操舵補助モータを制御するためのソフトウェアが格納されたROMと、CPUがソフトウェアを実行する場合に作業領域として使用するRAMを備えている。ソフトウェア設計時には、あらゆる動作を想定して、RAMのメモリ保護違反、スタックオーバーフロー等を起こさないように、設計・デバック・検証をホワイトボックス的に行っているが、想定外のソフトウェアエラーが発生した場合には、RAMのオーバーフローが発生する場合がある。また、近時、ソフトウェアモジュールのブラックボックス化が進んでいるため、設計・デバック・検証を十分に行えない場合も想定される。 The control device for the electric power steering includes a CPU (Central Processing Unit), a ROM that stores software for controlling the steering assist motor, and a RAM that is used as a work area when the CPU executes the software. At the time of software design, design / debug / verification is performed in a white box to prevent RAM memory protection violation, stack overflow, etc., assuming every operation, but an unexpected software error occurs In some cases, RAM overflow may occur. In addition, since software modules are becoming more black boxes recently, there may be cases where design, debugging, and verification cannot be performed sufficiently.
ハードウェアを用いて、RAMへの不正なアクセスを事前に防止する技術が、例えば、特許文献1,2で提案されている。特許文献1のデータ保護装置は、アドレススペースをアドレスするプロセッサと、第1メモリと、これらプロセッサとメモリとを相互接続するバスと、第1範囲のアドレスに応答して第1選択信号を発生する第1アドレスデコーダとを備え、上記第1メモリはこの第1選択信号によって選択され、更に、上記第1のアドレス範囲と同一ではなく且つ上記第1範囲と共通のアドレスを少なくとも1つ有している第2のアドレス範囲のアドレスに応答して第2選択信号を発生する第2のアドレスデコーダと、上記プロセッサに作動的に接続されてそこから要求信号を受け取る保護回路とを備えており、当該保護回路は、要求信号の受信が存在しない場合に上記第2選択信号の発生の事象を通知するものである。
For example,
また、特許文献2のメモリ制御装置は、閾値レジスタに、アドレス信号ADDRの値の大小関係により書き込み制限区画を識別するための唯一の閾値アドレスを格納し、アドレス信号の一部と閾値レジスタが保持する値の大小関係を検出するアドレス比較部と、デバイス選択信号CS_0と、アドレス比較部の比較結果に基づきメモリデバイスに対する書き込み制御信号をマスクするマスク制御部を設け、アドレス信号ADDRの値と閾値アドレスが書き込み制限を行なうべき所定の大小関係にあることをアドレス比較部が検出している場合、メモリデバイスに対する書き込みアクセスを無効とするものである。
In addition, the memory control device of
しかしながら、上記特許文献1,2にあっては、RAMへの不正なアクセスを、ハードウェアを用いて防止する構成であるため、監視するメモリエリアの変更や複数メモリエリアへの対応等、設計変更による設計・製造工数にかかる工程が大きくなり、コストが大きくなってしまうため、低コストな構成とすることができないという問題がある。
However, in
本発明は、上記課題に鑑みてなされたものであり、低コストな構成でメモリを監視して、ソフトウェアの暴走を未然に防止することが可能な車両用電動機の制御装置、車両用電動機の制御方法、およびコンピュータが実行するためのプログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and monitors a memory with a low-cost configuration to prevent a software runaway from occurring, and a control device for a vehicle motor. It is an object to provide a method and a program to be executed by a computer.
上記した課題を解決して、本発明の目的を達成するために、本発明は、車両に搭載された車両用電動機を制御する車両用電動機の制御装置において、制御プログラムを実行して前記車両用電動機を制御する制御手段と、前記制御手段が前記制御プログラムを実行する場合にその作業領域として使用され、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリと、を備え、前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを監視するメモリ監視手段を有し、前記制御プログラムの不正アクセスを監視することを特徴とする。これにより、メモリのアクセス禁止領域へデータが書き込まれたか否かをソフトウェアにより検出して、ソフトウェアエラーを検出することができ、低コストな構成でメモリを監視して、ソフトウェアの暴走を未然に防止することが可能となる。 In order to solve the above-described problems and achieve the object of the present invention, the present invention provides a control apparatus for a vehicle motor that controls a vehicle motor mounted on a vehicle, by executing a control program to A control means for controlling an electric motor; an access permission area that is used as a work area when the control means executes the control program; And the control means has memory monitoring means for monitoring the writing of data to the access prohibited area of the memory, and monitors unauthorized access of the control program. This makes it possible to detect whether software has been written to the memory access-prohibited area and detect software errors, and monitor the memory with a low-cost configuration to prevent software runaway. It becomes possible to do.
また、本発明の好ましい態様によれば、前記メモリ監視手段は、前記制御プログラムが実行される前に所定の検出用データを前記アクセス禁止領域に予め書き込み、前記制御プログラムの実行中に、または、前記制御プログラムが実行された後に、前記アクセス禁止領域のデータを読み込んで前記所定の検出用データと比較することにより、前記アクセス禁止領域へのデータの書き込みを検出することが望ましい。これにより、簡単な方法で、メモリのアクセス禁止領域にデータが書き込まれたか否かを検出することが可能となる。 Further, according to a preferred aspect of the present invention, the memory monitoring unit writes predetermined detection data in the access prohibited area in advance before the control program is executed, and during execution of the control program, or After the control program is executed, it is preferable to detect data writing in the access prohibited area by reading the data in the access prohibited area and comparing it with the predetermined detection data. As a result, it is possible to detect whether or not data has been written in the access prohibited area of the memory by a simple method.
また、本発明の好ましい態様によれば、前記アクセス許可領域は、スタック領域およびデータ領域を含み、前記アクセス禁止領域は、前記スタック領域およびデータ領域に隣接した領域であることが望ましい。これにより、スタック領域およびデータ領域のオーバーフローを監視することが可能となる。 According to a preferred aspect of the present invention, it is desirable that the access permission area includes a stack area and a data area, and the access prohibition area is an area adjacent to the stack area and the data area. Thereby, it is possible to monitor the overflow of the stack area and the data area.
また、本発明の好ましい態様によれば、前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを検出した場合には、前記車両用電動機を停止させることが望ましい。これにより、ソフトウェアが暴走する前に、車両用電動機を停止することが可能となる。 Further, according to a preferred aspect of the present invention, it is desirable that the control means stops the vehicle electric motor when detecting the writing of data to the access prohibited area of the memory. This makes it possible to stop the vehicle motor before the software runs away.
また、本発明の好ましい態様によれば、前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを検出した場合には、前記制御プログラムの実行を停止して、当該制御プログラムに比して負荷の少ないサブ制御プログラムを実行して前記車両用電動機の制御を継続することが望ましい。これにより、ソフトウェアの暴走を未然に防止することができるとともに、車両用電動機の動作を継続させることが可能となる。 According to a preferred aspect of the present invention, when the control means detects writing of data into the access prohibited area of the memory, the control means stops execution of the control program and compares it with the control program. It is desirable to continue the control of the vehicle motor by executing a sub-control program with a low load. As a result, it is possible to prevent the software from running away and to continue the operation of the vehicle motor.
また、本発明の好ましい態様によれば、さらに、不揮発性メモリを備え、前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを検出した場合には、解析に必要なメモリ情報を前記不揮発性メモリに格納することが望ましい。これにより、メモリのアクセス禁止領域にデータが書き込まれた原因(ソフトウェアエラーの原因)を解析することが可能となる。 Further, according to a preferred aspect of the present invention, further comprising a non-volatile memory, the control means detects the memory information necessary for the analysis when the writing of data to the access prohibited area of the memory is detected. It is desirable to store in non-volatile memory. As a result, it is possible to analyze the cause (data cause) of the data being written in the access prohibited area of the memory.
また、本発明の好ましい態様によれば、前記制御プログラムは、優先順位の異なる複数のタスクを含み、前記メモリは、複数のアクセス禁止領域が設定されていることが望ましい。これにより、各タスクのソフトウェアエラーを検出することが可能となる。 According to a preferred aspect of the present invention, it is preferable that the control program includes a plurality of tasks having different priorities, and the memory is set with a plurality of access prohibited areas. Thereby, it becomes possible to detect the software error of each task.
また、本発明の好ましい態様によれば、前記メモリ監視手段は、前記メモリのアクセス禁止領域への書き込みの監視を、前記車両用電動機の立ち上がりの時定数より短い周期で実行することが望ましい。これにより、ソフトウェアが暴走する前に、確実に電動機を停止させる等の対策をとることが可能となる。 Further, according to a preferred aspect of the present invention, it is desirable that the memory monitoring unit performs monitoring of writing to the access prohibited area of the memory at a cycle shorter than a time constant of rising of the vehicle motor. As a result, it is possible to take measures such as stopping the motor without fail before the software runs away.
また、本発明の好ましい態様によれば、前記車両用電動機は、車両のステアリング系に操舵補助力を付与する電動パワーステアリング装置の操舵補助モータであり、前記制御手段は、前記制御プログラムを実行して、少なくとも前記ステアリング系に発生する操舵トルクに基づいて前記操舵補助モータの電流指令値を演算し、電流検出回路で検出された前記操舵補助モータの電流検出値と前記電流指令値とに基づいて、前記操舵補助モータの電流検出値が前記電流指令値に追従するように前記操舵補助モータを駆動制御することが望ましい。これにより、電動パワーステアリング装置において、低コストな構成でメモリを監視して、ソフトウェアの暴走を未然に防止することが可能となる。 According to a preferred aspect of the present invention, the vehicle electric motor is a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle, and the control means executes the control program. And calculating a current command value of the steering assist motor based on at least a steering torque generated in the steering system, and based on the detected current value of the steering assist motor and the current command value detected by a current detection circuit. Preferably, the steering assist motor is driven and controlled so that a current detection value of the steering assist motor follows the current command value. As a result, in the electric power steering apparatus, it is possible to monitor the memory with a low-cost configuration and prevent software runaway.
また、本発明の好ましい態様によれば、前記車両用電動機は、車両のステアリング系に操舵補助力を付与する電動パワーステアリング装置の操舵補助モータであり、前記制御プログラムは、モータ電流制御系モジュール、モータ電流補助制御系モジュール、トルク制御系モジュール、および補償制御系モジュールを含み、前記サブ制御プログラムは、前記モータ電流制御系モジュール、前記トルク制御系モジュール、および前記補償制御系モジュールを含むことが望ましい。これにより、第1の制御プログラムにソフトウェアエラーが発生した場合でも、モータ電流補助制御系モジュールがなく負荷の軽いサブ制御プログラムを実行して、操舵補助モータのアシストを継続させることが可能となる。 According to a preferred aspect of the present invention, the vehicle electric motor is a steering assist motor of an electric power steering device that applies a steering assist force to a vehicle steering system, and the control program includes a motor current control system module, It is preferable that the motor current auxiliary control system module, the torque control system module, and the compensation control system module are included, and the sub-control program includes the motor current control system module, the torque control system module, and the compensation control system module. . Thus, even when a software error occurs in the first control program, it is possible to continue the assist of the steering assist motor by executing the sub-control program with a light load and no motor current assist control module.
また、本発明の好ましい態様によれば、前記車両用電動機は、車両のステアリング系に操舵補助力を付与する電動パワーステアリング装置の操舵補助モータであり、前記制御プログラムは、前記操舵補助モータを制御するための第1のタスクと、外部と通信するための第2のタスクとを含むことが望ましい。これにより、電動パワーステアリング装置の制御装置において、各タスクのソフトウェアエラーを検出することが可能となる。 According to a preferred aspect of the present invention, the vehicle electric motor is a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle, and the control program controls the steering assist motor. It is desirable to include a first task for communication and a second task for communication with the outside. Thereby, the software error of each task can be detected in the control device of the electric power steering device.
上記した課題を解決して、本発明の目的を達成するために、本発明は、車両に搭載された車両用電動機を制御する車両用電動機の制御方法において、制御手段が、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリを、作業領域として使用して制御プログラムを実行し、前記車両用電動機を制御する制御工程と、前記制御手段が、メモリ監視プログラムを実行して、前記アクセス禁止領域へのデータの書き込みを監視して、前記制御プログラムの不正アクセスを監視する監視工程と、を含むことを特徴とする。 In order to solve the above-described problems and achieve the object of the present invention, the present invention provides a vehicle motor control method for controlling a vehicle motor mounted on a vehicle. A control step of controlling the vehicle electric motor by executing a control program using a memory having an access-permitted area and an access-prohibited area where data writing is prohibited as a work area, and the control means A monitoring step of executing a memory monitoring program to monitor writing of data to the access prohibited area and monitoring unauthorized access of the control program.
上記した課題を解決して、本発明の目的を達成するために、本発明は、車両に搭載された車両用電動機を制御する車両用電動機の制御装置に搭載されるプログラムにおいて、コンピュータに、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリを作業領域として使用して、前記車両用電動機を制御する制御工程と、前記アクセス禁止領域へのデータの書き込みを監視して、ソフトウェアの不正アクセスを監視する監視工程と、を実行させることを特徴とする。 In order to solve the above-described problems and achieve the object of the present invention, the present invention provides a computer program that stores data in a program mounted on a vehicle motor control device that controls a vehicle motor mounted on a vehicle. A control process for controlling the motor for a vehicle using a memory having an access-permitted area where data writing is permitted and an access-prohibited area where data writing is prohibited as a work area, and access to the access-prohibited area And monitoring the data writing to monitor unauthorized access of software.
本発明によれば、車両に搭載された車両用電動機を制御する車両用電動機の制御装置において、制御プログラムを実行して前記車両用電動機を制御する制御手段と、前記制御手段が前記制御プログラムを実行する場合にその作業領域として使用され、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリと、を備え、前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを監視するメモリ監視手段を有し、前記制御プログラムの不正アクセスを監視することとしたので、メモリのアクセス禁止領域へデータが書き込まれたか否かをソフトウェアにより検出して、ソフトウェアエラーを検出することができ、低コストな構成でメモリを監視して、ソフトウェアの暴走を未然に防止することが可能な車両用電動機の制御装置を提供することが可能となるという効果を奏する。 According to the present invention, in a control apparatus for a vehicle motor that controls a vehicle motor mounted on a vehicle, a control unit that executes a control program to control the vehicle motor, and the control unit executes the control program. A memory having an access-permitted area where data writing is permitted and an access-prohibited area where data writing is prohibited; Since it has memory monitoring means to monitor the writing of data to the access prohibited area and monitors the unauthorized access of the control program, it detects by software whether data has been written to the access prohibited area of the memory. Can detect software errors, monitor memory with low-cost configuration, and software Providing a motor control apparatus for a vehicle capable of preventing a runaway in advance an effect that it is possible.
以下に、この発明につき図面を参照しつつ詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。また、下記実施例における構成要素には、当業者が容易に想定できるものまたは実質的に同一のものが含まれる。以下の実施例では、車両に搭載された車両用電動機として、車両のステアリング系に操舵補助力を付与する電動パワーステアリング装置の操舵補助モータを制御する制御装置を一例として説明する。 Hereinafter, the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments. In addition, constituent elements in the following embodiments include those that can be easily assumed by those skilled in the art or those that are substantially the same. In the following embodiments, a control device for controlling a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle will be described as an example of a vehicle electric motor mounted on the vehicle.
図1は、電動パワーステアリング装置の一般的な構成を示す図である。図1において、操向ハンドル1のコラム軸2は減速ギア3、ユニバーサルジョイント4aおよび4b、ピニオンラック機構5を経て操向車輪のタイロッド6に連結されている。コラム軸2には、操向ハンドル1の操舵トルクTを検出するトルクセンサ10が設けられており、操向ハンドル1の操舵力を補助する操舵補助モータ20が、減速ギア3を介してコラム軸2に連結されている。ここで、操舵補助モータ20は、例えば、ブラシレスモータやブラシモータである。電動パワーステアリング装置を制御するコントロールユニット30には、バッテリ14から内蔵の電源リレー13を経て電力が供給され、イグニションキー11からイグニション信号が供給される。また、コントロールユニット30は、トルクセンサ10で検出された操舵トルクTと車速センサ12で検出された車速Vとに基づいて、操舵補助モータ20の電流指令値を演算し、操舵補助モータ20の電流検出値と電流指令値とに基づいて、操舵補助モータ20の電流検出値が電流指令値に追従するように操舵補助モータ20を駆動制御する。
FIG. 1 is a diagram illustrating a general configuration of an electric power steering apparatus. In FIG. 1, a
図2は、図1のコントロールユニット30のハードウェア構成を示す図である。図3は、図2の主MCUのROMおよびRAMのメモリ構成例を示す図である。コントロールユニット30は、図2に示すように、主MCU(マイクロコントロールユニット)100と、副MCU(マイクロコントロールユニット)110と、WDT(ウォッチドックタイマ)130と、FETプリドライバ回路140と、モータ駆動回路(インバータ)150と、電流検出回路160と、位置検出回路170等を備えている。
FIG. 2 is a diagram showing a hardware configuration of the
主MCU100は、CPU101(制御手段)、ROM102、RAM(メモリ)103、EEPROM104,A/D変換器105、インターフェース106、バス107等を備えている。CPU101は、ROM102に格納された各種プログラムを実行して電動パワーステアリング装置を制御する。
The
ROM102は、CPU101が実行する各種プログラムを格納する。具体的には、ROM102には、図3に示すように、操舵補助モータ20を制御するモータ制御処理(操舵補助処理)を実行するための制御プログラム201、RAM103のアクセス禁止領域にデータの書き込みがあるか否かを監視するメモリ監視処理を実行するためのメモリ監視プログラム202、安全動作に移行する安全動作移行処理を実施するための安全動作移行プログラム203等が格納されている。RAM103は、CPU101がプログラムを実行する場合にその作業領域として使用され、処理過程で必要とするデータや処理結果、サブルーチンや割り込み処理に際して戻り番地等が記憶されるものであり、データの書き込みが許可されたアクセス許可領域とデータの書き込みが禁止されたアクセス禁止領域とを有している。上記構成において、CPU101がメモリ監視プログラム202を実行することにより、メモリ監視手段として機能する。
The
EEPROM104は、電源遮断後においても記憶内容を保持可能なメモリであり、後述するように、RAM103のアクセス禁止領域へのデータの書き込みが検出された場合に、解析に必要なメモリ情報等が書き込まれる。A/D変換器105は、トルクセンサ10からの操舵トルクT、電流検出回路160からの操舵補助モータ20の電流検出値Im、および位置検出回路170からのモータ回転角信号θ等を入力し、デジタル信号に変換する。インターフェース106は、車速センサ12からの車速V(車速パルス)をCAN通信で受け取るためのものである。
The
FETプリドライバ回路140は、主MCU100から入力されるUVW各相のPWM制御信号を、各相正負の通電信号(Up,Un、Vp、Vn、Wp,Wn)に変換して、モータ駆動回路150に出力する。
The
モータ駆動回路150は、一対のFETスイッチング素子からなるブリッジ回路をU相用,V相用,W相用として3相分備えており、各FETスイッチング素子には還流ダイオードが並列接続されている。このブリッジ回路には、バッテリ14から電源リレー13を介して直流電圧が印加される。各FETスイッチング素子の制御端子(ゲート端子)には、FETプリドライバ回路140から通電信号が入力される。モータ駆動回路150に印加される直流電圧は、モータ駆動回路150内のFETスイッチング素子のスイッチング動作によって3相の交流電圧に変換され、それにより操舵補助モータ20が駆動される。このブリッジ回路には、シャント抵抗R1,R2が接続されている。このシャント抵抗R1,R2に電流検出回路160が接続され、これによって、操舵補助モータ20の電流検出値Imを検出するようになっている。
The
位置検出回路170は、位置センサ21に励磁電流を与えるとともに、位置センサ21からの出力信号をモータ回転角信号θとして、A/D変換器105に出力する。
The
WDT130は、主MCU100のCPU101のハードウェアエラーを検出するためのものである。CPU101のハードウェアエラーは、電磁ノイズによる暴走、レジスタのデータ化け等の各種が存在する。CPU101およびWDT130は、それぞれタイマ用カウンタを備えている。WDT130は、CPU101から出力されるクリアパルスが一定時間(例えば、40msec)以上停止した場合に、リセット信号を発生し、CPU101をリセットすると共に、FETプリドライバ回路140にモータ停止信号を出力して、FETプリドライバ回路140の動作を停止させて、操舵補助モータ20を停止させる。
The
副MCU110は、CPU111、ROM112、RAM113、D/A変換器115、およびA/D変換器116等を備えている。副MCU110は、モータ制御のための演算処理は実行しないが、主MCU100とシリアル通信により相互に動作(ハードウェアエラー)の監視を行っている。
The
例えば、主MCU100のA/D変換器105の異常を以下の方法で検出している。主MCU100のA/D変換器105は、8ポートAD1〜AD8を有しており、異常診断時には、例えば、AD8が使用され、7つのポートAD1〜AD7は異常診断に使用されず、ポートAD1〜AD7は、本来のモータ制御処理に使用される。
For example, the abnormality of the A /
また、副MCU110のA/D変換器116は、8ポートAD1〜AD8を有しており、異常診断時には、例えば、AD8が使用され、7つのポートAD1〜AD7は使用されない。まず、副MCU110は、所定値のデジタル値をD/A変換器115でアナログ値に変換して出力する。出力されたアナログ値は、主MCU100のA/D変換器105のポートAD8に入力され、再度、デジタル値に変換され、シリアル通信で副MCU110へ返却値1として送信される。また、出力されたアナログ値は、副MCU110のA/D変換器116のポートAD8に入力され、再度、デジタル値に変換され、返却値2として返却される。副MCU110は、受信された返却値1と所定値のデジタル値との誤差ΔX1を算出し、誤差ΔX1が、許容値ΔXK以下である場合には、A/D変換器105およびD/A変換器115が正常と判定する。他方、副MCU110は、誤差ΔX1が許容値ΔXKより大きい場合には、返却値2と所定値のデジタル値との誤差ΔX2を算出し、誤差ΔX2が、許容値ΔXK以下である場合には、D/A変換器115は正常で、A/D変換器105が異常であると判定する。A/D変換器105は、操舵補助モータ20を制御するために重要な要素であるので、この場合は、操舵補助モータ20を停止させる。
The A / D converter 116 of the
上記構成のコントロールユニット30では、副MCU110およびWDT130により主MCU100のハードウェアエラーを監視している。また、主MCU100のCPU101が、メモリ監視プログラム202を実行することにより、ソフトウェアエラーを監視している。このように、ハードウェアエラーとソフトウェアエラーを別々に検出することで、ハードウェアエラーとソフトウェアエラーの切り分けを行うことができる。なお、図示はしないが、RAM103のRAM化け(01反転)等のハードウェアエラーを検出するための検出回路を主MCU100の内部または外部に設けることにしてもよい。
In the
つぎに、図3〜図7を参照して、CPU101がメモリ監視プログラム202を実行して、ソフトウェアエラーを検出する方法を具体的に説明する。本実施例では、CPU101がメモリ監視プログラム202を実行して、RAM103のアクセス禁止領域へのデータの書き込みを監視して制御プログラム201の不正アクセスを監視することにより、制御プログラム201のソフトウェアエラーを検出している。以下の説明では、CPU101がプログラムを実行して行う処理を、プログラムを動作主体として説明する。
Next, with reference to FIGS. 3 to 7, a method in which the
図3において、RAM103には、制御プログラム201を実行する場合に使用するデータ領域(メモリ領域)301およびスタック領域302が初期設定で確保されている。このデータ領域301およびスタック領域302をアクセス許可領域と称する。
In FIG. 3, the
上述したように、ソフトウェア設計時には、あらゆる動作を想定して、RAM103のメモリ保護違反、スタックオーバーフロー等を起こさないように、設計・デバック・検証をホワイトボックス的に行っているが、想定外のソフトウェアエラーが発生する場合がある。また、近時、ソフトウェアモジュールのブラックボックス化が進んでいるため、設計・デバック・検証を十分に行えない場合も想定される。
As described above, at the time of software design, design / debugging / verification is performed in a white box so as not to cause a memory protection violation of
データ領域301は、矢印方向に使用され、上位アドレス側から下位アドレス側にデータが書き込まれる。データ領域301の下側にはアクセス禁止領域401が隣接して設定されている。ソフトウェアエラーが発生して、データ領域301がオーバーフローした場合には、アクセス禁止領域401にデータが書き込まれることになる。
The
スタック領域302は、矢印方向に使用され、上位アドレス側から下位アドレス側にデータが書き込まれる。スタック領域302の下側には、アクセス禁止領域402が近接して設定されている。ソフトウェアエラーが発生して、スタック領域302がオーバーフローした場合には、アクセス禁止領域402にデータが書き込まれることになる。
The
メモリ監視プログラム202は、電源投入後の制御プログラム201が実行される前に、検出用データとして、アクセス禁止領域401に、初期値=0x01010101を、アクセス禁止領域402に、初期値=0x02020202を書き込む。メモリ監視プログラム202は、制御プログラム201の実行中または制御プログラム201の実行後に、メモリ監視処理を実行し、アクセス禁止領域401,402のデータを読み込んで、検出用データ(0x01010101,0x02020202)とそれぞれ比較することで、アクセス禁止領域401、402にデータの書き込みがあるか否か検出する。
The memory monitoring program 202 writes initial value = 0x01010101 in the access prohibited
図4は、制御プログラム201とメモリ監視プログラム202の実行タイミングを説明するための図である。図4において、Tはモータ電流制御周期(例えば、125μsec)を示している。メモリ監視プログラム202によるメモリ監視処理は、CPU101の空き時間に実行され、同図に示す例では、所定周期で、制御プログラム201によるモータ制御処理の実行後の空き時間に実行される。また、メモリ監視処理の実行周期は、操舵補助モータ20の立ち上がりの時定数より小さい周期となっている。
FIG. 4 is a diagram for explaining execution timings of the
図5は、メモリ監視処理および安全動作移行処理を説明するためのフローチャートである。図5において、メモリ監視プログラム202によるメモリ監視処理が実行されると(ステップS1)、RAM103のアクセス禁止領域401、402のデータを読み込み(ステップS2)、読み込んだデータと検出用データが一致するか否かを判定する(ステップS3)。読み込んだデータと検出用データが一致する場合は(ステップS3の「Yes」)、ソフトウェアが正常に動作していると判断して、モータ制御処理を実行する(ステップS4)。他方、読み込んだデータと検出用データが一致しない場合は(ステップS3の「No」)、制御プログラム201による不正なアクセスであり、ソフトウェアエラーと判断して、安全動作移行プログラム203を実行する(ステップS5)。安全動作移行プログラム203は、解析に必要なメモリ情報(例えば、CPU101のレジスタやRAM103のアクセス禁止領域401,402に書き込まれたデータ等)を、EEPROM104に格納した後(ステップS6)、操舵補助モータ20を停止させる(ステップS7)。このように、RAM103のアクセス禁止領域にデータが書き込まれたことを検出した場合に、直ちに、操舵補助モータ20を停止することとしたので、制御プログラム201が暴走する前に、操舵補助モータ20を停止させることが可能となる。
FIG. 5 is a flowchart for explaining the memory monitoring process and the safe operation transition process. In FIG. 5, when the memory monitoring process by the memory monitoring program 202 is executed (step S1), the data in the access prohibited
なお、ここでは、EEPROM104に解析に必要なメモリ情報を格納した後に、操舵補助モータ20を停止させることとしたが、操舵補助モータ20を停止させた後に、解析に必要なメモリ情報を、EEPROM104に格納することにしてもよい。また、解析に必要なメモリ情報は、CPU101のレジスタやRAM103のアクセス禁止領域401,402に書き込まれたデータに限られるものではなく、RAM103のアクセス禁止領域にデータが書き込まれた原因(ソフトウェアエラーの原因)を解析するために必要なデータであれば、如何なるデータでもよい。
Here, the memory information necessary for the analysis is stored in the
図6および図7は、RAM103の他の構成例を示す図である。RAM103の領域設定は、図3に示す例に限られるものではなく、例えば、図6および図7に示すような構成としてもよい。図6において、データ領域311とスタック領域312とが、隣接して設定されており、データ領域311の上側にアクセス禁止領域411、スタック領域312の下側にアクセス禁止領域412が隣接して設定されている。データ領域311は、矢印方向に使用され、下位アドレス側から上位アドレス側にデータ書き込まれる。また、スタック領域312は、矢印方向に使用され、上位アドレス側から下位アドレス側にデータが書き込まれる。
6 and 7 are diagrams illustrating another configuration example of the
図7において、データ領域321とスタック領域322間にアクセス禁止領域421が設定されている。データ領域321は、矢印方向に使用され、上位アドレス側から下位アドレス側にデータ書き込まれる。また、スタック領域322は、矢印方向に使用され、下位アドレス側から上位アドレス側にデータが書き込まれる。このように、アクセス禁止領域421を設定することにより、1つのアクセス禁止領域で、データ領域321およびスタック領域322のオーバーフローを検出することができ、RAM103のメモリ容量を低減することが可能となる。
In FIG. 7, an access prohibition area 421 is set between the
図8は、CPU101が制御プログラム201を実行することにより実現する機能(制御プログラム201の機能構成)を示す図である。
FIG. 8 is a diagram illustrating functions realized by the
制御プログラム201は、図8に示すように、操舵トルクTと車速Vに基づいて操舵補助トルク指令値を算出するトルク制御系モジュール(例えば、動作周期が1msec)500と、各種のトルク補償を行う補償制御系モジュール(例えば、動作周期が2msec)510と、モータ電流のFB(フィードバック)制御を行うモータ電流制御系モジュール520(例えば、動作周期が125μsec)と、操舵補助モータ20のモータ電流のFF(フィードフォワード)制御を行うモータ電流補助制御系モジュール530(例えば、動作周期が125μsec)等を備えている。つぎに、動作の概略を説明する。
As shown in FIG. 8, the
まず、トルクセンサ10で検出された操舵トルクTと、車速センサ12で検出された車速Vとがアシストマップ501に入力され操舵補助指令値が算出される。さらに、補償制御系モジュール510で演算される補償値、例えば、収斂性演算部511,慣性演算部512,およびSAT演算部513で算出された収斂性・慣性・SATなどの補償値を、加算部502で操舵補助指令値に加算してトルク指令値Trefが決定される。トルク指令値Trefは、位相補償部503で位相補償された後、電流指令値演算部540に入力される。そして、トルク指令値Trefに基づいて電流指令値演算部540で電流指令値Irefが決定される。なお、ブラシレスモータでは、トルク指令値Trefの他に回転子のロータ角度も電流指令値演算部540に入力して電流指令値Irefが決定される。
First, the steering torque T detected by the
一方、操舵補助モータ20のモータ電流は、電流検出値Imとして、電流検出回路160で検出され、電流指令値Irefとともに減算部521へ入力される。減算部521では、それらの偏差ΔI=Iref−Imが算出され、PI(比例積分)制御部522に入力される。PI(比例積分)制御部522では、偏差ΔIの比例積分出力として、電圧制御値Vrefが出力される。また、電流指令値Irefは、補助値演算部531に入力される。補助値演算部531で演算される補助値、例えば、Dead Time演算部532、EMF(逆起電力)演算部533、および弱め界磁制御演算部534で算出された補助値が、加算部535で電圧制御値Vrefに加算される。加算部535の出力は、PWM制御部550に入力されて、PWM処理され、UVW各相のPWM制御信号がFETプリドライバ回路140に出力され、FETプリドライバ回路140およびモータ駆動回路150を介して、操舵補助モータ20が駆動される。
On the other hand, the motor current of the steering assist
実施例1によれば、制御プログラム201を実行して操舵補助モータ20を制御するCPU101と、CPU101が制御プログラム201を実行する場合にその作業領域として使用され、アクセス許可領域とアクセス禁止領域とを有するRAM103とを備え、CPU101は、メモリ監視プログラム202を実行して、RAM103のアクセス禁止領域へのデータの書き込みを監視して、制御プログラム201の不正アクセスを監視することとしたので、RAM103のアクセス禁止領域へデータが書き込まれたか否かをソフトウェアにより検出して、ソフトウェアエラーを検出することができ、低コストな構成でRAM103を監視して、ソフトウェアの暴走を未然に防止することが可能となる。
According to the first embodiment, the
また、実施例1によれば、CPU101は、メモリ監視プログラム202を実行して、RAM103のアクセス禁止領域のデータを読み込んで、検出用データと比較することで、アクセス禁止領域に書き込みがあるか否か検出することとしたので、簡単な方法で、RAM103のアクセス禁止領域にデータが書き込まれたか否かを検出することが可能となる。
Further, according to the first embodiment, the
また、実施例1によれば、アクセス許可領域は、スタック領域およびデータ領域を含み、アクセス禁止領域は、スタック領域およびデータ領域に隣接した領域に設定しているので、スタック領域およびデータ領域のオーバーフローを監視することが可能となる。 Further, according to the first embodiment, the access permitted area includes the stack area and the data area, and the access prohibited area is set to an area adjacent to the stack area and the data area. Can be monitored.
また、実施例1によれば、CPU101は、RAM103のアクセス禁止領域へのデータの書き込みを検出した場合には、安全動作移行プログラム203を実行して、操舵補助モータ20を停止させることとしたので、ソフトウェアが暴走する前に、操舵補助モータ20を停止することが可能となる。
Further, according to the first embodiment, when the
また、実施例1によれば、CPU101は、RAM103のアクセス禁止領域へのデータの書き込みを検出した場合には、安全動作移行プログラム203を実行して、解析に必要なメモリ情報をEEPROM104に格納することとしたので、RAM103のアクセス禁止領域にデータが書き込まれた原因(ソフトウェアエラーの原因)を解析することが可能となる。
Further, according to the first embodiment, when the
また、実施例1によれば、CPU101は、メモリ監視プログラム202によるRAM103のアクセス禁止領域への書き込みの監視を、操舵補助モータ20の立ち上がりの時定数よりも短い周期で実行することとしたので、ソフトウェアが暴走する前に、確実に操舵補助モータ20を停止させる等の対策をとることが可能となる。
Further, according to the first embodiment, the
また、実施例1によれば、CPU101およびRAM103のハードウェアエラーを副MPU110およびWDT130等で検出することとしたので、ハードウェアエラーの無い状態でソフトウェアエラーを検出することが可能となる。
In addition, according to the first embodiment, since the hardware error of the
実施例1では、メモリ監視プログラム202により、RAM103のアクセス禁止領域への書き込みを検出した場合に、安全動作移行プログラム203を実行して操舵補助モータ20を停止させる構成である。これに対して、実施例2は、メモリ監視プログラム202で、RAM103のアクセス禁止領域への書き込みを検出した場合に、制御プログラム201に比して負荷の小さいサブ制御プログラム204を実行して、モータ制御を続行する構成である。
In the first embodiment, when the memory monitoring program 202 detects writing to the access prohibited area of the
図9は、実施例2に係るROMおよびRAMの構成例を示す図である。図9において、図3と同等機能を有する部位には同一符号を付してその説明を省略し、異なる点についてのみ説明する。同図において、ROM102には、さらに、制御プログラム201に比して負荷の小さいサブ制御プログラム204が格納されている。
FIG. 9 is a diagram illustrating a configuration example of a ROM and a RAM according to the second embodiment. 9, parts having the same functions as those in FIG. 3 are denoted by the same reference numerals, description thereof is omitted, and only different points will be described. In the figure, the
図10は、実施例2に係るメモリ監視処理および安全動作移行処理を説明するためのフローチャートである。図10において、図5と同様の処理を行うステップには、同一のステップ番号が付してある。 FIG. 10 is a flowchart for explaining the memory monitoring process and the safe operation transition process according to the second embodiment. In FIG. 10, the same step numbers are assigned to the steps for performing the same processing as in FIG.
図10において、まず、メモリ監視プログラム202によるメモリ監視処理が実行されると(ステップS1)、RAM103のアクセス禁止領域401、402のデータを読み込み(ステップS2)、読み込んだデータと検出用データが一致するか否かを判定する(ステップS3)。読み込んだデータと検出用データが一致する場合は(ステップS3の「Yes」)、ソフトウェアが正常に動作していると判断して、モータ制御処理を実行する(ステップS4)。他方、読み込んだデータと検出用データが一致しない場合は(ステップS3の「No」)、制御プログラム201による不正アクセスであり、ソフトウェアエラーと判断して、安全動作移行プログラム203を実行し(ステップS5)、解析に必要なメモリ情報(例えば、CPU101のレジスタやRAM103のアクセス禁止領域401,402に書き込まれたデータ等)を、EEPROM104に格納する(ステップS6)。この後、サブ制御プログラム204を実行し、操舵補助モータ20の制御を継続する(ステップS10)。
In FIG. 10, first, when the memory monitoring process by the memory monitoring program 202 is executed (step S1), the data in the access prohibited
図11は、CPU101がサブ制御プログラム204を実行することにより実現する機能(サブ制御プログラム204の機能構成)を示す図である。図11において、図8と同等機能を有する部位には同一符号を付してある。図11に示すサブ制御プログラム204は、図8に示す制御プログラム201において、モータ電流補助制御系モジュール530を削除して負荷を軽くしたものである。
FIG. 11 is a diagram illustrating a function (functional configuration of the sub control program 204) realized by the
実施例2によれば、CPU101は、メモリ監視プログラム202によるメモリ監視処理で、RAM103のアクセス禁止領域401,402へのデータの書き込みを検出した場合には、制御プログラム201の実行を停止して、制御プログラム201に比して負荷の少ないサブ制御プログラム204を実行して操舵補助モータ20の制御を継続することとしたので、ソフトウェアの暴走を未然に防止することができるとともに、操舵補助モータ20の制御を継続させることが可能となる。
According to the second embodiment, when the memory monitoring process by the memory monitoring program 202 detects the writing of data to the access prohibited
実施例3では、マルチタスクOSであるリアルタイムOSを用いて、マルチタスク構成としたものである。近時、車両用電動機の制御の複雑化に伴って多数のタスク(プロセス、ジョブ)を処理する必要がでてきており、それら多数のタスクに対して細かな優先順位を設定しなければならなくなってきている。そこで、実施例3では、マルチタスクOSであるリアルタイムOSを用いて、マルチタスク構成とした場合について説明する。 In the third embodiment, a multitask configuration is made using a real-time OS that is a multitasking OS. Recently, it has become necessary to process a large number of tasks (processes, jobs) as the control of motors for vehicles has become more complex, and it has become necessary to set detailed priorities for these numerous tasks. It is coming. Thus, in the third embodiment, a case where a multitask configuration is configured using a real-time OS that is a multitask OS will be described.
図12は、実施例3に係るROMおよびRAMの構成例を示す図である。図12において、図3と同等機能を有する部位には同一符号を付してその説明を省略し、異なる点についてのみ説明する。同図において、ROM102には、タスクの時間管理等を行うためのリアルタイムOS205、タスク1〜3が格納されている。リアルタイムOS205は、タスク1〜3の優先順位に従って、タスク1〜3の実行の時間的管理を行う。
FIG. 12 is a diagram illustrating a configuration example of a ROM and a RAM according to the third embodiment. 12, parts having the same functions as those in FIG. 3 are denoted by the same reference numerals, description thereof is omitted, and only different points will be described. In FIG. 1, a
ここで、リアルタイムOS205およびタスク1〜3を、制御プログラム210と称する。タスク1〜3は優先順位が異なっており、タスク1は優先度が「高」、タスク2は優先度が「中」、タスク3は優先度が「低」に設定されている。例えば、タスク1は、操舵補助モータ20を制御するためのモータ制御処理を実行するタスクであり、タスク2は、外部とCAN通信等の通信をするためのタスクであり、タスク3は、フェールセーフ(F/S)処理を行うためのタスクである。ここで示すタスク1〜3は一例であり、本発明はこれに限られるものではなく、電動パワーステアリング装置では他のタスクもある。
Here, the real-
また、RAM103には、タスク1を実行するためのタスク1用領域331(データ領域331a、スタック領域331b)、タスク2を実行するためのタスク2用領域332(データ領域332a、スタック領域332b)、タスク3を実行するためのタスク3用領域333(データ領域333a、スタック領域333b)が初期設定で確保されている。なお、ここでは、タスク毎にそれぞれアクセス許可領域を設定することとしたが、複数のタスクについて、1つのアクセス許可領域を設定することにしてもよい。
Further, in the
各データ領域331a、332a、333aおよび各スタック領域331b、332b、333bは、矢印方向に使用される。各タスク用領域331,332,333間には、アクセス禁止領域431,432,433,434が設定されている。なお、アクセス許可領域およびアクセス禁止領域の設定例は、図12に示す例に限られるものではなく、各タスク毎に、上記図6および図7に示すような構成としてもよい。
Each
メモリ監視プログラム202は、電源投入後の制御プログラム210が実行される前に、検出用データとして、アクセス禁止領域431に初期値=0x01010101を、アクセス禁止領域432に初期値=0x02020202を、アクセス禁止領域433に初期値=0x03030303を、アクセス禁止領域434に初期値=0x04040404をそれぞれ書き込む。メモリ監視プログラム202は、制御プログラム210の実行中または制御プログラム210の実行後に、メモリ監視処理を実行し、アクセス禁止領域431,432、433,434のデータを読み込んで、検出用データ(0x01010101,0x02020202、0x03030303、0x04040404)とそれぞれ比較することで、アクセス禁止領域431,432、433,434に書き込みがあるか否か検出する。
The memory monitoring program 202 sets, as detection data, an initial value = 0x01010101 in the access prohibited
図13は、タスク1〜3およびメモリ監視処理のタイミングチャートの一例を示す図である。同図において、T1は通常時、T2は外乱発生時、Tはモータ電流制御周期を示している。メモリ監視処理は、タスク1〜3が実行されていない間に実行され、その周期は、操舵補助モータ20の立ち上がりの時定数より小さい周期となっている。
FIG. 13 is a diagram illustrating an example of a timing chart of tasks 1 to 3 and memory monitoring processing. In the figure, T1 indicates a normal time, T2 indicates a disturbance occurrence, and T indicates a motor current control cycle. The memory monitoring process is executed while tasks 1 to 3 are not executed, and the cycle thereof is shorter than the time constant of the startup of the steering assist
T1の期間は、外乱要素がなく、他のタスク処理に影響されずに、通常処理を行っている。T2の期間は、外乱要素が発生した場合を示しており、他のタスク処理の割り込みが発生し、RAM103の使用領域が増加する傾向となる。例えば、時刻t1に、外乱要素が発生し、タスク3の処理中に、優先度「中」のタスク2の処理が要求された場合、タスク3は待ち行列処理が発生し、一時的に処理を中断し、中断した情報をRAM103のタスク3用領域333のスタック領域333bに保存しておく。次に、時刻t2で、タスク2の処理中に、処理の優先度「高」のタスク1の処理が要求されると、タスク2は待ち行列が発生し、一時的に処理を中断し、中断した情報をRAM103のタスク2用領域332のスタック領域332bに保存する。この後、中断したタスク2,タスク3の処理を実行する。この場合、外乱要素がない場合に比して、一時的なメモリ使用量が増加してしまい、RAM103のオーバーフローが発生する可能性が高くなる。
During the period of T1, there is no disturbance factor, and normal processing is performed without being affected by other task processing. The period of T2 shows a case where a disturbance element has occurred, and another task processing interrupt occurs, and the use area of the
なお、メモリ監視処理の実行周期は、図13に示す場合に限られるものではなく、例えば、タスク1の実行後に、必ず実行することにしてもよく、操舵補助モータ20の立ち上がりの時定数より小さい周期であれば、如何なる周期で行うことにしてもよい。
The execution period of the memory monitoring process is not limited to the case shown in FIG. 13. For example, it may be executed after the execution of task 1, and is smaller than the time constant of the startup of the steering assist
図14は、実施例3に係るメモリ監視処理および安全動作移行処理を説明するためのフローチャートである。図14において、図5と同様の処理を行うステップには、同一のステップ番号が付してある。 FIG. 14 is a flowchart for explaining the memory monitoring process and the safe operation transition process according to the third embodiment. In FIG. 14, steps that perform the same processing as in FIG. 5 are given the same step numbers.
図14において、まず、メモリ監視プログラム202によるメモリ監視処理が実行されると(ステップS1)、RAM103のアクセス禁止領域431、432、433、434のデータを読み込み(ステップS2)、読み込んだデータと検出用データが一致するか否かを判定する(ステップS3)。読み込んだデータと検出用データが一致する場合は(ステップS3の「Yes」)、ソフトウェアが正常に動作していると判断して、タスク1〜3を実行する(ステップS20)。他方、読み込んだデータと検出用データが一致しない場合は(ステップS3の「No」)、制御プログラム210の不正なアクセスであり、ソフトウェアエラーと判断して、安全動作移行プログラム203を実行する(ステップS5)。安全動作移行プログラム203は、解析に必要なメモリ情報(例えば、CPU101のレジスタやRAM103のアクセス禁止領域431,432,433,434に書き込まれたデータ等)を、EEPROM104に格納した後(ステップS6)、操舵補助モータ20を停止させる(ステップS7)。
In FIG. 14, first, when a memory monitoring process by the memory monitoring program 202 is executed (step S1), data in the access prohibited
なお、ここでは、メモリ監視プログラム202で、RAM103のアクセス禁止領域431,432,433、434への書き込みを検出した場合に、操舵補助モータ20を停止させることとしたが、実施例2のように、各タスク1〜3について、より負荷の軽いタスクをROM102に格納しておいて、アクセス禁止領域431,432,433、434への書き込みを検出した場合に、負荷の軽いタスクを実行することにしてもよい。
Here, the steering assist
実施例3によれば、制御プログラム210は、優先順位の異なる複数のタスクを含み、RAM103は、複数のタスク用の各タスク用領域331,332,333が設定されており、各タスク用領域331,332,333間にアクセス禁止領域431,432,433,434が設定されており、CPU101は、メモリ監視プログラム202を実行して、RAM103の各タスク用領域331,332,333間のアクセス禁止領域431,432,433,434を監視することとしたので、各タスクのソフトウェアエラーを検出することが可能となる。
According to the third embodiment, the control program 210 includes a plurality of tasks having different priorities, and the
なお、上記実施例1〜3では、車両用電動機として電動パワーステアリング装置の操舵補助モータを制御する制御装置を一例として説明したが、本発明はこれに限られるものではなく、他の車両用電動機に適用することができ、例えば、ハイブリット車両用の電動機等に広く適用可能である。 In the first to third embodiments, the control device for controlling the steering assist motor of the electric power steering device is described as an example of the vehicle motor. However, the present invention is not limited to this, and other vehicle motors are used. For example, it can be widely applied to electric motors for hybrid vehicles.
本発明に係る車両用電動機の制御装置、車両用電動機の制御方法、およびコンピュータが実行するためのプログラムは、車両に搭載される各種車両用電動機に適用可能であるが、特に、電動パワーステアリング装置の操舵補助モータを制御する場合に有用である。 The vehicle motor control device, the vehicle motor control method, and the program executed by the computer according to the present invention can be applied to various vehicle motors mounted on the vehicle, and in particular, the electric power steering device. This is useful when controlling the steering assist motor.
1 操向ハンドル
2 コラム軸
3 減速ギア
4a,4b ユニバーサルジョイント
5 ピニオンラック機構
6 タイロッド
10 トルクセンサ
12 車速センサ
14 バッテリ
20 操舵補助モータ
30 コントロールユニット
100 主MCU(マイクロコントロールユニット)
101 CPU(制御手段)
102 ROM
103 RAM
104 EEPROM
105 A/D変換器
106 インターフェース
107 バス
110 副MCU(マイクロコントロールユニット)
111 CPU
112 ROM
113 RAM
115 D/A変換器
116 A/D変換器
130 WDT(ウォッチドックタイマ)
140 FETプリドライバ回路
150 モータ駆動回路(インバータ)
160 電流検出回路
170 位置検出回路
201,210 制御プログラム
202 メモリ監視プログラム
203 安全動作移行プログラム
204 サブ制御プログラム
301,311,321 データ領域
302,312,322 スタック領域
401,402,411,412 421,431,432,433,434 アクセス禁止領域
331 タスク1用領域
332 タスク2用領域
333 タスク3用領域
500 トルク制御系モジュール
510 補償制御系モジュール
520 モータ電流制御系モジュール
530 モータ電流補助制御系モジュール
DESCRIPTION OF SYMBOLS 1 Steering handle 2
101 CPU (control means)
102 ROM
103 RAM
104 EEPROM
105 A /
111 CPU
112 ROM
113 RAM
115 D / A converter 116 A /
140
160
Claims (13)
制御プログラムを実行して前記車両用電動機を制御する制御手段と、
前記制御手段が前記制御プログラムを実行する場合にその作業領域として使用され、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリと、
を備え、
前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを監視するメモリ監視手段を有し、前記制御プログラムの不正アクセスを監視することを特徴とする車両用電動機の制御装置。 In a control device for a vehicle motor that controls a vehicle motor mounted on a vehicle,
Control means for controlling the vehicle electric motor by executing a control program;
A memory having an access-permitted area where writing of data is permitted and an access-prohibiting area where writing of data is prohibited; used as a work area when the control means executes the control program;
With
The control device for a motor for a vehicle according to claim 1, wherein the control means includes memory monitoring means for monitoring writing of data to the access prohibited area of the memory, and monitors unauthorized access of the control program.
前記制御手段は、前記メモリのアクセス禁止領域へのデータの書き込みを検出した場合には、解析に必要なメモリ情報を前記不揮発性メモリに格納することを特徴とする請求項1乃至請求項5のいずれか1つに記載の車両用電動機の制御装置。 In addition, it has a non-volatile memory,
6. The control unit according to claim 1, wherein the control unit stores memory information necessary for analysis in the nonvolatile memory when detecting writing of data to the access prohibited area of the memory. The control apparatus of the motor for vehicles as described in any one.
前記メモリは、複数のアクセス禁止領域が設定されていることを特徴とする請求項1乃至請求項6のいずれか1つに記載の車両用電動機の制御装置。 The control program includes a plurality of tasks having different priorities,
The vehicle electric motor control apparatus according to claim 1, wherein a plurality of access prohibition areas are set in the memory.
前記制御手段は、前記制御プログラムを実行して、少なくとも前記ステアリング系に発生する操舵トルクに基づいて前記操舵補助モータの電流指令値を演算し、電流検出回路で検出された前記操舵補助モータの電流検出値と前記電流指令値とに基づいて、前記操舵補助モータの電流検出値が前記電流指令値に追従するように前記操舵補助モータを駆動制御することを特徴とする請求項1乃至請求項8のいずれか1つに記載の車両用電動機の制御装置。 The vehicle motor is a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle,
The control means executes the control program, calculates a current command value of the steering assist motor based on at least a steering torque generated in the steering system, and detects the current of the steering assist motor detected by a current detection circuit. 9. The driving assist motor is controlled based on the detected value and the current command value so that the detected current value of the steering assist motor follows the current command value. The control apparatus of the motor for vehicles as described in any one of these.
前記制御プログラムは、モータ電流制御系モジュール、モータ電流補助制御系モジュール、トルク制御系モジュール、および補償制御系モジュールを含み、
前記サブ制御プログラムは、前記モータ電流制御系モジュール、前記トルク制御系モジュール、および前記補償制御系モジュールを含むことを特徴とする請求項5に記載の車両用電動機の制御装置。 The vehicle motor is a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle,
The control program includes a motor current control system module, a motor current auxiliary control system module, a torque control system module, and a compensation control system module,
6. The vehicle motor control apparatus according to claim 5, wherein the sub control program includes the motor current control system module, the torque control system module, and the compensation control system module.
前記制御プログラムは、前記操舵補助モータを制御するための第1のタスクと、外部と通信するための第2のタスクとを含むことを特徴とする請求項7に記載の車両用電動機の制御装置。 The vehicle motor is a steering assist motor of an electric power steering device that applies a steering assist force to a steering system of the vehicle,
The said control program contains the 1st task for controlling the said steering assist motor, and the 2nd task for communicating with the exterior, The control apparatus of the motor for vehicles of Claim 7 characterized by the above-mentioned. .
制御手段が、データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリを、作業領域として使用して制御プログラムを実行し、前記車両用電動機を制御する制御工程と、
前記制御手段が、メモリ監視プログラムを実行して、前記アクセス禁止領域へのデータの書き込みを監視して、前記制御プログラムの不正アクセスを監視する監視工程と、
を含むことを特徴とする車両用電動機の制御方法。 In a vehicle motor control method for controlling a vehicle motor mounted on a vehicle,
The control means executes a control program using a memory having an access-permitted area where data writing is permitted and an access-banned area where data writing is prohibited as a work area, and controls the vehicle motor A control process,
A monitoring step in which the control means executes a memory monitoring program, monitors writing of data to the access prohibited area, and monitors unauthorized access of the control program;
A control method for an electric motor for a vehicle, comprising:
コンピュータに、
データの書き込みが許可されるアクセス許可領域と、データの書き込みが禁止されるアクセス禁止領域とを有するメモリを、作業領域として使用して、前記車両用電動機を制御する制御工程と、
前記アクセス禁止領域へのデータの書き込みを監視して、ソフトウェアの不正アクセスを監視する監視工程と、
を実行させることを特徴とするコンピュータが実行するためのプログラム。 In a program installed in a control device for a vehicle motor that controls a vehicle motor mounted on the vehicle,
On the computer,
A control step of controlling the electric motor for the vehicle, using a memory having an access permission area where data writing is permitted and an access prohibition area where data writing is prohibited as a work area;
A monitoring step of monitoring writing of data to the access prohibited area and monitoring unauthorized access of software;
A program to be executed by a computer, characterized in that
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007002529A JP2008172896A (en) | 2007-01-10 | 2007-01-10 | Controller of vehicular motor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007002529A JP2008172896A (en) | 2007-01-10 | 2007-01-10 | Controller of vehicular motor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008172896A true JP2008172896A (en) | 2008-07-24 |
Family
ID=39700446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007002529A Pending JP2008172896A (en) | 2007-01-10 | 2007-01-10 | Controller of vehicular motor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008172896A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012128743A (en) * | 2010-12-16 | 2012-07-05 | Nsk Ltd | Detection method of stack overflow |
CN102582678A (en) * | 2011-01-11 | 2012-07-18 | 上海联盛汽车电子有限公司 | Electric power-assisted steering system with software integrated monitoring function |
WO2012104901A1 (en) * | 2011-01-31 | 2012-08-09 | トヨタ自動車株式会社 | Safety control device and safety control method |
JP2012247978A (en) * | 2011-05-27 | 2012-12-13 | Toyota Motor Corp | Control device and control method |
JP2014186453A (en) * | 2013-03-22 | 2014-10-02 | Hitachi Automotive Systems Ltd | Vehicle control apparatus |
KR20150012782A (en) * | 2013-07-26 | 2015-02-04 | 현대모비스 주식회사 | Apparatus and Method for timing control of Motor Driven Power Steering Electronic Control Unit |
JP2015090548A (en) * | 2013-11-05 | 2015-05-11 | オムロン株式会社 | Control device |
WO2015087540A1 (en) * | 2013-12-12 | 2015-06-18 | パナソニックIpマネジメント株式会社 | Motor-driving apparatus |
-
2007
- 2007-01-10 JP JP2007002529A patent/JP2008172896A/en active Pending
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012128743A (en) * | 2010-12-16 | 2012-07-05 | Nsk Ltd | Detection method of stack overflow |
CN102582678A (en) * | 2011-01-11 | 2012-07-18 | 上海联盛汽车电子有限公司 | Electric power-assisted steering system with software integrated monitoring function |
WO2012104901A1 (en) * | 2011-01-31 | 2012-08-09 | トヨタ自動車株式会社 | Safety control device and safety control method |
CN103052924A (en) * | 2011-01-31 | 2013-04-17 | 丰田自动车株式会社 | Safety control device and safety control method |
JP5321686B2 (en) * | 2011-01-31 | 2013-10-23 | トヨタ自動車株式会社 | SAFETY CONTROL DEVICE AND SAFETY CONTROL METHOD |
JP2012247978A (en) * | 2011-05-27 | 2012-12-13 | Toyota Motor Corp | Control device and control method |
JP2014186453A (en) * | 2013-03-22 | 2014-10-02 | Hitachi Automotive Systems Ltd | Vehicle control apparatus |
KR20150012782A (en) * | 2013-07-26 | 2015-02-04 | 현대모비스 주식회사 | Apparatus and Method for timing control of Motor Driven Power Steering Electronic Control Unit |
KR102045869B1 (en) * | 2013-07-26 | 2019-11-18 | 현대모비스 주식회사 | Apparatus and Method for timing control of Motor Driven Power Steering Electronic Control Unit |
JP2015090548A (en) * | 2013-11-05 | 2015-05-11 | オムロン株式会社 | Control device |
WO2015087540A1 (en) * | 2013-12-12 | 2015-06-18 | パナソニックIpマネジメント株式会社 | Motor-driving apparatus |
CN105814791A (en) * | 2013-12-12 | 2016-07-27 | 松下知识产权经营株式会社 | Motor-driving apparatus |
JPWO2015087540A1 (en) * | 2013-12-12 | 2017-03-16 | パナソニックIpマネジメント株式会社 | Motor drive device |
CN105814791B (en) * | 2013-12-12 | 2018-10-02 | 松下知识产权经营株式会社 | Motor drive |
US10254737B2 (en) | 2013-12-12 | 2019-04-09 | Panasonic Intellectual Property Management Co., Ltd. | Motor driving apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2008172896A (en) | Controller of vehicular motor | |
CN110235358B (en) | Vehicle control device | |
JP5086385B2 (en) | Electric power steering control device | |
JP5267186B2 (en) | Electric power steering device | |
CN105612097B (en) | Electric power-assisted steering apparatus | |
US9221492B2 (en) | Method for operating an electrical power steering mechanism | |
JP2009029172A (en) | Electric power steering system | |
US20170088164A1 (en) | Control apparatus and control method of on-vehicle electronic equipment | |
JP5151791B2 (en) | Electric power steering device | |
EP3382877B1 (en) | Electronic control device and electric power steering device equipped therewith | |
EP4257453A1 (en) | Control method, monitoring method, electronic control units, controller and control system | |
JP5182101B2 (en) | Electric power steering device | |
JP2010188748A (en) | Memory diagnostic device of control device of on-vehicle equipment | |
JP5169410B2 (en) | Electric power steering device | |
JP2009056820A (en) | Control device of electric power steering device | |
JP6459229B2 (en) | Electric power steering device | |
JP2020039201A (en) | Vehicle control device | |
JP2010188796A (en) | Electric power steering device | |
JP2009269458A (en) | Electric power steering device | |
JP2009062009A (en) | Control device of electric power steering device | |
JP5169411B2 (en) | Electric power steering device | |
JP6197463B2 (en) | Abnormality diagnosis device for inverter controlled AC motor | |
JP6497456B2 (en) | Control device for electric power steering device | |
JP5169412B2 (en) | Electric power steering device | |
JP5233506B2 (en) | Electric power steering device |