Which Nexus version of the EN15804 add-on are you using? In the last versions, according to the PCR, we set PERM/PENRM to zero by default from the background database, and it is PERE = PERT - PERM and PENRE = PERT - PERM.
You can also see how it is calculated when you click inside these impact categories. PERT and PENRT are always calculated from the cumulative energy demands of renewable energies (PERT) and non-renewable energies (PENRT), taking into account the lower heating values. PERE and PENRE are calculated automatically as a substraction of the total and the material use, so there is no need to model this.
The only thing you have to model by yourself (unfortunately demanded by the PCR, even though not being a real "primary energy") is PERM and PENRM with the net calorific values (lower heating values) of your product inputs. If you do not explicitly model these indicators in your own foreground, PERM and PENRM will be zero by default, and it will be PERE = PERT and PENRE = PENRT. When you place the indicators for PERM and PENRM into your own foreground models with the right net calorific values, you will see that these values will automatically count towards PERM, PENRM and that PERE, PENRE will be adjusted accordingly. The total values will stay as they are, since they are correct "real" life cycle indicators for the primary energy demands that stem from elementary exchanges with the environment like coal, gas, oil etc.