JP5765572B2 - Solenoid energization control device - Google Patents

Solenoid energization control device Download PDF

Info

Publication number
JP5765572B2
JP5765572B2 JP2011206274A JP2011206274A JP5765572B2 JP 5765572 B2 JP5765572 B2 JP 5765572B2 JP 2011206274 A JP2011206274 A JP 2011206274A JP 2011206274 A JP2011206274 A JP 2011206274A JP 5765572 B2 JP5765572 B2 JP 5765572B2
Authority
JP
Japan
Prior art keywords
value
time
current
pwm signal
timer
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.)
Expired - Fee Related
Application number
JP2011206274A
Other languages
Japanese (ja)
Other versions
JP2013070175A (en
Inventor
浩之 稲垣
浩之 稲垣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisin Corp
Original Assignee
Aisin Seiki Co Ltd
Aisin Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisin Seiki Co Ltd, Aisin Corp filed Critical Aisin Seiki Co Ltd
Priority to JP2011206274A priority Critical patent/JP5765572B2/en
Publication of JP2013070175A publication Critical patent/JP2013070175A/en
Application granted granted Critical
Publication of JP5765572B2 publication Critical patent/JP5765572B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ソレノイドの電流を制御する通電制御装置に関する。   The present invention relates to an energization control device that controls a current of a solenoid.

従来、電磁弁の開閉制御やアクチュエータの駆動にソレノイドが利用されている。このようなソレノイドの通電制御はPWM制御により行われる。このような技術として下記に出典を示す特許文献1に記載のものがある。   Conventionally, solenoids have been used for opening / closing control of electromagnetic valves and driving of actuators. Such energization control of the solenoid is performed by PWM control. There exists a thing of patent document 1 which shows a source | sauce below as such a technique.

特許文献1に記載の電流制御装置は、検出手段と、A/D変換手段と、制御手段と、平均電流演算手段とを備えて構成される。検出手段は一定周期で生成されたPWM信号にて通電制御されるソレノイドに実際に流れた電流を検出する。A/D変換手段は予め設定されたA/D変換周期毎に、検出手段により検出結果をデジタル値に変換する。制御手段はA/D変換手段によりデジタル値に変換された検出電流値が目標電流値となるようにPWM信号のデューティ比を制御する。平均電流演算手段は検出電流値をPWM信号の所定周期分だけ取り込み、当該取り込んだ検出電流値を算術平均することにより、所定周期内の平均電流値を算出する。電流制御装置は算出された平均電流値と目標電流値とに基づきPWM信号のデューティ比を制御する。   The current control device described in Patent Literature 1 includes a detection unit, an A / D conversion unit, a control unit, and an average current calculation unit. The detecting means detects the current actually flowing through the solenoid that is energized and controlled by the PWM signal generated at a constant period. The A / D conversion means converts the detection result into a digital value by the detection means at every preset A / D conversion cycle. The control means controls the duty ratio of the PWM signal so that the detected current value converted into a digital value by the A / D conversion means becomes the target current value. The average current calculation means calculates the average current value within a predetermined period by acquiring the detected current value for a predetermined period of the PWM signal and arithmetically averaging the acquired detected current value. The current control device controls the duty ratio of the PWM signal based on the calculated average current value and target current value.

特開平11−308107号公報Japanese Patent Laid-Open No. 11-308107

特許文献1に記載の技術では、平均電流演算手段は専用の発振子にて生成されたクロック信号に基づき動作する。また、A/D変換手段及び制御手段は、このクロック信号とは異なる別の発振子にて生成されたクロック信号に基づき動作する。すなわち、A/D変換手段及び制御手段は同一の発振子からのクロック信号により同期して動作し、平均電流演算手段はA/D変換手段及び制御手段とは異なる発振子からのクロック信号により、A/D変換手段及び制御手段とは非同期に動作する。このため、A/D変換手段及び制御手段のクロック信号が、平均電流演算手段のクロック信号の整数倍にならない場合には、ソレノイドに流れた電流を検出するタイミングや当該検出された電流に係る電流値をA/D変換をするタイミングと、PWM信号を出力するタイミングとがずれる可能性がある。したがって、適切にソレノイドの通電を行うことができなくなる。   In the technique described in Patent Document 1, the average current calculation means operates based on a clock signal generated by a dedicated oscillator. The A / D conversion means and the control means operate based on a clock signal generated by another oscillator different from the clock signal. That is, the A / D conversion means and the control means operate in synchronization with a clock signal from the same oscillator, and the average current calculation means depends on a clock signal from an oscillator different from the A / D conversion means and the control means. The A / D conversion means and the control means operate asynchronously. For this reason, when the clock signal of the A / D conversion means and the control means does not become an integral multiple of the clock signal of the average current calculation means, the timing for detecting the current flowing through the solenoid and the current related to the detected current There is a possibility that the timing of A / D conversion of the value and the timing of outputting the PWM signal are shifted. Accordingly, the solenoid cannot be properly energized.

本発明の目的は、上記問題に鑑み、ソレノイドに流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制し、適切にソレノイドの通電を行うことが可能なソレノイドの通電制御装置を提供することにある。   In view of the above problems, an object of the present invention is to provide a solenoid energization control device capable of appropriately energizing a solenoid while suppressing a shift between a timing of detecting a current flowing through the solenoid and a timing of outputting a PWM signal. Is to provide.

上記目的を達成するための本発明に係るソレノイドの通電制御装置の特徴構成は、
ソレノイドに流れる電流の電流値を取得するタイミングを規定する時間を計時する電流取得用タイマと、
前記電流取得用タイマの計数結果に基づいて、前記ソレノイドの通電を制御するスイッチング素子を駆動するPWM信号の1周期内において前記PWM信号とは同期することなく予め設定された回数だけ前記電流値を取得する電流値取得部と、
前記PWM信号を出力するタイミングを規定する時間を計時するPWM制御用タイマと、
前記1周期内に取得された電流値に基づき、次の1周期に前記ソレノイドに通電する電流値を演算すると共に、当該演算された電流値に基づき前記次の1周期に前記スイッチング素子に通電する通電時間を設定し、前記PWM制御用タイマの計時結果に基づいて前記設定した通電時間に応じたPWM信号を出力するPWM制御部と、
前記PWM制御用タイマの計時結果に基づき、前記電流取得用タイマの計時値を更新する計時値更新部と、
を備えている点にある。
In order to achieve the above object, the characteristic configuration of the solenoid energization control device according to the present invention is as follows:
A current acquisition timer for measuring the time for determining the timing for acquiring the current value of the current flowing through the solenoid;
Based on the counting result of the current acquisition timer, the current value is set a predetermined number of times without synchronizing with the PWM signal within one cycle of the PWM signal that drives the switching element that controls energization of the solenoid. A current value acquisition unit to acquire;
A PWM control timer for measuring a time for defining a timing for outputting the PWM signal;
Based on the current value acquired within the one cycle, the current value for energizing the solenoid in the next cycle is calculated, and the switching element is energized in the next cycle based on the calculated current value. A PWM control unit that sets an energization time, and outputs a PWM signal corresponding to the set energization time based on a time measurement result of the PWM control timer;
A time value updating unit for updating the time value of the current acquisition timer based on the time measurement result of the PWM control timer;
It is in the point equipped with.

このような特徴構成とすれば、PWM制御用タイマを基準に電流取得用タイマを調整することができる。したがって、ソレノイドに流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制することができるので、適切にソレノイドの通電を行うことが可能となる。   With such a characteristic configuration, the current acquisition timer can be adjusted based on the PWM control timer. Accordingly, since it is possible to suppress a deviation between the timing of detecting the current flowing through the solenoid and the timing of outputting the PWM signal, it is possible to appropriately energize the solenoid.

また、前記計時値更新部は、前記PWM制御用タイマの計時結果が前記PWM信号を出力するタイミングを規定する値になった場合に、前記電流取得用タイマの計時値を予め設定された値に更新すると好適である。   In addition, the time value update unit sets the time value of the current acquisition timer to a preset value when the time measurement result of the PWM control timer reaches a value that defines the timing for outputting the PWM signal. It is preferable to update.

このような構成とすれば、PWM信号の周期毎に、当該PWM制御用タイマに同期して電流用取得タイマの計時値を調整することができる。したがって、ソレノイドに流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制することができる。   With such a configuration, the time value of the current acquisition timer can be adjusted in synchronization with the PWM control timer for each period of the PWM signal. Therefore, it is possible to suppress a deviation between the timing for detecting the current flowing through the solenoid and the timing for outputting the PWM signal.

或いは、前記PWM制御用タイマは、前記PWM信号の1周期を規定する時間も計時し、前記計時値更新部は、前記PWM制御用タイマの計時結果が前記PWM信号の1周期を前記電流値が取得される回数で等分した値になった毎に、前記電流取得用タイマの計時値を予め設定された値を用いて演算した値に更新する構成としても良い。   Alternatively, the PWM control timer also counts a time that defines one cycle of the PWM signal, and the time value update unit determines that the time measurement result of the PWM control timer is equal to one cycle of the PWM signal. It is good also as a structure which updates the time-measurement value of the said current acquisition timer to the value calculated using the preset value whenever it becomes the value equally divided by the frequency | count of acquisition.

このような構成とすれば、ソレノイド電流の検出を行う毎に、当該PWM制御用タイマに同期して電流用取得タイマの計時値を調整することができる。したがって、ソレノイドに流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制することができる。   With such a configuration, the time value of the current acquisition timer can be adjusted in synchronization with the PWM control timer every time the solenoid current is detected. Therefore, it is possible to suppress a deviation between the timing for detecting the current flowing through the solenoid and the timing for outputting the PWM signal.

また、前記スイッチング素子の通電時間を設定する電流制御期間が、前記計時値更新部により短縮されないように構成されてあると好適である。   Further, it is preferable that the current control period for setting the energization time of the switching element is configured not to be shortened by the time value update unit.

このような構成とすれば、確実に電流制御期間を設けることができるので、ソレノイドの通電制御を適切に行うことが可能となる。   With such a configuration, the current control period can be provided with certainty, so that the energization control of the solenoid can be appropriately performed.

また、前記PWM信号の1周期内における最終の電流値が取得されてから、前記PWM信号の次の1周期内における最初の電流値が取得されるまでに、前記PWM信号の次の1周期に前記ソレノイドに通電する電流値が演算されると共に、前記PWM信号の次の1周期に前記スイッチング素子に通電する通電時間が設定され、前記PWM信号の次の1周期が開始される構成とすると好適である。   In addition, after the final current value in one cycle of the PWM signal is acquired, the first current value in the next cycle of the PWM signal is acquired in the next one cycle of the PWM signal. It is preferable that the current value for energizing the solenoid is calculated, the energization time for energizing the switching element is set in the next cycle of the PWM signal, and the next cycle of the PWM signal is started. It is.

このような構成とすれば、ソレノイドに流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制しつつ、スイッチング素子に通電する通電時間を設定することが可能となる。したがって、ソレノイドの通電制御を適切に行うことができる。   With such a configuration, it is possible to set the energization time for energizing the switching element while suppressing the difference between the timing for detecting the current flowing through the solenoid and the timing for outputting the PWM signal. Therefore, the energization control of the solenoid can be appropriately performed.

また、前記PWM信号の1周期内において前記電流値取得部が前記電流値を取得する回数をカウントする回数カウント部が備えられ、前記PWM制御部は、前記PWM信号の1周期内に前記電流値の取得回数が予め設定された回数に満たない場合、前記PWM信号の次の1周期に前記スイッチング素子に通電する通電時間を、今回と同じ通電時間に設定すると好適である。   Further, a number counting unit that counts the number of times the current value acquisition unit acquires the current value within one cycle of the PWM signal is provided, and the PWM control unit includes the current value within one cycle of the PWM signal. When the number of times of acquisition of the switching element is less than the preset number, it is preferable to set the energization time for energizing the switching element in the next cycle of the PWM signal to the same energization time as this time.

このような構成とすれば、予め設定された回数だけ電流値が取得できず、次のPWM信号の周期でソレノイドに通電する電流が演算できない場合であっても、次の1周期に暫定的にスイッチング素子に通電することができる。   With such a configuration, even when the current value cannot be obtained a preset number of times and the current flowing to the solenoid cannot be calculated in the period of the next PWM signal, the current period is provisionally set in the next period. The switching element can be energized.

ソレノイドの通電制御装置の概略構成を模式的に示した図である。It is the figure which showed typically schematic structure of the electricity supply control apparatus of a solenoid. ソレノイドの通電制御に係るタイムチャートである。It is a time chart concerning energization control of a solenoid. 第1の実施形態に係る計時値の補正について模式的に示した図である。It is the figure which showed typically about correction | amendment of the time value which concerns on 1st Embodiment. 第1の実施形態に係る計時値の補正について模式的に示した図である。It is the figure which showed typically about correction | amendment of the time value which concerns on 1st Embodiment. 第1の実施形態に係る計時値の補正について模式的に示した図である。It is the figure which showed typically about correction | amendment of the time value which concerns on 1st Embodiment. 第1の実施形態に係る計時値の補正に関するフローチャートである。It is a flowchart regarding correction | amendment of the time value which concerns on 1st Embodiment. 第2の実施形態に係る計時値の補正について模式的に示した図である。It is the figure which showed typically about correction | amendment of the time value which concerns on 2nd Embodiment. 第2の実施形態に係る計時値の補正に関するフローチャートである。It is a flowchart regarding correction | amendment of the time value which concerns on 2nd Embodiment.

以下、本発明の実施の形態について、詳細に説明する。本発明に係るソレノイドの通電制御装置(以下「通電制御装置」とする)100は、ソレノイドに流れる電流の電流値を取得するタイミングと、ソレノイドの通電を制御するPWM信号を出力するタイミングとを同期させる機能を備えている。このようなソレノイドは、例えば電磁弁の開閉制御やアクチュエータの駆動に利用される。本通電制御装置100は、このようなソレノイドを制御対象とする。   Hereinafter, embodiments of the present invention will be described in detail. The solenoid energization control device (hereinafter referred to as “energization control device”) 100 according to the present invention synchronizes the timing for acquiring the current value of the current flowing through the solenoid and the timing for outputting the PWM signal for controlling energization of the solenoid. It has a function to let you. Such a solenoid is used for, for example, opening / closing control of an electromagnetic valve and driving of an actuator. The energization control apparatus 100 controls such a solenoid.

〔第1の実施形態〕
本通電制御装置100の第1の実施形態について説明する。図1にはソレノイド50の通電を制御する通電制御装置100の構成が模式的に示される。図2には通電制御装置100による処理のタイムチャートの一例が示される。図1に示されるように、通電制御装置100は、電流取得用タイマ10、電流値取得部11、PWM制御用タイマ20、PWM制御部21、回数カウント部31、計時値更新部41の各機能部を備えて構成される。各機能部はCPUを中核部材としてソレノイド50に通電する種々の処理を行うための上述の機能部がハードウェア又はソフトウェア或いはその両方で構築されている。
[First Embodiment]
A first embodiment of the energization control device 100 will be described. FIG. 1 schematically shows a configuration of an energization control device 100 that controls energization of the solenoid 50. FIG. 2 shows an example of a time chart of processing by the energization control device 100. As shown in FIG. 1, the energization control device 100 includes functions of a current acquisition timer 10, a current value acquisition unit 11, a PWM control timer 20, a PWM control unit 21, a frequency count unit 31, and a time value update unit 41. It is configured with a part. Each functional unit includes the above-described functional units for performing various processes for energizing the solenoid 50 with a CPU as a core member, and is constructed by hardware and / or software.

電流取得用タイマ10は、ソレノイド50に流れる電流の電流値を取得するタイミングを規定する時間を計時する。詳細は後述するが、後述する電流値取得部11は、図2(c)に示されるように、所定の周期TI毎にソレノイド50に流れる電流を検出する。電流取得用タイマ10は、この所定の周期TIに対応する周波数で時間を計時するタイマに相当する。本実施形態では、電流取得用タイマ10は、図2(b)に示されるように、所定の周期TIで、計時値を所定の値(例えば「XI」)から0まで減じながら計時する。計時値が0になると、リセットされ、改めて前記所定の値から0まで減じながら計時する。電流取得用タイマ10は、このような計時を繰り返し行う。   The current acquisition timer 10 measures the time that defines the timing for acquiring the current value of the current flowing through the solenoid 50. Although details will be described later, the current value acquisition unit 11 described later detects a current flowing through the solenoid 50 at every predetermined period TI, as shown in FIG. The current acquisition timer 10 corresponds to a timer that measures time at a frequency corresponding to the predetermined period TI. In the present embodiment, as shown in FIG. 2B, the current acquisition timer 10 measures time while reducing the time value from a predetermined value (eg, “XI”) to 0 at a predetermined period TI. When the time value reaches 0, the time is reset, and the time is again reduced from the predetermined value to 0. The current acquisition timer 10 repeats such timekeeping.

電流値取得部11は、電流取得用タイマ10の計数結果に基づいて、ソレノイド50の通電を制御するスイッチング素子51を駆動するPWM信号の1周期内において予め設定された回数だけ電流値を取得する。ソレノイド50は、一端にスイッチング素子51が接続され、他端は電源Vに接続される。スイッチング素子51は、例えばFETを用いて構成することが可能である。この場合、ソース端子は接地され、ドレーン端子にソレノイド50が接続される。ゲート端子には、後述するPWM制御部21から所定の周波数からなるPWM信号が伝達される。これにより、スイッチング素子51が駆動される。   Based on the count result of the current acquisition timer 10, the current value acquisition unit 11 acquires a current value a predetermined number of times within one cycle of the PWM signal that drives the switching element 51 that controls energization of the solenoid 50. . The solenoid 50 has one end connected to the switching element 51 and the other end connected to the power source V. The switching element 51 can be configured using, for example, an FET. In this case, the source terminal is grounded, and the solenoid 50 is connected to the drain terminal. A PWM signal having a predetermined frequency is transmitted to the gate terminal from a PWM control unit 21 described later. Thereby, the switching element 51 is driven.

電流値取得部11に接続された電流検出部11Aは、ソース端子とアースとの間に設けられる。これにより、スイッチング素子51がオン状態となった際にソレノイド50に流れる電流を検出することが可能となる。このようなソレノイド50に流れる電流が図2(a)に示される。   The current detection unit 11A connected to the current value acquisition unit 11 is provided between the source terminal and the ground. Thereby, it is possible to detect the current flowing through the solenoid 50 when the switching element 51 is turned on. The current flowing through the solenoid 50 is shown in FIG.

電流検出部11Aは、PWM信号の1周期(図2(g)の「TP」)内において、予め設定された回数だけ電流値を検出する。このような電流値の検出の周期が、上述の電流取得用タイマ10の周期TIに相当する。本実施形態ではPWMの1周期内において電流値を検出する回数は4回とする。このように検出された4回分の電流値は、検出の都度、電流値取得部11に伝達される。電流値取得部11では検出された電流値をA/D変換し、デジタル変換された電流値を取得する。   The current detection unit 11A detects a current value for a preset number of times within one period of the PWM signal (“TP” in FIG. 2G). Such a current value detection cycle corresponds to the cycle TI of the current acquisition timer 10 described above. In the present embodiment, the number of times the current value is detected within one PWM period is four. The current values for four times detected in this way are transmitted to the current value acquisition unit 11 each time they are detected. The current value acquisition unit 11 performs A / D conversion on the detected current value, and acquires a digitally converted current value.

なお、PWM信号の1周期内において電流値取得部11が電流値を取得する回数は、回数カウント部31によりカウントされる。このような取得回数は、図2(d)に示される。回数カウント部31により4回までカウントされると、カウント値はリセットされ、改めて1回からカウントする。   The number of times that the current value acquisition unit 11 acquires a current value within one cycle of the PWM signal is counted by the number counting unit 31. Such an acquisition count is shown in FIG. When the count unit 31 counts up to four times, the count value is reset and starts counting once again.

PWM制御用タイマ20は、PWM信号を出力するタイミングを規定する時間を計時する。上述のようにPWM信号は所定の周波数を有する。本実施形態では、詳細は後述するがPWM制御部21は、図2(g)に示されるように、所定の周期TPに対応する周波数からなるPWM信号を出力する。PWM制御用タイマ20は、PWM信号のオンデューティからオフデューティに切り替えるまでの時間、及びオフデューティからオンデューティに切り替えるまでの時間を計時するタイマに相当する。本実施形態では、電流取得用タイマ10は、図2(e)に示されるように、PWM信号のオンデューティからオフデューティに切り替えるまでの時間を所定の値(例えば「XP1」)から0まで減じながら計時した後、オフデューティからオンデューティに切り替えるまでの時間を所定の値(例えば「XP2」)から0まで減じながら計時する。PWM制御用タイマ20は、このような計時を繰り返し行う。   The PWM control timer 20 measures the time that defines the timing for outputting the PWM signal. As described above, the PWM signal has a predetermined frequency. In the present embodiment, although details will be described later, the PWM control unit 21 outputs a PWM signal having a frequency corresponding to a predetermined period TP as shown in FIG. The PWM control timer 20 corresponds to a timer that measures the time until the PWM signal is switched from on-duty to off-duty and the time until the PWM signal is switched from off-duty to on-duty. In the present embodiment, as shown in FIG. 2 (e), the current acquisition timer 10 reduces the time until the PWM signal is switched from on-duty to off-duty from a predetermined value (for example, “XP1”) to 0. After measuring the time, the time until switching from the off-duty to the on-duty is measured while decreasing from a predetermined value (for example, “XP2”) to zero. The PWM control timer 20 repeats such timekeeping.

PWM制御部21は、PWM信号の1周期内に取得された電流値に基づき、PWM信号の次の1周期にソレノイド50に通電する電流値を演算すると共に、当該演算された電流値に基づき次の1周期にスイッチング素子51に通電する通電時間を設定し、PWM制御用タイマ20の計時結果に基づいて設定した通電時間に応じたPWM信号を出力する。上述のように、電流値取得部11は、PWM信号の1周期内において4回、デジタル変換された電流値を取得する。PWM制御部21は、この4回分の電流値を使ってPWM信号の次の1周期においてソレノイド50に通電する電流値を演算する。この演算は、ソレノイド50により開弁される電磁弁の開度や、アクチュエータの駆動指令値に基づき行われる。このような演算は、公知であるので説明は省略する。   The PWM control unit 21 calculates a current value for energizing the solenoid 50 in the next one cycle of the PWM signal based on the current value acquired in one cycle of the PWM signal, and the next based on the calculated current value. The energization time during which the switching element 51 is energized is set in one cycle, and a PWM signal corresponding to the energization time set based on the timing result of the PWM control timer 20 is output. As described above, the current value acquisition unit 11 acquires a current value digitally converted four times within one cycle of the PWM signal. The PWM control unit 21 calculates a current value for energizing the solenoid 50 in the next cycle of the PWM signal using the current values for the four times. This calculation is performed based on the opening degree of the solenoid valve opened by the solenoid 50 and the drive command value of the actuator. Since such calculation is well known, description thereof is omitted.

PWM制御部21は、このように演算して求めた電流値により通電時間を設定する。この通電時間は、PWM信号のオンデューティに相当する。PWM制御部21は、PWM制御用タイマ20の計時結果(オフデューティからオンデューティに切り替えるまでの時間の計時値)が0になった時点がPWM信号の出力タイミングに相当し(図2(f)参照)、PWM信号をローレベルからハイレベルに切り替える(図2(g)参照)。   The PWM control unit 21 sets the energization time based on the current value obtained by calculation in this way. This energization time corresponds to the on-duty of the PWM signal. The PWM control unit 21 corresponds to the output timing of the PWM signal when the time measurement result of the PWM control timer 20 (time value of time until switching from the off duty to the on duty) becomes 0 (FIG. 2 (f)). The PWM signal is switched from the low level to the high level (see FIG. 2G).

ここで、図2に示されるように、PWM信号の周期(周期TP)と、ソレノイド電流を取得する周期(周期TI)とは異なり、位相もずれている。このような位相のずれは、ソレノイド50の仕様上、ゼロにすることはできない。しかしながら、位相のずれはソレノイド50に通電するにあたり、大きくなりすぎても小さくなりすぎても支障がでる場合がある。このため、本通電制御装置100の計時値更新部41は、PWM制御用タイマ20の計時結果に基づき、電流取得用タイマ10の計時値を更新する。   Here, as shown in FIG. 2, the period (period TP) of the PWM signal and the period (period TI) for acquiring the solenoid current are different from each other in phase. Such a phase shift cannot be made zero due to the specification of the solenoid 50. However, when the solenoid 50 is energized, there may be a problem if the phase shift becomes too large or too small. Therefore, the time value update unit 41 of the energization control apparatus 100 updates the time value of the current acquisition timer 10 based on the time measurement result of the PWM control timer 20.

本実施形態では、計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号を出力するタイミングを規定する値になった場合に、電流取得用タイマ10の計時値を予め設定された値に更新する。ここで、上述のようにPWM制御用タイマ20が計時する周期(周期TP)と、電流取得用タイマ10が計時する周期(周期TI)とは、位相のずれがあり、このずれは予め設定されている。本実施形態ではこのような予め設定された位相のずれをC0とする。PWM信号を出力するタイミングを規定する値になった場合とは、本実施形態では、オフデューティからオンデューティに切り替えるまでの時間の計時値がゼロになった時点である。よって、PWM制御部21は、PWM制御用タイマ20の計時結果において、オフデューティからオンデューティに切り替えるまでの時間の計時値がゼロになった時にPWM信号を切り替える。したがって、計時値更新部41は、PWM制御用タイマ20の計時結果がゼロになった場合に、電流取得用タイマ10の計時値をC0に更新する。   In the present embodiment, the time value update unit 41 sets the time value of the current acquisition timer 10 in advance when the time measurement result of the PWM control timer 20 reaches a value that defines the timing for outputting the PWM signal. Update to value. Here, there is a phase shift between the period (period TP) measured by the PWM control timer 20 and the period (period TI) measured by the current acquisition timer 10 as described above, and this deviation is set in advance. ing. In this embodiment, such a preset phase shift is C0. In this embodiment, the case where the value that defines the timing for outputting the PWM signal is a time point when the time measured until switching from the off duty to the on duty becomes zero. Therefore, the PWM control unit 21 switches the PWM signal when the measured time value from the off-duty to the on-duty becomes zero in the timing result of the PWM control timer 20. Therefore, the time value updating unit 41 updates the time value of the current acquisition timer 10 to C0 when the time measurement result of the PWM control timer 20 becomes zero.

電流取得用タイマ10の更新について、具体的に図3を用いて説明する。図3は図2のt9の近傍におけるPWM制御用タイマ20の計時値(図3(a)参照)と、電流取得用タイマ10の計時値(図3(b)参照)とを示したものである。ここで、本例ではt9における電流取得用タイマ10の計時値がC1であるとする。PWM制御用タイマ20の計時値(a)がゼロになると(#01)、計時値更新部41は電流取得用タイマ10の計時値を予め設定されてある位相のずれをC0に更新する(#02)。電流取得用タイマ10は、その後、更新されたC0からゼロまで計時する。これにより、電流取得用タイマ10の計時値を、PWM制御用タイマ20の計時値に対して調節することができるので、予め設定されてある位相のずれを維持することが可能となる。   The update of the current acquisition timer 10 will be specifically described with reference to FIG. FIG. 3 shows the time measured value (see FIG. 3A) of the PWM control timer 20 in the vicinity of t9 in FIG. 2 and the time measured value of the current acquisition timer 10 (see FIG. 3B). is there. Here, in this example, it is assumed that the time value of the current acquisition timer 10 at t9 is C1. When the time value (a) of the PWM control timer 20 becomes zero (# 01), the time value update unit 41 updates the preset time difference of the time value of the current acquisition timer 10 to C0 (#). 02). The current acquisition timer 10 then counts from the updated C0 to zero. Thus, the time value of the current acquisition timer 10 can be adjusted with respect to the time value of the PWM control timer 20, so that a preset phase shift can be maintained.

また、例えば、図4のように、PWM制御用タイマ20の計時値(a)がゼロになった時の電流取得用タイマ10の計時値がC0よりも小さい場合であっても、PWM制御用タイマ20の計時値(a)がゼロになった時に(#01)、計時値更新部41が電流取得用タイマ10の計時値を予め設定されてある位相のずれをC0に更新する(#02)。これにより、電流取得用タイマ10が、更新されたC0からゼロまで計時するので、予め設定されてある位相のずれを維持することができる。   For example, as shown in FIG. 4, even if the time value of the current acquisition timer 10 when the time value (a) of the PWM control timer 20 becomes zero is smaller than C0, When the time value (a) of the timer 20 becomes zero (# 01), the time value update unit 41 updates the time difference of the current acquisition timer 10 to C0, which is a preset phase shift (# 02). ). As a result, the current acquisition timer 10 counts from the updated C0 to zero, so that a preset phase shift can be maintained.

このように、計時値更新部41は、PWM制御用タイマ20の計時値(a)がゼロになった時の電流取得用タイマ10の計時値が予め設定されたる位相のずれC0と比較することなく更新するので、処理負荷も軽減できる。   Thus, the time value update unit 41 compares the time value of the current acquisition timer 10 when the time value (a) of the PWM control timer 20 becomes zero with a preset phase shift C0. Since it is updated without any changes, the processing load can be reduced.

なお、図5のように、PWM制御用タイマ20の計時値(a)がゼロになった時の電流取得用タイマ10の計時値C1が、たまたまC0であった場合でも、PWM制御用タイマ20の計時値(a)がゼロになった時に(#01)、計時値更新部41が電流取得用タイマ10の計時値を予め設定されてある位相のずれをC0に更新する(#02)構成とすることも可能である。係る場合、位相のずれがC0であるか否かを判定する必要がないので、処理負荷を軽減できる。   As shown in FIG. 5, even when the time value C1 of the current acquisition timer 10 when the time value (a) of the PWM control timer 20 becomes zero happens to be C0, the PWM control timer 20 When the time value (a) of the current value becomes zero (# 01), the time value update unit 41 updates the time difference of the current acquisition timer 10 to C0, which is a preset phase shift (# 02). It is also possible. In such a case, it is not necessary to determine whether or not the phase shift is C0, so that the processing load can be reduced.

ここで、図2に戻り、PWM制御部21がPWM信号の次の1周期の電流値を制御するように、スイッチング素子51の通電時間を設定する電流制御期間I0が設けられている。この電流制御期間I0は、ソレノイド50の通電を適切に行うために必要であるので、計時値更新部41により短縮されないように構成されている。したがって、計時値更新部41により電流取得用タイマ10の計時値が更新され、元の値から小さくしても、少なくとも電流制御期間I0を確保することが可能となる。   Here, returning to FIG. 2, a current control period I0 for setting the energization time of the switching element 51 is provided so that the PWM control unit 21 controls the current value of the next cycle of the PWM signal. Since the current control period I0 is necessary for properly energizing the solenoid 50, it is configured not to be shortened by the time value updating unit 41. Therefore, the time value update unit 41 updates the time value of the current acquisition timer 10, and at least the current control period I0 can be secured even if the time value is smaller than the original value.

ここで、電流取得用タイマ10の計時値によっては、PWM信号の1周期内において電流値取得部11が電流値を取得する回数が予め設定された回数に満たない場合がある。係る場合には、PWM制御部21は、次の1周期にソレノイド50に通電する電流の電流値を演算することができないので、PWM信号の次の1周期にスイッチング素子51に通電する通電時間を、今回と同じ通電時間に設定する。これにより、次の1周期もとりあえずはソレノイド50に通電することが可能となる。よって、弁が閉じられたままとなったり、アクチュエータが駆動しないといった問題がなくなる。   Here, depending on the time value of the current acquisition timer 10, the number of times the current value acquisition unit 11 acquires the current value within one cycle of the PWM signal may be less than the preset number. In such a case, the PWM control unit 21 cannot calculate the current value of the current that is energized to the solenoid 50 in the next cycle, so the energization time for energizing the switching element 51 in the next cycle of the PWM signal. The same energization time as this time is set. As a result, the solenoid 50 can be energized for the next one cycle. Therefore, the problem that the valve remains closed and the actuator does not drive is eliminated.

また、本実施形態では、PWM信号の1周期内における最終の電流値が取得されてから、PWM信号の次の1周期内における最初の電流値が取得されるまでに、PWM信号の次の1周期にソレノイド50に通電する電流値が演算されると共に、PWM信号の次の1周期にスイッチング素子51に通電する通電時間が設定され、PWM信号の次の1周期が開始される。すなわち、図2に示されるようにPWM信号の1周期内における最終の電流値が取得されるt6と、PWM信号の次の1周期内における最初の電流値が取得されるt10との間に、次の周期に通電する電流値が演算される電流制御期間I0(t7からt8までの間)が設けられると共に、スイッチング素子51に通電する通電時間が設定され、PWM制御部21により通電が開始される(t9)。   In the present embodiment, after the last current value in one cycle of the PWM signal is acquired, the first current value in the next cycle of the PWM signal is acquired until the first current value in the next cycle of the PWM signal. A current value for energizing the solenoid 50 in a cycle is calculated, and an energization time for energizing the switching element 51 is set in the next cycle of the PWM signal, and the next cycle of the PWM signal is started. That is, as shown in FIG. 2, between the time t6 at which the final current value within one period of the PWM signal is acquired and the time t10 at which the first current value within the next period of the PWM signal is acquired, A current control period I0 (between t7 and t8) in which a current value to be energized in the next period is provided, an energization time for energizing the switching element 51 is set, and energization is started by the PWM control unit 21. (T9).

次に、本通電制御装置100による処理を図6のフローチャートを用いて説明する。まず、PWM制御部21からPWM信号が出力される(ステップ#01)。この出力は、例えば上位システムからの通電開始命令に基づき行われる。このPWM信号の出力に合わせて、PWM制御用タイマ20が計時を開始する(ステップ#02)。   Next, processing by the energization control apparatus 100 will be described using the flowchart of FIG. First, a PWM signal is output from the PWM control unit 21 (step # 01). This output is performed based on an energization start command from the host system, for example. In synchronization with the output of the PWM signal, the PWM control timer 20 starts measuring time (step # 02).

電流検出部11Aは、PWM制御部21によるPWM信号の出力後、所定時間が経過するソレノイド50に流れる電流を検出し、電流値取得部11が検出された電流値に基づきデジタル変換された電流値を取得する(ステップ#03)。回数カウント部31は、電流値取得部11による電流値の取得回数nを1に設定する(ステップ#04)。電流取得用タイマ10は、計時を開始する(ステップ#05)。   11 A of current detection parts detect the current which flows into the solenoid 50 which predetermined time passes after the output of the PWM signal by the PWM control part 21, and the current value digitally converted based on the current value which the current value acquisition part 11 detected Is acquired (step # 03). The number counting unit 31 sets the number n of current value acquisitions by the current value acquiring unit 11 to 1 (step # 04). The current acquisition timer 10 starts measuring time (step # 05).

この時、PWM制御用タイマ20の計時値がゼロであれば(ステップ#06:No)、PWM制御部21は次のPWM信号の周期においてソレノイド50に通電する電流値を、今回の周期においてソレノイド50に通電した電流値に設定する(ステップ#07)。その後、ステップ#01から処理を継続する。   At this time, if the time value of the PWM control timer 20 is zero (step # 06: No), the PWM control unit 21 sets the current value to be energized to the solenoid 50 in the next PWM signal cycle to the solenoid current cycle. 50 is set to the current value energized 50 (step # 07). Thereafter, the processing is continued from step # 01.

ステップ#06において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#06:Yes)、電流取得用タイマ10の計時値がゼロになっていなければ(ステップ#08:No)、処理が保留される。一方、電流取得用タイマ10の計時値がゼロになっていれば(ステップ#08:Yes)、電流値取得部11により電流値が取得される(ステップ#09)。これにより、回数カウント部31は、電流値取得部11による電流値の取得回数nに1を加える(ステップ#10)。   In step # 06, if the time value of the PWM control timer 20 is not zero (step # 06: Yes) and the time value of the current acquisition timer 10 is not zero (step # 08: No), the process is performed. Deferred. On the other hand, if the time value of the current acquisition timer 10 is zero (step # 08: Yes), the current value acquisition unit 11 acquires the current value (step # 09). As a result, the number counting unit 31 adds 1 to the number n of current value acquisitions by the current value acquiring unit 11 (step # 10).

回数カウント部31によりカウントされる電流値取得部11による電流値の取得回数nが4でなければ(ステップ#11:No)、電流取得用タイマ10の計時値をリセットする(ステップ#12)。一方、回数カウント部31によりカウントされる電流値取得部11による電流値の取得回数nが4であれば(ステップ#11:Yes)、電流取得用タイマ10の計時値をリセットし、計時を開始する(ステップ#12)。そして、回数カウント部31は、電流値の取得回数nを1に設定する(ステップ#13)。   If the number n of current value acquisitions by the current value acquisition unit 11 counted by the number counting unit 31 is not 4 (step # 11: No), the time value of the current acquisition timer 10 is reset (step # 12). On the other hand, if the number n of current value acquisitions by the current value acquisition unit 11 counted by the number counting unit 31 is 4 (step # 11: Yes), the time measurement value of the current acquisition timer 10 is reset and time measurement is started. (Step # 12). Then, the number counting unit 31 sets the number n of current value acquisitions to 1 (step # 13).

これまでの処理により、PWM信号の1周期において4回分の電流値が取得できたので、PWM制御部21は次の1周期においてソレノイド50に通電する電流値を演算し(ステップ#14)、スイッチング素子51に通電する通電時間を設定する(ステップ#15)。   As a result of the processing so far, the current value for four times in one cycle of the PWM signal has been acquired, the PWM control unit 21 calculates the current value for energizing the solenoid 50 in the next one cycle (step # 14), and switching. The energization time for energizing the element 51 is set (step # 15).

この状態において、PWM制御用タイマ20の計時値がゼロになれば(ステップ#16:Yes)、PWM制御部21はPWM信号を出力する(ステップ#17)。これにより、PWM制御用タイマ20の計時値がリセットされる(ステップ#18)。その後、PWM制御用タイマ20が計時を開始する(ステップ#19)。   In this state, if the measured value of the PWM control timer 20 becomes zero (step # 16: Yes), the PWM control unit 21 outputs a PWM signal (step # 17). As a result, the time value of the PWM control timer 20 is reset (step # 18). Thereafter, the PWM control timer 20 starts measuring time (step # 19).

計時値更新部41は、PWM制御用タイマ20の計時値がゼロになった際の電流取得用タイマ10の計時値を予め設定された値t0に設定する(ステップ#20)。その後、ステップ#06から処理が継続される。   The time value updating unit 41 sets the time value of the current acquisition timer 10 when the time value of the PWM control timer 20 becomes zero to a preset value t0 (step # 20). Thereafter, the processing is continued from step # 06.

ステップ#16において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#16:No)、電流取得用タイマ10の計時値もゼロでなければ(ステップ#21:No)、処理が保留される。一方、電流取得用タイマ10の計時値もゼロであれば(ステップ#21:Yes)、ステップ#20から処理が継続される。   In step # 16, if the time value of the PWM control timer 20 is not zero (step # 16: No) and the time value of the current acquisition timer 10 is not zero (step # 21: No), the process is suspended. The On the other hand, if the time measured value of the current acquisition timer 10 is also zero (step # 21: Yes), the processing is continued from step # 20.

このように本通電制御装置100は、PWM制御用タイマ20を基準に電流取得用タイマ10を調整することができる。したがって、ソレノイド50に流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制することができるので、適切にソレノイド50の通電を行うことが可能となる。   As described above, the current supply control device 100 can adjust the current acquisition timer 10 based on the PWM control timer 20. Accordingly, since it is possible to suppress a deviation between the timing for detecting the current flowing through the solenoid 50 and the timing for outputting the PWM signal, it is possible to appropriately energize the solenoid 50.

〔第2の実施形態〕
次に、本発明に係る通電制御装置100の第2の実施形態について説明する。上記第1の実施形態では、計時値更新部41が、PWM制御用タイマ20の計時結果がPWM信号を出力するタイミングを規定する値になった場合に、電流取得用タイマ10の計時値を予め設定された値に更新するとして説明した。本実施形態に係る通電制御装置100は、電流取得用タイマ10の計時値を更新するタイミングが上記第1の実施形態と異なる。通電制御装置100の構成は、上記第1の実施形態において示した図1に示した構成と同様であるので説明は省略し、以下では、差異を中心に説明する。
[Second Embodiment]
Next, a second embodiment of the energization control device 100 according to the present invention will be described. In the first embodiment, when the time measurement value updating unit 41 determines that the time measurement result of the PWM control timer 20 is a value that defines the timing for outputting the PWM signal, the time measurement value of the current acquisition timer 10 is set in advance. It has been described as updating to a set value. The energization control apparatus 100 according to the present embodiment is different from the first embodiment in the timing for updating the time value of the current acquisition timer 10. Since the configuration of the energization control device 100 is the same as the configuration shown in FIG. 1 shown in the first embodiment, a description thereof will be omitted, and the following description will focus on the differences.

本実施形態に係る計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号の1周期を電流値が取得される回数で等分した値になった毎に、更新する。PWM制御用タイマ20は、上述のようにPWM信号を出力するタイミングを規定する時間を計時する。また、本実施形態では、PWM制御用タイマ20は、PWM信号の1周期を規定する時間も計時する。PWM信号の1周期をTPとし、その1周期の中で電流値取得部11によりソレノイド50の電流値が取得される回数を4回とすると、本実施形態に係る計時値更新部41はPWM制御用タイマ20の計時値がTP/4×n倍(ただし、n=1,2,3,4)になる毎に電流取得用タイマ10の計時値を更新する。したがって、本実施形態ではPWM信号の1周期において、電流取得用タイマ10の計時値が4回更新されることになる。なお、PWM信号の1周期は予め設定されているので、容易に演算して求めることができる。   The time measurement value update unit 41 according to the present embodiment updates the time measurement result of the PWM control timer 20 every time the PWM signal is equal to one cycle of the PWM signal divided by the number of times the current value is acquired. The PWM control timer 20 measures the time that defines the timing for outputting the PWM signal as described above. In this embodiment, the PWM control timer 20 also measures the time that defines one period of the PWM signal. When one cycle of the PWM signal is TP and the number of times the current value of the solenoid 50 is acquired by the current value acquiring unit 11 in the one cycle is four, the time value updating unit 41 according to the present embodiment performs PWM control. Every time the measured value of the timer 20 becomes TP / 4 × n (where n = 1, 2, 3, 4), the measured value of the current acquisition timer 10 is updated. Therefore, in this embodiment, the time value of the current acquisition timer 10 is updated four times in one cycle of the PWM signal. Since one period of the PWM signal is set in advance, it can be easily calculated and obtained.

また、計時値更新部41は、電流取得用タイマ10の計時値を予め設定された値を用いて演算した値に更新する。本実施形態に係る電流取得用タイマ10の更新について、図7を用いて説明する。図7の最上段には、1周期(周期TP)分のPWM信号が示される。通電制御装置100は、t1でソレノイド50の通電制御を開始したとする。   The time value update unit 41 updates the time value of the current acquisition timer 10 to a value calculated using a preset value. Update of the current acquisition timer 10 according to the present embodiment will be described with reference to FIG. The PWM signal for one period (period TP) is shown in the uppermost part of FIG. It is assumed that the energization control device 100 starts energization control of the solenoid 50 at t1.

この場合、電流取得用タイマ10は、PWM信号の周期TPの1/4に対応する値(例えば「X1」とする)からゼロまで減じながら計時する。t1から周期TPの1/4が経過しt21に達すると、計時値更新部41はt21の時点において、電流取得用タイマ10が次の期間に計時する値(「X2」とする)を演算する。このX2は以下の(1)式で求められる。   In this case, the current acquisition timer 10 measures the time while subtracting from a value (for example, “X1”) corresponding to ¼ of the period TP of the PWM signal to zero. When ¼ of the period TP elapses from t1 and reaches t21, the time measurement value update unit 41 calculates a value (referred to as “X2”) that the current acquisition timer 10 measures in the next period at time t21. . This X2 is obtained by the following equation (1).

Figure 0005765572
ただし、C1はt21の時点での電流取得用タイマ10の計時値であり、C0は予め設定されている位相のずれである。また、kは予め設定されたゲインである。例えば1未満の値にすると、電流取得用タイマ10の誤差をいち早く収束することが可能となる。
Figure 0005765572
However, C1 is the time value of the current acquisition timer 10 at time t21, and C0 is a preset phase shift. K is a preset gain. For example, when the value is less than 1, the error of the current acquisition timer 10 can be quickly converged.

計時値更新部41は、このようにt21において、電流取得用タイマ10が次の期間に計時する値を演算する。そして、t3における電流取得用タイマ10の計時値を当該演算して求めたX2に更新する。その後、電流取得用タイマ10は、予め設定された値(C0及びk)を用いて演算した値(X2)からゼロまで減じながら計時する。t22になると、計時値更新部41は、更に次の期間に電流取得用タイマ10が計時する値(「X3」とする)を演算する。このX3は以下の(2)式で求められる。   In this way, the time value updating unit 41 calculates the value that the current acquisition timer 10 measures in the next period at t21. Then, the time value of the current acquisition timer 10 at t3 is updated to X2 obtained by the calculation. Thereafter, the current acquisition timer 10 measures the time while subtracting from a value (X2) calculated using preset values (C0 and k) to zero. At t22, the time measurement value update unit 41 further calculates a value (referred to as “X3”) that the current acquisition timer 10 measures in the next period. This X3 is calculated | required by the following (2) Formula.

Figure 0005765572
ただし、C2はt22の時点での電流取得用タイマ10の計時値である。C0及びkについては、上述の(1)式と同様の値が用いられる。
Figure 0005765572
However, C2 is the time value of the current acquisition timer 10 at time t22. About C0 and k, the same value as the above-mentioned (1) formula is used.

以下、同様に、t6において計時する値(「X4」とする)、更には、PWM信号の次の周期におけるt10において計時する値(「X5」とする)を、以下に示される式を用いて演算する。

Figure 0005765572
Figure 0005765572
Hereinafter, similarly, the value measured at t6 (referred to as “X4”), and further the value measured at t10 in the next period of the PWM signal (referred to as “X5”) are expressed using the following formulae: Calculate.
Figure 0005765572
Figure 0005765572

このように、本実施形態に係る計時値更新部41は順次、次の期間において電流取得用タイマ10が計時する値を演算する。これにより、PWM制御用タイマ20を基準にして、電流取得用タイマ10の誤差を相対的に小さくすることが可能となる。したがって、PWM制御と電流値の取得とを同期することが可能となる。   As described above, the time value updating unit 41 according to the present embodiment sequentially calculates the value measured by the current acquisition timer 10 in the next period. This makes it possible to relatively reduce the error of the current acquisition timer 10 with reference to the PWM control timer 20. Therefore, it is possible to synchronize PWM control and current value acquisition.

次に、本実施形態に係る本通電制御装置100による処理を図8のフローチャートを用いて説明する。まず、PWM制御部21からPWM信号が出力される(ステップ#01)。この出力は、例えば上位システムからの通電開始命令に基づき行われる。このPWM信号の出力に合わせて、PWM制御用タイマ20が計時を開始する(ステップ#02)。   Next, processing by the energization control apparatus 100 according to the present embodiment will be described using the flowchart of FIG. First, a PWM signal is output from the PWM control unit 21 (step # 01). This output is performed based on an energization start command from the host system, for example. In synchronization with the output of the PWM signal, the PWM control timer 20 starts measuring time (step # 02).

電流検出部11Aは、PWM制御部21によるPWM信号の出力後、所定時間が経過するソレノイド50に流れる電流を検出し、電流値取得部11が検出された電流値に基づきデジタル変換された電流値を取得する(ステップ#03)。回数カウント部31は、電流値取得部11による電流値の取得回数nを1に設定する(ステップ#04)。電流取得用タイマ10は、計時を開始する(ステップ#05)。   11 A of current detection parts detect the current which flows into the solenoid 50 which predetermined time passes after the output of the PWM signal by the PWM control part 21, and the current value digitally converted based on the current value which the current value acquisition part 11 detected Is acquired (step # 03). The number counting unit 31 sets the number n of current value acquisitions by the current value acquiring unit 11 to 1 (step # 04). The current acquisition timer 10 starts measuring time (step # 05).

この時、PWM制御用タイマ20の計時値がPWM信号の周期のn/4倍であれば(ステップ#06:Yes)、計時値更新部41はその時点の電流取得用タイマ10の計時値を用いて次の期間に電流取得用タイマ10が計時する値を演算する(ステップ#07)。
一方、ステップ#06において、PWM制御用タイマ20の計時値がPWM信号の周期のn/4倍に達していなければ(ステップ#06:No)、処理が保留される。
At this time, if the time value of the PWM control timer 20 is n / 4 times the period of the PWM signal (step # 06: Yes), the time value update unit 41 sets the time value of the current acquisition timer 10 at that time. In the next period, the value counted by the current acquisition timer 10 is calculated (step # 07).
On the other hand, in step # 06, if the measured value of the PWM control timer 20 has not reached n / 4 times the period of the PWM signal (step # 06: No), the process is suspended.

そして、電流取得用タイマ10の計時値がゼロになっていれば(ステップ#08:Yes)、電流値取得部11により電流値が取得される(ステップ#09)。これにより、回数カウント部31は、電流値取得部11による電流値の取得回数nに1を加える(ステップ#10)。   If the time value of the current acquisition timer 10 is zero (step # 08: Yes), the current value acquisition unit 11 acquires the current value (step # 09). As a result, the number counting unit 31 adds 1 to the number n of current value acquisitions by the current value acquiring unit 11 (step # 10).

計時値更新部41により、電流取得用タイマ10の計時値が上述により演算された値に更新される(ステップ#11)。この時、電流値取得部11がスイッチング素子51の通電時間を設定する電流制御期間は短縮されないようにする。回数カウント部31によりカウントされる電流値取得部11による電流値の取得回数nが4でなければ(ステップ#12:No)、ステップ#05から処理が継続される。一方、回数カウント部31によりカウントされる電流値取得部11による電流値の取得回数nが4であれば(ステップ#12:Yes)、電流取得用タイマ10の計時値をリセットし、計時を開始する(ステップ#13)。そして、回数カウント部31は、電流値の取得回数nを1に設定する(ステップ#14)。   The time value update unit 41 updates the time value of the current acquisition timer 10 to the value calculated as described above (step # 11). At this time, the current control period in which the current value acquisition unit 11 sets the energization time of the switching element 51 is not shortened. If the current value acquisition count n by the current value acquisition unit 11 counted by the count counter 31 is not 4 (step # 12: No), the processing is continued from step # 05. On the other hand, if the number n of current value acquisitions by the current value acquisition unit 11 counted by the number counting unit 31 is 4 (step # 12: Yes), the time measurement value of the current acquisition timer 10 is reset and time measurement is started. (Step # 13). Then, the number counting unit 31 sets the current value acquisition number n to 1 (step # 14).

これまでの処理により、PWM信号の1周期において4回分の電流値が取得できたので、PWM制御部21は次の1周期においてソレノイド50に通電する電流値を演算し(ステップ#15)、スイッチング素子51に通電する通電時間を設定する(ステップ#16)。   As a result of the processing so far, current values for four times in one period of the PWM signal have been acquired, the PWM control unit 21 calculates a current value for energizing the solenoid 50 in the next one period (step # 15) and switching. The energization time for energizing the element 51 is set (step # 16).

この状態において、PWM制御用タイマ20の計時値がゼロになれば(ステップ#17:Yes)、PWM制御部21はPWM信号を出力する(ステップ#18)。これにより、PWM制御用タイマ20の計時値がリセットされる(ステップ#19)。その後、PWM制御用タイマ20が計時を開始し(ステップ#20)、ステップ#06から処理が継続される。   In this state, if the measured value of the PWM control timer 20 becomes zero (step # 17: Yes), the PWM control unit 21 outputs a PWM signal (step # 18). As a result, the time value of the PWM control timer 20 is reset (step # 19). Thereafter, the PWM control timer 20 starts measuring time (step # 20), and the processing is continued from step # 06.

ステップ#17において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#17:No)、電流取得用タイマ10の計時値もゼロでなければ(ステップ#21:No)、処理が保留される。一方、電流取得用タイマ10の計時値もゼロであれば(ステップ#21:Yes)、ステップ#03から処理が継続される。   In step # 17, if the time value of the PWM control timer 20 is not zero (step # 17: No) and the time value of the current acquisition timer 10 is not zero (step # 21: No), the process is suspended. The On the other hand, if the time measured value of the current acquisition timer 10 is also zero (step # 21: Yes), the processing is continued from step # 03.

このようにして通電制御装置100は、スイッチング素子51のPWM制御とソレノイド50に通電される電流値の取得とを同期させることができるので、ソレノイド50の通電を適切に行うことが可能となる。   Thus, since the energization control apparatus 100 can synchronize the PWM control of the switching element 51 and the acquisition of the current value energized to the solenoid 50, it is possible to appropriately energize the solenoid 50.

〔その他の実施形態〕
上記第1の実施形態では、計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号を出力するタイミングを規定する値になった場合に、電流取得用タイマ10の計時値を予め設定された値に更新し、上記第2の実施形態では計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号の1周期を電流値が取得される回数で等分した値になった毎に、電流取得用タイマ10の計時値を予め設定された値を用いて演算した値に更新するとして説明した。しかしながら、本発明の適用範囲はこれに限定されるものではない。例えば、計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号の1周期を電流値が取得される回数で等分した値になった毎に、電流取得用タイマ10の計時値を予め設定された値に更新する構成とすることも可能である。また、計時値更新部41は、PWM制御用タイマ20の計時結果がPWM信号を出力するタイミングを規定する値になった場合に、電流取得用タイマ10の計時値を予め設定された値を用いて演算した値に更新する構成とすることも当然に可能である。
[Other Embodiments]
In the first embodiment, the time value updating unit 41 preliminarily sets the time value of the current acquisition timer 10 when the time measurement result of the PWM control timer 20 becomes a value that defines the timing for outputting the PWM signal. In the second embodiment, the time measurement value update unit 41 updates the time measurement result of the PWM control timer 20 to a value obtained by equally dividing one period of the PWM signal by the number of times the current value is acquired. It has been described that the time value of the current acquisition timer 10 is updated to a value calculated using a preset value each time. However, the scope of application of the present invention is not limited to this. For example, the time value updating unit 41 counts the time value of the current acquisition timer 10 every time the time measurement result of the PWM control timer 20 becomes a value obtained by equally dividing one period of the PWM signal by the number of times the current value is acquired. It is also possible to adopt a configuration in which is updated to a preset value. In addition, the time value update unit 41 uses a value set in advance as the time value of the current acquisition timer 10 when the time measurement result of the PWM control timer 20 reaches a value that defines the timing for outputting the PWM signal. Of course, it is also possible to adopt a configuration in which the values calculated in this way are updated.

上記実施形態では、スイッチング素子51の通電時間を設定する電流制御期間が、計時値更新部41により短縮されないように構成されてあるとして説明した。しかしながら、本発明の適用範囲はこれに限定されるものではない。計時値更新部41が、電流制御期間を短縮するように構成することも当然に可能である。   In the above embodiment, the current control period for setting the energization time of the switching element 51 has been described as being configured so as not to be shortened by the time value updating unit 41. However, the scope of application of the present invention is not limited to this. It is naturally possible to configure the time value update unit 41 to shorten the current control period.

上記実施形態では、PWM制御部21は、PWM信号の1周期内に電流値の取得回数が予め設定された回数に満たない場合、PWM信号の次の1周期にスイッチング素子51に通電する通電時間を、今回と同じ通電時間に設定するとして説明した。しかしながら、本発明の適用範囲はこれに限定されるものではない。PWM制御部21は、PWM信号の1周期内に電流値の取得回数が予め設定された回数に満たない場合、予め設定された通電時間に設定することも可能である。   In the above embodiment, the PWM control unit 21 energizes the switching element 51 in the next one cycle of the PWM signal when the number of current value acquisitions within one cycle of the PWM signal is less than the preset number of times. Is described as being set to the same energization time as this time. However, the scope of application of the present invention is not limited to this. The PWM control unit 21 can also set the energization time set in advance when the number of current value acquisitions is less than the preset number within one cycle of the PWM signal.

本発明は、ソレノイドの電流を制御する通電制御装置に用いることが可能である。   The present invention can be used in an energization control device that controls the current of a solenoid.

10:電流取得用タイマ
11:電流値取得部
20:PWM制御用タイマ
21:PWM制御部
31:回数カウント部
41:計時値更新部
50:ソレノイド
51:スイッチング素子
100:通電制御装置(ソレノイドの通電制御装置)
DESCRIPTION OF SYMBOLS 10: Current acquisition timer 11: Current value acquisition unit 20: PWM control timer 21: PWM control unit 31: Count count unit 41: Timekeeping value update unit 50: Solenoid 51: Switching element 100: Energization control device (energization of solenoid) Control device)

Claims (6)

ソレノイドに流れる電流の電流値を取得するタイミングを規定する時間を計時する電流取得用タイマと、
前記電流取得用タイマの計数結果に基づいて、前記ソレノイドの通電を制御するスイッチング素子を駆動するPWM信号の1周期内において前記PWM信号とは同期することなく予め設定された回数だけ前記電流値を取得する電流値取得部と、
前記PWM信号を出力するタイミングを規定する時間を計時するPWM制御用タイマと、
前記1周期内に取得された電流値に基づき、次の1周期に前記ソレノイドに通電する電流値を演算すると共に、当該演算された電流値に基づき前記次の1周期に前記スイッチング素子に通電する通電時間を設定し、前記PWM制御用タイマの計時結果に基づいて前記設定した通電時間に応じたPWM信号を出力するPWM制御部と、
前記PWM制御用タイマの計時結果に基づき、前記電流取得用タイマの計時値を更新する計時値更新部と、
を備えるソレノイドの通電制御装置。
A current acquisition timer for measuring the time for determining the timing for acquiring the current value of the current flowing through the solenoid;
Based on the counting result of the current acquisition timer, the current value is set a predetermined number of times without synchronizing with the PWM signal within one cycle of the PWM signal that drives the switching element that controls energization of the solenoid. A current value acquisition unit to acquire;
A PWM control timer for measuring a time for defining a timing for outputting the PWM signal;
Based on the current value acquired within the one cycle, the current value for energizing the solenoid in the next cycle is calculated, and the switching element is energized in the next cycle based on the calculated current value. A PWM control unit that sets an energization time and outputs a PWM signal corresponding to the set energization time based on a time measurement result of the PWM control timer;
A time value updating unit for updating the time value of the current acquisition timer based on the time measurement result of the PWM control timer;
A solenoid energization control device comprising:
前記計時値更新部は、前記PWM制御用タイマの計時結果が前記PWM信号を出力するタイミングを規定する値になった場合に、前記電流取得用タイマの計時値を予め設定された値に更新する請求項1に記載のソレノイドの通電制御装置。   The timekeeping value updating unit updates the timekeeping value of the current acquisition timer to a preset value when the timekeeping result of the PWM control timer reaches a value that defines the timing for outputting the PWM signal. The solenoid energization control device according to claim 1. 前記PWM制御用タイマは、前記PWM信号の1周期を規定する時間も計時し、
前記計時値更新部は、前記PWM制御用タイマの計時結果が前記PWM信号の1周期を前記電流値が取得される回数で等分した値になった毎に、前記電流取得用タイマの計時値を予め設定された値を用いて演算した値に更新する請求項1に記載のソレノイドの通電制御装置。
The PWM control timer also measures the time defining one cycle of the PWM signal,
The timekeeping value update unit counts the timekeeping value of the current acquisition timer each time the timekeeping result of the PWM control timer is equal to one PWM signal period divided by the number of times the current value is acquired. The energization control device for a solenoid according to claim 1, wherein the value is updated to a value calculated using a preset value.
前記スイッチング素子の通電時間を設定する電流制御期間が、前記計時値更新部により短縮されないように構成されてある請求項1から3のいずれか一項に記載のソレノイドの通電制御装置。   4. The solenoid energization control device according to claim 1, wherein a current control period for setting an energization time of the switching element is configured not to be shortened by the time value update unit. 5. 前記PWM信号の1周期内における最終の電流値が取得されてから、前記PWM信号の次の1周期内における最初の電流値が取得されるまでに、前記PWM信号の次の1周期に前記ソレノイドに通電する電流値が演算されると共に、前記PWM信号の次の1周期に前記スイッチング素子に通電する通電時間が設定され、前記PWM信号の次の1周期が開始される請求項1から4のいずれか一項に記載のソレノイドの通電制御装置。   After the final current value in one cycle of the PWM signal is acquired, until the first current value in the next cycle of the PWM signal is acquired, the solenoid in the next cycle of the PWM signal. The current value for energizing is calculated, energization time for energizing the switching element is set in the next cycle of the PWM signal, and the next cycle of the PWM signal is started. The energization control device for the solenoid according to any one of the above. 前記PWM信号の1周期内において前記電流値取得部が前記電流値を取得する回数をカウントする回数カウント部が備えられ、
前記PWM制御部は、前記PWM信号の1周期内に前記電流値の取得回数が予め設定された回数に満たない場合、前記PWM信号の次の1周期に前記スイッチング素子に通電する通電時間を、今回と同じ通電時間に設定する請求項1から5のいずれか一項に記載のソレノイドの通電制御装置。
A number counting unit that counts the number of times the current value acquisition unit acquires the current value within one cycle of the PWM signal;
The PWM control unit sets an energization time for energizing the switching element in the next one cycle of the PWM signal when the number of acquisitions of the current value is less than a preset number of times within one cycle of the PWM signal. The energization control device for a solenoid according to any one of claims 1 to 5, wherein the energization time is set to be the same as that of the current time.
JP2011206274A 2011-09-21 2011-09-21 Solenoid energization control device Expired - Fee Related JP5765572B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011206274A JP5765572B2 (en) 2011-09-21 2011-09-21 Solenoid energization control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011206274A JP5765572B2 (en) 2011-09-21 2011-09-21 Solenoid energization control device

Publications (2)

Publication Number Publication Date
JP2013070175A JP2013070175A (en) 2013-04-18
JP5765572B2 true JP5765572B2 (en) 2015-08-19

Family

ID=48475383

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011206274A Expired - Fee Related JP5765572B2 (en) 2011-09-21 2011-09-21 Solenoid energization control device

Country Status (1)

Country Link
JP (1) JP5765572B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6295810B2 (en) * 2014-05-07 2018-03-20 株式会社デンソー Load drive control device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4091163B2 (en) * 1998-04-21 2008-05-28 株式会社デンソー Signal input device, control device, and current control device for inductive load
JP5093037B2 (en) * 2008-10-03 2012-12-05 サンケン電気株式会社 Load drive circuit
JP5303495B2 (en) * 2010-03-09 2013-10-02 矢崎総業株式会社 Control device for electromagnetic induction load

Also Published As

Publication number Publication date
JP2013070175A (en) 2013-04-18

Similar Documents

Publication Publication Date Title
EP3343896B1 (en) A method and system for synchronizing illumination timing in a multi-sensor imager
KR101173807B1 (en) Linear vibration motor drive controlling apparatus
KR20150116873A (en) Synchronization of rf pulsing with rf metrology, processing, and control
CN104534759B (en) Exhausting assisted method for controlling electronic expansion valve
EP2320547A2 (en) Current-controlled semiconductor device and control unit using the same
JP5765572B2 (en) Solenoid energization control device
US20110219787A1 (en) Variable pid enable for compressor control algorithm
JP5270119B2 (en) Motor ripple detector
KR20110125607A (en) Linear vibration motor drive controlling circuit
JP5968561B2 (en) Microcomputer and its clock correction method
JP2021106490A (en) Method and apparatus for quasi-sensorless adaptive control of switched reluctance motor drive
US10176914B2 (en) Electric power control with a dither signal
JP6234561B2 (en) Method for controlling the hydraulic pressure of a fluid transmission
JP6295810B2 (en) Load drive control device
JP6484954B2 (en) Motor control device, motor control system, motor control method, and motor control program
JP6414867B2 (en) Valve control device and valve system
JP2013234720A (en) Solenoid valve drive control device
JP5946359B2 (en) Motor control device and motor control method
JP2009246711A (en) Signal processing apparatus
JP6451244B2 (en) Control device for opening and closing body
JP5849994B2 (en) Actuator drive
JP4127039B2 (en) Feedback control device
JP6344070B2 (en) Solenoid control device
JP2006093537A (en) Proportional solenoid valve controller of construction machine
JP2019133537A (en) Actuator controller and actuator control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140807

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150319

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150415

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150521

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150603

R151 Written notification of patent or utility model registration

Ref document number: 5765572

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees