A unified approach for processing unbalanced conditions in transient stability calculations