Matrix formulations of minimum absorbed energy principle and nodal method of magnetic circuits analysis