Beta limits in long-pulse tokamak discharges