Abstract:
A power storage system includes a power storage device and a controller. The controller controls discharge processing based on voltage values of power storage elements. The controller determines an abnormal state according to voltage fluctuation after the voltage values are made uniform. The controller performs first processing when the following conditions i) and ii) are satisfied and performs second processing when the following conditions i) and iii) are satisfied. The condition i) is that the power storage elements are divided into a plurality of groups, each group consists of each power storage stack included in the power storage device. The condition ii) is that the voltage values of the power storage elements are different in each group. The condition iii) is that, in the plurality of groups in each of which the voltage values are made uniform, the voltage values are different among the plurality of groups.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a technique for detecting voltage values of a plurality of power storage elements and discharging power storage elements to suppress variation of the voltage values in a plurality of power storage elements. 
         [0003]    2. Description of Related Art 
         [0004]    Japanese Patent Application Publication No. 2001-218376 (JP 2001-218376 A) describes a technique for detecting voltage values of a plurality of cells connected in series and discharging a specific cell such that variation of the voltage values in a plurality of cells falls within an allowable range. In each of the cells, a discharge resistor and a discharge switch are connected in parallel, and a specific discharge switch is turned on, thereby discharging only the specific cell. 
         [0005]    As in JP 2001-218376 A, if variation of the voltage values in a plurality of cells is within the allowable range, the abnormal state according to voltage fluctuation can be easily specified by monitoring voltage fluctuation thereafter. If a specific abnormal state is generated, there is a case where voltage fluctuation due to the abnormal state is generated. Therefore, it is possible to determine the generation of the abnormal state by recognizing voltage fluctuation due to the abnormal state. When variation of the voltage values is generated, it is difficult to recognize voltage fluctuation due to an abnormal state. Therefore, it is preferable that variation of the voltage values is within the allowable range. 
         [0006]    In JP 2001-218376 A, all cells constituting an assembled battery are connected to one voltage detection circuit. The number of cells constituting the assembled battery is able to be appropriately determined. For example, if the number of cells increases, there is a case where a plurality of voltage detection circuits should be connected to the assembled battery. The detection result of each of the voltage detection circuits optionally includes a detection error, and the detection error is optionally different among the voltage detection circuits. Accordingly, there is a case where variation of the voltage values of the cells in the assembled battery is generated by variation in the detection error of a plurality of voltage detection circuits. 
         [0007]    If the cells are discharged such that variation of the voltage values associated with variation in the detection error falls within the allowable range, the time until variation of the voltage values falls within the allowable range is delayed by the discharge time. Accordingly, the determination of the abnormal state described above is delayed. 
         [0008]    For example, there is a case where, in order to improve the output of an assembled battery, a plurality of battery stacks are connected in series to constitute the assembled battery. Each battery stack is constituted by connecting a plurality of cells in series. Each battery stack is replaced individually or a plurality of battery stacks are used in different temperature environments, and thus, in the plurality of battery stacks, variation in the full charging capacity of the cells is generated. Accordingly, in the plurality of battery stacks, variation of the voltage values of the cells is likely to be generated. 
         [0009]    If the cells are discharged such that variation of the voltage values falls within the allowable range, the time until variation of the voltage values falls within the allowable range is delayed by the discharge time. Accordingly, the determination of the abnormal state described above is delayed. 
       SUMMARY OF THE INVENTION 
       [0010]    A power storage system according to a first aspect of the invention has a power storage device, a plurality of voltage detection circuits, a discharge circuit, and a controller. The power storage device includes a plurality of power storage stacks connected in series, each of the power storage stacks include a plurality of power storage elements connected in series. The plurality of voltage detection circuits is configured to detect voltage values of the respective power storage elements. The discharge circuit is configured to perform discharge processing for discharging each power storage element. The controller is configured to control the discharge processing based on the voltage values detected by the voltage detection circuits. The controller is configured to determine an abnormal state according to voltage fluctuation after the voltage values are made uniform. The controller is configured to perform first processing when all of the following conditions i) to iv) are satisfied, and to perform second processing when all of the conditions i) to iii) and a condition v) are satisfied. The condition i) is that in at least one power storage stack, different voltage detection circuits are connected to the power storage elements included in one power storage stack. The condition ii) is that at least one voltage detection circuit is connected to the power storage elements of different power storage stacks. The condition iii) is that the power storage elements are divided into a plurality of groups, each group consists of a plurality of power storage elements included in the same power storage stack and connected to the same voltage detection circuit. The condition iv) is that the voltage values of the power storage elements are different in each group. The condition v) is that in the plurality of groups in each of which the voltage values of the power storage elements are made uniform, the voltage values are different among the plurality of groups. The first processing is processing for making the voltage values of the power storage elements in the group corresponding to the condition iv) uniform by the discharge processing. The second processing is processing for making the voltage values of the power storage elements included in the plurality of groups corresponding to the condition v) uniform by the discharge processing. 
         [0011]    According to the first aspect of the invention, it is possible to make the voltage value of all power storage elements in a power storage device by discharge processing (first and second processing) of the discharge circuit uniform. Specifically, it is possible to make the voltage values among a plurality of groups uniform by the second processing while making the voltage values in the group uniform by the first processing. With this, in the power storage device, it is possible to make uniform the voltage values of all power storage elements. 
         [0012]    Here, one group is divided for each voltage detection circuit. With this, the voltage values of the power storage elements included in each group are not affected by the detection errors in the voltage detection circuits. Accordingly, it is possible to make the voltage values in the group uniform without regard for variation of the voltage values associated with variation in the detection error of the voltage detection circuits. Furthermore, one group is divided for each power storage stack. With this, the voltage values of the power storage elements in each group are not affected by variation in the full charging capacity apt to be generated among a plurality of power storage stacks. Accordingly, it is possible to make the voltage values in the group uniform without regard for variation of the voltage values associated with variation in the full charging capacity in a plurality of power storage stacks. 
         [0013]    When making the voltage values in the group uniform, it is not necessary to suppress variation of the voltage values associated with variation in the detection error or full charging capacity, and discharge processing for suppressing variation is not required. With this, it becomes easy to reduce the time until the voltage values of the power storage elements in each group are made uniform, and it is possible to suppress delay of the determination of an abnormal state. If the voltage values in the group are made uniform, in the second processing, it is possible to discharge all power storage elements in the group in a state in which the voltage values are made uniform. Accordingly, it is possible to make the voltage values of all power storage elements in the power storage device uniform while performing the determination of an abnormal state in the group. 
         [0014]    A power storage system according to a second aspect of the invention has a power storage stack, a plurality of voltage detection circuits, a discharge circuit, and a controller. The power storage stack includes a plurality of power storage elements connected in series. The plurality of voltage detection circuits is connected to different power storage elements in the power storage stack. The voltage detection circuit is configured to detect voltage values of the respective power storage elements. The discharge circuit is configured to perform discharge processing for discharging each power storage element. The controller is configured to control the discharge processing based on the voltage values detected by the voltage detection circuits. The controller is configured to determine an abnormal state according to voltage fluctuation after the voltage values are made uniform. The controller is configured to perform first processing when the following conditions i) and ii) are satisfied, and to perform second processing when the condition i) and a condition iii) are satisfied. The condition i) is that the power storage elements are divided into a plurality of groups, each group consists of a plurality of power storage elements connected to the same voltage detection circuit. 
         [0015]    The condition ii) is that the voltage values of the power storage elements are different in each group. The condition iii) is that in the plurality of groups in each of which the voltage values of the power storage elements are made uniform, the voltage values are different among the plurality of groups. The first processing is processing for making the voltage values of the power storage elements in the group corresponding to the condition ii) uniform by the discharge processing. The second processing is processing for making the voltage values of the. power storage elements included in the plurality of groups corresponding to the condition iii) uniform by the discharge processing. 
         [0016]    In the second aspect, as in the first aspect, the voltage values among a plurality of groups are made uniform while making the voltage values in the group uniform, whereby it is possible to make the voltage values of all power storage elements in the power storage device uniform. 
         [0017]    Here, one group is divided for each voltage detection circuit, and thus, as in the first aspect, it is possible to make the voltage values in the group uniform without regard for variation of the voltage values associated with variation in the detection error of the voltage detection circuits. Then, it becomes easy to reduce the time until the voltage values of the power storage elements are made uniform in each group, and it is possible to suppress delay of the determination of an abnormal state. If the voltage values in the group are made uniform, in the second processing, it is possible to discharge all power storage elements in the group in a state in which the voltage values are made uniform. Accordingly, it is possible to make the voltage values of all power storage elements in the power storage device uniform while performing the determination of an abnormal state in the group. The power storage device includes a plurality of power storage stacks connected in series, each of the power storage stacks including a plurality of power storage elements connected in series. The voltage detection circuit is configured to detect a voltage value of each power storage element. The discharge circuit is configured to perform discharge processing for discharging each power storage element. The controller is configured to control the discharge processing based on the voltage values detected by the voltage detection circuits. The controller is configured to determine an abnormal state according to voltage fluctuation after the voltage values are made uniform. The controller is configured to perform first processing when the following conditions i) and ii) are satisfied, and to perform second processing when the condition i) and a condition iii) are satisfied. The condition i) is that the power storage elements are divided into a plurality of groups, each group having each power storage stack. The condition ii) is that the voltage values of the power storage elements are different in each group. The condition iii) is that in the plurality of groups in each of which the voltage values of the power storage elements are made uniform, the voltage values are different among the plurality of groups. The first processing is processing for making the voltage values of the power storage elements in the group corresponding to the condition ii) uniform by the discharge processing. The second processing is processing for making the voltage values of the power storage elements included in the plurality of groups corresponding to the condition iii) uniform by the discharge processing. 
         [0018]    A power storage system according to a third aspect of the invention has a power storage device, a voltage detection circuit, a discharge circuit, and a controller. 
         [0019]    In the third aspect, as in the first aspect, the voltage values among a plurality of groups are made uniform while making the voltage values in the group uniform, whereby it is possible to make the voltage values of all power storage elements in the power storage device uniform. 
         [0020]    Here, one group is divided for each power storage stack, and thus, as in the first aspect, it is possible to make the voltage values in the group uniform without regard for variation of the voltage values associated with variation in the full charging capacity. Then, it becomes easy to reduce the time until the voltage values of the power storage elements are made uniform in each group, and it is possible to suppress delay of the determination of an abnormal state. If the voltage values in the group are made uniform, in the second processing, it is possible to discharge all power storage elements in the group in a state in which the voltage values are made uniform. Accordingly, it is possible to make the voltage values of all power storage elements in the power storage device uniform while performing the determination of an abnormal state in the group. 
         [0021]    In the first to third aspects of the invention, as an abnormal state, there is failure of a Zener diode associated with the flowing of a leakage current in the Zener diode. 
         [0022]    With the above-described configuration, the voltage values of the power storage elements in the group are made uniform with a reference voltage value, making it easy to recognize the above-described voltage fluctuation associated with failure of the Zener diode. 
         [0023]    In the first to third aspects of the invention, as an abnormal state, there is a state in which a power storage element continues to be discharged. With the above-described configuration, the voltage values of the power storage elements in the group are made uniform, making it easy to recognize a decrease of the voltage value in a specific power storage element and to recognize a state in which a power storage element continues to be discharged. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0024]    Features, advantages, and technical and industrial significance of exemplary embodiments of the invention will be described below with reference to the accompanying drawings, in which like numerals denote like elements, and wherein: 
           [0025]      FIG. 1  is a diagram illustrating the configuration of a battery system; 
           [0026]      FIG. 2  is a diagram illustrating an assembled battery and a monitoring unit; 
           [0027]      FIG. 3  is a diagram illustrating the circuit configuration of a part in a monitoring unit; 
           [0028]      FIG. 4  is a flowchart illustrating equalization processing; 
           [0029]      FIG. 5  is a flowchart illustrating discharge determination; 
           [0030]      FIG. 6  is a diagram illustrating battery groups; 
           [0031]      FIG. 7  is a flowchart illustrating first stage discharge determination; 
           [0032]      FIG. 8  is an explanatory view when a cell to be discharged is specified in the first stage discharge determination; 
           [0033]      FIG. 9  is a flowchart illustrating second stage discharge determination; 
           [0034]      FIG. 10  is an explanatory view when a cell to be discharged is specified in the second stage discharge determination; 
           [0035]      FIG. 11  is a diagram illustrating a state in which a leakage current flows in a Zener diode; and 
           [0036]      FIG. 12  is a diagram illustrating the relationship of voltage values of cells when a leakage current flows in a Zener diode. 
       
    
    
     DETAILED DESCRIPTION OF EMBODIMENTS 
       [0037]    Hereinafter, an example of the invention will be described. 
         [0038]      FIG. 1  is a diagram illustrating the configuration of a battery system of this example. The battery system is an example of a power storage system of the invention. An assembled battery  10  is connected to a load  20  through a positive electrode line PL and a negative electrode line NL. The assembled battery is an example of a power storage device of the invention. The positive electrode line PL is connected to a positive electrode terminal of the assembled battery  10 , and the negative electrode line NL is connected to a negative electrode terminal of the assembled battery  10 . 
         [0039]    A system main relay SMR-B is provided in a positive electrode line PL, and a system main relay SMR-G is provided in a negative electrode line NL. When the system main relays SMR-B, SMR-G are turned on, the assembled battery  10  is connected to the load  20 . When the system main relays SMR-B, SMR-G are turned off, the connection of the assembled battery  10  and the load  20  is interrupted. 
         [0040]    The battery system illustrated in  FIG. 1  is able to be mounted in, for example, a vehicle. In this case, a motor generator is able to be used as the load  20 . The motor generator receives power output from the assembled battery  10  and generates kinetic energy for making the vehicle travel. The motor generator is able to convert kinetic energy generated at the time of braking of the vehicle to power and is able to output power to the assembled battery  10 . 
         [0041]    Next, the configuration of the assembled battery  10  will be described referring to  FIG. 2 . The assembled battery  10  has three battery stacks  11  ( 11 A to  11 C) connected in series. The battery stacks are an example of power storage stacks of the invention. In this example, the number of battery stacks  11  constituting the assembled battery  10  is optionally a plural number. The battery stacks  11 A to  11 C are able to be replaced individually. 
         [0042]    For example, when only the battery stack  11 B reaches the life end due to deterioration, only the battery stack  11 B is able to be replaced with a different battery stack  11 . The different battery stack  11  is connected in series with the battery stacks  11 A and  11 C being previously used. As the different battery stack  11 , a new battery stack  11  or a used battery stack  11  is able to be used. The used battery stack  11  is a battery stack  11 , which has not yet reached the life end and is able to be continuously used, among recovered battery stacks  11 . 
         [0043]    Each of the battery stacks  11 A to  11 C has a plurality of cells  12  connected in series. The cells are an example of power storage elements of the invention. The number of cells  12  constituting the battery stack  11  is able to be appropriately set. The battery stack  11  optionally includes a plurality of cells  12  connected in parallel. As the cells  12 , a secondary battery, such as a nickel-hydrogen battery or a lithium ion battery, is optionally used. Instead of the secondary battery, an electric double layer capacitor is optionally used. 
         [0044]    The positive electrode terminal and the negative electrode terminal of each cell  12  are connected to a monitoring unit  30  ( 30 A,  30 B) through detection lines DL. The monitoring unit  30  is used to detect a voltage value Vb of each cell  12 , and an output signal of the monitoring unit  30  is input to a controller  40 . In this example, although two monitoring units  30 A,  30 B are connected to the assembled battery  10 , the number of monitoring units  30  is optionally a plural number. 
         [0045]    In the configuration illustrated in  FIG. 2 , the monitoring unit  30 A is connected to all cells  12  of the battery stack  11 A and some cells  12  of the battery stack  11 B. The monitoring unit  30 B is connected to all cells  12  of the battery stack  11 C and some cells  12  of the battery stack  11 B. The battery stack  11 B includes the cells  12  connected to the monitoring unit  30 A and cells  12  connected to the monitoring unit  30 B. 
         [0046]    The controller  40  has a memory  41 , and the memory  41  stores various kinds of information. The memory  41  is optionally provided outside the controller  40 . The controller  40  is able to output a control signal for switching the system main relays SMR-B, SMR-G illustrated in  FIG. 1  between on and off. A timer  42  measures the time t 1  and outputs the measurement result to the controller  40 . A timer  43  measures the time t 2  and outputs the measurement result to the controller  40 . The details of the time t 1 , t 2  will be described below. 
         [0047]    Next, the circuit configuration of the monitoring unit  30  ( 30 A,  30 B) will be described referring to  FIG. 3 .  FIG. 3  illustrates the circuit configuration of a part in the monitoring unit  30 . 
         [0048]    A resistive element R 11  is provided in each detection line DL. When a current that is greater than an allowable current value flows in the resistive element R 11 , the resistive element R 11  is fused, whereby the connection of the monitoring unit  30  and the assembled battery  10  is able to be interrupted. With this, it is possible to suppress the flowing of an excessive current from the assembled battery  10  into the monitoring unit  30 . 
         [0049]    A Zener diode D is connected in parallel with each cell  12  through two detection lines DL. The cathode of the Zener diode D is connected to the positive electrode terminal of the cell  12 , and the anode of the Zener diode D is connected to the negative electrode terminal of the cell  12 . The Zener diode D is used to suppress the application of an overvoltage from the assembled battery  10  to the monitoring unit  30 . That is, when an overvoltage is applied from the assembled battery  10  to the monitoring unit  30 , a current flows from the cathode to the anode of the Zener diode D, thereby suppressing the application of an overvoltage to the monitoring unit  30 . A plurality of Zener diodes D are connected in series. 
         [0050]    Each detection line DL is branched into two lines, and the branch lines BL 1 , BL 2  are respectively provided with resistive elements R 21 , R 22 . The Zener diode D is connected to a connection point of the resistive elements R 21 , R 22  and the resistive element R 11 . In the two detection lines DL connected to the cell  12 , a capacitor (flying capacitor) C and a switch SW 1  are connected to the branch line BL 1  of one detection line DL and the branch line BL 2  of the other detection line DL. 
         [0051]    Specifically, the capacitor C and the switch SW 1  are connected to the branch line BL 1  between the resistive element R 21  and a sampling switch SW 21  and to the branch line BL 2  between the resistive element R 22  and a sampling switch SW 22 . The sampling switches SW 21 , SW 22  receive a control signal from the controller  40  and are switched between on and off. 
         [0052]    The switch SW 1  receives a control signal from the controller  40  and is switched between on and off. Each switch SW 1  is connected in parallel with each cell  12  through the detection line DL, and when the switch SW 1  is turned on, a closed circuit is constituted by the switch SW 1 , the cell  12 , and the detection line DL, thereby discharging the cell  12 . A discharge current of the cell  12  flows in the resistive elements R 11 , R 21 , R 22 , whereby it is possible to lower the voltage value Vb of the cell  12 . 
         [0053]    Since each capacitor C is connected in parallel with each cell  12  through the detection line DL, the capacitor C is charged with electric charges stored in the cell  12 . With this, a voltage value Vc of the capacitor C becomes equal to the voltage value Vb of the cell  12 . 
         [0054]    The sampling switches SW 21 , SW 22  corresponding to a specific cell  12  are turned on, whereby it is possible to detect the voltage value Vb of the specific cell  12 . That is, the voltage value Vc of the capacitor C is detected. The sampling switch SW 21  is connected to one input terminal comparator COM, and the sampling switch SW 22  is connected to the other input terminal of the comparator COM. An output signal of the comparator COM is subjected to AD conversion and then input to the controller  40 . With this, the controller  40  is able to detect the voltage value Vb (voltage value Vc) of each cell  12 . 
         [0055]    The controller  40  sequentially turns on the sampling switches SW 21 , SW 22  corresponding to each cell  12 , thereby sequentially detecting the voltage value Vb (voltage value Vc) of each cell  12 . A plurality of sampling switches SW 21 , SW 22  are able to be constituted by a multiplexer. 
         [0056]    As described above, the switch SW 1  is turned on and the cell  12  is discharged, whereby it is possible to suppress variation of the voltage values Vb (voltage value Vc) in a plurality of cells  12 . Processing for suppressing variation of the voltage values Vb is referred to as equalization processing. 
         [0057]    As described above, the monitoring unit  30  of this example has a circuit (voltage detection circuit) that detects the voltage value Vb of each cell  12 , and a circuit (discharge circuit) that discharges each cell  12 . The voltage detection circuit and the discharge circuit are optionally constituted separately. Specifically, the voltage detection circuit is able to be connected to each cell  12 , and the discharge circuit is able to be connected to each cell  12  using a connection line different from a connection line of the voltage detection circuit and each cell  12 . The voltage detection circuits are provided corresponding to the number of monitoring units  30 . The number of discharge circuits is able to be appropriately set, and for example, the discharge circuits are able to be provided corresponding to the number of monitoring units  30 . 
         [0058]    Next, the equalization processing will be described using the flowchart illustrated in  FIG. 4 . Processing illustrated in  FIG. 4  is executed by the controller  40 , and for example, the processing illustrated in  FIG. 4  is able to be performed while the assembled battery  10  is not connected to the load  20 . The controller  40  is able to be operated with power supplied from a power supply different from the assembled battery  10 . 
         [0059]    In Step S 101 , the controller  40  specifies a cell  12  that is discharged by the equalization processing, and the measurement of the time t 1  starts using the timer  42 . When performing processing of Step S 101 , there is optionally no cell  12  to be discharged, and in this case, a cell  12  to be discharged is not specified. The details of the processing for specifying a cell  12  to be discharged will be described below. 
         [0060]    In Step S 102 , the controller  40  performs determination about whether or not there is a cell  12  to be discharged based on the result of the processing of Step S 101 . When a cell  12  to be discharged is specified, the controller  40  performs processing of Step S 103 , and when a cell  12  to be discharged is not specified, the controller  40  performs processing of Step S 106 . 
         [0061]    In Step S 103 , the controller  40  starts discharging for the cell  12  specified by the processing of Step S 101 . Specifically, the controller  40  switches the switch SW 1  (see  FIG. 3 ) corresponding to the specified cell  12  from off to on, thereby discharging the cell  12 . The switch SW 1  corresponding to a cell  12  not to be discharged remains off. When the discharging of the cell  12  starts, the controller  40  starts the measurement of the time t 2  using the timer  43 . The measured time t 2  represents the time when the switch SW 1  is turned on and the cell  12  continues to be discharged. 
         [0062]    In Step S 104 , the controller  40  performs determination about whether or not the measured time t 2  is equal to or greater than a second predetermined time t_th 2 . The second predetermined time t_th 2  is able to be appropriately set, and information specifying the second predetermined time t_th 2  is able to be stored in the memory  41 . The controller  40  waits until the measured time t 2  becomes equal to or greater than the second predetermined time t_th 2  after the discharging of the cell  12  starts. 
         [0063]    When the measured time t 2  is equal to or greater than the second predetermined time t_th 2 , the controller  40  ends the discharging of the cell  12  in Step S 105 . Specifically, the controller  40  switches the switch SW 1 , which is turned on by the processing of Step S 103 , to off. When ending the discharging of the cell  12 , the controller  40  resets the measured time t 2 . 
         [0064]    In Step S 106 , the controller  40  performs determination about whether or not the time t 1  that starts to be measured by the processing of Step S 101  is equal to or greater than a first predetermined time t_th 1 . The first predetermined time t_th 1  is the time that specifies the execution period of the processing of Step S 101 , and is equal to or greater than the second predetermined time t_th 2 . Information specifying the first predetermined time t_th 1  is able to be stored in the memory  41 . 
         [0065]    The controller  40  waits until the measured time t 1  becomes equal to or greater than the first predetermined time t_th 1 , and when the measured time t 1  is equal to or greater than the first predetermined time t_th 1 , the controller  40  resets the measured time t 1  and then performs the processing of Step S 101  again. 
         [0066]    Next, the processing of Step S 101  illustrated in  FIG. 4 , that is, the details of the processing for specifying a cell  12  to be discharged will be described using the flowchart illustrated in  FIG. 5 . Processing illustrated in  FIG. 5  is executed by the controller  40 . 
         [0067]    In Step S 201 , as first stage discharge determination, the controller  40  specifies a cell  12  to be discharged in each battery group G. The battery groups are an example of groups of the invention. As illustrated in  FIG. 6 , an assembled battery  10  is divided into four battery groups G (G 1  to G 4 ). 
         [0068]    Each of the battery groups G 1  to G 4  has cells  12  that are included in the same battery stack  11  ( 11 A to  11 C) and are connected to the same monitoring unit  30  ( 30 A;  30 B). In the configuration illustrated in  FIG. 6 , although the number of battery groups G 1  to G 4  is four, the invention is not limited thereto. The number of battery groups changes depending on the number of battery stacks  11  or the number of monitoring units  30 . The details of the processing of Step S 201  will be described below. 
         [0069]    In Step S 202 , as second stage discharge determination, the controller  40  specifies cells  12  to be discharged in each of the battery groups G 1  to G 4 . The cells  12  to be discharged are all cells  12  included in the battery group G. The details of the processing of Step S 202  will be described below. 
         [0070]    Next, the details of the processing (first stage discharge determination) of Step S 201  illustrated in  FIG. 5  will be described using the flowchart illustrated in  FIG. 7 . Processing illustrated in  FIG. 7  is executed by the controller  40 . 
         [0071]    In Step S 301 , the controller  40  detects the voltage values Vb of all cells  12  included in each of the battery groups G 1  to G 4  based on the output signals of the monitoring units  30 A,  30 B. In Step S 302 , the controller  40  performs determination about whether or not the voltage values Vb are different in each of the battery groups G 1  to G 4  and variation of the voltage values Vb is generated. 
         [0072]    Specifically, the controller  40  first specifies a minimum voltage value Vb_min 1  in each of the battery groups G 1  to G 4 . Here, there is at least one cell  12  having the voltage value Vb_min 1  in each of the battery groups G 1  to G 4 . Next, the controller  40  calculates the voltage difference ΔV 1  between the voltage value Vb of each of the remaining cells  12  and the voltage value Vb_min 1 . 
         [0073]    The remaining cells  12  are the cells  12  that have the voltage value Vb greater than the voltage value Vb_min 1 . The voltage difference ΔV 1  is a value obtained by subtracting the voltage value Vb_min 1  from the voltage value Vb of each of the remaining cells  12 . When the calculated voltage difference ΔV 1  is equal to or greater than a threshold value ΔV_th 1 , the controller  40  determines that variation of the voltage values Vb is generated. When variation of the voltage values Vb is generated, the controller  40  performs processing of Step S 303 . 
         [0074]    The determination about whether or not variation of the voltage values Vb is generated is performed for all cells  12  excluding the cell  12  having the voltage value Vb_min 1  in each of the battery groups G 1  to G 4 . In the battery groups G 1  to G 4 , the voltage values Vb_min 1  are optionally different from one another. 
         [0075]    When the voltage difference ΔV 1  is less than the threshold value ΔV_th 1 , the controller  40  determines that variation of the voltage values Vb is not generated, in other words, the voltage values Vb are uniform. The threshold value ΔV_th 1  is a value equal to or greater than 0 [V] and is able to be appropriately set taking into consideration a range in which variation of the voltage values Vb is allowable. Information specifying the threshold value ΔV_th 1  is able to be stored in the memory  41 . When variation of the voltage values Vb is not generated, the controller  40  ends the processing illustrated in  FIG. 7 . In this case, in the first stage discharge determination, a cell  12  to be discharged is not specified. 
         [0076]    In Step S 303 , the controller  40  specifies, as a cell  12  to be discharged, a cell  12  that is determined to have variation of the voltage values Vb by the processing of Step S 302 . The cell  12  that is specified as a target to be discharged is a cell  12 , which has the voltage value Vb greater than the voltage value Vb_min 1  by at least the threshold value ΔV_th 1 , in each of the battery groups G 1  to G 4 . 
         [0077]    The controller  40  sets a discharge execution flag for the cell  12  specified as a target to be discharged. If identification information (number or the like) is provided for all cells  12  constituting the assembled battery  10 , the controller  40  is able to store the identification information and the discharge execution flag in the memory  41  in association with each other. With this, the controller  40  confirms the identification information and the discharge execution flag, thereby recognizing a cell  12  to be discharged. 
         [0078]    When the first stage discharge determination is performed, in the processing of Step S 103  illustrated in  FIG. 4 , the controller  40  discharges the cell  12  for which the discharge execution flag is set. The processing of Step S 103  is an example of first processing of the invention. With this, in the battery group G, variation of the voltage values Vb is suppressed, thereby making the voltage values Vb uniform. When performing the processing illustrated in  FIG. 4 , in the battery group G, the voltage values Vb are optionally not made uniform depending on the discharge amount of each of the cells  12  for the second predetermined time t_th 2 . However, the processing illustrated in  FIG. 4  is repeatedly performed, thereby making the voltage values Vb uniform in the battery group G. 
         [0079]    In Step S 304 , the controller  40  excludes the battery group G including the cell  12  to be discharged specified by the processing of Step S 303  from the second stage discharge determination. Specifically, the controller  40  does not set the discharge execution flag for all cells  12  excluding the cell  12  to be discharged in the battery group G including the cell  12  to be discharged. With this, the controller  40  confirms the identification information and the setting content of the discharge execution flag, thereby recognizing a cell  12  not to be discharged. As the cell  12  not to be discharged, there is the cell  12  having the voltage value Vb_min 1 . 
         [0080]      FIG. 8  illustrates the voltage values Vb (an example) of the cells  12  in each of the battery groups G 1  to G 4 . The vertical axis of  FIG. 8  represents the voltage value Vb, and the horizontal axis of  FIG. 8  represents the cell  12 . 
         [0081]    In the example illustrated in  FIG. 8 , in the battery group G 4 , the voltage value Vb of each of cells  12  marked with an asterisk is greater than the voltage values Vb (that is, voltage value Vb_min 1 ) of the remaining cells  12  by at least the threshold value ΔV_th 1 . For this reason, the cell  12  marked with an asterisk is specified as a target to be discharged in the first stage discharge determination. The battery group G 4  is excluded from the second stage discharge determination. In each of the remaining battery groups G 1  to G 3 , since the voltage values Vb of the cells  12  are uniform, in the first stage discharge determination, in each of the battery groups G 1  to G 3 , a cell  12  to be discharged is not specified. 
         [0082]    Next, the details of the processing (second stage discharge determination) of Step S 202  illustrated in  FIG. 5  will be described using the flowchart illustrated in  FIG. 9 . Processing illustrated in  FIG. 9  is executed by the controller  40 . 
         [0083]    In Step S 401 , the controller  40  performs determination about whether or not the voltage values Vb are different and variation of the voltage values Vb is generated among a plurality of battery groups G (G 1  to G 4 ). A battery group G that is subjected to the processing of Step S 401  is a battery group G in which variation of the voltage values Vb is not generated in the first stage discharge determination. In the battery group G, all cells  12  have the voltage difference ΔV 1  less than the threshold value ΔV_th 1 . For this reason, the voltage values Vb of all cells  12  included in the battery group G are substantially equal. 
         [0084]    The controller  40  recognizes the voltage values Vb of the cells  12  included in each battery group G and then performs determination about whether or not variation of the voltage values Vb is generated among a plurality of battery groups G. Specifically, the controller  40  first specifies a minimum voltage value Vb_min 2  among the voltage values Vb in a plurality of battery groups G and calculates the voltage difference ΔV 2  between the voltage value Vb of each of the remaining battery groups G and the voltage value Vb_min 2 . The voltage value Vb of each of the remaining battery groups G is greater than the voltage value Vb_min 2 , and the voltage difference ΔV 2  is a value obtained by subtracting the voltage value Vb_min 2  from the voltage value Vb of each of the remaining battery groups G. 
         [0085]    When the calculated voltage difference ΔV 2  is equal to or greater than a threshold value ΔV_th 2 , the controller  40  determines that variation of the voltage values Vb is generated in a plurality of battery groups G. When variation of the voltage values Vb is generated, the controller  40  performs processing of Step S 402 . 
         [0086]    The threshold value ΔV_th 2  is a value equal to or greater than 0 [V] and is able to be appropriately set taking into consideration a range in which variation of the voltage values Vb is allowable. The threshold value ΔV_th 2  is optionally the same as or is optionally different from the above-described threshold value ΔV_th 1 . Information specifying the threshold value ΔV_th 2  is able to be stored in the memory  41 . 
         [0087]    The determination about whether or not variation of the voltage values Vb is generated is performed for all battery groups G excluding the battery group G having the voltage value Vb_min 2 . However, as described above, the processing of S 401  is not performed for the battery group G excluded from the second stage discharge determination by the processing illustrated in  FIG. 7 . 
         [0088]    When the calculated voltage difference ΔV 2  is less than the threshold value ΔV_th 2 , the controller  40  determines that variation of the voltage values Vb is not generated, in other words, the voltage values Vb are uniform. In this case, the controller  40  ends the processing illustrated in  FIG. 9 . When there is only one battery group G that is subjected to the processing of Step S 401 , since variation of the voltage values Vb is unable to be recognized, the controller  40  ends the processing illustrated in  FIG. 9 . 
         [0089]    When variation of the voltage values Vb is generated in a plurality of battery groups G, the controller  40  specifies, as a cell  12  to be discharged, all cells  12  included in the battery group G that is determined to have variation of the voltage values Vb. In the battery group G that is determined to have variation of the voltage values Vb, the voltage values Vb of the cells  12  included in the battery group G become greater than the voltage value Vb_min 2  by at least the threshold value ΔV_th 2 . 
         [0090]    As in the processing of Step S 303  illustrated in  FIG. 7 , the controller  40  sets a discharge execution flag for the cells  12  specified as a target to be discharged. The setting content of the discharge execution flag is able to be stored in the memory  41  in association with the identification information of the cells  12 . 
         [0091]    When the discharge execution flag is set for all cells  12  included in the battery group G, all cells  12  in the battery group G are discharged by the processing of Step S 103  illustrated in  FIG. 4 . The processing of S 103  is an example of second processing of the invention. As described above referring to  FIG. 3 , since each cell  12  is connected to the same resistive elements R 11 , R 21 , R 22 , the discharge amount of each cell  12  per unit time becomes equal in all cells  12 . That is, in all cells  12  of the battery group G, the voltage values Vb are lowered in a state where the voltage values Vb are uniform. 
         [0092]    When performing the processing illustrated in  FIG. 4 , the voltage values Vb are optionally not made uniform in a plurality of battery groups G depending on the discharge amount of each of the cells  12  for the second predetermined time t_th 2 . However, the processing illustrated in  FIG. 4  is repeatedly performed, and the voltage values Vb are able to be made uniform in a plurality of battery groups G. 
         [0093]      FIG. 10  illustrates the voltage values Vb (an example) of the cells  12  in each of the battery groups G 1  to G 4 .  FIG. 10  corresponds to  FIG. 8 . 
         [0094]    In the example illustrated in  FIG. 10 , the voltage values Vb of each of the battery groups G 1 , G 2  are greater than the voltage values Vb of the battery group G 3 , that is, the voltage value Vb_min 2  by at least the threshold value ΔV_th 2 . For this reason, cells  12  marked with an asterisk in  FIG. 10  are specified as a target to be discharged. All cells  12  of the battery groups G 1 , G 2  are specified as a target to be discharged. The cells  12  included in the battery group G 3  are excluded from a target to be discharged. 
         [0095]    According to this example, the cells  12  that are specified as a target to be discharged by the first stage discharge determination and the second stage discharge determination are discharged. In the examples illustrated in  FIGS. 8 and 10 , the cells  12  marked with an asterisk are discharged. 
         [0096]    The cell  12  that is specified as a target to be discharged by the first stage discharge determination is discharged, whereby it is possible to suppress variation of the voltage values Vb in all cells  12  of the battery group G. In the example illustrated in  FIG. 8 , it is possible to make the voltage values Vb of all cells  12  in the battery group G 4  uniform with the voltage value Vb_min1. In the battery group G 4 , after the voltage values Vb of all cells  12  are made uniform with the voltage value Vb_min 1 , the second stage discharge determination is performed. 
         [0097]    The cells  12  specified as a target to be discharged by the second stage discharge determination are discharged, whereby it is possible to suppress variation of the voltage values Vb in all battery groups G subjected to the second stage discharge determination. In the example illustrated in  FIG. 10 , it is possible to make the voltage values Vb of all cells  12  in the battery groups G 1  to G 3  uniform with the voltage value Vb_min 2 . 
         [0098]    As described above, while the voltage values Vb of all cells  12  in the battery group G 4  are made uniform with the voltage value Vb_min 1 , the voltage value Vb_min 1  is greater than the voltage value Vb_min 2 . For this reason, the cells  12  in the battery group G 4  are specified as the cells to be discharged by the the second stage discharge determination, after the voltage values Vb are made uniform with the voltage value Vb_min 1 . And then, all cells  12  included in the battery group G 4  are discharged by the second processing, and the voltage values Vb of all cells  12  included in the battery group G 4  are made uniform with the voltage value Vb_min 2 . 
         [0099]    As a result, in the assembled battery  10  (all battery groups G 1  to G 4 ), the voltage values Vb of all cells  12  are made uniform with the voltage value Vb_min 2 , whereby it is possible to suppress variation of the voltage values Vb. In this way, according to this example, it is possible to suppress variation of the voltage values Vb in the assembled battery  10  while suppressing variation of the voltage values Vb in each of the battery groups G 1  to G 4 . 
         [0100]    When suppressing variation of the voltage values Vb in the assembled battery  10 , first, variation of the voltage values Vb in each battery group G is suppressed. Accordingly, in each battery group G, determination about whether or not an abnormal state described below is generated is easily performed. 
         [0101]    In the cell  12 , if minute short-circuiting is generated between the positive electrode and the negative electrode, the cell  12  continues to be discharged. It is preferable to perform determination early about whether or not the abnormal state is generated even when the equalization processing illustrated in  FIG. 4  is performed. 
         [0102]    If variation of the voltage values Vb in a plurality of cells  12  is suppressed, the lowering (voltage fluctuation) of the voltage value Vb associated with minute short-circuiting is easily recognized. That is, if minute short-circuiting is generated in a specific cell  12 , the voltage value Vb of the specific cell  12  is lower than the uniform voltage values Vb of the remaining cells  12 , and thus it is easily determined that an abnormal state, such as minute short-circuiting, is generated. 
         [0103]    In the circuit configuration illustrated in  FIG. 3 , if the Zener diode D fails, as indicated by arrows of  FIG. 11 , a leakage current optionally flows in the Zener diode D. At this time, the voltage value Vc of the capacitor C on a current path indicated by a thick dotted line of  FIG. 11  is lower than the voltage value Vb of the cell  12 A. If a leakage current does not flow in the Zener diode D, the voltage value Vc becomes equal to the voltage value Vb. 
         [0104]    The voltage value Vc output from the comparator COM is expressed by Expression (1). 
         [0000]      [Equation 1] 
         [0000]        Vc=Vb− 2× I _leak×R   (1)
 
         [0105]    In Expression (1), I_leak is the value of a leakage current flowing in the Zener diode D. R is a resistance value of the resistive element R 11 . “I_leak×R” represents the amount of voltage drop associated with the flowing of a leakage current in the resistive element R 11 . In a path indicated by the arrows of  FIG. 11  in which a leakage current flows, two resistive elements R 11  are provided, and thus the amount of voltage drop becomes two times “I_leak”R. 
         [0106]    As illustrated in Expression (1), the voltage value Vc is lower than the actual voltage value Vb of the cell  12 A. For this reason, if the charging/discharging of the cell  12  (assembled battery  10 ) is controlled based on the voltage value Vc, there is a concern that the cell  12 A is overcharged. When controlling the charging of the cell  12 , the charging of the cell  12  is controlled such that the voltage value Vc is not greater than an upper limit voltage value determined in advance. 
         [0107]    If the voltage value Vc is less than the voltage value Vb of the cell  12 A, there is a concern that the charging of the cell  12 A is performed until the voltage value Vc reaches the upper limit voltage value. Since the voltage value Vb is greater than the voltage value Vc, when the voltage value Vc reaches the upper limit voltage value, there is a concern that the voltage value Vb exceeds the upper limit voltage value and the cell  12 A is overcharged. It is preferable to perform determination early about whether or not the abnormal state is generated even when the processing illustrated in  FIG. 4  is performed. 
         [0108]    As illustrated in  FIG. 11 , when a leakage current flows in the Zener diode D corresponding to the cell  12 A, the voltage value Vc of the capacitor C corresponding to each of the cells  12 B,  12 C is raised by “I_leak×R”. For this reason, if the relationship between a voltage drop (voltage fluctuation) of “2×I_leak×R” and a voltage rise (voltage fluctuation) of “I_leak×R” is able to be specified, it is able to be determined that the Zener diode D fails. Each of the cells  12 B,  12 C is the cell  12  connected in series with the cell  12 A. In other words, the positive electrode terminal of the cell  12 B is connected to the negative electrode terminal of the cell  12 A, and the negative electrode terminal of the cell  12 C is connected to the positive electrode terminal of the cell  12 A. 
         [0109]    As described above, in order to determine failure of the Zener diode D, it is necessary to suppress variation of the voltage values Vb in advance in a plurality of cells  12 . If the voltage values Vb of a plurality of cells  12  are made uniform with a reference voltage value (arbitrary value) Vref, thereafter, when the Zener diode D fails, the voltage value Vc detected by the monitoring unit  30  has a relationship illustrated in  FIG. 12 . 
         [0110]    As illustrated in  FIG. 12 , the voltage value Vc of the cell  12 A corresponding to the failed Zener diode D is less than the reference voltage value Vref by “2×I_leak×R”. The voltage value Vc of each of the cells  12 B,  12 C is greater than the reference voltage value Vref by “I_leak×R”. For this reason, when the voltage difference between the voltage value Vc of the cell  12 A and the reference voltage value Vref and the voltage difference between the voltage value Vc of at least one of the cells  12 B,  12 C and the reference voltage value Vref have a relationship illustrated in  FIG. 12 , it is able to be determined that the Zener diode D corresponding to the cell  12 A fails. 
         [0111]    Even if the voltage difference with respect to the reference voltage value Vref is not confirmed, it is optionally possible to determine failure of the Zener diode D. Specifically, it is optionally only confirmed that the voltage value Vc of the cell  12 A is less than the reference voltage value Vref and the voltage value Vc of at least one of the cells  12 B,  12 C is greater than the reference voltage value Vref. In this case, it is able to be determined that the Zener diode D corresponding to the cell  12 A fails. However, as described above, the voltage difference to the reference voltage value Vref is confirmed, whereby it is possible to determine failure of the Zener diode D with high precision. The controller  40  performs processing for determining a specific cell continuing to be discharged due to minute short-circuiting described above or failure of the Zener diode D as an abnormal state. The processing for determining an abnormal state is executed after the first processing is performed. 
         [0112]    If the voltage values Vb (voltage values Vc) of a plurality of cells  12  are made uniform with the reference voltage value Vref, it is not possible to recognize the relationship of the voltage values Vc illustrated in  FIG. 12 , and it is not possible to determine failure of the Zener diode D. Accordingly, in order to determine failure of the Zener diode D, as described above, it is necessary to suppress variation of the voltage values Vb (voltage values Vc) in a plurality of cells  12 . 
         [0113]    When suppressing variation of the voltage values Vb in a plurality of cells  12 , as in this example, a plurality of cells  12  are divided into a plurality of battery groups G, and it is possible to suppress variation of the voltage values Vb in each battery group G. 
         [0114]    As a method of suppressing variation of the voltage values Vb, in all cells  12  constituting the battery stack  11 , suppressing variation of the voltage values Vb or suppressing variation of the voltage values Vb in all cells  12  connected to one monitoring unit  30  is considered. However, in these cases, defects described below occur. 
         [0115]    In the configuration illustrated in  FIG. 6 , the battery stack  11 B includes the battery group G 2  connected to the monitoring unit  30 A and the battery group G 3  connected to the monitoring unit  30 B. A detection error optionally occurs in each of the monitoring units  30 A,  30 B, and the detection error optionally differs according to the monitoring units  30 A,  30 B. 
         [0116]    In this case, although the voltage values Vb of all cells  12  included in the battery stack  11 B are actually equal, the voltage value Vb detected by the monitoring unit  30 A and the voltage value Vb detected by the monitoring unit  30 B are different due to the difference in the detection error described above. In all cells  12  constituting the battery stack  11 B, when suppressing variation of the voltage values Vb, variation in the voltage values Vb caused by the difference in the detection error between the monitoring units  30 A,  30 B is suppressed. 
         [0117]    Accordingly, until variation of the voltage values Vb caused by the difference in the detection error between the monitoring units  30 A,  30 B is suppressed, it is not possible to perform the determination of an abnormal state described above. In other words, it takes time until the determination of an abnormal state is able to be performed. 
         [0118]    In this example, processing for suppressing variation of the voltage values Vb in each of the battery groups G 2 , G 3  illustrated in  FIG. 6  is performed by the first stage discharge determination and the first processing. For this reason, in the first stage discharge determination and the first processing, it is not necessary to suppress variation of the voltage values Vb caused by the difference in the detection error between the monitoring units  30 A,  30 B. Therefore, it is possible to reduce the time until variation of the voltage values Vb is suppressed and to perform the determination of the abnormal state described above in earlier timing. 
         [0119]    The cells  12  of different battery stacks  11  are optionally connected to one monitoring unit  30 . For example, as illustrated in  FIG. 6 , the battery stack  11 A (battery group G 1 ) and the battery group G 2  included in the battery stack  11 B are connected to the monitoring unit  30 A. 
         [0120]    In the battery stacks  11 A,  11 B, variation in the deterioration state of the cells  12  is generated, whereby the cells  12  are optionally different in full charging capacity. For example, if a temperature environment or the like is different around the battery stacks  11 A,  11 B, in the battery stacks  11 A,  11 B, variation in the deterioration state of the cells  12  is optionally generated. Each battery stack  11  is able to be replaced individually, and thus, as described above, if one of the battery stacks  11 A,  11 B is replaced with a different battery stack  11 , in the battery stacks  11 A,  11 B, variation in the deterioration state of the cells  12  is generated. 
         [0121]    If variation in the full charging capacity of the cells  12  is generated, variation of the voltage values Vb is likely to be generated. For example, when two cells  12  having different full charging capacities arc charged with the same current amount, the amount of voltage rise in the cell  12  having a small full charging capacity becomes greater than the amount of voltage rise in the cell  12  having a large full charging capacity. When two cells  12  having different full charging capacities are discharged with the same current amount, the amount of voltage decrease in the cell  12  having a small full charging capacity becomes greater than the amount of voltage decrease in the cell  12  having a large full charging capacity. In this way, variation of the voltage values Vb depends on variation in the full charging capacity of the cells  12 . 
         [0122]    In all cells  12  included in the battery groups G 1 , G 2  illustrated in  FIG. 6 , when suppressing variation of the voltage values Vb, variation of the voltage values Vb due to variation in the full charging capacity described above should also be suppressed. In this example, variation of the voltage values Vb in each of the battery groups G 1 , G 2  is suppressed based on the first stage discharge determination. For this reason, in the first stage discharge determination and the first processing, it is not necessary to suppress variation of the voltage values Vb due to variation in the full charging capacity. Therefore, it becomes easy to reduce the time until variation of the voltage values Vb is suppressed, and it is possible to perform the determination of the abnormal state described above in earlier timing. 
         [0123]    According to this example, it is possible to suppress variation of the voltage values Vb in the assembled battery  10  while making it easy to perform the determination of the abnormal state described above in a state in which variation of the voltage values Vb in each battery group G is suppressed. 
         [0124]    The invention is not limited to the configuration illustrated in  FIG. 6 . For example, the invention is optionally applied to a configuration in which one battery stack  11  is connected to a plurality of monitoring units  30 . In this case, the cells  12  included in one battery stack  11  are optionally divided into a plurality of battery groups G according to a plurality of monitoring units  30 . The number of battery groups G becomes equal to the number of monitoring units  30 . 
         [0125]    The invention is optionally applied to a configuration in which one monitoring unit  30  is connected to a plurality of battery stacks  11 . In this case, the cells  12  of each battery stack  11  are optionally divided into a plurality of battery groups G. The number of battery groups G becomes equal to the number of battery stacks  11 . As described above, if the battery groups G are set and then the same processing as in this example is performed, the same effects as in this example are able to be obtained. 
         [0126]    In this example, although the monitoring unit  30  detects the voltage value Vb of each cell  12 , the invention is not limited thereto. For example, when one battery Module is constituted by a plurality of cells  12  connected in series, the monitoring unit  30  is able to detect the voltage value of each battery module. The battery modules are an example of power storage elements of the invention. A plurality of battery modules are connected in series, whereby one battery stack  11  is constituted. In this case, it is possible to suppress variation of the voltage values in a plurality of battery modules. 
         [0127]    In this example, the cells  12  to be discharged are specified based on the first stage discharge determination and the second stage discharge determination, and all cells  12  that are specified as a target to be discharged are discharged in the processing of Step S 103  illustrated in  FIG. 4 . The timing of discharging the cells  12  is able to be appropriately set. Specifically, the processing (first processing) for making the voltage values Vb in the battery group G uniform and the processing (second processing) for making the voltage values Vb of a plurality of battery groups G uniform are optionally performed simultaneously or are optionally performed in different timing in an order of the first processing and the second processing. In  FIG. 5 , the first stage discharge determination and the second stage discharge determination are performed continuously. Meanwhile, the first processing is optionally performed after the first stage discharge determination is performed, and thereafter, the second stage discharge determination is optionally performed. In this case, in the flowchart of  FIG. 4 , after the first stage discharge determination and the first processing are executed, the second stage discharge determination and the second processing are repeated. When the first processing and the second processing are performed in different timing, it is not necessary to perform S 304 .