3 phase mp2 ac out PEN

i have 3phase multiplus 2 48 5000 ESS system in EU , from grid meter comes 4 wire l1 l2 l3 and PEN , PEN separation to PE and N is made just before ac in of multiplus, then in ac out side goes 5 wire cable to house , but now i want power to shed from house which has 5 wire, but shed cable has 4 wire l1 l2 l3 and PEN

can i connect N and PE again to power shed ,house and shed have all RCD in distribution boxes and local repeated earthing. i dont want to change 100m of 4G16 alu ground cable . i know that i should have only one PEN separation, what are solutions to this.Any ideas

This is going to be more of an issue of regulation compliance. So that is something you would need to check for where you are.

But electrically it would mean running an insulated earth between the two. Which i am guessing is something you don’t want to do.

There may be some workarounds.

Like breaking the bond there at the shed and drive a rod into the earth keeping the N as N. Install the RCD at the shed incomer?

There is a grid code (neutrals externally bonded) which allows that type of connection - but again may regulation wise prevent your connection to grid. So check local compliance

Currently i use eu grid code in estonia, basically i need to change grid code and disable ground relay, and make one PE N bond after ac out, and have good groundig at shed. Maybe let to check grounding resistance is good idea if its insulated from other groundings

There should always be abond at the main incomer. Then if the grid falls away the ground relay in the inverter is your main incomer (so you want the bond).
If you have no legal ramifications for changing grid code then use neutral externally bonded on in and out code then you don’t need to change much else unless it will affect the RCDs. That remains to be seen in testing.