Renewable energy sources (RESs) in the power system have led to the continuation of electricity supply to the consumer and to the sustainable development of the society. Due to the increased penetration of RESs, the uncertainties of electrical energy systems have been intensified, and smart power system operators are thus faced with growing levels of frequency security risks. For preservation of frequency in a power system, a multi-stage automated Under-Frequency Load Shedding (UFLS) program can be utilized to shed the minimum amount of load. In the light of the smart grid paradigm, Demand Response (DR) can be considered as an appropriate strategy to face the adverse effects of the uncertainties of the RESs and increase the balance between generation and consumption. Consequently, it is regarded as a necessity in a smart grid environment to design an innovative UFLS scheme that includes the uncertainties of the RESs and DR programs. This paper addressed a new optimal UFLS intended to minimize load shedding, after accurate tracking of frequency deviations. To resolve the pro- blem of setting UFLS system parameters stochastically, a Mixed-Integer Linear Programming (MILP) formulation is used in an optimization framework. The proposed model is implemented on the IEEE 39-bus test system.