Artículos (Ingeniería de Sistemas y Automática)
URI permanente para esta colecciónhttps://hdl.handle.net/11441/11342
Examinar
Envíos recientes
Artículo Integración de tecnologías Blockchain en un esquema de control predictivo distribuido y jerárquico para comunidades energéticas(Universidad Politécnica de Valencia, 2025) Sivianes Castaño, Manuel; Velarde Rueda, Pablo; Zafra Cabeza, Ascensión; Bordons Alba, Carlos; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. España; Universidad de Sevilla. TEP116: Automática y Robótica IndustrialEn este estudio se introduce una plataforma de gestión energética jerárquica que incorpora la tecnología blockchain para eliminar la dependencia de un coordinador centralizado. La plataforma está diseñada para operar en comunidades energéticas afectadas por incertidumbres estocásticas. La estrategia se divide en dos niveles: en el nivel superior, donde se resuelve un problema de optimización de control predictivo distribuido estocástico, en el que todos los hogares de la comunidad participan para determinar las acciones de control de manera horaria. En este nivel, se utiliza un contrato inteligente como intermediario entre los hogares, encargado de realizar tareas de control e intercambio de información. Por otro lado, en el nivel inferior, cada hogar resuelve de manera local e independiente un problema de optimización de control predictivo para seguir las referencias establecidas después del consenso alcanzado por la capa superior, a una frecuencia significativamente mayor. La validez de esta plataforma para optimizar el funcionamiento económico de la comunidad y cumplir con las restricciones probabilísticas se ha validado con diferentes simulaciones.Artículo Door-to-Door Parcel Delivery From Supply Point to User’s Home With Heterogeneous Robot Team: The euROBIN First-Year Robotics Hackathon(Institute of Electrical and Electronics Engineers Inc.(IEEE), 2024) Suárez Fernández-Miranda, Alejandro; Kartmann, Rainer; Leidner, Daniel; Rossini, Luca; Huber, Johann; Azevedo, Carlos; González Morgado, Antonio; Pérez Sánchez, Vicente; Arrue Ullés, Begoña C.; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Commission (EC); Universidad de Sevilla. TEP151: Robótica, Visión y ControlLogistics and service operations involving parcel preparation, delivery, and unpacking from a supply point to a user's home could be carried out completely by robots in the near future, taking advantage of the capabilities of the different robot morphologies for the logistics, outdoor, and domestic environments. The use of robots for parcel delivery can contribute to the goals of sustainability and reduced emissions by exploiting their different locomotion modalities (wheeled, legged, and aerial). This article reports the development and results obtained from the first robotics hackathon celebrated as part of the European Robotics and Artificial Intelligence Network involving eight robotic platforms in three domains: 1) an industrial robotic arm for parcel preparation at the supply point, 2) a Centauro robot, a dual-arm aerial manipulator, and a wheeled-legged quadruped for parcel transportation, and 3) two humanoid robots and two commercial mobile manipulators for parcel delivery and unpacking in domestic scenarios. The article describes the joint operation and the evaluation scenario, the features and capabilities of the robots, particularly those involved in the realization of the tasks, and the lessons learned.Artículo Software Integration of Power System Measurement Devices with AI Capabilities(MDPI, 2025-01) Arenas Ramos, Victoria; Cuesta Rojo, Federico; Pallares López, Víctor; Santiago Chiquero, Isabel; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. EspañaThe latest changes on the distribution network due to the presence of distributed energy resources (DERs) and electric vehicles make it necessary to monitor the grid using a real-time high-precision system. The present work centers on the development of an open-source software platform that allows for the joint management of, at least, power quality monitors (PQMs), phasor measurement units (PMUs), and smart meters (SMs), which are three of the most widespread devices on distribution networks. This framework could work remotely while allowing access to the measurements in a comfortable way for grid analysis, prediction, or control tasks. The platform must meet the requirements of synchronism and scalability needed when working with electrical monitoring devices while considering the large volumes of data that these devices generate. The framework has been experimentally validated in laboratory and field tests in two photovoltaic plants. Moreover, real-time Artificial Intelligence capabilities have been validated by implementing three Machine Learning classifiers (Neural Network, Decision Tree, and Random Forest) to distinguish between three different loads in real time.Artículo Advanced Distributed Control of Parallel Resonant CLLC DAB Converters(MDPI, 2025) Carmona Vicente, David; Muñoz Carrero, Alba; Galván Díez, Eduardo; Carrasco Solís, Juan Manuel; Rodríguez Rubio, Francisco; Universidad de Sevilla. Departamento de Ingeniería Eléctrica; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. España; European Union (UE)The integration of hybrid alternating current (AC) and direct current (DC) networks has gained relevance due to the growing demand for more flexible, efficient, and reliable electrical systems. A key aspect of this integration is the parallelization of power converters, which presents several technical challenges, such as current sharing imbalances, circulating currents, and control complexity. This paper proposes a distributed control architecture for parallel resonant CLLC dual active bridge (DAB) converters to address these issues in hybrid AC–DC networks and microgrids. The approach includes a master voltage controller to regulate the output voltage and distributed local current controllers to ensure load balance. The approach minimizes the difference between the output and input voltages, allowing for independent control of power flow. Simulation and experimental results show significant improvements. The system stability has been demonstrated experimentally. Transient response has been improved with response time 80% lower using the feed-forward term. The system maintained stability with current sharing deviations below 3% under full and low load conditions. Finally, scalability is ensured by the proposed distributed controller because the central power controller is not affected by the number of units in parallel used in the application. This solution is suitable for advanced hybrid networks and microgrid applications.Artículo Review of Fast Computation Methods for Finite-State Predictive Control of Multi-Phase Drives(Multidisciplinary Digital Publishing Institute (MDPI), 2024-12) Marsal Pedernazi, Esteban; Arahal, Manuel R.; Garrido Satué, Manuel; Perales Esteve, Manuel Ángel; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Ministerio de Ciencia, Innovación y Universidades (MICIU). España; Universidad de Sevilla. TIC275: Investigación y Desarrollo en Electrónica, Automática y Tecnologías Emergentes; Universidad de Sevilla. TEP203: Física Interdisciplinar Fundamentos y AplicacionesOptimizing the cost function in predictive control of multi-phase drives is computationally intensive. This poses a challenge since the required sampling period for drives falls within the microsecond range. Numerous methods have been proposed in the literature to address this computational demand. This paper reviews recent proposals for multi-phase drives of various kinds. A structured classification of the proposals is provided. Furthermore, an integrated framework is employed to cohesively present and connect previously unrelated methods. Key elements such as Allowed Control Set, inter-sample modulation, and weighting factor use are identified. New developments in multi-vector and single-vector approaches are discussed. Practical limitations for each approach are also considered.Artículo Ensemble speed estimation in IFOC with transient detector(Wiley, 2025) Arahal, Manuel R.; Garrido Satué, Manuel; Martínez Heredia, Juana María; Perales Esteve, Manuel Ángel; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. EspañaRotating electric machines have experienced a vast increase in use in recent times due to the electrification of various segments, including electric vehicles. Different machine types, electronic converters, and control schemes are used. In particular, the combination of indirect field oriented control (IFOC) with incremental encoders is widely utilized. Despite theoretical efforts, practical tuning of IFOC-like structures is not easy due to non-idealities. These arise from difficult to model phenomena appearing in the system. In particular, the latency and phase loss of the speed estimation have a negative effect on performance. This paper proposes the use of an ensemble of speed estimators to reduce these negative effects. In the proposal, ripples and latency of the speed estimations are treated as terms in a tradeoff situation. The proposal allows to obtain low ripple in a steady state combined with low latency during transients.Artículo Concurrent AI Tuning of a Double-Loop Controller for Multi-Phase Drives(MDPI, 2024) Garrido Satué, Manuel; Barrero, Federico; Martínez Heredia, Juana María; Colodro Ruiz, Francisco; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. EspañaThe control of electric drives is an important topic due to the wide-spread use of such devices. Among these, multi-phase induction machines are gaining momentum in variable-speed applications. The usual control practice is the use of a speed Proportional–Integral loop that sets the current reference for an inner controller. This inner controller decides the voltage to be applied, which is realized by an electronic power converter. This paper presents an Artificial Intelligence (AI) scheme for tuning. It aims to optimize the usual figures of merit for drives. Moreover, tuning for both loops is tackled concurrently. The adjustment is performed relying on the operating region to address non-linear behavior. The results obtained using a five-phase induction motor illustrate that the proposed method can work in the entire operating range of the drive with improved results.Artículo A Long-Range and Low-Cost Emergency Radio Beacon for Small Drones(MDPI, 2024) Martínez Heredia, Juana María; Olivera, Jorge; Colodro Ruiz, Francisco; Bravo, Manuel; Arahal, Manuel R.; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Ministerio de Ciencia e Innovación (MICIN). EspañaThe increasing use of unmanned aerial vehicles (UAVs) in the commercial and recreational sectors has led to a heightened demand for effective recovery solutions after a crash, particularly for lightweight drones. This paper presents the development of a long-range and low-cost emergency radio beacon designed specifically for small UAVs. Unlike traditional emergency locator transmitters (ELTs), our proposed beacon addresses the unique needs of UAVs by reducing size, weight, and cost, while maximizing range and power efficiency. The device utilizes a global system for mobile (GSM)-based communication module to transmit location data via short message service (SMS), eliminating the need for specialized receivers and expanding the operational range even in obstaclerich environments. Additionally, a built-in global navigation satellite system (GNSS) receiver provides precise coordinates, activated only upon impact detection through an accelerometer, thereby saving power during normal operations. Experimental tests confirm the extended range, high precision, and compatibility of the prototype with common mobile networks. Cost-effective and easy to use, this beacon improves UAV recovery efforts by providing reliable localization data to users in real time, thus safeguarding the UAV investment.Artículo An Improved Speed Sensing Method for Drive Control(MDPI, 2025) Arahal, Manuel R.; Garrido Satué, Manuel; Martínez Heredia, Juana María; Colodro Ruiz, Francisco; Universidad de Sevilla. Departamento de Ingeniería Electrónica; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Agencia Estatal de Investigación. España; European Commission (EC). Fondo Europeo de Desarrollo Regional (FEDER)Variable-speed electrical drive control typically relies upon a two-loop scheme, one for torque/speed and another for stator current control. In modern drive control methods, the actual mechanical speed is needed for both loops. In practical applications, the speed is often acquired by incremental rotary encoders. The most used method derives speed from an encoder pulse count during a fixed amount of time. It is known that this sensing method produces time delay in the speed feedback loop as well as fluctuations in the speed measurements. Time lags produce phase loss that has potentially negative effects on the overall drive performance. Nevertheless, the pulse counting method is favored in most cases due to its simplicity and existing support for its use in digital signal processors. In this paper, a new speed sensing method is proposed to reduce time lag without incurring increased fluctuations. The proposal uses a novel transient detector to determine the actual operational regime of the drive: transient or stationary. Transient detection is not based on measured speeds but works directly with the train of incoming encoder pulses. The method is designed to work well with established digital signal processor routines. The proposal is assessed through experimentation on a real five-phase induction motor.Artículo Physical-Virtual Impedance Control in Ultralightweight and Compliant Dual-Arm Aerial Manipulators(IEEE, 2018-02-26) Suárez Fernández-Miranda, Alejandro; Heredia Benot, Guillermo; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Commission (EC); Ministerio de Economía y Competitividad (MINECO). España; Ministerio de Educación, Cultura y Deporte (MECD). España; Universidad de Sevilla. TEP151: Robótica, Visión y ControlDual-arm aerial manipulation requires the design and development of high performance robotic arms in terms of safety, robustness, and force/torque/impedance control, taking into account the integration in the aerial platform, the strong weight constraints, and the technological limitations of the servo actuators. A compliant joint arm also improves the response of the aerial manipulator to collisions and external forces during the flight operation. This letter evaluates the control capabilities in a lightweight manipulator built with smart servo actuators and a spring-lever transmission mechanism that provides joint compliance and deflection measurement. The dynamic model of a compliant joint is validated through frequency identification, demonstrating how virtual variable impedance can be achieved without a second motor. Mechanical joint compliance is the base of the Cartesian impedance control scheme of the dual-arm system, integrated with the controller of the aerial platform. A stereo vision system provides the Cartesian deflection of the end effector, derived from the definition of an equivalent stiff joint manipulator, allowing the estimation and control of the contact forces. Experimental results validate the developed concepts.Artículo Coalitional model predictive control of an irrigation canal(Elsevier, 2014-04) Fele, Filiberto; Maestre Torreblanca, José María; Hashemy, S. Mehdy; Muñoz de la Peña Sequedo, David; Camacho, Eduardo F.; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Union (UE); Ministerio de Educación y Cultura (MEC). EspañaWe present a hierarchical control scheme for large-scale systems whose components can exchange information through a data network. The main goal of the supervisory layer is to find the best compromise between control performance and communicational costs by actively modifying the network topology. The actions taken at the supervisory layer alter the control agents’ knowledge of the complete system, and the set of agents with which they can communicate. Each group of linked subsystems, or coalition, is independently controlled through a decentralized model predictive control (MPC) scheme, managed at the bottom layer. Hard constraints on the inputs are imposed, while soft constraints on the states are considered to avoid feasibility issues. The performance of the proposed control scheme is validated on a model of the Dez irrigation canal, implemented on the accurate simulator for water systems SOBEK. Finally, the results are compared with those obtained using a centralized MPC controller.Artículo Coalitional Control: Cooperative Game Theory and Control(IEEE, 2017-02) Fele, Filiberto; Maestre Torreblanca, José María; Camacho, Eduardo F.; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y AutomáticaThe evolution of information and communication technologies has yielded the means of sharing measurements and other information in an efficient and flexible way [1], which has enabled the size and complexity of control applications to increase [2]. At the same time, the improvements in the computational and communicational capabilities of control devices have fostered the development of noncentralized control architectures, already motivated by the inherent structural constraints of large-scale systems. Computer-based control approaches such as model predictive control (MPC) are visible beneficiaries of these advances and have registered a significant growth regarding both theoretical and applied fields [3], [4].Capítulo de Libro Distributed Thermal Identification and Exploitation for Multiple Soaring UAVs(Springer, 2014-11) Cobano Suárez, José Antonio; Alejo, David; Vera, Santiago; Heredia Benot, Guillermo; Sukkarieh, Salah; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Spagnolo, P.; Mazzeo, P.; Distante, C.; European Commission (EC); Ministerio de Ciencia e Innovación (MICIN). España; Ministerio de Educación, Cultura y Deporte (MECD). EspañaThis chapter discusses the problem of cooperatively sensing the wind map of an area in order to efficiently harvest the wind energy with fixed-wing gliding UAVs, known as soaring. Moreover, a cooperative system with multiple gliding fixed-wing UAVs is presented for long endurance missions. This system is composed by three main blocks that include thermal detector, path planning, and collision avoidance. The main advantage is its low computational load, making it suitable for real-time applications. Extensive simulation results in several scenarios are given to test the complete system. In addition, real experiments have been carried out with real gliding aircrafts of the Robotics Vision and Control Group (GRVC) of the University of Sevilla in the Airfield of La Cartuja (Sevilla). The results of these experiments show the convenience of the proposed method.Artículo Collision-free path planning for multiple robots using efficient turn-angle assignment(Elsevier, 2024-07) Rodríguez Sánchez, Fabio; Díaz Báñez, José Miguel; Fabila Monroy, Ruy; Caraballo de la Cruz, Luis Evaristo; Capitán Fernández, Jesús; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Ministerio de Ciencia e Innovación (MICIN). España; Agencia Estatal de Investigación. España; European Union NextGeneration; Universidad de Sevilla. TEP995: Multi-robot And Control SystemsThe ability to avoid collisions with moving robots is critical in many applications. Moreover, if the robots have limited battery life, the goal is not only to avoid collisions but also to design efficient trajectories in terms of energy consumption and total mission time. This paper proposes a novel strategy for assigning turn angles for collision-free path planning in scenarios where a small team of robots cooperate in a certain mission. The algorithm allows each robot to reach a predetermined destination safely. It establishes consecutive, short time intervals, and at each interval, possible conflicts are solved centrally in an optimal manner. This is done by keeping constant speeds but generating a discrete set of possible directions for each robot, and solving efficiently the turn-angle allocation for a collision-free path that minimizes the path deviation from the shortest one. Due to the discretization, the final paths are not optimal, but the system can react to possible failures during execution, as conflicts are resolved at each time interval. Computational results and Software-In-The-Loop simulations are presented in order to evaluate the proposed algorithm. A comparison with a state-of-the-art approach shows that our algorithm is more energy-efficient and achieves lower mission completion time.Artículo Autonomous Aerial Filming with Distributed Lighting by a Team of Unmanned Aerial Vehicles(Institute of Electrical and Electronics Engineers (IEEE), 2021-10) Kratky, Vit; Alcántara Marín, Alfonso; Capitán Fernández, Jesús; Stepan, Petr; Saska, Martin; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Commission (EC). Fondo Europeo de Desarrollo Regional (FEDER); Junta de AndalucíaThis letter describes a method for autonomous aerial cinematography with distributed lighting by a team of unmanned aerial vehicles (UAVs). Although camera-carrying multi-rotor helicopters have become commonplace in cinematography, their usage is limited to scenarios with sufficient natural light or of lighting provided by static artificial lights. We propose to use a formation of unmanned aerial vehicles as a tool for filming a target under illumination from various directions, which is one of the fundamental techniques of traditional cinematography. We decompose the multi-UAV trajectory optimization problem to tackle non-linear cinematographic aspects and obstacle avoidance at separate stages, which allows us to re-plan in real time and react to changes in dynamic environments. The performance of our method has been evaluated in realistic simulation scenarios and field experiments, where we show how it increases the quality of the shots and that it is capable of planning safe trajectories even in cluttered environmentsArtículo A Dynamic Weighted Area Assignment Based on a Particle Filter for Active Cooperative Perception(Institute of Electrical and Electronics Engineers (IEEE), 2020-04) Acevedo Báñez, José Joaquín; Messias, Joao; Capitán Fernández, Jesús; Ventura, Rodrigo; Merino, Luis; Lima, Pedro U.; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Union; Ministerio de Ciencia, Innovación y Universidades (MICINN). España; Universidade de Lisboa; Universidad de Sevilla. TEP151: Robótica, Visión y ControlThis article addresses an Active cooperative perception problem for networked robots systems. Given a team of networked robots, the goal is finding a target using their inherent uncertain sensor data. The article proposes a particle filter to model the probability distribution of the position of the target, which is updated using detection measurements from all robots. Then, an information-theoretic approach based on the RRT∗ algorithm is used to determine the optimal robots trajectories that maximize the information gain while surveying the map. Finally, a dynamic area weighted allocation approach based on particle distribution and coordination variables is proposed to coordinate the networked robots in order to cooperate efficiently in this active perception problem. Simulated and real experimental results are provided to analyze, evaluate and validate the proposed approach.Artículo The Velocity Assignment Problem for Conflict Resolution with Multiple Aerial Vehicles Sharing Airspace(Springer, 2013-01) Alejo, David; Díaz Báñez, José Miguel; Cobano Suárez, José Antonio; Pérez Lantero, Pablo; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Commission (EC). Fondo Europeo de Desarrollo Regional (FEDER); Universidad de Sevilla. TEP151: Robótica, Visión y ControlEfficient conflict resolution methods for multiple aerial vehicles sharing airspace are presented. The problem of assigning a velocity profile to each aerial vehicle in real time, such that the separation between them is greater than a given safety distance, is considered and the total deviation from the initial planned trajectory is minimized. The proposed methods involve the use of appropriate airspace discretization. In the paper it is demonstrated that this aerial vehicle velocity assignment problem is NP-hard. Then, the paper presents three different collision detection and resolution methods based on speed planning. The paper also presents simulations and studies for several scenarios.Artículo Conflict Detection and Resolution Method for Cooperating Unmanned Aerial Vehicles(2012-01) Conde, Roberto; Alejo, David; Cobano Suárez, José Antonio; Viguria, Antidio; Ollero Baturone, Aníbal; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; European Commission (EC); Junta de Andalucía; Univarsidad de Sevilla. TEP151; Robotica, Vision y ControlThis paper presents a Conflict Detection and Resolution (CDR) method for cooperating Unmanned Aerial Vehicles (UAVs) sharing airspace. The proposed method detects conflicts using an algorithm based on axis-aligned minimum bounding box and solves the detected conflicts cooperatively using a genetic algorithm that modifies the trajectories of the UAVs with an overall minimum cost. The method changes the initial flight plan of each UAV by adding intermediate waypoints that define the solution flight plan while maintaining their velocities. The method has been validated with many simulations and experimental results with multiple aerial vehicles platforms based on quadrotors in a common airspace. The experiments have been carried out in the multi-UAV aerial testbed of the Center for Advanced Aerospace Technologies (CATEC).Artículo Human Modeling and Passivity Analysis for Semi-Autonomous Multi-Robot Navigation in Three Dimensions(Institute of Electrical and Electronics Engineers (IEEE), 2024) Hatanaka, Takeshi; Mochizuki, Takahiro; Sumino, Takumi; Maestre Torreblanca, José María; Chopra, Nikhil; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Ministerio de Ciencia, Innovación y Universidades (MICIU). España; Universidad de Sevilla. TEP116: Automática y Robótica IndustrialIn this article, we study a one-human-multiple-robot interaction for human-enabled multi-robot navigation in three dimensions. We employ two fully distributed control architectures designed based on human passivity and human passivity shortage. The first half of this article focuses on human modeling and analysis for the passivity-based control architecture through human operation data on a 3-D human-in-the-loop simulator. Specifically, we compare virtual reality (VR) interfaces with a traditional interface, and examine the impacts that VR technology has on human properties in terms of model accuracy, performance, passivity and workload, demonstrating that VR interfaces have a positive effect on all aspects. In contrast to 1-D operation, we confirm that operators hardly attain passivity regardless of the network structure, even with the VR interfaces. We thus take the passivity-shortage-based control architecture and analyze the degree of passivity shortage. We then observe through user studies that operators tend to meet the degree of shortage needed to prove closed-loop stability.Artículo Stochastic Optimization of Microgrids with Hybrid Energy Storage Systems for Grid Flexibility Services Considering Energy Forecast Uncertainties(Institute of Electrical and Electronics Engineers (IEEE), 2021-11) García Torres, Félix; Bordons Alba, Carlos; Tobajas, Javier; Real-Calvo, Rafael; Santiago, Isabel; Grieu, Stephane; Universidad de Sevilla. Departamento de Ingeniería de Sistemas y Automática; Universidad de Sevilla. TEP116: Automática y Robótica IndustrialThis paper presents a stochastic framework for the optimization of microgrids that has the functionality of providing flexibility services to System Operators (SOs) considering uncertainties in the energy forecast. The methodology is developed with the aim of being applied to complex microgrids composed of different distributed energy resources and hybrid energy storage systems (ESS). The associated optimization problem is operated in two stages: the first one performs a stochastic optimization of the microgrid in order to reserve an up/down regulation capacity with which to deal with the energy forecast uncertainties of the microgrid. The different microgrid devices are optimized by considering their operational costs in order to achieve their optimal operation in the Day-Ahead Market (DM). The second stage is used to re-schedule the initial planning according to the signal request and an economic offer from the SO. The control problem is developed using Stochastic Model Predictive Control (SMPC) techniques and Mixed-Integer Quadratic Programming (MIQP), owing to the presence of logic, integer, mixed and probabilistic variables. The simulation results show that the proposed methodology reduces the risk of undergoing up/down-penalty deviations in the Regulation Service Market (RM), also being able to provide flexibility services to the SOs, despite being subject to uncertainties in the energy forecast carried out for the microgrid.