There’s a nice post about the needed calculations here.It is for Envoy, but it can be applies to other inverters too: