A method for detecting a risk of malfunction through imbalance of a device for storing energy (1) comprising a set of levels (2) electrically connected to one another in series and consisting of electrochemical cells electrically connected to one another in parallel, characterised in that it comprises:
- a step (E2) for determining a first function (f1) characterising a correct operation of at least one level, the first function defining a relationship between, on the one hand, a magnitude relative to a quantity of charges circulating in at least one level and, on the other hand, a voltage at the terminals of at least one level, the first function being defined over a given voltage range (P),
- a step (E3) of determining a second function (f2) characterising the operation of a level having the lowest voltage at its terminals among all of the levels of the device for storing energy (1), the second function defining a relationship between, on the one hand, said magnitude relative to a quantity of charges circulating in the level having the lowest voltage at its terminals among all of the levels of the device for storing energy and, on the other hand, a voltage at the terminals of this level, the second function being defined over said voltage range, then
- a step (E4) for calculating an amplitude value difference or an integral value difference between said first function and said second function, and then
- a step (E5) of comparing said difference with a threshold.