Evaluating solar energy technical and economic potential on rooftops in an urban setting: the city of Lethbridge, Canada

Solar energy deployment is gaining greater attention as a sustainable source of energy that could alleviate aspects of the current climate crisis. Knowledge of the characteristics and economics of the solar electricity sector is required to integrate it in the energy generation and utilization mix. Unlike energy generation from fossil fuels, renewable energy sources have relatively low geographic density and are spread unevenly over large areas. Therefore, especially in cities, where space has greater value and opportunity costs, finding suitable spaces for implementing solar systems are essential to promote the use of solar technologies. Using remote-sensing data, the intricate topography of cities can be modelled, and insolation incident at each location can be estimated. A multi-criteria approach based on geographic information systems (GIS) and light detection and ranging (LiDAR) is used in this research to estimate rooftop photovoltaic electricity potential of buildings in an urban environment, the city of Lethbridge. An economic assessment is conducted utilizing present market prices to determine economically attractive rooftop PV systems. The total rooftop photovoltaic (PV) electricity potential is evaluated and compared with the local electricity demand. Effective expansion of solar power systems in the city is achieved by determining the geographic distribution of the best locations for exploiting the systems. This study estimates that the rooftop PV electricity generation potential of the city of Lethbridge is approximately 301 ± 29 (SD) GWh annually (almost 38% of its annual electricity consumption in 2016), and about 96% of the recognized potential rooftop PV systems are economically feasible. The results can assist in making informed policy decisions about investment in deployment of renewable energy generation.


Introduction
Extensive energy generation and consumption are the main anthropogenic sources of greenhouse gas emissions and air pollution (two-thirds of all human-induced GHG emissions) [1]. Unless sufficient countermeasures are taken in the energy sector, the progressive deterioration of the environment related to these emissions will continue [1]. The rapid and growing global movement towards low-carbon energy sources in response to the imperative of addressing global warming may support a global sustainable energy future and alleviation of some environmental burdens [1]. By introducing new sources of natural capital and exploiting replenishing resources, renewables play a crucial role in efforts to de-carbonise energy supplies and avert negative impacts associated with climate change [2]. Renewable energy system uses diverse sources, localises energy generation, decreases transport costs, and reduces long-term price variability [2]. Renewables are now well recognized as the main stream of energy worldwide and supplied 19.3% of the global final energy usage in 2015 [3]. Increasing development of solar PV is mostly due to improving competitiveness and cost parity with other technologies, new government plans, increasing awareness of the potentials of this technology, and rising electricity demand [3]. Substantial increases in rooftop solar PV installation resulted in buildings becoming the largest available urban source of space for deployment [4]. In fact, globally, about half of the PVs presently installed capacity is composed of distributed PV systems [5]. However, a large capacity is still untapped [5].

3
To supply the increasing needs of energy while avoiding climate change and maintaining quality of life, cities require rigorous and holistic sustainable action plans [4]. Cities currently accommodate more than 50% of the global population and are an important contributor to global warming, accounting for 65% of global energy demand and 70% of human-induced (energy-related) CO 2 emissions [4]. Immense renewable energy sources have the largest potential to improve the sustainability of the urban environment, and PV has demonstrated the most potential to contribute in the energy mix, among available micro-generation technologies [4,6]. The number of cities worldwide that have decided to move towards 100% renewable energy and carbon neutrality targets has increased [4]. Some cities have implemented promising policy measures to motivate distributed clean energy development, including rules that oblige utility companies to buy renewable power and building codes that compel the installation of renewable technologies [4]. Some cities and local authorities plan to create a livable, sustainable, and resilient space for their inhabitants [3]. However, in general, cities are not well-equipped to cope with many urban growth and sustainability challenges [7].
Onsite rooftop PV energy micro-generation could decrease the electricity distribution and transmission costs and losses [8]. The lack of investors' and home-owners' awareness about rooftop PV potential, and the detailed information deficit regarding rooftop spaces suitable for PV installation are important barriers that have impeded the diffusion of rooftop PV systems [5,9]. Significant research on city-wide distributed renewable energy generators is required to attain a sustainable urban energy mix [7]. This research focuses on the technical and economic potential of the roof-mounted photovoltaic (PV) systems in large areas. Estimation of PV potential is challenging, but indispensable for relevant renewable energy policy making [5]. The evaluation of the adequate available roof surfaces is the most crucial stage in implementation of roof-integrated PV applications [10]. Utilizing light detection and ranging (LiDAR) data, geographic information system (GIS) methods, and PV-performance modeling, the proposed method is an efficient and scalable technique which can be automated and replicated effectively. A new detailed method for calculating solar resource availability using ArcGIS was employed [11]. Solar analyst required inputs which were calculated for the region and the accuracy of the simulated radiation was examined by comparing the results with measured data. Moreover, measured meteorological data were used to define a slope factor that was applied to ArcGIS-simulated global radiation estimates on horizontal surfaces. In addition, the economic potential of rooftop PV systems has been investigated. Considering all building types in the city boundary including commercial and industrial buildings is one of the strengths of the applied methodology. In addition to the quantification of the potential amount of electricity generation, the results reveal which percentage of roof areas is economically viable for PV deployment. The findings can provide an established reference point for rooftop PV in the region and be used by energy and building sectors, and policy makers to assess new development opportunities and guide investments towards clean energy technologies [10]. To our knowledge, a rigorous comprehensive assessment of rooftop PV technical potential and economic attractiveness in our study region has not been previously published.

Background
Technical potential quantifies the maximum possible energy production utilizing a specific renewable energy technology in a particular location or region [8]. Rooftops are the best situated parts of buildings to harvest solar energy and generate electricity [12]. Calculating the rooftop solar potential is not always simple [12]. Rooftop PV potential in urban environments has been estimated in the various regions across globe [13]. Depending on the size of the study region, the type of available data, and the expected results, different methods of estimation have been used [6]. These methods try to assess essential elements such as solar incident intensity, usable roof area availability, and shadows cast by nearby objects [6]. Some studies establish a relationship between population density, building densities, and roof areas, especially for large regions [6]. The outputs of studies like these are not usually applicable at individual and local scales [6]. Based on a representative sample of buildings, Ordóňez et al. used statistical construction data and digital urban maps to measure the useful roof surface area of the sample, and extrapolated the characterization of the sample to the total study region to estimate the solar energy potential in Andalusia (Spain) [13]. Izquierdo et al. calculated the roof area available for solar applications based on land use, population, and building density data using a representative sample of GIS maps of urban areas [10]. They assessed irradiation potential by employing hourly meteorological data from weather stations using Erbs model and Liu-Jordan isotropic model [10]. Establishing a relationship between per capita suitable rooftop area and population density by linear regression on solar rooftop potential data from 1600 cities, IEA (International Energy Agency) Energy Technology Perspectives report derived the rooftop solar PV power capacity in other cities [14]. Sometimes, the inclination angle of different rooftop surfaces and the spatio-temporal variation of insolation are ignored. The IEA value may be used as a starting point in evaluating PV-generation potential, but follow-up evaluation is required.
There are three essential methods for identifying the suitable roof surfaces for PV installation in urban settings: constant-value methods, manual selection methods, and GIS-based methods [8]. Constant-value methods assume that a certain fraction of total roof area is usable for placing PV panels [8]. Presenting several methods for creating rooftop PV supply curves, Denholm and Margolis translated the total roof area into usable area using an availability factor [15]. They estimated that residential and commercial buildings in their study site have roof area availability factors of 22-27% and 60-65%, respectively [15]. The availability factor of roof area takes into account obstructions and shading from other parts of the roof or neighboring features [15]. Constant-value method is simple and not computationally intensive, because it does not take into account the complexity of rooftops and surrounding objects such as tree canopies [8]. Manual selection method utilizes sources such as aerial photography and Google Earth to assess the suitability of roof planes of buildings individually [8]. Although manual selection can precisely determine the total suitable rooftop area, it is time-consuming and cannot be easily applied to large sites [8]. Anderson et al. used an IMBY (In My Backyard) solar simulation tool which allows users to draw polygons to estimate the total rooftop area within a city [16].
GIS-based methods are the most practical and effective techniques for the estimation of usable rooftop area [8,17]. These methods are more precise than constant-value methods and can be applied to much larger data sets compared with a manual selection approach [8]. Martin et al. reviewed different procedures for the solar potential assessment in urban areas [18]. Singh and Banerjee used land use data and GIS-based satellite image analysis for estimating the building footprint area and the rooftop PV potential for the Indian city of Mumbai [19]. They employed the Liu-Jordan model to calculate the plane-of-array irradiation and determined the optimum PV tilt angle for the study site and inferred that up to 20% of the average daily electricity demand of the city can be met by rooftop PV [19]. Jakubiec and Reinhart presented a method for estimating city-wide electricity gains from PV panels by creating 3D urban models using LiDAR data and ArcGIS, Daysim-based hourly radiation simulations, and hourly calculated rooftop temperatures [20]. Creating a 3D urban model is crucial when assessing PV rooftop potential in an urban environment [18]. A precise knowledge of the PV potential requires a comprehensive study of the spatial dimensions of the site [18]. The emergence of LiDAR technology has provided a great opportunity for dense urban area mapping [21].
Methods using DEMs (Digital Elevation Model) employ rooftop irradiation or the number of annual daylight hours in determining proper roof areas [20]. The DEMs are often generated from LiDAR data, and are the most accurate source for measuring the details of an entire urban area [20]. Gagnon et al. used LiDAR data, geographic information system (GIS) methods, and PV-generation modeling to estimate the suitable rooftops for installing PV in 128 cities in the United States [8]. Then, they estimated the PV potential of the entire continental United States employing the results from analysis of areas covered by LiDAR data [8]. Jochem et al. used LiDAR point clouds and a region-growing process to detect potential roof points and perform solar potential analysis for each point [22]. They considered the shadow cast by adjacent objects and the effects of cloud cover by calculating the horizon of each point within the point cloud and employing data from a nearby ground weather station, respectively [22]. Using a GIS-based method and utilizing LiDAR data, Gooding et al. ranked seven major UK cities according to their capacity to generate electricity from roof-mounted PV systems [6]. They calculated a solar city indicator taking into account the socio-economic factors such as income, education, environmental consciousness, building stock, and ownership [6]. The results revealed that the local buildings' characteristics affect the physical and socio-economic rooftop PV potential of a city significantly and indicated areas that require policy attention to promote maximum PV use [6].
Different procedures for analyzing solar potential in urban environments have various drawbacks, and the existing rooftop PV evaluations inferred from the methods may be imprecise [5,20]. In some methods, the shading caused by urban context such as trees and neighboring buildings is not considered, or differentiation among the orientations and slopes of roof segments are not conducted [20]. Many studies require assumptions about the orientation and slope of rooftops [23]. Furthermore, few solar potential estimation methods suppose that all rooftops are flat and a constant portion of them is suitable for PV installation [20]. Rooftop PV studies rarely investigate the economic potential of these systems [24]. In this study, a new detailed method for calculating solar resource availability using ArcGIS was employed. In addition, the economic potential of rooftop PV systems was investigated.

Methods
Modeling the built area, the insolation incident assessment, and the estimation of the suitable roof area is essential in evaluating a building's potential in solar rooftop PV energy generation [25]. Urban area modeling is an active research field in Geography [25]. Urban areas are dense environments composed of diverse artificial and natural features. This complexity makes building rooftops attractive for solar PV installation [26]. Building rooftops provide a large expanse of generally unused area for PV energy production [8]. In the urban context, the existence of various artificial and natural objects including buildings and trees influences the sunlight regime considerably [21]. Accordingly, an accurate solar insolation simulation model that considers the complexity of the urban form is required to identify relevant aspects of the urban energy landscape [21]. In an urban environment, representations of three-dimensional form such as elevation, surface slope and aspect, and surrounding obstructing objects determine the accuracy of such simulations [27]. Roof surfaces with different slopes and orientations, reflection, and shadings from the neighboring objects were modelled separately.

Study area
This study was conducted in Alberta, Canada. Solar electricity can become a mainstream and reliable energy source in Canada and revolutionize its energy mix [28]. The premium quality renewable resources of Alberta could allow this province to become a leader in solar, wind, and bioenergy [29]. Notwithstanding this potential, much of the province's renewable resources are untapped [29]. The city of Lethbridge (49.7°N, 112.8°W) is in southern Alberta, Canada, a region that receives relatively high rates and extensive hours of solar radiation, with an annual mean daily global horizontal radiation of 3.77 kWh/m 2 and 2506 h of bright sunlight ( Fig. 1) [30,31]. With a moderate continental climate, Lethbridge is characterized by warm summers and mild winters, and has more than 320 days of sunshine per year, which is relatively high among Canadian cities [31]. This city has a total land area of 124.3 km 2 with a large and growing volume of residential and commercial buildings, which justifies new steps towards building a self-sustainable urban setting [31]. To our knowledge, an extensive evaluation of rooftop photovoltaic solar potential has not yet been undertaken in this city. Low-height and horizontally dispersed buildings over a large area most likely provide a significant rooftop PV electricity potential. The total number of residential, government, medical, educational, commercial, industrial, and cultural buildings in Lethbridge is 55,877 (January 2017) ( Table 1) [32]. This city had a total population of 96,828 in 2016 [33].

Data
The size of the study area is an important variable in a solar potential analysis [18]. Vector cartographic maps, digital cadastral services, state geographic information systems, digital elevation and digital surface models, and aerial photos are different resources that are widely used in evaluating solar potential [18]. These resources provide required information about building shape, footprint, height, type, location, and other urban features [18]. The need for more detailed city models has led to increasing use of LiDAR point clouds which contains a wealth of Earth surface information [18]. Large volumes of LiDAR data collected in July 2015, with vegetation in full leaf-on condition, were provided by the city of Lethbridge through the University of Lethbridge, and used to represent the study area in ArcGIS. The resolution of LiDAR data is 1 m 2 . The city boundary data and a polygon shape file of building footprints provided by the city of Lethbridge were used to determine the extent of the study area and to identify rooftops [32, 35].

Processing Lidar data to drive suitable rooftop area for PV application
LiDAR data are usually provided in LAS format and a defined spatial reference is not typically embedded in them ( Fig. 2) [36]. The proper spatial reference information of LAS files that was indicated in the LiDAR metadata was defined. Using LiDAR data, two kinds of high-quality elevation models including digital surface model (DSM) and digital elevation model (DEM) can be produced. First return (surface return) or DSM encompasses elevation information for buildings, tree canopies, and bridges, while ground or bare earth or digital elevation model (DEM) represents the topography [21,37]. To analyze the shading, slope, and azimuth (orientation) of each roof segment at a resolution of 1 m 2 , LiDAR data were processed. The digital surface model (DSM) with a 1 × 1 m cell size was created via maximum value interpolation technique to model the high-relief urban area (Fig. 2) [37]. For generating a DSM from LiDAR data, the maximum value is the best technique for biasing the result to higher elevations [37]. Because PV panels are placed on top of buildings, the building footprint data were used to clip DSM [8,23]. Before intersecting these two files, a 1-m buffer was applied to building footprint areas [23]. LiDAR data may contain some noise and may not be precise enough close to the roof edges, and thus may be unable to provide an accurate representation of roof borders [23]. As a result, there is no explicit or absolute roof boundary discernible from LiDAR data. Applying this 1-m buffer helped to eliminate noise in LiDAR data [23]. It was assumed that the whole area of rooftops cannot be covered by PV panels and the extent of roof surfaces devoted to the panels is assumed to be bounded by a 1-m-wide perimeter area. This margin area is also required for safety and maintenance purposes [23].
Different methods have been used to extract roof footprints from LiDAR data. For instance, Huang et al. used vegetation information, normalized difference vegetation index (NDVI), from color-infrared image and height information from DSM to recognize building roof surfaces [21]. Chaves and Bahill used an elevation mask to exclude the locations lower than a specific height [38]. To extract building roof Fig. 1 Study area, the city of Lethbridge [34] 1 3 surfaces from the LiDAR data, DSM was clipped by a building footprint polygon shape file. Most of the buildings are single homes with mainly ridged roofs. Topographic characteristics such as hillshade, slope, and aspect were calculated using the extracted DSM from the LiDAR point cloud [21].

Rooftop slope analysis
The steepest downhill fall from each cell to its eight surrounding cells (the largest elevation change over distance between each cell and its adjacent cells) was calculated in ArcGIS using the average maximum technique [39]. The slope of each m 2 of roof surfaces in the study area was determined. Lower slope values represent flatter planes [39]. Surfaces with a tilt less than 10° are usually defined as flat planes [8,23]. PV panels installed on pitched roofs usually have an inclination angle equal to the slope of the roof [17]. On the flat or almost flat roofs, PV panels can be installed with a desired slope [17]. The optimal PV panel tilt angle varies with latitude. PV systems with tilt angles equal to latitude produce more yearly electricity than others, while those with slopes larger than latitude generate more constant energy, but have lower annual production [40]. Lower slopes lead to more electricity production in summer, whereas higher tilt angles induce larger energy generation in winter [40]. In fact, with higher slopes, the difference between summer and winter energy production decreases, and throughout the year the energy flow is more consistent, while with lower slopes, the fluctuation of produced energy during summer and winter is considerably higher, meaning that over the course of a year, generated electricity exhibits a significant seasonal change. Accordingly, a slope classification logic was utilized to organize different rooftop surfaces with various slopes according to their suitability for PV installation ( Table 2) [23].
Slope evaluation with LiDAR data is not always precise or perfectly accurate [23]. The calculated slope might vary throughout a surface with a unique actual slope due to noise in the LiDAR data [23]. Noise is generated when light pulses encounter an object which does not belong to the roof surface [23]. To reduce noise and obtain the most accurate results, the majority filter was used [23]. Using this filter, cell slope values were replaced based on the majority of their contiguous neighboring cells [23].

Rooftop Azimuth analysis
Solar panels oriented towards a specific direction exhibit maximum performance [8]. Azimuth (aspect) identifies the compass direction that the surface slope faces at the installed location. The azimuth in positive degrees was derived from the input elevation data set (the LiDAR-generated DSM) for each square meter of roof area utilizing ArcGIS [8]. Aspect values were measured clockwise, from 0 that defines north to 360 which again indicates north. Flat areas have an aspect value of − 1. The azimuth measurements were categorized into nine classes (Fig. 3) [8]. Next, to eliminate noise, the majority filter was used [23]. Azimuth values are used to detect all roof planes [8]. A roof plane is composed of contiguous areas with the same azimuth [8]. Roof planes were converted to polygons; thereby, individual square meters of roof surfaces were dissolved into homogeneous roof planes [8]. Then, to calculate a single average tilt for each individual roof segment, the Zonal Statistics tool was applied to the slope raster [8].

Shading analysis
To model the spatio-temporal variation of insolation on different facets of urban surfaces and to determine the unobscured fractions of each roof plane for most of the time, a shading simulation was applied to the city's DSM to illustrate the spatial and temporal variation of the shadows. The gradual movement of shadows cast by nearby features throughout a day influences the performance of PV systems significantly, and makes it of particular importance to consider the variations in length and direction of shadows in PV installments. By running the shading simulation for each daylight hour for March 21 (vernal equinox), June 21 (summer solstice), September 21 (autumnal equinox), and December 21 (winter solstice), the hourly and seasonal variations of shading were assessed [8]. To investigate the illumination pattern over time and to exclude roof segments that are extremely shaded, ArcGIS hillshade capability was employed to generate a shaded relief based on the local

Suitable roof surface selection
Suitable locations for the placement of PV panels possess particular attributes [38]. Various criteria for selecting suitable roof planes based on their slope (tilt), aspect (azimuth), minimum amount of contiguous area, and received incident solar radiation were applied. Because Lethbridge is located in the northern hemisphere, all roof surfaces oriented towards northwest through northeast (292.5°-67.5°) were excluded [8,21]. The slope of roof surfaces should be less than 60°, and rooftops larger than 10 m 2 were considered to be suitable for placing PV panels [6,21]. The smallest practical residential solar system that can exhibit a tangible energy production is a 1.5-kW system [8,42]. Such systems require approximately 10 m 2 of area [8]. These criteria also exclude objects such as chimneys, dormers, and heating, ventilation, and air-conditioning (HVAC) apparatus located on roofs [43]. In addition, desirable roof surfaces should receive a minimum number of sunlight hours. In hillshade raster, the illumination status of each square meter of rooftops in each hour is illustrated by an integer value ranging from 0 to 255 [41]. At summer solstice, between 9 a.m. and 3 p.m., cells with more than 50% of the full brightness value were considered not shaded and others with lower brightness were filtered out [23]. By examining a sample of these cells, we found that they have more than 20% of the maximum illumination at winter solstice between 11 a.m. and 2 p.m. Investigation of the hillshade raster of different months showed that the aforementioned brightness threshold leads to reasonable results. This multi-criteria strategy eliminates unsuitable rooftop areas that lack appealing characteristics, but it is expected that non-optimally tilted and oriented roof planes will also become economically viable and attractive for placing PV panels in the future due to cost reductions and improved efficiency (Fig. 5) [24]. The file of roof segments with appropriate slope and aspect was created, and then run through a dissolve function which merges contiguous polygons with a specific common characteristic to produce continuous suitable areas. Next, the rooftop polygon file was converted to a raster file and reclassified. The reclassified hourly hillshade raster files were combined with the rooftop raster by applying Raster Calculator. Employing Python syntax, Raster Calculator accomplishes Map Algebra expressions consisting of various geoprocessing operators on multiple inputs to create a desirable raster [44]. To evaluate the actual practicable roof expanse and the PV installed (nameplate or nominal or rated) capacity, the projected roof areas were determined from building footprints and used to calculate the oblique area of each suitable roof segment.

Solar resource evaluation
The solar radiation estimation can be conducted using different solar models, ground-based meteorological stations, or meteorological satellite measurements [25]. Solar resource potential was assessed for the entire study area utilizing solar analyst. Solar analyst uses the DSM to produce global, direct, and diffuse insolation maps for a geographic area [23]. Solar analyst considers the atmospheric effects, latitude and elevation of the region, steepness (slope) and compass direction (aspect), daily and seasonal variation of the sun position, shadows, and topography while ignoring local weather and temperature [6,17]. Cloud cover has the largest influence on radiation attenuation in the atmosphere [27]. Solar analyst uses defined default values for the diffuse proportion of global radiation (k D ) and the ratio of the insolation received at the Earth's surface as direct radiation along the shortest atmospheric path at sea level to the insolation at the upper border of the atmosphere ( sl , transmittivity), which should be adjusted for local atmospheric conditions [11,20,45]. Accordingly, utilizing meteorological measured . Solar analyst algorithm utilizes sea-level transmissivity [48]. Hence, using Eq. 2, k T Z was adjusted for sea level, where Z represents elevation [46]: Next, zonal statistics was used to average the annual solar radiation values of all individual square meters inside each suitable rooftop segment to identify the roofs' received total solar radiation (Wh/m 2 ).
To assess the accuracy of simulated solar radiation, the results were compared with measured insolation obtained from ACSI for the aforementioned station. The mean bias error (MBE) and the mean absolute bias error (MABE) for comparing the monthly average observed and simulated insolation were calculated (Eq. 3) [49]: where x i , y i , n, and x are the ith measured value, the ith calculated value, the total number of insolation data, and the mean measured global radiation, respectively [49]. MBE illustrates the model's inclination towards radiation overestimation (positive value) or underestimation (negative value) [50]. The coefficient of determination (r 2 ) derived from regression analysis was used to interpret how accurately the actual data points are approximated by the model and to determine the extent to which the two data sets are in agreement [49]. For 2017 measured radiation, the analysis revealed that R 2 is 0.98, which means that the model predicts the insolation very well and there is a very good fit between the two data sets. In addition, the distribution of residuals did not exhibit a strong non-linear relationship of measured and modelled results. In addition, MBE of 5% and MABE of 12% were determined, which are in acceptable ranges (Fig. 6, Table 3). MBE and MABE are normalized by the average of the measured radiation. The monthly measured radiation ranges from 174.2 MJ/m 2 to 928.6 MJ/m 2 with an average equal to 477.8 MJ/m 2 .
Using default values of ArcGIS leads to 33% underestimation of radiation (Fig. 7, Table 4), while the employed method induces 5% overestimation considering 2017 measured data.
Using monthly averaged values of k D and sl obtained over the years 2010-2014 and considering the 2017 measured data, MBE of 1% and MABE of 9.21% were determined which are slightly better than the results of utilizing annual k D and sl (Table 5 and Fig. 8). However, for annual rooftop PV electricity potential estimation, it seems more practical and sufficiently accurate to use a one set of k D and sl . Hence, the annual values of k D = 0.429 and sl = 0.589 can be used for solar radiation calculation in the study area. Note also that solar analyst does not calculate the reflected component of radiation.
PV panels are usually installed with a desirable tilt angle on flat rooftops; hence, simulated global solar irradiance on horizontal surfaces was converted to insolation on oblique planes. Hourly measured global solar irradiance data obtained from a station in the study region (Lethbridge CDA) over 5 years were transferred to tilt planes utilizing transposition and separation models (Perez et al.'s model, and Erbs et al.'s model] considering the reflected component of radiation [47]. A slope factor was extracted from this transposition and was applied to ArcGIS-simulated global horizontal radiation. In this method, roof segments with slopes between 0° and 10° have been considered as flat. Based on Perez et al.'s model, the radiation on a tilted surface has three components including beam, diffuse, and ground reflected [47]. The reflected radiation is defined as I 1−cos 2 , where I, ρ, and β are the global radiation on a horizontal surface, the diffuse reflectance of the surroundings (albedo coefficient), and the tilt angle of the surface [47]. Solar radiation on south-facing panels increased by about 7% when the ground reflected component was taken into account, compared with the case when the ground reflected component was ignored (ρ was set to zero). Figure 9 shows different stages of LiDAR data processing for an example building with a complex roof surface.

Rooftop PV electricity production simulation
Electricity output evaluation of a PV system requires the estimation of resource availability, the physically available area, and the technology's performance [10]. The performance capacity of the flat rooftop PV systems is simulated by considering a packing factor which reflects the access space between installed panels required for maintenance purposes and to avoid shading from vicinity panels (row spacing) [16,51]. Usually, solar modules require an installation area about 2.5 times greater than their own surface area which means that about 40% of the suitable flat area is usually covered by solar panels [51]. The ratio of panel area to roof surface for inclined roofs which accounts for necessary module spacing for racking clamps was taken as 98% [8]. Technical characteristics and assumptions for PVperformance modeling are presented in Table 6.
Electricity output E is computed by means of the following equation [14,24]:  where M Irr is the average irradiation of each suitable rooftop, and A is the actual surface area of each suitable rooftop [24]. Shading simulation being accounted for each rooftop's M Irr by solar analyst. PR is the performance ratio of an implemented system and is defined as below [53]: resistance in the DC circuit, and DC current ripple and algorithm error caused by the switching converter which performs the maximum power point tracking function contribute in the system losses (Table 7) [54]. PR can be calculated according to Eq. 6 [54]. Furthermore, inverter efficiency ( inv ) usually ranges from 92 to 95% [55]. Multiplying the PR by the PV module efficiency, the overall system efficiency can be calculated [56]: Investigating 100 German PV systems' performance, Reich et al. found that, with the help of Germany's cool climate, the PR of some systems exceed 90% [57]. Given that southern Alberta's solar resources are 30% better than Germany and considering the latitude similarity between most German cities and southern Alberta, comparable PV system performances are anticipated [40,58]. In addition, McKenney et al. developed spatial models of global insolation and photovoltaic potential for Canada assuming a PR of 0.75 [40]. In addition, Pelland and Poissant evaluated the potential of building integrated photovoltaics (BIPV) in Canada considering a value of 0.75 for the PR of PV systems [58]. With technology advancements, significant improvement in PV systems' performance and module efficiency has occurred over past years; hence, a PR of 80% seems attainable in southern Alberta.  . 8 Observed versus modelled total monthly solar radiation with calculated monthly averaged k D and sl PR compares the actual annual AC energy yield and the expected DC output of an identical ideal and lossless PV system at the same location and can be used to quantify the overall system losses [53]. Actual energy yield, and hence PR, is significantly influenced by actual insolation, various losses including shading losses, module efficiency losses, and system losses [53]. Losses due to accumulation of snow and soil on panels' surface, module parameter mismatch,

Rooftop PV economic potential assessment
The economic attractiveness of the rooftop PV systems under current market conditions is investigated to determine whether a specific location is profitable for PV installation or not [24]. Most PV potential studies have not considered the economic feasibility of the PV installations, while homeowners and investors install PV facilities when these systems are economically viable [24]. Renewables are not currently cost competitive in all places; hence, it is important to determine the economically viable fraction of solar PV electricity generation potential.

PV dynamic investment assessment
Net present value (NPV) is utilized to perform an economic potential analysis and to assess the profitability of the solar rooftop projects (Eq. 7) [24]. NPV illustrates the difference between the current value of cash inflows and the present value of cash outflows: where t is the time of cash flow, T is the total time period or the system life time (25 years), r is the interest rate (2%), and Fig. 9 Various steps of data processing for an example building Table 6 PV system technical characteristics [8,14,24,52] Module efficiency (η) Performance ratio (PR) Inverter efficiency Module tilt angle for flat roofs 15% 80% 95% Area latitude angle = 49°R atio of panel area to suitable rooftop area System azimuth 0.4 (flat roofs) 0.98 (inclined roofs) South facing (flat roofs) Azimuth classification DClass CF t ($/year) is the net cash flow at time t (Eq. 8) [24,59]. i deg , p el , i el , c op, and i op are the annual degradation rate of generated electricity (0.25%/year), average electricity price, annual increase in generated electricity price, operating cost, and annual increase in operating cost, respectively (Eq. 8) [24]: In Alberta, from 2013 to 2017, the average increase in the consumer price index of all items such as food, shelter, and transportation was 1.56%; hence, i op was set to 1.56% [60]. In Lethbridge, the electricity price varies, and with higher electricity prices, solar PV systems become more feasible. While the average power price has been 7.3 ¢/kWh from 2012 to 2018, great changes in regulated electricity rates have been occurring historically [61]. Other fees that are charged on electricity bills may increase as well; for instance, average transmission rate in 2027 is forecasted to be about 42 $/ MWh which is 33% more than that in 2018 [60,62,63]. Solar energy generation can reduce the energy charge, the variable portion of distribution, and the transmission charge on electricity bills [63]. p el , i el , and c op are assumed to be 0.08 $/kWh, 3.5%, and 15 $/kW/year. There is a $36 million rebate program introduced by the government of Alberta for installing solar PV on residential and commercial buildings aiming to offset up to 30% of residential solar installation costs and up to 25% of solar installation costs for businesses and non-profits [64]. We assumed that 25% of the capital costs for all installations would be covered by this program.
Generated solar electricity E a (kWh/year) provides cash inflows, and in an economically feasible system, the related electricity revenue surpasses all upfront capital costs I 0 and maintenance and operational expenditures over the system's lifetime [24]. A PV system is economically attractive when its NPV is larger than zero [24]. In 2016, the residential grid-connected rooftop PV systems (up to 10 kW), commercial grid-connected rooftop PV systems (between 10 and 250 kW), and industrial grid-connected rooftop PV systems (above 250 kW) cost between 3 and 3.5 CAD$/W, 2.5-3 CAD$/W, and 2-2.5 CAD$/W, respectively [65]. Up to a 12.5% decline in PV system prices occurred from 2015 to 2016 [65]. Therefore, the upfront investments for 3 kW, 10 kW, and 250 kW PV system sizes have been assumed to be 2680 ($/kW), 2200 ($/kW), and 1760 ($/kW), respectively, applying a 12% reduction to the 2016 system prices [65]. Based on these system installment costs, the following relationship between system size P (kW) and investment I 0 ($/kW) was created to calculate the specific investment for other rooftop PV system sizes [24]: Utilizing Eq. 9, the initial investment cost for the midpoint of each system size class presented in Table 8 has been (8) (9) I 0 = 2877.2 × P −0.064 , calculated [24]. For systems larger than 50 kW and smaller than 5 kW, the midpoints were set to 60 kW and 3 kW.

Results and discussion
Applying the preceding method to the city of Lethbridge, 38,496 suitable rooftop segments with a total actual area of about 2,372,000 m 2 were identified which cover approximately 30% of the total roof area. The accuracy of the rooftop segment selection has been examined by analyzing and investigating several buildings' rooftop areas using the region's aerial image. The individual suitable segments belong mostly to residential (about 83%) and commercial (about 9%) buildings, providing about 48% and 20% of the suitable area, respectively ( Fig. 10 and Table 9). Most of the segments are flat or have a slope less than 20° (about 91% of them or 84% of the suitable area). Low slope and flat roofs allow us to install PV panels with the most effective tilt angle [23].
While industrial and commercial buildings account for just about 3% and 4% of the flat individual segments, they constitute the largest portion of the suitable flat area (m 2 ), about 22% and 18% of the available flat area, respectively, demonstrating the importance of these sectors' engagement in developing a successful solar PV industry in cities (Table 9). Furthermore, rooftop PV installation by homeowners can boost the urban solar electricity generation significantly, because residential buildings with roof pitch between 10° and 20° account for more than 25% of the total suitable roof area (about half of the segments), which is the highest share among various building types and slope classes (Table 9). Some building rooftops have more than one suitable segment, especially those with complex structure. After combining multiple suitable segments of individual buildings' rooftops, it was found that about 48% of the all buildings possess a suitable roof plane which could host PV systems (26,959 buildings). About 94% of these buildings are residential (Fig. 11).
The majority of the suitable rooftop planes of residential buildings (45% of them) have an area between 20 and 50 m 2 , while most of the commercial and industrial building's suitable rooftops fall between 500 and 1000 m 2 (Fig. 12). Around 13, 22, 49, and 32% of the commercial, industrial, education, and other buildings with suitable rooftops have a PV appropriate roof surface larger than 1000 m 2 and smaller than 22,000 m 2, respectively (Fig. 12). Suitable rooftops larger than 22,000 m 2 exist in education and commercial sectors (Fig. 12). Residential buildings with suitable rooftops mostly (about 90%) can accommodate PV systems with a size less than 10 kW, while suitable rooftops of commercial, industrial, education, and other building types demonstrate larger system capacity (Fig. 13). For instance, while just 0.09% of the suitable residential rooftops can host PV systems larger than 100 kW, around 45% of the education buildings with suitable rooftops can provide sufficient space for rooftop PV systems larger than 100 kW (Fig. 13).
The identified suitable surfaces provide enough area for installing approximately 218 MW p of rooftop PV systems, with residential buildings accounting for about half of the installed capacity. Based on the computed solar radiation, this installment could generate around 301 ± 29 GWh of solar electricity annually (Fig. 14). Most of this electricity would be produced by residential buildings' rooftop (about 57%) (Fig. 14). Industrial and commercial buildings are the second and third largest potential contributors to rooftop PV energy production (Fig. 14). Combining all uncertainties in various stages of the system yield evaluation, a total of 9.5% uncertainty in solar PV energy output calculation is estimated [66]. In 2015, in Lethbridge, electricity usage per  person (for all sectors) was 8.2 MWh [67]. This consumption is lower than provincial and national average electricity consumption and recently has not changed significantly from year to year [67]. Considering the city's population in 2016, the estimated rooftop PV electricity would enable the city to offset almost 38% of its annual electricity consumption. Capacity factor (CF), which shows the difference between the actual performance of a PV system and the energy output of an ideal and lossless PV system with alike rated capacity receiving constant irradiance (1000 W/m 2 ), is used to compare different power systems' potential in producing energy [53]. For instance, typical yearly capacity factors for hydropower plants, natural gas combined cycle plants, coal power plants, and wind plants are about 40, 44, 64, and 31%, respectively [53]. System energy yield is proportional to the capacity factor, where capacity factor is defined as [53] The average capacity factor of the distinguished rooftop systems is about 16 ± 1.5%, which is very promising for this urban region.
The NPV graphs for system size classes presented in Table 8 and various electricity output level are delineated in Fig. 15 to indicate annual electricity threshold for profitable systems.
Systems with an initial investment of 2640 $/kW need to generate about 994 kWh/kW/year to become economically viable (Fig. 15, Table 10). The initial cost of systems with 2200 $/kW investment will be compensated over their lifetime if they produce at least 854 kWh/kW/year (Fig. 15, Actual AC yield (kWh/year) DC peak power rating (kW) × 8760 (h/year) .  Table 10). Based on NPV graphs, about 96% of the identified suitable rooftop systems are profitable. Small systems occupying small areas are the most likely to fail to be economically justified. However, with more declined PV costs and improved efficiencies, small areas can achieve a higher packing factor, produce more energy, and become economically attractive.
Recently, the Climate Leadership Plan was introduced by the provincial government, with a goal of ending the use of coal for electricity production by 2030 and utilizing more renewable sources [68]. According to this plan, 5000 MW of new renewable energy capacity will be built by 2030, with renewables to supply 30% of the electricity demand which can lead to a significant growth in clean energy investment [68].

Conclusion
Rising climate change risks and global sustainability challenges along with the significant decreases in costs of renewables have led to recognition of solar electricity systems as major parts of mitigation strategies [5]. Providing end users with a self-managed, usable energy source with minimal operation and maintenance costs, rooftop PV is distinct among low-carbon technologies [9]. Here, an exhaustive rooftop PV potential assessment in an urban area has been  conducted to fill a gap in the available public information about the potential of such systems. Alberta's electricity generation sector currently relies heavily on fossil fuels, and coal in particular, producing approximately 17% of the province's annual GHG emissions in 2015 [68]. To achieve the goal of zero emissions from coal-based electricity production of the Alberta climate plan by 2030, some supporting programs such as "Residential and Commercial Solar Program" and "Alberta Municipal Solar Program" have been established to stimulate the PV system installation on buildings and municipal facilities [68]. In response to this great movement towards more renewable energy sources, this study tries to present an effective and scalable methodology for simulating the insolation resource and rooftop solar PV energy and economic potential in an urban area in Southern Alberta. LiDAR data and ArcGIS were employed to identify suitable rooftops for PV installation and solar analyst simulation engine was applied and adjusted based on data characterizing the local environment to accurately assess the region's insolation resource. Precise solar radiation resources assessment in a large area like an urban area is always challenging; hence, a new method was developed to calculate solar radiation using ArcGIS. In addition, the slope of PV modules installed on flat roofs and the reflected radiation component have been taken into account. Finally, utilizing market prices and dynamic investment methods, the economic potential of rooftop PV systems was investigated. Results illustrated that rooftop PV has a great potential to offset the city's energy demand. This paper tries to increase the awareness about the characteristics and economics of rooftop PV in the study area which is vital to more renewable energy deployment. The results of this research can assist investors in energy and building sectors and accelerate an informed transition towards a more sustainable future.