JP5765572B2 - Solenoid energization control device - Google Patents
Solenoid energization control device Download PDFInfo
- 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
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
特許文献1に記載の電流制御装置は、検出手段と、A/D変換手段と、制御手段と、平均電流演算手段とを備えて構成される。検出手段は一定周期で生成されたPWM信号にて通電制御されるソレノイドに実際に流れた電流を検出する。A/D変換手段は予め設定されたA/D変換周期毎に、検出手段により検出結果をデジタル値に変換する。制御手段はA/D変換手段によりデジタル値に変換された検出電流値が目標電流値となるようにPWM信号のデューティ比を制御する。平均電流演算手段は検出電流値をPWM信号の所定周期分だけ取り込み、当該取り込んだ検出電流値を算術平均することにより、所定周期内の平均電流値を算出する。電流制御装置は算出された平均電流値と目標電流値とに基づきPWM信号のデューティ比を制御する。
The current control device described in
特許文献1に記載の技術では、平均電流演算手段は専用の発振子にて生成されたクロック信号に基づき動作する。また、A/D変換手段及び制御手段は、このクロック信号とは異なる別の発振子にて生成されたクロック信号に基づき動作する。すなわち、A/D変換手段及び制御手段は同一の発振子からのクロック信号により同期して動作し、平均電流演算手段はA/D変換手段及び制御手段とは異なる発振子からのクロック信号により、A/D変換手段及び制御手段とは非同期に動作する。このため、A/D変換手段及び制御手段のクロック信号が、平均電流演算手段のクロック信号の整数倍にならない場合には、ソレノイドに流れた電流を検出するタイミングや当該検出された電流に係る電流値をA/D変換をするタイミングと、PWM信号を出力するタイミングとがずれる可能性がある。したがって、適切にソレノイドの通電を行うことができなくなる。
In the technique described in
本発明の目的は、上記問題に鑑み、ソレノイドに流れる電流を検出するタイミングと、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.
以下、本発明の実施の形態について、詳細に説明する。本発明に係るソレノイドの通電制御装置(以下「通電制御装置」とする)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
〔第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
電流取得用タイマ10は、ソレノイド50に流れる電流の電流値を取得するタイミングを規定する時間を計時する。詳細は後述するが、後述する電流値取得部11は、図2(c)に示されるように、所定の周期TI毎にソレノイド50に流れる電流を検出する。電流取得用タイマ10は、この所定の周期TIに対応する周波数で時間を計時するタイマに相当する。本実施形態では、電流取得用タイマ10は、図2(b)に示されるように、所定の周期TIで、計時値を所定の値(例えば「XI」)から0まで減じながら計時する。計時値が0になると、リセットされ、改めて前記所定の値から0まで減じながら計時する。電流取得用タイマ10は、このような計時を繰り返し行う。
The
電流値取得部11は、電流取得用タイマ10の計数結果に基づいて、ソレノイド50の通電を制御するスイッチング素子51を駆動するPWM信号の1周期内において予め設定された回数だけ電流値を取得する。ソレノイド50は、一端にスイッチング素子51が接続され、他端は電源Vに接続される。スイッチング素子51は、例えばFETを用いて構成することが可能である。この場合、ソース端子は接地され、ドレーン端子にソレノイド50が接続される。ゲート端子には、後述するPWM制御部21から所定の周波数からなるPWM信号が伝達される。これにより、スイッチング素子51が駆動される。
Based on the count result of the
電流値取得部11に接続された電流検出部11Aは、ソース端子とアースとの間に設けられる。これにより、スイッチング素子51がオン状態となった際にソレノイド50に流れる電流を検出することが可能となる。このようなソレノイド50に流れる電流が図2(a)に示される。
The
電流検出部11Aは、PWM信号の1周期(図2(g)の「TP」)内において、予め設定された回数だけ電流値を検出する。このような電流値の検出の周期が、上述の電流取得用タイマ10の周期TIに相当する。本実施形態ではPWMの1周期内において電流値を検出する回数は4回とする。このように検出された4回分の電流値は、検出の都度、電流値取得部11に伝達される。電流値取得部11では検出された電流値をA/D変換し、デジタル変換された電流値を取得する。
The
なお、PWM信号の1周期内において電流値取得部11が電流値を取得する回数は、回数カウント部31によりカウントされる。このような取得回数は、図2(d)に示される。回数カウント部31により4回までカウントされると、カウント値はリセットされ、改めて1回からカウントする。
The number of times that the current
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制御部21は、PWM信号の1周期内に取得された電流値に基づき、PWM信号の次の1周期にソレノイド50に通電する電流値を演算すると共に、当該演算された電流値に基づき次の1周期にスイッチング素子51に通電する通電時間を設定し、PWM制御用タイマ20の計時結果に基づいて設定した通電時間に応じたPWM信号を出力する。上述のように、電流値取得部11は、PWM信号の1周期内において4回、デジタル変換された電流値を取得する。PWM制御部21は、この4回分の電流値を使ってPWM信号の次の1周期においてソレノイド50に通電する電流値を演算する。この演算は、ソレノイド50により開弁される電磁弁の開度や、アクチュエータの駆動指令値に基づき行われる。このような演算は、公知であるので説明は省略する。
The
PWM制御部21は、このように演算して求めた電流値により通電時間を設定する。この通電時間は、PWM信号のオンデューティに相当する。PWM制御部21は、PWM制御用タイマ20の計時結果(オフデューティからオンデューティに切り替えるまでの時間の計時値)が0になった時点がPWM信号の出力タイミングに相当し(図2(f)参照)、PWM信号をローレベルからハイレベルに切り替える(図2(g)参照)。
The
ここで、図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
本実施形態では、計時値更新部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
電流取得用タイマ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
また、例えば、図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
このように、計時値更新部41は、PWM制御用タイマ20の計時値(a)がゼロになった時の電流取得用タイマ10の計時値が予め設定されたる位相のずれC0と比較することなく更新するので、処理負荷も軽減できる。
Thus, the time
なお、図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
ここで、図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
ここで、電流取得用タイマ10の計時値によっては、PWM信号の1周期内において電流値取得部11が電流値を取得する回数が予め設定された回数に満たない場合がある。係る場合には、PWM制御部21は、次の1周期にソレノイド50に通電する電流の電流値を演算することができないので、PWM信号の次の1周期にスイッチング素子51に通電する通電時間を、今回と同じ通電時間に設定する。これにより、次の1周期もとりあえずはソレノイド50に通電することが可能となる。よって、弁が閉じられたままとなったり、アクチュエータが駆動しないといった問題がなくなる。
Here, depending on the time value of the
また、本実施形態では、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
次に、本通電制御装置100による処理を図6のフローチャートを用いて説明する。まず、PWM制御部21からPWM信号が出力される(ステップ#01)。この出力は、例えば上位システムからの通電開始命令に基づき行われる。このPWM信号の出力に合わせて、PWM制御用タイマ20が計時を開始する(ステップ#02)。
Next, processing by the
電流検出部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
この時、PWM制御用タイマ20の計時値がゼロであれば(ステップ#06:No)、PWM制御部21は次のPWM信号の周期においてソレノイド50に通電する電流値を、今回の周期においてソレノイド50に通電した電流値に設定する(ステップ#07)。その後、ステップ#01から処理を継続する。
At this time, if the time value of the
ステップ#06において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#06:Yes)、電流取得用タイマ10の計時値がゼロになっていなければ(ステップ#08:No)、処理が保留される。一方、電流取得用タイマ10の計時値がゼロになっていれば(ステップ#08:Yes)、電流値取得部11により電流値が取得される(ステップ#09)。これにより、回数カウント部31は、電流値取得部11による電流値の取得回数nに1を加える(ステップ#10)。
In
回数カウント部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
これまでの処理により、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制御用タイマ20の計時値がゼロになれば(ステップ#16:Yes)、PWM制御部21はPWM信号を出力する(ステップ#17)。これにより、PWM制御用タイマ20の計時値がリセットされる(ステップ#18)。その後、PWM制御用タイマ20が計時を開始する(ステップ#19)。
In this state, if the measured value of the
計時値更新部41は、PWM制御用タイマ20の計時値がゼロになった際の電流取得用タイマ10の計時値を予め設定された値t0に設定する(ステップ#20)。その後、ステップ#06から処理が継続される。
The time
ステップ#16において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#16:No)、電流取得用タイマ10の計時値もゼロでなければ(ステップ#21:No)、処理が保留される。一方、電流取得用タイマ10の計時値もゼロであれば(ステップ#21:Yes)、ステップ#20から処理が継続される。
In
このように本通電制御装置100は、PWM制御用タイマ20を基準に電流取得用タイマ10を調整することができる。したがって、ソレノイド50に流れる電流を検出するタイミングと、PWM信号を出力するタイミングとのずれを抑制することができるので、適切にソレノイド50の通電を行うことが可能となる。
As described above, the current
〔第2の実施形態〕
次に、本発明に係る通電制御装置100の第2の実施形態について説明する。上記第1の実施形態では、計時値更新部41が、PWM制御用タイマ20の計時結果がPWM信号を出力するタイミングを規定する値になった場合に、電流取得用タイマ10の計時値を予め設定された値に更新するとして説明した。本実施形態に係る通電制御装置100は、電流取得用タイマ10の計時値を更新するタイミングが上記第1の実施形態と異なる。通電制御装置100の構成は、上記第1の実施形態において示した図1に示した構成と同様であるので説明は省略し、以下では、差異を中心に説明する。
[Second Embodiment]
Next, a second embodiment of the
本実施形態に係る計時値更新部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
また、計時値更新部41は、電流取得用タイマ10の計時値を予め設定された値を用いて演算した値に更新する。本実施形態に係る電流取得用タイマ10の更新について、図7を用いて説明する。図7の最上段には、1周期(周期TP)分のPWM信号が示される。通電制御装置100は、t1でソレノイド50の通電制御を開始したとする。
The time
この場合、電流取得用タイマ10は、PWM信号の周期TPの1/4に対応する値(例えば「X1」とする)からゼロまで減じながら計時する。t1から周期TPの1/4が経過しt21に達すると、計時値更新部41はt21の時点において、電流取得用タイマ10が次の期間に計時する値(「X2」とする)を演算する。このX2は以下の(1)式で求められる。
In this case, the
計時値更新部41は、このようにt21において、電流取得用タイマ10が次の期間に計時する値を演算する。そして、t3における電流取得用タイマ10の計時値を当該演算して求めたX2に更新する。その後、電流取得用タイマ10は、予め設定された値(C0及びk)を用いて演算した値(X2)からゼロまで減じながら計時する。t22になると、計時値更新部41は、更に次の期間に電流取得用タイマ10が計時する値(「X3」とする)を演算する。このX3は以下の(2)式で求められる。
In this way, the time
以下、同様に、t6において計時する値(「X4」とする)、更には、PWM信号の次の周期におけるt10において計時する値(「X5」とする)を、以下に示される式を用いて演算する。
このように、本実施形態に係る計時値更新部41は順次、次の期間において電流取得用タイマ10が計時する値を演算する。これにより、PWM制御用タイマ20を基準にして、電流取得用タイマ10の誤差を相対的に小さくすることが可能となる。したがって、PWM制御と電流値の取得とを同期することが可能となる。
As described above, the time
次に、本実施形態に係る本通電制御装置100による処理を図8のフローチャートを用いて説明する。まず、PWM制御部21からPWM信号が出力される(ステップ#01)。この出力は、例えば上位システムからの通電開始命令に基づき行われる。このPWM信号の出力に合わせて、PWM制御用タイマ20が計時を開始する(ステップ#02)。
Next, processing by the
電流検出部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
この時、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
On the other hand, in
そして、電流取得用タイマ10の計時値がゼロになっていれば(ステップ#08:Yes)、電流値取得部11により電流値が取得される(ステップ#09)。これにより、回数カウント部31は、電流値取得部11による電流値の取得回数nに1を加える(ステップ#10)。
If the time value of the
計時値更新部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
これまでの処理により、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制御用タイマ20の計時値がゼロになれば(ステップ#17:Yes)、PWM制御部21はPWM信号を出力する(ステップ#18)。これにより、PWM制御用タイマ20の計時値がリセットされる(ステップ#19)。その後、PWM制御用タイマ20が計時を開始し(ステップ#20)、ステップ#06から処理が継続される。
In this state, if the measured value of the
ステップ#17において、PWM制御用タイマ20の計時値がゼロでなく(ステップ#17:No)、電流取得用タイマ10の計時値もゼロでなければ(ステップ#21:No)、処理が保留される。一方、電流取得用タイマ10の計時値もゼロであれば(ステップ#21:Yes)、ステップ#03から処理が継続される。
In
このようにして通電制御装置100は、スイッチング素子51のPWM制御とソレノイド50に通電される電流値の取得とを同期させることができるので、ソレノイド50の通電を適切に行うことが可能となる。
Thus, since the
〔その他の実施形態〕
上記第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
上記実施形態では、スイッチング素子51の通電時間を設定する電流制御期間が、計時値更新部41により短縮されないように構成されてあるとして説明した。しかしながら、本発明の適用範囲はこれに限定されるものではない。計時値更新部41が、電流制御期間を短縮するように構成することも当然に可能である。
In the above embodiment, the current control period for setting the energization time of the switching
上記実施形態では、PWM制御部21は、PWM信号の1周期内に電流値の取得回数が予め設定された回数に満たない場合、PWM信号の次の1周期にスイッチング素子51に通電する通電時間を、今回と同じ通電時間に設定するとして説明した。しかしながら、本発明の適用範囲はこれに限定されるものではない。PWM制御部21は、PWM信号の1周期内に電流値の取得回数が予め設定された回数に満たない場合、予め設定された通電時間に設定することも可能である。
In the above embodiment, the
本発明は、ソレノイドの電流を制御する通電制御装置に用いることが可能である。 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周期を前記電流値が取得される回数で等分した値になった毎に、前記電流取得用タイマの計時値を予め設定された値を用いて演算した値に更新する請求項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.
前記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.
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6295810B2 (en) * | 2014-05-07 | 2018-03-20 | 株式会社デンソー | Load drive control device |
Family Cites Families (3)
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 |
-
2011
- 2011-09-21 JP JP2011206274A patent/JP5765572B2/en not_active Expired - Fee Related
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 |