Baha Hasan
email: bahasan@kth.se

Jan Wikander

Features Extraction from CAD as a Basis for Assembly Process Planning

Keywords: Features, Form Features, Assembly Process Planning, CAD, SolidWorks, API

This paper describes a novel approach to recognize product features, which are significant for Assembly Process Planning (APP). The work presented in this paper is a part of a larger effort to develop methods and tools for a more automated and bidirectional link between product CAD and the different processes and resources applied in APP. APP is the phase, in which the required assembly processes and resources are determined in order to convert a product to fully assembled or semi-assembled product. Product features will be extracted from the SolidWorks (SW) CAD file using SW-Application Programming Interface (API). SW-API is an interface that allows the exchange of data between CAD design and different software applications. The work includes automatic recognition for assembly knowledge, geometry and non-geometry knowledge (dimensions, geometrical tolerances, and kinematic constraints) in assembly design, which are relevant for assembly process and resources. Recognition algorithms have been developed by using visual basic. Net (VB.net). A case-study example is included for illustration of the proposed approach.

Introduction

Assembly is one of the most complex tasks in manufacturing environment; it consumes a considerable percentage of total manufacturing and labor costs [START_REF] Cho | Mechanical assembly. The mechanical engineering handbook Series[END_REF]. Assembly Process Planning (APP) is an important and decisive link phase between assembly design and manufacturing. The ultimate final aim of APP is to determine the required assembly processes and resources to convert an assembly design into an assembled or semi-assembled product [START_REF] Wang | Assembly process planning and its future in collaborative manufacturing: a review[END_REF]. The integration of product design and assembly process planning (APP) thus has a strong impact on product realization, as also discussed by Du and Zha [START_REF] Du | A PDES/STEP-based model and system for concurrent integrated design and assembly planning[END_REF].

Product features have been used by several researchers to improve the efficiency of process planning both in manufacturing and assembly [START_REF] Van Holland | Assembly features in modelling and planning[END_REF]- [START_REF] Michael | Planning and scheduling in manufacturing and Services[END_REF]. Features are used when designing a product (Feature-based design), while in process planning features are to be extracted from the product model. The extracted features represent a natural link between product design and process planning domains and provide a valuable mechanism for information exchange [START_REF] Dartigues | CAD/CAPP Integration using Feature Ontology[END_REF].The work presented in this paper is a part of a larger effort to develop methods and tools for a more automated and bidirectional link between product CAD and the different processes and resources applied in APP. This work is based, in its first stage, on extracting assembly knowledge from the CAD file by using feature recognition techniques. The second stage is to model the extracted assembly knowledge to support integration with APP. The third and last stage is to share assembly knowledge via a layered ontology structure, which will serve as a communication mean between assembly design and APP. Figure 1 illustrates the overall integration framework between product design assembly and APP.

Fig. 1 Proposed framework for integrating product features into APP.

In Fig. 1, the three stages of recognition, modelling, and integration are illustrated. In the first stage, geometrical and assembly knowledge are recognized from SolidWorks (SW) -CAD models. An intermediate modelling stage follows where the recognized knowledge is modelled in assembly design semantic model. Assembly design semantic model is composed from several sub-models to separate the recognized geometry knowledge from assembly knowledge.

Assembly knowledge and geometrical knowledge are modelled in a form feature model and a mating surface model, respectively, while part-assembly relations are modelled in structural model. The last stage will be to structure and store the recognized assembly and geometric semantic knowledge according to a well-defined ontology in order to facilitate sharing and integrating this knowledge with the APP. More details about the proposed integration framework are presented in our previous publications [START_REF] Hasan | Product Feature Modelling for Integrating Product Design and Assembly Process Planning[END_REF]- [START_REF] Hasan | Ontological Approach to Share Product Design Semantics for an Assembly[END_REF]. This paper is mainly concerned about the first stage of the integration framework; the recognition of product features from SW -CAD software by using Application Programmable Interface (API).

Product features are classified into low-level features (form features), which are basic geometrical and topological entities such as holes, slots, notches etc. and highlevel features, which are characterized by both a form and a specific application (machining, assembly, tolerance etc.). For example "machining features" can be defined as geometrical and topological entities significant for manufacturing function. The conversion of form features (low-level) into application-specific (high-level) features in terms of functionality, manufacturing and assembly is the overall aim of feature-based modelling [START_REF] Stefano | An approach for feature semantics recognition in geometric models[END_REF].

In this context, an assembly feature could be realized as an association between two form features from different parts [START_REF] Shah | Assembly modeling as an extension of feature-based design[END_REF]. Assembly features have been used either in assembly design or assembly process planning. Many definitions are reported in published literature for assembly features either from assembly design or APP perspectives. From assembly design perspective assembly features are "Mating pairs of form features with parameters and compatibility constraints as part of each feature definition'' [START_REF] Shah | Assembly Modelling as an Extension of Feature-Based Design[END_REF]. Mating features or conditions are defined as "relationships that involve contact between parts, as well as relationships in which two parts do not have contact (e.g. clearance conditions!)'' [START_REF] Mullins | Automatic Identification of Geometric Constraints in Mechanical Assemblies[END_REF].

From an assembly planning perspective, assembly features have been defined as: ''features with significance for assembly processes'' [START_REF] Van Holland | Assembly features in modelling and planning[END_REF]. The same author introduced more specific assembly features, from a process perspective: Connection features "such as final position, insertion path/point, tolerances" and handling features "characteristics that give the locations on an assembly component that can be safely handled by a gripper during assembly!" .Also more specialized assembly features have been introduced such as joining features. A joining feature has been proposed [START_REF] Kim | Assembly operation tools for. Assembly operation tools for e product design and realization[END_REF] to represent assembly/joining relations, and it includes joining entities, joining methods, constraints and groove shapes. From a geometrical point of view, feature representation is classified into two types: surface-based or volume-based. Surface features are based on topological entities such as face, edges and vertices with functional meanings on the part boundary; this representation is known as boundary representation (B-rep). Volumetric features are based on three-dimensional geometrical primitives such as sphere and cylinder. This representation is known as constructive solid geometry (CSG). Based on this classification, feature recognition (FR) approaches can be classified as well into B-rep based approaches and CSG. From an engineering point of view FR systems are divided into two methods; external and internal methods [START_REF] Miao | CAD-CAM integration using machining features[END_REF].

In internal methods the API of the CAD software is used in order to extract topological, geometrical and assembly information relating to a part or an assembly. While in external methods, a CAD model file is exported in a neutral data format (e.g. STEP, IGES, ACIS). The exported file is then translated using compilers (interface programs) to be compatible for a specific application (e.g. commercial CAM system). Both methods have been used by researchers for FR. In our approach to extract product features in mechanical assembly an internal B-rep CAD recognition approach is proposed. The overall approach is illustrated in Fig. 2. In the Fig. 2, four-stage approach of recognition is proposed. In the first stage feature-based modelling; form features from each part in the assembly are recognized, where each part is composed at least from single form feature. The B-rep modelling is the next stage, in which each form features is decomposed into its basic geometrical and topological entities (faces, surfaces, edges, etc.).

Features Extraction from CAD as a Basis for Assembly Process Planning 149

Assembly features modelling is the following stage, in which assembly features (handling for pick and place parts and joining for joining those parts together) are specified based on mating faces or surfaces (surfaces that are involved in joining processes) and non-mating faces or surfaces (surfaces that are not involved in joining process). Further investigation about the geometry and non-geometry (tolerance and positional parameters) for the candidate surfaces included in the assembly processes will take place in the next and final modelling and recognition stage applicationspecific feature modelling. Based on these details more specific assembly features are determined: gripping, feeding and fixturing will be derived from handling features, and different joining features as screwing, fitting, etc. are derived from joining features, which will be known as fitting features, screwing features and so on. Those features will give a valuable aid in determining the required handling and joining processes needed to assemble a product. The derivation and the extraction of those application-specific features will be our final ultimate aim in this paper by using SW-API programming techniques. The organization of this paper is as follows: Section 2 illustrates the relation between the research and the smart systems. Section 3 presents the programming details of the proposed algorithms for features recognition with a case-study example. Section 4 draws a conclusion

Relating Research to Smart Systems

A smart manufacturing environment is an automated or semi-automated system, in which information technology is extensively utilized in design, planning and management. The automation of CAD design by using programming algorithms and the facilitating of knowledge transfer inside the manufacturing environment by using ontologies as in the proposed framework shown in Figure 1 will provide a valuable aid in creating automated and smart manufacturing environment.

SW-API Recognition Approach

In this paper, SW-CAD software is used to construct the automatic feature recognition system and to construct the case-study example. SW-API is an interface that allows exchange of data between CAD design and different software applications. SW-API consists of function calls which are used to access the data structures and their contents from SolidWorks software. The SW-API supports several programming languages such as VBA (Visual Basic for Application). The API is used by writing function calls, which provide linkage to the required subroutine for execution. The topology and geometric data of the CAD assembly in SW is accessed by the proposed algorithm through the API function calls. Microsoft VBA is embedded inside SW CAD software, which enables the recognition process by calling SW-functions from the code written in VBA. Everything in SW is considered an object to the SW-API, those objects are not actually the thing itself, but "interfaces" to those objects. There are three main SW document types: Parts, Drawings and Assemblies. Each document type has its own object (PartDoc, DrawingDoc and AssemblyDoc) with its own set of related objects and functions. For example the AssemblyDoc::Mate2 object exists in AssemblyDoc document because adding and extracting mate relation is specific to AssemblyDoc. Beside the specific objects, which are belonging to a specific document, general objects are available on ModelDoc2 such as Feature, FeatureManager, Configuration, SelectManager and Sketch. Those general objects could be accessed by different documents in the SW-API. More details about fundamentals of SW-API are presented in [START_REF]SolidWorks Help[END_REF]. The case-study model is a threebutton panel assembly; the exploded view of the case study assembly is shown in Fig. 3 with its seven parts (the base part, the three buttons, the cover and the screws) and the candidate surfaces, which are significant for the assembly processes. In Fig. 3 for each part some of its surfaces are indicated by labeling the surface with its type (Pla is referred to planner surface and Cyl is referred to circular surface), its part and its number. To make the case-study easier to follow, only the surfaces correspond to one button (red button) and one screw are indicated in the Figure below. For each part in the case-study assembly, the candidate surfaces will be classified into mating surfaces (surfaces involved in mating relations) and handling surfaces (surfaces that will be used in gripping process. Fig. 4 illustrates a surface model for the case-study assembly with all the required knowledge needs to be extracted from CAD model in order to facilitate APP.

Fig. 3 Exploded view of the three-button assembly with the indicated surfaces

In Fig. 4 all the candidate surfaces for each part of the case-study model is classified into Handling and mating surfaces. Handling surfaces will be chosen according to a criterion mainly depends on geometrical dimension and tolerance (GD&T) information and the distance between the corresponding handling surfaces in order to determine the gripping range of the gripper. The mating surfaces are connected with each other via red lines with M symbol indicates "mates" between the surfaces. The GD & T information will be extracted as well for the mating surfaces to give information about the fitting joining processes that will take place between corresponding mating surfaces. The (GD&T) information will aid in determining fit relations between mating surfaces (surfaces Cyl 2,2 (shaft) and Cyl 1,7 (hole)). Three types of fit relations are mentioned in literature, clearance fit between hole and shaft, which is identified if the minimum allowable dimension of a hole is larger than the maximum allowable dimension of a shaft.

Transition fit, which is identified if the minimum allowable dimension of a hole is smaller than the maximum allowable dimension of a shaft, and the maximum allowable dimension of a hole is larger than the minimum allowable dimension of a shaft. The last type of fit is interference fit, which is identified if the maximum allowable dimension of a hole is smaller than the minimum allowable dimension of a shaft. Identifying fit relations will aid in determining the type of fit process whether its press fitting (for interference fit) or shrink fitting (for other fit types). Another important information that is indicated in Fig. 3 and could be identified from mating surfaces is the hole pattern. A hole pattern has several parameters such as hole diameter, hole type, back pitch ( the distance between the centers of successive holes) and marginal pitch (the distance between hole-center and surface's edge) that could help to determine a specific joining process. One of these attributes is the hole type. Identification of a hole as threated determines screwing as a joining process to be selected in APP. A high-level flowchart of the recognition algorithm is shown in Fig. 5. This high level description consists of nine steps. The first step is to read the CAD assembly file from SolidWorks software. The second step is to extract all the surfaces from the assembly by traversing the feature manager tree using the SW-API functions and methods shown beside the corresponding block in the Fig. 5. The third step is to extract the corresponding dimensions and tolerances for all the surfaces in the assembly. Each of the methods and objects indicated beside the related block has access to a specific type of dimension or geometrical tolerance. Dimensions and tolerances have to be assigned to the SW-CAD part document by using DimXpert manger in order to be extracted by this method. The fourth step is to get Persistent IDs for all the surfaces extracted in the second step.

Persistent IDs (PID) are a unique identifier for any object and they will be used to identify surfaces in the assembly. The fifth step is to extract the mating surfaces by locating the mate folder in the feature manager tree using feature traversal. This can be achieved by using IFeature::GetSpecificFeature2 to get IMate2, then getting information about the mates, like the type (IMate2::Type) and the corresponding reference mating entities. This can be done by using IMate2::MateEntity, which will give a pointer to IMateEntity2, then use IMateEntity2::Reference to get the pointer to the actual reference entity. The sixth step is to get PID for each mate surface extracted in the previous step.

The seventh step is to find the non-mating surfaces by subtract the PID of all surfaces from the PID of the mate surfaces, the result will be the PID for the nonmating surfaces. The eighth step will be to investigate the non-mating surfaces to determine the handling surfaces; this will be achieved by determining the handling criteria. The handling criteria will be to find the non-adjacent parallel surfaces, which are suitable for gripping. Additional parameters in these criteria will be a threshold for the surface profile tolerance for those surfaces. Surfaces with surface profile within a specified range will be chosen for gripping and will be indicated as gripping surfaces.

The ninth and the last step will be the joining criteria for the mating surfaces. The joining criteria will be based mainly on the dimensions of the cylindrical mating surfaces to determine the type of fitting joining processes and on the type of the mating surface if it is threaded or not threaded to distinguish between fitting processes and screwing processes. The final ultimate aim of these criteria is to determine the screwing surfaces that will be used in screwing assembly processes and fitting surfaces that will be used in different fitting assembly processes.

Conclusion

In this paper, an attempt to create internal-B-rep recognition system to support APP is proposed. Future work includes updating the algorithm in Handling and joining criteria to support more handling and joining processes.

Fig. 2

 2 Fig.2 Proposed methodology for extracting product features in an assembly.

Fig. 4

 4 Fig. 4 Surface model for the case-study assembly.

Fig. 5

 5 Fig. 5 High level description of the recognition algorithm.


João A R Esteves
email: joao.esteves@rd.nester.com

Hugo M I Pousinho

Victor M F Mendes

Stochastic Optimal Operation of Concentrating Solar Power Plants based on Conditional Value-at-Risk

Keywords: Concentrating power plant, conditional value-at-risk, day-ahead market, stochastic optimization

This paper presents a stochastic programming approach, using a risk measure defined by conditional value-at-risk, for trading solar energy in a market environment under uncertainty. Uncertainties on electricity price and solar irradiation are considered through a set of scenarios computed by simulation and scenario-reduction. The short-term operation problem of a concentrating solar power plant is formulated as a mixed-integer linear program, which allows modelling the discrete status of the plant. To improve the operational productivity of the plant during the non-insulation periods, energy storage systems are considered. The goal is to obtain the optimal operation planning that maximizes the total expected profits while evaluating trading risks. For risk evaluation, the conditional value-at-risk is used to maximize the expected profits of the least profitable scenarios. A case study is used to illustrate the usefulness and the proficiency of the proposed approach.

Introduction

Renewable energy grid integration increased in the E.U. to fulfil the Energy-2020 initiative. The global warming threat is a concern around the world and many policies and agreements are being created to mitigate it [START_REF]Energy 2020 -A strategy for competitive, sustainable and secure energy[END_REF]. In 2016, the Global Energy Interconnection Development and Cooperation Organization promoted the first council meeting in order to improve the renewable energy efficient usage [START_REF]GEIDCO -Global Energy Interconnection Development and Cooperation Organization[END_REF].

In 2016, the Portuguese energy consumption was totally fulfilled by renewable energy sources for almost 4 days. This proves that Portugal has a great potential to be a green energy country although more investments are needed, namely in solar energy [4]. In 2015, the Portuguese total annual energy consumption was fulfilled by 47% from renewable energy sources, but only 1.5% was from solar energy [3].

Since feed-in tariffs in many countries are coming to an end, the energy trade from renewable energy power plants must occur in electricity markets competing with nonrenewable power plants.

Despite the large-scale wind power integration on power systems, other renewable energy technologies are emerging in several countries, such as: photovoltaics (PV) power plants and concentrated solar power (CSP) plants. The non-dispatchable characteristics of a solar energy power plant can be reduced through thermal energy storage (TES) systems. Moreover, TES systems allow the CSP power plants to participate in ancillary service markets [START_REF] Guannan | Optimal offering strategy for concentrating solar power plants in joint energy, reserve and regulation markets[END_REF].

This paper provides an optimization approach that maximizes the expected profits of a CSP producer taking part in the day-ahead electricity market. The main contribution of this paper is: 1) to use a stochastic mixed-integer linear programming (MILP) approach for determining the optimal self-scheduling of a CSP plant having TES systems; 2) to use the conditional value-at-risk so as to mitigate the effect of uncertainty; and 3) to use a scenario reduction algorithm so as to improve the computation time.

Relationship to Smart Systems

Smart systems represent a step in the development of a new era for the energy system. Regarding energy efficiency, the smart systems are a new advantage. In the electric power grids of the future, where the internet of things is connecting several measuring devices, are being optimized trough smart systems to increase the energy efficiency [START_REF] Ejaz | Efficient energy Management for the Internet of Things in Smart Cities[END_REF]. For CSP plants, the smart systems can measure different variables and provide them as inputs for an optimization algorithm. Moreover, the smart systems based on smart meters are vital for solar forecasting which allow to assess forecasts given by external providers. The smart meters allow storing variables in a database, helping power producers to develop the optimal offering strategies to submit in the electricity market [START_REF] Vukmirovic | Software architecture for Smart Metering systems with Virtual Power Plant[END_REF].

State of the Art

The optimal self-scheduling of energy resources is growing in the research community. Different approaches for the short-term scheduling are in research, such as: a novel two-based approach for optimal self-scheduling of CSP plants where the MILP capabilities are combined with the accuracy of the detailed model showing improvements against the simple MILP approach [START_REF] Manuel | A novel two-model based approach for optimal scheduling in CSP plants[END_REF], a robust optimization for the maximization of the profit in the day-ahead electricity market for a CSP plant with TES and a backup fossil system and considering bilateral contracts is presented with an acceptable computational time for an industrial application [START_REF] Pousinho | Robust optimization for selfscheduling and bidding strategies of hybrid CSP-fossil power plants[END_REF], a model-based predictive control approach for optimal generation scheduling of CSP plants is presented unveiling a significant improvement using short-term DNI forecasting and improvements reducing the deviation from the scheduled generation [START_REF] Manuel | A MPC approach for optimal generation scheduling in CSP plants[END_REF]. The location of the CSP plant has been studied due to is direct relation with the DNI [START_REF] Llamas | World location as associated factor for optimal operation model of Parabolic Trough Concentrating Solar Thermal Power Plants[END_REF]. Another research using a deterministic approach presented an optimal offering strategy for CSP plant with TES considering not only day-ahead markets, but also joint energy, reserve and regulations markets [START_REF] He | Optimal Offering Strategy for Concentrating Solar Power Plants in Joint Energy[END_REF]. The value of TES is also being subject of high interest among the research community, it was estimated the capacity value of CSP plants with TES in the USA were it was optimized a CSP plant with TES using Solar Advisor Model (SAM) and a mix-integer program (MIP) that unveiled that only the critical hours of the year are necessary to estimate the capacity value of the CSP plant and unveiled that the TES allow extremely high capacities for CSP plant from around 79% to 92% [START_REF] Seyed Hossein Madaeni | Estimating the Capacity Value of Concentrating Solar Power Plants with Thermal Energy Storage: A Case Study of the Southwestern United States[END_REF], a dense study in TES options for CSP plants is shown in [START_REF] Xu | Investigation of Thermal Storage Options for Concentrating Solar Power Plants[END_REF]. Coordination of renewable sources like solar and wind are also in the scope of the research community and this subject contributes to increase the renewable energy sources penetration, in [START_REF] Chen | Reducing Generation Uncertainty by Integrating CSP With Wind Power: An Adaptative Robust Optimization-Based Analysis[END_REF] it is used robust optimization to integrate CSP plants with TES and wind power which unveiled an uncertainty generation reducing, in [START_REF] Pousinho | Selfscheduling for energy and spining reserve of wind/CSP plants by a MILP approach[END_REF] a MILP approach is presented to schedule wind and CSP plant with TES revealing to be feasible.

Problem Formulation

The self-scheduling problem of a CPS plant having TES system is computed by the maximization of the objective function given by the profit, affected by the risk measure CVaR, subject to technical operation constraints and the risk management constraints.

Objective Function

The objective function is given by two parts, the first one is the profit which is equal to the revenues from the day-ahead electricity market sales during the time horizon of the schedule, and the second one is the equation resulting from the CVaR risk management application. The objective function is given as follows:

( 1)

In (1), T is the set of hours in the time horizon, Ω is the set of scenarios resulting from the combination of solar resource and electricity market prices, is the probability for scenario in hour , is the price of the electricity in the dayahead market for scenario in hour , is the power output of the CSP plant having TES for scenario in hour , is the level of risk that the decision maker is willing to take, represents the level of confidence and is set to 0.95, it's a variable dependent of the first part of the objective function (maximization of the profit) and is a function given by: ( 2)

In (2),
represents the first part of the objective function.

Constraints

The constraints for the scheduling are due to operation, minimum up/down time, electricity market and risk management for the CSP plant having TES system. Operation constraints. The operation constraints are given as follows:

(3) (4)

(5)

(6) (7) (8) (9) (10) (11) (12) (13)
(15)

(16) (17)
From (3) to ( 17), is the electric power produced by the CSP, and are the power produced by the power block (PB) from the solar field (SF) and from the TES for scenario in hour , is the SF efficiency, is the thermal power from in hour . In (3), the electric power balance is obtained combining the electric power produced in the SF and the storage. In (4) and ( 5) are represented the efficiency between power energy and thermal energy for the SF and the TES, respectively. In ( 6) the bound of the thermal energy from the SF and TES are set. In ( 7) and ( 8) are the bounds of the SF and the TES. In ( 9) is given the thermal energy stored in the TES. In [START_REF] Conejo | Decision Making Under Uncertainty in Electricity Markets[END_REF] the bounds of the TES are set. In ( 11) and ( 12) are represented the ramp-up and ramp-down limitations of the TES. In ( 13) and ( 14) guarantee that the SAE is not charging and discharging ate the same time. In ( 15) is guaranteed the positivity of energy. In ( 16) and ( 17) is guaranteed that the CSP plant don't start and shut down at the same time.

Minimum up/down Time Constraints. The minimum up/down constraints of the power block are given as follows:

(18) [START_REF] Pousinho | Selfscheduling for energy and spining reserve of wind/CSP plants by a MILP approach[END_REF] In the equations ( 18) and ( 19), represents the number of hours in which the CSP plant was not working (down time) for scenario in hour , TMF and TMP represents the number of necessary hours of up time and down time, respectively.

Electricity Market Constraints. The electricity market constraints are given as follows:

(20) In [START_REF] Ejaz | Efficient energy Management for the Internet of Things in Smart Cities[END_REF] the decreased monotony of the electricity market offer curve is guaranteed. By other others if the price of energy in the electricity market don't decrease the amount of energy to bid in the market also can't decrease.

Risk management constraints. The risk management constraints are given as follows:

(21) (22)
In ( 21) and ( 22) the risk management using CVaR is guaranteed. CVaR it is defined, for a certain level of confidence , as the average deviation of the worst scenarios.

Case Study

The case study intends to show the proficiency of the model developed for the scheduling of CSP plant having TES in the electricity market. The MILP approach has been solved using CPLEX 12.2 solver under GAMS environment [START_REF] Cplex | Solver manuals[END_REF]. A computer with 8 GB RAM with 2.40 GHz of CPU is used for the simulations of a realistic case study for the CSP plant having TES system carried out with technical data shown in Table 1.

Table 1. CSP having TES system data. The time horizon in the simulations is a day on an hourly basis. The inputs considered within the time horizon are the solar power and the electricity market prices. The solar power profile was obtained using the System Advisor Model [START_REF]Solar Advisor Model User Guide for Version 2.0[END_REF] and it was converted into available thermal power. The electricity market prices derived from the Iberian electricity market given in [START_REF]Market oprator of the electricity market of the Iberian Peninsula[END_REF]. In this case study was used 250 scenarios composed by 25 electricity market prices, as shown in Figure 1 a), and 10 scenarios for the available thermal power, as shown in Figure 1 b). 2.

Table 2. Optimization characteristics of the case study.

Continuous variables Binary variables Constraints

Case study 54 002 24 000 162 000

The number of scenarios highly affects the computation burden of the problem to be solved. The application of a scenario reduction algorithm, forward reduction algorithm detailed in [START_REF] Conejo | Decision Making Under Uncertainty in Electricity Markets[END_REF], was used to assess the implication of the number of scenarios in the expected profit and in the computation time. The scenario reduction algorithm allow to reduce the number of scenarios of the original set maintaining the statistical characteristics. The results are shown in Figure 3. Figure 3 shows that for lower number of scenarios the increase in the computational time it is residual, for moderate to higher number of scenarios the increase in the computational time becomes higher and higher assuming almost a linear evolution. On the other and, the profit tends to stabilize at moderate number of scenarios.

The results of the case study regarding the profit deviation, expected profit and the increase of the expected profit when assuming high levels of risk is shown in Table 3 revealing an increasing of 2.53% when comparing the highest level of risk with the lower level of risk. The portfolio of scenarios is shown in Figure 4. In Figure 4 a) is shown that higher levels of risk lead to a large increase in expected profit, while for lower levels of risk this increase tends to be lower. The differences between the expected profits, depending on the risk levels, are related with the amount of energy that the CSP plant having TES system will produce for selling in the day-ahead electricity market as is shown in Figure 4 b).

The offering curves for a conservative power producer ( ) and a nonconservative power producer ( ) are shown in Figure 5. In Figure 5 is shown that a conservative power producer delivers less power in the day-ahead electricity market to guarantee his revenues, while the non-conservative one delivers more power in the day-ahead electricity market willing to take more risk to increase his revenues.

Conclusions

A stochastic MILP approach is proposed to provide optimal decisions for the dayahead scheduling of CSP plants having TES systems, considering technical operation constraints and risk management constraints. The uncertainty of the solar irradiation and the electricity market prices are considered by scenarios set. A scenario reduction algorithm was applied to reduce the computation burden of the model maintaining the stochastic characteristic of the original set of scenarios. The model includes risk management using the CVaR which allows the decision maker to have a portfolio of expected profits for different risk levels. The case studies are in favor of the approach to support decisions in day-ahead markets. This proposed approach shown to be feasible and accurate for optimal scheduling of the CSP plants with TES.

Fig. 1 .

 1 Fig. 1. a) Electricity market price scenarios, b) Thermal power scenarios. The optimizing characteristics for processing the problem presented in the case study in what regards the number of continuous variables, binary variables and constraints are shown in Table2.

Fig. 2 .

 2 Fig. 2 . Expected profit, computation time related with the number of scenarios.

Fig. 3 .

 3 Fig. 3. a) Portfolio of scenarios, b) Energy to sell in the electricity market.

Fig. 4 .

 4 Fig. 4. Offering curves for hour 18.

Table 3 .

 3 Profit assessment for different levels of risk.

	β	Profit deviation (€)	Expected profit (€)	% Increase
	1.0 2 301	41 072	-
	0.8 2 293	41 097	0.06
	0.6 2 292	41 097	0.06
	0.4 2 410	41 525	1.10
	0.2 2 718	41 975	2.20
	0	2 978	42 110	2.53

Acknowledgement. This work was supported by R&D Nester, Centro de Investigação em Energia REN -State Grid.


Rui Daniel

Rui Esteves Araújo
email: ruka.araujo@gmail.com

A System for Driver Analysis Using Smartphone as Smart Sensor

Keywords: Intelligent Systems, Smartphone sensor, Driver Behavior, Vehicle Dynamics

This work is focused on the development of system able to keep tracking driver's behavior without a black box device mounted inside the car. Firstly, we intend to explore the data from GPS (Global Positioning System), accelerometer, gyroscope and magnetometer for a full characterization of the vehicle dynamics. Secondly, we develop an event detector that determines and classifies distinct kind of maneuvers, like turns, lane change, U-turns, among others. Finally, we developed a simple aggressiveness classifier using fuzzy logic. Experiments have been conducted and the initial results of the system were found to be encouraging on the implementation of a non-intrusive system for driver analysis.

Introduction

According to a study from the World Health Organization [START_REF]Road traffic injuries[END_REF] the injuries caused by traffic accidents are one of the main causes of death, the majority being among young people between the ages of 15 and 29 years old. This circumstance motivates the scientific community to the continuous development of technologies and technical solutions that contribute to attenuate the numbers related to road accidents. One possible solution is the development of driver support and/or evaluation systems in on-board computers or mobile computing devices, which can provide almost instantaneous support to the driver and contribute to the driver's awareness about driving risks.

In recent years, there has been a highly significant growth in the usage of mobile phones with computer-like capabilities. These units, commonly known as smartphones, stand out by their high capacity of processing and connection to several high-speed networks, as well as for the ability of sensing information from movement and position.

In this context, the use of the provided sensors is an opportunity for the development of an intelligent system capable of monitoring, evaluation and assistance to the driver of road vehicles.

Studying the specialized literature, we found works with similar objectives, such as: driver evaluation [START_REF] Belén | Modeling and detecting aggressiveness from driving signals[END_REF][3][4] [START_REF] Zylius | Driving style analysis using spectral features of accelerometer signals[END_REF] [START_REF] Haluk Eren | Estimating driving behavior by a smartphone[END_REF], driving support (in real-time or not) [START_REF] Araújo | Driving coach: A smartphone application to evaluate driving efficient patterns[END_REF] [START_REF] João | A mobile sensing approach to stress detection and memory activation for public bus drivers[END_REF], increase vehicle performance [START_REF] Araújo | Driving coach: A smartphone application to evaluate driving efficient patterns[END_REF] or traffic control [START_REF] Huang | Redeye: Preventing collisions caused by red-light running scooters with smartphones[END_REF] [START_REF] Wang E Hsin-Mu | Detecting urban traffic congestion with single vehicle[END_REF]. These types of works can also help reduce pollution and the number of road accidents.

This paper presents a system with the objective of evaluating the aggressiveness of the driver, focusing mainly on the characterization of vehicle dynamics, using one smartphone as a smart sensor. The basic system requirements are: Plug and Playeasy usability for the driver; No extra costs or additional devices and Non-intrusive.

At this early stage the challenge of characterizing the dynamics of the vehicle with a non-oriented smartphone is solved. As a complement, two applications were developed for validation of results and emulation of a simple aggressive classifier.

Smart System

In the developed countries, most of the population has, at least, one smartphone. Also, these machines have an increasing processing capacity and more types of sensors with better quality in terms of signal acquisition. Such capabilities make it a platform with high potential for implementation of smart systems.

Generally, this type of equipment allows the acquisition of image, recording of sound with the microphone, smartphone movement characterization with the accelerometer and gyroscope, location and orientation through GPS and magnetometer and detection of use with the presence sensor.

Thus, for the system in question, due to the objective of creating a non-intrusive system and to preserve the users' privacy, the use of the camera and microphone is ruled out, focusing only on GPS, accelerometer, gyroscope and magnetometer.

The GPS operates with 1 Hz sample frequency and allows to obtain the position in terms of the Geographic Coordinate System (longitude, latitude, altitude), and speed. Its use requires significant battery consumption.

In the remaining sensors, the sampling frequency can reach up to hundreds of Hz. The sampling frequency is a trade-off between the precision of information and battery consumption. For this system, a sampling rate of 10 Hz was defined.

The accelerometer and gyroscope allow obtaining, respectively, the acceleration in m/s and the angular velocity in rad/s, represented in terms of the smartphone coordinate system. Due to the no strict orientation requirements of the smartphone in order to ease the user experience, it is necessary to perform a virtual orientation of the signals to characterize the movement of the vehicle. In addition, the signals from the accelerometer require a more efficient filtering due to high sensitivity to small movements. The use of the gyroscope comes with the problem that not all smartphones have one.

The use of the magnetometer allows the measurement of the magnetic field in µT around of the device, which is not necessarily the Earth's magnetic field due to the environment around it, a notorious situation in a motorized vehicle due to the electromagnetic materials. Calibrating the magnetometer to the surrounding environment allows obtaining a more precise orientation of the vehicle.

For data storage and processing, the operating systems available for smartphones allow a real-time processing of the data or store in files for further processing performed locally or on an external machine.

Related Work

A recent bibliography research allows us to conclude that there are several scientific papers describing systems with characteristics similar to the one presented in the present work. However, there are aspects related to the central objective of the work, the operating conditions or signal processing techniques that deserve a more detailed discussion and that contribute to support the present work.

The authors present, in [START_REF] Belén | Modeling and detecting aggressiveness from driving signals[END_REF], a work divided in two parts, with the main objective being the development of a system adaptable to mobile devices with the ability to detect aggressive behaviour. It is defined as aggressive behaviour: speeding, abrupt acceleration and braking, nonconformity with the minimum distance for the front vehicle and overtaking in heavy traffic. In the first part, it is validated experimentally a mathematical model based on the initial hypothesis that the aggressiveness operates as a linear filter on the probability distribution function of the input signals. The mainly conclusions were that aggressiveness affects the mean, standard deviation and range of values of lateral and longitudinal acceleration, but maintains the waveform of the acquired signals. Also, it said that the results are independent of the road type and the driver.

In the second part the model is tested through the development of an aggressive classifier, a GPS data logger is used for data acquisition and a success rate of 92.3% is achieved identifying the aggressive lap in a total of 10 laps of the same driver.

From this work, it is important to retain the aggressive behaviours, the statistical indicators affected with the aggressiveness and the independence before the road pavement and the driver. In addition, it serves as validation of the hypothesis of creating a non-intrusive aggressiveness classifier applicable to smartphones.

The document [START_REF] Derick | Driving style recognition using a smartphone as a sensor platform[END_REF] explains the development of MIROAD, a smartphone application for detecting aggressive driving. It differentiates itself from this work using the camera and requiring a specific positioning of the smartphone. For detection of driving patterns, lateral and longitudinal movement is characterized by the fusion of accelerometer, gyroscope and magnetometer data.

The system allows detecting the following events: normal/aggressive right/left shift, normal/aggressive U-turn, aggressive right/left lane change, aggressive acceleration/braking, speeding and device removal. For detection and classification, the authors used triggers and pattern recognition through dynamic time wrapping (DTW). This work presents a lot of similarities to the one developed previously, providing useful information regarding signal acquisition and processing, and event detection and classification. The main difference is the restriction of the smartphone position so that is oriented with the vehicle. The removal of this restriction is the novelty of the work developed here.

Finally, in [START_REF] Chen | Invisible sensing of vehicle steering with smartphones[END_REF] it is presented a tool applicable to mobile applications, V-sense, which aims to detect and differentiate different maneuvers. The maneuvers detected are: lane change, turns and driving in curvy roads. Through the accelerometer, it is calculated the distribution of the gravity force and, from there, the angles of the rotation to orient the smartphone coordinate system with the vehicle's one. With the oriented gyroscope signal the maneuver classification is done considering the bumps duration and the value of maximum and minimum. In some cases, the horizontal displacement calculated through GPS and accelerometer data is used as decisive factor.

The major differentiation of this work is the calibration of the signal to the vehicle coordinate system and the maneuvers classification with the oriented gyroscope signal and horizontal displacement.

System Architecture

The system developed in this work presents a modular architecture where two parts are clearly differentiated. The first on is responsible for characterizing the movement of the vehicle during a recorded trip and, it is called the "Vehicle Black-Box". The second on is responsible for extracting useful information from processed signals, consisting of two main modules: Event Detector and Aggressiveness Classifier. In Fig. 1 it is represented a layout with the architecture and information flow of the system. One of the central aspects for orientation manipulation is the definition of the necessary coordinate systems, which is represented in Fig. 2. The correct definition, followed by a precise virtual orientation of the signals, gives the system freedom relatively to the smartphone's position. Furthermore, it allows one to introduce, in future work, an automatic mechanism that detect phone handling while driving.

Vehicle Black Box

This part of the system is responsible for characterizing the dynamics of the vehicle during a trip using the signals acquired from smartphone sensors. For correct operation, it is necessary to place the device in a stable place during the entire recording session. A sampling of the last value read by each sensor is done at 10 Hz. Although GPS has a maximum frequency of 1 Hz, this method is applied to obtain a full data sample at determined times instead of having individual sensor samples in different instants of time.

From the GPS data, in a X-size sample, the velocity signal of 1 Hz is transformed into a signal of 10 Hz using a linear extrapolation:

.

(1)

A reference signal for the acceleration and jerk of the vehicle is also calculated through the first and second derivatives. The orientation of the vehicle is calculated using the pair (longitude, latitude) through the slope of the line drawn using three consecutive instances.

A filter is applied to the signals from accelerometer based on the exponential average, ,

eliminating most of the noise without removing relevant information. The gyroscope disregards the use of filters due to the low susceptibility to noise. The next step consists in the virtual orientation of the signals to the vehicle coordinate systems. For this, every time the speed is zero or constant, the distribution of acceleration in the three axes according to the smartphone coordinate system is analysed and a weighted average for such distribution is calculated. It is assumed that the obtained vector corresponds to the gravity force and it is completely represented in the Z axes of the vehicle. With this assumption, the rotation matrix for the vehicle XY plane is calculated. In the new oriented signals, the rotation speed of the vehicle is represented in the Z axe of the vehicle coordinates system and the module of vehicle's acceleration is represented by the module of X and Y values.

In order to differentiate the longitudinal and lateral acceleration, all values of the acceleration derived from the GPS speed with a significant value are selected. Those values represent the times when it can be assumed that all the acceleration is longitudinal. For those times, it is calculated the angle between the acceleration vector in XY plane and the X axe of the vehicle. The longitudinal acceleration is derived to compute the jerk.

Having properly characterized the position (longitude, latitude), speed, longitudinal and lateral acceleration, rotation speed and jerk, its assumed that the vehicle dynamics are completely characterized and some travel statistics are computed, such as average, standard deviation, maximum and minimum values.

Event Detector

Using the previously calculated vehicle dynamics, the different events are detected. It is considered as an event: the U-turn, curve, turn and lane change. The direction of the change, i.e., left or right, is also differentiated.

For the event detection, an algorithm like the presented in [START_REF] Chen | Invisible sensing of vehicle steering with smartphones[END_REF] is used. Rotation speed is used as trigger value and when the ±δ is exceeded, it is defined that an event started tini instants ago, and will only end when it has tend consecutive instants below the limits as is shown in Fig. 3. To classify the event, additional information such as horizontal displacement, vehicle rotation during the entire event, number and type of bumps -time slots with a consecutive minimum duration at which the rotation speed module is greater than β. Taking all the information calculated, the classification is done using a decision tree with number of bumps, total rotation, type of bumps and horizontal displacement as decision factors.

Aggressiveness Classifier

In this last module, we intend to assign an aggressiveness index to each driver according to their behaviour. For this a level of aggressiveness is attributed to all the events detected in the previous module. It also analyses the percentage of time it was in excessive of speed, at this stage only comparing to the maximum limit applied to the fastest roads of the country.

The fuzzy logic system used has two linguistic variables, speed and square of the jerk. The first uses six membership functions and the second four. The output linguistic variable has three membership functions, assigning an aggressiveness index between 0 and 100. With the new event index, the driver's aggressiveness index is updated through an exponential average, giving more importance to the most recent events.

Results

For the initial tests of the system two different sets of trips were used. One of the sets consisted of three trips recorded on a previously defined circuit. The other corresponded to a set of trips recorded by three different drivers during different periods of time.

The previously defined circuit consists of twenty maneuvers previously identified with the desired output for each one. The driver was asked to perform three laps, two with normal behavior and one with aggressive behavior. For all of them, the system detected all the maneuvers performed, and obtains a seventy-five percent success in identifying the type of event in the first two cases and sixty percent in the most aggressive lap. In the aggressiveness classifier, for the two normal laps, the mean score was thirty while for the aggressive one the mean score was seventy-five points.

The other set of trips allowed to intensively teste the event detector, presenting very favorable results. Two examples are shown in Fig. 4 with their respective rotation speed. As for the level of aggressiveness, the temporal variation of the behavior of the two drivers for different coefficients applied in the exponential average used in the formula are presented in Fig. 5. The red line, the one with higher coefficient, shows two distinct profiles, the left one with an inconsistent driving style, and the right one with a steadier driving style. The other lines, with smaller coefficient, do not show that difference because the "mean behavior" is similar in both drivers. Calibrating this parameter allows to set whether to have an analysis with a higher weight in the most recent history, or to allow older trips to significantly influence the index.

Conclusion

This paper allows concluding that it is possible to characterize the dynamics of a vehicle using the sensors of the smartphone. The accuracy obtained in this process is sufficient to apply it as a basis in the development of applications with the purpose of monitoring and / or assessment of driving style.

Our tests have confirmed this claim by showing that different experiment can indeed capture distinct driving responses from the participants. These responses can be used by the aggressive classifier to determine a score for the driver during a trip. This leads us to believe that our system can indeed help the driver to improve his driving performance.

For future work, it is necessary to develop one algorithm to detect the smartphone movement during the trip and take actions for correcting the orientation of the acquired signals.

Fig. 1 .

 1 Fig.1. System architecture and information flow.

Fig. 2 .

 2 Fig.2. Representation of coordinate systems: Smartphone, vehicle and earth.

Fig. 3 .

 3 Fig.3. Example for the event detector algorithm.

Fig. 4 .

 4 Fig.4. Event detector example -Turn to right and left curve followed by right curve.

Fig. 5 .

 5 Fig.5. Evolution over time of aggressiveness level for two different drivers with three different coefficients in exponential average.


Soroush Najafi
email: soroush.najafi@ubi.pt

Miadreza Shafie-Khah
email: miadreza@ubi.pt

Neda Hajibandeh
email: neda.hajibandeh@ubi.pt

Gerardo J Osório

João P S Catalão
email: catalao@fe.up.pt

A New DG Planning Approach to Maximize Renewable -Based DG Penetration Level and Minimize Annual Loss

Keywords: Annual loss, Biomass, DG penetration, Network reconfiguration, Pareto front, Reactive power planning, Renewable energy

Distributed Generation (DG) using renewable technologies is increasing due to their benefits including energy security and emission reduction. However, installing new DGs in distributed networks is limited due to network constraints such as feeder capacity and short circuit level, as well as higher investment costs. In this paper, network reconfiguration and reactive power planning are used to maximize DG penetration level and to minimize annual loss for DGs with biomass technologies. In order to model the problem uncertainties, 96 scenarios considering ten different network load levels are studied. A multi-objective method is applied for solving this optimization problem by using Pareto front. The numerical results indicate the positive impacts of the proposed approach on improving the network security.

Introduction

Environmental concerns, such as global warming causes that renewable energy, e.g., biomass, play an important role in supplying energy [START_REF] Atwa | Probabilistic approach for optimal allocation of wind based distributed generation in distribution systems[END_REF]. The planning of distribution systems is a critical issue that the system planners faced with [START_REF] Arefifar | Probabilistic optimal reactive power planning in distribution systems with renewable resources in grid-connected and islanded modes[END_REF]. In one hand, appropriate placement of DGs in the distribution systems has an essential role in the enhancement of the system efficiency; consequently finding the optimum placement of DGs is critical [START_REF] Atwa | Optimal renewable resource mix for distribution system energy loss minimization[END_REF]. On the other hand, a large number of researchers have focused on the reactive power planning in the distribution system, especially when it has have high-penetration of renewable resources DG [START_REF] Su | Distributed generation interconnection planning: a wind power case study[END_REF].

In this sense, network reconfiguration is a method to change the topology of branches through altering the open and close statuses of sectionalizing and tie switches [START_REF] Atwa | Optimal renewable resource mix for distribution system energy loss minimization[END_REF]. This can be carried out in different seasons of a year to reduce the total loss and increase the system reliability.

For instance, as reported in [START_REF] Su | Distributed generation interconnection planning: a wind power case study[END_REF], a DG planning was proposed for the coordination of reconfiguration of feeders and voltage controlling with the goal of maximizing the DG capacity at a specific bus.

In the current work, it is planned biomass DG for four different scenarios. In the first scenario, the annual loss is minimized without considering network penetration. The second scenario represents minimized annual loss considering network penetration. In the third scenario, network penetration is maximized, and finally, in the fourth scenario, a multi-objective problem is provided that minimizes the annual loss and maximizes the network penetration.

Relationship to Smart Systems

Distributed Generation (DG) of electricity using renewable technologies is increasing due to their benefits including energy security and emission reduction [START_REF] Gungor | Opportunities and challenges of wireless sensor networks in smart grid[END_REF]. Smart grid can be defined as a contemporary structure of electricity systems to improve effectiveness, reliability, and safety, via integration of sustainable energies, as well as automated and intelligent controlling and advanced communications technologies [START_REF] Cecati | Smart operation of wind turbines and diesel generators according to economic criteria[END_REF], [START_REF] Arasteh | IoT-based smart cities: A survey[END_REF]. It affects entire parts of power systems, and consequently it needs a widespread data communication structure [START_REF] Kamyab | Demand response program in smart grid using supply function bidding mechanism[END_REF].

Importantly, smart grid allows modern network controlling schemes and provides operative integrated DGs in the demand side [START_REF] Palensky | Demand side management: Demand response intelligent energy systems and smart loads[END_REF], [START_REF] Calderaro | Failure identification in smart grids based on Petri net modeling[END_REF]. Smart Grid will have a significant role to support high penetration level of DGs; nevertheless, the existing standard/code leading DGs' interconnection does not allow implementing various applications that can be advantageous for the system [START_REF] Bahrami | From demand response in smart grid toward integrated demand response in smart energy hub[END_REF]. Novel approaches for utilizing the data in the supervisory controllers would be required, as well as an environment in which tools could be emerged in online stream event processing.

PSO and MOPSO Algorithm

The particle swarm optimization (PSO) applied in optimization techniques; it was inspired from the movement migration of population species that lives grouped [START_REF] Couceiro | Fractional order Darwinian particle swarm optimization applications and evaluation of an evolutionary algorithm[END_REF]. The elementary philosophy behind PSO is that each individual from the swarm, hereafter called as particle, uses the information from the swarm, based on the knowledge, sharing, and historical information to find its survival means. Computationally, PSO process starts with a random swarm of particles delimited from delimited universe, where each particle, from the movement process, will be a momentary solution of the problem with tuned fitness rate. The aforementioned fitness is computed and optimized in each iteration. The movement rule, defined by a position and velocity, defines the direction, speed, and position of the swarm to reach the optimal and are updated in each iteration. In this process, the particles interact with each other and them they move from the delimited universe till reach the best solution (the optimal from the optimization process). Both, position and velocity are updated them from the experience from the past position and velocity and the best position found from the swarm. Computationally, the aforementioned description can be expressed:

1 iter iter iter p p p X X V    (1)    
V V Rand X X Rand X X       1, 2, , p p N   (2)
where is the last position of a particle p from iteration iter that may express the best result to the optimization problem. By other words, and specifically in DG optimization problem, is a set of DG decision variables and is the velocity from particle p from iteration iter. Moreover, is the best global position g found from the swarm in iteration iter. So, the movement direction of the swarm is dependent by the influence, respectively, from , and [START_REF] Soroudi | Binary PSO-based dynamic multi-objective model for distributed generation planning under uncertainty[END_REF]. By other words, the swarm movement is strictly influenced by the inertia, memory and cooperation of the swarm, expressed by the three term of (2). However, for the multi-objective problem of DG optimization in this work the original PSO strategy is modified. The original goal to find a unique solution is then turned in one new array of multiple solutions, based on Pareto strategy to solve the multi-objective DG problem [START_REF] Devi | Comparison of various approaches in multi-objective particle swarm optimization (MOPSO): Empirical study[END_REF], [START_REF] Santos | Novel multi-stage stochastic DG investment planning with recourse[END_REF].

Formulation

The planning model aims the minimization from the yearly energy loss and maximizes network penetration in the distribution system for all possible loads. Time segments are represents in sets of 90h (i.e., the number of days for each season). Moreover, in (3), g represents as load states, and represents energy loss at (g) load state. Furthermore, in (4), Cm represents biomass capacity installed at each candid bus (CB). (3)

m m Maximize Penetration C m CB    (4)
Subject to: Active and Reactive power balance:

    , , , , , , 1 *
* * * , n DGB i D i g i g j ij ij g j g i j P LP g P V V Y Cos i NBus           (5)     , , , , , 1 *
* * * , n D i g i g j ij ij g j g i j LP g Q V V Y Sin i NBus            (6)
In ( 5) and ( 6),

 

LP g represent load peak level that shown in Table 1.

, gi V represents voltage magnitude at load level g. Slack Bus Constraints:

,1 0 g V  (7)
,1 0 g   (8) Voltage Constraints at the Other Buses:

, min g i max V V V  (9)
where Vmin and Vmax are 0.95p.u and 1.05 p.u respectively. Feeder Capacity Limits:

, , 0 g ij ij max
II  (10 ) DG Penetration. To this end, it has 2 different type of DG penetration in DG planning. [START_REF] Bahrami | From demand response in smart grid toward integrated demand response in smart energy hub[END_REF] represent DG penetration for candidate bus. This limitation depends on the land and protection level of the candidate bus. In this paper, it is assume this limitation at 1200 kW. ( 12) limit installed DG capacity in the whole network. This limitation assumes to be 1200 kW too. [START_REF] Couceiro | Fractional order Darwinian particle swarm optimization applications and evaluation of an evolutionary algorithm[END_REF] just consider in the 3rd scenario.

Numerical Results of the Model

The PG&E 69bus distribution test case [START_REF] Baran | Optimal capacitor placement on radial distribution systems[END_REF] has been considered to implement the proposed model. In normal operation, disregarding DGs, the yearly energy loss is 199.5 MWh. The slack bus of the system is node 1. The candidate bus for installing DG is CB= {20, 46, 49, 50, 53}. Total active and reactive demands are 3802kW and 2695kVAr, respectively. The 69bus case study is also presented in Fig. 1. Implemented DG in the network is biomass resources with the controllable output. The hourly demand is represented in Table 1 as a proportion of the yearly demand peak. The proposed planning problem is applied to 4 scenarios with different constraint and objective function. Outcomes are represented in Table 2. Based on the results, if it is added DG, penetration constraint to an optimization problem, annual loss would increase. Another effect of adding this constraint is that it is not possible to control voltage bus within 0.95 to 1.05 per-units (p.u). In this scenario, the buses voltage is varied from 0.9 to 1.1. In the third scenario, it is maximized DG penetration without violation any constraints. In this case voltage limit is 0.95 < V < 1.05. In the fourth scenario is planning biomass DG with two objective functions. Pareto optimal front found by the algorithm is shown in Fig 2 . In this scenario voltage limit will be in 0.95 to 1.05 p.u.

TOPSIS algorithm is implemented to find the best decision for the decision maker. The theory of this algorithm is represented in [START_REF] Eldurssi | A fast nondominated sorting guided genetic algorithm for multi-objective power distribution system reconfiguration problem[END_REF]. The answers are represented in Table 3. It is used three different set of weight factor for objectives. Weight factors are {(0.2, 0.8), (0.5, 0.5), (0.8, 0.2)}. The result is shown in Table 3.

Conclusions

In this work a multi-objective model was presented for the distributed generation planning and solved the formulated problem with PSO algorithm. DGs were biomass with controllable output, although the proposed strategy could just tackle several types of uncertainty from wind or solar energy, for instance. Annual loss minimization and DG penetration maximization were considered in this paper. After determining the Pareto front, it was used TOPSIS method to choose the best decision for the decision maker. The numerical results showed that considering only the DG penetration constraint increased the annual loss. In addition, by adding this constraint, the voltage bus could not be constrained between desired amounts. However, the proposed approach considering both DG penetration constraint and annual loss could significantly improve the effectiveness of the DG planning.

Fig. 1 .

 1 Fig. 1. 69bus PG&E Single Diagram

Fig. 2 .

 2 Fig. 2. Impact of different types of TOU program on the generation of Genco 1 without the presence of wind farm.

Fig. 3 .

 3 Fig. 3. Pareto Front for 4 th Scenarios.

Table 1 .

 1 Load profile for different hours

	Time	Winter	Spring	Summer		Autum
	12:00 -1:00 am	0.4756	0.3970	0.64	n	0.3717
	1:00 -2:00	0.4473	0.3906	0.60		0.3558
	2:00 -3:00	0.4260	0.3780	0.58		0.3540
	3:00 -4:00	0.4189	0.3654	0.56		0.3422
	4:00 -5:00	0.4189	0.3717	0.56		0.3481
	5:00 -6:00	0.4260	0.4095	0.58		0.3835
	6:00 -7:00	0.5254	0.4536	0.64		0.4248
	7:00 -8:00	0.6106	0.5355	0.76		0.5015
	8:00 -9:00	0.6745	0.5958	0.87		0.5605
	9:00 -10:00	0.6816	0.6237	0.95		0.5841
	10:00 -11:00	0.6816	0.6300	0.99		0.5900
	11:00 -12:00	0.6745	0.6237	1.00		0.5841
	12:00 -1:00 am	0.6745	0.5859	0.99		0.5487
	1:00 -2:00	0.6745	0.5796	1.00		0.5428
	2:00 -3:00	0.6603	0.5670	1.00		0.5310
	3:00 -4:00	0.6674	0.5544	0.97		0.5192
	4:00 -5:00	0.7029	0.5670	0.96		0.5310
	5:00 -6:00	0.7100	0.5796	0.96		0.5428
	6:00 -7:00	0.7100	0.6048	0.93		0.5664
	7:00 -8:00	0.6816	0.6174	0.92		0.5782
	8:00 -9:00	0.6461	0.6048	0.92		0.5664
	9:00 -10:00	0.5893	0.5670	0.93		0.5310
	10:00 -11:00	0.5183	0.5040	0.87		0.4720
	11:00 -12:00 am	0.4473	0.4410	0.72		0.4130

Table 2 .

 2 DG Planning results for different scenarios

	Candidate Bus	Annual minimization TA(With Consider DG Loss Penetration)	Annual minimization (Without Consider DG Loss Penetration)	DG Penetration Maximization
	20	560	0	1600
	46	90	0	0
	49	0	0	3020
	50	480	0	1160
	53	1235	1200	0
	Annual Loss (KWh)	2365	1200	5760
	Total
	Installed	252120	313240	388510
	Capacity

Table 3 .

 3 PLANNER Best Decision based on different weight factors

	Weight Factor	Annual Loss (kWh)	DG Penetration
	(0.2,0.8)	258310	2770
	(0.5,0.5)	423140	6239
	(0.8,0.2)	423140	6239

Acknowledgment. This work was supported by FEDER funds through COMPETE 2020 and by Portuguese funds through FCT, under Projects SAICT-PAC/0004/2015 -POCI-01-0145-FEDER-016434, POCI-01-0145-FEDER-006961, UID/EEA/50014/2013, UID/CEC/50021/2013, and UID/EMS/00151/2013. Also, the research leading to these results has received funding from the EU Seventh Framework Programme FP7/2007-2013 under grant agreement no. 309048.


Rui Laia

Isaias L R Gomes

Hugo M I Pousinho

Rui Melício
email: ruimelicio@gmail.com

Victor M F Mendes

Self-scheduling of Wind-thermal Systems Using a Stochastic MILP Approach

Keywords: Wind thermal coordination, Stochastic programming, MILP

In this work a stochastic (Stoc) mixed-integer linear programming (MILP) approach for the coordinated trading of a price-taker thermal (Ther) and wind power (WP) producer taking part in a day-ahead market (DAM) electricity market (EMar) is presented. Uncertainty (Uncer) on electricity price (EPr) and WP is considered through established scenarios. Thermal units (TU) are modelled by variable costs, start-up (ST-UP) technical operating constraints and costs, such as: forbidden operating zones, minimum (Min) up/down time limits and ramp up/down limits. The goal is to obtain the optimal bidding strategy (OBS) and the maximization of profit (MPro). The wind-Ther coordinated configuration (CoConf) is modelled and compared with the unCoConf. The CoConf and unCoConf are compared and relevant conclusions are drawn from a case study.

Introduction

The emissions derived of the use of nonrenewable fuels and the aspiration to attain independence of energy [START_REF] El-Sharkawi | Coordinated trading of wind and thermal energy[END_REF] lead a considerable European countries to promote generation of the electricity from renewable (Rnew) resources by adopting some instruments of support for Rnew energy production, namely investments incentives, green certificates, soft balancing costs and feed-in-tariffs [START_REF] Pineda | Renewable-based generation expansion under a green certificate market[END_REF].

At the end of 2014, 43.70% of all novel Rnew farms were based on WP and was the 7th year consecutively that over 55.0% of added capacity of power in the EU was Rnew [START_REF]Wind in power: 2014 European Statistics[END_REF]. In the face of the increasing Rnew energy incorporation in the last years, supply of energy still depending on nonrenewable fuels since more than 60% of the electricity generated all over the world in 2012 was based on nonrenewable fuel Ther plants [4].

In a restructured EMar, power resources owners' operate under competition level due to the nodal variations of EPr [START_REF] Laia | Bidding strategy of wind-thermal energy producers[END_REF] in order to obtain the best revenue bidding in the DAM [START_REF] Laia | Self-scheduling and bidding strategies of thermal units with stochastic emission constraints[END_REF]. For the WP producers (WPP), WP and the market-clearing EPr Uncer are to be addressed in order to know the amount of energy to produce in order to present optimal offers. In absence of conformity, i.e., there is a deviation (Dev), economic penalizations is due to happen [START_REF] Laia | Optimal scheduling of joint wind-thermal systems[END_REF]. For Ther power producers, only market-clearing EPr Uncer has to be addressed.

Relationship to Smart Systems

A smart system can be stated as an embedded system that incorporates advanced systems and provide the inhabitants with sophisticated monitoring and control over how something happens in the system [START_REF] Arsan | Smart systems: from design to implementation of embedded smart systems[END_REF], for example a wind farm or a TU. Smart systems are capable of sensing, making diagnosis, describing, qualifying and managing how something happens in the system, incorporating both technical intelligence and cognitive functions. In smart systems, electronic devices will be communicating with software base system, allowing the user to access information about the functionality of the system [START_REF] Arsan | Smart systems: from design to implementation of embedded smart systems[END_REF]. These systems are highly reliable, often miniaturized, networked, predictive and energy autonomous [START_REF] Topham | Smart systems integration knowledge gateway[END_REF]. Future power systems should ensure security, reliability and efficiency in energy management. Using the abilities of smart systems to monitoring the energy demand and the energy production of other units can play a vital role in what regards the unit commitment of TU. Particularly, monitoring and high quality real-time data of the exploitation of Rnew energy sources, namely WP, that usually requires a certain amount of spinning reserve due to their intermittent nature may represent additional information at the moment of unit commitment of TU. With this information, the Wind-Ther Power Producer (WTPP) can make a more accurate decision concerning the participation in EMars and therefore foremost revenue [START_REF] Laia | Optimal bidding strategies of windthermal power producers[END_REF][START_REF] Laia | Bidding decision of wind-thermal GenCo in day-ahead market[END_REF]. Also, benefits of environmental are predictable with the increase in the capability of discovery offers able to be satisfied with a high level of being pleased and less needed of spinning reserve, less TU are needed and less nonrenewable fuel is used.

State of the Art

For Ther conversion of energy into electricity, several methods of optimization to resolve the problem of unit commitment (UC) have been used in the literature, including a technique of primacies list, classical mathematical programming techniques, like Lagrangian Relaxation (LR) and dynamic programming (DP) and more newly artificial intelligence (AI) techniques [START_REF] Trivedi | Hybridizing genetic algorithm with differential evolution for solving the unit commitment scheduling problem[END_REF]. Although, requiring small computation time and easy to implement, the priority list technique does not guarantee an opportune resolution near the global optimal one, which implies an operation of higher cost [START_REF] Laia | Stochastic emission constraints on unit commitment[END_REF][START_REF] Gomes | Bidding and optimization strategies for wind-pv systems in electricity markets assisted by CPS[END_REF]. DP methods are flexible but these methods are characterized by a known limitation by the "curse of dimensionality". Although the LR can overcome the previous limitation, does not necessarily lead to a viable resolution, implying further processing for satisfying the infringed constraints in order to find a viable resolution, which does not guarantee solution optimal. Although, AI techniques based on simulating annealing and ANN have been applied, the major limitation of the AI techniques concerning with the possibility to obtain a resolution near the global optimum one is a disadvantage. The MILP method has been useful with success for solving the problem of UC [START_REF] Ostrowski | Tight mixed integer linear programming formulations for the unit commitment problem[END_REF]. MILP is suitable for the formulation of bidding strategies due to its rigorousness and extensive capability of modeling [START_REF] Floudas | Mixed integer linear programming in process scheduling: modeling, algorithms, and applications[END_REF]. WPP usually have significant difficulties to predict their power output accurately. In addition, WPP have to face Uncer on EPr. These Uncer have to be expediently considered, i.e., treated into the variables of the problems [START_REF] El-Fouly | Impact of wind generation control strategies, penetration level and installation location on electricity market prices[END_REF] to be addressed by a WPP in order to know how much to produce and the price for bidding. The technical literature presents methods for WP bidding strategies solving using different approaches: the first one is the use of WP with technologies of storage of energy [START_REF] Angarita | Combined hydro-wind generation bids in a poolbased electricity market[END_REF]; the use of economic options as a tool for WPP to hedge against WP Uncer [START_REF] Hedman | Comparing hedging methods for wind power: using pumped storage hydro units vs options purchasing[END_REF]; another approach is the design of Stoc models in order to obtain OBS for WPP participating in an EMar [START_REF] Matevosyan | Minimization of imbalance cost trading wind power on the shortterm power market[END_REF], without the aforementioned policies. The 3rd line of action is a Stoc formulation explicitly modelling the Uncer faced by a WPP [START_REF] Ruiz | Wind power day-ahead uncertainty management through stochastic unit commitment policies[END_REF], using indeterminate measures and an established of scenarios built by WP forecast and market-clearing EPr forecast [START_REF] Coelho | A RBF neural network model with GARCH errors: application to electricity price forecasting[END_REF] requests.

Hence, this paper provides an effective approach based on Stoc MILP to find out the optimal bidding strategies of a single entity having to manage a coordinated wind-Ther system, so as to maximize the expected revenue in the Iberian day-ahead EMar.

Problem Formulation

WPP

Considering the variability and intermittent nature of WP the physical delivering usually differs from the offer submitted by WPP to the DAM. The revenue h RV of a WPP proposing a power of offer h E , but actually producing act h E for period h is stated as:

D offer h h h h RV E IC    (1)
In (1), the DAM price is D h  , the imbalance (Imb) cost is h IC . The total Dev for period h is stated as:

act offer h h h D E E  (2)
price that WPP will pay for excess of production is h   , the price to be charged for deficit of production is t   . The Imb prices can be given by means of price ratios stated as:

,1

h h h D h pr pr        and ,1 h h h D h pr pr        (3)
In (3), the h   is never greater than 1. The t   is never lower than 1.

Ther power producer

The operating cost,

s i h
T , for a TU can is stated as: ,,

s i h i si h s i h s i h i s i h T B b g u A z s i h        (4)
In (4), the fixed production cost is i B , the added variable cost is s i h g , the ST-UP and shut-down (Sh-Down) costs are s i h u and i A , of the unit. The last three costs are in general described by nonlinear function (Func) and worse than that some of the functions are non-convex and non-differentiable functions, but some kind of smoothness is expected and required to use MILP, for instance, as being sub differentiable functions.

The ST-UP and Sh-Down costs of units in (4) are considered to be such that is possible to approximate those Func by a piecewise linear. Hence, the s i h g , is:

h h 1 ,, L ll s i i s i l g T s i h        ( 5
)
min h i h h 1 ,, L l s i i s s i l E E b s i h         (6) 1 min 1 1 h h ( ) , , i i s i s i M E j s i h       (7) 1 1 min h h ( E ) , , s i i i s i M b s i h       (8) 1 h h ( ) , , , 2,..., 1
l l l l i i s i s i M M j s i h l L           (9) 1 1 h h ( ) , , , 2,..., 1
l l l l s i i i s i M M j s i h l L            (10)
max 1 1 h h h 0 ( ) , , L L L s i i s i s i E M j s i h          (11)
In ( 5), the slope of each segment is l i T , the segment power is l s i h  . In ( 6), the binary variable s i h b guarantee that the power production is equal to 0 if the unit is in the state offline. In [START_REF] Laia | Optimal scheduling of joint wind-thermal systems[END_REF], if the binary variable l s i h j has a null value, then the segment power

h h h 1 ,, s i i s i si r r u K b b s i h                 ( 12
)
The constraints to limit the power produced by the unit are:

min max h ,, i s i h s i s i h E b E E s i h      ( 13
) max max 1 1 ( ) , , s i h i s i h s i h si h E E b z SD z s i h         (14)
max max h 1 1
,,

s i h s i s i h s i h E E RU b SU y s i h         (15)
h 1 h h h ,, s i s i si s i E E RD b SD z s i h        (16)
In ( 13) and ( 14), the upper bound of max s i h E is established, which is the maximum available power of the unit. The minimum down time (MDT) constraint is imposed by a formulation:

h 1 0, i F si h b s i      (17) 1 h h (1 ) , , 1 ... 1
i k DH s i i s i i i hk b DH z s i k F H DH             (18) h h (1 ) 0 , , 2...
H s i s i i hk b z s i k H DH H            (19) 0 0 min{ ,( )(1 )
} i i s i s i F H DH t b   
The MUT constraint is also imposed:

h 1 (1 ) 0 , i N si h b s i       (20) 1 h h , , 1 ... 1
i k UH si i s i i i hk b UH y s i k N H UH            (21) h h ( ) 0 , , 2...
H si s i i hk b z s i k H UH H           ( 22
) 0 0 min{ ,( ) } i i s i s i N H UH U b  
The relation between the binary variables to identify start-up, shutdown and forbidden operating zones is:

h h h h 1 ,, s i s i s i s i y z t b s i h        (23)
h h 1 , ,

s i s i y z s i h      (24)
The total power produced by the TU is:

h 1 , I g st s i i E E s h      (25)
Objective function: The total offer is:

,

offer th D s h s h s h E E E s h     (26)
The physical delivering is:

,

act g d s h s h s h E E E s h      (27)
In (27),

g sh E is the physical delivering by the TU and d sh E  is the physical delivering by the wind farm for scenario s . The expected revenue of the GNCO is:

  1 1 1 , S H N N I D offer D D s s h s h s h sh s h s h s h sh s i h s h i p E pr D pr D T s h                        (28)
Subject to: 0 ,

offer M sh sh E E s h     (29)   , act offer hs s h s h D E E s h     (30)
,

h s h s h s D D D s h       (31) 0 , h s h s s D E x h       (32)
The maximum Ther generation is:

max max h 1 , I MW s h si i E E E s h       (33)
An additional constraint for (28) appears:

h ' h h ' h ( )( ) 0 , ', offer offer D D s s s s E E s s h       (34)

Case Study

The case study is from a GNCO with a WTPP, with 1440 MW of installed capacity. The used data is available in [START_REF] Laia | Self-scheduling and bidding strategies of thermal units with stochastic emission constraints[END_REF]. The energy prices are from the Iberic Market of electricity and available in [START_REF]Red Electrica de España[END_REF], considering 10 days of June. The EPr and the energy generated from wind are displayed in Fig. 1. The energy generated is obtained using the total energy generated from the wind farm having 360 MW of rated power. The expected revenue for CoConf and unCoConf are displayed in Table 1. In Fig. 2 the CoConf permits for a Min value of offered power upper than the one offered in the unCoConf and permits for a lesser price of the offering, which is a possible operation benefit.

Conclusion

Smart Systems can play an important role for a Ther and WP producer since the operation till the bidding in day-ahead EMars. The ability to provide real-time data from the wind production may result in foremost decisions for the decision-maker and therefore higher revenues. As result of the proposed approach for uncoordinated and coordinated operations optimal schedule of the TU and the short-term bidding strategies are obtained. The presented approach is appropriate for the GNCO involvement with TU and a wind farm. The offer coordinated of Ther with WP power permits providing foremost outcomes than the sum of the lonely offers. The Uncer are modelled using established scenarios for the prices of the energy and power production. In the literature of all trading problems and management involving production by wind prove to be optimization problems under Uncer.

Fig 1 .

 1 Fig 1. Market Iberic: June 2014; left: EPr, energy from wind: right.

Table 1 .

 1 Expected revenue for CoConf and uncoordinated configurations

	Case	Expected revenue
	Wind uncoordinated (€)	119 200
	Ther uncoordinated (€)	516 848
	Coordinated Wind and Ther (€)	642 326
	Gain (%)	0,99

Acknowledgments. Portuguese Funds partially support this work through the FCT-Foundation for Science and Technology, LAETA 2015/2020, UID-EMS-50022-2013.