Firstly, to safetyuggs - very impressive progress especially in the short time frame. Well done.
Regarding Hx calculation (or the internal resistance coefficient in Nissan terminology), that's relatively straightforward to understand at a high level, but actually one of the trickier things to correctly calibrate for aftermarket cells. We've looked at this mostly on the 30kWh LBCs, but the earlier LEAF LBCs look quite similar. It's all primarily based on pack voltage drop vs pack current while the car is being driven. The pack current has to be high enough to get some usable data, but once there is enough current the LBC is always feeding this into the calculation.
The LBC uses a 3D lookup table that is calibrated presumably based on empirical test data. One axis is the calculated internal resistance as mentioned above and the other is the average battery temperature. The value from the table is used to feed Hx into a very slowly averaging filter. On the 30kWh at least, it looks like they tested cells in new condition at various temperatures. Then they likely cycled the cells for a long time and re-did the tests again for various temperatures. Finally some interpolation was done to fill in a bunch of unknown data points in the 3D table.
Most importantly, Hx is the primary input into deriving SoH (using another 3D table). The values in this table make it look like they measured the capacity of new and aged cells vs the increase in internal resistance to populate that table. So effectively that table gives the relationship between the expected capacity loss (SoH) and internal resistance (Hx). Nissan themselves got the values in this table quite wrong in the initial 30kWh firmware – hence the need for a revision. What wasn’t obvious at the time was why. In hindsight I suspect it’s because of the difference between ageing based on cycles alone vs cycles and calendar life. With calendar life included the internal resistance increase has been a lot higher than expected compared to the remaining capacity.
When using aftermarket cells, you could just set the SoH table to give 100% SoH in all cases and all will be fine for the first year or two at least… But down the track it will become an issue as SoH is very important in calculating charge bars, GoM, etc.