Framework for calculating Root-Mean-Squares of state variables in power electronic converter models