The key principle of electricity market design is the maximisation of public welfare. In the context of rational electricity consumption, social welfare is the sum of consumer surplus, supplier surplus and congestion rents in order to maximise the benefits to society. For decades, the importance of balancing supply and demand has been emphasised in discussions on the security of the electricity sector. It has been reasonably assumed that electricity demand is inelastic, mainly by studying supply potential. However, the current understanding of supply and demand in the electricity system needs to address the three main challenges of European energy policy: sustainability, security of supply and competitiveness, while guaranteeing fairness in energy distribution. The aim of the research is to develop a conceptual framework for the integration of renewable energy sources and consumer involvement, based on the technology of a Demand Response aggregator – an information and technology company – in the Latvian electricity sector. The Thesis consists of an introduction, four chapters, conclusions, recommendations and a bibliography. The introduction explains the actuality of the research topic, defines the aims and objectives of the research, its subject and object, puts forward the research hypothesis, and determines the scientific novelty and practical significance of the research. In the first and second chapters, a theoretical and methodological framework, economic and institutional foundations and peculiarities of Demand Response in the energy sector, electricity price factors, the new role of electricity end-users and the possibilities of optimising demand response are provided. In the third chapter, the author analyses the macroeconomic and physical indicator trends of the energy sector, the renewable energy sources and electricity system prices, calculates approximate dependence formulae and coefficients of determination; develops a methodology for a comprehensive analysis of correlation and regression dependence of physical and system price indicators of the electricity sector based on an appropriate adaptation of classical mathematical models, and contributes to the literature on the impact of the state aid on the electricity market. In the fourth chapter, the author has proposed and developed a new two-level technical model for optimisation of demand response services, which proposes to solve the problem of reducing electricity consumption in the first stage and, in the second stage, to solve the optimisation problem of which group of active consumers' loads to disconnect in case of electricity shortages, thus, to respond to electricity market prices. The main text of the Thesis is 155 pages. The bibliography contains 137 sources. Additionally, 48 tables, 31 figures and 2 annexes are included in the Thesis.