Renewable energy technologies rely primarily on solar and wind. In Iran, due to the existing potentials, the development of using photovoltaic panels and wind turbines is widely being planned and implemented. One of the important and influential factors in the feasibility and determination of the structure and dimensions of smart microgrids based on renewable sources is the potential of the primary resources. In this paper, the effect of primary sources on the structure, size, operation and installing cost, and operating cost of a smart microgrid consisting of solar panels, wind sources, and a fossil generator is analyzed comprehensively, aiming to present an energy management strategy and provide new economic modeling. Different structures are designed according to different conditions of renewable and non-renewable resources and compared with each other in terms of environmental, technical, operation and economical aspects. As expected, with the increase in the potential of renewable primary sources as well as rising fossil fuel prices, the system's inclination to use renewable technologies will increase.