The recent mains dropout makes us understand that there are errors in the naming and/or connection of the IPS sensors.
First, ENV_xxx_IPS_VOLT_y does not match reality. Assuming that NEB and WEB are OK (just to use a convention in the name of the three phases R, S and T), then CEB and MCB are wrong.
The fix is:
- ENV_CEB_IPS_VOLT_R is actually S, ENV_CEB_IPS_VOLT_S is T and ENV_CEB_IPS_VOLT_T is R
- ENV_MCB_IPS_VOLT_R is actually S, ENV_MCB_IPS_VOLT_S is R and ENV_MCB_IPS_VOLT_T remains because it is correct.
We could easily swap the name of the VOLTAGE sensor in some configuration file, or even physically change the ADC input. But in doing so we would lose the coupling with the CURRENT sensors (eg ENV_xxx_IPS_CURR_y).
Unfortunately, it seems there are some doubts in these latter too.
It's fine for CEB (Volts and Current pair R with R, S with S and T with T), the same in MCB (but there is a 180 degree phase reversal somewhere) and WEB. Not in NEB where Volts and Current do not match. It could be due to a reactive load, but seems a too large phase shift.
In the end: we should plan a check and rearrangement of all these sensors (12 for voltage and 12 for current) to be sure that when we look at a certain IPS line of VOLTAGE and CURRENT, they match each other.