JP2020048148A - AD converter and self-diagnosis method - Google Patents
AD converter and self-diagnosis method Download PDFInfo
- Publication number
- JP2020048148A JP2020048148A JP2018176887A JP2018176887A JP2020048148A JP 2020048148 A JP2020048148 A JP 2020048148A JP 2018176887 A JP2018176887 A JP 2018176887A JP 2018176887 A JP2018176887 A JP 2018176887A JP 2020048148 A JP2020048148 A JP 2020048148A
- Authority
- JP
- Japan
- Prior art keywords
- self
- diagnosis
- data
- digital data
- converter
- 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
本発明は、AD変換装置の自己診断技術に関する。 The present invention relates to a self-diagnosis technology of an AD converter.
AD変換装置として、複数種類の自己診断データがAD変換器によりデジタルデータに変換され、それらAD変換後の各デジタルデータと各自己診断データに対応する予め決められたデジタルデータとが一致するか否かの判断が順次行われ、デジタルデータ同士が一致しないことが2以上連続する場合、AD変換器が異常であると判断するものがある。 As an AD converter, a plurality of types of self-diagnosis data are converted into digital data by an AD converter, and whether or not each of the AD-converted digital data matches predetermined digital data corresponding to each of the self-diagnosis data is determined. Are determined sequentially, and when two or more consecutive cases where the digital data do not match each other are determined, the AD converter may determine that the AD converter is abnormal.
関連する技術として、特許文献1または特許文献2がある。
As a related technique, there is
しかしながら、上記AD変換装置は、複数種類の自己診断データのうちのある種類の自己診断データにおいてのみデジタルデータ同士が一致しないと判断される場合、ある種類の自己診断データの次の種類の自己診断データにおいてデジタルデータ同士が一致すると判断され、一致しないことが2以上連続しないため、ある種類の自己診断データについてAD変換器が異常であるにもかかわらず、AD変換器が異常でないと判断してしまう懸念がある。 However, when it is determined that only one type of self-diagnosis data among a plurality of types of self-diagnosis data does not match each other, the A / D conversion apparatus performs the next type of self-diagnosis of the certain type of self-diagnosis data. In the data, it is determined that the digital data match each other, and the mismatch does not continue two or more times. Therefore, it is determined that the AD converter is not abnormal even though the AD converter is abnormal for a certain type of self-diagnosis data. There is a concern.
本発明の一側面に係る目的は、複数種類の自己診断データがAD変換器に入力される場合において、ある種類の自己診断データにおいてのみデジタルデータ同士が一致しないと判断される場合であっても、AD変換器が異常であると判断することである。 An object according to one aspect of the present invention is to provide a case where a plurality of types of self-diagnosis data are input to an AD converter, even when it is determined that digital data does not match only in a certain type of self-diagnosis data. , AD converter is determined to be abnormal.
本発明に係る一つの形態であるAD変換装置は、第1及び第2の自己診断命令を出力する上位制御部と、第1の自己診断命令が入力されると、第1の自己診断データをAD変換し、第2の自己診断命令が入力されると、第2の自己診断データをAD変換するAD変換器とを備え、上位制御部は、第1の自己診断命令を出力し、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致する場合、第2の自己診断命令を出力し、第2の自己診断命令を出力し、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致する場合、第1の自己診断命令を出力し、第1の自己診断命令を出力し、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致しない場合、再度、第1の自己診断命令を出力し、第2の自己診断命令を出力し、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致しない場合、再度、第2の自己診断命令を出力し、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致しないことが第1の閾値以上連続した場合、または、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致しないことが第2の閾値以上連続した場合、AD変換器が異常であると判断する。 An AD converter according to one aspect of the present invention includes a higher-level control unit that outputs first and second self-diagnosis commands and a first self-diagnosis data when a first self-diagnosis command is input. An A / D converter for performing A / D conversion and receiving an input of the second self-diagnosis command when the second self-diagnosis command is input, wherein the higher-level control unit outputs the first self-diagnosis command and outputs the first self-diagnosis command; If the digital data after the AD conversion of the self-diagnosis data matches the first digital data, a second self-diagnosis instruction is output, a second self-diagnosis instruction is output, and the AD of the second self-diagnosis data is output. If the converted digital data matches the second digital data, a first self-diagnosis command is output, a first self-diagnosis command is output, and the digital data of the first self-diagnosis data after AD conversion is If it does not match the first digital data, , The first self-diagnosis command is output, the second self-diagnosis command is output, and if the digital data after the AD conversion of the second self-diagnosis data does not match the second digital data, the second self-diagnosis command is output again. A self-diagnosis instruction is output, and if the digital data after AD conversion of the first self-diagnosis data does not match the first digital data continues for a first threshold or more, or the AD of the second self-diagnosis data If the fact that the converted digital data does not match the second digital data continues for a second threshold or more, it is determined that the AD converter is abnormal.
これにより、AD変換器に入力される複数種類の自己診断データ毎に、AD変換器が異常であるか否かを判断することができるため、ある種類の自己診断データにおいてのみデジタルデータ同士が一致しないと判断される場合であっても、AD変換器が異常であると判断することができる。 This makes it possible to determine whether or not the AD converter is abnormal for each of a plurality of types of self-diagnosis data input to the A / D converter. Even when it is determined not to do so, it can be determined that the AD converter is abnormal.
また、本発明に係る一つの形態であるAD変換装置は、第1及び第2の自己診断命令を順に繰り返し出力する上位制御部と、第1の自己診断命令が入力されると、第1の自己診断データをAD変換し、第2の自己診断命令が入力されると、第2の自己診断データをAD変換するAD変換器とを備え、上位制御部は、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致しないことが第3の閾値以上連続した場合、または、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致しないことが第4の閾値以上連続した場合、AD変換器が異常であると判断する。 Further, an AD converter according to an aspect of the present invention includes a higher-level control unit that repeatedly outputs the first and second self-diagnosis instructions in order, and a first self-diagnosis instruction when the first self-diagnosis instruction is input. An A / D converter for performing A / D conversion of the self-diagnosis data and receiving an input of a second self-diagnosis command when the second self-diagnosis command is input; If the converted digital data does not match the first digital data continuously for a third threshold or more, or the AD converted digital data of the second self-diagnosis data does not match the second digital data. Is continuous for more than the fourth threshold value, it is determined that the AD converter is abnormal.
このように構成しても、AD変換器に入力される複数種類の自己診断データ毎に、AD変換器が異常であるか否かを判断することができるため、ある種類の自己診断データにおいてのみデジタルデータ同士が一致しないと判断される場合であっても、AD変換器が異常であると判断することができる。 Even with such a configuration, it is possible to determine whether or not the AD converter is abnormal for each of a plurality of types of self-diagnosis data input to the AD converter. Even when it is determined that the digital data do not match, it is possible to determine that the AD converter is abnormal.
また、上位制御部は、AD変換器が異常であると判断した後、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致することが第5の閾値以上連続した場合で、かつ、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致することが第6の閾値以上連続した場合、AD変換器が正常であると判断する。 After determining that the AD converter is abnormal, the higher-level control unit continues that the digital data after the AD conversion of the first self-diagnosis data matches the first digital data is equal to or more than the fifth threshold value. In this case, if the digital data after the AD conversion of the second self-diagnosis data coincides with the second digital data for the sixth threshold or more, it is determined that the AD converter is normal.
これにより、上位制御部は、異常であったAD変換器が正常に戻ったことを認識することができる。 Thereby, the upper control unit can recognize that the abnormal AD converter has returned to normal.
また、上位制御部は、AD変換器が異常であると判断した後、第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致することと、第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致することの合計値が第7の閾値以上連続した場合、AD変換器が正常であると判断する。 After determining that the AD converter is abnormal, the higher-level control unit determines that the digital data after AD conversion of the first self-diagnosis data matches the first digital data, and that the second self-diagnosis data If the total value of the coincidence of the digital data after AD conversion with the second digital data continues for a seventh threshold value or more, it is determined that the AD converter is normal.
これにより、上位制御部は、異常であったAD変換器が正常に戻ったことを認識することができる。 Thereby, the upper control unit can recognize that the abnormal AD converter has returned to normal.
また、第1の自己診断データのAD変換後のデジタルデータは、第2の自己診断データのAD変換後のデジタルデータを構成するビット列の各ビットをそれぞれ反転したものである。 The digital data after the AD conversion of the first self-diagnosis data is obtained by inverting each bit of the bit string constituting the digital data after the AD conversion of the second self-diagnosis data.
これにより、第1の自己診断データのAD変換後のデジタルデータを、第2の自己診断データのAD変換後のデジタルデータに対して、容易に離れた値にすることができる。 This makes it possible to easily set the digital data after the AD conversion of the first self-diagnosis data apart from the digital data after the AD conversion of the second self-diagnosis data.
本発明によれば、複数種類の自己診断データがAD変換器に入力される場合において、ある種類の自己診断データにおいてのみデジタルデータ同士が一致しないと判断される場合であっても、AD変換器が異常であると判断することができる。 According to the present invention, when a plurality of types of self-diagnosis data are input to an AD converter, even if it is determined that digital data does not match only in a certain type of self-diagnosis data, the A / D converter Can be determined to be abnormal.
以下図面に基づいて実施形態について詳細を説明する。
図1は、実施形態のAD変換装置を示す図である。
Hereinafter, embodiments will be described in detail with reference to the drawings.
FIG. 1 is a diagram illustrating an AD converter according to an embodiment.
図1に示すAD変換装置1は、電池パックBpに備えられている。
電池パックBpは、車両Veに搭載されている。
The
The battery pack Bp is mounted on the vehicle Ve.
車両Veは、ハイブリッド車または電気自動車であり、電池パックBpの他に、走行用モータなどの負荷Loを備える。 The vehicle Ve is a hybrid vehicle or an electric vehicle, and includes a load Lo such as a traveling motor in addition to the battery pack Bp.
電池パックBpは、AD変換装置1の他に、負荷Loに電力を供給する電池Bを備える。
The battery pack Bp includes, in addition to the
AD変換装置1は、電圧測定部2と、電流測定部3と、温度測定部4と、AD変換器5と、上位制御部6と、記憶部13とを備える。
The
電圧測定部2は、電圧計であって、電池Bの電圧を測定し、その測定結果である測定アナログ値AvをAD変換器5に出力する。
The voltage measurement unit 2 is a voltmeter that measures the voltage of the battery B and outputs a measurement analog value Av that is the measurement result to the
電流測定部3は、電流計であって、電池Bに流れる電流を測定し、その測定結果である測定アナログ値AiをAD変換器5に出力する。
The current measuring unit 3 is an ammeter that measures a current flowing through the battery B, and outputs a measured analog value Ai that is a result of the measurement to the
温度測定部4は、温度計であって、電池Bの温度を測定し、その測定結果である測定アナログ値AtをAD変換器5に出力する。
The temperature measuring unit 4 is a thermometer that measures the temperature of the battery B and outputs a measurement analog value At that is a measurement result to the
AD変換器5は、IC(Integrated Circuit)により構成され、マルチプレクサ7と、モジュレータ8と、自己診断データ出力部9と、切替スイッチ10と、デジタルフィルタ11と、記憶部12とを備える。
The
マルチプレクサ7は、測定アナログ値Av、測定アナログ値Ai、及び測定アナログ値Atのうちの何れか1つの測定アナログ値をモジュレータ8に出力する。なお、測定アナログ値が1種類である場合、マルチプレクサ7を省略して、測定アナログ値を直接モジュレータ8へ出力してもよい。 The multiplexer 7 outputs any one of the measured analog value Av, the measured analog value Ai, and the measured analog value At to the modulator 8. When there is only one type of measured analog value, the multiplexer 7 may be omitted and the measured analog value may be directly output to the modulator 8.
モジュレータ8は、入力される測定アナログ値Avを、測定1ビットパルスデータSvに変換する。また、モジュレータ8は、入力される測定アナログ値Aiを、測定1ビットパルスデータSiに変換する。また、モジュレータ8は、入力される測定アナログ値Atを、測定1ビットパルスデータStに変換する。 The modulator 8 converts the input measurement analog value Av into measurement 1-bit pulse data Sv. Further, the modulator 8 converts the input measurement analog value Ai into measurement 1-bit pulse data Si. Further, the modulator 8 converts the input measurement analog value At into measurement 1-bit pulse data St.
自己診断データ出力部9は、自己診断データとして自己診断用1ビットパルスデータSvn、Sin、Stnを出力する。なお、nは、自己診断用1ビットパルスデータSv、Si、Stのそれぞれの種類数を示している。自己診断用1ビットパルスデータSv、Si、Stのそれぞれの種類数は2以上である。複数種類の自己診断用1ビットパルスデータSvは互いに異なるデータであり、複数種類の自己診断用1ビットパルスデータSiも互いに異なるデータであり、複数種類の自己診断用1ビットパルスデータStも互いに異なるデータである。 The self-diagnosis data output unit 9 outputs self-diagnosis 1-bit pulse data Svn, Sin, and Stn as self-diagnosis data. Note that n indicates the number of types of the self-diagnosis 1-bit pulse data Sv, Si, and St. The number of types of each of the self-diagnosis 1-bit pulse data Sv, Si, and St is two or more. The plurality of types of self-diagnosis 1-bit pulse data Sv are different from each other, the plurality of types of self-diagnosis 1-bit pulse data Si are also different from each other, and the plurality of types of self-diagnosis 1-bit pulse data St are also different from each other. Data.
測定1ビットパルスデータSv、Si、St及び自己診断用1ビットパルスデータSvn、Sin、Stnは、パルス幅が一定のハイレベルのパルスとパルス幅が可変のローレベルのパルスとが交互に連続するパルス信号である。測定アナログ値が大きくなると、測定1ビットパルスデータSv、Si、Stのハイレベルのパルスの密度(単位時間あたりのハイレベルのパルス数)が増加する。また、測定アナログ値が小さくなると、測定1ビットパルスデータSv、Si、Stのハイレベルのパルスの密度が減少する。 The measurement 1-bit pulse data Sv, Si, St and the self-diagnosis 1-bit pulse data Svn, Sin, Stn alternately include a high-level pulse having a constant pulse width and a low-level pulse having a variable pulse width. It is a pulse signal. As the measured analog value increases, the density of high-level pulses of the measured 1-bit pulse data Sv, Si, and St (the number of high-level pulses per unit time) increases. Also, when the measured analog value decreases, the density of the high-level pulses of the measurement 1-bit pulse data Sv, Si, St decreases.
また、自己診断用1ビットパルスデータSvnは、予め決められたデジタルデータDvnに変換されるように、実験やシミュレーションにより設定されているものとする。なお、自己診断用1ビットパルスデータSvnは、一例として、電池Bの電圧が、過放電電圧<電池Bの電圧<過充電電圧のときに電圧測定部2とマルチプレクサ7を介してモジュレータ8から出力される測定1ビットパルスデータSvと同じデータとする。 Further, it is assumed that the 1-bit pulse data Svn for self-diagnosis is set by an experiment or a simulation so as to be converted into predetermined digital data Dvn. For example, the self-diagnosis 1-bit pulse data Svn is output from the modulator 8 via the voltage measuring unit 2 and the multiplexer 7 when the voltage of the battery B is overdischarge voltage <voltage of the battery B <overcharge voltage. The same data as the measured 1-bit pulse data Sv is used.
また、自己診断用1ビットパルスデータSinは、予め決められたデジタルデータDinに変換されるように、実験やシミュレーションにより設定されているものとする。なお、自己診断用1ビットパルスデータSinは、一例として、電池Bに流れる電流が過電流閾値より小さいときに電流測定部3とマルチプレクサ7を介してモジュレータ8から出力される測定1ビットパルスデータSiと同じデータとする。 Also, it is assumed that the 1-bit pulse data Sin for self-diagnosis is set by an experiment or a simulation so as to be converted into predetermined digital data Din. The 1-bit pulse data Sin for self-diagnosis is, for example, the measured 1-bit pulse data Si output from the modulator 8 via the current measuring unit 3 and the multiplexer 7 when the current flowing through the battery B is smaller than the overcurrent threshold. The same data as
また、自己診断用1ビットパルスデータStnは、予め決められたデジタルデータDtnに変換されるように、実験やシミュレーションにより設定されているものとする。なお、自己診断用1ビットパルスデータStnは、一例として、電池Bの温度が過温度閾値より小さいときに温度測定部4とマルチプレクサ7を介してモジュレータ8から出力される測定1ビットパルスデータStと同じデータとする。 Also, it is assumed that the 1-bit pulse data for self-diagnosis Stn is set by an experiment or a simulation so as to be converted into predetermined digital data Dtn. The 1-bit pulse data Stn for self-diagnosis is, for example, the measured 1-bit pulse data St output from the modulator 8 via the temperature measuring unit 4 and the multiplexer 7 when the temperature of the battery B is smaller than the over-temperature threshold. Same data.
なお、自己診断用1ビットパルスデータSvn、Sin、Stnを区別せず、単に、自己診断用1ビットパルスデータという場合がある。同様に、測定1ビットパルスデータSv、Si、Stを区別せず、単に、測定1ビットパルスデータという場合がある。 Note that the self-diagnosis 1-bit pulse data may be simply referred to as self-diagnosis 1-bit pulse data without distinguishing the self-diagnosis 1-bit pulse data Svn, Sin, and Stn. Similarly, the measurement 1-bit pulse data Sv, Si, and St may be simply referred to as measurement 1-bit pulse data without distinction.
また、測定1ビットパルスデータSv、Si、St及び自己診断用1ビットパルスデータSvn、Sin、Stnは2進数のデータ列であるデジタルビットストリームでもよい。この場合、測定アナログ値に応じて、2進数で表される測定1ビットパルスデータSv、Si、Stの値が変わる。 Further, the measurement 1-bit pulse data Sv, Si, St and the self-diagnosis 1-bit pulse data Svn, Sin, Stn may be digital bit streams which are binary data strings. In this case, the values of the measured 1-bit pulse data Sv, Si, St represented by a binary number change according to the measured analog value.
切替スイッチ10は、モジュレータ8から出力される測定1ビットパルスデータSv、Si、Stの何れか1つ、または、自己診断データ出力部9から出力される自己診断用1ビットパルスデータSvn、Sin、Stnの何れか1つを出力する。 The changeover switch 10 outputs one of the measured 1-bit pulse data Sv, Si, and St output from the modulator 8 or the self-diagnosis 1-bit pulse data Svn, Sin, output from the self-diagnosis data output unit 9. Any one of Stn is output.
デジタルフィルタ11は、切替スイッチ10から出力される測定1ビットパルスデータSv、Si、St及び自己診断用1ビットパルスデータSvn、Sin、Stnを所定ビット数のデジタルデータに変換して記憶部12に出力する。
The digital filter 11 converts the measured 1-bit pulse data Sv, Si, St and the self-diagnosis 1-bit pulse data Svn, Sin, Stn output from the changeover switch 10 into digital data of a predetermined number of bits and stores the converted data in the
記憶部12は、入力されるデジタルデータを、対応する記憶領域に記憶する。なお、記憶部12は、AD変換器5の外部であって、かつ、AD変換装置1の内部に設けられてもよい。
The
例えば、記憶部12は、自己診断用1ビットパルスデータSvnから変換されたデジタルデータが入力されると、そのデジタルデータを電圧用記憶領域に記憶し、その後、電圧AD変換処理が実施され、測定アナログ値Av(または測定1ビットパルスデータSv)から変換されたデジタルデータが入力されると、そのデジタルデータを電圧用記憶領域に記憶する。
For example, when digital data converted from the self-diagnosis 1-bit pulse data Svn is input, the
また、記憶部12は、自己診断用1ビットパルスデータSinから変換されたデジタルデータが入力されると、そのデジタルデータを電流用記憶領域に記憶し、その後、電流AD変換処理が実施され、測定アナログ値Ai(または測定1ビットパルスデータSi)から変換されたデジタルデータが入力されると、そのデジタルデータを電流用記憶領域に記憶する。
When digital data converted from the 1-bit pulse data Sin for self-diagnosis is input, the
また、記憶部12は、自己診断用1ビットパルスデータStnから変換されたデジタルデータが入力されると、そのデジタルデータを温度用記憶領域に記憶し、その後、温度AD変換処理が実施され、測定アナログ値At(または測定1ビットパルスデータSt)から変換されたデジタルデータが入力されると、そのデジタルデータを温度用記憶領域に記憶する。
When digital data converted from the self-diagnosis 1-bit pulse data Stn is input, the
上位制御部6は、例えば、CPU(Central Processing Unit)、マルチコアCPU、またはプログラマブルなデバイス(FPGA(Field Programmable Gate Array)やPLD(Programmable Logic Device))により構成され、自己診断命令またはAD変換命令をAD変換器5に出力する。
The upper control unit 6 is constituted by, for example, a CPU (Central Processing Unit), a multi-core CPU, or a programmable device (FPGA (Field Programmable Gate Array) or PLD (Programmable Logic Device)), and executes a self-diagnosis instruction or an AD conversion instruction. Output to the
記憶部13は、上位制御部6の外部に設けられてもよく、内部に設けられてもよい。
なお、AD変換装置1は異なる複数のユニットで構成されてもよい。例えば、上位制御部6は制御ユニットに備えられ、AD変換装置1のうち上位制御部6を除く部位は監視ユニットに備えられる構成でもよい。この場合、AD変換装置1は、1つの監視ユニットと1つの制御ユニットで構成されてもよいし、複数の電池Bを監視する複数の監視ユニットと、複数の監視ユニットを制御する1つの制御ユニットで構成されてもよい。
The storage unit 13 may be provided outside the upper control unit 6 or may be provided inside.
Note that the
図2は、AD変換器5の動作を示すフローチャートである。
まず、AD変換器5は、ステップS201、S202において、自己診断命令またはAD変換命令が入力されたか否かを繰り返し判断する。
FIG. 2 is a flowchart showing the operation of the
First, in steps S201 and S202, the
次に、AD変換器5は、自己診断命令が入力されたと判断すると(ステップS201:Yes)、自己診断処理を実施する(ステップS203)。
Next, when determining that the self-diagnosis command is input (Step S201: Yes), the
また、AD変換器5は、AD変換命令が入力されたと判断すると(ステップS202:Yes)、AD変換処理を実施する(ステップS204)。
When the
一例として、AD変換器5は、電圧用自己診断命令Cv1が入力されると、電圧用自己診断処理Pv1を実施する。まず、AD変換器5は、電圧用自己診断処理Pv1を開始すると、自己診断データ出力部9の動作を制御することにより、自己診断データ出力部9から自己診断用1ビットパルスデータSv1を出力させる。次に、AD変換器5は、切替スイッチ10の動作を制御することにより、自己診断データ出力部9から出力される自己診断用1ビットパルスデータSv1をデジタルフィルタ11に出力させる。次に、AD変換器5は、デジタルフィルタ11の動作を制御することにより、切替スイッチ10から出力される自己診断用1ビットパルスデータSv1をデジタルデータに変換させる。そして、AD変換器5は、記憶部12の動作を制御することにより、デジタルフィルタ11により変換されるデジタルデータを電圧用記憶領域に記憶させるとともに、そのデジタルデータを上位制御部6に送り、電圧用自己診断処理を終了する。
As an example, when the voltage self-diagnosis command Cv1 is input, the
または、AD変換器5は、電圧用自己診断命令Cv2が入力されると、電圧用自己診断処理Pv2を実施する。まず、AD変換器5は、電圧用自己診断処理Pv2を開始すると、自己診断データ出力部9の動作を制御することにより、自己診断データ出力部9から自己診断用1ビットパルスデータSv2を出力させる。次に、AD変換器5は、切替スイッチ10の動作を制御することにより、自己診断データ出力部9から出力される自己診断用1ビットパルスデータSv2をデジタルフィルタ11に出力させる。次に、AD変換器5は、デジタルフィルタ11の動作を制御することにより、切替スイッチ10から出力される自己診断用1ビットパルスデータSv2をデジタルデータに変換させる。そして、AD変換器5は、記憶部12の動作を制御することにより、デジタルフィルタ11により変換されるデジタルデータを電圧用記憶領域に記憶させるとともに、そのデジタルデータを上位制御部6に送り、電圧用自己診断処理を終了する。
Alternatively, when the voltage self-diagnosis command Cv2 is input, the
なお、自己診断用1ビットパルスデータSv2(第2の自己診断データ)は自己診断用1ビットパルスデータSv1(第1の自己診断データ)とは異なる値である。 The 1-bit pulse data for self-diagnosis Sv2 (second self-diagnosis data) has a different value from the 1-bit pulse data for self-diagnosis Sv1 (first self-diagnosis data).
また、電流用自己診断処理や温度用自己診断処理についても、自己診断用1ビットパルスデータの種類毎にそれぞれ処理が実施されるものとする。 The self-diagnosis processing for current and the self-diagnosis processing for temperature are also performed for each type of 1-bit pulse data for self-diagnosis.
また、AD変換器5は、上位制御部6からデジタルデータの送信指令を受信した後に、電圧用記憶領域、電流用記憶領域、または温度用記憶領域に記憶されるデジタルデータを上位制御部6に送ってもよい。
After receiving the digital data transmission command from the higher-level control unit 6, the
図3は、上位制御部6の動作の一例を示すフローチャートである。
上位制御部6は、ステップS301において自己診断処理(自己診断命令の出力及びAD変換器5の正常/異常判断)を実施した後、ステップS302においてAD変換命令を出力する一連の処理(ステップS301、S302)を繰り返し実施する。例えば、上位制御部6は、電圧用自己診断処理、電圧AD変換命令出力、電流用自己診断処理、電流AD変換命令出力、温度用自己診断処理、温度AD変換命令出力の一連の処理を順に繰り返し実施する。
FIG. 3 is a flowchart illustrating an example of the operation of the higher-level control unit 6.
After performing the self-diagnosis processing (output of the self-diagnosis instruction and the normal / abnormal judgment of the AD converter 5) in step S301, the higher-level control unit 6 performs a series of processing (step S301, step S302) to output the AD conversion instruction in step S302. S302) is repeatedly performed. For example, the higher-level control unit 6 sequentially repeats a series of processes of a voltage self-diagnosis process, a voltage AD conversion command output, a current self-diagnosis process, a current AD conversion command output, a temperature self-diagnosis process, and a temperature AD conversion command output. carry out.
なお、ステップS301の自己診断処理は、図4〜図7を用いて後述する。
また、電圧AD変換処理、電流AD変換処理、温度AD変換処理の順番は特に限定されない。
The self-diagnosis processing in step S301 will be described later with reference to FIGS.
Further, the order of the voltage AD conversion processing, the current AD conversion processing, and the temperature AD conversion processing is not particularly limited.
また、上位制御部6は、電圧、電流、温度の3種類のAD変換命令を出力しているが、電圧、電流、温度のうち1種類、または2種類のAD変換命令を出力してもよいし、4種類以上のAD変換命令を出力してもよい。なお、複数種類のAD変換処理がある場合は、複数のAD変換処理は各々が異なる処理である。 The upper control unit 6 outputs three types of A / D conversion commands of voltage, current and temperature, but may output one or two types of A / D conversion commands among voltage, current and temperature. Alternatively, four or more types of AD conversion instructions may be output. When there are a plurality of types of AD conversion processes, each of the plurality of AD conversion processes is a different process.
また、AD変換器5と上位制御部6は、自己診断処理(自己診断命令の出力及びAD変換器5の正常/異常判断)とAD変換処理(AD変換命令の出力)とを順に繰り返し実施しているが、複数の自己診断処理の後に1または複数のAD変換処理を実施することを繰り返してもよく、1つの自己診断処理の後に複数のAD変換処理を実施することを繰り返してもよい。
Further, the
ここで、自己診断用1ビットパルスデータSv1、Sv2のうちの自己診断用1ビットパルスデータSv1のAD変換後のデジタルデータがデジタルデータDv1と一致しない場合で、かつ、自己診断用1ビットパルスデータSv2のAD変換後のデジタルデータがデジタルデータDv2と一致する場合で、かつ、デジタルデータ同士が一致しないことが2以上連続すると、AD変換器5が異常であると判断される場合を想定する。
Here, the digital data after the AD conversion of the self-diagnosis 1-bit pulse data Sv1 of the self-diagnosis 1-bit pulse data Sv1 and Sv2 does not match the digital data Dv1, and It is assumed that the digital data after Sv2 AD conversion matches the digital data Dv2, and that when the digital data does not match two or more consecutive times, the
このような場合では、自己診断用1ビットパルスデータSv1においてデジタルデータ同士が一致しなかった後、自己診断用1ビットパルスデータSv2においてデジタルデータ同士が一致し、デジタルデータ同士が一致しないことが2以上連続しないため、自己診断用1ビットパルスデータSv1についてAD変換器5が異常であるにもかかわらず、AD変換器5が異常でないと判断されてしまう。
In such a case, after the digital data do not match in the self-diagnosis 1-bit pulse data Sv1, the digital data in the self-diagnosis 1-bit pulse data Sv2 match and the digital data do not match. Since the continuation is not continuous, it is determined that the
そこで、本実施形態の上位制御部6では、自己診断用1ビットパルスデータSv1についてAD変換器5が異常であるにもかかわらず、AD変換器5が異常でないと判断されてしまうことを抑制するために、自己診断用1ビットパルスデータSvnの種類(自己診断用1ビットパルスデータSv1、Sv2)毎に、デジタルデータ同士が一致しなかった回数をカウントするためのカウンタ値NGnを用いて、AD変換器5が異常であるか否かを判断する。後述する実施例1、2は、カウンタ値NGnを用いたAD変換器5の異常判断方法のバリエーションを示すものである。
Therefore, the higher-level control unit 6 of the present embodiment suppresses the determination that the
<実施例1>
図4は、実施例1における電圧用自己診断処理を実施するときの上位制御部6の動作を示すフローチャートである。なお、実施例1における電流用自己診断処理や温度用自己診断処理を実施するときの上位制御部6の動作は、実施例1における電圧用自己診断処理を実施するときの上位制御部6の動作と同様であるため、その説明を省略する。上述したように、nは、自己診断用1ビットパルスデータSvnの種類数を示し、nが「1」であるとき、電圧用自己診断命令Cvnが電圧用自己診断命令Cv1に、自己診断用1ビットパルスデータSvnが自己診断用1ビットパルスデータSv1に、デジタルデータDvnがデジタルデータDv1に、カウンタ値OKnがカウンタ値OK1に、カウンタ値NGnがカウンタ値NG1に、閾値OKnthが閾値OK1thに、閾値NGnthが閾値NG1thにそれぞれ対応する。また、nが「2」であるとき、電圧用自己診断命令Cvnが電圧用自己診断命令Cv2に、自己診断用1ビットパルスデータSvnが自己診断用1ビットパルスデータSv2に、デジタルデータDvnがデジタルデータDv2に、カウンタ値OKnがカウンタ値OK2に、カウンタ値NGnがカウンタ値NG2に、閾値OKnthが閾値OK2thに、閾値NGnthが閾値NG2thにそれぞれ対応する。また、カウンタ値OKnは、自己診断用1ビットパルスデータSvnのAD変換後のデジタルデータとデジタルデータDvnとが互いに一致した回数を示し、カウンタ値NGnは、自己診断用1ビットパルスデータSvnのAD変換後のデジタルデータとデジタルデータDvnとが互いに一致しなかった回数を示し、それぞれの初期値を「0」とする。
<Example 1>
FIG. 4 is a flowchart illustrating the operation of the upper control unit 6 when performing the voltage self-diagnosis processing according to the first embodiment. The operation of the higher-level control unit 6 when performing the current self-diagnosis processing and the temperature self-diagnosis processing in the first embodiment is the same as the operation of the higher-level control unit 6 when performing the voltage self-diagnosis processing in the first embodiment. The description is omitted here. As described above, n indicates the number of types of 1-bit pulse data Svn for self-diagnosis. When n is “1”, the voltage self-diagnosis instruction Cvn is replaced with the voltage self-diagnosis instruction Cv1 and the self-
まず、上位制御部6は、電圧用自己診断命令CvnをAD変換器5に出力する(ステップS401)。 First, the upper control unit 6 outputs the voltage self-diagnosis command Cvn to the AD converter 5 (step S401).
次に、上位制御部6は、自己診断用1ビットパルスデータSvnのAD変換後のデジタルデータが、デジタルデータDvnと一致しないと、すなわち、自己診断用1ビットパルスデータSvnがデジタルデータDnに正しく変換されていない場合(ステップS402:No)、カウンタ値NGnをインクリメント(+1)するとともに(ステップS403)、カウンタ値OKnをゼロにする(ステップS404)。 Next, the higher-level control unit 6 determines that the digital data of the self-diagnosis 1-bit pulse data Svn after AD conversion does not match the digital data Dvn, that is, the self-diagnosis 1-bit pulse data Svn is correctly converted to the digital data Dn. If not converted (Step S402: No), the counter value NGn is incremented (+1) (Step S403), and the counter value OKn is set to zero (Step S404).
次に、上位制御部6は、全ての種類の自己診断用1ビットパルスデータSvnにそれぞれ対応するカウンタ値NGnのうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上でないと判断した場合(ステップS405:No)、電圧用自己診断処理を終了する。なお、閾値NGnthは2以上とする。このように、閾値NGnthを2以上とすることにより、閾値NGnthを1とする場合に比べて、実際にはAD変換器5が正常であるにもかかわらず、自己診断用1ビットパルスデータに含まれるノイズの影響によりAD変換器5が異常であると誤って判断されることを低減することができ、AD変換器5の異常判断精度を高めることができる。
Next, when the higher-level control unit 6 determines that at least one of the counter values NGn corresponding to all types of 1-bit pulse data for self-diagnosis Svn is not greater than or equal to the threshold value NGnth (step S405: No), the voltage self-diagnosis processing ends. Note that the threshold value NGnth is set to 2 or more. As described above, by setting the threshold value NGnth to 2 or more, it is included in the self-diagnosis 1-bit pulse data even though the
一方、上位制御部6は、全ての種類の自己診断用1ビットパルスデータSvnにそれぞれ対応するカウンタ値NGnのうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上であると判断した場合(ステップS405:Yes)、AD変換器5が異常であると判断し(ステップS406)、自己診断処理を終了する。このように、自己診断用1ビットパルスデータSvnの種類毎に、カウンタ値NGnを用意しているため、自己診断用1ビットパルスデータSvnの種類毎に、AD変換器5が異常であるか否かを判断することが可能になる。
On the other hand, when the higher-level control unit 6 determines that at least one of the counter values NGn corresponding to all types of self-diagnosis 1-bit pulse data Svn is equal to or larger than the threshold value NGnth (step S405: Yes), it is determined that the
また、上位制御部6は、自己診断用1ビットパルスデータSvnのAD変換後のデジタルデータが、デジタルデータDvnと一致すると、すなわち、自己診断用1ビットパルスデータSvnがデジタルデータDvnに正しく変換されている場合(ステップS402:Yes)、カウンタ値OKnをインクリメント(+1)するとともに(ステップS407)、カウンタ値NGnをゼロにする(ステップS408)。 Also, when the digital data after the AD conversion of the self-diagnosis 1-bit pulse data Svn matches the digital data Dvn, that is, the higher-level control unit 6 correctly converts the self-diagnosis 1-bit pulse data Svn into the digital data Dvn. If (Yes at Step S402), the counter value OKn is incremented (+1) (Step S407), and the counter value NGn is set to zero (Step S408).
次に、上位制御部6は、全ての種類の自己診断用1ビットパルスデータSvnにそれぞれ対応するカウンタ値OKnが閾値OKnth以上でないと判断した場合(ステップS409:No)、ステップS411に進む。 Next, when the higher-level control unit 6 determines that the counter values OKn respectively corresponding to all types of 1-bit pulse data for self-diagnosis Svn are not equal to or larger than the threshold value OKnth (step S409: No), the process proceeds to step S411.
一方、上位制御部6は、全ての種類の自己診断用1ビットパルスデータSvnにそれぞれ対応するカウンタ値OKnが閾値OKnth以上であると判断した場合(ステップS409:Yes)、AD変換器5が正常であると判断し(ステップS410)、nをインクリメント(+1)し(ステップS411)、ステップS412に進む。
On the other hand, if the higher-level control unit 6 determines that the counter values OKn respectively corresponding to all types of 1-bit pulse data Svn for self-diagnosis are equal to or larger than the threshold value OKnth (step S409: Yes), the
次に、ステップS412において、上位制御部6は、nが閾値nthより大きいか否かを判断する。 Next, in step S412, the higher-level control unit 6 determines whether or not n is greater than a threshold value nth.
上位制御部6は、nが閾値nthより大きくない判断すると(ステップS412:No)、自己診断処理を終了し、nが閾値nthより大きいと判断すると(ステップS4121Yes)、nを「1」にし(ステップS413)、自己診断処理を終了する。 When determining that n is not larger than the threshold value nth (Step S412: No), the higher-level control unit 6 ends the self-diagnosis process, and when determining that n is larger than the threshold value nth (Step S4121 Yes), sets n to “1” (Step S4121). Step S413), the self-diagnosis processing ends.
ここで、自己診断用1ビットパルスデータSv1についてのみAD変換器5が異常になる場合における実施例1の上位制御部6の動作について説明する。なお、電圧用自己診断処理、電流用自己診断処理、温度用自己診断処理で各々のnを使用し、各々のnの初期値は「1」とする。また、閾値nthは、自己診断用1ビットパルスデータの種類数と同じ値とし、「2」とする。また、カウンタ値OK1、カウンタ値NG1、カウンタ値OK2、及びカウンタ値NG2は、それぞれ初期値として「0」とする。また、閾値OK1th、OK2thは、互いに同じ値でもよいし、互いに異なる値でもよく、実施例1ではそれぞれ「1」とする。また、閾値NG1th、NG2thは、互いに同じ値でもよいし、互いに異なる値でもよく、実施例1ではそれぞれ「2」とする。また、以下の説明では、図2または図3において繰り返し実施される自己診断処理とAD変換処理のうち、自己診断処理のみを取り出して説明する。
Here, the operation of the upper-level control unit 6 of the first embodiment when the
<1回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv1(第1の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないと(ステップS402:No)、カウンタ値NG1をインクリメント(+1)することで「0」から「1」にし(ステップS403)、カウンタ値OK1を「0」にする(ステップS404)。
<First voltage self-diagnosis process>
First, the upper control unit 6 outputs the voltage self-diagnosis command Cv1 (first self-diagnosis command) to the AD converter 5 (step S401), and outputs the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data). If the digital data after A / D conversion does not match the digital data Dv1 (first digital data) (step S402: No), the counter value NG1 is incremented (+1) from "0" to "1". (Step S403), the counter value OK1 is set to “0” (Step S404).
次に、閾値NG1th(第1の閾値)及び閾値NG2th(第2の閾値)が「2」であり、カウンタ値NG1が「1」であり、カウンタ値NG2が「0」であるため、上位制御部6は、カウンタ値NG1が閾値NG1th以上ではなく、カウンタ値NG2が閾値NG2th以上ではないと判断し、すなわち、自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上でないと判断し(ステップS405:No)、1回目の電圧用自己診断処理を終了する。 Next, since the threshold value NG1th (first threshold value) and the threshold value NG2th (second threshold value) are “2”, the counter value NG1 is “1”, and the counter value NG2 is “0”, The unit 6 determines that the counter value NG1 is not equal to or larger than the threshold value NG1th and the counter value NG2 is not equal to or larger than the threshold value NG2th, that is, of the counter values NG1 and NG2 corresponding to the self-diagnosis 1-bit pulse data Sv1 and Sv2, respectively. It is determined that at least one of the counter values NGn is not greater than or equal to the threshold value NGnth (step S405: No), and the first voltage self-diagnosis processing ends.
なお、nが「1」であるため、2回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv1が再度出力される。 Since n is “1”, the voltage self-diagnosis command Cv1 is output again from the upper control unit 6 in the second voltage self-diagnosis processing.
<2回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv1をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv1のAD変換後のデジタルデータが、デジタルデータDv1と一致しないと(ステップS402:No)、カウンタ値NG1をインクリメント(+1)することで「1」から「2」にし(ステップS403)、カウンタ値OK1を「0」にする(ステップS404)。
<Second voltage self-diagnosis process>
First, the higher-level control unit 6 outputs the voltage self-diagnosis command Cv1 to the AD converter 5 (step S401), and the digital data after the AD conversion of the self-diagnosis 1-bit pulse data Sv1 does not match the digital data Dv1. (Step S402: No), the counter value NG1 is incremented (+1) from "1" to "2" (Step S403), and the counter value OK1 is set to "0" (Step S404).
次に、閾値NG1th、NG2thが「2」であり、カウンタ値NG1が「2」であり、カウンタ値NG2が「0」であるため、上位制御部6は、カウンタ値NG1が閾値NG1th以上であり、カウンタ値NG2が閾値NG2th以上でないと判断し、すなわち、自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上であると判断し(ステップS405:Yes)、AD変換器5が異常であると判断し(ステップS406)、2回目の電圧用自己診断処理を終了する。
Next, since the threshold values NG1th and NG2th are “2”, the counter value NG1 is “2”, and the counter value NG2 is “0”, the upper control unit 6 determines that the counter value NG1 is equal to or larger than the threshold value NG1th. It is determined that the counter value NG2 is not equal to or greater than the threshold value NG2th, that is, at least one of the counter values NG1 and NG2 corresponding to the self-diagnosis 1-bit pulse data Sv1 and Sv2 is equal to or greater than the threshold value NGnth. Judgment is made (Step S405: Yes), and it is judged that the
なお、nが「1」であるため、3回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv1が出力される。 Since n is “1”, the voltage self-diagnosis command Cv1 is output from the upper control unit 6 in the third voltage self-diagnosis processing.
また、AD変換器5の異常とは、切替スイッチ10、デジタルフィルタ11、及び記憶部12の少なくとも1つが正常に動作しない状態とする。
The abnormality of the
また、上位制御部6は、自己診断結果(AD変換器5が異常であるか否かの判断結果)に応じて、自己診断後のAD変換により取得されるデジタルデータを使用するか否かを判断するように構成してもよい。
Further, the higher-level control unit 6 determines whether to use the digital data obtained by the AD conversion after the self-diagnosis according to the self-diagnosis result (the determination result as to whether or not the
このように、上位制御部6は、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータ、デジタルデータDv1(第1のデジタルデータ)と一致しないことが閾値NG1th(第1の閾値)以上連続した場合、自己診断用1ビットパルスデータSv1についてAD変換器5が異常であると判断する。すなわち、上位制御部6は、電圧に関してAD変換器5の異常があると判断する。
As described above, the upper-level control unit 6 determines that the 1-bit pulse data Sv1 for self-diagnosis (first self-diagnosis data) does not match the digital data after the AD conversion and the digital data Dv1 (first digital data). If NG1th (first threshold value) or more continues, it is determined that the
次に、自己診断用1ビットパルスデータSv1についてAD変換器5が異常から正常に復帰した場合における実施例1の上位制御部6の動作について説明する。なお、nカウンタの初期値は「1」とし、カウンタ値OK1は「0」とし、カウンタ値NG1は「2」とし、カウンタ値OK2は「0」とし、カウンタ値NG2は「0」とする。
Next, the operation of the higher-level control unit 6 of the first embodiment when the A /
<k(≧3)回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv1(第1の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致すると(ステップS402:Yes)、カウンタ値OK1をインクリメント(+1)することで「0」から「1」にし(ステップS407)、カウンタ値NG1を「2」から「0」にする(ステップS408)。
<K (≧ 3) th voltage self-diagnosis processing>
First, the upper control unit 6 outputs the voltage self-diagnosis command Cv1 (first self-diagnosis command) to the AD converter 5 (step S401), and outputs the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data). If the digital data after the AD conversion of ()) matches the digital data Dv1 (first digital data) (step S402: Yes), the counter value OK1 is incremented (+1) from “0” to “1” ( In step S407, the counter value NG1 is changed from "2" to "0" (step S408).
次に、閾値OK1th(第5の閾値)及び閾値OK2th(第6の閾値)が「1」であり、カウンタ値OK1が「1」であり、カウンタ値OK2が「0」であるため、上位制御部6は、カウンタ値OK1が閾値OK1th以上であり、カウンタ値OK2が閾値OK2th以上でないと判断し、すなわち、全ての種類の自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値OKnが閾値OKnth以上でないと判断し(ステップS409:No)、電圧用自己診断処理に対応するnをインクリメント(+1)することで「1」から「2」にする(ステップS411)。 Next, the threshold OK1th (fifth threshold) and the threshold OK2th (sixth threshold) are “1”, the counter value OK1 is “1”, and the counter value OK2 is “0”. The unit 6 determines that the counter value OK1 is equal to or greater than the threshold value OK1th and the counter value OK2 is not equal to or greater than the threshold value OK2th. That is, the counter values OKn respectively corresponding to all types of self-diagnosis 1-bit pulse data Sv1 and Sv2 are determined. It is determined that it is not equal to or greater than the threshold OKnth (step S409: No), and n corresponding to the voltage self-diagnosis processing is incremented (+1) to change from "1" to "2" (step S411).
次に、閾値nthが「2」であり、nが「2」であるため、上位制御部6は、nが閾値nthより大きくないと判断し(ステップS412:No)、k回目の電圧用自己診断処理を終了する。 Next, since the threshold value nth is “2” and n is “2”, the upper-level control unit 6 determines that n is not larger than the threshold value nth (step S412: No), The diagnostic processing ends.
なお、nが「2」であるため、k+1回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv2が出力される。 Since n is “2”, the voltage self-diagnosis command Cv2 is output from the upper control unit 6 in the (k + 1) th voltage self-diagnosis processing.
<k+1回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv2(第2の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致すると(ステップS402:Yes)、カウンタ値OK2をインクリメント(+1)することで「0」から「1」にし(ステップS407)、NGカウンタ値NG2を「0」にする(ステップS408)。なお、デジタルデータDv2(第2のデジタルデータ)はデジタルデータDv1(第1のデジタルデータ)とは異なる値である。また、上位制御部6は、デジタルデータDv1、Dv2を自身で保持してもよいし、記憶部13に記憶してもよい。
<K + 1-th voltage self-diagnosis process>
First, the higher-level control unit 6 outputs a voltage self-diagnosis command Cv2 (second self-diagnosis command) to the AD converter 5 (step S401), and outputs 1-bit pulse data Sv2 for self-diagnosis (second self-diagnosis data). If the digital data after the AD conversion of ()) matches the digital data Dv2 (second digital data) (step S402: Yes), the counter value OK2 is incremented (+1) to “1” from “0” ( In step S407, the NG counter value NG2 is set to "0" (step S408). The digital data Dv2 (second digital data) has a different value from the digital data Dv1 (first digital data). The higher-level control unit 6 may hold the digital data Dv1 and Dv2 by itself or may store the digital data Dv1 and Dv2 in the storage unit 13.
次に、閾値OK1th(第5の閾値)及び閾値OK2th(第6の閾値)が「1」であり、カウンタ値OK1が「1」であり、カウンタ値OK2が「1」であるため、上位制御部6は、カウンタ値OK1が閾値OK1th以上であり、カウンタ値OK2が閾値OK2th以上であると判断し、すなわち、全ての種類の自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値OKnが閾値OKnth以上であると判断し(ステップS409:Yes)、AD変換器5が正常であると判断する(ステップS410)。すなわち、上位制御部6は、電圧に関してAD変換器5が正常である、言い換えると、電圧用自己診断処理に対してAD変換器5が異常状態から正常状態へ復帰したと判断する。なお、AD変換器5の正常とは、切替スイッチ10、デジタルフィルタ11、及び記憶部12の全てが正常に動作する状態とする。
Next, the threshold value OK1th (fifth threshold value) and the threshold value OK2th (sixth threshold value) are “1”, the counter value OK1 is “1”, and the counter value OK2 is “1”. The unit 6 determines that the counter value OK1 is equal to or larger than the threshold value OK1th and the counter value OK2 is equal to or larger than the threshold value OK2th, that is, the counter values OKn respectively corresponding to all types of the self-diagnosis 1-bit pulse data Sv1 and Sv2. Is greater than or equal to the threshold OKnth (step S409: Yes), and it is determined that the
次に、上位制御部6は、電圧用自己診断処理におけるnをインクリメント(+1)することで「2」から「3」にする(ステップS411)。 Next, the higher-level control unit 6 increments (+1) n in the voltage self-diagnosis process from “2” to “3” (step S411).
次に、閾値nthが「2」であり、nが「3」であるため、上位制御部6は、電圧用自己診断処理におけるnが閾値nthより大きいと判断し(ステップS412:Yes)、電圧用自己診断処理におけるnを「3」から「1」にし(ステップS409)、k+1回目の電圧用自己診断処理を終了する。 Next, since the threshold value nth is “2” and n is “3”, the higher-level control unit 6 determines that n in the voltage self-diagnosis process is larger than the threshold value nth (step S412: Yes), and In the power self-diagnosis processing, n is changed from "3" to "1" (step S409), and the (k + 1) th voltage self-diagnosis processing ends.
なお、nが「1」であるため、k+2回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv1が出力される。 Since n is “1”, the voltage self-diagnosis command Cv1 is output from the upper control unit 6 in the (k + 2) th voltage self-diagnosis processing.
このように、上位制御部6は、AD変換器5が異常であると判断した後、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致することが閾値NG1th以上連続し、かつ、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致することが閾値OK2th以上連続した場合、異常であったAD変換器5が正常に戻ったことを認識することができる。
As described above, after determining that the
なお、閾値OK1th(第5の閾値)及び閾値OK2th(第6の閾値)は「1」であったが、共に2以上であれば正常判定をより正確に行うことができる。 Although the threshold value OK1th (fifth threshold value) and the threshold value OK2th (sixth threshold value) are “1”, if both are 2 or more, the normality determination can be performed more accurately.
<実施例1の変形例>
図5は、実施例1の変形例における電圧用自己診断処理を実行するときの上位制御部6の動作を示すフローチャートである。なお、実施例1の変形例における電流用自己診断処理や温度用自己診断処理を実施するときの上位制御部6の動作は、実施例1の変形例における電圧用自己診断処理を実施するときの上位制御部6の動作と同様であるため、その説明を省略する。
<Modification of First Embodiment>
FIG. 5 is a flowchart illustrating the operation of the higher-level control unit 6 when performing the voltage self-diagnosis process according to the modification of the first embodiment. Note that the operation of the higher-level control unit 6 when performing the current self-diagnosis processing and the temperature self-diagnosis processing in the modification of the first embodiment is the same as that performed when performing the voltage self-diagnosis processing in the modification of the first embodiment. Since the operation is the same as that of the upper control unit 6, the description thereof is omitted.
図5に示すフローチャートにおいて、図4に示すフローチャートと異なる点は、上位制御部6が、カウンタ値OKnの合計値が閾値OKth(第7の閾値)以上でないと判断すると(ステップS409´:No)、ステップS11において、nをインクリメント(+1)し、カウンタ値OKnの合計値が閾値OKth以上であると判断すると(ステップS409´:Yes)、ステップS410において、AD変換器5が正常であると判断する点である。なお、閾値OKthは、自己診断用1ビットパルスデータの種類数であるn以上であるが、(n×2)以上であれば正常判定をより正確に行うことができる。
The flowchart shown in FIG. 5 differs from the flowchart shown in FIG. 4 in that the higher-level control unit 6 determines that the total value of the counter values OKn is not greater than or equal to a threshold OKth (seventh threshold) (step S409 ′: No). In step S11, n is incremented (+1), and when it is determined that the total value of the counter values OKn is equal to or larger than the threshold value OKth (step S409 ′: Yes), it is determined in step S410 that the
一例として、閾値NG1thが「2」である場合において、カウンタ値NG1が「2」になると、上位制御部6は、カウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上であると判断し(ステップS405:Yes)、AD変換器5が異常であると判断する。
As an example, when the threshold value NG1th is “2” and the counter value NG1 becomes “2”, the upper control unit 6 determines that at least one of the counter values NG1 and NG2 is equal to or larger than the threshold value NGnth. (Step S405: Yes), it is determined that the
次に、閾値OKthが「2」である場合において、カウンタ値OK1が「1」になり、カウンタ値OK2が「1」になると、上位制御部6は、カウンタ値OK1とカウンタ値OK2の合計値が閾値OKth以上であると判断し(ステップS409´:Yes)、AD変換器5が正常であると判断する(ステップS410)。
Next, in the case where the threshold value OKth is “2”, when the counter value OK1 becomes “1” and the counter value OK2 becomes “1”, the higher-level control unit 6 sets the total value of the counter value OK1 and the counter value OK2. Is greater than or equal to the threshold OKth (step S409 ′: Yes), and it is determined that the
このように、実施例1の変形例における上位制御部6は、AD変換器5が異常であると判断した後、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータがデジタルデータDv1(第1のデジタルデータ)と一致することと、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータがデジタルデータDv2(第2のデジタルデータ)と一致することの合計値が閾値OKth(第7の閾値)以上連続した場合、AD変換器5が正常であると判断する。
As described above, after determining that the
すなわち、実施例1や実施例1の変形例において、上位制御部6は、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致する場合、自己診断命令Cv2(第2の自己診断命令)を出力し、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致する場合、自己診断命令Cv1(第1の自己診断命令)を出力し、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しない場合、再度、自己診断命令Cv1(第1の自己診断命令)を出力し、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致しない場合、再度、自己診断命令Cv2(第2の自己診断命令)を出力する。 That is, in the first embodiment and the modification of the first embodiment, the higher-level control unit 6 converts the digital data after the AD conversion of the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data) into the digital data Dv1 (first self-diagnosis data). In the case of coincidence with the first digital data, the self-diagnosis instruction Cv2 (second self-diagnosis instruction) is output, and the digital data of the 1-bit pulse data for self-diagnosis Sv2 (second self-diagnosis data) after AD conversion is converted. , And the digital data Dv2 (second digital data), the self-diagnosis command Cv1 (first self-diagnosis command) is output, and the AD of the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data) is output. When the converted digital data does not match the digital data Dv1 (first digital data), the self-diagnosis instruction Cv1 (first self-diagnosis instruction) is again performed. When the output digital data of the self-diagnosis 1-bit pulse data Sv2 (second self-diagnosis data) does not match the digital data Dv2 (second digital data), the self-diagnosis instruction Cv2 ( (A second self-diagnosis instruction).
また、実施例1や実施例1の変形例において、上位制御部6は、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないことが閾値NG1th(第1の閾値)以上連続した場合、または、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致しないことが閾値NG2th(第2の閾値)以上連続した場合、AD変換器5が異常であると判断する。これにより、AD変換器5に入力される自己診断データの種類(自己診断用1ビットパルスデータSv1、Sv2)毎に、AD変換器5が異常であるか否かを判断することができる。
In the first embodiment and the modification of the first embodiment, the higher-level control unit 6 converts the digital data after the AD conversion of the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data) into the digital data Dv1 (first self-diagnosis data). If the digital data after the A / D conversion of the 1-bit pulse data Sv2 (second self-diagnosis data) for self-diagnosis is equal to or more than the threshold NG1th (first threshold) or not, When the non-coincidence with the digital data Dv2 (second digital data) continues for the threshold NG2th (second threshold) or more, it is determined that the
また、実施例1の変形例は、実施例1に比べて、AD変換器5が正常であるか否かを判断するための閾値OKnthの種類を削減することができるため、閾値OKnthを記憶させるための上位制御部6の内部の記憶領域または記憶部13の記憶領域を削減することができる。
Further, in the modified example of the first embodiment, the type of the threshold OKnth for determining whether the
<実施例2>
図6は、実施例2における電圧用自己診断処理を実行するときの上位制御部6の動作を示すフローチャートである。なお、実施例2における電流用自己診断処理や温度用自己診断処理を実施するときの上位制御部6の動作は、実施例2における電圧用自己診断処理を実施するときの上位制御部6の動作と同様であるため、その説明を省略する。
<Example 2>
FIG. 6 is a flowchart illustrating the operation of the upper control unit 6 when performing the voltage self-diagnosis processing according to the second embodiment. The operation of the higher-level control unit 6 when performing the current self-diagnosis processing and the temperature self-diagnosis processing in the second embodiment is the same as the operation of the higher-level control unit 6 when performing the voltage self-diagnosis processing in the second embodiment. The description is omitted here.
図6に示すフローチャートにおいて、図4に示すフローチャートと異なる点は、上位制御部6が、自己診断用1ビットパルスデータSvnがデジタルデータDvnに正しく変換されていない場合(ステップS402:No)、その後、すぐに電圧用自己診断処理を終了せず、ステップS411に進み、nをインクリメント(+1)する点である。すなわち、実施例2では、自己診断用1ビットパルスデータSvnがデジタルデータDvnに正しく変換されているか否かにかかわず、自己診断用1ビットパルスデータSv1、Sv2が交互に出力される。なお、図6に示すフローチャートの他の動作は、図4に示すフローチャートの動作と同様であるため、その説明を省略する。 The flowchart shown in FIG. 6 differs from the flowchart shown in FIG. 4 in that the higher-level control unit 6 determines that the 1-bit pulse data Svn for self-diagnosis is not correctly converted into the digital data Dvn (step S402: No). , The voltage self-diagnosis process is not immediately terminated, and the process proceeds to step S411, where n is incremented (+1). That is, in the second embodiment, the self-diagnosis 1-bit pulse data Sv1 and Sv2 are output alternately regardless of whether or not the self-diagnosis 1-bit pulse data Svn is correctly converted into the digital data Dvn. The other operations in the flowchart shown in FIG. 6 are the same as those in the flowchart shown in FIG.
ここで、自己診断用1ビットパルスデータSv1についてのみAD変換器5が異常になる場合における実施例2の上位制御部6の動作について説明する。なお、nカウンタの初期値は「1」とし、閾値nthは「2」とする。また、カウンタ値OK1、カウンタ値NG1、カウンタ値OK2、及びカウンタ値NG2はそれぞれ「0」とする。また、閾値NG1th及び閾値NG2thはそれぞれ「2」とし、閾値OK1th及び閾値OK2thはそれぞれ「1」とする。
Here, the operation of the higher-level control unit 6 of the second embodiment when the
<1回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv1(第1の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないと(ステップS402:No)、カウンタ値NG1をインクリメント(+1)することで「0」から「1」にし(ステップS403)、カウンタ値OK1を「0」にする(ステップS404)。
<First voltage self-diagnosis process>
First, the upper control unit 6 outputs the voltage self-diagnosis command Cv1 (first self-diagnosis command) to the AD converter 5 (step S401), and outputs the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data). If the digital data after A / D conversion does not match the digital data Dv1 (first digital data) (step S402: No), the counter value NG1 is incremented (+1) from "0" to "1". (Step S403), the counter value OK1 is set to “0” (Step S404).
次に、閾値NG1th(第3の閾値)及び閾値NG2th(第4の閾値)が「2」であり、カウンタ値NG1が「1」であり、カウンタ値NG2が「0」であるため、上位制御部6は、カウンタ値NG1が閾値NG1thth以上ではなく、カウンタ値NG2が閾値NG2th以上ではないと判断し、すなわち、自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上でないと判断し(ステップS405:No)、電圧用自己診断処理に対応するnをインクリメント(+1)することで「1」から「2」にする(ステップS411)。 Next, since the threshold value NG1th (third threshold value) and the threshold value NG2th (fourth threshold value) are “2”, the counter value NG1 is “1”, and the counter value NG2 is “0”, The unit 6 determines that the counter value NG1 is not greater than or equal to the threshold value NG1thth and that the counter value NG2 is not greater than or equal to the threshold value NG2th. That is, of the counter values NG1 and NG2 corresponding to the self-diagnosis 1-bit pulse data Sv1 and Sv2, respectively. It is determined that at least one of the counter values NGn is not greater than or equal to the threshold value NGnth (step S405: No), and n corresponding to the voltage self-diagnosis processing is incremented (+1) to change from “1” to “2” (step S405). S411).
次に、閾値nthが「2」であり、nが「2」であるため、上位制御部6は、nが閾値nthより大きくないと判断し(ステップS412:No)、1回目の電圧用自己診断処理を終了する。 Next, since the threshold value nth is “2” and n is “2”, the upper-level control unit 6 determines that n is not larger than the threshold value nth (Step S412: No). The diagnostic processing ends.
なお、nが「2」であるため、2回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv2が出力される。 Since n is “2”, the voltage self-diagnosis command Cv2 is output from the upper control unit 6 in the second voltage self-diagnosis processing.
<2回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv2(第2の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致すると(ステップS402:Yes)、カウンタ値OK2をインクリメント(+1)することで「0」から「1」にし(ステップS407)、カウンタ値NG2を「0」にする(ステップS408)。
<Second voltage self-diagnosis process>
First, the higher-level control unit 6 outputs a voltage self-diagnosis command Cv2 (second self-diagnosis command) to the AD converter 5 (step S401), and outputs 1-bit pulse data Sv2 for self-diagnosis (second self-diagnosis data). If the digital data after the AD conversion of ()) matches the digital data Dv2 (second digital data) (step S402: Yes), the counter value OK2 is incremented (+1) to “1” from “0” ( In step S407, the counter value NG2 is set to "0" (step S408).
次に、閾値OK1th及び閾値OK2thが「1」であり、カウンタ値OK1が「0」であり、カウンタ値OK2が「1」であるため、上位制御部6は、カウンタ値OK1が閾値OK1th以上でなく、カウンタ値OK2が閾値OK2th以上であると判断し、すなわち、全ての種類の自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値OKnが閾値OKnth以上でないと判断し(ステップS409:No)、電圧用自己診断処理に対応するnをインクリメント(+1)することで「2」から「3」にする(ステップS411)。 Next, since the threshold value OK1th and the threshold value OK2th are “1”, the counter value OK1 is “0”, and the counter value OK2 is “1”, the upper-level control unit 6 determines that the counter value OK1 is greater than or equal to the threshold value OK1th. No, it is determined that the counter value OK2 is equal to or greater than the threshold value OK2th, that is, it is determined that the counter values OKn corresponding to all types of 1-bit pulse data Sv1 and Sv2 for self-diagnosis are not equal to or greater than the threshold value OKnth (step S409: No), n corresponding to the voltage self-diagnosis process is incremented (+1) to change from "2" to "3" (step S411).
次に、閾値nthが「2」であり、nが「3」であるため、上位制御部6は、nが閾値nthより大きいと判断し(ステップS412:Yes)、nを「3」から「1」にし(ステップS413)、2回目の電圧用自己診断処理を終了する。 Next, since the threshold value nth is “2” and n is “3”, the upper-level control unit 6 determines that n is larger than the threshold value nth (step S412: Yes), and changes n from “3” to “3”. 1 "(step S413), and the second voltage self-diagnosis processing ends.
なお、nが「1」であるため、3回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv1が出力される。 Since n is “1”, the voltage self-diagnosis command Cv1 is output from the upper control unit 6 in the third voltage self-diagnosis processing.
<3回目の電圧用自己診断処理>
まず、上位制御部6は、電圧用自己診断命令Cv1(第1の自己診断命令)をAD変換器5に出力し(ステップS401)、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないと(ステップS402:No)、カウンタ値NG1をインクリメント(+1)することで「1」から「2」にし(ステップS403)、カウンタ値OK1を「0」にする(ステップS404)。
<Third voltage self-diagnosis process>
First, the upper control unit 6 outputs the voltage self-diagnosis command Cv1 (first self-diagnosis command) to the AD converter 5 (step S401), and outputs the self-diagnosis 1-bit pulse data Sv1 (first self-diagnosis data). If the digital data after A / D conversion does not match the digital data Dv1 (first digital data) (step S402: No), the counter value NG1 is incremented (+1) to “2” from “1”. (Step S403), the counter value OK1 is set to “0” (Step S404).
次に、閾値NG1th(第3の閾値)及び閾値NG2th(第4の閾値)が「2」であり、カウンタ値NG1が「2」であり、カウンタ値NG2が「0」であるため、上位制御部6は、カウンタ値NG1が閾値NG1thth以上であり、カウンタ値NG2が閾値NG2th以上ではないと判断し、すなわち、自己診断用1ビットパルスデータSv1、Sv2にそれぞれ対応するカウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上であると判断し(ステップS405:Yes)、AD変換器5が異常であると判断する(ステップS406)。
Next, since the threshold value NG1th (third threshold value) and the threshold value NG2th (fourth threshold value) are “2”, the counter value NG1 is “2”, and the counter value NG2 is “0”, The unit 6 determines that the counter value NG1 is equal to or greater than the threshold value NG1thth and the counter value NG2 is not equal to or greater than the threshold value NG2th, that is, the counter value NG1 or NG2 corresponding to the self-diagnosis 1-bit pulse data Sv1 or Sv2, respectively. Is determined to be greater than or equal to the threshold value NGnth (step S405: Yes), and the
次に、上位制御部6は、電圧用自己診断処理におけるnをインクリメント(+1)することで「1」から「2」にする(ステップS411)。 Next, the higher-level control unit 6 increments (+1) n in the voltage self-diagnosis processing from “1” to “2” (step S411).
次に、閾値nthが「2」であり、nが「2」であるため、上位制御部6は、nが閾値nthより大きくないと判断し(ステップS412:No)、3回目の電圧用自己診断処理を終了する。 Next, since the threshold value nth is “2” and n is “2”, the upper-level control unit 6 determines that n is not larger than the threshold value nth (Step S412: No), The diagnostic processing ends.
なお、nが「2」であるため、4回目の電圧用自己診断処理では、上位制御部6から電圧用自己診断命令Cv2が出力される。 Since n is “2”, the voltage self-diagnosis command Cv2 is output from the upper control unit 6 in the fourth voltage self-diagnosis processing.
また、上位制御部6は、自己診断結果(AD変換器5が異常であるか否かの判断結果)に応じて、自己診断後のAD変換により取得されるデジタルデータを使用するか否かを判断するように構成してもよい。
Further, the higher-level control unit 6 determines whether to use the digital data obtained by the AD conversion after the self-diagnosis according to the self-diagnosis result (the determination result as to whether or not the
このように、上位制御部6は、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないことが閾値NG1th(第3の閾値)以上連続した場合、自己診断用1ビットパルスデータSv1についてAD変換器5が異常であると判断する。すなわち、上位制御部6は、電圧に関してAD変換器5の異常があると判断する。
As described above, the upper-level control unit 6 determines that the digital data of the 1-bit pulse data for self-diagnosis Sv1 (first self-diagnosis data) after AD conversion does not match the digital data Dv1 (first digital data). When the threshold value NG1th (third threshold value) or more is continuous, it is determined that the
なお、電圧用自己診断処理についてAD変換器5が異常から正常に復帰した場合における実施例2の上位制御部6の動作は、電圧用自己診断処理についてAD変換器5が異常から正常に復帰した場合における実施例1の上位制御部6の動作と同様であるため、その説明を省略する。
Note that the operation of the upper-level control unit 6 of the second embodiment when the
<実施例2の変形例>
図7は、実施例2の変形例における自己診断処理を実行するときの上位制御部6の動作を示すフローチャートである。なお、実施例2の変形例における電流用自己診断処理や温度用自己診断処理を実施するときの上位制御部6の動作は、実施例2の変形例における電圧用自己診断処理を実施するときの上位制御部6の動作と同様であるため、その説明を省略する。
<Modification of Second Embodiment>
FIG. 7 is a flowchart illustrating the operation of the higher-level control unit 6 when performing the self-diagnosis processing according to the modification of the second embodiment. Note that the operation of the upper-level control unit 6 when performing the current self-diagnosis processing and the temperature self-diagnosis processing in the modification of the second embodiment is the same as that performed when performing the voltage self-diagnosis processing in the modification of the second embodiment. Since the operation is the same as that of the upper control unit 6, the description thereof is omitted.
図7に示すフローチャートにおいて、図6に示すフローチャートと異なる点は、上位制御部6が、カウンタ値OKnの合計値が閾値OKth(第7の閾値)以上でないと判断すると(ステップS409´´:No)、ステップS11において、nをインクリメント(+1)し、カウンタ値OKnの合計値が閾値OKth以上であると判断すると(ステップS409´´:Yes)、ステップS410において、AD変換器5が正常であると判断する点である。
The flowchart shown in FIG. 7 differs from the flowchart shown in FIG. 6 in that the higher-level control unit 6 determines that the total value of the counter values OKn is not more than the threshold value OKth (seventh threshold value) (step S409 ″: No). In step S11, n is incremented (+1), and when it is determined that the total value of the counter values OKn is equal to or larger than the threshold value OKth (step S409 ″: Yes), the
一例として、閾値NG1thが「2」である場合において、カウンタ値NG1が「2」になると、上位制御部6は、カウンタ値NG1、NG2のうちの少なくとも1つのカウンタ値NGnが閾値NGnth以上であると判断し(ステップS405:Yes)、AD変換器5が異常であると判断する。
As an example, when the threshold value NG1th is “2” and the counter value NG1 becomes “2”, the upper control unit 6 determines that at least one of the counter values NG1 and NG2 is equal to or larger than the threshold value NGnth. (Step S405: Yes), it is determined that the
次に、閾値OKthが「2」である場合において、カウンタ値OK1が「1」になり、カウンタ値OK2が「1」になると、上位制御部6は、カウンタ値OK1とカウンタ値OK2の合計値が閾値OKth以上であると判断し(ステップS409´´:Yes)、AD変換器5が正常であると判断する(ステップS410)。
Next, in the case where the threshold value OKth is “2”, when the counter value OK1 becomes “1” and the counter value OK2 becomes “1”, the higher-level control unit 6 sets the total value of the counter value OK1 and the counter value OK2. Is greater than or equal to the threshold value OKth (step S409 ″: Yes), and it is determined that the
このように、実施例2の変形例における上位制御部6は、実施例1の変形例における上位制御部6と同様に、AD変換器5が異常であると判断した後、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致することと、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致することの合計値が閾値OKth(第7の閾値)以上連続した場合、AD変換器5が正常であると判断する。
As described above, the upper-level control unit 6 in the modification of the second embodiment, like the upper-level control unit 6 in the modification of the first embodiment, determines that the A /
すなわち、実施例2や実施例2の変形例において、上位制御部6は、自己診断用1ビットパルスデータのAD変換後のデジタルデータが、デジタルデータDvnと一致するか否かにかかわず、電圧用自己診断命令Cv1、Cv2(第1及び第2の自己診断命令)を順に繰り返し出力する。 That is, in the second embodiment and the modification of the second embodiment, the higher-level control unit 6 sets the voltage regardless of whether the digital data after the AD conversion of the 1-bit pulse data for self-diagnosis matches the digital data Dvn. The self-diagnosis instructions Cv1 and Cv2 (first and second self-diagnosis instructions) are sequentially and repeatedly output.
また、実施例2や実施例2の変形例において、上位制御部6は、実施例1の変形例における上位制御部6と同様に、自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv1(第1のデジタルデータ)と一致しないことが閾値NG1th(第3の閾値)以上連続した場合、または、自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータが、デジタルデータDv2(第2のデジタルデータ)と一致しないことが閾値NG2th(第4の閾値)以上連続した場合、AD変換器5が異常であると判断する。これにより、AD変換器5に入力される自己診断データの種類(自己診断用1ビットパルスデータSv1、Sv2)毎に、AD変換器5が異常であるか否かを判断することができる。
In the second embodiment and the modification of the second embodiment, the upper control unit 6 performs the self-diagnosis 1-bit pulse data Sv1 (the first self-diagnosis data) similarly to the higher control unit 6 in the modification of the first embodiment. ), If the digital data after AD conversion does not match the digital data Dv1 (first digital data) for more than the threshold NG1th (third threshold) or the 1-bit pulse data Sv2 for self-diagnosis (first digital data). If the digital data after the A / D conversion of the self-diagnosis data 2) does not match the digital data Dv2 (the second digital data) continuously for the threshold NG2th (fourth threshold) or more, the
また、実施例2の変形例は、実施例2に比べて、AD変換器5が正常であるか否かを判断するための閾値OKnthの種類を削減することができるため、閾値OKnthを記憶させるための上位制御部6の内部の記憶領域または記憶部13の記憶領域を削減することができる。
Further, in the modified example of the second embodiment, the type of the threshold OKnth for determining whether the
このように、本実施形態のAD変換装置1では、自己診断用1ビットパルスデータの種類毎に、AD変換器5が異常であるか否かを判断することができるため、ある種類の自己診断用1ビットパルスデータにおいてのみデジタルデータ同士が一致しないと判断される場合であっても、AD変換器5が異常であると判断することができる。
As described above, the
また、本実施形態のAD変換装置1では、自己診断データ出力部9からデジタルフィルタ11へ自己診断用1ビットパルスデータを出力するため、自己診断データ出力部9からモジュレータ8またはマルチプレクサ7へ自己診断用アナログ値を出力する構成に比べて、モジュレータ8による変換誤差をデジタルデータに含ませないようにすることができ、自己診断用1ビットパルスデータがデジタルデータに正しく変換されたか否かを精度よく判断することができる。
In addition, in the
また、本発明は、以上の実施の形態に限定されるものでなく、本発明の要旨を逸脱しない範囲内で種々の改良、変更が可能である。 Further, the present invention is not limited to the above embodiments, and various improvements and modifications can be made without departing from the gist of the present invention.
<変形例1>
自己診断データ出力部9からマルチプレクサ7へ自己診断データとして自己診断用アナログ値Av1、Av2が出力されるように構成してもよい。このように構成する場合、モジュレータ8は、自己診断用アナログ値Av1を自己診断用1ビットパルスデータSv1に変換し、自己診断用アナログ値Av2を自己診断用1ビットパルスデータSv2に変換するものとする。また、切替スイッチ10を省略することができる。また、自己診断用1ビットパルスデータのAD変換後のデジタルデータが、その自己診断用1ビットパルスデータに対応するデジタルデータと一致しないことが閾値NGnth以上連続した場合、切替スイッチ10、デジタルフィルタ11、及び記憶部12だけでなく、マルチプレクサ7及びモジュレータ8が異常であると判断することができる。なお、電流用自己診断処理や温度用自己診断処理についても同様とする。
<
The self-diagnosis analog values Av1 and Av2 may be output as self-diagnosis data from the self-diagnosis data output unit 9 to the multiplexer 7. In such a configuration, the modulator 8 converts the analog value Av1 for self-diagnosis into 1-bit pulse data Sv1 for self-diagnosis, and converts the analog value Av2 for self-diagnosis into 1-bit pulse data Sv2 for self-diagnosis. I do. Further, the changeover switch 10 can be omitted. If the digital data after the A / D conversion of the 1-bit pulse data for self-diagnosis does not match the digital data corresponding to the 1-bit pulse data for self-diagnosis for more than the threshold value NGnth, the changeover switch 10 and the digital filter 11 , And the
<変形例2>
自己診断データ出力部9からモジュレータ8へ自己診断データとして自己診断用アナログ値Av1、Av2が出力されるように構成してもよい。このように構成する場合、モジュレータ8は、自己診断用アナログ値Av1を自己診断用1ビットパルスデータSv1に変換し、自己診断用アナログ値Av2を自己診断用1ビットパルスデータSv2に変換するものとする。また、切替スイッチ10は、モジュレータ8とデジタルフィルタ11との間ではなく、マルチプレクサ7とモジュレータ8との間に接続されるものとする。また、自己診断用1ビットパルスデータのAD変換後のデジタルデータが、その自己診断用1ビットパルスデータに対応するデジタルデータと一致しないことが閾値NGnth以上連続した場合、切替スイッチ10、デジタルフィルタ11、及び記憶部12だけでなく、モジュレータ8が異常であると判断することができる。なお、電流用自己診断処理や温度用自己診断処理についても同様とする。
<Modification 2>
The self-diagnosis data output unit 9 may output the self-diagnosis analog values Av1 and Av2 to the modulator 8 as self-diagnosis data. In such a configuration, the modulator 8 converts the analog value Av1 for self-diagnosis into 1-bit pulse data Sv1 for self-diagnosis, and converts the analog value Av2 for self-diagnosis into 1-bit pulse data Sv2 for self-diagnosis. I do. The changeover switch 10 is connected not between the modulator 8 and the digital filter 11 but between the multiplexer 7 and the modulator 8. If the digital data after the A / D conversion of the 1-bit pulse data for self-diagnosis does not match the digital data corresponding to the 1-bit pulse data for self-diagnosis for more than the threshold value NGnth, the changeover switch 10 and the digital filter 11 , And the
また、変形例1や変形例2を採用する場合、AD変換器5は、自己診断データとしての自己診断用アナログ値を出力する自己診断データ出力部9と、測定アナログ値を測定1ビットパルスデータに変換し、自己診断用アナログ値を自己診断用1ビットパルスデータに変換するモジュレータ8と、測定1ビットパルスデータと自己診断用1ビットパルスデータをデジタルデータに変換するデジタルフィルタ11と、デジタルフィルタ11により変換されるデジタルデータを記憶する記憶部12とを備える。
When the first and second modifications are adopted, the
また、変形例1や変形例2を採用する場合、モジュレータ8がデジタルフィルタ11の機能を備えていてもよい。すなわち、モジュレータ8が測定1ビットパルスデータと自己診断用1ビットパルスデータをデジタルデータに変換するデジタルフィルタとして機能してもよい。このように構成する場合、デジタルフィルタ11を省略することができる。 When the first and second modifications are adopted, the modulator 8 may have the function of the digital filter 11. That is, the modulator 8 may function as a digital filter that converts the measured 1-bit pulse data and the self-diagnosis 1-bit pulse data into digital data. In the case of such a configuration, the digital filter 11 can be omitted.
<変形例3>
図4〜図7に示すフローチャートにおいて、電圧用自己診断処理Pv1に使用される自己診断用1ビットパルスデータSv1(第1の自己診断データ)のAD変換後のデジタルデータは、電圧用自己診断処理Pv2に使用される自己診断用1ビットパルスデータSv2(第2の自己診断データ)のAD変換後のデジタルデータを構成するビット列の各ビットをそれぞれ反転したものとする。これにより、電圧用自己診断処理Pv1に使用される自己診断用1ビットパルスデータSv1のAD変換後のデジタルデータを、電圧用自己診断処理Pv2に使用される自己診断用1ビットパルスデータSv2のAD変換後のデジタルデータに対して、容易に離れた値にすることができる。なお、電流用自己診断処理や温度用自己診断処理についても同様とする。
<Modification 3>
In the flowcharts shown in FIGS. 4 to 7, the digital data after the AD conversion of the 1-bit pulse data for self-diagnosis Sv1 (first self-diagnosis data) used in the voltage self-diagnosis process Pv1 is referred to as a voltage self-diagnosis process. It is assumed that each bit of a bit string constituting the digital data after AD conversion of the self-diagnosis 1-bit pulse data Sv2 (second self-diagnosis data) used for Pv2 is inverted. Thus, the digital data obtained by AD conversion of the self-diagnosis 1-bit pulse data Sv1 used in the voltage self-diagnosis process Pv1 is converted to the AD of the self-diagnosis 1-bit pulse data Sv2 used in the voltage self-diagnosis process Pv2. The value can be easily separated from the converted digital data. The same applies to the current self-diagnosis processing and the temperature self-diagnosis processing.
1 AD変換装置
2 電圧測定部
3 電流測定部
4 温度測定部
5 AD変換器
6 上位制御部
7 マルチプレクサ
8 モジュレータ
9 自己診断データ出力部
10 切替スイッチ
11 デジタルフィルタ
12 記憶部
13 記憶部
Ve 車両
Lo 負荷
Bp 電池パック
B 電池
Claims (7)
前記第1の自己診断命令が入力されると、第1の自己診断データをAD変換し、前記第2の自己診断命令が入力されると、第2の自己診断データをAD変換するAD変換器と、
を備え、
前記上位制御部は、
前記第1の自己診断命令を出力し、前記第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致する場合、前記第2の自己診断命令を出力し、
前記第2の自己診断命令を出力し、前記第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致する場合、前記第1の自己診断命令を出力し、
前記第1の自己診断命令を出力し、前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致しない場合、再度、前記第1の自己診断命令を出力し、
前記第2の自己診断命令を出力し、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致しない場合、再度、前記第2の自己診断命令を出力し、
前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致しないことが第1の閾値以上連続した場合、または、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致しないことが第2の閾値以上連続した場合、前記AD変換器が異常であると判断する
ことを特徴とするAD変換装置。 An upper-level control unit that outputs first and second self-diagnosis instructions;
An A / D converter for AD-converting the first self-diagnosis data when the first self-diagnosis command is input, and AD-converting the second self-diagnosis data when the second self-diagnosis command is input When,
With
The higher-level control unit includes:
Outputting the first self-diagnosis instruction, and outputting the second self-diagnosis instruction when the digital data after the AD conversion of the first self-diagnosis data matches the first digital data;
Outputting the second self-diagnosis instruction, and outputting the first self-diagnosis instruction when the digital data after the AD conversion of the second self-diagnosis data matches the second digital data;
Outputting the first self-diagnosis instruction, and outputting the first self-diagnosis instruction again when the digital data after AD conversion of the first self-diagnosis data does not match the first digital data;
Outputting the second self-diagnosis instruction, and outputting the second self-diagnosis instruction again when the digital data after AD conversion of the second self-diagnosis data does not match the second digital data;
When the digital data after the AD conversion of the first self-diagnosis data does not match the first digital data continuously for a first threshold or more, or when the digital conversion after the AD conversion of the second self-diagnosis data is performed If the data does not match the second digital data continuously for a second threshold or more, it is determined that the AD converter is abnormal.
前記第1の自己診断命令が入力されると、第1の自己診断データをAD変換し、前記第2の自己診断命令が入力されると、第2の自己診断データをAD変換するAD変換器と、
を備え、
前記上位制御部は、前記第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致しないことが第3の閾値以上連続した場合、または、前記第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致しないことが第4の閾値以上連続した場合、前記AD変換器が異常であると判断する
ことを特徴とするAD変換装置。 A higher-level control unit that sequentially and repeatedly outputs the first and second self-diagnosis instructions;
An A / D converter for AD-converting the first self-diagnosis data when the first self-diagnosis command is input, and AD-converting the second self-diagnosis data when the second self-diagnosis command is input When,
With
The higher-level control unit may determine that the digital data after the AD conversion of the first self-diagnosis data does not match the first digital data continuously for a third threshold or more, or If the digital data after AD conversion does not match the second digital data continuously for a fourth threshold or more, it is determined that the AD converter is abnormal.
前記上位制御部は、前記AD変換器が異常であると判断した後、前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致することが第5の閾値以上連続した場合で、かつ、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致することが第6の閾値以上連続した場合、前記AD変換器が正常であると判断する
ことを特徴とするAD変換装置。 The AD converter according to claim 1, wherein:
After determining that the A / D converter is abnormal, the higher-level control unit determines that the digital data of the first self-diagnosis data after the A / D conversion matches the first digital data is equal to or greater than a fifth threshold value. If continuous, and if the digital data after AD conversion of the second self-diagnosis data coincides with the second digital data for a sixth threshold or more, the AD converter is normal. An AD converter characterized in that:
前記上位制御部は、前記AD変換器が異常であると判断した後、前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致することと、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致することの合計値が第7の閾値以上連続した場合、前記AD変換器が正常であると判断する
ことを特徴とするAD変換装置。 The AD converter according to claim 1, wherein:
The upper control unit, after determining that the AD converter is abnormal, that the digital data after AD conversion of the first self-diagnosis data matches the first digital data; and If the total value of the coincidence of the digital data of the self-diagnosis data after the AD conversion with the second digital data continues for a seventh threshold or more, it is determined that the AD converter is normal. AD converter.
前記第1の自己診断データのAD変換後のデジタルデータは、前記第2の自己診断データのAD変換後のデジタルデータを構成するビット列の各ビットをそれぞれ反転したものである
ことを特徴とするAD変換装置。 The AD converter according to claim 1, wherein:
The digital data after the AD conversion of the first self-diagnosis data is obtained by inverting each bit of a bit string constituting the digital data after the AD conversion of the second self-diagnosis data. Conversion device.
前記上位制御部は、
前記第1の自己診断命令を出力し、前記第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致する場合、前記第2の自己診断命令を出力し、
前記第2の自己診断命令を出力し、前記第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致する場合、前記第1の自己診断命令を出力し、
前記第1の自己診断命令を出力し、前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致しない場合、再度、前記第1の自己診断命令を出力し、
前記第2の自己診断命令を出力し、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致しない場合、再度、前記第2の自己診断命令を出力し、
前記第1の自己診断データのAD変換後のデジタルデータが前記第1のデジタルデータと一致しないことが第1の閾値以上連続した場合、または、前記第2の自己診断データのAD変換後のデジタルデータが前記第2のデジタルデータと一致しないことが第2の閾値以上連続した場合、前記AD変換器が異常であると判断する
ことを特徴とする自己診断方法。 A higher-level control unit that outputs first and second self-diagnosis instructions; and, when the first self-diagnosis instruction is input, AD-converts the first self-diagnosis data and receives the second self-diagnosis instruction. A self-diagnosis method for an AD conversion device including: an AD converter that performs AD conversion of the second self-diagnosis data.
The higher-level control unit includes:
Outputting the first self-diagnosis instruction, and outputting the second self-diagnosis instruction when the digital data after the AD conversion of the first self-diagnosis data matches the first digital data;
Outputting the second self-diagnosis instruction, and outputting the first self-diagnosis instruction when the digital data after the AD conversion of the second self-diagnosis data matches the second digital data;
Outputting the first self-diagnosis instruction, and outputting the first self-diagnosis instruction again when the digital data after AD conversion of the first self-diagnosis data does not match the first digital data;
Outputting the second self-diagnosis instruction, and outputting the second self-diagnosis instruction again when the digital data after AD conversion of the second self-diagnosis data does not match the second digital data;
When the digital data after the AD conversion of the first self-diagnosis data does not match the first digital data continuously for a first threshold or more, or when the digital conversion after the AD conversion of the second self-diagnosis data is performed If the data does not match the second digital data continuously for a second threshold or more, it is determined that the AD converter is abnormal.
前記上位制御部は、前記第1の自己診断データのAD変換後のデジタルデータが第1のデジタルデータと一致しないことが第3の閾値以上連続した場合、または、前記第2の自己診断データのAD変換後のデジタルデータが第2のデジタルデータと一致しないことが第4の閾値以上連続した場合、前記AD変換器が異常であると判断する
ことを特徴とする自己診断方法。
A higher-level control unit that sequentially and repeatedly outputs the first and second self-diagnosis instructions; and, when the first self-diagnosis instruction is input, AD-converts the first self-diagnosis data and outputs the second self-diagnosis instruction. Is input, an AD converter for AD-converting the second self-diagnosis data is provided.
The higher-level control unit may determine that the digital data after the AD conversion of the first self-diagnosis data does not match the first digital data continuously for a third threshold or more, or A self-diagnosis method comprising: determining that the AD converter is abnormal when the digital data after AD conversion does not match the second digital data continuously for a fourth threshold or more.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018176887A JP2020048148A (en) | 2018-09-21 | 2018-09-21 | AD converter and self-diagnosis method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018176887A JP2020048148A (en) | 2018-09-21 | 2018-09-21 | AD converter and self-diagnosis method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020048148A true JP2020048148A (en) | 2020-03-26 |
Family
ID=69901858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018176887A Pending JP2020048148A (en) | 2018-09-21 | 2018-09-21 | AD converter and self-diagnosis method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020048148A (en) |
-
2018
- 2018-09-21 JP JP2018176887A patent/JP2020048148A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101029394B1 (en) | Fault detector, fault detection method, and fault detection program | |
KR102323035B1 (en) | System and method for monitoring battery | |
US8283894B2 (en) | Voltage measuring apparatus for assembled battery | |
CN109933852B (en) | Method and device for predicting vehicle size deviation, storage medium and electronic equipment | |
EP3443670A1 (en) | Time-based delay line analog to digital converter | |
EP3246719B1 (en) | Battery monitoring device with battery emulator | |
US7681097B2 (en) | Test system employing test controller compressing data, data compressing circuit and test method | |
JP2020048148A (en) | AD converter and self-diagnosis method | |
CN109765489A (en) | Electricity and temperature sensing circuit and earphone | |
JP5659313B1 (en) | Data transmission device and remote monitoring system | |
WO2013136569A1 (en) | Cell voltage monitoring device | |
JP6359915B2 (en) | Semiconductor device, battery monitoring system, and semiconductor device address setting method | |
KR102085449B1 (en) | System and method for comparing and verifying temperature sensors with each other, bms containing a system for comparing and verifying temperature sensors with each other | |
CN101363879B (en) | Electrical level polar conversion device, electric voltage sampling apparatus and electric voltage sampling method | |
US9506983B2 (en) | Chip authentication using scan chains | |
US8593323B2 (en) | A/D conversion device | |
JPS63290423A (en) | Error generator | |
WO2019130621A1 (en) | Monitoring circuit and ad conversion execution determination method | |
CN114220222B (en) | Offline prepaid electric quantity recharging method and system | |
KR101363505B1 (en) | Terminal block device and method for avoiding unsafe conditions | |
JP7231490B2 (en) | Data transmission method and data transfer device | |
CN110928747B (en) | Baud rate monitoring method and device for asynchronous serial bus | |
CN107611932A (en) | IC apparatus and its establishing method | |
JP4039400B2 (en) | Data communication system | |
JP6833635B2 (en) | Digital circuit guarantee system and digital circuit guarantee method |