Stability analysis of portal frames in inelastic domain