Urban vertical farming with a large wind power share and optimised electricity costs

large-scale variable renewable energies and flexibility measures. For the first part of the study, we modelled a vertical farm ’ s energy system with demand response control to maximize electricity cost savings. To evaluate the potential of demand response, the analysis is carried out for different crops (lettuce, wheat, and soybean), and different electricity price profiles. The result of demand response control can be a reduction of 5% to 30% in electricity consumption costs. Further, sensitivity analyses highlight the effect of electricity price variations and photoperiod on demand response outcomes. In the second part, the operation of an urban energy system (Helsinki, Finland) with vertical farms was analysed through two different scenarios. These scenarios represent the emission-free Helsinki energy system in 2050 with large-scale wind power implementation. As VFs can use electricity outside the peak demand hours, the inclusion of VF with the right energy system configuration can improve the power consumption within the system by up to 19%. Further, we show that connection to the exogenous power market is important to support vertical farming in the future energy systems. In this study, key points in the integration of VF in urban energy systems are highlighted, including the role of exogenous power markets, the potential for increasing local energy consumption with large wind power, and the importance of crop selection in reducing VF ’ s energy costs through demand response. In a city-level solution with a high wind power share, we thus recommend including a vertical farm side by strong sectoral coupling as part of the future design to maximise local consumption.

Producing food in an environmentally sustainable way for the growing human population is a challenge to the global food system.Vertical farm (VF) as a part of the solution portfolio is attracting interest since it uses less water, pesticides, and land which are scarce in many parts of the globe.Despite these positive factors, the energy demand for vertical farms is high, and farms often remain separate and excluded from cities where most of the population lives.City-level energy system solutions exist to empower energy efficiency and increase the share of variable renewable energy sources, but their potential has not yet been estimated for an urban energy system that includes large vertical farms.Accordingly, in this study, we simulate an urban energy system that practices vertical farming with large-scale variable renewable energies and flexibility measures.For the first part of the study, we modelled a vertical farm's energy system with demand response control to maximize electricity cost savings.To evaluate the potential of demand response, the analysis is carried out for different crops (lettuce, wheat, and soybean), and different electricity price profiles.The result of demand response control can be a reduction of 5% to 30% in electricity consumption costs.Further, sensitivity analyses highlight the effect of electricity price variations and photoperiod on demand response outcomes.In the second part, the operation of an urban energy system (Helsinki, Finland) with vertical farms was analysed through two different scenarios.These scenarios represent the emission-free Helsinki energy system in 2050 with large-scale wind power implementation.As VFs can use electricity outside the peak demand hours, the inclusion of VF with the right energy system configuration can improve the power consumption within the system by up to 19%.Further, we show that connection to the exogenous power market is important to support vertical farming in the future energy systems.In this study, key points in the integration of VF in urban energy systems are highlighted, including the role of exogenous power markets, the potential for increasing local energy consumption with large wind power, and the importance of crop selection in reducing VF's energy costs through demand response.In a city-level solution with a high wind power share, we thus recommend including a vertical farm side by strong sectoral coupling as part of the future design to maximise local consumption.

Introduction
The global food production sector has been facing threats from multiple directions: climate change is projected to decrease yields in many important areas [1] and at the same time the world is running out of arable land, water, fertilizers, and agricultural workforce [1][2].The dependence of cities on daily food imports makes them vulnerable to interruptions in the food supply chain [3][4].As a result of this heavy reliance, food security is under serious threat, especially during times of crisis when countries may limit exports.
One of the suggested solutions is vertical farming, where plants are grown indoors on multiple layers in controlled and optimized conditions.In this study, the definition used for a vertical farm (VF) is an airtight, opaque, well-insulated, warehouse-like structure, with optimized ventilation, light supplied by light emitting diodes (LEDs), and multiple growing layers on top of each other [5].It can outperform (per square meter) any other food cultivation method and is well shielded from adverse effects of climate change and extreme weather phenomena.For instance, it has been estimated that a 10-meter-tall VF producing wheat could produce up to 600 times more food per land area compared to traditional farming [6].Although the concept is very resource efficient in terms of water, land, and fertiliser usage, it requires a lot of initial investments and utilises a lot of electricity compared to field crop production.Currently, the only economically viable VF business models concentrate on the production of low-calorie plants such as lettuce and herbs [4][5][6].
The challenge of electricity consumption in VFs has been addressed in several studies focusing more on the scale of the electricity consumption [7][8], minimizing the power consumption by using new reflecting techniques for lighting systems [9], reducing the cooling power demand [10], and using renewable resources for the power supply [8].Implementing demand response (DR) programs is one of the promising solutions for reducing electricity costs [11][12][13][14].Due to highly developed supply/demand management and sensing technologies, DR control systems are the way forward for creating future smart energy systems.Residential buildings can save anywhere between 25% and 40% of their energy costs by using control strategies based on DR [15][16][17][18][19][20].In addition, DR is also potentially applicable to some industrial loads, examples of which include aluminium smelters and steel manufacturing plants that save 5% to 52% of production costs through DR [21][22].The number of studies discussing the application of DR in VF is, however, limited.The only study, to our best knowledge, assess how the DR can be used to and the effect of the irregular lighting period on crop growth and power consumption cost [23].Nonetheless, we believe that DR can be utilized as a solution for reducing electricity costs in VF as well.By accessing the hourly data of electricity price for the next 24 h, vertical farms could schedule lighting periods based on the cheapest hours.However, any attempt to reduce the lighting's electricity cost (such as optimising the light intensity or photoperiod) needs to sustain desired plant growth [23][24].
From a large-scale perspective and integration possibilities within in the cities, VF is often referred as a good and direct option to bring food production closer to the residents in cities [25].The current high-tech greenhouses are typically located hundreds to thousands of kilometres away from most urban centres due to access to cheaper land areas [4].On the other hand, VF in an urban setting can range from a small-scale, residential vertical garden to a large commercial scale.In urban VFs, transport routes can be shortened, and food waste and the space/land area needed for food production can be reduced [26].Still, VF power demand is high and adding it to a city-level energy system needs specific compatibility conditions to reach zero-emission production systems.In the existing literature, energy system transition through applying variable renewable energy (VRE) resources (e.g.wind and solar power) has been discussed with different aspects e.g.decarbonization [27][28][29], and increasing the share of VREs [30][31][32].Even though VRE resources are increasingly used, they face economic and technical challenges owing to their inherent intermittency and stochastic nature.It would thus be highly important to increase the system flexibility to counteract the negative effects of high share of VREs by e.g., converting power to heat (P2H) via heat pump (HP), demand-side management, or amplifying the energy storage [31,[33][34][35].VRE integration and energy system flexibility have previously been shown to be key solutions for decarbonizing urban energy systems [36][37][38][39].Still, challenges remain, such as the local consumption of wind power, reducing hourly mismatches between demand and production, and interacting optimally with the exogenous power market [40][41][42][43].
Despite the recognised potential of VFs as a part of the city-level energy system, most of the available studies remain conceptual [26,40,44] with no comprehensive energy analysis.Given the aboverecognised research gaps, we argue that detailed dynamic energy system analyses are needed to ensure that future energy systems meet the demand adequately.Here we bridge these research gaps with the main aim of assessing: (i) the potential of DR to reduce VF electricity costs in hourly-scale assessment, and (ii) examining how the inclusion of largescale VF and wind power in a heat-dominated urban energy system would impact on the energy system balance breakdowns.Accordingly, the methodology and results of this study link two aspects of VF, which are optimizing the demand of a VF (the demand side analysis) and using the VF's optimized demand as part of the city energy system (the production side analysis).As a case study, we examine Helsinki (Finland) with a heat-dominated energy system for the potential effect of VF on large-scale wind power integration.
Existing studies just apply the lumped version of an energy production system [40] and thus cannot address the important dynamics of it.We aim to provide a needed quantitative study to test and quantify the existing conceptual frameworks for producing food in cities [29,42].Our findings thus make the following potential implications: • The decision-makers and the investors recognize more realistic potential of urban food production.• The research outcomes can be applied to define the energy-related criteria for urban food production which determine compatibility with the existing and future energy infrastructure.

Methodology
Our proposed concept of integrating VF with urban energy systems is given in Fig. 1.The methodology is divided into two parts.In the first part, VF's electricity costs are optimized with DR-based control.The proposed control system adjusts VF's electrical consumption from its normal patterns in response to changes in the price of electricity, to avoid high electricity prices.In the second part, the cost-optimized VF (based on the first part) is linked with the urban energy system.The urban model is a sophisticated energy system model which describes the energy system of a city, in this case with data for Helsinki, Finland.The here-developed model utilises energy demand, energy prices, emissions costs, power plant information, and relevant restrictions to simulate an urban energy system.More details for each part are presented in Sections 2.1 and 2.2.The DR control and city-level energy model are developed using a linear programming approach written in MATLAB code [41].

Demand response
To avoid high electricity costs, DR can be used to modify electricity consumption from its regular routines in response to changes in electricity prices.We used DR control to adjust the VF's lighting system based on the price of electricity while maintaining crop growth requirements [45].For applying demand response, it is crucial to have the power market information.For this study, we got it from the Nord Pool which is the electricity market system among the Nordic and the Baltic countries.The variation in market spot price (crossing point for every hour purchasing and selling curves) can be affected by several factors such as the variation of intermittent renewable production variation and demand patterns [42].For calculating the hourly electricity price, the EUPHEMIA (Pan-European Hybrid Electricity Market Integration Algorithm) algorithm [43] matches energy demand and supply for all 24 h of the day at once.The main objective of the algorithm is to maximize the economic surplus/social welfare (consumer surplus + producer surplus + congestion rent across the regions) i.e., the total market value of the day-ahead auction expressed as a function of the consumer surplus, and the supplier surplus [43,46].At 12:00 CET, the process of the single dayahead calculation begins, and the results are published at 12:45 CET [46].The Nord Pool has divided the day's consumption into three parts."Off-peak 1 ′′ is defined as midnight to 08:00 in the morning."Peak" hours are from 08:00 to 20:00.The rest of the day, from 20:00 to midnight, is called "Off-peak 2 ′′ .
We can apply the market information one day ahead electricity price to schedule the VF's lighting to avoid electricity consumption (if possible) when the electricity price is high (DR concept).The aim of suggested lighting schedules is to match the power demand with optimal plant growth.Here, this task is handled by applying the linear programming (LP) technique.For optimizing the cost function, the electricity spot price and power demand are the only required input data.The optimal predictive DR function is hence defined as: Subject to Where C is daily lighting cost, p i is hourly electricity price, E i is hourly lighting power demand.H is the time horizon, E day is recommended daily lighting, Δt is time step and E max is maximum power for a lighting system.The first constraint in Equation ( 2) guarantees that daily power demand can be covered by hourly purchased electricity.The boundary condition for maximum hourly received power is defined in Equation ( 3).VF's operating expenses are dominated by the electricity cost (mainly for lighting) due to the extensive use of LED lights.The total electricity demand for VF includes three major demand parts: LED fixtures power (65%), air conditioners (20%), and dehumidifiers (10%) [5,45].There may also be some minor power demand for equipment (5%) including control and safety systems [45].Integrating plant physiological studies into the presented scenarios calls for further studies since fluctuating lighting conditions have been observed to affect Fig. 1.General structure of the concept.

City-level model
This study employs a techno-economic optimization of the urban energy system under various boundary conditions and limitations [37].The optimization model attempts to reduce the marginal costs of local energy production systems while introducing a variable source of renewable electricity.The applied optimization technique is mixedinteger linear programming (MILP).The cost function is: where t is time and i denotes the energy generation technologies employed.To consider the plans of the case study area (Helsinki, Finland) for clean energy transitions, a large wind farm is included in the power sector.Cost is determined by adding up production costs, balancing costs, and storage costs, as well as revenues from electricity sales to the Nordic power exchange.Power plant and balancing methods properties, along with energy demand and supply balance, are the main optimization constraints [37].Outcomes of optimization include energy production, energy sold to consumers, cost of operating the energy system, and profit.Analyses have been conducted for Helsinki (60 • N) a city with 6.7 TWh/yr annual heat demand and around 4.4 TWh/yr annual electrical demand [48].
Almost 90% of Helsinki's heating demands are met by district heating (DH) [49].For Helsinki's energy production, there are combined heat and power plants (CHP), boilers, and a large heat pump.In Helsinki, about 56% of the carbon dioxide emissions are caused by energy used for heating [50].As Helsinki is aiming to achieve carbon neutrality by 2035, it would be important to increase flexibility in both the production and consumption of energy to increase the share of renewable energy in the city's energy system [32,39].To balance peaks in production and consumption, for instance, a flexible demand is required.The energy system can be made more flexible using seasonal thermal energy storage facilities, two-way electric vehicle charging, and DR [31].The interaction with the exogenous power market is vital for the proposed energy system, as the mismatched power production must be exported.Since Helsinki has a predominantly heat-based energy system, CHP must produce heat and electricity simultaneously, which results in an inconsistency between power production and demand (lack of system flexibility).Increasing the energy system flexibility via power to heat is important for the Helsinki energy system transition since the current energy system has limited sectoral coupling (HP as 148 MW).P2H allows locally more efficient implementation of renewable energy.

Input data
We collected information and data to model the Helsinki energy system in 2050.Energy demand for 2050 is based on the strong electrification of vehicles.It means 300,000 cars will be electric which is a mix of electrical vehicles (EVs) and plug-in hybrid electric vehicles (PHEVs).We modified the power and heat demand profiles based on population increment in 2050.An increase in population from 643,000 to 822,000 in 2050 will result in a factor 1.28 increase in power and hot water consumption.We consider the power demand as 7.2 TWh/yr (power increment by 1.6 TWh/yr).The heat demand is 5.9 TWh/yr which is modified based on raising the ambient temperature, demand increase due to increasing population, and building energy efficiency measures according to EU policies (-1.5 TWh/yr) [51].

City-level scenarios
We considered two emission-free alternatives for Helsinki energy production in 2050: GAS-SYSTEM and MARKET-SYSTEM.We selected these two scenarios due to a series of studies where the most effective strategies for decarbonizing Helsinki's energy system have been shown to be by improving the flexibility of the system and incorporating wind power [29,32,38,[51][52].The applied zero emission strategies (see Table 1) operate both existing infrastructures, such as the exogenous electricity market and on-site infrastructures (power plants).These strategies are: GAS-SYSTEM: The system uses existing gas-based infrastructure (CHP and boilers).This scenario takes imports from the exogenous market and wind power.The system employs gas boilers, heat pumps, and biomass boilers for heating.The range of nominal size of the energy plants considered is shown in Table 1.
MARKET-SYSTEM: Exogenous power market is extensively used, with heat pumps and P2H, and bio-boilers are used mainly for peak heat demand and backup.The nominal outputs of the energy plants considered are shown in Table 1.
The VF (i.e.vertical farm) is integrated with decarbonized scenarios at different scales.We keep track of the energy production balance in two separate simulation series with different P2H levels.In the limited P2H version, the system includes an HP (current Helsinki capacity) of 127 MW and in the flexible version, the HP output is set as 1500 MW.The applied VF scale for urban systems is 100 ha, which translates into an additional power demand of 1.6 TWh.In each scenario, we simulate different energy systems with combinations of VFs and wind power as 750 MW (28% of annual power demand) and 1500 MW (58%).The supplementary material (Fig S1) contains information about applied data as input.

Crop selection for vertical farming (VF)
Wheat, soybean, and lettuce were chosen as model species for the scenario analysis in this study.Wheat is a major source of starch and energy and is the most important staple crop in temperate regions [53].World production is about 582.7 million tons from 213.8 million ha [54].Wheat has been used as a model species in a recent study by Asseng et al. [9] examining the production potential of wheat production in vertical farms.They find that a 10-layer vertical farm could produce up to 600 times the current world average annual wheat yield per area achieved with conventional farming (3.2 t/ha).In addition to wheat, soybean is another important crop worldwide grown for oil and protein.
Annual production is about 176.6 million tons over 75.5 million ha [54].Soybean yield varies according to water availability and fertilization.Yields vary between 1.5 and 2.5 tons/ha with no artificial irrigation and between 2.5 and 3.5 tons/ha under irrigation [54].Unlike wheat and soybean, lettuce cannot be considered to influence the food security, but it is a good source of minerals and fibre and it contains various bioactive compounds that can be considered beneficial to human health [55].Besides, it was also included in the analysis because it is basically the only protein-rich plant species, to which there are studies available regarding the electricity consumption and yield in VF.Here we need to explain two parameters briefly.The first one is photosynthetically active

Results
The results for applying DR control for a proposed VF with different products and electricity spot prices (different years) are presented in Section 3.1.We present the results for the city level (Section 3.2), by analysing two scenarios, each of which includes six simulation cases.We then compare the energy production balance for all cases before and after adding VF in the following terms: share of energy component, imported power, exported power, and wind power local consumption.

DR control analysis
Our analyses examined the impact of electricity spot price, lighting duration, and plant type (see section 2.3).Finland's electricity spot price is available one day ahead to guarantee a reasonable generation cost.We used the Nord Pool daily data for the years 2013 to 2021 to evaluate the explained DR-based control system for a VF which produces lettuce, wheat, and soybean.In each year the reference case was based on purchasing electricity from the power grid with an average daily price.Fig. 2 shows electricity cost reduction gained using DR with the electricity price coefficient of variation (CV) for different years.The information in Fig. 2 explains the sensitivity of the DR results for three different products to electricity patterns and electricity coefficient of variation.It is likely that the electricity price profile will be highly dynamic, and the fluctuation between different hours is dependent on a wide variety of factors, including market conditions, availability of resources, and even political factors.It means, the performance of DRbased control could be changed through different years.The highest cost saving (30% for soybean) is achieved in the year 2020 with a significantly higher electricity spot price variation (0.44 €/kW).We can observe that the control tool is more efficient with price signals containing higher CV (hourly electricity price).In contrast, it seems that the sensitivity to CV is not significant between the years 2017-2019 when the CV changed by about 10% but the electricity cost reduction stayed the same (17%).It is worth mentioning that the drop in the 2020-21 electricity price is due to Covid-19, the temporary shutdown of businesses, and the heavy rainfall in the Nordics.The hourly electricity price for 2013-2020 could be found in the supplementary material (Fig S2).
The electricity cost-saving potential for soybean with a shorter photoperiod of 12 h (please see Section 2.5) is higher.For lettuce and wheat, having both the photoperiod of 18 h, the electricity cost saving potential (percentage-wise) remains the same (e.g., 10% in 2015).Shorter photoperiod allows the control system to skip the peak periods and manage the lighting electricity demand within off peaks (see section 2.1).In addition, we examined different photoperiods of 12 h, 14 h, 16 h, and18h for lettuce, to assess the sensitivity of the DR in VF (Table 2).Limiting the photoperiod for instance from 16 h to 14 h resulted in 2%-6% cost savings (depending on the year within the study period of 2013-2021) for lighting.It is worth mentioning that from the presented results in Table 2 it could be estimated that with a 6 h improvement in the photoperiod, the potential power cost-saving could be almost doubled.However, as mentioned above, the effect of shorter/adapted photoperiod and alternating light intensity on plant growth and yield is outside the scope of this study.

City-Level analysis
In this section, two scenarios integrating a VF with the Helsinki energy system in 2050 are examined.Based on the energy balance breakdown (Fig. 3), we can track how the additional electricity demand from growing food in VF would affect energy production in Helsinki.The simulation cases are marked as e.g., "GAS-VF100W750" which refers to a gas-based energy system using 100 ha of VF and 750 MW of wind.The applied scale of VF was for all simulation cases 100 ha (1.6 Fig. 2. Electricity cost reduction against the annual electricity price coefficient of variation (ratio of the standard deviation to the mean).The coefficient of variation is suitable for comparing data sets with different units or widely different means.
In scenario "GAS-SYSTEM", VF is integrated with a version of the Helsinki energy system utilising the existing gas CHP with climateneutral biogas or bio-SNG.The system employs more intensively the Nord Pool electricity market (exogenous power market), heat pumps for heating, and biomass boilers (typically for peak demand).The energy system ("GAS-VF0W0") has no exported power due to almost zero mismatch between production and demand owing to sectoral coupling and reducing the size of CHPs.However, in "GAS-VF0W0" the city is dependent largely (76% of annual power demand) on power from the exogenous power market.Wind power of 750 MW ("GAS-VF0W750") and 1500 MW ("GAS-VF0W1500") reduces the gas-CHP share by 18% and 33%, respectively.By utilising wind power, the energy system will be less dependent on exogenous power markets.For example, there is a 46% reduction in the annual imported power when the system has 1500 MW of wind power.For both applied wind power scales, a part of power production needs to be exported to the exogenous power market e.g.1.2 TWh/yr for case "GAS-VF0W1500".
We examined the potential of integrated VF to the city power system to reduce the power export and increased power production consumption locally in the next series of simulations ("GAS-VF100W750" and "GAS-VF100W1500").When introducing 100 ha VF ("GAS-VF100W0"), the system needs to import power 32% more in comparison with the case "GAS-VF0W0".Despite the increment in imported power, for case "GAS-VF100W750", 100 ha VF cuts the exported power (75% less) in contrast with the case "GAS-VF0W750"."GAS-VF100W1500" system exports 0.35 TWh/yr less in comparison with a system "GAS-VF0W1500".Therefore, it could be concluded that VF improves the consumption of locally produced power (CHP and wind power) within the system while adding value to the food production system.CHP and HP production shares are the main differences across simulated cases in the heating sector.The share of the gas-CHP in the heating sector is affected by of applied wind power since the system has heat generation * The reference is a system which buys electricity with daily average price.
Fig. 3. Power and heat production breakdown for "GAS-SYSTEM" and "MARKET-SYSTEM" scenarios with VF's area (100 ha) and wind power scales (750 MW and 1500 MW).
potential by sectoral coupling (HP).For instance, in the system "GAS-VF0W1500", the share of the CHP in the heating sector is 37% lower in comparison with "GAS-VF0W0".
Under the "MARKET-SYSTEM" scenario, the VF is linked to a version of the Helsinki energy system relying completely on exogenous power markets.Heating is produced by a large heat pump system (1500 MW) and biomass boilers.Because the "MARKET-SYSTEM" does not use any CHP, it has the best matching between demand and production ("MARKET-VF0W0" and "MARKET-VF0W750").The simulation starts with the case where there is no VF and 100% of power demand is supported by exogenous power markets ("MARKET-VF0W0").
Wind power as 750 MW cuts the imported power by 27% ("MARKET-VF0W750").With a larger wind power scale of 1500 MW ("MARKET-VF0W1500"), the dependence of the energy system on external energy markets is reduced (45% less imported power) in comparison with "MARKET-VF0W0".It should be noted that under the "MARKET-SYS-TEM" scenario, with a minimum mismatch between production and demand, still 0.8 TWh/yr of the total annual power production is required to be exported (case "MARKET-VF0W1500").In case of "MARKET-VF100W1500" scenario, with even 1.3 TWh/yr higher imported power, exports only 0.17 TWh/yr, 80% less than the "MARKET-VF0W1500" system.It means an improvement in consumption of power production including wind power (19%), while the system produces food.The heating sector does not change its heat generation share due to the absence of CHP.The Heating sector in the "MARKET-SYSTEM" scenario causes a marginal mismatching between production and demand, due to the function of the biomass boiler.The main aspect of the "MARKET-SYSTEM" scenario is increasing the wind power local consumption since the system is connected to a flexible source (exogenous power market) and VF as a flexible demand source.
We mentioned above that Helsinki (the studied case) includes the heat-dominated energy system.Here, we explore the effect of the sectoral coupling with urban farming on increasing local power consumption.Thus, we run the city model with a smaller HP (127 MW), which means limited flexibility measure (Fig. 4).
Simulations demonstrate that energy system requirements affect energy resource sharing.In the P2H-limited version of the "GAS-SYS-TEM", the system increases mainly the share of CHP's production.For example, in the case of "GAS-VF0W0", CHP's production is 55% while the boilers (31%) and HP (13%) produce the rest of the annual heat production.In comparison with the same case with the stronger linkage of the power and heating sector (case "GAS-VF0W0" with HP 1500 MW in Fig. 3), the dependency on the exogenous market gets down to only 43% of the annual power production.Wind power would reduce the share of the exogenous market to 22% of annual production ("GAS-VF0W750") and just 14% of annual production in the simulated case ("GAS-VF0W1500").
The heat-dominated energy system with poor sectoral coupling will suffer from matching power production when a large scale of wind power is included in power production, even with the implementation of urban vertical farming.Despite the lower imported power, the connection with the exogenous market is still important since, with limited P2H, the system exports more to the exogenous market e.g., export is 0.7 TWh/yr higher with wind power as 1500 MW.A city's exported power would include mainly the cleanest, which in our case would be wind energy.With including vertical farming, the major difference will Fig. 4. Power and heat production breakdown for "GAS-SYSTEM" and "MARKET-SYSTEM" scenarios with limited power to heat (127 MW), VF's area (100 ha) and wind power scales (750 MW and 1500 MW).
V. Arabzadeh et al. appear in the share of the exogenous market share.A similar trend has been observed in the flexible version of the "GAS-SYSTEM" in Fig. 3.
For the "MARKET-SYSTEM", which is very flexible in the power sector, a limited P2H can cause a reduction in the local system's power consumption with a large wind power share.A 0.4 TWh/yr increase in the annual exported power would be observed for the simulated case "MARKET-VF0W1500" in comparison with a similar system in Fig. 3.This reflects the effect of the weaker connection between the power and heating sectors.It is important to notice that by adding the VF still improves the local power consumption and cuts the power export, e.g.82% less exported power in the case of "MARKET-VF100W1500".From the power system efficiency point of view, the best performing system would need both (i) more flexible power demand (VF's power demand) and (ii) strong sectoral coupling (larger HP).Here, in the simulated heatdominated energy system, the role of the sectoral coupling is pronounced stronger due to larger annual demand and more opportunity to match heat from renewables with heat demand.In the heating sector, with limited sectoral coupling, the share of the CHP in "GAS-SYSTEM" and bio boiler in "MARKET-SYSTEM" are becoming significant (see Fig. 4).For the "MARKET-SYSTEM", the share of the bio-boilers remains 82% of annual heat production, while due to operating the CHPs in the "GAS-SYSTEM", the heat production shares varying based on a change in the power production share.

Discussion
Indoor vertical farming is very promising way of producing food in terms of efficiency, resiliency, and sustainability.However, the mass adaptation of vertical farming would require to find ways to minimize both the VF's direct and system-related energy costs.Through the analysis of two-level energy systems, we quantified the VF's electricity cost saving via a DR (i.e. demand response) based control and the effect of the VF on future emission-free energy systems.DR-Based Control For VF.

Demand response in vertical farm
Although the DR has been studied for multiple fields, for example a variety of building services and industries [15,[19][20][21][22]28,[60][61][62][63][64][65], the implementation of DR in VF is not well studied quantitatively.The power demand pattern for VF is unique compared to, for example industry or building services, requiring separate analyses and simulations for evaluating DR's potential.Electricity consumption periods can be shifted more easily in VF than in buildings.To understand the potential of DR in VF, we conducted a set of simulations for a VF with DR-based control for electricity consumption.As the main finding, we highlighted the importance of familiarity with plant science concepts (e.g.plant photoperiod requirements) as well as the knowledge of energy systems to define a successful strategy to improve VF's energy cost.The performance of DR-based control in VF was identified to be dependent on electricity price dynamics and the type of crop.Changes in price values and variation generally reflect the availability of generation sources, fuel costs, or changes in demand patterns (e.g., changes in demand in a recent pandemic).Access to electricity price history data and knowledge about power market conditions will be beneficial in estimating the potential electricity cost savings with DR in VF.When the variance of the hourly electricity price is higher (e.g., 2020-2022), using DR control in a VF is found out to be more beneficial.Our finding for the effectiveness of application DR (power cost saving) in vertical farming is aligned with existing studies [23] VF's crop type and photoperiod requirements affect the DR performance significantly.Adapted photoperiod and alternating light intensity led to higher power cost savings by DR since the control system finds more opportunities to skip peak energy price periods.However, as discussed above, there is a demand for more investigations (mainly experimental work) concerning crop performance against changing photoperiod and alternating light intensity.This constraint will affect the cost-saving performance of the DR-based control.

Urban vertical farming
Energy-related challenges associated with vertical farming on an urban scale are rarely discussed in existing studies.In the future, cities would most probably include large renewable energy production [32,38,51], and for different reasons, such as network limitation or a lack of the system flexibility, they may export a part of it.At the same time, VFs need renewable energy production to become sustainable technology in the future.Planning for new wind farms would be challenging due to the critical processes for placement, connecting to the power networks, and environmental effects [66].So urban farming may create opportunities to use renewable energy more efficiently and help the VF's technology to become sustainable.Defining strategies to integrate VF into urban areas requires filling this gap.City-level energy system simulations are abundant in the literature [38,[67][68][69][70][71].For Nordic cities, there are studies examining the influence of energy demand on emission-free alternatives for urban energy systems, such as improvement in heat demand or an increase in power demand due to electric vehicles or city growth [37][38]49,51,[72][73][74].The literature identifies a major challenge in matching excess power production within urban energy systems with high wind power share [38].Adding the VF would increase wind power utilization locally while simultaneously increasing local food supply in cities.The integration of VF resulted in a significant reduction of exported power while increasing the match with larger wind power productions.It is important to consider the energy system topology when integrating VF with urban energy systems.In urban energy systems with VF, higher energy system flexibility results in less mismatch between power production and demand.The similar finding has been reported for energy systems which just practiced flexibility via power to heat [32,38,51].We found that a combination of an exogenous power market and flexible VF's power demand enhances local wind power consumption and lowers exported power in our simulations.("MARKET-SYSTEM").
We simulated the city-scale scenarios by coupling power, heat, and food sectors.The studied case, the Helsinki energy system, is a heatdominated system that in its current state is mainly dependent on fossil-fuel-based heat production.Our study revealed the importance of a dynamic energy system analysis, as mentioned in previous studies [29,37].A detailed energy system modelling (like simulation in the current study) is essential for including the large-scale renewable power due to intermittent pattern in production.The limitations of an energy system in using the renewable power generation would be addressed better with hourly simulation in comparison with simulations where plants are handled lumped and just based on annual production-demand balance [38,75].In this study we used a decentralised energy system modelling with analysis hourly production and demand to address this issue.The other valuable observation is the fact that maximising the share of the renewables needs both VF and sectoral coupling to help the energy system transition process.However, in the studied case the effect of the sectoral coupling appears larger and more significant than VF in increasing the share of the wind power, but still, VF would increase urban system resiliency (food security).Here, we have not searched for the system's optimal configuration [38,51].The current analysis could be extended to define optimal VF arrangements, optimal energy system configurations with using proper optimisation-simulation techniques in future studies.
Here we developed a rather simple model based on energy system operation cost to gain a better understanding of integrating VF to both power and heating sectors into cities.Although hourly-based detailed energy system modelling, as done here, provides higher accuracy and reliability in results, it has limitations in terms of scalability and generalisation.Consequently, perhaps one of the major limitations concerning us are the energy system configuration and preferences.
V. Arabzadeh et al.Specifically, the climate condition as well as the energy demand preference (e.g., heat in this study) can be viewed as limitations.The preference of a system using the available energy resources may be affected by location, climate conditions, and city development plans.For example, in a heat-dominated energy system in the Nordic climate, there are different assumptions for future heat demand based on a wide range of variables such as consumer behaviour or building energy efficiency improvement.Therefore, a comprehensive reliable energy system analysis for such a system including food production needs several scenario-based simulations in which each scenario would contain several sub-simulations due to different assumptions e.g.fuel cost or emission policies (CO 2 pricing).The feasibility of an energy system for a city with food production needs thus a more exhaustive cost function for which more terms are needed in defining system simulation core and/or even use multi-level system optimisation.

Conclusions
Urban vertical farming brings food production into the heart of cities, cuts transportation cost and results in a more secure food supply chain.In this study we quantified the reduction of electricity costs with DR (i.e. demand response) control and effect of the integration of VF into the urban energy system.Our key conclusions are as follows: • DR can reduce VF electricity costs by 5-30%, depending on the electricity price variability within a day.The higher the variability, the higher are reductions as VF's lighting schedules can be adjusted to avoid "peak" hours.We also found that the savings were greater for plants with shorter photoperiod as the flexibility of lighting is then greater.• We found that the integration of VFs in city electricity system, along with increasing the share of on-site power production including large wind production and a strong link to the exogenous power market can decrease the exported power by up to 80%.For every 100 ha of VFs, local power consumption can increase by 20%.

Table 1
[10,56] output of energy plants for applied scenarios with limited flexibility version P2H (HP 127 MW) and flexible version (HP = 1500 MW)flexible.(PAR)which is the range of wavelengths between 400 and 700 nm that plants can use for photosynthesis.Another one is photosynthetic photon flux density (PPFD) which is the amount of photosynthetically active photons (400-700 nm) hitting a surface per unit area per unit time and how efficiently these lights are performing.Total energy use has been estimated to vary from 185 to 770 (kWh/kg dry ) for lettuce, depending on the PAR efficiency (i.e., moles of photons per joule of electrical power) and geographical location[10,56]. radiation

Table 2
Effect of the period of daily lightning's hours on VF's annual electricity cost (%) between 2013 and 2021 for lettuce*.