JP2014154043A - Electronic control device and information processor - Google Patents
Electronic control device and information processor Download PDFInfo
- Publication number
- JP2014154043A JP2014154043A JP2013024921A JP2013024921A JP2014154043A JP 2014154043 A JP2014154043 A JP 2014154043A JP 2013024921 A JP2013024921 A JP 2013024921A JP 2013024921 A JP2013024921 A JP 2013024921A JP 2014154043 A JP2014154043 A JP 2014154043A
- Authority
- JP
- Japan
- Prior art keywords
- pwm signal
- creation
- pulse
- signal
- pulse signal
- 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
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、処理負荷を監視する電子制御装置に関する。 The present invention relates to an electronic control device that monitors a processing load.
車両には各種の車載装置を制御するECU(Electronic Control Computer)が搭載されている。このECUには、車載装置を制御するマイコンが搭載されるが、マイコンに異常が生じた場合に早期に復帰させるためマイコンを監視する監視方法が考案されている(例えば、特許文献1参照。)。特許文献1には、ウォッチドッグタイマがカウントする値を、制御CPUが定期的にクリアし、カウント値が所定値を超えた場合に制御CPUの異常を検出するCPU演算時間監視方法が開示されている。
The vehicle is equipped with an ECU (Electronic Control Computer) that controls various in-vehicle devices. The ECU is equipped with a microcomputer for controlling the in-vehicle device. However, a monitoring method for monitoring the microcomputer is devised in order to restore it early when an abnormality occurs in the microcomputer (see, for example, Patent Document 1). .
しかしながら、特許文献1に開示されたマイコンの監視方法では、監視対象のマイコンに異常が生じるまでは異常を検出することができないという問題がある。換言すると、ウォッチドッグタイマのクリアが遅れるほどの異常が生じる前の過渡的な状態を検出できない。
However, the microcomputer monitoring method disclosed in
本発明は、マイコンが異常となるまでの過渡的な状態を検出可能な電子制御装置を提供することを目的とする。 An object of the present invention is to provide an electronic control device capable of detecting a transient state until a microcomputer becomes abnormal.
本発明は、パルス信号を継続的に出力する第1の情報処理手段と、前記パルス信号を受信する第2の情報処理手段とを有する電子制御装置であって、外部から取得した外部情報を演算してPWM信号を作成するPWM信号作成手段と、前記PWM信号作成手段がPWM信号の作成を開始した時に前記パルス信号をLowに設定し作成を終了した時にHighに設定するか、又は、PWM信号の作成を開始した時にLowに設定し作成を終了した時にHighに設定することで前記パルス信号を作成するパルス信号作成手段と、前記パルス信号を監視して、前記PWM信号作成手段がPWM信号の作成を開始した時から終了する時までの作成時間を測定する作成時間測定手段と、を有することを特徴とする。 The present invention is an electronic control device having first information processing means for continuously outputting a pulse signal and second information processing means for receiving the pulse signal, and calculates external information acquired from the outside. PWM signal generating means for generating a PWM signal and setting the pulse signal to Low when the PWM signal generating means starts generating the PWM signal and setting it to High when the generation is completed, or PWM signal The pulse signal creating means for creating the pulse signal by setting to Low when the creation of the signal is started and setting to High when the creation is completed, and monitoring the pulse signal, and the PWM signal creating means And a creation time measuring means for measuring a creation time from the start to the end of creation.
マイコンが異常となるまでの過渡的な状態を検出可能な電子制御装置を提供することができる。 It is possible to provide an electronic control device capable of detecting a transient state until the microcomputer becomes abnormal.
以下、本発明を実施するための形態について図面を参照しながら説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
図1は本実施形態のモータ制御装置におけるマイコンの監視方法の概略的な特徴を説明する図の一例である。モータ制御マイコン12は三相モータの制御信号を監視マイコン13に出力すると共に、監視マイコン13がモータ制御マイコン12を監視するためのパルスを継続的に出力している。監視マイコン13はパルスが出力されていること(ON/OFFの変化が所定時間内に繰り返されていること)を検出して、モータ制御マイコン12が正常であることを検出している。以下、パルスで監視することを「ウォッチドッグ」という。
FIG. 1 is an example of a diagram for explaining the schematic features of a microcomputer monitoring method in the motor control apparatus of this embodiment. The
モータ制御マイコン12の処理負荷が増大したためパルスを出力できない場合、監視マイコン13はモータ制御マイコン12の異常を検出してリセットするなどのフェールセーフ処理を行っている。パルスをこのようなウォッチドッグのために使用することは従来から利用されているが、主に異常の有無しか監視できないものであった。
When the pulse cannot be output because the processing load of the
そこで、本実施形態のモータ制御マイコン12は、モータを回転駆動していない場合(後述するモード1)はウォッチドッグのためのパルスを出力し、モータを回転駆動している場合(後述するモード2)はパルスにより以下の3つの情報を伝達する。
(i) 処理負荷情報(H時間)
(ii) CPU負荷の余裕度
(iii) キャリア波の周波数
図1(b)に示すように、モータ制御マイコン12はキャリア波の周期をパルスの1周期としている。また、モータ制御マイコン12はキャリア波の周期毎にPWM信号のインバータ制御を行うので(例えば、デューティを演算する)、PWM信号の周期とパルスの周期は同期する。そこで、モータ制御マイコン12はインバータ制御の開始のタイミングでパルスを立ち上げ、インバータ制御が終了するとパルスを立ち下げる。このため、インバータ制御の処理負荷が高くなるとパルスがHを維持する時間(以下、H時間という)が長くなる。監視マイコン13はH時間により(i)処理負荷情報を取得する。
Therefore, the
(i) Processing load information (H time)
(ii) CPU load margin
(iii) Frequency of Carrier Wave As shown in FIG. 1B, the
また、パルスはキャリア波の周期毎に立ち上がるので、パルスの立ち上がりから次の立ち上がりまでがパルスの1周期である。監視マイコン13はパルスの立ち上がりを監視して(iii) キャリア波の周波数を取得する。(iii)キャリア波の周期からH時間を除いた残りが(ii)CPU負荷の余裕度である。
Since the pulse rises every carrier wave period, one pulse period is from the rising edge of the pulse to the next rising edge. The
このように、従来から使用されている信号線を使用して、監視マイコン13はモータ制御マイコン12に異常が生じなくてもモータ制御マイコン12の過渡的な処理負荷などを監視できる。処理負荷が大きくなった場合は、リセットする前に負荷を下げるなどのフェールセーフが可能になる。
As described above, the
〔インバータ制御〕
図2(a)はモータ15の制御系のブロック図の一例であり、図2(b)はデューティの算出方法を模式的に説明する図の一例である。モータ制御マイコン12はHV−ECU11と接続されており、監視マイコン13を経由してインバータ14及びモータ15と接続されている。インバータ14はPWM制御型であり、6個のパワーMOSFETやIBGTなどのスイッチ素子をブリッジ接続した構成を有する。インバータ14は印加された電圧を三相交流電圧に変換してモータ15のU,V,Wの各相用のステータコイルに供給する。インバータ14からモータ15に供給されるV相とW相の電流値(実電流)Iv、Iwはモータ制御マイコン12にフィードバックされている。U相の電流値は演算により求められる。
[Inverter control]
FIG. 2A is an example of a block diagram of a control system of the
モータ15は例えば三相の交流モータであり、車両の駆動力を単独で又はエンジンと共に発揮する。なお、モータは交流モータに限られずDCモータなどPWM制御されるものであればよい。モータ15にはホール素子など回転数を検出可能なセンサが配置されており、例えばホール素子が検出した回転角θがモータ制御マイコン12に出力される。モータ制御マイコン12は回転角θから、モータ15の回転数を演算する。
The
HV−ECU11 は、アクセルペダルストロークセンサなどで検出した運転者のアクセルペダルの操作量、及び、車速センサが検出した車速に基づいてモータ15の電流指令値を決定しモータ制御マイコン12に出力する。HV−ECU11等から出力される情報が特許請求の範囲の外部情報に相当する。または、モータ制御マイコン12が電流指令値を決定してもよい。電流指令値は、モータ15に流れる電流の座標系における基本波の振幅と位相(周波数)を指示するものである。基本波は正弦波なので任意のキャリア波の周期における波形は既知になる。
キャリア波の周波数は明示的な指示がなければ一定であり、決まった周期で決まった電圧が繰り返し生成されている。よって、キャリア波の周期毎に、基本波を数値表現して基本波の振幅、位相を決定し、数値表現された基本波とキャリア波を比較する。図示するようにキャリア波の周期の始点から、キャリア波と基本波の交わるまでがPWM信号のデューティとなる。
The HV-ECU 11 determines a current command value of the
The frequency of the carrier wave is constant unless an explicit instruction is given, and a fixed voltage is repeatedly generated at a fixed cycle. Therefore, for each carrier wave period, the fundamental wave is expressed numerically to determine the amplitude and phase of the fundamental wave, and the numerically expressed fundamental wave and the carrier wave are compared. As shown in the figure, the duty of the PWM signal is from the start point of the carrier wave cycle to the intersection of the carrier wave and the fundamental wave.
モータ制御マイコン12はデューティに対応する電流値と実電流を比較して差を算出し、差を消去する各相のPWM制御電圧(PWM信号)を発生させ、PWM制御電圧によりインバータ14のスイッチ素子をON/OFF制御する。インバータ14は出力電圧をモータ15のステータコイルに印加する。これにより、モータ15は基本波の周波数に対応する回転数で回転する。以下、デューティの算出を含め、モータ制御マイコン12の制御をインバータ制御という。
The
このようなインバータ制御では、モータ回転数の増加や車両状況の変化に伴い割り込みが頻発したり、運転者のアクセルペダルの操作が急変したりすることなどにより、処理負荷が増大する。処理負荷が極度に増大すると温度上昇などによりCPU動作速度が低下したり、PWM信号の出力が間に合わない現象が生じうる。本実施例では処理負荷が増大したためにこのような基本的な性能が損なわれる前に、監視マイコン13がモータ制御マイコン12の過渡的な状態を監視することを可能とする。
In such inverter control, the processing load increases due to frequent interruptions associated with an increase in the number of motor revolutions and changes in the vehicle status, and sudden changes in the driver's accelerator pedal operation. If the processing load increases extremely, the CPU operating speed may decrease due to a temperature rise or the like, and a phenomenon that the output of the PWM signal is not in time can occur. In the present embodiment, the
〔構成例〕
図3(a)はモータ制御マイコン12と監視マイコン13の概略構成図の一例を示す。モータ制御マイコン12と監視マイコン13は1つの筐体に収容された1つのECU(電子制御装置)として動作する。しかし、モータ制御マイコン12と監視マイコン13が1つのチップであってもパルスによりモータ制御機能を監視機能が監視できる点で変わりはない。また、モータ制御マイコン12と監視マイコン13が別々のECU(筐体)に格納されていても一方が他方を監視できる。
[Configuration example]
FIG. 3A shows an example of a schematic configuration diagram of the
モータ制御マイコン12は、バスに接続された、CPU21、RAM22、ROM23、及び、入出力インタフェース24を有する。監視マイコン13はCPU26、RAM27、ROM28、及び、入出力インタフェース25を有するが、インバータ14にPWM信号を送信するためにさらに入出力インタフェース29を有している。この他、モータ制御マイコン12と監視マイコン13はマイコンに一般的な構成を備えているが図示は省略されている。
The
入出力インタフェース24と25は、互いに、1本のパルス線51、6本のPWM信号線52及び1本以上のフェールセーフ信号線53で接続されている。パルス線51は、ウォッチドッグ機能を提供すると共に、監視マイコン13がモータ制御マイコン12を監視するためのパルスが送信される線である。6本のPWM信号線52はU相の2つのスイッチ素子、V相の2つのスイッチ素子、及び、W相の2つのスイッチ素子をON/OFFするPWM信号が送信される線である。フェールセーフ信号線53は、監視マイコン13がモータ制御マイコン12の処理負荷を下げる制御を行ったり、モータ制御マイコン12をリセットするための制御を行う線である。フェールセーフ信号線53は、例えば、制御の種類毎に設けられ、H又はLを通知する線でよい。例えば、処理負荷を下げる制御では1回のパルス(H→L)で所定量だけ処理負荷を下げることを通知する。リセットする制御ではL→H(ハイアクティブ)又はH→L(ローアクティブ)でモータ制御マイコン12をリセットする。または、フェールセーフ信号線53をシリアル線とし、1本で全ての制御の種類に対応させてもよい。
The input /
監視マイコン13内の入出力インタフェース25,29は6本のPWM信号線で接続されている。CPU26は6本のPWM信号線52の状態を監視している。常態ではCPU26はPWM信号を加工することはなく、監視マイコン13はPWM信号をそのまま通過させる。そして、PWM信号が確認できない状態になると、CPU26は該PWM信号のスイッチ54をOFFにして、PWM信号のインバータ14への出力を停止する。PWM信号が確認できない場合、モータ制御マイコン12に何らかの異常が生じ始めている可能性があるので、そのような異常な状態でモータ制御を行うことを防止できる。
The input /
図3(b)はモータ制御マイコン12と監視マイコン13の機能ブロック図の一例を示す。モータ制御マイコン12は、キャリア波を発生するキャリア波発生部31、パルスを作成するパルス作成部32、PWM信号を作成するインバータ制御部34、及び、キャリア波の周波数を制御するキャリア周波数制御部33を有している。また、監視マイコン13は、パルスを監視するパルス監視部41、PWM信号を監視するPWM信号監視部42、モータ制御マイコン12の処理負荷を判定する処理負荷判定部43、及び、モータ制御マイコン12をフェールセーフ制御するフェールセーフ部44を有する。これらについては後述する。
FIG. 3B shows an example of a functional block diagram of the
なお、モータ制御マイコン12と監視マイコン13は、モータ15が停止している(PWM信号が出力されない)モード1とモータ15が動作中のモード2という2つの動作モードを有している。
モード1:ウォッチドッグモード
モード2:本実施例の異常監視モード
モータ制御マイコン12と監視マイコン13は、PWM信号が出力されているか否かに基づきモード1かモード2かを判定する。以下、主にモード2における機能について説明する。
The
Mode 1: Watchdog mode Mode 2: Abnormal monitoring mode of this embodiment The
〔監視内容について〕
図4は、キャリア波、PWM信号、及び、パルス信号について説明する図の一例である。キャリア波はモータ制御マイコン12内でキャリア波発生部31が発生させるため監視マイコン13には出力されない。PWM信号とパルスは、モータ制御マイコン12が作成し監視マイコン13に出力されるものである。PWM信号は6本のPWM信号線52でそれぞれ送信されるが、監視マイコン13が着目するのは、パルス信号と同期した1つのPWM信号である。
[About monitoring contents]
FIG. 4 is an example of a diagram illustrating a carrier wave, a PWM signal, and a pulse signal. Since the carrier wave is generated by the
・モータ制御マイコン
キャリア波発生部31は基準となる周波数で繰り返しキャリア波を発生させる。キャリア波の周波数はノイズ対策などのため下限と上限の範囲で調整可能になっている。図では鋸歯形状であるが三角波でもよい。
-Motor control microcomputer The
インバータ制御部34はキャリア波の周期に同期してこの周期毎にインバータ制御を行う。例えば、キャリア波の立ち上がりエッジ又は立ち下がりエッジの割り込みなどでCPU21はインバータ制御部34を起床する。上記のようにインバータ制御部34はデューティを算出しPWM信号を出力する。なお、インバータ制御部34は次の周期のデューティを演算するので、i番目の周期で演算したデューティはi+1番目の周期のPWM信号に反映される。また、処理負荷とPWM信号のデューティには相関はないとしてよい(インバータ制御に長時間かかっても、デューティが大きくなるわけではない)。
The
また、本実施例のインバータ制御部34は、インバータ制御を開始した時に(例えば起床直後に)パルス作成部32に制御開始を通知する。この通知を取得することで、パルス作成部32はパルス信号線をHに設定する。また、インバータ制御部34は1つのキャリア波の周期のインバータ制御が終了した時にパルス作成部32に制御終了を通知する。この通知を取得することで、パルス作成部32はパルス信号線をLに設定する。したがって、パルスはキャリア波の周期の開始時にHになり、インバータ制御が終了する時にLとなる。よって、H時間がインバータ制御に必要な時間を意味することになり、監視マイコン13はパルスからモータ制御マイコン12の処理負荷を推定することが可能になる。なお、LとHの設定は逆でもよく、この場合は監視マイコン13がパルスのL状態の時間から処理負荷を判定すればよい。
キャリア周波数制御部33はフェールセーフ部44からの要求に応じて、キャリア波の周波数を下げる。これにより、モータ制御マイコン12の処理負荷を低減できる。
Moreover, the
The carrier
・監視マイコン
監視マイコン13のパルス監視部41はパルスを監視し、例えばL→Hの立ち上がりを検出したことを処理負荷判定部43に通知し、H→Lの立ち下がりを検出したことを処理負荷判定部43に通知する。これにより、処理負荷判定部43は以下の3つの情報を取得する。
(i) 処理負荷情報
(ii) CPU負荷の余裕度
(iii) キャリア波の周波数
(i)は立ち上がり検出から立ち下がり検出までの時間であり、インバータ制御の時間(すなわち処理負荷)を表している。(iii)は立ち上がり検出から次の立ち上がり検出までの時間であり、キャリア波の周波数(及び周期)を表している。(ii)は立ち下がり検出から立ち上がり検出までの時間であり、インバータ制御が終わってから次のインバータ制御が始まるまでのCPU負荷の余裕度を表している。このように、処理負荷判定部43はモータ制御マイコン12の処理負荷、CPU負荷の余裕度及びキャリア波の周波数を監視できる。なお、(iii)キャリア波の周波数をPWM信号の立ち上がりから取得することもできる。
Monitoring microcomputer The
(i) Processing load information
(ii) CPU load margin
(iii) Carrier wave frequency
(i) is the time from the detection of the rise to the detection of the fall, and represents the inverter control time (that is, the processing load). (iii) is the time from the rising detection to the next rising detection, and represents the frequency (and period) of the carrier wave. (ii) is the time from the detection of falling to the detection of rising, and represents the margin of CPU load from the end of inverter control to the start of the next inverter control. In this way, the processing
また、PWM信号監視部42はPWM信号を監視し、例えばL→Hの立ち上がりを検出したことを処理負荷判定部43に通知する。これにより、処理負荷判定部43は(iii)と同様にキャリア波の周波数(周期)を検出できる。パルスから検出されるキャリア波の周波数とPWM信号から検出されるキャリア波の周波数は誤差を除けば同じである。
Further, the PWM
したがって、処理負荷判定部43はさらに以下の情報を取得できる。
(iv) PWM信号の異常監視
1つのキャリア波の周期に1回のPWM信号(1つ分の矩形波)が形成されているはずである。そこで、処理負荷判定部43は1つのキャリア波の周期内にPWM信号が検出されたか否かを判定する。例えば、キャリア波の周期よりも十分に長い時間を対象とすれば、PWM信号の立ち上がり及び立ち下がりが検出されたか否かを監視する。キャリア波の周期と同程度がやや短い時間を対象とすれば、PWM信号の立ち上がり又は立ち下がりの少なくともどちらかが検出されたか否かを監視する。
Therefore, the processing
(iv) PWM signal abnormality monitoring One PWM signal (one rectangular wave) should be formed in one carrier wave cycle. Therefore, the processing
処理負荷判定部43は、(i)(ii)から処理負荷が高くなったと判定するとフェールセーフ部44にフェールセーフを要求する。この場合、フェールセーフ部44はキャリア周波数制御部33にキャリア波の周波数を下げるよう要求する。キャリア波の周波数が下がることでインバータ制御の頻度が低下するのでモータ制御マイコン12の処理負荷を低減できる。
If the processing
また、処理負荷判定部43は、(iv)からPWM信号の異常であると判定するとフェールセーフ部44にフェールセーフを要求する。この場合、フェールセーフ部44は監視マイコン13側で上記のスイッチ54をOFFにして、インバータ14への出力を停止する。
If the processing
このように、本実施例のモータ制御装置100は、モータ制御マイコン12が異常によりリセットが必要な状態になる前に処理負荷を下げることが可能である。
As described above, the
〔動作手順〕
図5は、モータ制御マイコン12の動作手順を示すフローチャート図の一例である。図5の手順はキャリア波の周期毎に繰り返し実行される。
[Operation procedure]
FIG. 5 is an example of a flowchart showing an operation procedure of the
まず、モータ制御マイコン12はPWM信号を出力しているか否かを判定してモータ制御マイコン12の動作モードを決定する(S10)。PWM信号の出力の有無はモータ制御マイコン12がPWM信号を作成しているか否により明らかであるが、PWM信号を監視して判断してもよい。
First, the
PWM信号を出力しておらずモード1の場合(S10のNo)、パルス作成部32は定期的にパルスの設定をH又はLに切り替える(S80)。すなわち、パルスのデューティは例えば10〜90%等の範囲で固定になる。
When the PWM signal is not output and the mode is 1 (No in S10), the
PWM信号を出力しておりモード2の場合(S10のYes)、インバータ制御部34はキャリア波の周期が開始されたか否かをキャリア波に基づき判定する(S20)。
When the PWM signal is output and in the mode 2 (Yes in S10), the
キャリア波の周期が開始された場合(S20のYes)、インバータ制御部34はパルス作成部32に制御開始を通知するので、パルス作成部32はパルスをHに設定する(S30)。
When the carrier wave period is started (Yes in S20), the
その後、インバータ制御部34はインバータ制御を行う(S40)。
Thereafter, the
インバータ制御が完了すると、インバータ制御部34はパルス作成部32に制御終了を通知するので、パルス作成部32はパルスをLに設定する(S50)。
When the inverter control is completed, the
キャリア周波数制御部33は任意のタイミングで監視マイコン13からフェールセーフ要求があるか否かを判定する(S60)。
The carrier
そして、フェールセーフ要求がある場合(S60のYes)、キャリア周波数制御部33はキャリア波の周波数を下げることでCPU21の処理負荷を低減する(S70)。
And when there exists a fail safe request | requirement (Yes of S60), the carrier
図6は監視マイコン13の動作手順を示すフローチャート図の一例である。
まず、監視マイコン13はPWM信号の出力があるか否かを判定して監視マイコン13の動作モードを決定する(S110)。
FIG. 6 is an example of a flowchart showing the operation procedure of the
First, the
PWM信号の出力がなくモード1の場合(S110のNo)、処理負荷判定部43はパルス監視部41が監視するパルスの間隔からモータ制御マイコン12の異常を監視する(S200)。
When there is no PWM signal output and the mode is 1 (No in S110), the processing
PWM信号の出力がありモード2の場合(S110のYes)、処理負荷判定部43はパルス監視部41からパルスの立ち上がり検出を取得したか否かを判定する(S120)。
When there is an output of the PWM signal and the
パルスの立ち上がり検出を取得した場合(S120のYes)、処理負荷判定部43はタイマ1のカウントを開始し、タイマ2のカウントを停止した後、再度、開始させる(S130)。タイマ1はH時間を計測するタイマであり、タイマ2はキャリア波の周期を計測するタイマである。
When the pulse rising detection is acquired (Yes in S120), the processing
次に、処理負荷判定部43はパルス監視部41からパルスの立ち下がり検出を取得したか否かを判定する(S140)。
Next, the processing
パルスの立ち下がり検出を取得した場合(S140のYes)、処理負荷判定部43はタイマ1のカウントを停止する(S150)。これにより、(i)処理負荷情報が得られる。また、ステップS130のタイマ2により(iii)キャリア波の周波数が分かっているので、(ii)CPU負荷の余裕度が求められる。
When the pulse falling detection is acquired (Yes in S140), the processing
処理負荷判定部43はH時間を所定値と比較するなどして必要であればフェールセーフ制御1を行う(S160)。フェールセーフ制御1はモータ制御マイコン12の処理負荷を下げるフェールセーフである。
The processing
次いで、処理負荷判定部43はタイマ2のカウント値が閾値を超えたか否かを判定する(S170)。この閾値はS130で求められるキャリア波の周期よりもやや短い値である。キャリア波の周期から動的に定めてもよい。
Next, the processing
したがって、タイマ2のカウント値が閾値を超えた場合(S170のYes)、PWM信号が検出されているはずなので、処理負荷判定部43はPWM信号監視部42からPWM信号の立ち上がり検出又は立ち下がり検出を取得したことを確認する(S180)。例えば、PWM信号の立ち上がり検出又は立ち下がりでONになるフラグを参照する(参照後はOFFに設定する)。
Therefore, when the count value of the
処理負荷判定部43はPWM信号が検出されていない場合、フェールセーフ制御2を行う(S190)。フェールセーフ制御2はPWM信号のインバータ14への出力を停止するフェールセーフである。
When the PWM signal is not detected, the processing
以上説明したように本実施例のモータ制御装置100は、従来から使用されているパルスを使用して、モータ制御マイコン12に異常が生じなくても処理負荷などを監視でき、それ以上処理負荷が増大しないような適切なフェールセーフを行うことができる。
As described above, the
本実施例では、さらにパルスにより任意のデータを送信可能なモータ制御装置100について説明する。本実施例において、実施例1で同一の符号を付した構成要素は同様の機能を果たすので、主に本実施例の主要な構成要素についてのみ説明する場合がある。
In the present embodiment, a
図7は本実施例のモータ制御マイコン12と監視マイコン13の機能ブロック図の一例を示す。モータ制御マイコン12は新たにデータ準備部35を有し、監視マイコン13はデータ受信部45を有する。データ準備部35は任意のデータを送信用に加工してパルス作成部32に出力する。データ受信部45はパルス監視部41が監視するパルスから通信規約に従ってデータを受信する。
FIG. 7 shows an example of a functional block diagram of the
図8は、キャリア波、PWM信号、及び、パルス出力について説明する図の一例である。本実施例ではパルスの先頭からスタートブロックS、データブロックD及び処理負荷ブロックLの3つのブロックがある点で実施例1と異なっている。 FIG. 8 is an example of a diagram illustrating the carrier wave, the PWM signal, and the pulse output. This embodiment is different from the first embodiment in that there are three blocks, a start block S, a data block D, and a processing load block L from the beginning of the pulse.
・モータ制御マイコン
キャリア波発生部31については実施例1と同様でよいが、パルス作成部32はキャリア波の周期に基づきパルスを作成する。すなわち、パルス作成部32はインバータ制御部34がインバータ制御を開始する前に、H出力を開始する。H出力の開始のタイミングはキャリア波の周期の始点のZ時間前である。具体的には、キャリア波の周期の開始時からタイマなどで「キャリア波の周期−Z時間」が経過することをカウントしてH出力を開始すればよい。なお、Z時間先にするのは、監視マイコン13が、データブロックの始点をPWM信号の立ち上がりで検出するためである。この意味で、本実施例のPWM信号はデータの送受信のためのクロック信号を代用している。
The motor control microcomputer
パルス作成部32はH出力をX時間、維持する。X時間は監視マイコン13がスタートブロックを確認でき、Z時間よりも短い時間であればよい。制御を簡単にするにはX時間=Z時間とすることができる。
The
データ準備部35は予め所定量のデータをパルス作成部32に出力しておくか、又は、モータ制御マイコン12の動作クロックに同期して1ビットずつデータをパルス作成部32に出力する。データについては後述するがどのようなデータを送信してもよい。本実施例ではキャリア波の1周期で8ビット(1バイト)のデータを送信する(データブロックのサイズが1バイト)ものとする。
The
データの送信には以下の2つの態様がある。
A.1バイトの各ビットに意味を持たせ各ビットが"1"又は"0"のどちらであるかでモータ制御マイコン12の状態を通知する態様
B.1バイトより多いデータを複数個のキャリア波の周期に分けて送信する態様
Aの場合、1バイトで最大で8種類の情報を送信できる。Bの態様の場合、データの先頭を監視マイコン13に知らせるため、データを送信する前に例えば"00000000"のデータブロック(同期フレーム)をデータ準備部35が準備する。以降は、送信対象のデータが例え"00000000"であっても"00000000"としないために、ビット8を"1"に固定する。例えば、"00000001"を送信する場合、"10000001"を送信し、"00000010"を送信する場合、"10000010"を送信し、"00000011"を送信する場合、"10000011"を送信する。よって、監視マイコン13は下位7ビットを例えばASCIIコードとして解釈しデータを受信する。
There are the following two modes for data transmission.
A. A mode in which each bit of one byte is given a meaning and the state of the
また、ひとまとまりのデータの終了を通知するため、データ準備部35は、再度、"00000000"を準備する。したがって、最初の"00000000"から"00000000"までがひとまとまりのデータである。送信するデータがない場合、例えば"00000000"以外のデータとしてランダムなデータや"11111111"を送信する。
Further, in order to notify the end of a group of data, the
データ準備部35が準備するデータは例えばエラー情報であり、以下のような内容が挙げられる。
er1.マイコン電源系の電圧の低下が検出されたこと(CPUに異常が生じるおそれがある)
er2.インバータ14の電圧異常、マイコンのA/D変換機能や電流センサ異常が検出されたこと(PWM信号作成に必要な部品の異常)
er3.エラー情報に限られず、モータ制御マイコン12の制御状態のログ
モータ制御マイコン12はこのように多様な情報を監視マイコン13に送信することができる。
The data prepared by the
er1. A drop in the voltage of the microcomputer power supply system has been detected (there is a risk that the CPU may malfunction)
er2.
er3. Log of control state of
パルス作成部32は、データブロックの挿入に続いて、インバータ制御部34が制御終了を通知するまでの間、パルスをHに設定する。すなわち、仮にデータブロックが"11111111"だとすると、スタートブロック、データブロック及び処理負荷ブロックは1つの矩形波となる。データブロックを送信し終える前にインバータ制御部34が制御終了を通知した場合は、処理負荷ブロックは存在しない。したがって、本実施例においても、スタートブロックの立ち上がりがZ時間早まるだけで、パルス(スタートブロック)の立ち上がりからパルスの立ち下がりまでの時間で(i)インバータ制御の処理負荷を通知できる。(ii)CPU負荷の余裕度、(iii)キャリア波の周波数についても同様である。
The
・監視マイコン13
監視マイコン13のパルス監視部41はパルスを監視し、例えばL→Hの立ち上がりを検出したことを処理負荷判定部43に通知する。また、データブロックにLビットが含まれうるので、「Z時間+1バイト」長さのビット列を無視した後、H→Lの立ち下がりを検出したことを処理負荷判定部43に通知する。これにより、処理負荷判定部43は以下の4つの情報を取得する。
(i) 処理負荷情報
(ii) CPU負荷の余裕度
(iii) キャリア波の周波数
(iv) PWM信号の異常監視
なお、キャリア波の周期はパルスの立ち上がりから次の立ち上がりまでの時間でよいが、周期の位置がZ時間前方にずれているので、キャリア波の周期だけでなく、位置まで含めて同期するにはキャリア波の周波数をZ時間補正する。このような補正をしなくても、 (iv) PWM信号の異常監視は可能である。
-Monitoring
The
(i) Processing load information
(ii) CPU load margin
(iii) Carrier wave frequency
(iv) Monitoring the abnormality of the PWM signal The period of the carrier wave may be the time from the rising edge of the pulse to the next rising edge, but since the position of the period is shifted forward by Z time, not only the period of the carrier wave, To synchronize including the position, the carrier wave frequency is corrected for Z time. Even without such correction, (iv) it is possible to monitor the abnormality of the PWM signal.
また、データ受信部45はさらに以下の情報を取得できる。
(v) データ内容
データ受信部45は、PWM信号監視部42が通知するPWM信号の立ち上がり検出によりデータブロックの先頭を検出する。データ受信部45は、データブロックの先頭から7ビットをパルスから抽出する(8ビットをパルスから抽出し、8ビット目を削除してもよい)。
Further, the
(v) Data Contents The
フェールセーフ部44は例えばex1のエラー情報(マイコン電源の異常)を受信した場合、H時間と比較される所定値を短くする。マイコン電源に異常がある場合CPUにも影響するおそれが高いので、早期にモータ制御マイコン12の処理負荷を下げることが可能になる。また、例えばex2のエラー情報(PWM信号作成に必要な部品の異常)を受信した場合、フェールセーフ部44はPWM信号の出力を停止する。PWM信号作成に必要な部品に異常がある場合、PWM信号の信頼性が低いと推定して制御を中止できる。
For example, when the fail
〔動作手順〕
図9は、モータ制御マイコン12の動作手順を示すフローチャート図の一例である。図9の手順はキャリア波の周期毎に繰り返し実行される。S210,S300について実施例1と同様である。
[Operation procedure]
FIG. 9 is an example of a flowchart showing an operation procedure of the
モード2の場合、パルス作成部32は、キャリア波の周期のZ時間手前になったか否かをキャリア波の周期とタイマなどにより判定する(S220)。
In the case of
キャリア波の周期開始のZ時間手前になった場合(S220のYes)、パルス作成部32はパルスをHに設定してX時間保持する(S230)。X時間とZ時間が等しくない場合、パルス作成部32はキャリア波の周期が開始されるまでパルスをH又はLに設定する。また、キャリア波の周期が開始されるとインバータ制御部34はインバータ制御を行う。
When the time is Z time before the start of the carrier wave cycle (Yes in S220), the
パルス作成部32は、データ準備部35が準備した1バイトのデータをパルスに設定する(S240)。
The
次に、パルス作成部32はパルスにHを設定する(S250)。1バイトのデータをパルスに設定する前に次のS260の制御終了が通知される場合は、S250のHは設定されない。
Next, the
パルス作成部32は、インバータ制御部34がパルス作成部32に制御終了を通知するまでパルスをHに維持する(S260)。
The
インバータ制御が完了すると、インバータ制御部34はパルス作成部32に制御終了を通知するので、パルス作成部32はパルスをLに設定する(S270)。
When the inverter control is completed, the
キャリア周波数制御部33は任意のタイミングで監視マイコン13からフェールセーフ要求があるか否かを判定する(S280)。
The carrier
そして、フェールセーフ要求がある場合(S280のYes)、キャリア周波数制御部33はキャリア波の周波数を下げることでCPUの処理負荷を低減する(S290)。
If there is a fail-safe request (Yes in S280), the carrier
図10は監視マイコン13の動作手順を示すフローチャート図の一例である。ステップS410、S530については実施例1と同様である。
FIG. 10 is an example of a flowchart showing the operation procedure of the
PWM信号の出力がありモード2の場合、処理負荷判定部43はパルス監視部41からパルスの立ち上がり検出を取得したか否かを判定する(S420)。
When there is an output of the PWM signal and in the
パルスの立ち上がり検出を取得した場合(S420のYes)、処理負荷判定部43はタイマ1のカウントを開始し、タイマ2のカウントを停止した後、再度、開始させる(S430)。タイマ1はH時間を計測するタイマであり、タイマ2はキャリア波の周期を計測するタイマである。
When the rising edge detection is acquired (Yes in S420), the processing
次に、処理負荷判定部43はPWM信号監視部42からPWM信号の立ち上がり検出を取得したか否かを判定する(S440)。これにより、データブロックの先頭を特定できる。
Next, the processing
PWM信号の立ち上がり検出を取得した場合(S440のYes)、データ受信部45はパルスからデータブロックを抽出する(S450)。
When the rising edge detection of the PWM signal is acquired (Yes in S440), the
データ受信部45はひとまとまりのエラー情報などを受信してエラー内容を判別し、必要であればフェールセーフ部44にフェールセーフ制御3を要求する(S460)。フェールセーフ制御3は異常判断の早期化やPWM信号の停止などである。
The
次に、処理負荷判定部43はパルス監視部41からパルスの立ち下がり検出を取得したか否かを判定する(S470)。上記のようにデータブロックが終了するまでの立ち下がりは無視される。
Next, the processing
パルスの立ち下がり検出を取得した場合(S470のYes)、処理負荷判定部43はタイマ1のカウントを停止する(S480)。これにより、(i)処理負荷情報が得られる。また、ステップS430のタイマ2により(iii)キャリア波の周波数が分かっているので、(ii)CPU負荷の余裕度が求められる。
When the pulse falling detection is acquired (Yes in S470), the processing
処理負荷判定部43はH時間を所定値と比較するなどして必要であればフェールセーフ制御1を行う(S490)。フェールセーフ制御1はモータ制御マイコン12の処理負荷を下げるフェールセーフである。
The processing
次いで、処理負荷判定部43はタイマ2のカウント値が閾値を超えたか否かを判定する(S500)。この閾値はS430で求められるキャリア波の周期よりもやや短い値である。動的に定めてもよい。本実施例ではステップS440でPWM信号の立ち上がりが検出されるが、S440で検出されなかった場合はS500でタイマ2が閾値を超える。
Next, the processing
したがって、タイマ2のカウント値が閾値を超えた場合(S500のYes)、PWM信号が検出されているはずなので、処理負荷判定部43はPWM信号監視部42からPWM信号の立ち上がり検出又は立ち下がり検出を取得したことを確認する(S510)。
Therefore, when the count value of the
処理負荷判定部43はPWM信号が検出されていない場合、フェールセーフ制御2を行う(S530)。フェールセーフ制御2はPWM信号のインバータ14への出力を停止するフェールセーフである。
When the PWM signal is not detected, the processing
以上説明したように本実施例のモータ制御装置100は、実施例1の効果に加え、監視用のパルスによりモータ制御マイコン12が監視マイコン13に任意のデータを送信することができる。
As described above, in addition to the effects of the first embodiment, the
12 モータ制御マイコン
13 監視マイコン
14 インバータ
21 CPU
51 パルス線
52 PWM信号線
53 フェールセーフ信号線
54 スイッチ
100 モータ制御装置
12
51
Claims (9)
外部から取得した外部情報を演算してPWM信号を作成するPWM信号作成手段と、
前記PWM信号作成手段がPWM信号の作成を開始した時に前記パルス信号をLowに設定し作成を終了した時にHighに設定するか、又は、PWM信号の作成を開始した時にLowに設定し作成を終了した時にHighに設定することで前記パルス信号を作成するパルス信号作成手段と、
前記パルス信号を監視して、前記PWM信号作成手段がPWM信号の作成を開始した時から終了する時までの作成時間を測定する作成時間測定手段と、
を有することを特徴とする電子制御装置。 An electronic control device comprising: first information processing means for continuously outputting a pulse signal; and second information processing means for receiving the pulse signal,
PWM signal creation means for computing external information acquired from the outside and creating a PWM signal;
When the PWM signal creation means starts creating the PWM signal, the pulse signal is set to Low and when the creation is finished, it is set to High, or when creation of the PWM signal is started, it is set to Low and the creation is finished. A pulse signal creating means for creating the pulse signal by setting it to High when
A creation time measuring means for monitoring the pulse signal and measuring a creation time from when the PWM signal creation means starts creating the PWM signal to when it finishes;
An electronic control device comprising:
前記作成時間測定手段は、前記パルス信号の立ち下がり又は立ち上がりを監視して、PWM信号作成手段がPWM信号の作成を開始した時から、次回、PWM信号の作成を開始した時までの時間をキャリア波の周期として測定する、
ことを特徴とする請求項1記載の電子制御装置。 The PWM signal creating means creates a PWM signal for each carrier wave period,
The creation time measuring means monitors the fall or rise of the pulse signal, and the time from when the PWM signal creation means starts creating the PWM signal to the next time when the creation of the PWM signal is started is a carrier. Measure as wave period,
The electronic control device according to claim 1.
PWM信号を監視してPWM信号の立ち上がりを検出するPWM信号監視手段と、
前記PWM信号の立ち上がりが検出された時を前記データの先頭に特定して前記データを受信するデータ受信手段と、
を有することを特徴とする請求項1又は2記載の電子制御装置。 The pulse signal creation means inserts data of a predetermined length into the pulse signal between the time when the PWM signal creation means starts creating the PWM signal and the time when the creation ends.
PWM signal monitoring means for monitoring the PWM signal and detecting the rising edge of the PWM signal;
A data receiving means for specifying the time when the rising edge of the PWM signal is detected as the head of the data and receiving the data;
The electronic control device according to claim 1, further comprising:
前記作成時間測定手段が測定したキャリア波の周期内に、前記PWM信号監視手段がPWM信号の立ち上がり又は立ち下がりのどちらも検出しない場合、PWM信号の出力を停止するフェールセーフ手段と、
を有することを特徴とする請求項2記載の電子制御装置。 PWM signal monitoring means for monitoring the PWM signal and detecting at least one of the rising edge and falling edge of the PWM signal;
Fail safe means for stopping the output of the PWM signal when the PWM signal monitoring means does not detect either the rise or fall of the PWM signal within the period of the carrier wave measured by the creation time measurement means,
The electronic control device according to claim 2, further comprising:
前記フェールセーフ手段は、所定時間内に前記パルス信号の状態が切り替わらない場合、前記PWM信号作成手段にフェールセーフ処理を施す、
ことを特徴とする請求項4又は5記載の電子制御装置。 When the PWM signal creation means has not created a PWM signal, the pulse signal creation means creates the pulse signal whose state is periodically switched,
The fail-safe means performs fail-safe processing on the PWM signal creating means when the state of the pulse signal is not switched within a predetermined time.
The electronic control device according to claim 4 or 5, wherein
前記フェールセーフ手段は、前記データ受信手段が受信したデータに応じて、前記所定値を変更する、
ことを特徴とする請求項3記載の電子制御装置。 If the creation time is greater than or equal to a predetermined value, it has fail-safe means for increasing the period of the carrier wave,
The fail safe means changes the predetermined value according to the data received by the data receiving means.
The electronic control device according to claim 3.
外部から取得した外部情報を演算してPWM信号を作成するPWM信号作成手段と、
前記PWM信号作成手段がPWM信号の作成を開始した時に前記パルス信号をLowに設定し作成を終了した時にHighに設定するか、又は、PWM信号の作成を開始した時にLowに設定し作成を終了した時にHighに設定することで前記パルス信号を作成するパルス信号作成手段と、
を有することを特徴とする情報処理装置。 An information processing device that continuously outputs the pulse signal to a second information processing device that measures a creation time from the time when the information processing device receives a pulse signal to the time when it finishes creating a PWM signal. Because
PWM signal creation means for computing external information acquired from the outside and creating a PWM signal;
When the PWM signal creation means starts creating the PWM signal, the pulse signal is set to Low and when the creation is finished, it is set to High, or when creation of the PWM signal is started, it is set to Low and the creation is finished. A pulse signal creating means for creating the pulse signal by setting it to High when
An information processing apparatus comprising:
前記PWM信号作成手段がPWM信号の作成を開始した時にパルス信号をLowに設定し作成を終了した時にHighに設定するか、又は、PWM信号の作成を開始した時にLowに設定し作成を終了した時にHighに設定することで前記パルス信号を作成するパルス信号作成手段と、を有する第2の情報処理装置から、
前記パルス信号を受信するパルス信号受信手段と、
前記パルス信号を監視して、前記PWM信号作成手段がPWM信号の作成を開始した時から終了する時までの作成時間を測定する作成時間測定手段と、
を有することを特徴とする情報処理装置。 PWM signal creation means for computing external information acquired from the outside and creating a PWM signal;
When the PWM signal creation means starts creating the PWM signal, the pulse signal is set to Low and set to High when the creation is finished, or set to Low when the creation of the PWM signal is started and the creation is finished. From a second information processing apparatus having pulse signal creating means for creating the pulse signal by setting it to High sometimes
Pulse signal receiving means for receiving the pulse signal;
A creation time measuring means for monitoring the pulse signal and measuring a creation time from when the PWM signal creation means starts creating the PWM signal to when it finishes;
An information processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013024921A JP2014154043A (en) | 2013-02-12 | 2013-02-12 | Electronic control device and information processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013024921A JP2014154043A (en) | 2013-02-12 | 2013-02-12 | Electronic control device and information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014154043A true JP2014154043A (en) | 2014-08-25 |
Family
ID=51575829
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013024921A Pending JP2014154043A (en) | 2013-02-12 | 2013-02-12 | Electronic control device and information processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014154043A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102017219195A1 (en) | 2016-11-15 | 2018-05-17 | Toyota Jidosha Kabushiki Kaisha | METHOD FOR ENSURING THE OPERATION OF A COMPUTER |
WO2019202824A1 (en) * | 2018-04-18 | 2019-10-24 | 日立オートモティブシステムズ株式会社 | Electronic control device |
KR20200077354A (en) * | 2018-12-20 | 2020-06-30 | 현대트랜시스 주식회사 | Commuication system in vehicle and the method using the same |
-
2013
- 2013-02-12 JP JP2013024921A patent/JP2014154043A/en active Pending
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102017219195A1 (en) | 2016-11-15 | 2018-05-17 | Toyota Jidosha Kabushiki Kaisha | METHOD FOR ENSURING THE OPERATION OF A COMPUTER |
US10514970B2 (en) | 2016-11-15 | 2019-12-24 | Toyota Jidosha Kabushiki Kaisha | Method of ensuring operation of calculator |
DE102017219195B4 (en) | 2016-11-15 | 2022-09-01 | Toyota Jidosha Kabushiki Kaisha | PROCEDURE FOR ENSURE OPERATION OF A COMPUTER |
WO2019202824A1 (en) * | 2018-04-18 | 2019-10-24 | 日立オートモティブシステムズ株式会社 | Electronic control device |
US20210046942A1 (en) * | 2018-04-18 | 2021-02-18 | Hitachi Automotive Systems, Ltd. | Electronic control device |
JPWO2019202824A1 (en) * | 2018-04-18 | 2021-04-22 | 日立Astemo株式会社 | Electronic control device |
KR20200077354A (en) * | 2018-12-20 | 2020-06-30 | 현대트랜시스 주식회사 | Commuication system in vehicle and the method using the same |
KR102219370B1 (en) * | 2018-12-20 | 2021-02-23 | 현대트랜시스 주식회사 | Commuication system in vehicle and the method using the same |
US11159041B2 (en) | 2018-12-20 | 2021-10-26 | Hyundai Transys Inc. | Communication system in vehicle and communication method using the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3199407B1 (en) | Control device and control method for on-vehicle electronic apparatus | |
US10826423B2 (en) | Motor driving apparatus and motor driving method | |
US10053141B2 (en) | Communication system | |
US11643095B2 (en) | Electronic control device, control system, and reset determination method | |
US9374032B2 (en) | PWM output apparatus and motor driving apparatus | |
EP3023304B1 (en) | Vehicle-mounted electronic device control device and control method | |
US9889881B2 (en) | Control apparatus and control method of on-vehicle electronic equipment | |
JP5375059B2 (en) | Sensor abnormality detection device and sensor abnormality detection method | |
JP5434873B2 (en) | Rotating electric machine for vehicles | |
CN109687782B (en) | Control device and control system of stepping motor | |
JPWO2010073312A1 (en) | Vehicle electronic control system, vehicle electronic control unit, and vehicle control synchronization method | |
JP6962176B2 (en) | Power converter control device | |
JP2020106391A (en) | Controller of vehicle onboard apparatus | |
JP2014154043A (en) | Electronic control device and information processor | |
US10444288B2 (en) | Abnormality diagnosing device and abnormality diagnosing method | |
CN108688717B (en) | Vehicle control device | |
EP2896533A1 (en) | Semiconductor device and driving apparatus | |
US20110234137A1 (en) | System clock monitoring apparatus and motor control system | |
JP6044468B2 (en) | Fuel injection control device | |
JP2016039748A (en) | Motor controller, motor control system, motor control method, and motor control program | |
JP6340913B2 (en) | Control apparatus and control method | |
JP2013066362A (en) | Rotary electric machine for vehicle | |
JP2018106513A (en) | Detection device | |
JP5880885B2 (en) | Load drive device | |
CN111176150B (en) | Electronic control device and emergency interrupt method for micro-beat generation |