# Patent

## Title
Travel control method, travel control device, and mobile robot for

## Abstract

An apparatus for driving and controlling a motor which moves a movable portion of a vehicle by driving force of the motor. The apparatus includes a drive stopping circuit for comparing a value of current detected by a current detection circuit, which detects drive current of the motor when the movable portion is being moved, with a predetermined comparison current value, and for stopping driving of the motor at a time when a detected current value exceeds the comparison current value. The apparatus also includes a comparison current varying circuit for varying the comparison current value based on a temperature of an environment of the movable portion. Since it is possible to carry out temperature compensation based on ordinary drive current and lock current of the motor, the comparison current value can be set within a wide range.

## Background
1. Field of the Invention

The present invention relates to an apparatus for driving and controlling a motor which moves (raises and lowers) a movable portion of a vehicle, such as a door glass of a power window apparatus, by the driving force of the motor.

2. Description of the Related Art

A power window apparatus is provided with a motor for raising and lowering a door glass.

Generally, manual switches and an auto-switch are provided at a location near the driver's seat as switches for the power window apparatus.

When the driver operates one of the manual switches, the contact for raising or the contact for lowering is turned on. Upon termination of the operation, the manual switch is automatically returned so that the contact is turned off. Since driving of the motor is continued only when the operation of the manual switch continues, the raising and lowering of the door glass can be stopped halfway.

In an automatic operation mode, once the contact for raising or the contact for lowering of the auto-switch is turned on, driving of the motor is continued until the door glass is completely closed or is completely opened even after the driver releases the auto-switch. When the door glass is completely closed, the movement of the door glass is prevented by the window frame or the like, whereby the drive current of the motor increases. Further, driving of the motor may be stopped when the drive current exceeds a predetermined level, or when an abnormal increase in drive current (hereinafter referred to as "abnormal current") due to the catching of a foreign object on the locus of upward movement of the door glass is detected. In such a system, there is provided a full-closure detecting switch for detecting that the door glass is nearing its full closure position so that a current increase due to a foreign object may be discriminated from a current increase due to the full closure of the door glass. Further, it is possible to reverse the motor for a predetermined period of time when the catching of a foreign object is detected.

However, resistance to the movement of the door glass is effected by the temperature of the environment of the door glass, and the drive current of the motor varies in accordance with variation of the resistance. Namely, since freezing and dew condensation occur at low temperatures (especially, at temperatures near the freezing temperature), the movement of the regulator mechanism becomes dull. Further, the smooth movement of the door glass is hindered by the guide portions for the door glass (such as the window frame, weatherstrips made of rubber, and the like) due to the change in hardness of rubber parts, such as the weatherstrips and the like. Accordingly, it is determined that the detected level corresponds to lock current, which occurs when the door glass is fully closed, or that there is abnormal current, even if the door glass has not been completely closed or no foreign object exists on the locus of movement of the door glass. In this case, a drawback arises in that the motor is erroneously stopped such that the door glass cannot be fully closed in a low temperature state.

To obviate the above-mentioned drawback, a system has been considered in which a threshold value for detecting the abnormal current is set to be relatively high so as to be adapted to low temperatures. In this case, setting of the threshold value becomes difficult because the difference between the drive current of the motor at low temperatures and the motor lock current at ordinary temperatures is extremely small. Further, either at ordinary temperatures or at higher temperatures, there may be cases in which the threshold value becomes higher than the motor lock current. In such cases, the overloaded state of the motor continues.

The present invention has been accomplished by taking the above-mentioned facts into consideration, and the object of the present invention is to provide an improved apparatus for driving and controlling a motor which can prevent the motor from being continuously driven in an overloaded state regardless of whether the temperature of the environment is low or high.

The present invention provides an improved apparatus for driving and controlling a motor which moves a movable portion of a vehicle by the driving force of the motor. The apparatus comprises current detection means for detecting current flowing through the motor when the motor is driven; drive and control means for comparing a value of current, which is detected by the current detection means when the movable portion is being moved, with a predetermined comparison current value, and for controlling driving of the motor at a time when the detected current value exceeds the comparison current value; and comparison current varying means for varying the comparison current value based on the temperature of the environment of the movable portion.

When the movable portion is moved by the driving force of the motor, the motor lock current is substantially constant if the temperature of the environment is an ordinary temperature. By comparing the current value detected by the current detection means with a comparison current value which is smaller than the motor lock current, it is possible to properly control the driving state of the motor based on the results of determining whether the detected current value exceeds the comparison current value.

The motor lock current becomes smaller when the temperature of the environment increases, and becomes greater when the temperature of the environment decreases.

When the temperature of the environment of the movable portion is high, resistance to the movement of the movable portion decreases so that the drive current of the motor also decreases. On the other hand, when the temperature of the environment is low, resistance to the movement of the movable portion increases so that the drive current of the motor also increases.

Taking the above facts into consideration, the comparison current varying means varies the comparison current such that the amount of variation of the comparison current becomes substantially equal to the amount of variation of the motor lock current or the ordinary drive current of the motor. For example, the motor lock current varies linearly (at a constant rate) with respect to the temperature of the environment. Therefore, the difference between the comparison current and the motor lock current can always be maintained constant by varying the comparison current at a rate which is substantially the same as the rate of change of the motor lock current.

The ordinary drive current of the motor drastically increases when the temperature becomes lower than a specific temperature (which is about -10.degree. C. to -20.degree. C.). Accordingly, the difference between the comparison current and the ordinary drive current of the motor can always be maintained substantially constant by varying the comparison current such that the variation of the comparison current follows the variation of the drive current.

In both of the above-mentioned cases, the comparison current is always maintained higher than the ordinary drive current of the motor and lower than the motor lock current regardless of temperature of the environment. Accordingly, in a case in which the state of a movable portion is judged on the basis of the drive current of the motor, judgment can be made by comparison using a proper comparison current regardless of the temperature of the environment. Further, since the comparison current never exceeds the motor lock current, temperature compensation for the motor itself can be carried out reliably.

As described above, the apparatus for driving and controlling a motor has an excellent effect in that the motor can be prevented from being driven in a overloaded state regardless of whether the temperature is low or high .

FIG. 1 is a circuit diagram showing an apparatus for driving and controlling a power window apparatus according to a first embodiment of the present invention;

FIG. 2 is a perspective view of a door of a vehicle as viewed from the interior of the vehicle;

FIG. 3 is a perspective view showing the inner structure of a door at a driver's seat;

FIG. 4 is a graph of characteristics showing changes in ordinary drive current and lock current of a motor in the first embodiment with respect to variations in temperature;

FIGS. 5A and 5B are flowcharts showing the main routine of processing according to the first embodiment;

FIG. 6 is a circuit diagram showing an apparatus for driving and controlling a power window apparatus according to a second embodiment of the present invention; and

FIG. 7 is a graph of characteristics showing changes in drive current and lock current of a motor in the second embodiment with respect to variations in temperature.

FIG. 2 shows a front door 12 located on the side of the driver's seat of a vehicle, and a rear door 14 located on the same side, in which a power window apparatus 10 according to a first embodiment is employed. In each of the doors 12, 14, a window regulator 16 is disposed for raising and lowering a door glass 20 (FIG. 3 shows the interior of the front door 12 on the side of the driver's seat).

In this first embodiment, the window regulator 16 is of a so-called wire type, as shown in FIG. 3. A wire is wound on a rotary plate 22A attached to the drive shaft of a motor 22. The end of the wire is connected to a holding channel 24 which supports the lower edge of the door glass 20. The holding channel 24 is guided by a main guide 26 for vertical movement. When the motor 22 rotates in the forward direction or the reverse direction, the rotational drive force is transmitted to the holding channel 24 via the wire so that the door glass 20 is raised or lowered along a glass guide 18. The structure of the window regulator 16 is not limited to the wire type, and may be of an X-arm type, or a so-called self-propelled motor type in which a motor itself moves along a rack.

When the door glass 20 is raised by the motor 22, the peripheral edge portion of the door glass 20 fits into a weatherstrip (not illustrated), which is made of rubber and is assembled in a frame 12A of the door 12, so that the open portion of the door frame 12A is closed. When the door glass 20 is lowered by the motor 22, the open portion of the frame 12A of the door 12 is opened.

The motor 22 is driven in response to the operation of a power window master switch 30 and door switches 32 which are provided on the doors 12, 14 shown in FIG. 2. The door switches 32 are provided on the doors 14 other than the door 12 at the driver's seat, while the power window master switch 30 is provided on a door armrest 12B of the door 12 at the driver's seat. The power window master switch 30 may be disposed at a different position provided that a driver seated in the driver's seat can easily operate the power window master switch 30.

The power window master switch 30 includes an auto/manual switch 34 for automatically or manually operating the motor 22 in the door 12, and a plurality (three in the first embodiment) of door switches 36 for manually operating the motor 22 in each of the doors 14. The power window master switch 30 also includes a lock switch 38 for preventing the motors 22 from being driven even when the door switches 32, 36 are operated.

Since the auto/manual switch 34 is of a two-step type, the auto/manual switch 34 can be moved in two separate steps in each of two opposite directions. When the switch 34 is moved one step, the motor 22 in the door 12 is driven only in the period when operation of the switch 34 continues (manual operation). When the switch 34 is moved two steps, the motor 22 of the door 12 is driven until the door glass 20 reaches a predetermined position even after operation of the switch 34 is discontinued (automatic operation).

In response to the operation of the power window master switch 30 or the door switch 32, the motor 22 is driven so as to rotate the rotary plate 22A (shown in FIG. 3) in the forward direction or the reverse direction so that the door glass 20 is raised or lowered.

FIG. 1 shows a power window control section 50 for controlling driving of the motor 22 in response to operation of the auto/manual switch 34. The power window control section 50 is driven by electric power from a power supply circuit 51.

As shown in FIG. 1, connected to the power window control section 50 are signal lines 52 from the switches of the auto/manual switch 34. The control section 50 supplies the motor 22 with drive current for forward rotation and reverse rotation in accordance with the state of the auto/manual switch 34.

The terminals of the motor 22 controlled by the power window control section 50 are respectively connected to common terminals 108A and 109A of a normal-close relay switch 108 and a normal-open relay switch 109. First contacts 108B, 109B of the respective relay switches 108, 109 are connected to the power supply line. Second contacts 108C, 109C are connected to a point between a resistor 106 and a positive input terminal 104A of a comparator 104 which form a comparator circuit 100, as will be described hereinafter. Therefore, when the motor 22 is driven, a voltage V.sub.1, whose amplitude corresponds to the product of the resistance of the resistor 106 and current flowing through the resistor 106, namely current flowing through the motor 22, is input to the positive input terminal 104A.

The movable contacts of the relay switches 108, 109 are changed over between the first and second contacts by coils 110, 112. Accordingly, the motor 22 is rotated forwardly or reversely by one of the coils 110, 112 being excited.

The comparator circuit 100 is connected to the power window control section 50. The comparator circuit 100 outputs a lock signal which indicates that the door glass 20 is in a fully closed or a fully opened state. Due to the input of the lock signal, the power window control section 50 stops the driving of the motor 22.

One end of a resistor 72 which is part of the comparator circuit 100 is connected to a power supply line 68 extending from the power supply circuit 51. The other end of the resistor 72 is connected to one end of a resistor 78, the other end of which is connected to an earth line 80.

Connected to the line between the resistor 72 and the resistor 78 are one end of a thermistor 70 and the negative input terminal 104B of the comparator 104. The other end of the thermistor 70 is connected to an earth line 82. Accordingly, the negative input terminal 104B is supplied with a voltage V.sub.2 (variable) which is output from a circuit which includes the resistor 72, the resistor 78 and the thermistor 70 and acts to divide the voltage of the power source for outputting the voltage V.sub.2.

The output terminal 104C of the comparator 104 is connected to the above-described power window control section 50.

Although the resistances of the resistors 72, 78 are constant, the resistance of the thermistor 70 changes in accordance with the temperature. The thermistor 70 used in the first embodiment has a negative thermal characteristic, and the resistance R.sub.0 of the thermistor 70 is expressed by the following equation:

wherein temperature))

Since the resistance R.sub.0 of the thermistor 70 becomes low at ordinary temperatures or at high temperatures and becomes high at low temperatures, the voltage V.sub.2 varies by the same amount as the motor drive current varies. The amount of variation of the voltage V.sub.1 corresponding to the motor drive current drastically increases when the temperature becomes lower than a specific temperature (-10.degree. C. to -20.degree. C.). This drastic increase is caused by the following factors. The door glass 20 is mechanically raised and lowered by the window regulator 16 while the peripheral edge of the door glass 20 is nipped by the weatherstrip made of rubber and built in the door frame 12A. At low temperatures, the window regulator 16 does not operate smoothly, and the resistance to the movement of the door glass 20 increases due to the hardening of the weatherstrip. For these reasons, the variation of the voltage V.sub.1 drastically increases. Therefore, the voltage V.sub.2 is drastically varied in accordance with the drastic changes in the motor drive current (see FIG. 4).

A signal of low level being output from the comparator 104 of the power window control section 50 signifies that the voltage V.sub.1 corresponding to the motor drive current is not greater than the voltage V.sub.2 corresponding to the comparison current. In this case, driving of the motor 22 is continued. A signal of high level being output from the comparator 104 signifies that the voltage V.sub.1 corresponding to the motor drive current exceeds the voltage V.sub.2 corresponding to the comparison current. In this case, it is judged that the motor is in a locked state, and the driving of the motor 22 is stopped.

The operation of the first embodiment will now be described with reference to the flowchart in FIGS. 5A and 5B.

First, the driving and controlling of the power window apparatus which is carried out in the power window control section 50 will be described.

When the door glass 20 is raised in the manual operation mode, a switch 52A for manual-up is turned on in response to operation of the auto/manual switch 34. The on state of the switch 52A for manual-up is confirmed in step 200, and the process moves to step 202 in which the motor 22 is rotated forward. In the following step 203, a flag F is reset to "0". Accordingly, the raising of the door glass 20 begins. Since the switch for auto-up is off at this point, the answer of the determination in next step 204 is negative, and the process returns to step 200. As long as the on state of the switch 52A for manual-up continues, the processes in steps 200, 202, 203 and 204 are repeated.

When the driver releases the auto/manual switch 34, the switch 52A for manual-up is turned off. In this case, the determination in step 200 is negative, and the process moves to step 206. Since the flag F has already been reset to "0", a negative determination is made in step 206, and the process moves to step 209 in which driving of the motor 22 is stopped. After the flag F is reset in step 210 (even though the flag F is in the reset state), the process moves to step 212.

In step 212, it is determined whether a switch 52B for manual-down is in its on state. At the this time, a negative determination is made in step 212, and the process moves to step 214. Since the flag F has already been reset to "0", a negative determination is made in step 214, and the process moves to step 216 in which processing for stopping the motor 22 is carried out (even though the motor 22 has already been stopped). After the flag F is reset in step 218, the process returns to step 200.

In a case in which power is being supplied to the control section and the switches are not being operated, the processes in steps 200, 206, 209, 210, 212, 214, 216 and 218 (basic flow) are repeated until the on state of the switch 62A for manual-up is detected (in step 200) or until the on state of the switch 52B for manual-down is detected (in step 212).

When the door glass 20 is lowered in the manual operation mode, the switch 52B for manual-down is turned on in response to operation of the auto/manual switch 34. The on state of the switch 52B for manual-down is confirmed in step 212, and the process moves to step 220 in which the motor 22 is rotated reversely. In the following step 221, the flag F is reset to "0". Accordingly, lowering of the door glass 20 begins. Since a switch 52C for auto-down is off at this point, a negative determination is made in next step 222, and the process returns to step 212. As long as the on state of the switch 52B for manual-down continues, the processes in steps 212, 220, 221 and 222 are repeated.

When the driver stops operation of the auto/manual switch 34, the switch 52B for manual-down is turned off. In this case, processing (basic flow) for the above-described case in which the power supply is on and the switches are not operated is carried out.

When the driver wants to automatically raise the door glass 20, he or she operates the auto/manual switch 34 two steps in a predetermined first direction. Due to this operation, a switch for auto-up is turned on. In this case, the motor 22 begins to rotate forward in step 202, and the process then moves to step 203 and then to step 204. Since an affirmative determination is made in step 204, the process moves to step 224 in which the flag is set to "1". Thereafter, the process moves to step 225 in which the output signal from the comparator circuit 100 is fetched. In next step 227, it is determined whether the output signal is a lock signal (signal of high level).

When a negative determination is made in step 227, the process moves to step 212 in which it is determined whether the auto/manual switch 34 has been moved to the direction opposite to the first direction so that the switch 52B for manual-down is turned on. Namely, even when the door glass 20 is automatically raised, the motor 22 is immediately rotated reversely and the operation mode is changed to the above-described operation for manual-down if the switch 52B for manual-down is turned on.

When a negative determination is made in step 212, the operation for automatic mode is continued, and the process moves to step 214. Since the flag has been set to "1", an affirmative determination is made in step 214, and the processing returns to step 225 so that the processes in steps 225, 227, 212 and 214 are repeated. When an affirmative determination is made in step 227, the process moves to step 209 so as to stop the motor 22. The flag F is then reset in step 210. Subsequently, the above-described basic flow is carried out.

When the driver wants to automatically lower the door glass 20, he or she operates the auto/manual switch two 34 steps in the direction opposite to the first direction. Due to this operation, the switch for auto-down is turned on. In this case, the motor 22 begins to rotate reversely in step 220, and the process then moves to step 221 and then to step 222. Since an affirmative determination is made in step 222, the process moves to step 228 in which the flag is set to "1". Thereafter, the process moves to step 230 in which the output signal from the comparator circuit 100 is fetched. In next step 234, it is determined whether the output signal is a lock signal (signal of high level).

When a negative determination is made in step 234, the process moves to step 200 in which it is determined whether the auto/manual switch 34 has been moved to the first direction so that the switch 52A for manual-up is turned on. Namely, even when the door glass 20 is automatically lowered, the motor 22 is immediately rotated forward and the operation mode is changed to the above-described operation for manual-up if the switch 52A for manual-up is turned on.

When a negative determination is made in step 200, the operation for automatic mode is continued, and the process moves to step 206. Since the flag has been set to "1", an affirmative determination is made in step 206, and the process returns to step 230 so that the processes in steps 230, 234, 200 and 206 are repeated. When an affirmative determination is made in step 234, it is determined that the door glass is completely opened, and the process moves to step 216 so as to stop the motor 22. The flag F is then reset in step 218. Subsequently, the above-described basic flow is carried out.

Here, the signal output from the comparator circuit 100 becomes a high level signal (lock signal) when the voltage V.sub.1 corresponding to the motor drive current exceeds the comparison voltage V.sub.2, which varies in accordance with the temperature of the operating environment due to characteristics of the thermistor 70 (see FIG. 4).

The voltage V.sub.2 corresponding to the comparison current is determined based on the resistances of the resistors 72, 78 and the resistance R.sub.0 of the thermistor 70. The resistance R.sub.0 varies depending on the temperature as indicated by the above equation (1). Accordingly, variation of the comparison current is represented by the variation of the voltage V.sub.2 and corresponds to the variation of the motor drive current. As a result, a constant difference is maintained between the comparison current and the drive current regardless of whether the temperature is low or high. Accordingly, when the motor drive current varies due to a change in the resistance to the movement of the door glass 20 which is caused by a change in temperature, the comparison current also varies so as to follow the variation of the motor drive current.

Since the comparison current which is a threshold value varies in accordance with temperature, as described above, the comparison current does not exceed the motor lock current. This prevents the motor from being continuously driven in an overloaded state. Further, proper thermal compensation can be carried out.

Next, a second embodiment of the present invention will be described with reference to FIG. 6 and FIG. 7. Since the structure of the power window apparatus 10 used in the second embodiment is the same as the structure shown in FIG. 2 and FIG. 3, an explanation of the structure will be omitted. Further, in the control block diagram shown in FIG. 6, elements which are the same as those shown in FIG. 1 are denoted by the same reference numerals. Explanations of these elements will be omitted.

As shown in FIG. 6, one end of a resistor 114 (whose resistance is R.sub.1) is connected to the power supply line 68, and the other end of the resistor 114 is connected to one end of a series circuit including a resistor 116 (whose resistance is R.sub.2) and a resistor 118 (whose resistance is R.sub.3). One end of the resistor 18 is grounded.

A base 120B of a transistor 120 is connected to the connecting point between the resistor 116 and the resistor 118. An emitter 120E of the transistor 120 is grounded, and a collector 120C is connected to the cathode of a zener diode 122. The collector 120C is also connected to the line between the resistor 114 and the resistor 116.

The anode of the zener diode 122 is grounded via a resistor 124 (whose resistance is R.sub.4) and a resistor 126 (whose resistance is R.sub.5). The negative input terminal 104B of the comparator 104 is connected to the line between the resistor 124 and the resistor 126. Other structures are the same as those of the circuit shown in FIG. 1. Due to the drive current of the motor 22, a voltage V.sub.1 is produced across the resistor 106 (whose resistance is R.sub.6) and is input to the positive input terminal 104 A.

The voltage V.sub.2 input to the negative input terminal 104B of the comparator 104 is set as follows.

When the voltage between the base and emitter of the transistor 120 is defined as V.sub.be, and the voltage between both ends of the resistor 118 (R.sub.3) is defined as V.sub.4, the voltage V.sub.3 at both ends of the serially connected resistors 116 and 118 is expressed as follows: ##EQU1## provided that the relation R.sub.1 <<R.sub.2, R.sub.3 is satisfied.

When the voltage between both ends of the zener diode 122 is defined as V.sub.zd, the voltage V.sub.5 between both ends of the serially connected resistors 124,126 is expressed as follows: ##EQU2##

Accordingly, the voltage V.sub.2 can be expressed as follows: ##EQU3##

Since the voltage V.sub.2 varies depending on the thermal variation dV.sub.be (V/.degree.C.) and dV.sub.ZD (V/.degree.C.) of the transistor 120 and the zener diode 122, the variation dV.sub.2 of the voltage V.sub.2 is expressed as follows: ##EQU4##

As is apparent from the above, the comparison voltage V.sub.2, which is used as a reference voltage for detection and which has an arbitrary thermal coefficient, can be generated by selecting the resistance R.sub.2 of the resistor 116, the resistance R.sub.3 of the resistor 118, and the zener diode 122 (see FIG. 7). Since the amount of variation of the voltage V.sub.2 is made to coincide with the amount of variation of the motor lock current, the motor 22 can always be stopped when the drive current is at a level which is lower than the motor lock current by a predetermined amount. Therefore, it is possible to prevent the motor from being driven in an overloaded state. Since the level (voltage V.sub.2) does not become smaller than the voltage V.sub.1 corresponding to the ordinary drive current of the motor 22, the motor 22 can be driven properly regardless of whether the temperature is low or high. Further, the motor 22 can be reliably stopped when the door glass is fully closed or fully opened.

In the first and second embodiments, the voltage indicating a comparison current, with which the motor drive current is compared in order to detect the completely-closed or completely-opened state of the door glass 20, is varied. However, the present invention can be applied to a comparison value which is used for detecting a state in which a foreign object is caught by the door glass 20.

## Claims

1. An apparatus for controlling a motor that moves a movable window portion of a vehicle, the apparatus comprising: said motor when said motor is moving said movable portion; detection means with a comparison current value, and for controlling said motor based on the comparison of the detected current value with said comparison current value; said movable portion; and based on the temperature sensed by said temperature sensing means.

2. The apparatus of claim 1, wherein said comparison current value is always varied by the comparison varying means to a value less than a value of a lock current value of said motor at all operation temperatures, said lock current value corresponding to current in the motor when the movable portion reaches an end-of-travel position.

3. The apparatus of claim 1, wherein said comparison current value is always varied by the comparison varying means to a value greater than a value of an ordinary drive current value of said motor at all operation temperatures, said ordinary drive current value corresponding current in the motor when the movable portion is moving.

4. The apparatus of claim 1, wherein said control means stops driving said motor when said detected current value exceeds said comparison current value.

5. The apparatus of claim 1, wherein said temperature sensing means comprises a thermistor.

6. The apparatus of claim 1, wherein said comparison current varying means comprises at least one of a transistor and a zener diode.

7. The apparatus of claim 1, wherein said movable portion is a glass window of a power window apparatus.

8. The apparatus of claim 7, wherein the value of the current detected by the current detection means is used to determine one of a completely-opened state and a completely-closed state of said glass window.

9. The apparatus of claim 7, wherein the value of the current detected by the current detection means is used to determine when an obstacle is caught between said glass window and a door glass frame.