Battery management system
A battery management system includes a microcontroller having a first diagnostic handler application and first and second applications. The first application sets a first non-recoverable diagnostic flag to a first encoded value having each nibble thereof selected from an odd Karnaugh set of binary values. The second application sets a second non-recoverable diagnostic flag to a second encoded value having each nibble thereof selected from an even Karnaugh set of binary values. The first diagnostic handler application sets a first master non-recoverable diagnostic flag to a first encoded fault value if the first non-recoverable diagnostic flag is equal to a second encoded fault value, or the second non-recoverable diagnostic flag is equal to a third encoded fault value.
1. A battery management system, comprising:
a microcontroller having a first diagnostic handler application and first and second applications;
the first application setting a first non-recoverable diagnostic flag to a first encoded value and sending the first non-recoverable diagnostic flag to the first diagnostic handler application; the first encoded value having each nibble thereof selected from an odd Karnaugh set of binary values;
the second application setting a second non-recoverable diagnostic flag to a second encoded value and sending the second non-recoverable diagnostic flag to the first diagnostic handler application; the second encoded value having each nibble thereof selected from an even Karnaugh set of binary values;
the first diagnostic handler application setting a first master non-recoverable diagnostic flag to a first encoded fault value if the first non-recoverable diagnostic flag is equal to a second encoded fault value, or the second non-recoverable diagnostic flag is equal to a third encoded fault value;
wherein the odd Karnaugh set of binary values correspond to numbers having corresponding binary numbers with an odd of 0 bits and an odd number of 1 bits in a nibble and the even Karnaugh set of binary values correspond to numbers having corresponding binary numbers with an even number of 0 bits and an even number of 1 bits in a nibble.
2. The battery management system of claim 1 , wherein:
the microcontroller further includes a safe state application;
the first diagnostic handler application sending the first master non-recoverable diagnostic flag to the safe state application;
the safe state application transitioning a contactor to an open operational position if the first master non-recoverable diagnostic flag is equal to the first encoded fault value.
3. The battery management system of claim 1 , wherein:
the microcontroller having a third application, the third application setting a first recoverable diagnostic flag to a third encoded value and sending the first recoverable diagnostic flag to the first diagnostic handler application; and
the first diagnostic handler application setting a first master recoverable diagnostic flag to a fourth encoded fault value if the first recoverable diagnostic flag is equal to a fifth encoded fault value.
4. The battery management system of claim 3 , wherein:
the microcontroller further includes a safe state application;
the first diagnostic handler application sending the first master recoverable diagnostic flag to the safe state application; and
the safe state application transitioning a contactor to an open operational position if the first master recoverable diagnostic flag is equal to the fourth encoded fault value.
5. The battery management system of claim 3 , wherein:
the microcontroller having a second diagnostic handler application and fourth and fifth applications;
the fourth application setting a third non-recoverable diagnostic flag to a fourth encoded value and sending the third non-recoverable diagnostic flag to the second diagnostic handler application; the fourth encoded value having each nibble thereof selected from the odd Karnaugh set of binary values;
the fifth application setting a fourth non-recoverable diagnostic flag to a fifth encoded value and sending the fourth non-recoverable diagnostic flag to the second diagnostic handler application; the fifth encoded value having each nibble thereof selected from the even Karnaugh set of binary values; and
the second diagnostic handler application setting a second master non-recoverable diagnostic flag to a sixth encoded fault value if the third non-recoverable diagnostic flag is equal to a seventh encoded fault value, or the fourth non-recoverable diagnostic flag is equal to an eighth encoded fault value.
6. The battery management system of claim 5 , wherein:
the microcontroller further includes a safe state application;
the second diagnostic handler application sending the second master non-recoverable diagnostic flag to the safe state application; and
the safe state application transitioning a contactor to an open operational position if the second master non-recoverable diagnostic flag is equal to the sixth encoded fault value.
7. The battery management system of claim 5 , wherein:
the microcontroller having a sixth application, the sixth application setting a second recoverable diagnostic flag to a sixth encoded value and sending the second recoverable diagnostic flag to the second diagnostic handler application; and
the second diagnostic handler application setting a second master recoverable diagnostic flag to a ninth encoded fault value if the second recoverable diagnostic flag is equal to a tenth encoded fault value.
8. The battery management system of claim 7 , wherein:
the microcontroller further includes a safe state application;
the second diagnostic handler application sending the second master recoverable diagnostic flag to the safe state application; and
the safe state application transitioning a contactor to an open operational position if the second master recoverable diagnostic flag is equal to the ninth encoded fault value.
9. The battery management system of claim 8 , wherein the first and second non-recoverable diagnostic flags have a Hamming distance of at least four from one another.
10. The battery management system of claim 8 , wherein the third and fourth non-recoverable diagnostic flags have a Hamming distance of at least four from one another.
11. The battery management system of claim 8 , wherein the first and second master non-recoverable diagnostic flags have a Hamming distance of at least four from one another.
12. The battery management system of claim 8 , wherein the first and second recoverable diagnostic flags have a Hamming distance of at least four from one another.
13. A battery management system, comprising:
a microcontroller having a first diagnostic handler application and first and second applications;
the first application setting a first non-recoverable diagnostic flag to a first encoded value and sending the first non-recoverable diagnostic flag to the first diagnostic handler application;
the first encoded value having each nibble thereof selected from an odd Karnaugh set of binary values;
the second application setting a second non-recoverable diagnostic flag to a second encoded value and sending the second non-recoverable diagnostic flag to the first diagnostic handler application; the second encoded value having each nibble thereof selected from an even Karnaugh set of binary values;
the first diagnostic handler application setting a first master non-recoverable diagnostic flag to a first encoded fault value if the first non-recoverable diagnostic flag is equal to a second encoded fault value, or the second non-recoverable diagnostic flag is equal to a third encoded fault value;
the microcontroller further includes a safe state application;
the first diagnostic handler application sending the first master non-recoverable diagnostic flag to the safe state application; and
the safe state application transitioning a contactor to an open operational position if the first master non-recoverable diagnostic flag is equal to the first encoded fault value.
14. The battery management system of claim 13 , wherein the first and second non-recoverable diagnostic flags have a Hamming distance of at least four from one another.
15. A battery management system, comprising:
a microcontroller having a first diagnostic handler application and first and second applications;
the first application setting a first non-recoverable diagnostic flag to a first encoded value and sending the first non-recoverable diagnostic flag to the first diagnostic handler application;
the first encoded value having each nibble thereof selected from an odd Karnaugh set of binary values;
the second application setting a second non-recoverable diagnostic flag to a second encoded value and sending the second non-recoverable diagnostic flag to the first diagnostic handler application; the second encoded value having each nibble thereof selected from an even Karnaugh set of binary values;
the first diagnostic handler application setting a first master non-recoverable diagnostic flag to a first encoded fault value if the first non-recoverable diagnostic flag is equal to a second encoded fault value, or the second non-recoverable diagnostic flag is equal to a third encoded fault value;
the microcontroller having a third application, the third application setting a first recoverable diagnostic flag to a third encoded value and sending the first recoverable diagnostic flag to the first diagnostic handler application; and
the first diagnostic handler application setting a first master recoverable diagnostic flag to a fourth encoded fault value if the first recoverable diagnostic flag is equal to a fifth encoded fault value.