JP4789601B2 - Electric motor control device - Google Patents

Electric motor control device Download PDF

Info

Publication number
JP4789601B2
JP4789601B2 JP2005343856A JP2005343856A JP4789601B2 JP 4789601 B2 JP4789601 B2 JP 4789601B2 JP 2005343856 A JP2005343856 A JP 2005343856A JP 2005343856 A JP2005343856 A JP 2005343856A JP 4789601 B2 JP4789601 B2 JP 4789601B2
Authority
JP
Japan
Prior art keywords
change amount
time change
predetermined value
motor
threshold value
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
JP2005343856A
Other languages
Japanese (ja)
Other versions
JP2007151333A (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.)
Nidec Mobility Corp
Original Assignee
Omron Automotive Electronics Co Ltd
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 Omron Automotive Electronics Co Ltd filed Critical Omron Automotive Electronics Co Ltd
Priority to JP2005343856A priority Critical patent/JP4789601B2/en
Publication of JP2007151333A publication Critical patent/JP2007151333A/en
Application granted granted Critical
Publication of JP4789601B2 publication Critical patent/JP4789601B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、例えば車両の開閉体を駆動するための電動機を制御する電動機制御装置に関するものである。   The present invention relates to an electric motor control device that controls an electric motor for driving an opening / closing body of a vehicle, for example.

例えば自動車には、ドアの窓、サンルーフ、スライドドア等の開閉体と、該開閉体を駆動するための電動機と、該電動機を制御する電動機制御装置とが設けられている。電動機制御装置のうち、窓開閉用の電動機を制御するものは、パワーウィンドウ装置(または窓開閉制御装置)と呼ばれている。パワーウィンドウ装置は、一般にスイッチの操作により電動機であるモータを正転または逆転させて、ドアの窓ガラスを昇降させ、窓を開閉する。   For example, an automobile is provided with an opening / closing body such as a door window, a sunroof, and a sliding door, an electric motor for driving the opening / closing body, and an electric motor control device for controlling the electric motor. Among the motor control devices, those that control the window opening / closing motor are called power window devices (or window opening / closing control devices). In general, a power window device opens and closes a window by moving a motor, which is an electric motor, forward or backward by operating a switch to raise and lower a window glass of a door.

図1は、パワーウィンドウ装置の電気的構成を示したブロック図である。1は窓の開閉を操作するための操作スイッチ、2はモータ3を駆動するモータ駆動回路、4はモータ3の回転に同期したパルスを出力するロータリエンコーダ、5はロータリエンコーダ4から出力されるパルスを検出するパルス検出回路、6はROMやRAM等から構成されるメモリ、8は窓の開閉動作を制御するCPUおよびメモリから構成される制御部である。   FIG. 1 is a block diagram showing an electrical configuration of the power window device. 1 is an operation switch for opening and closing the window, 2 is a motor drive circuit for driving the motor 3, 4 is a rotary encoder that outputs a pulse synchronized with the rotation of the motor 3, and 5 is a pulse output from the rotary encoder 4. 6 is a memory composed of a ROM, a RAM, etc., and 8 is a control unit composed of a CPU and a memory for controlling the opening / closing operation of the window.

操作スイッチ1を操作すると、制御部8に窓開閉指令が与えられ、モータ駆動回路2によりモータ3が正転または逆転する。モータ3の回転により、モータ3と連動する窓開閉機構が作動して窓の開閉が行われる。パルス検出回路5はロータリエンコーダ4から出力されるパルスを検出し、制御部8はこの検出結果に基づき窓の開閉量やモータの回転速度を算出して、モータ駆動回路2を介してモータ3の回転を制御する。   When the operation switch 1 is operated, a window opening / closing command is given to the control unit 8, and the motor 3 is rotated forward or backward by the motor drive circuit 2. By the rotation of the motor 3, the window opening / closing mechanism interlocked with the motor 3 is operated to open / close the window. The pulse detection circuit 5 detects a pulse output from the rotary encoder 4, and the control unit 8 calculates the opening / closing amount of the window and the rotation speed of the motor based on the detection result, and the motor 3 via the motor drive circuit 2. Control the rotation.

図2は、操作スイッチ1の一例を示した概略構成図である。操作スイッチ1は、軸Qを中心としてab方向に回転可能な操作ノブ11と、この操作ノブ11と一体に設けられたロッド12と、公知のスライドスイッチ13とから構成される。14はスライドスイッチ13のアクチュエータ、20は操作スイッチ1が組み込まれるスイッチユニットのカバーである。ロッド12の下端は、スライドスイッチ13のアクチュエータ14と係合しており、操作ノブ11がab方向に回転すると、ロッド12を介してアクチュエータ14がcd方向に移動し、その移動位置に応じてスライドスイッチ13の接点(図示省略)が切り換えられる。   FIG. 2 is a schematic configuration diagram illustrating an example of the operation switch 1. The operation switch 1 includes an operation knob 11 that can rotate in the ab direction around the axis Q, a rod 12 that is provided integrally with the operation knob 11, and a known slide switch 13. Reference numeral 14 denotes an actuator of the slide switch 13, and 20 denotes a cover of a switch unit in which the operation switch 1 is incorporated. The lower end of the rod 12 is engaged with the actuator 14 of the slide switch 13, and when the operation knob 11 rotates in the ab direction, the actuator 14 moves in the cd direction via the rod 12, and slides according to the moving position. A contact (not shown) of the switch 13 is switched.

操作ノブ11は、オート閉AC、マニュアル閉MC、中立N、マニュアル開MO、オート開AOの各位置へ切換可能となっている。図2は、操作ノブ11が中立Nの位置にある状態を示している。この位置から操作ノブ11をa方向に一定量回転させて、マニュアル閉MCの位置にすると、マニュアル動作で窓が閉じるマニュアル閉動作が行われ、この位置よりさらにa方向に操作ノブ11を回転させてオート閉ACの位置にすると、オート動作で窓が閉じるオート閉動作が行われる。また、操作ノブ11を中立Nの位置からb方向に一定量回転させて、マニュアル開MOの位置にすると、マニュアル動作で窓が開くマニュアル開動作が行われ、この位置よりさらにb方向に操作ノブ11を回転させてオート開AOの位置にすると、オート動作で窓が開くオート開動作が行われる。操作ノブ11には、図示しないバネが設けられており、回転した操作ノブ11から手を離すと、操作ノブ11はバネの力により中立Nの位置に復帰する。   The operation knob 11 can be switched to each position of auto close AC, manual close MC, neutral N, manual open MO, and auto open AO. FIG. 2 shows a state in which the operation knob 11 is in the neutral N position. When the operation knob 11 is rotated by a certain amount in the direction a from this position to the manual closing MC position, a manual closing operation for closing the window is performed manually, and the operation knob 11 is further rotated in the direction a from this position. When the auto-close AC position is set, the auto-close operation is performed to close the window by the auto-operation. Further, when the operation knob 11 is rotated by a certain amount in the b direction from the neutral N position to the manual opening MO position, a manual opening operation is performed in which the window is opened manually, and the operation knob is further moved in the b direction from this position. When 11 is rotated to the auto-open AO position, an auto-open operation is performed in which the window is opened by auto operation. The operation knob 11 is provided with a spring (not shown), and when the hand is released from the rotated operation knob 11, the operation knob 11 returns to the neutral N position by the force of the spring.

マニュアル動作の場合は、操作ノブ11がマニュアル閉MCまたはマニュアル開MOの位置に手で保持され続ける間だけ、窓を閉じる動作または開ける動作が行われ、操作ノブ11から手を離してノブが中立Nの位置に復帰すると、窓の閉動作または開動作は停止する。一方、オート動作の場合は、一旦、操作ノブ11がオート閉ACまたはオート開AOの位置まで回転されると、その後は操作ノブ11から手を離してノブが中立Nの位置に復帰しても、窓の閉動作または開動作が継続して行われる。   In the case of manual operation, the operation of closing or opening the window is performed only while the operation knob 11 is held by hand in the position of manual closing MC or manual opening MO, and the knob is neutral by releasing the hand from the operation knob 11. When returning to the N position, the window closing or opening operation stops. On the other hand, in the case of the automatic operation, once the operation knob 11 is rotated to the position of the auto-close AC or auto-open AO, after that, the hand is released from the operation knob 11 and the knob returns to the neutral N position. The window closing operation or opening operation is continuously performed.

図3は、車両の各窓に設けられる窓開閉機構の一例を示した図である。100は自動車の窓、101は窓100を開閉する窓ガラス、102はXアーム式の窓開閉機構である。窓ガラス101は、窓開閉機構102の作動により昇降動作を行い、窓ガラス101の上昇により窓100が閉じ、窓ガラス101の下降により窓100が開く。窓開閉機構102において、103は窓ガラス101の下端に取り付けられた支持部材である。104は一端が支持部材103に係合され、他端がブラケット106に回転可能に支持された第1アーム、105は一端が支持部材103に係合され、他端がガイド部材107に係合された第2アームである。第1アーム104と第2アーム105とは、それぞれの中間部において軸を介して連結されている。3は前述のモータ、4は前述のロータリエンコーダである。ロータリエンコーダ4はモータ3の回転軸に連結されており、モータ3の回転量に比例した数のパルスを出力する。所定時間内にロータリエンコーダ4から出力されるパルスを計数することにより、モータ3の回転速度を検出することができる。また、ロータリエンコーダ4の出力から、モータ3の回転量(窓ガラス101の移動量)を算出することができる。   FIG. 3 is a view showing an example of a window opening / closing mechanism provided in each window of the vehicle. Reference numeral 100 denotes an automobile window, 101 denotes a window glass for opening and closing the window 100, and 102 denotes an X arm type window opening and closing mechanism. The window glass 101 moves up and down by the operation of the window opening / closing mechanism 102, the window 100 is closed when the window glass 101 is raised, and the window 100 is opened when the window glass 101 is lowered. In the window opening / closing mechanism 102, 103 is a support member attached to the lower end of the window glass 101. 104 is a first arm whose one end is engaged with the support member 103, and the other end is rotatably supported by the bracket 106. 105 is one end engaged with the support member 103, and the other end is engaged with the guide member 107. Second arm. The 1st arm 104 and the 2nd arm 105 are connected via the axis | shaft in each intermediate part. 3 is the motor described above, and 4 is the rotary encoder described above. The rotary encoder 4 is connected to the rotating shaft of the motor 3 and outputs a number of pulses proportional to the amount of rotation of the motor 3. The rotational speed of the motor 3 can be detected by counting the pulses output from the rotary encoder 4 within a predetermined time. Further, the amount of rotation of the motor 3 (the amount of movement of the window glass 101) can be calculated from the output of the rotary encoder 4.

109はモータ3により回転駆動されるピニオン、110はピニオン109と噛合して回転する扇形のギヤである。ギヤ110は、第1アーム104に固定されている。モータ3は正逆方向に回転可能であり、正逆方向への回転によりピニオン109およびギヤ110を回転させて、第1アーム104を正逆方向へ回動させる。これに追随して、第2アーム105の他端がガイド部材107の溝に沿って横方向にスライドし、支持部材103が上下方向に移動して窓ガラス101を昇降させ、窓100を開閉する。   Reference numeral 109 denotes a pinion that is rotationally driven by the motor 3, and 110 denotes a fan-shaped gear that meshes with the pinion 109 and rotates. The gear 110 is fixed to the first arm 104. The motor 3 can rotate in the forward and reverse directions, and rotates the pinion 109 and the gear 110 by rotating in the forward and reverse directions to rotate the first arm 104 in the forward and reverse directions. Following this, the other end of the second arm 105 slides laterally along the groove of the guide member 107, and the support member 103 moves up and down to raise and lower the window glass 101, thereby opening and closing the window 100. .

以上のようなパワーウィンドウ装置において、操作ノブ11が図2のオート閉ACの位置にあってオート閉動作が行われる場合やマニュアル閉MCの位置にあってマニュアル閉動作が行われる場合に、物体の挟み込みを検知する機能が備わっている。すなわち、図4に示したように、窓100が閉まる途中で窓ガラス101の隙間に物体Zが挟み込まれた場合、これを検知して窓100の閉動作を停止したり、開動作へ切り換えたりするようになっている。特に、オート閉動作中は窓100が自動的に閉じるため、誤って手や首などが挟まれた場合に、閉動作を禁止して人体に危害が加わるのを防止する必要性から、このような挟み込み検知機能が設けられる。挟み込みの検知にあたっては、例えば、パルス検出回路5の出力であるモータ3の回転速度を制御部8が随時読み込み、現在の回転速度と以前の回転速度とを比較して、その比較結果に基づいてモータ3の回転異常の有無を判定し、該判定結果から挟み込みの有無を判断する。具体的には、窓100に物体Zの挟み込みが発生すると、急激にモータ3の負荷が増大して回転速度が低下する異常が生じるため、回転速度の変化量が大きくなり、この変化量が所定の閾値を超えたときに、物体Zが挟み込まれたと判断する。閾値はメモリ6に予め記憶されている。   In the power window device as described above, when the operation knob 11 is at the automatic closing AC position in FIG. 2 and the automatic closing operation is performed, or when the manual closing operation is performed at the manual closing MC position, the object It has a function to detect pinching. That is, as shown in FIG. 4, when the object Z is sandwiched in the gap between the window glass 101 while the window 100 is closed, this is detected and the closing operation of the window 100 is stopped or switched to the opening operation. It is supposed to be. In particular, since the window 100 automatically closes during the automatic closing operation, it is necessary to prevent the human body from being harmed by prohibiting the closing operation when a hand or neck is accidentally pinched. A pinch detection function is provided. In detecting pinching, for example, the control unit 8 reads the rotational speed of the motor 3 that is the output of the pulse detection circuit 5 as needed, compares the current rotational speed with the previous rotational speed, and based on the comparison result. The presence or absence of rotation abnormality of the motor 3 is determined, and the presence or absence of pinching is determined from the determination result. Specifically, when the object Z is caught in the window 100, an abnormality occurs in which the load of the motor 3 increases suddenly and the rotational speed decreases, so that the amount of change in the rotational speed increases, and this amount of change is predetermined. When the threshold value is exceeded, it is determined that the object Z is sandwiched. The threshold value is stored in the memory 6 in advance.

上記以外に、例えば下記の特許文献1では、窓が閉じる過程において、モータの作動状態の時々刻々の変化に応じて閾値をリアルタイムで最適値、即ち所定のモータの回転周期に予め対応付けられた値に更新し、該更新後の閾値をリアルタイムでモータの回転周期変化率と比較して異物の挟み込みの有無を判定している。また、例えば下記の特許文献2では、モータの回転速度の変動率と、検出或いは算出された窓位置とに基づいて閾値を補正し、該補正後の閾値と変動率とを比較して、変動率が(特に回転速度の減少方向へ)閾値より増大する場合に、挟み込み有りと判定している。さらに、例えば下記の特許文献3では、直流電源の電源電圧に基づいて直流モータの推定回転数を演算し、回転数センサの検出値に基づいて直流モータの実際の回転数を検出し、推定回転数を実際の回転数および推定回転数の所定時間内での偏差に基づいて補正して、該補正後の推定回転数および実際の回転数の偏差が閾値を超えたときに挟み込み有りと判定している。   In addition to the above, for example, in the following Patent Document 1, in the process of closing the window, the threshold value is associated in advance with an optimum value in real time, that is, a predetermined motor rotation period in accordance with the momentary change of the operating state of the motor. The value is updated to a value, and the updated threshold value is compared with the motor rotation cycle change rate in real time to determine whether foreign matter is caught. For example, in Patent Document 2 below, the threshold value is corrected based on the fluctuation rate of the rotation speed of the motor and the detected or calculated window position, and the corrected threshold value is compared with the fluctuation rate to change When the rate increases above the threshold (especially in the direction of decreasing rotation speed), it is determined that there is pinching. Further, for example, in Patent Document 3 below, the estimated rotational speed of the DC motor is calculated based on the power supply voltage of the DC power supply, the actual rotational speed of the DC motor is detected based on the detected value of the rotational speed sensor, and the estimated rotational speed is calculated. The number is corrected based on the deviation between the actual rotation speed and the estimated rotation speed within a predetermined time, and when the deviation between the corrected estimated rotation speed and the actual rotation speed exceeds a threshold value, it is determined that the object is caught. ing.

特開平8−128259号公報JP-A-8-128259 特開平11−324481号公報JP-A-11-324481 特開2002−250175号公報JP 2002-250175 A

上述したXアーム式の窓開閉機構102を用いたパワーウィンドウ装置では、てこの原理により第1アーム104が水平状態に近づくに連れて、モータ3にかかる負荷が大きくなって、モータ3の回転速度が徐々に低下し、水平状態から離れるに連れて、モータ3にかかる負荷が小さくなって、モータ3の回転速度が徐々に上昇することがある。また、低温下での窓枠に設置されたゴム材等の硬化や塵埃の介在や各部の磨耗等により窓ガラス101の摺動抵抗が徐々に大きくなって、モータ3の回転速度が徐々に低下することがある。上記のような構造的要因や周囲環境的要因や経時変化的要因によるモータの回転速度の変動は、他の方式の窓開閉機構を用いたパワーウィンドウ装置でも起こることがある。上記のようにモータの回転速度が徐々に低下、即ち一定の減速傾向にある場合、該回転速度の変化量は「0」以外の値でかつ「+」と「−」のうち閾値に達し易い方の値(閾値側へ寄った値)となるため、挟み込みによるモータの回転異常を誤検知しないための誤検知マージン(閾値と変化量の差分)が小さくなり、例えば悪路走行時の振動やドア開閉時の衝撃等の外乱の影響でモータの回転速度が脈動したとき等に、実際には挟み込みによるモータの回転異常が生じていないのに生じたと誤検知し易くなる。また、モータの回転速度が徐々に上昇、即ち一定の加速傾向にある場合、該回転速度の変化量は「0」以外の値でかつ「+」と「−」のうち閾値に達し難い方の値(閾値と反対側へ寄った値)となるため、上記誤検知マージンが大きくなり、外乱の影響によるモータの回転異常の誤検知だけでなく、実際の挟み込みによるモータの回転異常も検知し難くなる。   In the power window device using the X-arm type window opening / closing mechanism 102 described above, the load applied to the motor 3 increases as the first arm 104 approaches the horizontal state by the lever principle, and the rotational speed of the motor 3 increases. Gradually decreases, and the load on the motor 3 decreases as the distance from the horizontal state increases, and the rotational speed of the motor 3 may gradually increase. In addition, the sliding resistance of the window glass 101 gradually increases due to the hardening of rubber materials installed on the window frame at low temperatures, the presence of dust, the wear of each part, etc., and the rotational speed of the motor 3 gradually decreases. There are things to do. Variations in the rotational speed of the motor due to structural factors, ambient environmental factors, and time-dependent factors as described above may also occur in power window devices using other types of window opening / closing mechanisms. As described above, when the rotational speed of the motor is gradually reduced, that is, when there is a constant deceleration tendency, the amount of change in the rotational speed is a value other than “0” and easily reaches a threshold value between “+” and “−”. Therefore, the false detection margin (difference between the threshold and the amount of change) for preventing erroneous detection of abnormal rotation of the motor due to pinching is reduced. When the rotational speed of the motor pulsates due to the influence of a disturbance such as an impact at the time of opening and closing the door, it is easy to erroneously detect that the motor rotation abnormality due to pinching has not actually occurred. In addition, when the rotational speed of the motor gradually increases, that is, has a constant acceleration tendency, the amount of change in the rotational speed is a value other than “0” and it is difficult to reach the threshold value between “+” and “−”. Value (a value on the opposite side of the threshold), the above-mentioned false detection margin becomes large, and it is difficult to detect not only motor rotation abnormality due to disturbance but also motor rotation abnormality due to actual pinching. Become.

そこで、本発明では、電動機の回転速度が一定の変化(減速または加速)傾向にあっても、電動機の回転異常を正確に検知可能な電動機制御装置を提供することを課題とする。   Therefore, an object of the present invention is to provide an electric motor control device that can accurately detect abnormal rotation of the electric motor even when the electric motor rotational speed tends to change (decelerate or accelerate).

本発明に係る電動機制御装置は、回転速度が一定の変化傾向にある電動機を制御する電動機制御装置であって、電動機の回転速度を検出する検出手段と、検出手段で検出された回転速度を順次記憶する第1の記憶手段と、検出手段から出力される現在の回転速度と第1の記憶手段に記憶されている過去の回転速度とから回転速度の変化量を1回変化量として算出する第1の算出手段と、第1の算出手段で算出された1回変化量を順次記憶する第2の記憶手段と、第1の算出手段で算出された現在の1回変化量と第2の記憶手段に記憶されている過去の1回変化量とから回転速度の変化量の変化量を2回変化量として算出する第2の算出手段と、第2の算出手段で算出された2回変化量を順次記憶する第3の記憶手段と、予め設定された閾値を変更する閾値変更手段と、閾値と1回変化量とを比較する比較手段と、比較手段の比較結果に基づいて電動機の回転異常の有無を判定する判定手段と、判定手段の判定結果に応じて電動機を制御する制御手段とを備え、第2の記憶手段および第3の記憶手段に記憶されている所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が予め設定された第1の所定値に達し(第1の所定値を超えた場合も含む。以下同様。)、かつ2回変化量が予め設定された第2の所定値に達していない場合に、閾値変更手段は閾値を変更し、比較手段は該変更後の閾値と1回変化量とを比較する。 An electric motor control device according to the present invention is an electric motor control device that controls an electric motor whose rotation speed tends to be constant, and detects a rotation speed of the electric motor, and a rotation speed detected by the detection means in order. A first amount of change is calculated as a one-time change amount from the first storage means to be stored, the current rotation speed output from the detection means, and the past rotation speed stored in the first storage means. 1 calculation means, second storage means for sequentially storing the one-time change amount calculated by the first calculation means, and the current one-time change amount and second storage calculated by the first calculation means. A second calculating means for calculating a change amount of the rotational speed change amount as a two-time change amount from a past one-time change amount stored in the means; and a two-time change amount calculated by the second calculation means. A third storage means for sequentially storing and a preset threshold value According to the determination result of the threshold value changing means, the comparing means for comparing the threshold value with the one-time change amount, the determining means for determining the presence or absence of rotation abnormality of the motor based on the comparison result of the comparing means, Control means for controlling the electric motor, and one time out of the one-time change amount and the two-time change amount calculated in a predetermined section before the predetermined number of times stored in the second storage means and the third storage means The amount of change has reached a preset first predetermined value (including the case where it exceeds the first predetermined value; the same applies hereinafter), and the amount of change twice has reached a preset second predetermined value. If not, the threshold value changing means changes the threshold value, and the comparing means compares the changed threshold value with the amount of change once.

上記閾値変更手段による閾値の変更のし方は、第1の所定値および第2の所定値の設定状態と、1回変化量および2回変化量から判断される電動機の回転速度の変化傾向に応じて変える。具体的には、第1の所定値および第2の所定値を、1回変化量および2回変化量が当該所定値に達するかまたは達しないかにより電動機の回転速度が一定の減速傾向にあるか否かを判断できるような値にそれぞれ設定した状態では、閾値変更手段は、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値以上となることで当該第1の所定値に達しかつ2回変化量が第2の所定値未満となることで当該第2の所定値に達していない場合に、電動機の回転速度が一定の減速傾向にあると判断して、1回変化量が閾値に達し難くなるように閾値を変更する。このようにすると、電動機の回転速度が一定の減速(徐々に低下)傾向にある場合は、1回変化量が閾値に達し難くなるように閾値が変更されて、電動機の回転異常の誤検知マージン(閾値と1回変化量の差分)を大きくすることができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなり、電動機の回転異常を正確に検知可能となる。 How to change the threshold value by the threshold value changing means depends on the setting state of the first predetermined value and the second predetermined value, and the change tendency of the rotation speed of the motor determined from the one-time change amount and the two-time change amount. Change accordingly. Specifically, the first predetermined value and the second predetermined value have a tendency to decelerate the electric motor at a constant speed depending on whether the amount of change once and the amount of change twice does not reach the predetermined value. In the state where each value is set such that it can be determined whether or not, the threshold value changing means has the first change amount of the first change amount and the second change amount calculated in the predetermined section a predetermined number of times before the first change amount. rotational speed of the by equal to or greater than a predetermined value reaches the said first predetermined value, and if the two times amount of change has not reached to the second predetermined value by less than a second predetermined value, the electric motor , The threshold value is changed so that the amount of change once does not easily reach the threshold value. In this way, when the rotational speed of the electric motor is in a predetermined decelerating (gradually lowered) trend, once the change amount is changed threshold so difficult reaches the threshold, the rotation abnormality of the erroneous detection margin of the motor (Difference between the threshold and the amount of change once) can be increased. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the electric motor due to the influence of disturbance or the like, and it becomes possible to accurately detect the abnormality in the rotation of the electric motor.

また、第1の所定値および第2の所定値を、1回変化量および2回変化量が当該所定値に達するかまたは達しないかにより電動機の回転速度が一定の加速傾向にあるか否かを判断できるような値にそれぞれ設定した状態では、閾値変更手段は、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値以下となることで当該第1の所定値に達しかつ2回変化量が第2の所定値より大きくなることで当該第2の所定値に達していない場合に、電動機の回転速度が一定の加速傾向にあると判断して、1回変化量が閾値に達し易くなるように閾値を変更する。このようにすると、電動機の回転速度が一定の加速(徐々に上昇)傾向にある場合は、1回変化量が閾値に達し易くなるように閾値が変更されて、電動機の回転異常の誤検知マージンを小さくすることができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなるとともに、実際に電動機の回転異常が生じたときに回転異常無しと誤判定し難くなり、電動機の回転異常を正確に検知可能となる。 Further, the first predetermined value and the second predetermined value are determined based on whether or not the rotation speed of the electric motor has a constant acceleration tendency depending on whether the amount of change once and the amount of change twice does not reach the predetermined value. In the state where each is set to a value that can be determined, the threshold value changing means has a first change value of the first change value and the first change value calculated in the predetermined section a predetermined number of times before the first predetermined value. The rotational speed of the motor is constant when the first predetermined value is reached by the following , and the amount of change twice is not larger than the second predetermined value and does not reach the second predetermined value . The threshold value is changed so that the amount of change once reaches the threshold value easily because it is determined that there is an acceleration tendency. In this way, when the rotational speed of the electric motor is in a constant acceleration (gradual increase) trend, once the change amount is changed threshold so easily reaches the threshold, the rotation abnormality of the erroneous detection margin of the motor Can be reduced. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the motor due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no rotation abnormality when the rotation abnormality of the motor actually occurs. Detectable.

また、本発明に係る電動機制御装置では、閾値変更手段が、上述した閾値の変更後に、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値に達しなくなった場合または2回変化量が第2の所定値に達した場合に、変更した閾値を元の値に戻す。   Further, in the motor control device according to the present invention, the threshold value changing means has a one-time change amount among the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times after the threshold value is changed. When the first predetermined value is not reached, or when the twice change amount reaches the second predetermined value, the changed threshold value is returned to the original value.

例えば、電動機の回転速度が一定の減速傾向から一定の加速傾向に切り替わった場合に、上述したように閾値を1回変化量が達し難くなるように変更したままにしておくと、1回変化量が「0」以外の値でかつ「+」と「−」のうち閾値に達し難い方の値(閾値と反対側に寄った値)になるため、電動機の回転異常の誤検知マージンが大きくなり過ぎて、外乱の影響等による電動機の回転異常の誤検知だけでなく、実際の電動機の回転異常も検知し難くなる。然るに、上記のようにすると、電動機の回転速度が一定の減速傾向から一定の加速傾向に切り替わった場合には、1回変化量が「0」より「+」側と「−」側のうち閾値に達し難い側に推移した後飽和して第1の所定値に達しなくなり、2回変化量が一旦「0」より「+」側と「−」側のうち閾値に達し難い側に推移した後また「0」付近に戻って飽和して第2の所定値に達しないので、変更された閾値が元の値に戻されて、電動機の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなるとともに、実際に電動機の回転異常が生じたときに回転異常無しと誤判定し難くなり、電動機の回転異常を正確に検知可能となる。   For example, when the rotation speed of the electric motor is switched from a constant deceleration tendency to a constant acceleration tendency, as described above, if the threshold value is changed so that it is difficult to reach the one-time change amount, the one-time change amount Is a value other than “0” and “+” or “−” that is harder to reach the threshold value (a value that is closer to the opposite side of the threshold value). Thus, it becomes difficult not only to detect erroneous rotation of the motor due to the influence of disturbance, but also to detect abnormal rotation of the actual motor. However, if the rotation speed of the electric motor is switched from a constant deceleration tendency to a constant acceleration tendency, the amount of change once is a threshold value between “+” side and “−” side from “0”. After shifting to the side where it is difficult to reach the value, it is saturated and does not reach the first predetermined value, and the amount of change twice changes once from “0” to the side where it is difficult to reach the threshold value among the “+” side and the “−” side In addition, since it returns to the vicinity of “0” and saturates and does not reach the second predetermined value, the changed threshold value is returned to the original value, and the erroneous detection margin for abnormal rotation of the motor is prevented from becoming too large. be able to. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the motor due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no rotation abnormality when the rotation abnormality of the motor actually occurs. Detectable.

また例えば、電動機の回転速度が一定の加速傾向から変化した(一定の加速傾向を示さなくなった)場合に、上述したように閾値を1回変化量が達し易くなるように変更したままにしておくと、1回変化量が閾値に達し易い値(閾値側に寄った値)になるため、電動機の回転異常の誤検知マージンが小さくなり過ぎて、外乱の影響等による電動機の回転異常を誤検知し易くなる。然るに、上記のようにすると、電動機の回転速度が一定の加速傾向から変化した場合には、1回変化量が閾値に達し易い側に推移して第1の所定値に達しなくなり、2回変化量が「0」より「+」側と「−」側のうち閾値に達し易い側に推移して第2の所定値に達しないので、変更された閾値が元の値に戻されて、電動機の回転異常の誤検知マージンを小さくなり過ぎないよう抑制することができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなり、電動機の回転異常を正確に検知可能となる。   Further, for example, when the rotation speed of the electric motor changes from a constant acceleration tendency (no longer shows a constant acceleration tendency), the threshold value is changed so that the change amount can be easily reached once as described above. Since the amount of change once reaches a threshold value (a value close to the threshold value), the erroneous detection margin for abnormal rotation of the motor becomes too small, and the abnormal rotation of the motor due to the influence of disturbance, etc. is erroneously detected. It becomes easy to do. However, if the rotational speed of the motor changes from a certain acceleration tendency, the amount of change once changes to the side where it easily reaches the threshold value and does not reach the first predetermined value. Since the amount shifts from “0” to the “+” side and “−” side that easily reaches the threshold value and does not reach the second predetermined value, the changed threshold value is returned to the original value, and the electric motor It is possible to prevent the erroneous detection margin of the rotation abnormality from becoming too small. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the electric motor due to the influence of disturbance or the like, and it becomes possible to accurately detect the abnormality in the rotation of the electric motor.

また、他の本発明に係る電動機制御装置は、回転速度が一定の変化傾向にある電動機を制御する電動機制御装置であって、電動機の回転速度を検出する検出手段と、検出手段で検出された回転速度を順次記憶する第1の記憶手段と、検出手段から出力される現在の回転速度と第1の記憶手段に記憶されている過去の回転速度とから回転速度の変化量を1回変化量として算出する第1の算出手段と、第1の算出手段で算出された1回変化量を順次記憶する第2の記憶手段と、第1の算出手段で算出された1回変化量を変更する変化量変更手段と、第1の算出手段で算出された現在の1回変化量と第2の記憶手段に記憶されている過去の1回変化量とから回転速度の変化量の変化量を2回変化量として算出する第2の算出手段と、第2の算出手段で算出された2回変化量を順次記憶する第3の記憶手段と、予め設定された閾値と1回変化量とを比較する比較手段と、比較手段の比較結果に基づいて電動機の回転異常の有無を判定する判定手段と、判定手段の判定結果に応じて電動機を制御する制御手段とを備え、第2の記憶手段および第3の記憶手段に記憶されている所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が予め設定された第1の所定値に達し、かつ2回変化量が予め設定された第2の所定値に達していない場合に、変化量変更手段は1回変化量を変更し、比較手段は該変更後の1回変化量と前記閾値とを比較する。 Another electric motor control device according to the present invention is an electric motor control device that controls an electric motor whose rotational speed is in a constant change tendency, and is detected by a detecting means that detects the rotational speed of the electric motor, and the detecting means. The amount of change in the rotation speed is changed once from the first storage means for sequentially storing the rotation speed, the current rotation speed output from the detection means, and the past rotation speed stored in the first storage means. The first calculation means for calculating the first change amount, the second storage means for sequentially storing the one-time change amount calculated by the first calculation means, and the one-time change amount calculated by the first calculation means are changed. The change amount of the change amount of the rotational speed is calculated from the current change amount calculated by the change amount change unit, the first calculation unit, and the past change amount stored in the second storage unit. Second calculation means for calculating the amount of change in rotation, and second calculation means Third storage means for sequentially storing the calculated twice-change amount, comparison means for comparing a preset threshold value with the one-time change amount, and presence / absence of abnormal rotation of the motor based on the comparison result of the comparison means And a control unit that controls the electric motor according to the determination result of the determination unit, and is calculated in a predetermined section before a predetermined number of times stored in the second storage unit and the third storage unit. Of the one-time change amount and the two-time change amount, the one-time change amount has reached a preset first predetermined value, and the twice-change amount has not reached a preset second predetermined value. In addition, the change amount changing means changes the change amount once, and the comparison means compares the changed once change amount with the threshold value.

上記変化量変更手段による1回変化量の変更のし方は、第1の所定値および第2の所定値の設定状態と、1回変化量および2回変化量から判断される電動機の回転速度の変化傾向とに応じて変える。具体的には、第1の所定値および第2の所定値を、1回変化量および2回変化量が当該所定値に達するかまたは達しないかにより電動機の回転速度が一定の減速傾向にあるか否かを判断できるような値にそれぞれ設定した状態では、変化量変更手段は、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値以上となることで当該第1の所定値に達しかつ2回変化量が第2の所定値未満となることで当該第2の所定値に達していない場合に、電動機の回転速度が一定の減速傾向にあると判断して、1回変化量が閾値に達し難くなるように1回変化量を変更する。このようにすると、電動機の回転速度が一定の減速傾向にある場合は、1回変化量が閾値に達し難くなるように変更されて、電動機の回転異常の誤検知マージンを大きくすることができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなり、電動機の回転異常を正確に検知可能となる。 The method of changing the one-time change amount by the change amount changing means is to set the first predetermined value and the second predetermined value, and the rotation speed of the motor determined from the one-time change amount and the two-time change amount. It changes according to the change tendency. Specifically, the first predetermined value and the second predetermined value have a tendency to decelerate the electric motor at a constant speed depending on whether the amount of change once and the amount of change twice does not reach the predetermined value. In the state where each value is set so that it can be determined whether or not, the change amount changing means has the first change amount of the first change amount and the second change amount calculated in the predetermined section before the predetermined number of times. If the first predetermined value is reached by being greater than or equal to a predetermined value of 1, and if the amount of change twice is less than the second predetermined value and has not reached the second predetermined value , the rotation of the motor It is determined that the speed tends to be a constant deceleration, and the amount of change once is changed so that the amount of change once does not easily reach the threshold value. In this way, when the rotational speed of the electric motor is in a certain slowdown it can be one variation is changed to be hardly reach the threshold value, increasing the false detection margin of rotation abnormality of the electric motor. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the electric motor due to the influence of disturbance or the like, and it becomes possible to accurately detect the abnormality in the rotation of the electric motor.

また、第1の所定値および前記第2の所定値を、1回変化量および2回変化量が当該所定値に達するかまたは達しないかにより電動機の回転速度が一定の加速傾向にあるか否かを判断できるような値にそれぞれ設定した状態では、変化量変更手段は、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値以下となることで当該第1の所定値に達しかつ2回変化量が第2の所定値より大きくなることで当該第2の所定値に達していない場合に、電動機の回転速度が一定の加速傾向にあると判断して、1回変化量が閾値に達し易くなるように1回変化量を変更する。このようにすると、電動機の回転速度が一定の加速傾向にある場合は、1回変化量が閾値に達し易くなるように変更されて、電動機の回転異常の誤検知マージンを小さくすることができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなるとともに、実際に電動機の回転異常が生じたときに回転異常無しと誤判定し難くなり、電動機の回転異常を正確に検知可能となる。 Further, the first predetermined value and the second predetermined value are set based on whether or not the rotation speed of the electric motor has a constant acceleration tendency depending on whether the one-time change amount and the two-time change amount reach or do not reach the predetermined value. In such a state that each of the change amounts is set to such a value that it can be determined, the change amount changing means has the first change amount of the first change amount and the second change amount calculated in the predetermined section a predetermined number of times before the first change amount. When the first predetermined value is reached by being less than or equal to a predetermined value , and the amount of change twice is greater than the second predetermined value and has not reached the second predetermined value , the rotational speed of the motor is It is determined that the acceleration tendency is constant, and the one-time change amount is changed so that the one-time change amount easily reaches the threshold value. In this way, when the rotation speed of the electric motor has a constant acceleration tendency, the change amount is changed so that the one- time change amount easily reaches the threshold value, and the erroneous detection margin of the rotation abnormality of the electric motor can be reduced. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the motor due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no rotation abnormality when the rotation abnormality of the motor actually occurs. Detectable.

また、他の本発明に係る電動機制御装置では、変化量変更手段が、上述した1回変化量の変更後に、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値に達しなくなった場合または2回変化量が第2の所定値に達した場合に、1回変化量の変更を止める。   Moreover, in the electric motor control device according to another aspect of the present invention, the change amount changing means includes the one-time change amount and the two-time change amount calculated for the predetermined section before the predetermined number of times after the change of the one-time change amount described above. When the amount of change once does not reach the first predetermined value or when the amount of change twice reaches the second predetermined value, the change of the amount of change once is stopped.

例えば、電動機の回転速度が一定の減速傾向から一定の加速傾向に切り替わった場合に、上述したように1回変化量を閾値に達し難くなるように変更するのを継続していると、1回変化量が「0」以外の値でかつ「+」と「−」のうち閾値に達し難い方の値になるため、電動機の回転異常の誤検知マージンが大きくなり過ぎて、外乱の影響等による電動機の回転異常の誤検知だけでなく、実際の電動機の回転異常も検知し難くなる。然るに、上記のようにすると、電動機の回転速度が一定の減速傾向から一定の加速傾向に切り替わった場合には、1回変化量が「0」より「+」側と「−」側のうち閾値に達し難い側に推移した後飽和して第1の所定値に達しなくなり、2回変化量が一旦「0」より「+」側と「−」側のうち閾値に達し難い側に推移した後また「0」付近に戻って飽和して第2の所定値に達しないので、1回変化量が変更されなくなって、電動機の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなるとともに、実際に電動機の回転異常が生じたときに回転異常無しと誤判定し難くなり、電動機の回転異常を正確に検知可能となる。   For example, when the rotation speed of the electric motor is switched from a constant deceleration tendency to a constant acceleration tendency, as described above, once the change amount is changed so as to hardly reach the threshold value, once Since the amount of change is a value other than “0” and “+” or “−” is difficult to reach the threshold value, the erroneous detection margin of the rotation abnormality of the motor becomes too large, due to the influence of disturbance, etc. It becomes difficult not only to detect erroneous rotation of the motor but also to detect abnormal rotation of the actual motor. However, if the rotation speed of the electric motor is switched from a constant deceleration tendency to a constant acceleration tendency, the amount of change once is a threshold value between “+” side and “−” side from “0”. After shifting to the side where it is difficult to reach the value, it is saturated and does not reach the first predetermined value, and the amount of change twice changes once from “0” to the side where it is difficult to reach the threshold value among the “+” side and the “−” side In addition, since it returns to the vicinity of “0” and saturates and does not reach the second predetermined value, the amount of change once is not changed, and it is possible to suppress an erroneous detection margin for abnormal rotation of the motor from being excessively increased. . For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the motor due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no rotation abnormality when the rotation abnormality of the motor actually occurs. Detectable.

また例えば、電動機の回転速度が一定の加速傾向から変化した場合に、上述したように1回変化量を閾値に達し易くなるように変更するのを継続していると、1回変化量が閾値に達し易い値になるため、電動機の回転異常の誤検知マージンが小さくなり過ぎて、外乱の影響等による電動機の回転異常を誤検知し易くなる。然るに、上記のようにすると、電動機の回転速度が一定の加速傾向から変化した場合には、1回変化量が「0」より「+」側と「−」側のうち閾値に達し易い側に推移して第1の所定値に達しなくなり、2回変化量が「0」より「+」側と「−」側のうち閾値に達し易い側に推移して第2の所定値に達しないので、1回変化量が変更されなくなって、電動機の回転異常の誤検知マージンを小さくなり過ぎないよう抑制することができる。このため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなり、電動機の回転異常を正確に検知可能となる。   Further, for example, when the rotation speed of the motor changes from a constant acceleration tendency, if the change amount is changed so as to easily reach the threshold value as described above, the change amount once becomes the threshold value. Therefore, the erroneous detection margin for abnormal rotation of the motor becomes too small, and it becomes easy to erroneously detect abnormal rotation of the motor due to the influence of disturbance or the like. However, if the rotation speed of the motor is changed from a certain acceleration tendency, the amount of change in one time is more likely to reach the threshold value from the “+” side and the “−” side than “0”. Since the transition does not reach the first predetermined value, the amount of change twice changes from “0” to the “+” side and the “−” side, which tends to reach the threshold value, and does not reach the second predetermined value. It can be suppressed that the amount of change once is not changed and the erroneous detection margin of the rotation abnormality of the electric motor does not become too small. For this reason, it becomes difficult to erroneously determine whether there is an abnormality in the rotation of the electric motor due to the influence of disturbance or the like, and it becomes possible to accurately detect the abnormality in the rotation of the electric motor.

さらに、本発明に係る電動機制御装置では、制御手段は、所定回数前の所定区間に算出された1回変化量と2回変化量のうち、1回変化量が第1の所定値に達し、かつ2回変化量が第2の所定値に達していない場合において、1回変化量が閾値に達したときに、電動機の反転または停止を禁止する。   Furthermore, in the electric motor control device according to the present invention, the control means reaches the first predetermined value of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times, In addition, when the amount of change twice does not reach the second predetermined value, when the amount of change once reaches the threshold value, the reversal or stop of the motor is prohibited.

このようにすると、電動機の回転速度が一定の減速傾向または加速傾向にある場合に、電動機が回転異常状態ではないのに、外乱の影響等により1回変化量が閾値に達しても、電動機の回転状態をそのまま維持することができる。   In this way, when the rotation speed of the motor is in a constant deceleration or acceleration trend, even if the amount of change once reaches the threshold value due to the influence of disturbance or the like even though the motor is not in an abnormal rotation state, The rotation state can be maintained as it is.

本発明によれば、電動機の回転速度が一定の変化(減速または加速)傾向にある場合に、閾値または1回変化量を変更して、電動機の回転異常の誤検知マージンの大きさを変えるため、外乱の影響等により電動機の回転異常の有無を誤判定し難くなり、電動機の回転異常を正確に検知可能となる。   According to the present invention, when the rotation speed of the electric motor tends to be a constant change (deceleration or acceleration), the threshold value or the amount of change once is changed to change the magnitude of the erroneous detection margin of the rotation abnormality of the electric motor. Thus, it becomes difficult to erroneously determine the presence or absence of the rotation abnormality of the electric motor due to the influence of disturbance, and the rotation abnormality of the electric motor can be accurately detected.

以下、本発明の実施形態につき図を参照して説明する。以下では、背景技術の項で説明した図1〜図4を本発明の実施形態として引用する。図1は、本発明の実施形態であるパワーウィンドウ装置の電気的構成を示したブロック図である。本パワーウィンドウ装置は、車両の窓の開閉を制御する開閉制御装置であって、本発明における電動機制御装置の一実施形態を構成している。モータ3は、本発明における電動機の一実施形態を構成し、制御部8は、本発明における制御手段の一実施形態を構成している。図2は、操作スイッチの一例を示した概略構成図である。図3は、車両の各窓に設けられる窓開閉機構の一例を示した図である。図4は、図3において窓に物体が挟み込まれた状態を示した図である。これらの各図についてはすでに説明済みなので、ここでは重複説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following, FIGS. 1 to 4 described in the background art section are cited as embodiments of the present invention. FIG. 1 is a block diagram showing an electrical configuration of a power window device according to an embodiment of the present invention. The power window device is an open / close control device that controls opening / closing of a vehicle window, and constitutes an embodiment of an electric motor control device according to the present invention. The motor 3 constitutes one embodiment of the electric motor in the present invention, and the control unit 8 constitutes one embodiment of the control means in the present invention. FIG. 2 is a schematic configuration diagram illustrating an example of the operation switch. FIG. 3 is a view showing an example of a window opening / closing mechanism provided in each window of the vehicle. FIG. 4 is a diagram showing a state in which an object is sandwiched in the window in FIG. Since each of these figures has already been described, redundant description is omitted here.

図5は、本発明の第1実施形態における回転異常検出ブロックを示した図である。この回転異常検出ブロックは、制御部8に備わるものであって、ここでは、81、83、85、87〜89の各ブロックを便宜上ハードウェアの回路として図示してあるが、実際にはこれらの回路の機能はソフトウェアによって実現される。勿論、ハードウェア回路によりこれらのブロックを構成してもよい。また、82、84、86の各ブロックは、制御部8のメモリの領域として確保してもよい。   FIG. 5 is a diagram showing a rotation abnormality detection block in the first embodiment of the present invention. This rotation abnormality detection block is provided in the control unit 8, and here, the blocks 81, 83, 85, and 87 to 89 are illustrated as hardware circuits for convenience, but actually these blocks are illustrated. The function of the circuit is realized by software. Of course, you may comprise these blocks with a hardware circuit. The blocks 82, 84, and 86 may be secured as a memory area of the control unit 8.

図5において、回転速度検出部81は、図1のパルス検出回路5から出力されるパルスの数を計数することによって、モータ3の回転速度を所定の周期で検出する。回転速度記憶部82は、回転速度検出部81で検出した回転速度を、図1のメモリ6の所定領域に順次記憶する。つまり、回転速度記憶部82には、所定の周期で検出した複数の回転速度が順番に記憶される。1回変化量算出部83は、回転速度検出部81から出力される現在の回転速度と、回転速度記憶部82に記憶されている過去の回転速度とから回転速度の変化量を1回変化量として算出する。1回変化量記憶部84は、1回変化量算出部83で算出した1回変化量を順次記憶する。つまり、1回変化量記憶部84には、所定の周期で算出した複数の1回変化量が順番に記憶される。2回変化量算出部85は、1回変化量算出部83から出力される現在の1回変化量と、回転速度記憶部82に記憶されている過去の1回変化量とから回転速度の変化量の変化量を2回変化量として算出する。2回変化量記憶部86は、2回変化量算出部85で算出した2回変化量を順次記憶する。つまり、2回変化量記憶部86には、所定の周期で算出した複数の2回変化量が順番に記憶される。閾値変更部87は、予め設定されてメモリ6の所定領域に記憶されている所定の閾値を、1回変化量記憶部84に記憶されている1回変化量と2回変化量記憶部86に記憶されている2回変化量とに基づいて後述するように変更する。変化量・閾値比較部88は、1回変化量算出部83から出力される1回変化量と、閾値変更部87から出力される未変更または変更後の閾値とを比較する。回転異常判定部89は、変化量・閾値比較部88での比較結果に基づいて、図4で示したような窓100に物体Zを挟み込んだことにより発生するモータ3の回転異常の有無を判定し、該判定結果に応じた制御信号を図1のモータ駆動回路2へ出力する。   In FIG. 5, the rotation speed detector 81 detects the rotation speed of the motor 3 at a predetermined cycle by counting the number of pulses output from the pulse detection circuit 5 of FIG. 1. The rotation speed storage unit 82 sequentially stores the rotation speed detected by the rotation speed detection unit 81 in a predetermined area of the memory 6 in FIG. In other words, the rotation speed storage unit 82 sequentially stores a plurality of rotation speeds detected at a predetermined cycle. The one-time change amount calculation unit 83 calculates the change amount of the rotation speed from the current rotation speed output from the rotation speed detection unit 81 and the past rotation speed stored in the rotation speed storage unit 82. Calculate as The one-time change amount storage unit 84 sequentially stores the one-time change amounts calculated by the one-time change amount calculation unit 83. That is, the one-time change amount storage unit 84 sequentially stores a plurality of one-time change amounts calculated at a predetermined cycle. The two-time change amount calculation unit 85 changes the rotation speed from the current one-time change amount output from the one-time change amount calculation unit 83 and the past one-time change amount stored in the rotation speed storage unit 82. A change amount of the amount is calculated as a change amount twice. The twice change amount storage unit 86 sequentially stores the twice change amount calculated by the twice change amount calculation unit 85. That is, the twice change amount storage unit 86 sequentially stores a plurality of twice change amounts calculated at a predetermined cycle. The threshold value changing unit 87 stores a predetermined threshold value that is preset and stored in a predetermined area of the memory 6 in the one-time change amount and the two-time change amount storage unit 86 that are stored in the one-time change amount storage unit 84. Based on the stored twice change amount, the change is made as described later. The change amount / threshold value comparison unit 88 compares the one-time change amount output from the one-time change amount calculation unit 83 with the unchanged or changed threshold value output from the threshold value changing unit 87. The rotation abnormality determination unit 89 determines whether or not there is a rotation abnormality of the motor 3 that occurs when the object Z is sandwiched in the window 100 as shown in FIG. 4 based on the comparison result in the change amount / threshold comparison unit 88. Then, a control signal corresponding to the determination result is output to the motor drive circuit 2 in FIG.

回転速度検出部81は、ロータリエンコーダ4およびパルス検出回路5とともに、本発明における検出手段の一実施形態を構成している。回転速度記憶部82は、本発明における第1の記憶手段の一実施形態を構成している。1回変化量算出部83は、本発明における第1の算出手段の一実施形態を構成している。1回変化量記憶部84は、本発明における第2の記憶手段の一実施形態を構成している。2回変化量算出部85は、本発明における第2の算出手段の一実施形態を構成している。2回変化量記憶部86は、本発明における第3の記憶手段の一実施形態を構成している。閾値変更部87は、本発明における閾値変更手段の一実施形態を構成している。変化量・閾値比較部88は、本発明における比較手段の一実施形態を構成している。回転異常判定部89は、本発明における判定手段の一実施形態を構成している。   The rotation speed detection unit 81, together with the rotary encoder 4 and the pulse detection circuit 5, constitute one embodiment of the detection means in the present invention. The rotational speed storage unit 82 constitutes an embodiment of the first storage means in the present invention. The one-time change amount calculation unit 83 constitutes an embodiment of the first calculation means in the present invention. The one-time change amount storage unit 84 constitutes an embodiment of the second storage means in the present invention. The twice change amount calculation unit 85 constitutes an embodiment of the second calculation means in the present invention. The twice change amount storage unit 86 constitutes an embodiment of the third storage means in the present invention. The threshold value changing unit 87 constitutes an embodiment of the threshold value changing means in the present invention. The change amount / threshold value comparison unit 88 constitutes an embodiment of the comparison means in the present invention. The rotation abnormality determination unit 89 constitutes an embodiment of the determination means in the present invention.

図6は、パワーウィンドウ装置の基本的な動作を示したフローチャートである。ステップS1で、図2の操作スイッチ1がマニュアル閉MCの位置にあれば、マニュアル閉動作の処理が行われ(ステップS2)、ステップS3で、操作スイッチ1がオート閉ACの位置にあれば、オート閉動作の処理が行われ(ステップS4)、ステップS5で、操作スイッチ1がマニュアル開MOの位置にあれば、マニュアル開動作の処理が行われ(ステップS6)、ステップS7で、操作スイッチ1がオート開AOの位置にあれば、オート開動作の処理が行われる(ステップS8)。また、ステップS7で、操作スイッチ1がオート開AOの位置になければ、操作スイッチ1は中立Nの位置にあって、何も処理を行わない。ステップS2、S4、S6、S8の詳細については、以下に順を追って説明する。   FIG. 6 is a flowchart showing the basic operation of the power window device. If the operation switch 1 of FIG. 2 is in the manual closing MC position in step S1, manual closing operation processing is performed (step S2). If the operation switch 1 is in the auto closing AC position in step S3, If the operation switch 1 is in the manual opening MO position in step S5, the manual opening operation is performed (step S6). In step S7, the operation switch 1 is operated. Is at the position of auto-open AO, an auto-open operation is performed (step S8). If the operation switch 1 is not in the auto-open AO position in step S7, the operation switch 1 is in the neutral N position and no processing is performed. Details of steps S2, S4, S6, and S8 will be described below in order.

図7は、図6のステップS2、後述する図9のステップS58、および図10のステップS65におけるマニュアル閉動作の詳細手順を示したフローチャートである。各手順は、制御部8を構成するCPUにより実行され、後述するフローチャートについても同様である。最初に、マニュアル閉動作により窓100が完全に閉じたか否かをロータリエンコーダ4の出力に基づいて判定する(ステップS11)。窓100が完全に閉じれば(ステップS11:YES)処理を終了し、完全に閉じてなければ(ステップS11:NO)、モータ駆動回路2から正転信号を出力してモータ3を正転させ、窓100を閉じる(ステップS12)。続いて、窓100が完全に閉じたか否かを判定し(ステップS13)、完全に閉じれば(ステップS13:YES)処理を終了する。これに対して、窓100が完全に閉じてなければ(ステップS13:NO)、モータ3の回転状態検出処理を行う(ステップS14)。この処理の詳細については後述する。   FIG. 7 is a flowchart showing a detailed procedure of the manual closing operation in step S2 of FIG. 6, step S58 of FIG. 9 described later, and step S65 of FIG. Each procedure is executed by the CPU constituting the control unit 8, and the same applies to the flowcharts described later. First, it is determined based on the output of the rotary encoder 4 whether the window 100 is completely closed by the manual closing operation (step S11). If the window 100 is completely closed (step S11: YES), the process is terminated. If the window 100 is not completely closed (step S11: NO), a normal rotation signal is output from the motor drive circuit 2 to cause the motor 3 to rotate forward. The window 100 is closed (step S12). Subsequently, it is determined whether or not the window 100 is completely closed (step S13). If the window 100 is completely closed (step S13: YES), the process is terminated. On the other hand, if the window 100 is not completely closed (step S13: NO), a rotation state detection process of the motor 3 is performed (step S14). Details of this processing will be described later.

ステップS14の処理を終了すると、図1の制御部8のメモリまたはメモリ6の所定領域に設けられている変化量・閾値比較フラグが「1」になっているか否かを判定する(ステップS15)。この変化量・閾値比較フラグは、ステップS14の処理中で後述するように閾値と1回変化量とを比較した結果を示していて、1回変化量が閾値に達している場合は「1」、1回変化量が閾値に達していない場合は「0」となる。ここで、変化量・閾値比較フラグが「1」になっていると(ステップS15:YES)、続いて、制御部8のメモリまたはメモリ6の所定領域に設けられている変更条件フラグが「0」になっているか否かを判定する(ステップS16)。この変更条件フラグは、ステップS14の処理中で後述するように1回変化量と2回変化量が所定の条件を満たしているか否かの判定結果を示していて、所定の条件を満たしている場合は「1」、満たしていない場合は「0」となる。ここで、変更条件フラグが「0」になっていると(ステップS16:YES)、図4で示したような窓100への物体Zの挟み込みによるモータ3の回転異常が発生したと判断する(ステップS17)。そして、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開く(ステップS18)。これによって、挟み込みが解除される。そして、窓100が完全に開いたか否かを判定し(ステップS19)、完全に開けば(ステップS19:YES)処理を終了し、完全に開いてなければ(ステップS19:NO)、ステップS18へ戻ってモータ3の逆転を継続する。   When the processing of step S14 is completed, it is determined whether or not the change amount / threshold comparison flag provided in a predetermined area of the memory of the control unit 8 or the memory 6 of FIG. 1 is “1” (step S15). . This change amount / threshold comparison flag indicates the result of comparing the threshold value and the one-time change amount as will be described later in the process of step S14. When the one-time change amount reaches the threshold value, “1” is set. When the amount of change once does not reach the threshold, it is “0”. If the change amount / threshold comparison flag is “1” (step S15: YES), then the change condition flag provided in a predetermined area of the memory of the control unit 8 or the memory 6 is “0”. Is determined (step S16). This change condition flag indicates a determination result as to whether or not the one-time change amount and the two-time change amount satisfy a predetermined condition as will be described later in the process of step S14, and satisfies the predetermined condition. If it is not satisfied, it is “0”. Here, if the change condition flag is “0” (step S16: YES), it is determined that the rotation abnormality of the motor 3 has occurred due to the object Z being caught in the window 100 as shown in FIG. Step S17). Then, the motor drive circuit 2 outputs a reverse rotation signal to reverse the motor 3 and open the window 100 (step S18). Thereby, the pinching is released. Then, it is determined whether or not the window 100 is completely opened (step S19). If the window 100 is completely opened (step S19: YES), the process is terminated. If not completely opened (step S19: NO), the process proceeds to step S18. Return to continue the reverse rotation of the motor 3.

一方、ステップS15で1回変化量・閾値比較フラグが「0」になっている場合(ステップS15:NO)や、ステップS16で変更条件フラグが「1」になっている場合(ステップS16:NO)は、窓100への物体Zの挟み込みによるモータ3の回転異常が発生していないと判断する(ステップS20)。そして、モータ駆動回路2からモータ3の反転と停止を禁止する信号を出力し、モータ3の正転をそのまま継続させる(ステップS21)。本例では、上述したように挟み込みによるモータ3の回転異常が発生したと判断した後に、モータ3を逆転させているので、ステップS21ではモータ駆動回路2からモータ3へ反転のみ禁止する信号を出力してもよい。他の例として、挟み込みによるモータ3の回転異常が発生したと判断した後に、モータ3を停止させる場合は、ステップS21ではモータ駆動回路2からモータ3へ停止のみ禁止する信号を出力してもよい。   On the other hand, when the one-time change amount / threshold comparison flag is “0” in step S15 (step S15: NO), or when the change condition flag is “1” in step S16 (step S16: NO). ) Determines that the rotation abnormality of the motor 3 due to the object Z being caught in the window 100 has not occurred (step S20). Then, a signal prohibiting the reversal and stop of the motor 3 is output from the motor drive circuit 2, and the normal rotation of the motor 3 is continued as it is (step S21). In this example, since it is determined that the rotation abnormality of the motor 3 due to the pinching has occurred as described above, the motor 3 is reversely rotated. Therefore, in step S21, a signal prohibiting only reverse rotation is output from the motor drive circuit 2 to the motor 3. May be. As another example, when the motor 3 is stopped after it is determined that the rotation abnormality of the motor 3 due to pinching has occurred, a signal prohibiting only the stop from the motor drive circuit 2 to the motor 3 may be output in step S21. .

ステップS21の後、操作スイッチ1がマニュアル閉MCの位置にあるか否かを判定し(ステップS22)、操作スイッチ1がマニュアル閉MCの位置にあれば(ステップS22:YES)、ステップS12へ戻ってモータ3の正転を継続し、マニュアル閉MCの位置になければ(ステップS22:NO)、オート閉ACの位置にあるか否かを判定する(ステップS23)。操作スイッチ1がオート閉ACの位置にあれば(ステップS23:YES)、後述のオート閉処理に移り(ステップS24)、オート閉ACの位置になければ(ステップS23:NO)、マニュアル開MOの位置にあるか否かを判定する(ステップS25)。操作スイッチ1がマニュアル開MOの位置にあれば(ステップS25:YES)、後述のマニュアル開処理に移り(ステップS26)、マニュアル開MOの位置になければ(ステップS25:NO)、オート開AOの位置にあるか否かを判定する(ステップS27)。操作スイッチ1がオート開AOの位置にあれば(ステップS27:YES)、後述のオート開処理に移り(ステップS28)、操作スイッチ1がオート開AOの位置になければ(ステップS27:NO)、何も処理せずに終了する。   After step S21, it is determined whether or not the operation switch 1 is in the manual close MC position (step S22). If the operation switch 1 is in the manual close MC position (step S22: YES), the process returns to step S12. If the motor 3 continues normal rotation and is not at the manual closing MC position (step S22: NO), it is determined whether or not the motor 3 is at the automatic closing AC position (step S23). If the operation switch 1 is in the auto-closed AC position (step S23: YES), the process proceeds to an auto-close process described later (step S24), and if it is not in the auto-closed AC position (step S23: NO), the manual opening MO is performed. It is determined whether or not it is in a position (step S25). If the operation switch 1 is in the manual opening MO position (step S25: YES), the process proceeds to the manual opening process described later (step S26). If it is not in the manual opening MO position (step S25: NO), the automatic opening AO is performed. It is determined whether or not it is in a position (step S27). If the operation switch 1 is in the auto-open AO position (step S27: YES), the process proceeds to an auto-open process described later (step S28). If the operation switch 1 is not in the auto-open AO position (step S27: NO), Exit without doing anything.

図8は、図6のステップS4、図7のステップS24、後述する図9のステップS60、および図10のステップS67におけるオート閉動作の詳細手順を示したフローチャートである。最初に、オート閉動作により窓100が完全に閉じたか否かをロータリエンコーダ4の出力に基づいて判定する(ステップS31)。窓100が完全に閉じれば(ステップS31:YES)処理を終了し、完全に閉じてなければ(ステップS31:NO)、モータ駆動回路2へ正転信号を出力してモータ3を正転させ、窓100を閉じる(ステップS32)。続いて、窓100が完全に閉じたか否かを判定し(ステップS33)、完全に閉じれば(ステップS33:YES)処理を終了する。これに対して、窓100が完全に閉じてなければ(ステップS33:NO)、モータ3の回転状態検出処理を行う(ステップS34)。この処理の詳細についても後述する。   FIG. 8 is a flowchart showing a detailed procedure of the automatic closing operation in step S4 of FIG. 6, step S24 of FIG. 7, step S60 of FIG. 9 described later, and step S67 of FIG. First, it is determined based on the output of the rotary encoder 4 whether or not the window 100 is completely closed by the automatic closing operation (step S31). If the window 100 is completely closed (step S31: YES), the process is terminated. If the window 100 is not completely closed (step S31: NO), a normal rotation signal is output to the motor drive circuit 2 to cause the motor 3 to perform normal rotation. The window 100 is closed (step S32). Subsequently, it is determined whether or not the window 100 is completely closed (step S33). If the window 100 is completely closed (step S33: YES), the process is terminated. On the other hand, if the window 100 is not completely closed (step S33: NO), a rotation state detection process of the motor 3 is performed (step S34). Details of this processing will also be described later.

ステップS34の処理を終了すると、閾値・1回変化量比較フラグが「1」になっているか否かを判定し(ステップS35)、該フラグが「1」になっていると(ステップS35:YES)、続いて変更条件フラグが「0」になっているか否かを判定し(ステップS36)、該フラグが「0」になっていると(ステップS36:YES)、窓100への物体Zの挟み込みによるモータ3の回転異常が発生したと判断する(ステップS37)。そして、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開く(ステップS38)。これによって、挟み込みが解除される。そして、窓100が完全に開いたか否かを判定し(ステップS39)、完全に開けば(ステップS39:YES)処理を終了し、完全に開いてなければ(ステップS39:NO)、ステップS38へ戻ってモータ3の逆転を継続する。   When the process of step S34 is completed, it is determined whether or not the threshold value / one-time change amount comparison flag is “1” (step S35). If the flag is “1” (step S35: YES) Then, it is determined whether or not the change condition flag is “0” (step S36). If the flag is “0” (step S36: YES), the object Z to the window 100 is displayed. It is determined that rotation abnormality of the motor 3 due to the pinching has occurred (step S37). Then, a reverse rotation signal is output from the motor drive circuit 2 to reverse the motor 3, and the window 100 is opened (step S38). Thereby, the pinching is released. Then, it is determined whether or not the window 100 is completely opened (step S39). If the window 100 is completely opened (step S39: YES), the process is terminated. If not completely opened (step S39: NO), the process proceeds to step S38. Return to continue the reverse rotation of the motor 3.

一方、ステップS35で1回変化量・閾値比較フラグが「0」になっている場合(ステップS35:NO)や、ステップS36で変更条件フラグが「1」になっている場合(ステップS36:NO)は、窓100への物体Zの挟み込みによるモータ3の回転異常が発生していないと判断する(ステップS40)。そして、モータ駆動回路2からモータ3の反転と停止を禁止する信号を出力し、モータ3の正転をそのまま継続させる(ステップS41)。続いて、操作スイッチ1がマニュアル開MOの位置にあれば(ステップS42:YES)、後述のマニュアル開処理に移り(ステップS43)、マニュアル開MOの位置になければ(ステップS42:NO)、オート開AOの位置にあるか否かを判定する(ステップS44)。操作スイッチ1がオート開AOの位置にあれば(ステップS44:YES)、後述のオート開処理に移り(ステップS45)、操作スイッチ1がオート開AOの位置になければ(ステップS44:NO)、ステップS32へ戻ってモータ3の正転を継続する。   On the other hand, if the one-time change amount / threshold comparison flag is “0” in step S35 (step S35: NO), or if the change condition flag is “1” in step S36 (step S36: NO). ) Determines that there is no rotation abnormality of the motor 3 due to the object Z being caught in the window 100 (step S40). Then, a signal prohibiting the reversal and stop of the motor 3 is output from the motor drive circuit 2, and the normal rotation of the motor 3 is continued as it is (step S41). Subsequently, if the operation switch 1 is in the position of manual opening MO (step S42: YES), the process proceeds to the manual opening process described later (step S43). If it is not in the position of manual opening MO (step S42: NO), auto It is determined whether or not it is in the open AO position (step S44). If the operation switch 1 is in the auto-open AO position (step S44: YES), the process proceeds to an auto-open process described later (step S45). If the operation switch 1 is not in the auto-open AO position (step S44: NO), Returning to step S32, the forward rotation of the motor 3 is continued.

図9は、図6のステップS6、図7のステップS26、および図8のステップS43におけるマニュアル開処理の詳細手順を示したフローチャートである。本図は、本発明の特徴とするところではないが、以下に一通り説明しておく。最初に、マニュアル開動作により窓100が完全に開いたか否かをロータリエンコーダ4の出力に基づいて判定する(ステップS51)。窓100が完全に開けば(ステップS51:YES)処理を終了し、完全に開いてなければ(ステップS51:NO)、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開ける(ステップS52)。続いて、窓100が完全に開いたか否かを判定し(ステップS53)、完全に開けば(ステップS53:YES)処理を終了し、完全に開いてなければ(ステップS53:NO)、操作スイッチ1がマニュアル開MOの位置にあるか否かを判定する(ステップS54)。操作スイッチ1がマニュアル開MOの位置にあれば(ステップS54:YES)、ステップS52へ戻ってモータ3の逆転を継続し、マニュアル開MOの位置になければ(ステップS54:NO)、オート開AOの位置にあるか否かを判定する(ステップS55)。操作スイッチ1がオート開AOの位置にあれば(ステップS55:YES)、後述のオート開処理に移り(ステップS56)、オート開AOの位置になければ(ステップS55:NO)、マニュアル閉MCの位置にあるか否かを判定する(ステップS57)。操作スイッチ1がマニュアル閉MCの位置にあれば(ステップS57:YES)、前述のマニュアル閉処理に移り(ステップS58)、マニュアル閉MCの位置になければ(ステップS57:NO)、オート閉ACの位置にあるか否かを判定する(ステップS59)。操作スイッチ1がオート閉ACの位置にあれば(ステップS59:YES)、前述のオート閉処理に移り(ステップS60)、操作スイッチ1がオート閉ACの位置になければ(ステップS59:NO)、何も処理せずに終了する。   FIG. 9 is a flowchart showing a detailed procedure of the manual opening process in step S6 of FIG. 6, step S26 of FIG. 7, and step S43 of FIG. Although this figure is not a feature of the present invention, it will be described below. First, it is determined based on the output of the rotary encoder 4 whether or not the window 100 is completely opened by the manual opening operation (step S51). If the window 100 is completely opened (step S51: YES), the process is terminated. If the window 100 is not completely opened (step S51: NO), a reverse signal is output from the motor drive circuit 2 to reverse the motor 3, and the window 100 Is opened (step S52). Subsequently, it is determined whether or not the window 100 is completely opened (step S53). If the window 100 is completely opened (step S53: YES), the processing is terminated. If the window 100 is not completely opened (step S53: NO), the operation switch It is determined whether 1 is in the position of manual opening MO (step S54). If the operation switch 1 is in the manual opening MO position (step S54: YES), the process returns to step S52 to continue the reverse rotation of the motor 3, and if it is not in the manual opening MO position (step S54: NO), the automatic opening AO It is determined whether it is in the position (step S55). If the operation switch 1 is at the auto-open AO position (step S55: YES), the process proceeds to the auto-open process described later (step S56). If it is not at the auto-open AO position (step S55: NO), the manual close MC is It is determined whether or not it is in the position (step S57). If the operation switch 1 is in the manual closing MC position (step S57: YES), the process proceeds to the manual closing process described above (step S58). If it is not in the manual closing MC position (step S57: NO), the automatic closing AC is turned on. It is determined whether or not it is in the position (step S59). If the operation switch 1 is in the auto-close AC position (step S59: YES), the process proceeds to the above-described auto-close process (step S60). If the operation switch 1 is not in the auto-close AC position (step S59: NO), Exit without doing anything.

図10は、図6のステップS8、図7のステップS28、図8のステップS45、および図9のステップS56におけるオート開処理の詳細手順を示したフローチャートである。本図も、本発明の特徴とするところではないが、以下に一通り説明しておく。最初に、オート開動作により窓100が完全に開いたか否かをロータリエンコーダ4の出力に基づいて判定する(ステップS61)。窓100が完全に開けば(ステップS61:YES)処理を終了し、完全に開いてなければ(ステップS61:NO)、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開ける(ステップS62)。続いて、窓100が完全に開いたか否かを判定し(ステップS63)、完全に開けば(ステップS63:YES)処理を終了し、完全に開いてなければ(ステップS63:NO)、操作スイッチ1がマニュアル閉MCの位置にあるか否かを判定する(ステップS64)。操作スイッチ1がマニュアル閉MCの位置にあれば(ステップS64:YES)、前述のマニュアル閉処理に移り(ステップS65)、マニュアル閉MCの位置になければ(ステップS64:NO)、オート閉ACの位置にあるか否かを判定する(ステップS66)。操作スイッチ1がオート閉ACの位置にあれば(ステップS66:YES)、前述のオート閉処理に移り(ステップS67)、操作スイッチ1がオート閉ACの位置になければ(ステップS66:NO)、ステップS62へ戻って、モータ3の逆転を継続する。   FIG. 10 is a flowchart showing a detailed procedure of the automatic opening process in step S8 in FIG. 6, step S28 in FIG. 7, step S45 in FIG. 8, and step S56 in FIG. This figure is not a feature of the present invention, but will be described below. First, it is determined based on the output of the rotary encoder 4 whether or not the window 100 is completely opened by the automatic opening operation (step S61). If the window 100 is completely opened (step S61: YES), the process is terminated. If the window 100 is not completely opened (step S61: NO), a reverse signal is output from the motor drive circuit 2 to reverse the motor 3, and the window 100 Is opened (step S62). Subsequently, it is determined whether or not the window 100 is completely opened (step S63). If the window 100 is completely opened (step S63: YES), the process is terminated. If the window 100 is not completely opened (step S63: NO), the operation switch It is determined whether 1 is in the position of the manual closing MC (step S64). If the operation switch 1 is in the position of the manual closing MC (step S64: YES), the process proceeds to the above-described manual closing process (step S65), and if it is not in the position of the manual closing MC (step S64: NO), the automatic closing AC is set. It is determined whether or not it is in a position (step S66). If the operation switch 1 is in the auto-close AC position (step S66: YES), the process proceeds to the above-described auto-close process (step S67). If the operation switch 1 is not in the auto-close AC position (step S66: NO), Returning to step S62, the reverse rotation of the motor 3 is continued.

図11および図12は、第1実施形態における、図7のステップS14、および図8のステップS34のモータ3の回転状態検出処理の詳細手順を示したフローチャートである。なお、図12は、図11の続きのフローチャートである。図11において、最初に、図5の回転速度検出部81によりモータ3の現在の回転速度f(0)を取得し、回転速度記憶部82に記憶する(ステップS71)。次に、現在の回転速度f(0)の所定回数前に検出した過去の回転速度f(x)を回転速度記憶部82から読み出す(ステップS72)。「x」は過去の任意の検出時間である。そして、1回変化量算出部83により現在の回転速度f(0)と過去の回転速度f(x)の差分を1回変化量ΔF1(0)として算出して(ΔF1(0)=f(x)−f(0))、1回変化量記憶部84に記憶する(ステップS73)。さらに引き続き、現在の1回変化量ΔF1(0)の所定回数前に算出した過去の1回変化量ΔF1(y)を1回変化量記憶部84から読み出す(ステップS74)。「y」は過去の任意の検出時間である。上記の「x」と「y」とは、同一時間であってもよいが、好ましくは異なる時間である方がよい。そして、2回変化量算出部85により現在の1回変化量ΔF1(0)と過去の1回変化量ΔF1(y)の差分を2回変化量ΔF2(0)として算出して(ΔF2(0)=ΔF1(0)−ΔF1(y))、2回変化量記憶部86に記憶する(ステップS75)。   11 and 12 are flowcharts showing the detailed procedure of the rotation state detection process of the motor 3 in step S14 of FIG. 7 and step S34 of FIG. 8 in the first embodiment. FIG. 12 is a flowchart subsequent to FIG. In FIG. 11, first, the current rotational speed f (0) of the motor 3 is acquired by the rotational speed detecting unit 81 of FIG. 5, and stored in the rotational speed storage unit 82 (step S71). Next, the past rotational speed f (x) detected a predetermined number of times before the current rotational speed f (0) is read from the rotational speed storage unit 82 (step S72). “X” is an arbitrary past detection time. Then, the one-time change amount calculation unit 83 calculates a difference between the current rotation speed f (0) and the past rotation speed f (x) as a one-time change amount ΔF1 (0) (ΔF1 (0) = f ( x) −f (0)) and stored in the one-time change amount storage unit 84 (step S73). Further, the past one-time change amount ΔF1 (y) calculated a predetermined number of times before the current one-time change amount ΔF1 (0) is read from the one-time change amount storage unit 84 (step S74). “Y” is an arbitrary past detection time. The above “x” and “y” may be the same time, but are preferably different times. The difference between the current one-time change amount ΔF1 (0) and the past one-time change amount ΔF1 (y) is calculated as a two-time change amount ΔF2 (0) by the two-time change amount calculation unit 85 (ΔF2 (0 ) = ΔF1 (0) −ΔF1 (y)), and is stored in the twice change amount storage unit 86 (step S75).

図13は、第1実施形態における、窓100の閉動作中の回転速度検出部81から出力されるモータ3の回転速度と、上記のようにして算出した1回変化量および2回変化量の時間的変化を示した図である。縦軸にモータ回転速度、即ち図1のロータリエンコーダ4から出力されるパルスの周波数を示し、横軸に時間、即ち該パルスのエッジのタイミングを示している。黒丸で示しているfはモータ3の生の回転速度、黒四角で示しているΔF1は回転速度fの変化量である1回変化量、黒三角で示しているΔF2は1回変化量ΔF1の変化量である2回変化量、太線で示すSは上述した閾値である。一点鎖線で示すAは1回変化量ΔF1と比較する第1の所定値、二点鎖線で示すBは2回変化量ΔF2と比較する第2の所定値である。第1の所定値Aおよび第2の所定値Bは、予め設定されてメモリ6の所定領域に記憶されている。本第1実施形態では、第1の所定値Aおよび第2の所定値Bを、1回変化量ΔF1が第1の所定値Aに達するかどうかと、2回変化量ΔF2が第2の所定値Bに達するかどうかの結果から、モータ3の回転速度fが一定の減速傾向にあるか否かを判断できるような値にそれぞれ設定している。   FIG. 13 shows the rotational speed of the motor 3 output from the rotational speed detection unit 81 during the closing operation of the window 100 in the first embodiment, and the one-time variation and the two-time variation calculated as described above. It is the figure which showed the time change. The vertical axis represents the motor rotation speed, that is, the frequency of the pulse output from the rotary encoder 4 in FIG. 1, and the horizontal axis represents time, that is, the timing of the edge of the pulse. F indicated by a black circle is the raw rotation speed of the motor 3, ΔF1 indicated by a black square is a one-time change amount that is a change amount of the rotation speed f, and ΔF2 indicated by a black triangle is a one-time change amount ΔF1. The amount of change that is the amount of change twice, S indicated by a bold line is the threshold value described above. A indicated by a one-dot chain line is a first predetermined value to be compared with the one-time variation ΔF1, and B indicated by a two-dot chain line is a second predetermined value to be compared with the two-time variation ΔF2. The first predetermined value A and the second predetermined value B are preset and stored in a predetermined area of the memory 6. In the first embodiment, the first predetermined value A and the second predetermined value B are set based on whether the one-time change amount ΔF1 reaches the first predetermined value A and the two-time change amount ΔF2 is a second predetermined value. Each value is set so that it can be determined whether or not the rotational speed f of the motor 3 has a constant deceleration tendency from the result of whether or not the value B is reached.

図13では、窓100の閉動作が正常に行われた状態、即ち窓100に物体Zを挟み込んだり悪路走行時の振動やドア開閉時の衝撃等の外乱が加わったりしていない状態を示している。後述する図15、図18、および図20も同様に閉動作正常状態を示している。図3に示すXアーム式の窓開閉機構102では、モータ3の駆動により第1アーム104を回動させて窓100を閉じていく際に、第1アーム104が斜め下へ傾いた状態から水平状態に近づくに連れて、てこの原理によりモータ3にかかる負荷が大きくなって、モータ3の回転速度fが図示するように徐々に低下して一定の減速傾向となる。そして、第1アーム104が水平状態から斜め上へ傾いて行くに連れて、てこの原理によりモータ3にかかる負荷が小さくなって、モータ3の回転速度fが図示するように徐々に上昇して一定の加速傾向となる。   FIG. 13 shows a state in which the closing operation of the window 100 is normally performed, that is, a state in which an object Z is not sandwiched in the window 100 or a disturbance such as a vibration when traveling on a rough road or an impact when opening and closing the door is not applied. ing. FIG. 15, FIG. 18, and FIG. 20, which will be described later, similarly show the normal state of the closing operation. In the X-arm type window opening / closing mechanism 102 shown in FIG. 3, when the first arm 104 is rotated by driving the motor 3 to close the window 100, the first arm 104 is tilted downward from the horizontal state. As the state approaches, the load applied to the motor 3 increases due to the lever principle, and the rotational speed f of the motor 3 gradually decreases as shown in the figure, and a constant deceleration tendency occurs. Then, as the first arm 104 is inclined obliquely upward from the horizontal state, the load applied to the motor 3 is reduced by the lever principle, and the rotational speed f of the motor 3 gradually increases as shown in the figure. It becomes a certain acceleration trend.

変化量ΔF1、ΔF2は、図11で説明したように算出している。詳しくは図13では、1回変化量ΔF1は、左側に矢印で示すように現在より8回前に検出した過去の回転速度fから現在の回転速度fを引いて算出している。2回変化量ΔF2は、ほぼ中央に矢印で示すように現在の1回変化量ΔF1からこの3回前に算出した過去の1回変化量ΔF1を引いて算出している。このように変化量ΔF1、ΔF2を算出するのは、図3のピニオン109の軸ずれ等の構造的要因によりモータ3の回転速度fが脈動しても、該脈動の影響により変化量ΔF1、ΔF2が相殺され難くするためや、回転速度fと変化量ΔF1、ΔF2の加減速傾向をいずれも同様に、即ちいずれも減速中は低下し加速中は上昇するようにして、状態を把握し易くするためである。閾値Sは、「0」より「+」側に比較的離れた値(本例では初期値S(0)を8Hz)に設定している。第1の所定値Aは、「0」より「+」側でかつ閾値より小さい値(本例では3Hz)に設定し、第2の所定値Bは、「0」より「+」側でかつ第1の所定値Aより小さい値(本例では1Hz)に設定している。   The changes ΔF1 and ΔF2 are calculated as described with reference to FIG. Specifically, in FIG. 13, the one-time variation ΔF1 is calculated by subtracting the current rotational speed f from the past rotational speed f detected eight times before the present as indicated by an arrow on the left side. The two-time change amount ΔF2 is calculated by subtracting the past one-time change amount ΔF1 calculated three times before from the current one-time change amount ΔF1 as indicated by an arrow at the center. The changes ΔF1 and ΔF2 are calculated in this way even if the rotational speed f of the motor 3 pulsates due to a structural factor such as a shaft misalignment of the pinion 109 in FIG. 3, the changes ΔF1 and ΔF2 are affected by the pulsation. In order to make it easy to grasp the state, the acceleration / deceleration tendency of the rotational speed f and the change amounts ΔF1 and ΔF2 is the same, that is, both decrease during deceleration and increase during acceleration. Because. The threshold value S is set to a value relatively far from “0” to the “+” side (in this example, the initial value S (0) is 8 Hz). The first predetermined value A is set to a value (“3” in this example) that is “+” from “0” and smaller than the threshold, and the second predetermined value B is “+” from “0”. A value smaller than the first predetermined value A (1 Hz in this example) is set.

図11でステップS75を終了すると、現在の変化量ΔF1(0)、ΔF2(0)の所定回数前の一定区間における1回変化量ΔF1(z)〜ΔF1(z+n)および2回変化量ΔF2(z)〜ΔF1(z+n)をそれぞれ1回変化量記憶部84および2回変化量記憶部86から読み出す(ステップS76)。「z」は過去の任意の算出時間である。「z」と前記の「x」および「y」とは、同一時間であってもよいが、好ましくは異なる時間である方がよい。そして、閾値変更部87で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが所定値A以上であり(所定値Aに達している)、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが所定値B未満である(所定値Bに達していない)か否かを判定する(図12のステップS77)。この条件は、本第1実施形態では閾値Sをアップするためのものである。図13では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが第1の所定値A以上でありかつ2回変化量ΔF2の全てが第2の所定値B未満であることとしている。   When step S75 is completed in FIG. 11, once-change amounts ΔF1 (z) to ΔF1 (z + n) and twice-change amounts ΔF2 ( z) to ΔF1 (z + n) are read from the once change amount storage unit 84 and the twice change amount storage unit 86, respectively (step S76). “Z” is an arbitrary past calculation time. “Z” and the above “x” and “y” may be the same time, but are preferably different times. Then, all of the once-change amount ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the predetermined value A (having reached the predetermined value A) and the twice-change amount ΔF2 (z) to ΔF2 in the threshold value changing unit 87. It is determined whether or not all of (z + n) are less than the predetermined value B (not reaching the predetermined value B) (step S77 in FIG. 12). This condition is for increasing the threshold value S in the first embodiment. In FIG. 13, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are greater than or equal to the first predetermined value A and all of the two-time variation ΔF2 are less than the second predetermined value B. I am going to do that.

図13に示すようにモータ3の回転速度fが一定の減速傾向にある場合は、粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「0」より閾値Sに達し易い「+」側にあって第1の所定値A以上となり、かつ2回変化量ΔF2の全てが「0」付近にあって第2の所定値B未満となるので(図12のステップS77:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS78)。そして、回転速度fが一定の減速傾向にあると判断して、1回変化量ΔF1が閾値Sに達し難くなるように、閾値Sを初期値S(0)から所定量アップした値S(m)に変更して設定する(ステップS79)。図13では、初期値S(0)から1Hzアップして変更後の閾値S(m)を9Hzにしている。これによって、モータ3の回転異常を誤検知しないための誤検知マージン(閾値Sと1回変化量ΔF1の差分)が大きくなる。   As shown in FIG. 13, when the rotational speed f of the motor 3 has a constant deceleration tendency, all the one-time variation ΔF <b> 1 in the four previous three sections is “0” as surrounded by a rough broken line. Since it is on the “+” side where the threshold value S is more likely to be reached and is greater than or equal to the first predetermined value A, and all the twice-change amounts ΔF2 are near “0” and less than the second predetermined value B (FIG. 12 (step S77: YES), the change condition flag is set to “1” to indicate that the above condition is satisfied (step S78). Then, it is determined that the rotation speed f has a constant deceleration tendency, and the value S (m) obtained by increasing the threshold value S by a predetermined amount from the initial value S (0) so that the one-time change amount ΔF1 does not easily reach the threshold value S. ) And set (step S79). In FIG. 13, the threshold value S (m) after the change is increased by 1 Hz from the initial value S (0) to 9 Hz. As a result, a false detection margin (difference between the threshold value S and the one-time change amount ΔF1) for preventing erroneous detection of rotation abnormality of the motor 3 is increased.

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と変更後の閾値S(m)とを比較して、1回変化量ΔF1(0)が閾値S(m)以上である(閾値S(m)に達している)か否かを判定する(ステップS80)。ここで、外乱の影響でモータ3の回転速度fが脈動している等により1回変化量ΔF1(0)が閾値S(m)以上になっていると(ステップS80:YES)、変化量・閾値比較フラグを1回変化量ΔF1(0)が閾値S(m)以上であることを示すように「1」にする(ステップS81)。そして、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「1」であり(図7のステップS15:YESまたは図8のステップS35:YES)、変更条件フラグが「1」である(図7のステップS16:NOまたは図8のステップS36:NO)ので、窓100への物体Zの挟み込みによるモータ3の回転異常が発生していないと判断する(図7のステップS20または図8のステップS40)。そして、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、前述したように以降の処理を実行する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the changed threshold value S (m), and the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S (m). It is determined whether or not (the threshold value S (m) has been reached) (step S80). Here, if the amount of change ΔF1 (0) once exceeds the threshold S (m) due to the pulsation of the rotational speed f of the motor 3 due to the influence of disturbance (step S80: YES), the amount of change · The threshold value comparison flag is set to “1” to indicate that the one-time variation ΔF1 (0) is equal to or greater than the threshold value S (m) (step S81). Then, the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, the change amount / threshold comparison flag is “1” (step S15 in FIG. 7: YES or step S35 in FIG. 8: YES), and the change condition flag is “1” (in FIG. 7). Since step S16: NO or step S36: NO in FIG. 8), it is determined that the rotation abnormality of the motor 3 due to the object Z being caught in the window 100 has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8). . Then, a reverse / stop prohibition signal is output from the motor drive circuit 2 to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed as described above.

上記に対して、図12のステップS80で、1回変化量ΔF1(0)が閾値S(m)未満になっていると(ステップS80:NO)、変化量・閾値比較フラグを1回変化量ΔF1(0)が閾値S(m)未満であることを示すように「0」にする(ステップS85)。そして、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「0」である(図7のステップS15:NOまたは図8のステップS35:NO)ので、窓100への物体Zの挟み込みによるモータ3の回転異常が発生していないと判断する(図7のステップS20または図8のステップS40)。そして、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、前述したように以降の処理を実行する。   On the other hand, if the single change amount ΔF1 (0) is less than the threshold value S (m) in step S80 of FIG. 12 (step S80: NO), the change amount / threshold comparison flag is set to the single change amount. “0” is set to indicate that ΔF1 (0) is less than the threshold value S (m) (step S85). Then, the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, the change amount / threshold comparison flag is “0” (step S15 in FIG. 7: NO or step S35 in FIG. 8: NO), so that the motor 3 is inserted into the window 100 due to the object Z being caught. It is determined that no rotation abnormality has occurred (step S20 in FIG. 7 or step S40 in FIG. 8). Then, a reverse / stop prohibition signal is output from the motor drive circuit 2 to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed as described above.

その後、図13に示すようにモータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合は、細かい破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が閾値に達し難い「−」側に推移して、第1の所定値A未満となる(図12のステップS77:NO)。さらにこの後、1回変化量ΔF1は図13に示すように「−」側に推移した後「−」側のある値(本例では−4Hz)で飽和する。2回変化量ΔF2の方は、一旦「0」より「−」側に推移した後、また「0」付近に戻って飽和し、第2の所定値B以上になることはない。上記のようにステップS77の条件を満たさなくなると、変更条件フラグを条件が満たされていないことを示すように「0」にする(ステップS82)。そして、回転速度fが一定の減速傾向から変化した(一定の減速傾向を示さなくなった)と判断して、閾値Sを変更値S(m)から初期値S(0)に戻して設定する(ステップS83)。これによって、1回変化量ΔF1の「−」側への推移により大きくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)小さくなる。   After that, as shown in FIG. 13, when the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, as shown in a fine broken line, it changes once in the current four sections. A part of the amount ΔF1 is shifted to the “−” side where it is difficult to reach the threshold, and becomes less than the first predetermined value A (step S77 in FIG. 12: NO). Further, after this, the one-time variation ΔF1 shifts to the “−” side as shown in FIG. 13 and then saturates at a certain value on the “−” side (−4 Hz in this example). The twice-change amount ΔF2 once transitions from “0” to the “−” side, then returns to the vicinity of “0” and is saturated, and does not exceed the second predetermined value B. When the condition in step S77 is not satisfied as described above, the change condition flag is set to “0” to indicate that the condition is not satisfied (step S82). Then, it is determined that the rotational speed f has changed from a constant deceleration tendency (no longer exhibits a constant deceleration tendency), and the threshold value S is set back from the change value S (m) to the initial value S (0) ( Step S83). As a result, the erroneous detection margin for the rotation abnormality of the motor 3 that has become too large due to the transition of the one-time change amount ΔF1 to the “−” side is reduced by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と閾値S(0)とを比較して、1回変化量ΔF1(0)が閾値S(0)以上であるか否かを判定する(ステップS84)。このとき、上記のように1回変化量ΔF1の「−」側への推移によりモータ3の回転異常の誤検知マージンが大きくなっているので、ある程度の外乱があっても、1回変化量ΔF1(0)は閾値S(0)以上になり難い。ステップS84で、1回変化量ΔF1(0)が閾値S(0)未満であれば(ステップS84:NO)、変化量・閾値比較フラグを「0」にし(ステップS85)、1回変化量ΔF1(0)が閾値S(0)以上であれば(ステップS84:YES)、変化量・閾値比較フラグを「1」にする(ステップS81)。そして、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「0」であれば(図7のステップS15:NOまたは図8のステップS35:NO)、窓100への物体Zの挟み込みによるモータ3の回転異常が発生していないと判断する(図7のステップS20または図8のステップS40)。そして、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、前述したように以降の処理を実行する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the threshold value S (0), and whether the one-time change amount ΔF1 (0) is greater than or equal to the threshold value S (0). It is determined whether or not (step S84). At this time, since the false detection margin of the rotation abnormality of the motor 3 is increased due to the transition of the one-time variation ΔF1 to the “−” side as described above, even if there is a certain amount of disturbance, the one-time variation ΔF1. (0) is unlikely to be greater than or equal to the threshold value S (0). If the single change amount ΔF1 (0) is less than the threshold value S (0) in step S84 (step S84: NO), the change amount / threshold comparison flag is set to “0” (step S85), and the single change amount ΔF1. If (0) is greater than or equal to the threshold S (0) (step S84: YES), the change amount / threshold comparison flag is set to “1” (step S81). Then, the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, if the change amount / threshold comparison flag is “0” (step S15 in FIG. 7: NO or step S35 in FIG. 8: NO), the motor 3 is inserted into the window 100 due to the object Z being caught. It is determined that no rotation abnormality has occurred (step S20 in FIG. 7 or step S40 in FIG. 8). Then, a reverse / stop prohibition signal is output from the motor drive circuit 2 to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed as described above.

上記に対して、変化量・閾値比較フラグが「1」であれば(図7のステップS15:YESまたは図8のステップS35:YES)、変更条件フラグは「0」である(図7のステップS16:YESまたは図8のステップS36:YES)ので、窓100への物体Zの挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、図7のマニュアル閉処理または図8のオート閉処理を終了する。   On the other hand, if the change amount / threshold comparison flag is “1” (step S15 in FIG. 7: YES or step S35 in FIG. 8: YES), the change condition flag is “0” (step in FIG. 7). Since S16: YES or step S36 in FIG. 8: YES, it is determined that the rotation abnormality of the motor 3 has occurred due to the object Z being caught in the window 100 (step S17 in FIG. 7 or step S37 in FIG. 8). Then, the motor drive circuit 2 outputs a reverse rotation signal to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and if the window 100 is completely opened (Step S19 in FIG. 7: YES or Step S39 in FIG. 8: YES), the manual closing process in FIG. 7 or the automatic closing process in FIG. 8 ends.

一方、図4に示すように窓100に物体Zを挟み込んだ場合は、図示していないが、モータ3の回転速度fは挟まれ時から急激に低下(減速)して「0」に近づき、1回変化量ΔF1および2回変化量ΔF2はともに挟まれ時から上昇(加速)して、さらに1回変化量ΔF1は閾値Sに達する。このため、図12のステップ77で2回変化量ΔF2(z)〜ΔF2(z+n)が第2の所定値B以上となり(ステップS77:NO)、変更条件フラグを「0」にして(ステップS82)、閾値Sを初期値S(0)に設定する(ステップS83)。そして、ステップS84で現在の1回変化量ΔF1(0)が閾値S(0)以上になっていると判定し(ステップS84:YES)、変化量・閾値比較フラグを「1」にして(ステップS81)、モータ3の回転状態検出処理を終了し、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「1」であり(図7のステップS15:YESまたは図8のステップS35:YES)、変更条件フラグが「0」である(図7のステップS16:YESまたは図8のステップS36:YES)ので、窓100への物体Zの挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、図7のマニュアル閉処理または図8のオート閉処理を終了する。   On the other hand, when the object Z is sandwiched in the window 100 as shown in FIG. 4, the rotational speed f of the motor 3 rapidly decreases (decelerates) from the time when it is sandwiched and approaches “0”. Both the one-time change amount ΔF1 and the two-time change amount ΔF2 are sandwiched and increased (accelerated) from the time, and the one-time change amount ΔF1 reaches the threshold value S. Therefore, in step 77 of FIG. 12, the twice-change amount ΔF2 (z) to ΔF2 (z + n) becomes equal to or larger than the second predetermined value B (step S77: NO), and the change condition flag is set to “0” (step S82). ), The threshold value S is set to the initial value S (0) (step S83). In step S84, it is determined that the current one-time variation ΔF1 (0) is equal to or greater than the threshold S (0) (step S84: YES), and the variation / threshold comparison flag is set to “1” (step S84). S81), the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, the change amount / threshold comparison flag is “1” (step S15 in FIG. 7: YES or step S35 in FIG. 8: YES), and the change condition flag is “0” (in FIG. 7). Since step S16: YES or step S36: YES in FIG. 8), it is determined that a rotation abnormality of the motor 3 due to the object Z being caught in the window 100 has occurred (step S17 in FIG. 7 or step S37 in FIG. 8). Then, the motor drive circuit 2 outputs a reverse rotation signal to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and if the window 100 is completely opened (Step S19 in FIG. 7: YES or Step S39 in FIG. 8: YES), the manual closing process in FIG. 7 or the automatic closing process in FIG. 8 ends.

以上の第1実施形態のようにすると、モータ3の回転速度fが一定の減速傾向にある場合は、現在から所定回数前の所定区間に算出された回転速度fの変化量である1回変化量ΔF1(z)〜ΔF1(z+n)と回転速度fの変化量の変化量である2回変化量ΔF2(z)〜ΔF2(z+n)のうち、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「0」より「+」側にあって第1の所定値A以上となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「0」付近にあって第2の所定値B未満となるので、1回変化量ΔF1(0)が閾値Sに達し難くなるように閾値Sが変更されて、モータ3の回転異常の誤検知マージンを大きくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   According to the first embodiment described above, when the rotational speed f of the motor 3 is in a constant deceleration tendency, a one-time change that is a change amount of the rotational speed f calculated in a predetermined section a predetermined number of times before the current time. Of the amount of change ΔF1 (z) to ΔF1 (z + n) and the amount of change twice of the change amount of the rotational speed f ΔF2 (z) to ΔF2 (z + n), the amount of change ΔF1 (z) to ΔF1 (z + n) ) Are on the “+” side from “0” and are equal to or greater than the first predetermined value A, and all of the twice-changes ΔF2 (z) to ΔF2 (z + n) are in the vicinity of “0” and the second Since it is less than the predetermined value B, the threshold value S is changed so that the one-time change amount ΔF1 (0) does not easily reach the threshold value S, and the erroneous detection margin of the rotation abnormality of the motor 3 can be increased. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected.

また、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合に、閾値Sを変更した値S(m)のままにしておくと、1回変化量ΔF1が「0」以外の値でかつ閾値Sに達し難い「−」側の値(閾値Sと反対側に寄った値)になるため、モータ3の回転異常の誤検知マージンが大きくなり過ぎて、外乱の影響等によるモータ3の回転異常の誤検知だけでなく、実際のモータ3の回転異常も検知し難くなる。然るに、上述のように、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わって、1回変化量ΔF1が「0」より閾値Sに達し難い「−」側に推移した後飽和して、第1の所定値A未満となり、2回変化量ΔF2が一旦「0」より「−」側に推移した後また「0」付近に戻って飽和して、第2の所定値B以上にならないことを受けて、変更した閾値S(m)を初期値S(0)に戻すと、モータ3の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   Further, when the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, if the threshold value S is left as the changed value S (m), the one-time variation ΔF1 is “0”. Since it is a value on the “−” side that is difficult to reach the threshold value S (a value closer to the side opposite to the threshold value S), the erroneous detection margin for the rotation abnormality of the motor 3 becomes too large, and the influence of disturbance, etc. In addition to erroneous detection of abnormal rotation of the motor 3 due to the above, it is difficult to detect actual abnormal rotation of the motor 3. However, as described above, after the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, the one-time variation ΔF1 has changed from “0” to the “−” side, which is difficult to reach the threshold value S. Saturates, becomes less than the first predetermined value A, and the twice-change amount ΔF2 once shifts from “0” to the “−” side, then returns to the vicinity of “0” and becomes saturated, and the second predetermined value B If the changed threshold value S (m) is returned to the initial value S (0) in response to the fact that it does not become the above, it is possible to prevent the erroneous detection margin of the rotation abnormality of the motor 3 from becoming too large. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately.

さらに、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが第1の所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが第2の所定値B未満である場合において、現在の1回変化量ΔF1(0)が閾値S以上になったときに、モータ3の反転または停止を禁止するので、モータ3の回転速度fが一定の減速傾向にある場合に、モータ3が回転異常状態ではないのに、外乱の影響等により1回変化量ΔF1(0)が閾値S以上になっても、モータ3の回転状態をそのまま維持することができる。   Further, all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are equal to or more than the first predetermined value A, and all the two-time variation amounts ΔF2 (z) to ΔF2 (z + n) are the second predetermined value. In the case where it is less than B, when the current one-time variation ΔF1 (0) becomes equal to or greater than the threshold value S, the motor 3 is prohibited from reversing or stopping, so the rotational speed f of the motor 3 tends to be a constant deceleration. In some cases, even if the motor 3 is not in an abnormal rotation state, the rotational state of the motor 3 can be maintained as it is even if the one-time change amount ΔF1 (0) exceeds the threshold value S due to the influence of disturbance or the like.

図14は、第2実施形態におけるモータ3の回転状態検出処理の一部の詳細手順を示したフローチャートである。本フローチャートは、前述の図12のフローチャートに代えて、前述の図11のフローチャートの続きとして実行されるものである。よって、図11を第2実施形態として引用する。また、前述の図7および図8のフローチャートも第2実施形態として引用する。さらに、本第2実施形態の回転異常検出ブロックは図5と同様であるため、図5も第2実施形態として引用する。図11において、前述したようにステップS71〜S75を実行して、モータ3の現在の回転速度f(0)、1回変化量ΔF1(0)、および2回変化量ΔF2(0)を、それぞれ取得して対応する記憶部82、84、86に記憶する。   FIG. 14 is a flowchart showing a part of detailed procedure of the rotation state detection process of the motor 3 in the second embodiment. This flowchart is executed as a continuation of the flowchart of FIG. 11 described above, instead of the flowchart of FIG. 12 described above. Therefore, FIG. 11 is cited as the second embodiment. The flowcharts of FIGS. 7 and 8 are also cited as the second embodiment. Furthermore, since the rotation abnormality detection block of the second embodiment is the same as that of FIG. 5, FIG. 5 is also cited as the second embodiment. In FIG. 11, Steps S71 to S75 are executed as described above, and the current rotation speed f (0), the first variation ΔF1 (0), and the second variation ΔF2 (0) of the motor 3 are respectively determined. Acquire and store in the corresponding storage units 82, 84, 86.

図15は、第2実施形態における窓100の閉動作中のモータ3の回転速度と1回変化量および2回変化量の時間的変化を示した図である。モータ3の回転速度f、1回変化量ΔF1、および2回変化量ΔF2の表示形態と検出・算出方法は、図13と同様である。閾値Sの表示形態も図13と同様である。「0」より「+」側に一点鎖線および二点鎖線で示しているのは、前述したのと同様の第1の所定値Aおよび第2の所定値Bである。本第2実施形態では、これら「+」側の第1の所定値Aおよび第2の所定値Bに加えて、「0」より「−」側にも、一点鎖線および二点鎖線で示すように1回変化量ΔF1と比較する第1の所定値A’と2回変化量ΔF2と比較する第2の所定値B’をそれぞれ設けている。「−」側の第1の所定値A’および第2の所定値B’は、1回変化量ΔF1が第1の所定値A’に達するかどうかと、2回変化量ΔF2が第2の所定値B’に達するかどうかの結果から、モータ3の回転速度fが一定の加速傾向にあるか否かを判断できるような値にそれぞれ設定している。図15では、第1の所定値A’は、−3Hzに設定し、第2の所定値B’は、−1Hzに設定している。閾値Sは、初期値S(0)を8Hzに設定していて、後述するようにモータ3の回転速度fが一定の減速傾向と一定の加速傾向にあるときにそれぞれ変更する。   FIG. 15 is a diagram illustrating temporal changes in the rotational speed, the first variation, and the second variation during the closing operation of the window 100 according to the second embodiment. The display form and the detection / calculation method of the rotational speed f, the first variation ΔF1 and the second variation ΔF2 of the motor 3 are the same as those in FIG. The display form of the threshold value S is the same as in FIG. What is indicated by the one-dot chain line and the two-dot chain line on the “+” side from “0” is the first predetermined value A and the second predetermined value B similar to those described above. In the second embodiment, in addition to the first predetermined value A and the second predetermined value B on the “+” side, a dot-dash line and a two-dot chain line also indicate the “−” side from “0”. Are provided with a first predetermined value A ′ to be compared with the one-time variation ΔF1 and a second predetermined value B ′ to be compared with the second-time variation ΔF2. The first predetermined value A ′ and the second predetermined value B ′ on the “−” side are based on whether or not the first variation ΔF1 reaches the first predetermined value A ′ and the second variation ΔF2 is the second. Each value is set such that it can be determined whether or not the rotational speed f of the motor 3 has a constant acceleration tendency from the result of whether or not the predetermined value B ′ is reached. In FIG. 15, the first predetermined value A ′ is set to −3 Hz, and the second predetermined value B ′ is set to −1 Hz. The threshold value S is changed when the initial value S (0) is set to 8 Hz and the rotational speed f of the motor 3 has a constant deceleration tendency and a constant acceleration tendency, as will be described later.

図11でステップS75を終了すると、現在の所定回数前の一定区間における1回変化量ΔF1(z)〜ΔF1(z+n)および2回変化量ΔF2(z)〜ΔF1(z+n)をそれぞれ記憶部84、86から読み出す(ステップS76)。そして、閾値変更部87で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の所定値B未満であるか否かを判定する(図14のステップS77)。この条件は、本第2実施形態では閾値Sをアップするためのものである。図15では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが「+」側の第1の所定値A以上でありかつ2回変化量ΔF2の全てが「+」側の第2の所定値B未満であることとしている。   When step S75 is completed in FIG. 11, the first-time variation ΔF1 (z) to ΔF1 (z + n) and the second-time variation ΔF2 (z) to ΔF1 (z + n) in the predetermined interval before the current predetermined number of times are respectively stored in the storage unit 84. , 86 (step S76). Then, the threshold value changing unit 87 determines that all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the predetermined value A on the “+” side, and the two-time variation amounts ΔF2 (z) to ΔF2 (z + n). It is determined whether or not all are less than a predetermined value B on the “+” side (step S77 in FIG. 14). This condition is for increasing the threshold value S in the second embodiment. In FIG. 15, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are greater than or equal to the first predetermined value A on the “+” side, and all of the two-time variation ΔF2 are on the “+” side. Is less than the second predetermined value B.

図15の左側に示すようにモータ3の回転速度fが一定の減速傾向にある場合は、左側に粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「+」側にあって第1の所定値A以上となり、かつ2回変化量ΔF2の全てが「0」付近にあって第2の所定値B未満となるので(図14のステップS77:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS78)。そして、回転速度fが一定の減速傾向にあると判断して、1回変化量ΔF1が閾値Sに達し難くなるように、閾値Sを初期値S(0)から所定量アップした値S(m)に変更して設定する(ステップS79)。図15では、初期値S(0)から1Hzアップして変更後の閾値S(m)を9Hzにしている。これによって、モータ3の回転異常を誤検知しないための誤検知マージンが大きくなる。   As shown on the left side of FIG. 15, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variation ΔF1 in the four previous three sections as surrounded by a rough broken line on the left side. Is on the “+” side and is greater than or equal to the first predetermined value A, and all of the twice-changes ΔF2 are near “0” and less than the second predetermined value B (step S77 in FIG. 14: YES), the change condition flag is set to “1” to indicate that the above condition is satisfied (step S78). Then, it is determined that the rotation speed f has a constant deceleration tendency, and the value S (m) obtained by increasing the threshold value S by a predetermined amount from the initial value S (0) so that the one-time change amount ΔF1 does not easily reach the threshold value S. ) And set (step S79). In FIG. 15, the threshold value S (m) after the change is increased by 1 Hz from the initial value S (0) to 9 Hz. As a result, an erroneous detection margin for preventing erroneous detection of rotation abnormality of the motor 3 is increased.

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と変更後の閾値S(m)とを比較して、1回変化量ΔF1(0)が閾値S(m)以上であるか否かを判定する(ステップS80)。そして、この判定結果に応じて変化量・閾値比較フラグを、1回変化量ΔF1(0)が閾値S(m)以上であることを示す「1」(ステップS81)か、または閾値S(m)未満であることを示す「0」にし(ステップS85)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、図7および図8で前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していないと判断し(図7のステップS20または図8のステップS40)、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、以降の処理を実行する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the changed threshold value S (m), and the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S (m). It is determined whether or not (step S80). Then, the change amount / threshold comparison flag is set to “1” (step S81) indicating that the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S (m) or the threshold value S (m) according to the determination result. ) Indicating “0” (step S85), the rotational state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. Thereafter, in the same procedure as described above with reference to FIGS. 7 and 8, it is determined that the rotation abnormality of the motor 3 due to the pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8), and the motor drive circuit 2 outputs a reverse / stop prohibition signal to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed.

そしてその後、図15の中央より若干左側に示すようにモータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合は、中央より若干左側に細かい破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が第1の所定値A未満となって、図14のステップS77の条件を満たさなくなる(ステップS77:NO)。このようになると、閾値変更部87で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「−」側の所定値A’以下であり(所定値A’に達している)、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「−」側の所定値B’より大きい(所定値B’に達していない)か否かを判定する(ステップS100)。この条件は、本第2実施形態では閾値Sをダウンするためのものである。図15では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが「−」側の第1の所定値A’以下でありかつ2回変化量ΔF2の全てが「−」側の第2の所定値B’より大きいこととしている。   After that, when the rotational speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency as shown slightly to the left of the center of FIG. Part of the one-time change amount ΔF1 in the four sections three times before becomes less than the first predetermined value A, and the condition of step S77 in FIG. 14 is not satisfied (step S77: NO). In this case, the threshold value changing unit 87 causes all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) to be equal to or less than the predetermined value A ′ on the “−” side (having reached the predetermined value A ′), and It is determined whether or not all of the twice change amounts ΔF2 (z) to ΔF2 (z + n) are larger than the predetermined value B ′ on the “−” side (not reaching the predetermined value B ′) (step S100). This condition is for lowering the threshold value S in the second embodiment. In FIG. 15, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are equal to or less than the first predetermined value A ′ on the “−” side, and all of the two-time variation ΔF2 are “−”. It is assumed that it is larger than the second predetermined value B ′ on the side.

図15の中央より左側に細かい破線で囲んでいる状況では、現在の3回前の4区間における1回変化量ΔF1の全てが「0」より閾値Sに達し易い「+」側にあって第1の所定値A’より大きく、かつ2回変化量ΔF2の一部が「−」側にあって第2の所定値B’以下であるので(ステップS100:NO)、変更条件フラグを上記条件が満たされないことを示すように「0」にする(ステップS82)。そして、回転速度fが一定の減速傾向から変化したと判断して、閾値Sを変更値S(m)から初期値S(0)に戻して設定する(ステップS83)。これによって、1回変化量ΔF1の「−」側への推移により大きくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)小さくなる。   In the situation surrounded by a fine broken line on the left side from the center of FIG. 15, all of the one-time variation ΔF1 in the four sections before the current three times are on the “+” side where the threshold value S is more easily reached than “0”. 1 is larger than the predetermined value A ′ and part of the twice-change amount ΔF2 is on the “−” side and is equal to or smaller than the second predetermined value B ′ (step S100: NO), the change condition flag is set to the above condition. Is set to “0” to indicate that is not satisfied (step S82). Then, it is determined that the rotation speed f has changed from a certain deceleration tendency, and the threshold value S is set back from the change value S (m) to the initial value S (0) (step S83). As a result, the erroneous detection margin for the rotation abnormality of the motor 3 that has become too large due to the transition of the one-time change amount ΔF1 to the “−” side is reduced by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と閾値S(0)とを比較して、1回変化量ΔF1(0)が閾値S(0)以上であるか否かを判定する(ステップS84)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS81)か、または「0」にし(ステップS85)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the threshold value S (0), and whether the one-time change amount ΔF1 (0) is greater than or equal to the threshold value S (0). It is determined whether or not (step S84). Then, the change amount / threshold comparison flag is set to “1” (step S81) or “0” (step S85) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

また、図15のほぼ中央に示すようにモータ3の回転速度fが一定の加速傾向であり続けている場合は、ほぼ中央に粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「−」側の第1の所定値A’以下となり、かつ2回変化量ΔF2の全てが「0」付近にあって「−」側の第2の所定値B’より大きくなるので(ステップS100:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS101)。そして、回転速度fが一定の加速傾向であると判断して、1回変化量ΔF1が閾値Sに達し易くなるように、閾値Sを初期値S(0)から所定量ダウンした値S(n)に変更して設定する(ステップS102)。図15では、初期値S(0)から1Hzダウンして変更後の閾値S(n)を7Hzにしている。これによって、1回変化量ΔF1の「−」側への推移により大きくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)小さくなる。   In addition, when the rotational speed f of the motor 3 continues to be a constant acceleration trend as shown in the approximate center of FIG. 15, the current four intervals in the previous three times are surrounded by a rough broken line at the approximate center. All of the one-time variation ΔF1 is equal to or less than the first predetermined value A ′ on the “−” side, and all of the two-time variation ΔF2 is in the vicinity of “0”, and the second predetermined value B on the “−” side. Since it becomes larger (step S100: YES), the change condition flag is set to “1” to indicate that the above condition is satisfied (step S101). Then, it is determined that the rotation speed f has a constant acceleration tendency, and the value S (n) that is obtained by reducing the threshold S by a predetermined amount from the initial value S (0) so that the one-time variation ΔF1 easily reaches the threshold S. ) And set (step S102). In FIG. 15, the threshold value S (n) after the change is set to 7 Hz by 1 Hz down from the initial value S (0). As a result, the erroneous detection margin for the rotation abnormality of the motor 3 that has become too large due to the transition of the one-time change amount ΔF1 to the “−” side is reduced by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と変更後の閾値S(n)とを比較して、1回変化量ΔF1(0)が閾値S(n)以上であるか否かを判定する(ステップS103)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS81)か、または「0」にし(ステップS85)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the changed threshold value S (n), and the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S (n). It is determined whether or not (step S103). Then, the change amount / threshold comparison flag is set to “1” (step S81) or “0” (step S85) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

また、図15の右側に示すようにモータ3の回転速度fが一定の加速傾向から変化した(一定の加速傾向を示さなくなった)場合は、右側に細い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が閾値に達し易い側(「0」および「+」に向かう側)に推移して、「−」側の第1の所定値A’より大きくなる(図14のステップS100:NO)。2回変化量ΔF2の方は、「0」より「+」側に推移して、「−」側の第2の所定値B’以下になることはない。上記のようにステップS100の条件を満たさなくなると、変更条件フラグを上記条件が満たされていないことを示すように「0」にする(ステップS82)。そして、回転速度fが一定の加速傾向から変化したと判断して、閾値Sを変更値S(n)から初期値S(0)に戻して設定する(ステップS83)。これによって、1回変化量ΔF1の「0」および「+」側へ向かう推移により小さくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)大きくなる。   Further, as shown on the right side of FIG. 15, when the rotational speed f of the motor 3 has changed from a constant acceleration tendency (no longer showing a constant acceleration tendency), the current 3 as shown by a thin broken line on the right side. From the first predetermined value A ′ on the “−” side, a part of the one-time change amount ΔF1 in the previous four sections changes to the side that tends to reach the threshold (the side toward “0” and “+”). It becomes larger (step S100 in FIG. 14: NO). The twice-change amount ΔF2 is shifted from “0” to the “+” side, and does not fall below the second predetermined value B ′ on the “−” side. When the condition in step S100 is not satisfied as described above, the change condition flag is set to “0” to indicate that the condition is not satisfied (step S82). Then, it is determined that the rotation speed f has changed from a certain acceleration tendency, and the threshold value S is set back from the change value S (n) to the initial value S (0) (step S83). As a result, the erroneous detection margin of the rotation abnormality of the motor 3 that has become too small due to the transition of the one-time change amount ΔF1 toward the “0” and “+” side is increased by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部88で現在の1回変化量ΔF1(0)と閾値S(0)とを比較して、1回変化量ΔF1(0)が閾値S(0)以上であるか否かを判定する(ステップS84)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS81)か、または「0」にし(ステップS85)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change / threshold comparison unit 88 compares the current one-time change amount ΔF1 (0) with the threshold value S (0), and whether the one-time change amount ΔF1 (0) is greater than or equal to the threshold value S (0). It is determined whether or not (step S84). Then, the change amount / threshold comparison flag is set to “1” (step S81) or “0” (step S85) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

一方、図4に示すように窓100に物体Zを挟み込んだ場合は、図示していないが、モータ3の回転速度fは挟まれ時から急激に低下して「0」に近づき、1回変化量ΔF1および2回変化量ΔF2はともに挟まれ時から上昇して、さらに1回変化量ΔF1は閾値Sに達する。このため、図14のステップ77で2回変化量ΔF2(z)〜ΔF2(z+n)が第2の所定値B以上となり(ステップS77:NO)、さらにステップS100で1回変化量ΔF1(z)〜ΔF1(z+n)が第1の所定値A’より大きくなり(ステップS100:NO)、変更条件フラグを「0」にして(ステップS82)、閾値Sを初期値S(0)に設定する(ステップS83)。そして、ステップS84で現在の1回変化量ΔF1(0)が閾値S(0)以上になっていると判定し(ステップS84:YES)、変化量・閾値比較フラグを「1」にして(ステップS81)、モータ3の回転状態検出処理を終了し、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、マニュアル閉処理またはオート閉処理を終了する。   On the other hand, when the object Z is sandwiched in the window 100 as shown in FIG. 4, the rotational speed f of the motor 3 rapidly decreases from the time when the object Z is sandwiched and approaches “0” and changes once. Both the amount ΔF1 and the twice-change amount ΔF2 rise from the time of being sandwiched, and the once-change amount ΔF1 reaches the threshold value S. Therefore, in step 77 of FIG. 14, the twice-change amount ΔF2 (z) to ΔF2 (z + n) becomes equal to or larger than the second predetermined value B (step S77: NO), and in step S100, the once-change amount ΔF1 (z). ~ ΔF1 (z + n) becomes larger than the first predetermined value A ′ (step S100: NO), the change condition flag is set to “0” (step S82), and the threshold value S is set to the initial value S (0) ( Step S83). In step S84, it is determined that the current one-time variation ΔF1 (0) is equal to or greater than the threshold S (0) (step S84: YES), and the variation / threshold comparison flag is set to “1” (step S84). S81), the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. Thereafter, in the same procedure as described above, it is determined that rotation abnormality of the motor 3 due to the pinching has occurred (step S17 in FIG. 7 or step S37 in FIG. 8). Then, a motor reverse rotation signal is output to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and open the window 100 completely (in FIG. 7). Step S19: YES or Step S39 in FIG. 8: YES), the manual closing process or the automatic closing process is terminated.

以上の第2実施形態のようにすると、モータ3の回転速度fが一定の減速傾向にある場合は、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の第1の所定値A以上となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の第2の所定値B未満となるので、1回変化量ΔF1(0)が閾値Sに達し難くなるように閾値Sが変更されて、モータ3の回転異常の誤検知マージンを大きくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。また、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合には、1回変化量ΔF1(z)〜ΔF1(z+n)の一部が「+」側の第1の所定値A未満となるので、変更した閾値S(m)が初期値S(0)に戻されて、モータ3の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   According to the second embodiment described above, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variations ΔF1 (z) to ΔF1 (z + n) are the first on the “+” side. Is greater than or equal to the predetermined value A, and all of the twice-change amounts ΔF2 (z) to ΔF2 (z + n) are less than the second predetermined value B on the “+” side. The threshold value S is changed so that it becomes difficult to reach the value, and the erroneous detection margin of the rotation abnormality of the motor 3 can be increased. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected. Further, when the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, a part of the one-time variation ΔF1 (z) to ΔF1 (z + n) is the first on the “+” side. Since it becomes less than the predetermined value A, the changed threshold value S (m) is returned to the initial value S (0), and it is possible to suppress the erroneous detection margin for the rotation abnormality of the motor 3 from becoming too large. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately.

また、モータ3の回転速度fが一定の加速傾向にある場合は、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「0」より「−」側にあって「−」側の第1の所定値A’以下となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「0」付近にあって「−」側の第2の所定値B’より大きくなるので、1回変化量ΔF1(0)が閾値Sに達し易くなるように、閾値Sが変更されて、モータ3の回転異常の誤検知マージンを小さくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。また、モータ3の回転速度が一定の加速傾向から変化した場合に、閾値Sを変更したS(n)のままにしておくと、1回変化量が「0」以外の値でかつ閾値Sに達し易い値(閾値S側に寄った値)になるため、モータ3の回転異常の誤検知マージンが小さくなり過ぎて、外乱の影響等によるモータ3の回転異常を誤検知し易くなる。然るに、上述のように、モータ3の回転速度fが一定の加速傾向から変化して、1回変化量ΔF1が「0」より閾値Sに達し易い「+」側に推移して、「−」側の第1の所定値A’より大きくなり、2回変化量ΔF2が「0」より「+」側に推移して飽和し、「−」側の第2の所定値B’以下にならないことを受けて、変更した閾値S(n)を初期値S(0)に戻すと、モータ3の回転異常の誤検知マージンを小さくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   When the rotational speed f of the motor 3 has a constant acceleration tendency, all of the one-time variations ΔF1 (z) to ΔF1 (z + n) are on the “−” side from “0”, and on the “−” side. Since it is equal to or less than the first predetermined value A ′ and all of the twice-change amounts ΔF2 (z) to ΔF2 (z + n) are in the vicinity of “0” and are larger than the second predetermined value B ′ on the “−” side, The threshold value S is changed so that the one-time change amount ΔF1 (0) can easily reach the threshold value S, so that a false detection margin for abnormal rotation of the motor 3 can be reduced. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately. Further, when the rotational speed of the motor 3 changes from a certain acceleration tendency, if the threshold S is changed to S (n), the one-time change amount is a value other than “0” and the threshold S is set. Since the value is easily reached (value approaching the threshold value S side), the erroneous detection margin for abnormal rotation of the motor 3 becomes too small, and it becomes easy to erroneously detect abnormal rotation of the motor 3 due to the influence of disturbance or the like. However, as described above, the rotational speed f of the motor 3 changes from a constant acceleration tendency, and the one-time change amount ΔF1 changes from “0” to the “+” side where the threshold value S is easily reached. Larger than the first predetermined value A ′ on the side, the double variation ΔF2 shifts from “0” to the “+” side and is saturated, and does not fall below the second predetermined value B ′ on the “−” side. When the changed threshold value S (n) is returned to the initial value S (0), the erroneous detection margin for the rotation abnormality of the motor 3 can be suppressed from becoming too small. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected.

さらに、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の第1の所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の第2の所定値B未満である場合と、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「−」側の第1の所定値A’以下であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「−」側の第2の所定値B’より大きい場合において、現在の1回変化量ΔF1(0)が閾値S以上になったときに、モータ3の反転または停止を禁止するので、モータ3の回転速度fが一定の減速傾向または加速傾向にある場合に、モータ3が回転異常状態ではないのに、外乱の影響等により1回変化量ΔF1(0)が閾値S以上になっても、モータ3の回転状態をそのまま維持することができる。   Furthermore, all of the first variation ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the first predetermined value A on the “+” side, and all of the second variation ΔF2 (z) to ΔF2 (z + n) are When the value is less than the second predetermined value B on the “+” side, and all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are equal to or less than the first predetermined value A ′ on the “−” side, and When all of the twice-change amount ΔF2 (z) to ΔF2 (z + n) are larger than the second predetermined value B ′ on the “−” side, the current one-time change amount ΔF1 (0) is equal to or greater than the threshold value S. In some cases, the motor 3 is prohibited from being reversed or stopped. Therefore, when the rotational speed f of the motor 3 tends to be a constant deceleration or acceleration, the motor 3 is not in an abnormal rotation state, but the motor 3 is not in an abnormal rotation state. Even when the rotation change amount ΔF1 (0) becomes equal to or greater than the threshold value S, the rotation state of the motor 3 is maintained as it is. Can.

図16は、本発明の第3実施形態における回転異常検出ブロックを示した図である。図中、図5と同一部分には同一符号を付してある。図5では、記憶部84、86から読み出した1回変化量および2回変化量に基づいて、前述したように閾値を変更する閾値変更部87を設けていたが、図16ではこれに代えて、記憶部84、86から読み出した1回変化量および2回変化量に基づいて、後述するように1回変化量算出部83から出力される1回変化量を変更する変化量変更部90を設けている。また、変化量・閾値比較部91は、変化量変更部90から出力される未変更または変更後の1回変化量と所定の閾値とを比較する。変化量変更部90は、本発明における変化量変更手段の一実施形態を構成し、変化量・閾値比較部91は、本発明における比較手段の一実施形態を構成する。   FIG. 16 is a diagram showing a rotation abnormality detection block in the third embodiment of the present invention. In the figure, the same parts as those in FIG. In FIG. 5, the threshold value changing unit 87 for changing the threshold value is provided as described above based on the one-time change amount and the two-time change amount read from the storage units 84 and 86, but in FIG. Based on the one-time change amount and the two-time change amount read from the storage units 84 and 86, a change amount changing unit 90 that changes the one-time change amount output from the one-time change amount calculating unit 83 as will be described later. Provided. Further, the change amount / threshold comparison unit 91 compares the unchanged or changed one-time change amount output from the change amount changing unit 90 with a predetermined threshold value. The change amount changing unit 90 constitutes one embodiment of a change amount changing unit in the present invention, and the change amount / threshold comparing unit 91 constitutes one embodiment of a comparing unit in the present invention.

図17は、第3実施形態におけるモータ3の回転状態検出処理の一部の詳細手順を示したフローチャートである。本フローチャートは、前述の図12のフローチャートに代えて、前述の図11のフローチャートの続きとして実行されるものである。よって、図11を第3実施形態として引用する。また、前述の図7および図8のフローチャートも第3実施形態として引用する。図11において、前述したようにステップS71〜S75を実行して、モータ3の現在の回転速度f(0)、1回変化量ΔF1(0)、および2回変化量ΔF2(0)をそれぞれ取得して、対応する記憶部82、84、86に記憶する。   FIG. 17 is a flowchart showing a detailed procedure of a part of the rotation state detection process of the motor 3 in the third embodiment. This flowchart is executed as a continuation of the flowchart of FIG. 11 described above, instead of the flowchart of FIG. 12 described above. Therefore, FIG. 11 is cited as the third embodiment. The flowcharts of FIGS. 7 and 8 are also cited as the third embodiment. In FIG. 11, Steps S71 to S75 are executed as described above to obtain the current rotation speed f (0), the first variation ΔF1 (0), and the second variation ΔF2 (0) of the motor 3, respectively. And stored in the corresponding storage units 82, 84, 86.

図18は、第3実施形態における窓100の閉動作中のモータ3の回転速度と1回変化量および2回変化量の時間的変化を示した図である。モータ3の回転速度f、1回変化量ΔF1、および2回変化量ΔF2の表示形態と検出・算出方法と変化状況は、図13と同様である。第1の所定値Aおよび第2の所定値Bの表示形態と値も、図13と同様である。閾値Sは、変更されることはなく常に一定の値(本例では8Hz)である。白四角で示しているΔF1−Cは1回変化量ΔF1を変更した値である。これについては後述する。   FIG. 18 is a diagram showing temporal changes in the rotation speed, the first variation, and the second variation during the closing operation of the window 100 in the third embodiment. The display form, detection / calculation method, and change state of the rotation speed f, the first change amount ΔF1, and the second change amount ΔF2 of the motor 3 are the same as those in FIG. The display forms and values of the first predetermined value A and the second predetermined value B are also the same as in FIG. The threshold value S is not changed and is always a constant value (8 Hz in this example). ΔF1-C indicated by a white square is a value obtained by changing the amount of change ΔF1 once. This will be described later.

図11でステップS75を終了すると、現在の所定回数前の一定区間における1回変化量ΔF1(z)〜ΔF1(z+n)および2回変化量ΔF2(z)〜ΔF1(z+n)をそれぞれ記憶部84、86から読み出す(ステップS76)。そして、変化量変更部90で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが所定値B未満であるか否かを判定する(図17のステップS90)。この条件は、本第3実施形態では1回変化量ΔF1をダウンして、モータ3の回転異常の誤検知マージンの減少をオフセット(相殺)するためのものである。図18では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが第1の所定値A以上でありかつ2回変化量ΔF2の全てが第2の所定値B未満であることとしている。   When step S75 is completed in FIG. 11, the first-time variation ΔF1 (z) to ΔF1 (z + n) and the second-time variation ΔF2 (z) to ΔF1 (z + n) in the predetermined interval before the current predetermined number of times are respectively stored in the storage unit 84. , 86 (step S76). In the change amount changing unit 90, all of the one-time change amounts ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the predetermined value A, and all of the two-time change amounts ΔF2 (z) to ΔF2 (z + n) are predetermined values. It is determined whether it is less than B (step S90 in FIG. 17). This condition is for offsetting (decreasing) the decrease in the false detection margin of the rotation abnormality of the motor 3 by reducing the amount of change ΔF1 once in the third embodiment. In FIG. 18, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are greater than or equal to the first predetermined value A and all of the two-time variation ΔF2 are less than the second predetermined value B. I am going to do that.

図18に示すようにモータ3の回転速度fが一定の減速傾向にある場合は、粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「+」側にあって第1の所定値A以上となり、かつ2回変化量ΔF2の全てが「0」付近にあって第2の所定値B未満となるので(図17のステップS90:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS91)。そして、回転速度fが一定の減速傾向にあると判断して、1回変化量ΔF1が閾値Sに達し難くなるように、1回変化量算出部83から出力される現在の1回変化量ΔF1(0)を所定量ダウンした値ΔF1(0)−Cに変更する(ステップS92)。図18では、1回変化量ΔF1を1Hzダウンして変更後の1回変化量ΔF1−Cを算出している。これによって、モータ3の回転異常の誤検知マージンが大きくなる。   As shown in FIG. 18, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variation ΔF1 in the four previous three sections are “+” as surrounded by a rough broken line. The first predetermined value A is greater than or equal to the first predetermined value A, and all the twice-change amounts ΔF2 are near “0” and less than the second predetermined value B (step S90 in FIG. 17: YES). The condition flag is set to “1” to indicate that the above condition is satisfied (step S91). Then, it is determined that the rotational speed f has a constant deceleration tendency, and the current one-time change amount ΔF1 output from the one-time change amount calculation unit 83 so that the one-time change amount ΔF1 does not easily reach the threshold value S. (0) is changed to a value ΔF1 (0) -C that is reduced by a predetermined amount (step S92). In FIG. 18, the one-time change amount ΔF1-C is calculated by reducing the one-time change amount ΔF1 by 1 Hz. As a result, an erroneous detection margin for abnormal rotation of the motor 3 is increased.

次いで、変化量・閾値比較部91で変更後の1回変化量ΔF1(0)−Cと閾値Sとを比較して、1回変化量ΔF1(0)−Cが閾値S以上であるか否かを判定する(ステップS93)。ここで、1回変化量ΔF1(0)−Cが閾値S以上であれば(ステップS93:YES)、変化量・閾値比較フラグを1回変化量ΔF1(0)−Cが閾値S以上であることを示すように「1」にする(ステップS94)。また、1回変化量ΔF1(0)−Cが閾値S未満であれば(ステップS93:NO)、変化量・閾値比較フラグを1回変化量ΔF1(0)−Cが閾値S以上でないことを示すように「0」にする(ステップS98)。そして、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「1」で(図7のステップS15:YESまたは図8のステップS35:YES)かつ変更条件フラグが「1」である(図7のステップS16:NOまたは図8のステップS36:NO)ため、または変化量・閾値比較フラグが「0」である(図7のステップS15:NOまたは図8のステップS35:NO)ため、挟み込みによるモータ3の回転異常が発生していないと判断する(図7のステップS20または図8のステップS40)。そして、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、前述したように以降の処理を実行する。   Next, the change amount / threshold comparison unit 91 compares the changed once change amount ΔF1 (0) -C with the threshold value S, and whether or not the once change amount ΔF1 (0) -C is equal to or greater than the threshold value S. Is determined (step S93). Here, if the one-time variation ΔF1 (0) -C is equal to or greater than the threshold S (step S93: YES), the variation / threshold comparison flag indicates that the one-time variation ΔF1 (0) -C is equal to or greater than the threshold S. In order to show that, “1” is set (step S94). If the single change amount ΔF1 (0) -C is less than the threshold value S (step S93: NO), the change amount / threshold comparison flag indicates that the single change amount ΔF1 (0) -C is not greater than or equal to the threshold value S. As shown, “0” is set (step S98). Then, the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, the change amount / threshold comparison flag is “1” (step S15 in FIG. 7: YES or step S35 in FIG. 8: YES) and the change condition flag is “1” (step in FIG. 7). S16: NO or step S36 in FIG. 8: NO), or because the change amount / threshold comparison flag is “0” (step S15 in FIG. 7: NO or step S35 in FIG. 8: NO), the motor 3 due to pinching It is determined that no rotation abnormality has occurred (step S20 in FIG. 7 or step S40 in FIG. 8). Then, a reverse / stop prohibition signal is output from the motor drive circuit 2 to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed as described above.

そしてその後、図18に示すようにモータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合は、細かい破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が「−」側に推移して、第1の所定値A未満となる(図17のステップS90:NO)。さらにこの後、1回変化量ΔF1は図18に示すように「−」側に推移した後「−」側のある値で飽和する。2回変化量ΔF2の方は、一旦「−」側に推移した後、また「0」付近に戻って飽和し、第2の所定値B以上になることはない。上記のようにステップS90の条件を満たさなくなると、変更条件フラグを条件が満たされていないことを示すように「0」にする(ステップS95)。そして、回転速度fが一定の減速傾向から変化したと判断して、現在の1回変化量ΔF1(0)に対する変更(ダウン)を止める(ステップS96)。この後、変化量・閾値比較部91で現在の1回変化量ΔF1(0)と閾値Sとを比較して、1回変化量ΔF1(0)が閾値S以上であるか否かを判定する(ステップS97)。このとき、上記のように1回変化量ΔF1の「−」側への推移により大きくなり過ぎたモータ3の回転異常の誤検知マージンが、1回変化量ΔF1に対する変更を止めたことにより所定量(本例では1Hz)小さくなるが、ある程度の外乱があっても、1回変化量ΔF1(0)は閾値S以上になり難い。   After that, as shown in FIG. 18, when the rotational speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, as shown in a fine broken line, it is once in the current four sections. A part of the change amount ΔF1 shifts to the “−” side and becomes less than the first predetermined value A (step S90 in FIG. 17: NO). Further, after this, the one-time variation ΔF1 shifts to the “−” side as shown in FIG. 18 and then saturates at a certain value on the “−” side. The twice-change amount ΔF2 once shifts to the “−” side, then returns to the vicinity of “0” and is saturated, and does not exceed the second predetermined value B. When the condition of step S90 is not satisfied as described above, the change condition flag is set to “0” to indicate that the condition is not satisfied (step S95). Then, it is determined that the rotational speed f has changed from a constant deceleration tendency, and the change (down) to the current one-time change amount ΔF1 (0) is stopped (step S96). Thereafter, the change / threshold comparison unit 91 compares the current single change ΔF1 (0) with the threshold S to determine whether the single change ΔF1 (0) is equal to or greater than the threshold S. (Step S97). At this time, as described above, the erroneous detection margin of the rotation abnormality of the motor 3 that has become too large due to the transition of the one-time variation ΔF1 to the “−” side is stopped by the change to the one-time variation ΔF1. (1 Hz in this example) is small, but even if there is a certain amount of disturbance, the one-time change amount ΔF1 (0) is unlikely to be greater than or equal to the threshold value S.

ステップS97で、1回変化量ΔF1(0)が閾値S未満であれば(ステップS97:NO)、変化量・閾値比較フラグを「0」にし(ステップS98)、1回変化量ΔF1(0)が閾値S以上であれば(ステップS97:YES)、変化量・閾値比較フラグを「1」にする(ステップS94)。そして、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。このようにして移行すると、変化量・閾値比較フラグが「0」であれば(図7のステップS15:NOまたは図8のステップS35:NO)、挟み込みによるモータ3の回転異常が発生していないと判断する(図7のステップS20または図8のステップS40)。そして、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、前述したように以降の処理を実行する。対して、変化量・閾値比較フラグが「1」であれば(図7のステップS15:YESまたは図8のステップS35:YES)、変更条件フラグは「0」である(図7のステップS16:YESまたは図8のステップS36:YES)ので、窓100への物体Zの挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ駆動回路2から逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、マニュアル閉処理またはオート閉処理を終了する。   If the one-time variation ΔF1 (0) is less than the threshold value S in step S97 (step S97: NO), the variation / threshold comparison flag is set to “0” (step S98), and the one-time variation ΔF1 (0). Is greater than or equal to the threshold S (step S97: YES), the change amount / threshold comparison flag is set to "1" (step S94). Then, the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. When the transition is made in this way, if the change amount / threshold comparison flag is “0” (step S15 in FIG. 7: NO or step S35 in FIG. 8: NO), the rotation abnormality of the motor 3 due to pinching has not occurred. (Step S20 in FIG. 7 or Step S40 in FIG. 8). Then, a reverse / stop prohibition signal is output from the motor drive circuit 2 to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed as described above. On the other hand, if the change amount / threshold comparison flag is “1” (step S15 in FIG. 7: YES or step S35 in FIG. 8: YES), the change condition flag is “0” (step S16 in FIG. 7: Since YES or step S36 in FIG. 8: YES), it is determined that rotation abnormality of the motor 3 due to the object Z being caught in the window 100 has occurred (step S17 in FIG. 7 or step S37 in FIG. 8). Then, the motor drive circuit 2 outputs a reverse rotation signal to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and if the window 100 is completely opened. (Step S19 in FIG. 7: YES or Step S39 in FIG. 8: YES), the manual closing process or the automatic closing process ends.

一方、図4に示すように窓100に物体Zを挟み込んだ場合は、図示していないが、モータ3の回転速度fは挟まれ時から急激に低下して「0」に近づき、1回変化量ΔF1および2回変化量ΔF2はともに挟まれ時から上昇して、さらに1回変化量ΔF1は閾値Sに達する。このため、図17のステップ90で2回変化量ΔF2(z)〜ΔF2(z+n)が第2の所定値B以上となり(ステップS90:NO)、変更条件フラグを「0」にして(ステップS95)、1回変化量ΔF1(0)の変更を止める(ステップS96)。そして、ステップS97で現在の1回変化量ΔF1(0)が閾値S以上になっていると判定し(ステップS97:YES)、変化量・閾値比較フラグを「1」にして(ステップS94)、モータ3の回転状態検出処理を終了し、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、マニュアル閉処理またはオート閉処理を終了する。   On the other hand, when the object Z is sandwiched in the window 100 as shown in FIG. 4, the rotational speed f of the motor 3 rapidly decreases from the time when the object Z is sandwiched and approaches “0” and changes once. Both the amount ΔF1 and the twice-change amount ΔF2 rise from the time of being sandwiched, and the once-change amount ΔF1 reaches the threshold value S. Therefore, in step 90 of FIG. 17, the twice-change amount ΔF2 (z) to ΔF2 (z + n) becomes equal to or larger than the second predetermined value B (step S90: NO), and the change condition flag is set to “0” (step S95). ) The change of the one-time variation ΔF1 (0) is stopped (step S96). In step S97, it is determined that the current one-time variation ΔF1 (0) is equal to or greater than the threshold value S (step S97: YES), and the variation / threshold comparison flag is set to “1” (step S94). The rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. Thereafter, in the same procedure as described above, it is determined that rotation abnormality of the motor 3 due to the pinching has occurred (step S17 in FIG. 7 or step S37 in FIG. 8). Then, a motor reverse rotation signal is output to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and open the window 100 completely (in FIG. 7). Step S19: YES or Step S39 in FIG. 8: YES), the manual closing process or the automatic closing process is terminated.

以上の第3実施形態のようにすると、モータ3の回転速度fが一定の減速傾向にある場合は、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「0」より「+」側にあって第1の所定値A以上となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「0」付近にあって第2の所定値B未満となるので、1回変化量ΔF1(0)が閾値Sに達し難くなるように変更(ダウン)されて、モータ3の回転異常の誤検知マージンを大きくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   According to the third embodiment described above, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are “+” from “0”. The first predetermined value A is greater than or equal to the first predetermined value A, and the two-time variation ΔF2 (z) to ΔF2 (z + n) is all near “0” and less than the second predetermined value B. The amount ΔF1 (0) is changed (down) so that it does not easily reach the threshold value S, so that the erroneous detection margin of the rotation abnormality of the motor 3 can be increased. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected.

また、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合に、1回変化量ΔF1(0)の上記変更を継続していると、1回変化量ΔF1が「−」側の値(閾値Sと反対側に寄った値)になるため、モータ3の回転異常の誤検知マージンが大きくなり過ぎて、外乱の影響等によるモータ3の回転異常の誤検知だけでなく、実際のモータ3の回転異常も検知し難くなる。然るに、上述のように、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わって、1回変化量ΔF1が「−」側に推移した後飽和して、第1の所定値A未満となり、2回変化量ΔF2が一旦「0」より「−」側に推移した後また「0」付近に戻って飽和して、第2の所定値B以上にならないことを受けて、1回変化量ΔF1(0)の上記変更を止めると、モータ3の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   When the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, if the change of the one-time variation ΔF1 (0) is continued, the one-time variation ΔF1 is “− ”Side (a value closer to the side opposite to the threshold value S), the erroneous detection margin for the abnormal rotation of the motor 3 becomes too large, and not only the erroneous detection of the abnormal rotation of the motor 3 due to the influence of disturbance or the like. Further, it becomes difficult to detect an actual rotation abnormality of the motor 3. However, as described above, the rotational speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, and the once change amount ΔF1 is shifted to the “−” side and then saturated, so that the first predetermined value is reached. In response to the fact that the twice change amount ΔF2 once shifted from “0” to the “−” side and again saturated near “0” and does not become the second predetermined value B or more. If the above change in the rotational change amount ΔF1 (0) is stopped, it is possible to suppress the erroneous detection margin for the rotation abnormality of the motor 3 from becoming too large. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately.

さらに、1回変化量ΔF1(Z)〜ΔF1(Z+n)の全てが第1の所定値A以上であり、かつ2回変化量ΔF2(Z)〜ΔF2(Z+n)の全てが第2の所定値B未満である場合において、変更後の1回変化量ΔF1(0)−Cが閾値S以上になったときに、モータ3の反転または停止を禁止するので、モータ3の回転速度fが一定の減速傾向にある場合に、モータ3が回転異常状態ではないのに、外乱の影響等により1回変化量ΔF1(0)−Cが閾値S以上になっても、モータ3の回転状態をそのまま維持することができる。   Furthermore, all of the one-time variation amounts ΔF1 (Z) to ΔF1 (Z + n) are equal to or greater than the first predetermined value A, and all the two-time variation amounts ΔF2 (Z) to ΔF2 (Z + n) are the second predetermined value. In the case where it is less than B, the reverse rotation or stop of the motor 3 is prohibited when the changed once-change amount ΔF1 (0) -C is equal to or greater than the threshold value S. Therefore, the rotational speed f of the motor 3 is constant. Even if the motor 3 is not in an abnormal rotation state when the motor is in a deceleration tendency, the rotation state of the motor 3 is maintained as it is even if the one-time variation ΔF1 (0) -C exceeds the threshold value S due to the influence of a disturbance or the like. can do.

図19は、第4実施形態におけるモータ3の回転状態検出処理の一部の詳細手順を示したフローチャートである。本フローチャートは、前述の図12のフローチャートに代えて、前述の図11のフローチャートの続きとして実行されるものである。よって、図11を第4実施形態として引用する。また、前述の図7および図8のフローチャートも第4実施形態として引用する。さらに、本第4実施形態の回転異常検出ブロックは図16と同様であるため、図16も第4実施形態として引用する。図11において、前述したようにステップS71〜S75を実行して、モータ3の現在の回転速度f(0)、1回変化量ΔF1(0)、および2回変化量ΔF2(0)をそれぞれ取得して、対応する記憶部82、84、86に記憶する。   FIG. 19 is a flowchart showing a detailed procedure of a part of the rotation state detection process of the motor 3 in the fourth embodiment. This flowchart is executed as a continuation of the flowchart of FIG. 11 described above, instead of the flowchart of FIG. 12 described above. Therefore, FIG. 11 is cited as the fourth embodiment. The flowcharts of FIGS. 7 and 8 are also cited as the fourth embodiment. Furthermore, since the rotation abnormality detection block of the fourth embodiment is the same as that of FIG. 16, FIG. 16 is also cited as the fourth embodiment. In FIG. 11, Steps S71 to S75 are executed as described above to obtain the current rotation speed f (0), the first variation ΔF1 (0), and the second variation ΔF2 (0) of the motor 3, respectively. And stored in the corresponding storage units 82, 84, 86.

図20は、第4実施形態における窓100の閉動作中のモータ3の回転速度と1回変化量および2回変化量の時間的変化を示した図である。モータ3の回転速度f、1回変化量ΔF1、および2回変化量ΔF2の表示形態と検出・算出方法は、図13と同様である。「+」側の第1の所定値Aおよび第2の所定値Bと、「−」側の第1の所定値A’および第2の所定値B’の表示形態と値は、図15と同様である。閾値Sは、変更されることはなく常に一定の値(本例では8Hz)である。実線の白四角で示しているΔF1−Cは1回変化量ΔF1を所定量ダウンするように変更した値であり、破線の白四角で示しているΔF1+Dは1回変化量ΔF1を所定量アップするように変更した値である。これらについては後述する。   FIG. 20 is a diagram showing temporal changes in the rotation speed, the one-time change amount, and the two-time change amount during the closing operation of the window 100 in the fourth embodiment. The display form and the detection / calculation method of the rotational speed f, the first variation ΔF1 and the second variation ΔF2 of the motor 3 are the same as those in FIG. The display forms and values of the first predetermined value A and the second predetermined value B on the “+” side and the first predetermined value A ′ and the second predetermined value B ′ on the “−” side are as shown in FIG. It is the same. The threshold value S is not changed and is always a constant value (8 Hz in this example). ΔF1-C indicated by a solid white square is a value obtained by changing the amount of change ΔF1 by a predetermined amount, and ΔF1 + D indicated by a dashed white square increases the amount of change ΔF1 by a predetermined amount. The value is changed as follows. These will be described later.

図11でステップS75を終了すると、現在の所定回数前の一定区間における1回変化量ΔF1(z)〜ΔF1(z+n)および2回変化量ΔF2(z)〜ΔF1(z+n)をそれぞれ記憶部84、86から読み出す(ステップS76)。そして、変化量変更部90で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の所定値B未満であるか否かを判定する(図19のステップS90)。この条件は、本第4実施形態では1回変化量ΔF1をダウンして、モータ3の回転異常の誤検知マージンの減少をオフセットするためのものである。図20では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが「+」側の第1の所定値A以上でありかつ2回変化量ΔF2の全てが「+」側の第2の所定値B未満であることとしている。   When step S75 is completed in FIG. 11, the first-time variation ΔF1 (z) to ΔF1 (z + n) and the second-time variation ΔF2 (z) to ΔF1 (z + n) in the predetermined interval before the current predetermined number of times are respectively stored in the storage unit 84. , 86 (step S76). Then, in the change amount changing unit 90, all of the once change amounts ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the predetermined value A on the “+” side, and the twice change amounts ΔF2 (z) to ΔF2 (z + n). Are all less than the predetermined value B on the “+” side (step S90 in FIG. 19). This condition is for offsetting the decrease in the erroneous detection margin of the rotation abnormality of the motor 3 by decreasing the one-time change amount ΔF1 in the fourth embodiment. In FIG. 20, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are equal to or more than the first predetermined value A on the “+” side, and all of the two-time variation ΔF2 are on the “+” side. Is less than the second predetermined value B.

図20の左側に示すようにモータ3の回転速度fが一定の減速傾向にある場合は、左側に粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「+」側にあって第1の所定値A以上となり、かつ2回変化量ΔF2の全てが「0」付近にあって第2の所定値B未満となるので(図19のステップS90:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS91)。そして、回転速度fが一定の減速傾向にあると判断して、1回変化量ΔF1が閾値Sに達し難くなるように、現在の1回変化量ΔF1(0)を所定量ダウンした値ΔF1(0)−Cに変更する(ステップS92)。図20では、1回変化量ΔF1を1Hzダウンして変更後の1回変化量ΔF1−Cを算出している。これによって、モータ3の回転異常の誤検知マージンが所定量(本例では1Hz)大きくなる。   As shown on the left side of FIG. 20, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variation ΔF1 in the four previous three sections as indicated by a rough broken line on the left side. Is on the “+” side and is greater than or equal to the first predetermined value A, and all the twice-changes ΔF2 are near “0” and less than the second predetermined value B (step S90 in FIG. 19: YES), the change condition flag is set to “1” to indicate that the above condition is satisfied (step S91). Then, it is determined that the rotational speed f has a constant deceleration tendency, and a current value ΔF1 (0) obtained by reducing the current one-time variation ΔF1 (0) by a predetermined amount so that the one-time variation ΔF1 does not easily reach the threshold S. 0) -C (step S92). In FIG. 20, the one-time change amount ΔF <b> 1 -C is calculated by reducing the one-time change amount ΔF <b> 1 by 1 Hz. As a result, the erroneous detection margin for abnormal rotation of the motor 3 is increased by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部91で変更後の1回変化量ΔF1(0)−Cと閾値Sとを比較して、1回変化量ΔF1(0)−Cが閾値S以上であるか否かを判定する(ステップS93)。そして、この判定結果に応じて変化量・閾値比較フラグを、1回変化量ΔF1(0)−Cが閾値S以上であることを示す「1」(ステップS94)か、または閾値S未満であることを示す「0」にし(ステップS98)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していないと判断し(図7のステップS20または図8のステップS40)、モータ駆動回路2から反転・停止禁止信号を出力して、モータ3の正転を継続させ(図7のステップS21または図8のステップS41)、以降の処理を実行する。   Next, the change amount / threshold comparison unit 91 compares the changed once change amount ΔF1 (0) -C with the threshold value S, and whether or not the once change amount ΔF1 (0) -C is equal to or greater than the threshold value S. Is determined (step S93). Then, the change amount / threshold comparison flag is “1” (step S94) indicating that the one-time change amount ΔF1 (0) -C is equal to or greater than the threshold value S or less than the threshold value S according to the determination result. “0” indicating this (step S98), the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. Thereafter, in the same procedure as described above, it is determined that rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8), and the motor drive circuit 2 prohibits reversal / stop. A signal is output to continue normal rotation of the motor 3 (step S21 in FIG. 7 or step S41 in FIG. 8), and the subsequent processing is executed.

そしてその後、図20の中央より若干左側に示すようにモータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合は、中央より若干左側に細かい破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が第1の所定値A未満となって、図19のステップS90の条件を満たさなくなる(ステップS90:NO)。このようになると、変化量変更部90で1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「−」側の所定値A’以下であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「−」側の所定値B’より大きいか否かを判定する(ステップS110)。この条件は、本第4実施形態では閾値Sをアップして、モータ3の回転異常の誤検知マージンの増加をオフセットするためのものである。図20では、現在から3回前の連続する4区間における1回変化量ΔF1の全てが「−」側の第1の所定値A’以下でありかつ2回変化量ΔF2の全てが「−」側の第2の所定値B’より大きいこととしている。   After that, when the rotational speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency as shown slightly to the left of the center of FIG. Part of the one-time variation ΔF1 in the four sections three times before becomes less than the first predetermined value A, and the condition of step S90 in FIG. 19 is not satisfied (step S90: NO). In this case, the change amount changing unit 90 has all of the once-change amounts ΔF1 (z) to ΔF1 (z + n) equal to or less than the predetermined value A ′ on the “−” side, and the twice-change amount ΔF2 (z) to It is determined whether or not all of ΔF2 (z + n) is larger than a predetermined value B ′ on the “−” side (step S110). This condition is for increasing the threshold value S in the fourth embodiment to offset the increase in the erroneous detection margin of the rotation abnormality of the motor 3. In FIG. 20, all of the one-time variation ΔF1 in four consecutive sections three times before the current time are equal to or less than the first predetermined value A ′ on the “−” side, and all of the two-time variation ΔF2 are “−”. The second predetermined value B ′ is greater than the second predetermined value B ′.

図20の中央より左側に細かい破線で囲んでいる状況では、現在の3回前の4区間における1回変化量ΔF1の全てが「0」より閾値Sに達し易い「+」側にあって第1の所定値A’より大きく、かつ2回変化量ΔF2の一部が「−」側にあって第2の所定値B’以下であるので(ステップS110:NO)、変更条件フラグを上記条件が満たされないことを示すように「0」にする(ステップS95)。そして、回転速度fが一定の減速傾向から変化したと判断して、現在の1回変化量ΔF1(0)に対する変更(ダウン)を止める(ステップS96)。これによって、1回変化量ΔF1の「−」側への推移により大きくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)小さくなる。   In the situation surrounded by a fine broken line on the left side from the center of FIG. 1 is larger than the predetermined value A ′ and part of the twice-change amount ΔF2 is on the “−” side and is equal to or smaller than the second predetermined value B ′ (step S110: NO), the change condition flag is set to the above condition. Is set to “0” to indicate that is not satisfied (step S95). Then, it is determined that the rotational speed f has changed from a constant deceleration tendency, and the change (down) to the current one-time change amount ΔF1 (0) is stopped (step S96). As a result, the erroneous detection margin for the rotation abnormality of the motor 3 that has become too large due to the transition of the one-time change amount ΔF1 to the “−” side is reduced by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部91で現在の1回変化量ΔF1(0)と閾値S(0)とを比較して、1回変化量ΔF1(0)が閾値S(0)以上であるか否かを判定する(ステップS97)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS94)か、または「0」にし(ステップS98)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change / threshold comparison unit 91 compares the current one-time change amount ΔF1 (0) with the threshold value S (0) to determine whether the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S (0). It is determined whether or not (step S97). Then, the change amount / threshold comparison flag is set to “1” (step S94) or “0” (step S98) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

また、図20のほぼ中央に示すようにモータ3の回転速度fが一定の加速傾向であり続けている場合は、ほぼ中央に粗い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の全てが「−」側の第1の所定値A’以下となり、かつ2回変化量ΔF2の全てが「0」付近にあって「−」側の第2の所定値B’より大きくなるので(ステップS110:YES)、変更条件フラグを上記条件が満たされたことを示すように「1」にする(ステップS111)。そして、回転速度fが一定の加速傾向であると判断して、1回変化量ΔF1が閾値Sに達し易くなるように、現在の1回変化量ΔF1(0)を所定量アップした値ΔF1(0)+Dに変更する(ステップS112)。図20では、1回変化量ΔF1を1Hzアップして変更後の1回変化量ΔF+Dを算出している。これによって、モータ3の回転異常の誤検知マージンが所定量(本例では1Hz)小さくなる。   In addition, when the rotational speed f of the motor 3 continues to have a constant acceleration tendency as shown in the approximate center of FIG. 20, the current three times in the previous four sections are surrounded by a rough broken line at the approximate center. All of the one-time variation ΔF1 is equal to or less than the first predetermined value A ′ on the “−” side, and all of the two-time variation ΔF2 is in the vicinity of “0”, and the second predetermined value B on the “−” side. Since it is greater than '(step S110: YES), the change condition flag is set to "1" to indicate that the above condition is satisfied (step S111). Then, it is determined that the rotational speed f has a constant acceleration tendency, and the current one-time change amount ΔF1 (0) is increased by a predetermined amount ΔF1 (so that the one-time change amount ΔF1 can easily reach the threshold value S. 0) + D (step S112). In FIG. 20, the single change amount ΔF + D after the change is calculated by increasing the single change amount ΔF1 by 1 Hz. As a result, the erroneous detection margin for abnormal rotation of the motor 3 is reduced by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部91で変更後の1回変化量ΔF1(0)+Dと閾値Sとを比較して、1回変化量ΔF1(0)+Dが閾値S以上であるか否かを判定する(ステップS113)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS94)か、または「0」にし(ステップS98)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change amount / threshold comparison unit 91 compares the changed once-change amount ΔF1 (0) + D with the threshold value S to determine whether or not the once-change amount ΔF1 (0) + D is equal to or greater than the threshold value S. Determination is made (step S113). Then, the change amount / threshold comparison flag is set to “1” (step S94) or “0” (step S98) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

また、図20の右側に示すようにモータ3の回転速度fが一定の加速傾向から変化した場合は、右側に細い破線で囲んでいるように現在の3回前の4区間における1回変化量ΔF1の一部が閾値に達し易い側(「0」および「+」に向かう側)に推移して、「−」側の第1の所定値A’より大きくなる(図19のステップS110:NO)。2回変化量ΔF2の方は、「0」より「+」側に推移して、「−」側の第2の所定値B’以下になることはない。上記のようにステップS110の条件を満たさなくなると、変更条件フラグを上記条件が満たされていないことを示すように「0」にする(ステップS95)。そして、回転速度fが一定の加速傾向から変化したと判断して、現在の1回変化量ΔF1(0)に対する変更(アップ)を止める(ステップS96)。これによって、1回変化量ΔF1の「0」および「+」側へ向かう推移により小さくなり過ぎたモータ3の回転異常の誤検知マージンが所定量(本例では1Hz)大きくなる。   Also, as shown on the right side of FIG. 20, when the rotational speed f of the motor 3 changes from a constant acceleration tendency, the amount of one-time change in the four previous sections three times before as shown by a thin broken line on the right side. A part of ΔF1 shifts to the side that tends to reach the threshold value (side toward “0” and “+”), and becomes larger than the first predetermined value A ′ on the “−” side (step S110 in FIG. 19: NO). ). The twice-change amount ΔF2 is shifted from “0” to the “+” side, and does not fall below the second predetermined value B ′ on the “−” side. When the condition in step S110 is not satisfied as described above, the change condition flag is set to “0” to indicate that the condition is not satisfied (step S95). Then, it is determined that the rotation speed f has changed from a certain acceleration tendency, and the change (up) to the current one-time change amount ΔF1 (0) is stopped (step S96). As a result, the erroneous detection margin of the rotation abnormality of the motor 3 that has become too small due to the transition of the one-time change amount ΔF1 toward the “0” and “+” side is increased by a predetermined amount (1 Hz in this example).

次いで、変化量・閾値比較部91で現在の1回変化量ΔF1(0)と閾値Sとを比較して、1回変化量ΔF1(0)が閾値S以上であるか否かを判定する(ステップS97)。そして、この判定結果に応じて変化量・閾値比較フラグを「1」(ステップS94)か、または「0」にし(ステップS98)、モータ3の回転状態検出処理を終了して、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生していない(図7のステップS20または図8のステップS40)か、または発生した(図7のステップS17または図8のステップS37)と判断する。そして、この結果に応じて前述したように、図7のステップS21または図8のステップS41を実行して、以降の処理を実行するか、或いは図7のステップS18、S19または図8のステップS38、S39を実行して、マニュアル閉処理またはオート閉処理を終了する。   Next, the change / threshold comparison unit 91 compares the current one-time change amount ΔF1 (0) with the threshold value S to determine whether or not the one-time change amount ΔF1 (0) is equal to or greater than the threshold value S ( Step S97). Then, the change amount / threshold comparison flag is set to “1” (step S94) or “0” (step S98) according to the determination result, and the rotation state detection process of the motor 3 is terminated, and the step of FIG. The process proceeds to S15 or step S35 in FIG. Thereafter, in the same procedure as described above, rotation abnormality of the motor 3 due to pinching has not occurred (step S20 in FIG. 7 or step S40 in FIG. 8) or has occurred (step S17 in FIG. 7 or FIG. 7). 8 step S37). Depending on this result, as described above, step S21 in FIG. 7 or step S41 in FIG. 8 is executed to execute the subsequent processing, or steps S18, S19 in FIG. 7 or step S38 in FIG. , S39 is executed to end the manual closing process or the automatic closing process.

一方、図4に示すように窓100に物体Zを挟み込んだ場合は、図示していないが、モータ3の回転速度fは挟まれ時から急激に低下して「0」に近づき、1回変化量ΔF1および2回変化量ΔF2はともに挟まれ時から上昇して、さらに1回変化量ΔF1は閾値Sに達する。このため、図19のステップ90で2回変化量ΔF2(z)〜ΔF2(z+n)が第2の所定値B以上となり(ステップS90:NO)、さらにステップS110で1回変化量ΔF1(z)〜ΔF1(z+n)が第1の所定値A’より大きくなり(ステップS110:NO)、変更条件フラグを「0」にして(ステップS95)、現在の1回変化量ΔF1(0)に対する変更を止める(ステップS96)。そして、ステップS97で現在の1回変化量ΔF1(0)が閾値S(0)以上になっていると判定し(ステップS97:YES)、変化量・閾値比較フラグを「1」にして(ステップS94)、モータ3の回転状態検出処理を終了し、図7のステップS15または図8のステップS35へ移行する。この後、前述したのと同様の手順で、挟み込みによるモータ3の回転異常が発生したと判断する(図7のステップS17または図8のステップS37)。そして、モータ逆転信号を出力してモータ3を逆転させ、窓100を開いて(図7のステップS18および図8のステップS38)、挟み込みを解除し、窓100が完全に開けば(図7のステップS19:YESまたは図8のステップS39:YES)、マニュアル閉処理またはオート閉処理を終了する。   On the other hand, when the object Z is sandwiched in the window 100 as shown in FIG. 4, the rotational speed f of the motor 3 rapidly decreases from the time when the object Z is sandwiched and approaches “0” and changes once. Both the amount ΔF1 and the twice-change amount ΔF2 rise from the time of being sandwiched, and the once-change amount ΔF1 reaches the threshold value S. Therefore, in step 90 of FIG. 19, the twice-change amount ΔF2 (z) to ΔF2 (z + n) becomes equal to or greater than the second predetermined value B (step S90: NO), and in step S110, the once-change amount ΔF1 (z). .About..DELTA.F1 (z + n) becomes larger than the first predetermined value A '(step S110: NO), the change condition flag is set to "0" (step S95), and the current change amount .DELTA.F1 (0) is changed. Stop (step S96). In step S97, it is determined that the current one-time variation ΔF1 (0) is equal to or greater than the threshold S (0) (step S97: YES), and the variation / threshold comparison flag is set to “1” (step S97). S94), the rotation state detection process of the motor 3 is terminated, and the process proceeds to step S15 in FIG. 7 or step S35 in FIG. Thereafter, in the same procedure as described above, it is determined that rotation abnormality of the motor 3 due to the pinching has occurred (step S17 in FIG. 7 or step S37 in FIG. 8). Then, a motor reverse rotation signal is output to reverse the motor 3, open the window 100 (step S18 in FIG. 7 and step S38 in FIG. 8), release the pinching, and open the window 100 completely (in FIG. 7). Step S19: YES or Step S39 in FIG. 8: YES), the manual closing process or the automatic closing process is terminated.

以上の第4実施形態のようにすると、モータ3の回転速度fが一定の減速傾向にある場合は、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の第1の所定値A以上となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の第2の所定値B未満となるので、1回変化量ΔF1(0)が閾値Sに達し難くなるように変更(ダウン)されて、モータ3の回転異常の誤検知マージンを大きくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。また、モータ3の回転速度fが一定の減速傾向から一定の加速傾向に切り替わった場合には、1回変化量ΔF1(z)〜ΔF1(z+n)の一部が「+」側の第1の所定値A未満となるので、1回変化量ΔF1(0)が上記のように変更されなくなって、モータ3の回転異常の誤検知マージンを大きくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   According to the fourth embodiment described above, when the rotational speed f of the motor 3 has a constant deceleration tendency, all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are the first on the “+” side. Is greater than or equal to the predetermined value A, and all of the twice-change amounts ΔF2 (z) to ΔF2 (z + n) are less than the second predetermined value B on the “+” side, so that the one-time change amount ΔF1 (0) is the threshold value S. Therefore, it is possible to increase the erroneous detection margin of the rotation abnormality of the motor 3. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected. Further, when the rotation speed f of the motor 3 is switched from a constant deceleration tendency to a constant acceleration tendency, a part of the one-time variation ΔF1 (z) to ΔF1 (z + n) is the first on the “+” side. Since it is less than the predetermined value A, it is possible to prevent the one-time change amount ΔF1 (0) from being changed as described above, and to prevent the erroneous detection margin of the rotation abnormality of the motor 3 from becoming too large. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately.

また、モータ3の回転速度fが一定の加速傾向にある場合は、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「0」より「−」側にあって「−」側の第1の所定値A’以下となり、2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「0」付近にあって「−」側の第2の所定値B’より大きくなるので、1回変化量ΔF1(0)が閾値Sに達し易くなるように変更(アップ)されて、モータ3の回転異常の誤検知マージンを小さくすることができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなるとともに、実際にモータ3の回転異常が生じたときに回転異常無しと誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。また、モータ3の回転速度が一定の加速傾向から変化した場合に、1回変化量ΔF1(0)の上記変更を継続していると、1回変化量ΔF1が閾値Sに達し易い値になるため、モータ3の回転異常の誤検知マージンが小さくなり過ぎて、外乱の影響等によるモータ3の回転異常を誤検知し易くなる。然るに、上述のように、モータ3の回転速度fが一定の加速傾向から変化して、1回変化量ΔF1が「0」より閾値Sに達し易い「+」側に推移して、「−」側の第1の所定値A’より大きくなり、2回変化量ΔF2が「0」より「+」側に推移して、「−」側の第2の所定値B’以下にならないことを受けて、1回変化量ΔF1(0)の上記変更を止めると、モータ3の回転異常の誤検知マージンを小さくなり過ぎないよう抑制することができる。このため、外乱の影響等によりモータ3の回転異常の有無を誤判定し難くなり、モータ3の回転異常を正確に検知可能となる。   When the rotational speed f of the motor 3 has a constant acceleration tendency, all of the one-time variations ΔF1 (z) to ΔF1 (z + n) are on the “−” side from “0”, and on the “−” side. Since it is equal to or less than the first predetermined value A ′ and all of the twice-change amounts ΔF2 (z) to ΔF2 (z + n) are in the vicinity of “0” and are larger than the second predetermined value B ′ on the “−” side, The one-time change amount ΔF1 (0) is changed (up) so as to easily reach the threshold value S, so that the erroneous detection margin of the rotation abnormality of the motor 3 can be reduced. For this reason, it is difficult to erroneously determine whether there is an abnormality in the rotation of the motor 3 due to the influence of disturbance, etc., and it is difficult to erroneously determine that there is no abnormality in the rotation of the motor 3 when an abnormality in the rotation of the motor 3 actually occurs. Can be detected accurately. In addition, when the rotation speed of the motor 3 changes from a constant acceleration tendency, if the change of the one-time change amount ΔF1 (0) is continued, the one-time change amount ΔF1 easily reaches the threshold value S. Therefore, the erroneous detection margin for the rotation abnormality of the motor 3 becomes too small, and it becomes easy to erroneously detect the rotation abnormality of the motor 3 due to the influence of disturbance or the like. However, as described above, the rotational speed f of the motor 3 changes from a constant acceleration tendency, and the one-time change amount ΔF1 changes from “0” to the “+” side where the threshold value S is easily reached. The second change amount ΔF2 changes from “0” to the “+” side and does not fall below the “−” side second predetermined value B ′. Thus, if the above change of the one-time change amount ΔF1 (0) is stopped, it is possible to suppress the erroneous detection margin for the rotation abnormality of the motor 3 from becoming too small. For this reason, it becomes difficult to erroneously determine the presence or absence of rotation abnormality of the motor 3 due to the influence of disturbance or the like, and the rotation abnormality of the motor 3 can be accurately detected.

さらに、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「+」側の第1の所定値A以上であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「+」側の第2の所定値B未満である場合と、1回変化量ΔF1(z)〜ΔF1(z+n)の全てが「−」側の第1の所定値A’以下であり、かつ2回変化量ΔF2(z)〜ΔF2(z+n)の全てが「−」側の第2の所定値B’より大きい場合において、変更後の1回変化量ΔF1(0)−C、ΔF1(0)+Dが閾値S以上になったときに、モータ3の反転または停止を禁止するので、モータ3の回転速度fが一定の減速傾向または加速傾向にある場合に、モータ3が回転異常状態ではないのに、外乱の影響等により1回変化量ΔF1(0)−C、ΔF1(0)+Dが閾値S以上になっても、モータ3の回転状態をそのまま維持することができる。   Furthermore, all of the first variation ΔF1 (z) to ΔF1 (z + n) are equal to or greater than the first predetermined value A on the “+” side, and all of the second variation ΔF2 (z) to ΔF2 (z + n) are When the value is less than the second predetermined value B on the “+” side, and all of the one-time variation amounts ΔF1 (z) to ΔF1 (z + n) are equal to or less than the first predetermined value A ′ on the “−” side, and When all of the twice-change amounts ΔF2 (z) to ΔF2 (z + n) are larger than the second predetermined value B ′ on the “−” side, the once-change amounts ΔF1 (0) −C and ΔF1 (0) after the change are made. ) When + D becomes equal to or greater than the threshold value S, the reverse or stop of the motor 3 is prohibited. Therefore, when the rotational speed f of the motor 3 tends to be a constant deceleration or acceleration, the motor 3 is not in an abnormal rotation state. However, the amount of change once ΔF1 (0) −C and ΔF1 (0) + D becomes greater than or equal to the threshold value S due to the influence of disturbance, etc. Also, it is possible to maintain the rotational state of the motor 3.

以上述べた実施形態では、本発明を車両のドアの窓を開閉制御する装置に適用した場合を例に挙げたが、本発明はこれ以外にも、車両の天井のサンルーフ、車両の後部扉、建物の窓、建物の扉・戸など各種の開閉体を開閉制御する装置に適用することができる。   In the embodiment described above, the case where the present invention is applied to an apparatus for controlling opening / closing of a door window of a vehicle is taken as an example, but the present invention is not limited to this, the sun roof on the ceiling of the vehicle, the rear door of the vehicle, The present invention can be applied to a device that controls opening and closing of various opening and closing bodies such as building windows and building doors and doors.

本発明の実施形態であるパワーウィンドウ装置の電気的構成を示したブロック図である。It is the block diagram which showed the electric constitution of the power window apparatus which is embodiment of this invention. 操作スイッチの一例を示した概略構成図である。It is the schematic block diagram which showed an example of the operation switch. 窓開閉機構の一例を示した図である。It is the figure which showed an example of the window opening / closing mechanism. 窓に物体が挟み込まれた状態を示した図である。It is the figure which showed the state by which the object was pinched | interposed into the window. 本発明の第1実施形態における回転異常検出ブロックを示した図である。It is the figure which showed the rotation abnormality detection block in 1st Embodiment of this invention. パワーウィンドウ装置の基本的な動作を示したフローチャートである。It is the flowchart which showed the basic operation | movement of the power window apparatus. マニュアル閉処理の詳細手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of the manual closing process. オート閉処理の詳細手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of the automatic closing process. マニュアル開処理の詳細手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of the manual opening process. オート開処理の詳細手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of the automatic opening process. 本発明の第1実施形態におけるモータの回転状態検出処理の一部の詳細手順を示したフローチャートである。It is the flowchart which showed the one part detailed procedure of the rotation state detection process of the motor in 1st Embodiment of this invention. 本発明の第1実施形態におけるモータの回転状態検出処理の一部の詳細手順を示したフローチャートである。It is the flowchart which showed the one part detailed procedure of the rotation state detection process of the motor in 1st Embodiment of this invention. 本発明の第1実施形態におけるモータの回転速度と1回変化量および2回変化量の時間的変化を示した図である。It is the figure which showed the rotational speed of the motor in 1st Embodiment of this invention, and the time change of 1 time variation | change_quantity and 2 time variation | change_quantity. 本発明の第2実施形態におけるモータの回転状態検出処理の一部の詳細手順を示したフローチャートである。It is the flowchart which showed a part of detailed procedure of the rotation state detection process of the motor in 2nd Embodiment of this invention. 本発明の第2実施形態におけるモータの回転速度と1回変化量および2回変化量の時間的変化を示した図である。It is the figure which showed the rotational speed of the motor in 2nd Embodiment of this invention, the time change of 1 time variation | change_quantity, and 2 time variation | change_quantity. 本発明の第3実施形態における回転異常検出ブロックを示した図である。It is the figure which showed the rotation abnormality detection block in 3rd Embodiment of this invention. 本発明の第3実施形態におけるモータの回転状態検出処理の一部の詳細手順を示したフローチャートである。It is the flowchart which showed a part of detailed procedure of the rotation state detection process of the motor in 3rd Embodiment of this invention. 本発明の第3実施形態におけるモータの回転速度と1回変化量および2回変化量の時間的変化を示した図である。It is the figure which showed the rotational speed of the motor in 3rd Embodiment of this invention, the time change of 1 time variation | change_quantity, and 2 time variation | change_quantity. 本発明の第4実施形態におけるモータの回転状態検出処理の一部の詳細手順を示したフローチャートである。It is the flowchart which showed a part of detailed procedure of the rotation state detection process of the motor in 4th Embodiment of this invention. 本発明の第4実施形態におけるモータの回転速度と1回変化量および2回変化量の時間的変化を示した図である。It is the figure which showed the rotational speed of the motor in 4th Embodiment of this invention, and the time change of 1 time variation | change_quantity and 2 time variation | change_quantity.

符号の説明Explanation of symbols

3 モータ
4 ロータリエンコーダ
5 パルス検出回路
6 メモリ
8 制御部
81 回転速度検出部
82 回転速度記憶部
83 1回変化量算出部
84 1回変化量記憶部
85 2回変化量算出部
86 2回変化量記憶部
87 閾値変更部
88 変化量・閾値比較部
89 回転異常判定部
90 変化量変更部
91 変化量・閾値比較部
A 「+」側の第1の所定値
B 「+」側の第2の所定値
A’ 「−」側の第1の所定値
B’ 「−」側の第2の所定値
f モータの回転速度
F1 1回変化量(モータの回転速度の変化量)
F2 2回変化量(モータの回転速度の変化量の変化量)
S 閾値
DESCRIPTION OF SYMBOLS 3 Motor 4 Rotary encoder 5 Pulse detection circuit 6 Memory 8 Control part 81 Rotation speed detection part 82 Rotation speed memory | storage part 83 1 time change amount calculation part 84 1 time change amount storage part 85 2 time change amount calculation part 86 2 time change amount Storage unit 87 Threshold change unit 88 Change amount / threshold comparison unit 89 Rotation abnormality determination unit 90 Change amount change unit 91 Change amount / threshold comparison unit A First predetermined value on “+” side B Second on “+” side Predetermined value A '1st predetermined value on the "-" side B' 2nd predetermined value on the "-" side
F2 twice change amount (change amount of motor rotation speed change amount)
S threshold

Claims (9)

回転速度が一定の変化傾向にある電動機を制御する電動機制御装置であって、
前記電動機の回転速度を検出する検出手段と、
前記検出手段で検出された回転速度を順次記憶する第1の記憶手段と、
前記検出手段から出力される現在の回転速度と前記第1の記憶手段に記憶されている過去の回転速度とから回転速度の変化量を1回変化量として算出する第1の算出手段と、
前記第1の算出手段で算出された1回変化量を順次記憶する第2の記憶手段と、
前記第1の算出手段で算出された現在の1回変化量と前記第2の記憶手段に記憶されている過去の1回変化量とから回転速度の変化量の変化量を2回変化量として算出する第2の算出手段と、
前記第2の算出手段で算出された2回変化量を順次記憶する第3の記憶手段と、
予め設定された閾値を変更する閾値変更手段と、
前記閾値と前記1回変化量とを比較する比較手段と、
前記比較手段の比較結果に基づいて前記電動機の回転異常の有無を判定する判定手段と、
前記判定手段の判定結果に応じて前記電動機を制御する制御手段と、を備え、
前記第2の記憶手段および前記第3の記憶手段に記憶されている所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が予め設定された第1の所定値に達し、かつ前記2回変化量が予め設定された第2の所定値に達していない場合に、前記閾値変更手段は前記閾値を変更し、前記比較手段は該変更後の閾値と前記1回変化量とを比較することを特徴とする電動機制御装置。
An electric motor control device for controlling an electric motor whose rotational speed has a constant change tendency,
A detecting means for detecting a rotational speed of the electric motor,
First storage means for sequentially storing rotational speeds detected by the detection means;
First calculation means for calculating a change amount of the rotation speed as a one-time change amount from a current rotation speed output from the detection means and a past rotation speed stored in the first storage means;
Second storage means for sequentially storing the amount of one-time change calculated by the first calculation means;
Based on the current one-time change amount calculated by the first calculation means and the past one-time change amount stored in the second storage means, the change amount of the rotation speed change amount is defined as a two-time change amount. A second calculating means for calculating;
Third storage means for sequentially storing the twice change amount calculated by the second calculation means;
Threshold changing means for changing a preset threshold;
A comparison means for comparing the threshold value with the one-time change amount;
Determination means for determining presence or absence of rotation abnormality of the electric motor based on a comparison result of the comparison means;
Control means for controlling the electric motor according to the determination result of the determination means,
Of the one-time change amount and the two-time change amount calculated in a predetermined section before the predetermined number of times stored in the second storage means and the third storage means, the one-time change amount is set in advance. When the first predetermined value is reached and the amount of change twice does not reach the second predetermined value set in advance, the threshold changing means changes the threshold, and the comparing means changes the change. A motor control device that compares a later threshold value with the one-time change amount.
請求項1に記載の電動機制御装置において、
前記第1の所定値および前記第2の所定値は、前記1回変化量および前記2回変化量が当該所定値に達するかまたは達しないかにより前記電動機の回転速度が一定の減速傾向にあるか否かを判断できるような値にそれぞれ設定されていて、
前記閾値変更手段は、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値以上となることで当該第1の所定値に達し、かつ前記2回変化量が前記第2の所定値未満となることで当該第2の所定値に達していない場合に、前記電動機の回転速度が一定の減速傾向にあると判断して、前記1回変化量が前記閾値に達し難くなるように前記閾値を変更することを特徴とする電動機制御装置。
In the electric motor control device according to claim 1,
The first predetermined value and the second predetermined value tend to decelerate at a constant rotational speed of the motor depending on whether the one-time change amount and the two-time change amount reach or do not reach the predetermined value. Are set to values that can be used to determine whether
The threshold value changing means is configured such that the one-time change amount of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times is equal to or greater than the first predetermined value. When the predetermined value of 1 is reached and the amount of change twice is less than the second predetermined value and does not reach the second predetermined value, the rotational speed of the electric motor tends to be a constant deceleration. And the threshold value is changed so that the one-time change amount does not easily reach the threshold value.
請求項1に記載の電動機制御装置において、
前記第1の所定値および前記第2の所定値は、前記1回変化量および前記2回変化量が当該所定値に達するかまたは達しないかにより前記電動機の回転速度が一定の加速傾向にあるか否かを判断できるような値にそれぞれ設定されていて、
前記閾値変更手段は、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値以下となることで当該第1の所定値に達しかつ前記2回変化量が前記第2の所定値より大きくなることで当該第2の所定値に達していない場合に、前記電動機の回転速度が一定の加速傾向にあると判断して、前記1回変化量が前記閾値に達し易くなるように前記閾値を変更することを特徴とする電動機制御装置。
In the electric motor control device according to claim 1,
The first predetermined value and the second predetermined value have a tendency that the rotational speed of the motor is constant acceleration depending on whether the one-time change amount and the two-time change amount reach or do not reach the predetermined value. Are set to values that can be used to determine whether
The threshold value changing means is configured such that, of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times, the first change amount is equal to or less than the first predetermined value . 1 reaches a predetermined value, and when the twice variation is not reached to the second predetermined value by greater than said second predetermined value, the rotational speed of the electric motor is in a constant acceleration tendency And the threshold value is changed so that the one-time change amount easily reaches the threshold value.
請求項1ないし請求項3のいずれかに記載の電動機制御装置において、
前記閾値変更手段は、前記閾値の変更後に、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値に達しなくなった場合または前記2回変化量が前記第2の所定値に達した場合に、変更した閾値を元の値に戻すことを特徴とする電動機制御装置。
In the electric motor control device according to any one of claims 1 to 3,
The threshold value changing means, after the threshold value is changed, out of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times, the one-time change amount becomes the first predetermined value. An electric motor control device that returns a changed threshold value to an original value when the amount of change does not reach or when the amount of change twice reaches the second predetermined value.
回転速度が一定の変化傾向にある電動機を制御する電動機制御装置であって、
前記電動機の回転速度を検出する検出手段と、
前記検出手段で検出された回転速度を順次記憶する第1の記憶手段と、
前記検出手段から出力される現在の回転速度と前記第1の記憶手段に記憶されている過去の回転速度とから回転速度の変化量を1回変化量として算出する第1の算出手段と、
前記第1の算出手段で算出された1回変化量を順次記憶する第2の記憶手段と、
前記第1の算出手段で算出された1回変化量を変更する変化量変更手段と、
前記第1の算出手段で算出された現在の1回変化量と前記第2の記憶手段に記憶されている過去の1回変化量とから回転速度の変化量の変化量を2回変化量として算出する第2の算出手段と、
前記第2の算出手段で算出された2回変化量を順次記憶する第3の記憶手段と、
予め設定された閾値と前記1回変化量とを比較する比較手段と、
前記比較手段の比較結果に基づいて前記電動機の回転異常の有無を判定する判定手段と、
前記判定手段の判定結果に応じて前記電動機を制御する制御手段と、を備え、
前記第2の記憶手段および前記第3の記憶手段に記憶されている所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が予め設定された第1の所定値に達し、かつ前記2回変化量が予め設定された第2の所定値に達していない場合に、前記変化量変更手段は前記1回変化量を変更し、前記比較手段は該変更後の1回変化量と前記閾値とを比較することを特徴とする電動機制御装置。
An electric motor control device for controlling an electric motor whose rotational speed has a constant change tendency,
A detecting means for detecting a rotational speed of the electric motor,
First storage means for sequentially storing rotational speeds detected by the detection means;
First calculation means for calculating a change amount of the rotation speed as a one-time change amount from a current rotation speed output from the detection means and a past rotation speed stored in the first storage means;
Second storage means for sequentially storing the amount of one-time change calculated by the first calculation means;
Change amount changing means for changing the one-time change amount calculated by the first calculating means;
Based on the current one-time change amount calculated by the first calculation means and the past one-time change amount stored in the second storage means, the change amount of the rotation speed change amount is defined as a two-time change amount. A second calculating means for calculating;
Third storage means for sequentially storing the twice change amount calculated by the second calculation means;
A comparison means for comparing a preset threshold value with the one-time change amount;
Determination means for determining presence or absence of rotation abnormality of the electric motor based on a comparison result of the comparison means;
Control means for controlling the electric motor according to the determination result of the determination means,
Of the one-time change amount and the two-time change amount calculated in a predetermined section before the predetermined number of times stored in the second storage means and the third storage means, the one-time change amount is set in advance. When the first predetermined value is reached and the second-time change amount does not reach a preset second predetermined value, the change-amount changing means changes the first-time change amount, and the comparison The means compares the amount of one-time change after the change with the threshold value.
請求項5に記載の電動機制御装置において、
前記第1の所定値および前記第2の所定値は、前記1回変化量および前記2回変化量が当該所定値に達するかまたは達しないかにより前記電動機の回転速度が一定の減速傾向にあるか否かを判断できるような値にそれぞれ設定されていて、
前記変化量変更手段は、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値以上となることで当該第1の所定値に達しかつ前記2回変化量が前記第2の所定値未満となることで当該第2の所定値に達していない場合に、前記電動機の回転速度が一定の減速傾向にあると判断して、前記1回変化量が前記閾値に達し難くなるように前記1回変化量を変更することを特徴とする電動機制御装置。
In the motor control device according to claim 5,
The first predetermined value and the second predetermined value tend to decelerate at a constant rotational speed of the motor depending on whether the one-time change amount and the two-time change amount reach or do not reach the predetermined value. Are set to values that can be used to determine whether
The change amount changing unit is configured such that, of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times, the one-time change amount is equal to or greater than the first predetermined value. It reaches a first predetermined value, and when the twice variation is not reached to the second predetermined value by a second less than a predetermined value, the deceleration trend rotational speed is constant of the motor An electric motor control device characterized by determining that there is a change and changing the one-time change amount so that the one-time change amount does not easily reach the threshold value.
請求項5に記載の電動機制御装置において、
前記第1の所定値および前記第2の所定値は、前記1回変化量および前記2回変化量が当該所定値に達するかまたは達しないかにより前記電動機の回転速度が一定の加速傾向にあるか否かを判断できるような値にそれぞれ設定されていて、
前記変化量変更手段は、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値以下となることで当該第1の所定値に達しかつ前記2回変化量が前記第2の所定値より大きくなることで当該第2の所定値に達していない場合に、前記電動機の回転速度が一定の加速傾向にあると判断して、前記1回変化量が前記閾値に達し易くなるように前記1回変化量を変更することを特徴とする電動機制御装置。
In the motor control device according to claim 5,
The first predetermined value and the second predetermined value have a tendency that the rotational speed of the motor is constant acceleration depending on whether the one-time change amount and the two-time change amount reach or do not reach the predetermined value. Are set to values that can be used to determine whether
The change amount changing unit is configured to cause the one-time change amount to be equal to or less than the first predetermined value among the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times. It reaches a first predetermined value, and when the twice variation is not reached to the second predetermined value by greater than said second predetermined value, the acceleration trend rotational speed is constant of the motor An electric motor control device that determines that there is a change and changes the one-time change amount so that the one-time change amount easily reaches the threshold value.
請求項5ないし請求項7のいずれかに記載の電動機制御装置において、
前記変化量変更手段は、前記1回変化量の変更後に、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値に達しなくなった場合または前記2回変化量が前記第2の所定値に達した場合に、前記1回変化量の変更を止めることを特徴とする電動機制御装置。
In the motor control device according to any one of claims 5 to 7,
The change amount changing means is configured to change the first change amount between the first change amount and the second change amount calculated in the predetermined section before the predetermined number of times after the change of the first change amount. An electric motor control device that stops changing the one-time change amount when the predetermined value is not reached or when the two-time change amount reaches the second predetermined value.
請求項1ないし請求項8のいずれかに記載の電動機制御装置において、
前記制御手段は、前記所定回数前の所定区間に算出された前記1回変化量と前記2回変化量のうち、前記1回変化量が前記第1の所定値に達し、かつ前記2回変化量が前記第2の所定値に達していない場合において、前記1回変化量が前記閾値に達したときに、前記電動機の反転または停止を禁止することを特徴とする電動機制御装置。
In the electric motor control device according to any one of claims 1 to 8,
The control means is configured such that, of the one-time change amount and the two-time change amount calculated in the predetermined section before the predetermined number of times, the one-time change amount reaches the first predetermined value and the two-time change amount. In the case where the amount does not reach the second predetermined value, the motor control device prohibits reversal or stop of the motor when the one-time change amount reaches the threshold value.
JP2005343856A 2005-11-29 2005-11-29 Electric motor control device Expired - Fee Related JP4789601B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005343856A JP4789601B2 (en) 2005-11-29 2005-11-29 Electric motor control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005343856A JP4789601B2 (en) 2005-11-29 2005-11-29 Electric motor control device

Publications (2)

Publication Number Publication Date
JP2007151333A JP2007151333A (en) 2007-06-14
JP4789601B2 true JP4789601B2 (en) 2011-10-12

Family

ID=38212066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005343856A Expired - Fee Related JP4789601B2 (en) 2005-11-29 2005-11-29 Electric motor control device

Country Status (1)

Country Link
JP (1) JP4789601B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11324481A (en) * 1998-05-20 1999-11-26 Denso Corp Power window device having jamming prevention function
JP4739562B2 (en) * 2001-03-30 2011-08-03 株式会社ミツバ Opening / closing object pinching determination control method
JP4739563B2 (en) * 2001-03-30 2011-08-03 株式会社ミツバ Opening / closing object pinching determination control method
JP2002327574A (en) * 2001-05-01 2002-11-15 Mitsuba Corp Method for controlling determination as to whether anything is caught in closer determination control method for clip caught by closer

Also Published As

Publication number Publication date
JP2007151333A (en) 2007-06-14

Similar Documents

Publication Publication Date Title
JP4781127B2 (en) Electric motor control device
JP4131272B2 (en) Window opening and closing control device
JP4103906B2 (en) Motor control device
US7812554B2 (en) Control device for opening/closing member
JP4855173B2 (en) Opening and closing body control device
US10337230B2 (en) Control device for opening and closing bodies
JP2005232753A (en) Opening/closing body control unit
JP5085371B2 (en) Opening and closing body control device
JP4781126B2 (en) Opening and closing body control device
JP4789601B2 (en) Electric motor control device
JP2007009573A (en) Opening/closing control device
JP4664872B2 (en) Pinch detection device
JP4781129B2 (en) Electric motor control device
JP4808566B2 (en) Opening and closing body control device
JP4664134B2 (en) Open / close control device
JP2001173345A (en) Wind pressure malfunctioning stop prevention device in opening switch
JP4135706B2 (en) Open / close control device
JPH05280253A (en) Control device for opening and closing member
JP3889329B2 (en) Opening / closing member control apparatus and opening / closing member control method
JP4884856B2 (en) Opening / closing member control device
JP4153181B2 (en) Sunroof control device and sunroof control method
JP6485081B2 (en) Vehicle window opening and closing device
JP6432367B2 (en) Vehicle window opening and closing device
JP5314304B2 (en) Opening / closing member control device
JP4781873B2 (en) Opening / closing member control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080708

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100726

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110405

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110530

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: 20110719

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110719

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140729

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4789601

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees