Marko Švaco
email: marko.svaco@fsb.hr

Bojan Šekoranja
email: bojan.sekoranja@fsb.hr

Bojan Jerbić
email: bojan.jerbic@fsb.hr

Autonomous Planning Framework for Distributed Multiagent Robotic Systems

Keywords: Distributed robotic system, autonomous planning, multiagent system, assembly, industrial robotics

des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Substantial research and development is conducted to multiagent robotics; particularly in the fields such as service, humanoid or mobile robotics, but industrial robotics is still based on traditional postulates. Real flexibility and adaptivity to changes are shortcomings in today's industrial assembly and handling robotic applications and are issues that need to be addressed. Distributed multiagent robotics is a system based on human behavior patterns. When complex tasks arise humans are much more efficient when working in groups: they exhibit more axis of freedom, more data can be handled and they delegate particular tasks to individual agents.

Research concentrated around humanoid robotics ([1]- [START_REF] Park | Mechanical design of humanoid robot platform khr-3 (kaist humanoid robot-3: Hubo)[END_REF]) is developing rapidly. Dual arm configuration highly sophisticated perceptive mechanisms, human like motions enable robots to recreate human motion and work patterns. Major drawback of those kinematical structures is very low repeatability and precision primarily needed in industrial systems. For assembly and handling tasks which usually have high precision and repeatability demands industrial robots are necessary. Nowadays the most flexible industrial robots have 6 or 7 [START_REF] Bischoff | From research to products: The development of the KUKA Light-Weight Robot[END_REF] degrees of freedom (DOF) without the end effector (gripper) which usually has 1 additional DOF. One human arm (with the hand) has 27 DOF [START_REF] Agur | Grant's Atlas of Anatomy[END_REF]. The flexibility of a robotic arm is quite limited in comparison to a human operator. Implementing two or more robots with own con-trollers that communicate each with other, a certain multiagent concept can be achieved. The whole system will be orchestrated and will be able to perform more demanding operations. Each controller running its own actuator unit should be an agent with defined level of autonomy. In such systems the multiagent control appears as the main issue.

In this paper a creative action planning algorithm (CAPA) for application in multi agent robotic systems is presented. One of the main goals is constructing a universal planning framework which can be implemented on various types of industrial robots and tasks.

Related works [START_REF] Sycara | Distributed Constrained Heuristic Search[END_REF], [START_REF] Ephrati | Divide and conquer in multiagent planning[END_REF] incorporating multiagent planning on similar tasks are virtual applications and cannot be easily implemented on real industrial systems. The approaches are primarily intended for autonomous planning done by multiple agents who cannot collide, are of infinite small dimension and share the same computational time domain. The developed CAPA and the distributed multiagent system (MAS) operate in a real world environment bounded by rules and limitations. The approach discussed in this paper is intended to show that some assembly and handling tasks can be done in close collaboration among agents to gain flexibility and increase overall system productivity.

Contribution to Sustainability

Robotics and in particular industrial robotics have always been a part of a central planning system. Agents (robots, machines) controlled by own computers are somehow subordinated to a central system controller [START_REF] Tang | Reactive multi-agent system for assembly cell control[END_REF]. Therefore they exhibit very low level of autonomy and in most cases do pre-programmed actions not being able to cope with uncertainties in the system and the environment. Uncertainties may vary from production quantities to failures of equipment or other agents, etc.

It is suggested that some handling and assembly industry tasks can be accomplished by interaction between agents (primarily industrial robots) in the system. Accordingly some level of autonomy must be introduced.

Production in recent years has switched from high quantity standardized products to lower quantities of customized products so demands from assembly systems have grown. Traditional approach with a centralized architecture and strict delegation of tasks needs to be replaced. Introducing a multiagent configuration and autonomous planning approach could be proven as a valuable addition. For an assembly system it implies that agents (robots and machines) before assembling need to generate a plan that best suits the current state and requirements of the system. After deriving consensus agents begin assembling the structure (product) constantly communicating and exchanging relevant information and data. In industrial assembly systems this is a novice approach and it has numerous benefits when implemented: it leads to increased flexibility and adaptivity to unexpected changes and uncertainties in the system, i.e. responsiveness [START_REF] Seilonen | Extending process automation systems with multiagent techniques[END_REF]. The system becomes insensitive to number of agents (robots) and new assembly tasks can be resolved with less effort. Clearly, this approach is not suited for all products but it can be implemented on a variety of industrial examples. Development of such an industrial system scheme is beyond the scope of this paper and will be considered for further research. In this work an initial version of the planning framework is presented. The framework is implemented on an actual system consisting of three 6 DOF robots.

The Multiagent System

System Formulation

The multiagent system consists of m autonomous agents a l (l = 1...m). Their workspace contains simplified blocks with respect to a global Cartesian coordinate system K. Agents workspace W(a i , b j,k ) contains blocks which form different space structures, where b j,k represents j th block of k th type. Each block has certain properties which agents perceive from their workspace: size (type) of a building block T (b j,k ) = {1, 2, 3…} and Cartesian position and orientation in workspace: P (b j,k ) = {x, y, r}. All blocks have the same width and height (single unit) but their length can vary and can be one, two, three, etc. unit lengths. That results with flexibility so building blocks can be supplemented with each other i.e. block with two unit lengths can be replaced with two blocks of single unit length and vice versa. Each agent is defined as an autonomous, self-aware entity with limited knowledge of the global workspace [START_REF] Schumacher | Objective Coordination in Multi-Agent System Engineering[END_REF] and with some cognition of other agents. It has a separate processing unit, actuators, vision system for acquiring information from its environment, force and torque sensors for haptic feedback and other interfaces. A space function F (a l ) is defined to determine the consumed space by an agent a l , F=(x 1 , y 1 , x 2 , y 2 , r, t) in time t. The first pair of Cartesian coordinates depicts the first vertex of a rectangle which bounds the agent and the second pair depicts the second vertex respectively. Rotation angle r is defined with respect to the origin point of the coordinate system K.

The MAS is insensitive to dynamic changes in number of agents. Impact is lower system flexibility and longer times for achieving final goals when agents are excluded from the system.

Structures and Decision Making

Agents' tasks are recreating structures which are defined as a final form put together from various objects with defined relationships. A structure is determined by interrelations and arrangement of objects b j,k into a complex entity. Structure S = {R i b j,k } is a set of relations R i (i = 1…m-1) between objects (b j,k , j = 1…n, k = 1…u).

The MAS has properties of a market organization type [START_REF] Sandholm | An Implementation of the Contract Net Protocol Based on Marginal Cost Calculations[END_REF], [START_REF] Shoham | Multiagent Systems: algorithmic, game-theoretic and logical foundations[END_REF] where agents bid [START_REF] Hsieh | Analysis of contract net in multi-agent sys[END_REF] for given resources (blocks) in their workspace (Fig. 1). Time schedules need to be negotiated when areas of interest in the global workspace are not occupied.

Global goal G is the required structure that must be assembled from available elements following the given set S. An example of a structure is illustrated in Fig. 2 a). After observing a structure and finding relations agents are given an arbitrary set of work pieces (blocks) as depicted in Fig. 2. (b). Using those elements a plan of actions is generated for assembling the initial structure. Possible solutions are presented in Fig. 2. (c 1 ) -(c 3 ). A set of rules and propositions for agent behavior is given in a cognition base (CB): Top down disassembling or bottom up assembling the structure can define a sequence of steps for the MAS. The CAPA utilizes a bottom up principle where from a provided set of objects {b 1 …b p,r }, which can differ from the initial set {b 1 …b n,q } agents need to reach a solution in the given search space. Depending on the CB information agents can make decisions whether the desirable objectives can be performed in accordance to proposed restrictions and limitations. Implementing an iterative algorithm a solution can be found as shown in Fig. 3. Branches represent solution sets and each branch leads to one solution. If finding a solution in one solution set isn't possible, the system takes one step back and explores other options until it finds a valid one.

•

Operators

By utilizing operators agents construct a sequence of actions for accomplishing each sub goal. By consecutively achieving all sub goals the global goal G is fulfilled and the agents await further tasks. The basic operators are:

• Pick (b i ,gr k ) -agent picks up a block b i with a grasping method gr k • Move (p 1 ,…,p r , t 1 ,…,t r ) -agent moves in the global workspace from point p 1 to point p r through r-2 interpolation points with motion specification t r defined for each point.

• Place (b j,k ) -agent places a block b j,k • Vision -vision operator is used for identifying objects and their coordinates in c • Push (f, d, s) -agent uses force/torque sensor for auxiliary action of pushing an object with force/torque threshold t in vector direction d for s units

• Force -used for positioning correction The vision operator utilizes the cognition base and solves problems of identifying work objects and associated data. Therefore vision processes have to be very stable and work in constantly changing light and scenery conditions [START_REF] Stipancic | Self-adaptive Vision System, Emerging Trends in Technological Innovation[END_REF]. A fix to this problem is to utilize algorithms that can change the exposition of the image acquisition process. This can be done through a way of search patterns. Few images are taken at different camera settings and the one where familiar objects are recognized is used as reference. The downside is increase of image acquisition and processing time. If light and scenery conditions can vary this is a necessity due to the high level sensitivity of precision vision applications.

Furthermore if there is a need for even higher precision beyond capabilities of vision systems agents can use very sensitive force sensors. This method improves accuracy and corrects the pick&place positions. To determine which method to apply agents rely on vision identification of objects. Once the object is identified agents can decide which method of force correction to apply. In example they can successfully insert a shaft or a square object into adequate holes if their original position was slightly off the required one. Furthermore the force sensor allows an agent to correct larger errors. A controlled search pattern is used with a very low force not to damage the objects. Finding the adequate insertion position completes the process.

Global system approach

The starting point of every assembling process is perception of the agent's environment. Each agent uses vision systems to acquire information from a portion of the global workspace and forwards it to the planning agent. From the global information set the planning agent extracts relations between objects forming the initial structure. The same principle is applied for the random set of work objects. Regarding the initial structure and available elements the planning agent decomposes the global goal into tasks which can be performed by an individual agent. Task priorities are also taken into consideration where some tasks are conditioned to be executed before others. After this initial process each agent bids for a task. Through comparing resource functions agents submit the task to the optimal candidate. Idle agents repeat this process and acquire free tasks. When processing a task an agent sends data regarding the consumed space through the F function for collision avoidance. After all task are allocated and executed agents inspect the reassembled structure.

Implementation

The CAPA has been tested to provide solutions for a structure such as the one shown in Fig. 4. When multiple solutions are possible the MAS executes the one where ∑C in the entire solution set is minimal. Currently only two dimensional structures (R 3 ) are being solved but their solutions due to use of real world objects has to be three dimensional (R 4 ). The planning algorithm was tested on a virtual model of the multiagent robotic system (Fig. 5. a). This was done for safety reasons (primarily collision) and the ability to test and debug the algorithm in parallel on multiple computers. After satisfactory computational results the algorithm and the entire framework have been implemented on an actual robotic system -Fig. 5.

(b).

The first problem which emerged was sharing of agent workspace. In order to work on the same task, assembling the same structure, spatial relations need to be taken into consideration. Agents were calibrated using calibration tools and visual applications. This creates relations with respect to agent positions (three translations) and rotations (three angular displacements); introducing a common global workspace (K). A problem that resulted from the decentralized multiagent architecture was sharing and synchronizing agent time domains. This didn't introduce an issue while tests were conducted on a computer where all agents used the same CPU clock. Adjustments have been done using handshaking with digital signals and through TCP/IP communication which allowed coordinated task execution. Collision detection was an issue that needed to be addressed. Currently there are no algorithms to solve real time agent collision or they exist but with limitations. Collision between two agents with kinematic chains of 3 DOF can be solved in a definite period of time [START_REF] Curkovic | Dual-Arm Robot Motion Planning Based on Cooperative Coevolution, Emerging Trends in Technological Innovation[END_REF]. For the reason of limited computational power and the collision detection not being the centre of this research the function (F) described in chapter 3 was used.

Conclusion and Further Research

The approach presented in this paper ensures higher system robustness regarding decentralized task execution. In future applications agents would decide how to best solve a new problem -which agent has the most adequate tools and how can the rest of them assist etc. Making agents mobile and giving them the ability to exchange tool heads introduces even a greater level of flexibility to the system. This results in more cost optimized solutions. Further generalization will be introduced where agents will be able to autonomously distinguish and solve entirely new problems as illustrated in Fig. 6. First step is implementation of reassembling 3D structures. For that purpose the CB will need to comprise rules regarding "laws of gravity" and etc. Further research will be concentrated on introduction of new objects to the MAS. Taking into consideration the CB (known similar objects) agents will be able to find or construct grasping methods weather they can do it individually or assisted by other agents.

Fig. 1 .

 1 Fig. 1. Agent workspace and task allocation scheme

  Mathematical rules for structure sets • Agents capabilities • Grasping rules and limitations • Object properties • Agent workspace • Vision system patterns database • Force and torque sensor threshold values If a simple structure with limited number of building blocks is presented to the agents (Fig. 2 a) there might be only one or few feasible solutions (sequence of steps). If more complex structures are presented (as shown in Fig. 4. a) a variety of feasible solutions might be possible.

Fig. 2 .

 2 Fig. 2. Simple task for the multiagent system

Fig. 3 .

 3 Fig. 3. Possible solution sets (sequence of steps) for a represented structure Each agent attains a unified set of sub goals g t which fulfill the global goal G. Execution of sub goals (tasks) can be done synchronous or asynchronous giving the space functions F of the agents. A resource function C is defined as a measure of resource and time consumption. C (a l , b j,k , e) is a function of agents' a l position, specifications of a building block b j,k (size and position in global workspace) and the position e where that block is planned to be moved.

Fig. 4 .

 4 Fig. 4. a) Initial space structure b) Randomly scattered building blocks c), d) Space structures assembled by the agents

Fig. 5 .

 5 Fig. 5. (a) virtual representation of the multiagent robotics system (b) real agents

Fig. 6 .

 6 Fig. 6. Planning of 3D structures, following research direction


Fernando Pereira

Luis Gomes

Filipe Moutinho

Automatic Generation of Run-Time Monitoring Capabilities to Petri Nets based Controllers with Graphical User Interfaces

Keywords: Embedded Systems, Petri nets, Design automation, Modeling, Graphical User Interfaces

The growing processing power available in FPGAs and other embedded platforms, associated with the ability to generate high resolution images and interface with pointing devices, opened the possibility to create devices with sophisticated user interfaces. This paper presents an innovative tool to automatically generate debug, diagnostic and monitoring graphical interfaces to be integrated in embedded systems designed using Petri net based controllers. Devices powered with the new debug and diagnostic interfaces benefit from lower maintenance costs and simplified failure diagnostic capabilities, leading to longer product life cycles with the corresponding environmental and sustainability gains. To demonstrate the validity of the tools proposed, the paper presents an application example for a Car Parking controller, including results on a working prototype.

Introduction

Graphical debug and monitoring tools have always played a very important role in the development of embedded and automation systems. Due to the lack of resources and processing power available in hardware used to deploy these solutions, the tools have traditionally relied on software running on external personal computers.

However, the growing adoption of reconfigurable hardware platforms (ex. FPGAs) in embedded and industrial automation solutions brought increased processing power associated with the capability to generate high resolution images and interface with pointing devices, as mice and touch-screens, with no significant additional cost.

This paper presents a tool framework to the automatic generation of graphical debug, diagnostic and monitoring interfaces directly in FPGA hardware. This approach has many advantages over traditional solutions because the tools can be used after the development, test and validation phase terminates, to perform maintenance tasks and help diagnose mechanical and electrical faults.

The new tool takes advantage and extends a previous framework [START_REF] Moutinho | From models to controllers integrating graphical animation in FPGA through automatic code generation[END_REF] containing design and modeling tools based on IOPT (Input-Output Place-Transition) Petri nets [START_REF] Gomes | The Input-Output Place-Transition Petri Net Class and Associated Tools[END_REF], simulation and automatic code generation tools for micro-controllers or FPGAs, plus an Animator tool to produce Graphical User Interfaces associated with the IOPT model execution [START_REF] Gomes | Rapid prototyping of graphical user interfaces for Petri-netbased controllers[END_REF].

The proposed solution analyzes a PNML file [START_REF] Billington | The Petri Net Markup Language: Concepts, Technology, and Tools[END_REF] generated by the referred tool chain describing an embedded system controller and automatically creates a set of XML files to the Animator tool, containing a debug and monitoring animation screen. This screen contains a graphical image of the IOPT Petri net model and a set of animation rules to display the status of the model in real time, including net marking, transition status and input and output signals. The system designer can later integrate this animation screen in the final application user interface.

Contribution to technological innovation and sustainability

The main innovation presented in this paper is the capability to automatically generate debug and monitoring graphical interfaces for embedded systems, with zero additional design effort and negligible cost. The complete tool chain can generate full embedded system controllers for FPGAs, including the controller and an animated GUI with a debug and monitoring interface, without writing a single line of code.

Adding graphical debug and monitoring interfaces to embedded devices can have an enormous environmental impact and greatly contribute for sustainability. To better understand those impacts, embedded devices should be separated into two classes: industrial automation systems and end-user appliances.

Industrial automation systems generally have high availability requirements because downtime in one system can stall entire production lines, causing effective downtime over entire production plants, with the consequent delivery delays and high labour loss. In light of this problem, the performance of maintenance and technical assistance services is regarded with special importance.

Technical assistance interventions are generally characterized by a typical pattern: whenever an assistance call is received by an equipment supplier, a technical team is immediately scheduled to visit the costumer's site and diagnose the problem, returning home to fetch the required parts, followed by a second visit to implement a solution.

Embedding diagnostic and monitoring capabilities in the final systems can effectively break this pattern, as machine operators and the factory's maintenance engineers, with the help of the vendor's remote assistance, have the means to diagnose problems and identify damaged parts, reducing the number of travels to just one. Factory's maintenance engineers can even receive training to use autodiagnostic systems to solve most problems and replacement parts can be sent using express mail services, avoiding the need to send technicians altogether. This solution results in faster repair times, minimized down-times and equipment suppliers can operate with smaller technical assistance vehicle fleets, reducing energy consumption and contributing for sustainability.

Another indirect result is the reduction of redundant production units: to minimize downtime, industrial facilities generally purchase spare units of the most sensitive machinery. The number of redundant units is calculated according to past failure statistics (MTBF) and average repair time. Lower average repair times enable the reduction of spare units, contributing even more to sustainability.

Embedded systems present in end-user appliances can also benefit from internal diagnostic and monitoring interfaces. In this class of systems, a high percentage of technical assistance incidents is related to improper user operation and bad device configuration, as users did not receive adequate training, resulting in unnecessary travels to support centers. The addition of internal diagnostic graphical interfaces provide an effective way to simplify the communication between end-users and help-desk staff, allowing to solve most problems remotely.

When devices suffer from real defects, internal debug and diagnostic interfaces can provide the same gains experienced by industrial systems: end-users and helpdesk staff can cooperate, diagnosing failures remotely and making possible to send a technician with all the necessary parts to quickly solve the problem.

Due to the lack of capability to diagnose and solve problems in a single visit, most brand-name manufacturers strategy consists in immediately replacing systems covered by warranty with new units. This approach poses many environmental hazards, as the consumables present in the old systems are simply disposed as garbage and the old systems cannot be resold as new after repair, being often also disposed.

When appliances malfunction after warranties expire, there is a common perception that they are not worth repair, due to the low cost of new units, high transportation costs and high technical-center fees. This happens even when faults are caused by trivial problems as a loosen screw, a melted fuse or a wrong EPROM configuration.

The addition of integrated debug and diagnostic interfaces can help users detect most problems and repair the most trivial ones or use the service of local repair shops. These shops used to be very popular several decades ago, but the advent of ever increasing complex electronic devices, requiring the use of specialized diagnostic equipment, turned the repair of sophisticated electronic devices almost impossible. The addition of integrated diagnostic and debug interfaces can revive local repair shops and allow end users repair trivial problems, largely increasing the useful life cycle of consumer devices, minimizing the creation of hazardous garbage and contributing to great environmental and sustainability gains.

Comparison with present solutions

Debug and monitoring interfaces present in embedded systems development tools generally run on external computers connected to the physical embedded systems using special purpose data cables. This is the usual method employed in industrial programmable logic controllers. However, an industrial facility generally contains many systems from multiple vendors and it is not always possible to hold the development tools for all of them.

Even the development tools may not be enough to run diagnostics because the tools often require access to the real model files used during system development. However, equipment suppliers may deny access to the development model files to hide implementation secrets and to prevent unauthorized changes that may compromise safety and regulation compliance, leading to possible legal problems.

On the contrary, the diagnostic interfaces produced by the new tools are available to end users without requiring any dedicated hardware or software, yet do not allow system changes. To prevent access to implementation secrets, vendors can choose to install a simplified debug model, providing enough information to diagnose failures, but hiding sensitive information.

Most current end-user appliances include some degree of self-test and diagnostic utilities. For example, some printers have self-test pages and many devices generate error codes presented as display messages or blinking LED counts.

However, the self-test routines must be specifically programmed during the development phase and only detect typical failures predicted by system developers. On the contrary, the new tools do not require programming and automatically append a debug and diagnostic interface to the final system, helping diagnose all types of failures, including those not originally foreseen.

More importantly, the traditional diagnostic routines do not work when a device reaches a deadlock situation. To perform diagnostics the device must be restarted, failing to identify transient error conditions. In alternative, the new diagnostic interfaces run in parallel with the system controller and can be recalled at any time, independently of the main controller status and without causing any state changes, thus allowing the detection of deadlock and transient faults.

Finally, the error codes generated by current devices often have no value to the end users because the meaning of the codes is only available to manufacturer's technical staff. On the opposite, the new debug and diagnostic interfaces provide an intuitive animated graphical user interface, displaying the state of the system in real time as a Petri net model, which is the underlying modeling formalism.

Related work

Embedded systems design based on Petri net models has been the subject of many research publications, ranging from Low level nets [START_REF] Gomes | The Input-Output Place-Transition Petri Net Class and Associated Tools[END_REF] [START_REF] Coolahan | Timing requirements for time-driven systems using augmented Petri nets[END_REF] to High level colored nets [START_REF] Esser | An object oriented Petri net language for embedded system design[END_REF][7] [START_REF] Jensen | Basic Concepts[END_REF].

Most development frameworks based on Petri net models include debug and visualization interfaces [START_REF] Jensen | Basic Concepts[END_REF] [START_REF] Kummer | Renew -User Guide[END_REF], to exhibit the system state, but these tools generally work only during simulations running on personal computers and have not been ported to physical embedded devices. Some Petri net frameworks include tools to create interactive animations [START_REF] Jensen | Basic Concepts[END_REF][10]. For instance, the Colored Petri net Tools, a very successful modeling tool-chain, contains animation design tools [START_REF] Westergaard | The Britney suite animation tool[END_REF] [START_REF] Jorgensen | Addressing problem frame concerns via Coloured Petri nets and graphical animation[END_REF] to enhance user-friendliness and simplify communication with persons with no knowledge about Petri net formalisms.

Other authors have worked on automatic code generation from Petri net models [START_REF] Chachkov | From an abstract object-oriented model to a ready-to-use embedded system controller[END_REF][14] [START_REF] Costa | Petri nets tools framework supporting FPGA-based controller implementations[END_REF], to allow the rapid development of embedded applications. These tools automatically generate software source code and low level hardware descriptions implementing the behavior described by the model.

The contribution presented in this paper is based on a previous work [START_REF] Moutinho | From models to controllers integrating graphical animation in FPGA through automatic code generation[END_REF][3] combining automatic software and hardware co-generation with the capability to design animated graphical user interfaces for embedded systems. The animations are automatically generated from the original Petri net model and a set of rules associating the visibility and position of graphical objects, varying according to the system state evolution.

Using the previous tools, a designer could rapidly create embedded applications with sophisticated graphical user interfaces, without writing code and without needing deep understanding about software and hardware design, thus bringing embedded systems design to a much broader audience.

In fact, the previous generation of tools already included the capability to implement debug and diagnostic interfaces, but those interfaces had to be designed by human operators, drawing a background image and defining a large set of rules to display the system state, one at a time. However, this operation was repetitive, error prone and time consuming, specially with large models. In contrast, the new tool generates the desired results without any human intervention.

Development flow

The tools introduced in this paper are based on a development flow presented in [START_REF] Gomes | Towards usage of formal methods within embedded systems co-design[END_REF], beginning with the analysis of system behavior through the identification of patterns of use, leading to the creation of UML Use-Case diagrams. The captured use-cases will then be modeled using IOPT Petri nets [START_REF] Gomes | The Input-Output Place-Transition Petri Net Class and Associated Tools[END_REF], with the help of the Snoopy IOPT net editor. After a first version of the controller model is finished, the editor will generate a PNML [START_REF] Billington | The Petri Net Markup Language: Concepts, Technology, and Tools[END_REF] file, with the corresponding XML representation. This PNML file will be the base for all subsequent development steps.

IOPT nets are a non-autonomous Petri net class inheriting the characteristics from the well known Place-Transition nets [START_REF] Reisig | Petri nets: an introduction[END_REF], with the capability to associate input and output signals and events to model elements, enabling the deterministic specification of the interaction between models and the external environment. IOPTs also benefit from maximal step semantics, meaning that all autonomously enabled transitions will immediately fire as soon as the associated guard conditions and events are active. To enable automatic conflict resolution, IOPT nets include transition priorities and other characteristics, like test arcs and arc weights that improve modeling capabilities.

Automatic code generation is performed through two applications, PNML2VHDL and PNML2C, that create system controllers based on VHDL hardware descriptions or "C" source code, according to the desired embedded target device.

Using the PNML file as input to an "Animator" tool, the developer can create a graphical user interface, consisting of multiple screens containing animated graphical objects. The PNML model is used as a base to define a set of rules describing the evolution of the animated graphical objects.

The animations created in the previous step can be presented on a personal computer during model simulations, to debug, validate and correct the designed controller model. Another tool -GUIGen4FPGA -will automatically generate VHDL code and EEPROM image files, to enable the execution on FPGAs. To finally generate a running embedded application it is necessary to configure the physical hardware platform, through the association of model signal names and events to real FPGA pins, using a Xilinx UCF file.

The proposed development flow includes a simulation and animation step where the user can test and correct the designed model, returning to the first development stage whenever incorrect behavior is detected. However, the validity of the simulation phase largely depends on the ability to also model and simulate the physical environment surrounding the embedded controller, which can be a complex task. In those cases the validity of the models can only be checked on a physical prototype.

One of the goals of the present work is to provide tools to help debug and identify mistakes during the prototype test phase. This way, the former development flow has been improved and a new tool "PNML2Anim4Dbg" was developed to automatically generate debug and diagnostic animation screens. Figure 1 displays a diagram describing the improved development tool chain.

Implementation

The tool introduced in this work, "PNML2Anim4Dbg", receives input from a PNML file containing a IOPT Petri net model describing a system controller and automatically generates a set of XML files for the "Animator" tool.

As both the input and output files are encoded using XML, the XSLT (Extensible Style-sheet Transformation) [START_REF] Tidwell | XSLT[END_REF] framework was selected to implement the new tool, due to the capability to automatically validate syntactic grammars using DTDs or Schema and XML pattern matching, XML tree navigation and query tools (XPATH).

The usage of XSL transformations applied to PNML files is as old as the PNML format itself, since the first documents introducing the PNML standard [START_REF] Billington | The Petri Net Markup Language: Concepts, Technology, and Tools[END_REF], already proposed XSL transformations as a tool to convert models between different Petri net classes.

As seen in figure 2, the PNML2Anim4Dbg creates 5 files: A SVG background image, a «rul» file containing all generated animation rules, an «env» file associating a list of BMP image files to shortcut names present in the animation rules, an «ov» file with a list of output values generated by the controller and a «pdc» file containing a list of input signals and the corresponding user interface methods. The SVG background file contains an exact image of the IOPT model and can be edited and rearranged using most vector graphics editors, and finally converted to BMP format. During this phase it is possible to hide model comments and other superfluous information. Together with the SVG background image, a set of static image files is also appended to the animation project, containing pictures to display tokens inside places, signs to highlight the autonomously enabled transitions and LED signs to display active input and output signals.

The rules file contains a large set of rules to draw the correct number of tokens inside each place, to check if each transition is autonomously enabled and to check for active I/O signals. For more information about implementation details, the complete source code will be available online.

Complex hierarchical models, composed of several sub-net components, can be processed at different abstraction levels. Developers can choose simplified models showing only the top level components, full detailed models describing the entire system in a flat network, or create an hierarchy of multiple interface screens showing individual components. The tools do not require the entire model and can work with partial models, just requiring identifier consistency with the final controller system, maintaining the same place, transition and signal names.

Test and validation

To test and validate the new tools, a car parking lot controller IOPT model (fig. 3) was processed using the proposed development flow to automatically generate a working prototype with a debug and diagnostic interface. This model is simple enough to eliminate the need for a detailed explanation, yet allows the demonstration of the proposed tools.

Conclusion and future work

An embedded system prototype was created and tested using the proposed tools, demonstrating the capability to rapidly generate embedded applications with sophisticated user interfaces and embedded debug, monitoring and diagnostic interfaces, using IOPT models and without the need to write any line of software code or design hardware components.

The new tools fully automate the task of diagnostics interface creation, generating a solution with minimal hardware requirements, just needing a few hundred Kbytes of EPROM space to store the debug interface images and some FPGA space to implement the animation rules. However, as most rules share code with the controller implementation, the VHDL logic optimizer tools will greatly simplify the generated hardware, removing duplicate signals. For example, both the controller and debug animation modules check if transitions are autonomously enabled and will share the same hardware. Image compression techniques, as simple as RLE encoding, can further reduce the total EPROM memory consumption to less than 50Kb per animation screen, with performance gains and no additional complexity.

Although the prototype was implemented using a standard FPGA development kit, it is possible to use the same tools to create very low cost production embedded controllers using dedicated PCB boards, requiring just one FPGA/ASIC chip, 2Mb of video RAM memory, one EEPROM, voltage regulators, interface logic and connectors, competing with the equivalent micro-controller based solutions.

As a result, in the near future will be possible to add debug and diagnostic interfaces to many embedded devices with no additional labour cost and irrelevant hardware cost increments, turning all the environmental and sustainability gains described in chapter 2 into a reality.

Future work include image the possibility to add pause and step-by-step execution capabilities to the generated interfaces. While the implementation of step-by-step execution mechanisms during simulation and software execution is trivial, it can pose technical challenges for hardware implementations, specially on asynchronous systems. Pausing and step-by-step execution on real hardware devices can create additional difficulties because certain real-time functions cannot be safely interrupted without the risk of causing permanent damages to external hardware and mechanical components. To solve this problem, additional work must be carried on.

Fig. 1 .

 1 Fig. 1. Proposed development framework

Fig. 2 .

 2 Fig. 2. PNML2Anin4Dbg data flow Although other XSLT based PNML to SVG converters were available [19], a new IOPT2SVG transformation was created, to account with the non-autonomous nature of IOPTs, including input and output signal graphical representations, different test and normal arc representations, transition priorities, etc.The SVG background file contains an exact image of the IOPT model and can be edited and rearranged using most vector graphics editors, and finally converted to BMP format. During this phase it is possible to hide model comments and other superfluous information. Together with the SVG background image, a set of static image files is also appended to the animation project, containing pictures to display tokens inside places, signs to highlight the autonomously enabled transitions and LED signs to display active input and output signals.The rules file contains a large set of rules to draw the correct number of tokens inside each place, to check if each transition is autonomously enabled and to check for active I/O signals. For more information about implementation details, the complete source code will be available online.Complex hierarchical models, composed of several sub-net components, can be processed at different abstraction levels. Developers can choose simplified models showing only the top level components, full detailed models describing the entire system in a flat network, or create an hierarchy of multiple interface screens showing individual components. The tools do not require the entire model and can work with partial models, just requiring identifier consistency with the final controller system, maintaining the same place, transition and signal names.

Fig. 3 .

 3 Fig. 3. Demonstration example IOPT modelThe hardware prototype was implemented using a Xilinx Spartan 3A 1800 Video Kit, including a Spartan 3A-DSP 1800 Starter Board, an Avnet EXP PS Video Module and a 1024x768 LCD panel. The starter board contains an FPGA and several memory devices, including a parallel flash EPROM to store images and a DDR2 RAM memory used to implement a video frame buffer.

Fig. 4 .

 4 Fig. 4. Prototype photos -Application GUI on the left and debug interface on the right Figure 4 displays photos of the prototype showing the Parking Lot animation screen and the corresponding debug and diagnostic screen. The car parking lot model contains one entrance, one exit, parking places for up to N vehicles, entry and exit barriers and inputs representing entry and payment sensors.

Acknowledgment.

The third author work is supported by a Portuguese FCT grant ref. SFRH/BD /62171/2009.


Carlos Carvalho

Guilherme Lavareda

Nuno Paulino
email: nunop@uninova.pt

A DC-DC Step-up µ µ µ µ-Power Converter for Energy Harvesting Applications, using Maximum Power Point Tracking, Based on Fractional Open Circuit Voltage

Keywords: Electronics, CMOS circuits, Energy Harvesting, Power management circuits, Maximum Power Point Tracking, Amorphous Silicon Solar Cell

A DC-DC step-up micro power converter for solar energy harvesting applications is presented. The circuit is based on a switchedcapacitor voltage tripler architecture with MOSFET capacitors, which results in an area approximately eight times smaller than using MiM capacitors for the 0.13µm CMOS technology. In order to compensate for the loss of efficiency, due to the larger parasitic capacitances, a charge reutilization scheme is employed. The circuit is self-clocked, using a phase controller designed specifically to work with an amorphous silicon solar cell, in order to obtain the maximum available power from the cell. This will be done by tracking its maximum power point (MPPT) using the fractional open circuit voltage method. Electrical simulations of the circuit, together with an equivalent electrical model of an amorphous silicon solar cell, show that the circuit can deliver a power of 1132 µW to the load, corresponding to a maximum efficiency of 66.81%.

Introduction

There is an emerging need to power applications in an autonomous fashion. This need results from the fact that it may not be practical to plug the device to the power grid, nor to use batteries, as they need to be replaced when their charge is depleted. A solution to this problem, that is being increasingly used, is to power the application by collecting the energy that exists in the surrounding environment; this is known as energy harvesting, or energy scavenging, and has been growing in importance. By employing energy harvesting, circuits can virtually operate permanently. As such, there is no need to plug the circuit to the power grid, or to power it by using batteries.

Energy can be harvested from different sources: light (solar [START_REF] Chalasani | A survey of energy harvesting sources for embedded systems[END_REF], [START_REF] Paradiso | Energy scavenging for mobile and wireless electronics[END_REF] or artificial [START_REF] Hande | Indoor solar energy harvesting for sensor network router nodes[END_REF]), mechanical [START_REF] Paradiso | Energy scavenging for mobile and wireless electronics[END_REF] (usually vibrations), thermal gradients [START_REF] Paradiso | Energy scavenging for mobile and wireless electronics[END_REF], or electromagnetic [START_REF] Chalasani | A survey of energy harvesting sources for embedded systems[END_REF]. Each of these energy sources has its own advantages and drawbacks, but they all share a common limitation, which is low energy density. This means that the available power for a small energy harvesting powered system will be limited. Amongst of all, ambient light has the highest energy density when compared to other possible ambient energy sources [START_REF] Chalasani | A survey of energy harvesting sources for embedded systems[END_REF]. The power and the voltage produced by a solar cell vary with the connected load and with the amount of incident light. Thus, it is necessary to increase the voltage supplied by a single solar cell to an acceptable value by most circuits (at least, 1 V). So, it is necessary to use a step-up power converter circuit, which in this paper, is based on a switched-capacitor voltage tripler architecture, using 0.13µm CMOS technology MOSFET capacitors. This circuit uses an asynchronous state machine to produce a variable frequency clock, regulating the input voltage of the converter (output of the solar cell) to a nearly constant value, corresponding to the maximum power point (MPP). The objective is to dynamically adjust the working input voltage to the MPP voltage value. The output voltage value is maximized when this occurs. This step-up converter circuit tries to harvest as much energy as possible out of the solar cell using a maximum power point tracking (MPPT) approach. There are many MPPT approaches, varying with the availability of resources and the intended application [START_REF] Esram | Comparison of Photovoltaic Array Maximum Power Point Tracking Techniques[END_REF]. Amongst these approaches, the Fractional Open Circuit Voltage (Fractional V OC ), is the one used in this work.

The research question associated to this work, is if it is possible to join an asilicon solar cell to a voltage tripler and an MPPT method, and to get a reasonable efficiency performance. The hypothesis for such a combination is explored in the present paper.

Contribution to Sustainability

As the purpose of this system is based on energy harvesting, it can operationally contribute for environmental sustainability. The energy used to power the circuit and the energy that the converter provides, besides being non-polluting, it is also free. Moreover, by excluding the use of batteries, there is no need to dispose them of, avoiding additional pollution, nor the use of additional chemicals than those used to manufacture the circuit itself.

Novel Results, Contributing to Technological Innovation

The work described in this paper is a fundamental block of a self-powered system using energy harvesting, to be implemented in 0.13 µm CMOS technology. There are some innovative aspects in the present work, which include the use of cheaper solar cells (made from amorphous silicon), the combination of NMOS and PMOS devices to implement a voltage step-up regulator and the use of a local supply module to power a phase generator. This local supply strategy allows for a more robust command over the switches in the main step-up converter section.

The ability of being self-powered is very important for electronic systems that are intended to monitor and gather information, in locations where it is difficult or even impractical, to obtain energy by normal methods. In such inaccessible places, an energy independent system, with low installation and operation costs, enhances the benefits of the energy harvesting facet, widening or even opening new possibilities of applications.

Electrical Model of the Amorphous Silicon Solar Cell

An a-Silicon photovoltaic cell was built by depositing amorphous silicon with a structure p/i/n on a glass previously covered with ITO (Indium Tin Oxide). The ITO was deposited using rf-PERTE (radio-frequency Plasma Enhanced Reactive Thermal Evaporation) and had a sheet resistance of 35 Ω/ . The active p-type, intrinsic and n-type layers were deposited using PECVD (Plasma Enhanced Chemical Vapor Deposition) and had a thickness of 150Å, 4500Å and 500Å respectively. The frontal aluminum electrode was deposited using thermal evaporation [START_REF] Amaral | Influence of the a-Si:H structural defects positron annihilation on the solar cells characteristics[END_REF]. The solar cell was experimentally characterized and an equivalent electrical model, shown in Fig. 1-a), was obtained. This solar cell has a short circuit current of about 5.9 mA, a maximum power of 1775 µW that occurs for a voltage of 403 mV (maximum power point) and an open circuit voltage of 652 mV. These data refer to a cell having an active area of about 1 cm 2 , when irradiated according to AM1 (Air Mass 1) conditions (irradiance by the solar spectrum at the earth surface, having the Sun vertically located). The resulting power and current curves of the cell are depicted in Fig. 1-b).

Since the MPP voltage is small (around 400 mV) a SC voltage tripler circuit must be used in order to obtain an output voltage value around 1.1V. The impedance that this circuit presents to the solar cell must be adjusted in order for the solar cell voltage to become approximately equal to the MPP voltage.

Maximum Power Point Tracking, Based on Fractional Open Circuit Voltage

There are several methods available to track the maximum power point (MPP) of a solar cell [START_REF] Esram | Comparison of Photovoltaic Array Maximum Power Point Tracking Techniques[END_REF], in order to achieve efficiencies as high as possible. Some of these methods can track the true MPP of the cell; however they typically require complex circuits or computational effort, namely the ability to perform multiplications. If some inaccuracy in the determination of the MPP is accepted, it is possible to use simpler methods that require less complex circuits. In this application where the total available power is very low, these simpler methods can be preferable. As such, the Fractional Open Circuit Voltage (Fractional V OC ) method was chosen, because it is a very simple and inexpensive (hardware wise) method. This method explores an intrinsic characteristic of cells: there is a proportionality factor between their open circuit voltage and the voltage at which the MPP occurs. This factor must be determined beforehand, by studying the solar cell behavior under several conditions of illumination and temperature. By performing a linear regression over the points plotted on the obtained graphs, the same way as in [START_REF] Brunelli | Design of a Solar-Harvesting Circuit for Batteryless Embedded Systems[END_REF], one can determine the slope of these functions. By sweeping a range of temperatures that spanned from -55ºC to +125ºC, the ratio V MPP /V OC was around 0.84. By sweeping illumination, the ratio V MPP /V OC was around 0.76. Assuming that illumination has more importance, as it is more likely to vary, a value of 0.77 was selected for k, the fractional V OC coefficient. This value agrees with the ones stated in [START_REF] Esram | Comparison of Photovoltaic Array Maximum Power Point Tracking Techniques[END_REF].

A pilot solar cell that is in open circuit (unloaded), is used to measure the open circuit voltage. The optimum voltage of the loaded solar cell (MPP), is determined by multiplying the open circuit pilot voltage by k, using a resistive divider. This voltage is known as the fractional V OC . Resistors must be high enough to preserve the open circuit assumption for the pilot cell. The pilot solar cell can be smaller than the main solar cell and it must have the same temperature and illumination as the main cell, in order for the fractional V OC to accurately track the MPP voltage. The MPP tracking is implemented by adjusting the switching frequency of the SC voltage tripler. When the fractional V OC is larger than the solar cell voltage this means that the impedance of the SC circuit is small and therefore it is necessary to decrease the switching frequency in order to increase the impedance, thus increasing the solar cell voltage. If the V OC voltage is smaller than the solar cell voltage, it is necessary to increase the switching frequency in order to decrease the impedance of the SC circuit and therefore decrease the solar cell voltage. This process will result in a switching frequency value that allows the SC voltage tripler circuit to have an impedance value that causes the MPP voltage in the solar cell, as illustrated by the arrows in the graph depicted in Fig. 1-b).

Switched Capacitor Voltage Tripler Circuit with Charge Reusing

The circuit of the SC DC-DC converter is shown in Fig. 2. The principle of operation of this circuit is the same of the switched-capacitor voltage tripler [START_REF] Zhu | Switched-capacitor power supplies: DC voltage ratio, efficiency, ripple, regulation[END_REF]. During phase φ 1 , the MOS capacitors of the upper half circuit, M 1 and M 3 , are charged with the input voltage value (v in ) and then, during phase φ 3 , they are connect in series with the input voltage source. If there were no losses, this would result in an output voltage (v out ) approximately three times larger than the input voltage value. Although using MOS capacitors instead of MiM capacitors results in a significant reduction of the occupied area, there is also an increase in the parasitic capacitances of the bottom plate nodes, leading to a decrease in the efficiency of the circuit. In order to reduce the amount of charge lost in these parasitic capacitances, the circuit is split into two halves. The top half is composed by M 1 and M 3 and the bottom half is composed by M 2 and M 4 . The bottom half works in the same way as the top half, with phase φ 1 changed with phase φ 3 .

During an intermediate phase (φ 2 ), the bottom plate nodes of both MOS capacitors of the upper and lower half-circuits are connected together, thus transferring half of the charge in one parasitic capacitance to the other, before the bottom nodes are shorted to ground. This reduces by half the amount of charge that is lost in the parasitic capacitance nodes. The clock phases are generated by the phase controller circuit that will be described next. The output voltage of the circuit depends on the value of the load resistance (R L ). This means that this voltage cannot be used to power the phase generator. Therefore, a smaller SC voltage tripler, controlled by the same clock, is used to create a local power supply. This circuit is a replica of the one inside the dashed rectangle in Fig. 2, but scaled to 3% of its area, as this ratio yielded the best results.

Phase Generation and Control

The three clock phases necessary for the operation of the SC voltage tripler circuit are generated by an ASM circuit that automatically adjusts the clock frequency in order to obtain the MPP voltage from the solar cell. This circuit is depicted next in Fig. 3. The operation of this circuit is similar to the one described in [START_REF] Carvalho | A MOSFET only, step-up DC-DC micro power converter, for solar energy harvesting applications[END_REF]. This circuit has four states that are determined by the output of four latches. These states correspond to the clock phases φ 1 , φ 2 , φ 3 , and again φ 2 . In order to change from one state to the next, the Set signal of one latch is activated, changing the output of that latch from 0 to 1. This, in turn, activates the Reset signal of the previous latch, causing its output to change from 1 to 0, thus completing the state change. A start-up circuit (described in [START_REF] Carvalho | A MOSFET only, step-up DC-DC micro power converter, for solar energy harvesting applications[END_REF]) generates a reset signal that guarantees that the first state is state1. The ASM is continually changing from one state to the next (and then from state4 to state1), in order to create the clock phases. The maximum frequency of operation is defined by the delay circuits (described in [START_REF] Carvalho | A MOSFET only, step-up DC-DC micro power converter, for solar energy harvesting applications[END_REF]) inserted between the output of each latch and the Set input of the next latch. The transitions between state, state2, state3 and state4 are delayed by comparators that guarantee that the MOS capacitors connected to the solar cell are charged to at least 95% of the input voltage (V MOSa >v B and V MOSb >v B ). The duration of state1 (phase φ 1 ) is also dependent on the comparison between the solar cell voltage (v in ) and the fractional V OC , obtained from the pilot solar cell (v MPP ). When the capacitors are connected to the solar cell (in the beginning of φ 1 ), the voltage v in drops a little. The time it takes to recover to its previous value, and the fractional V OC , depends on the temperature and illumination. Therefore the duration of the period corresponds to the frequency value that adjusts the input voltage to the MPP voltage value.

Simulation Results

This step-up converter was designed to work with an amorphous solar cell, with an area of about 1 cm 2 , able to supply a maximum power of 1775 µW, at a MPP voltage of 403 mV. The efficiency and power values of the circuit for different load resistance values obtained through electrical simulations in Spectre, are shown in Fig. 4-a). This graph shows that when the load resistance is 1.05kΩ, the maximum efficiency of the circuit is 66.81%, for a power delivered to the load of 1132 µW and a solar cell power of 1694 µW. In this situation, v in converged to 450 mV. This value does not match the optimal input voltage of 403 mV, because the Fractional V OC method may not reach the true MPP voltage, as it depends upon k, which is an average value obtained from the studied situations taken beforehand. This problem is not very important since the power available from the cell does not change significantly around the MPP voltage. From a theoretical point of view, as stated in [START_REF] Zhu | Switched-capacitor power supplies: DC voltage ratio, efficiency, ripple, regulation[END_REF], the maximum achievable efficiency of an ideal converter with an input voltage of 450 mV and an output voltage of 1.090 V (which was the value of v out in this situation) would be 80.74%. In this situation, the phase generator circuit dissipates 32.47 µW. The frequency of the clock phase φ 1 in this load condition is 1.245 MHz. In order to determine how much is the efficiency penalty by using MOS transistors, instead of MiM capacitors, a simulation where the MOS transistors were replaced by MiM capacitors of the given technology was performed. In this case the maximum efficiency increased to 74.59%, which is not significant, given the die area tradeoff. The evolution of the input, local supply, output and optimal input voltages, during start-up (and transient operation), is shown in Fig. 4-b). Electrical simulations showed that the system can converge, in order for the cell to provide the voltage at which the MPP is achieved. This system can start-up with loads starting as low as 100Ω. It is possible to have such a significant load connected to the output during start-up because the load of the local supply module is not very significant, allowing for the phase controlling signals to be correctly defined.

In order to check the robustness of the MPP tracker circuit when experiencing a sudden illumination change, Fig. 4-b) also shows how the circuit behaves under a irradiance-transient operation, when illuminated by 100% and 30% of the maximum value. It is seen that the circuit is able to track the optimal input voltage in both situations. Clock signal φ 1 decreases its frequency when a lower irradiance level is present, because the amount of available charge from the solar cell is also lower.

Conclusions

A step-up micro-power converter for solar energy harvesting applications was presented. The circuit is based on a switched-circuit voltage tripler architecture, with MOSFET capacitors of the 0.13 µm CMOS technology, which results in a total circuit area approximately eight times smaller than using MiM capacitors of the given technology. In order to compensate for the loss of efficiency due to the larger parasitic capacitances, a charge reutilization scheme was employed. The circuit uses a phase controller, designed specifically to work with an amorphous solar cell, in order to track the MPP of the cell, using the fractional V OC method. To implement this method, a previous study of the cell characteristics must be carried out, regarding illumination and temperature. The controller is powered by a local supply circuit to ensure that the phase signals that control the main switches are well defined. Electrical simulations of the circuit together with an equivalent electrical model of the amorphous solar cell, have shown that the circuit can deliver a power of 1132 µW to the load and a total circuit power dissipation of 1694 µW, corresponding to a maximum efficiency of 66.81%. This efficiency value is similar to the one obtained in [START_REF] Shao | The Design of a Micro Power Management System for Applications Using Photovoltaic Cells With the Maximum Output Power Control[END_REF], meaning that the hypothesis proposed in this paper is able to meet the requirements formulated in the research question. When using the MiM capacitors of the 0.13 µm CMOS technology, the increase of efficiency to 74.59% is not significant, considering the eight times less die area tradeoff. When the solar cell experiences irradiance variations, the phase controller circuit can effectively track the MPP, as it shifts from its previous value.

Fig. 1 .

 1 Fig. 1. a) Equivalent electrical circuit of the amorphous silicon solar cell and b) Power and current curves of the solar cell equivalent circuit model for maximum illumination and 30% of maximum illumination (higher and lower curves, respectively).

Fig. 2 .

 2 Fig. 2. Schematic of the SC voltage tripler circuit with charge re-utilization.

Fig. 3 .

 3 Fig. 3. Phase controller schematic.

  Supply and Output voltages (V) Output voltage (vout) Local supply voltage (vdd) Input voltage (vin) Optimal input voltage (vMPP) b) Fig. 4. a) Efficiency, input power, output power and phase controller circuit power as a function of the power delivered to load and b) Evolution of v in , v dd , v out and v MPP , during start-up and transient operation (lower illumination between 200 and 500µs).

Acknowledgments. This work was supported by the Portuguese Foundation for Science and Technology (FCT/MCTES) (CTS multiannual funding) through the PIDDAC Program funds.


André Cavalheiro

Diolino Santos

Aron Andrade

José Roberto Cardoso

Eduardo Bock

Jaison Fonceca

Paulo Eigi Miyagi

Design of Supervisory Control System for Ventricular Assist Device

Keywords: Ventricular Assist Device, Petri nets, Safety Instrumented System

When a patient have severe heart diseases, Ventricular Assist Device (VAD) implantation may be necessary. However, the improvement of the interaction between the device and the patient's behavior is crucial. Currently, the control of these pumps does not follow changes in patient behavior and the devices are no safe. Therefore, if VAD has no faults tolerance and no dynamic behavior according to the cardiovascular system performance, there is a serious limitation on expected results. This research investigates a mechatronic approach for this class of devices based on advanced techniques for control, instrumentation and automation to define a method for developing a hierarchical supervisory control system to control a VAD dynamically and securely. To apply this method, concepts based on Petri nets and Safety Instrumented Systems are used. This innovation reduces the interventions and unnecessary drugs, enabling a reduction of deposable material and patient hospitalization, and contributes to sustainability concept..

Introduction

The increase of resources consumption on the world is one of the main features that justify the use of sustainability concept on methods for projects development. In this sense, automation can help to optimize the resources utilization and to improve devices performance. Thus, this work proposes a development of Ventricular Assist Device (VAD) to aid patient with heart failure to be able to have relatively normal life despite the disease applying sustainability concepts. This device can be used in several cases during the period that patient is waiting for heart transplantation, during a pre or postoperative recovery period, or as destination therapy when the patient has no indication for heart transplantation due to several reasons [START_REF] Wada | Review of the spiral pump performance test, during cerdiopulmonary bypass, in 43 patients[END_REF][START_REF] Andrade | Auxiliary total artificial heart: A compact electromechanical artificial heart working simultaneously with the natural heart[END_REF][START_REF] Fonseca | In vivo tests with the auxiliary Total Artificial Heart as a left ventricular assist device in calves[END_REF]. VAD projects involve many research areas: mechanical and electromechanical engineer, biomaterial, medicine, and also computer technologies for data collection, processing and making decision, therefore, sensors to indicate blood pressure, blood flow, body temperature and cardiac frequency are necessary [START_REF] Ohashi | Control System Modification of an Electromechanical Pulsatile Total Artificial Heart[END_REF]. Figure 1 represents how the VAD interacts with the cardiovascular system. In this context, two main aspects must be considered:

• First: device shall demonstrate correct and accurate performance; otherwise, if the pump fail during operation and there is no embedded system that enables the treatment of faults autonomously, serious risks to patient will be inevitable. • Second: many VADs maintain constant blood flow regardless to patient daily needs [START_REF] Fonseca | A New Technique to Control Brushless Motor for Blood Pump Application[END_REF], ie, they help blood circulation and do not react properly to changes [START_REF] Bock | New Centrifugal Blood Pump With Dual Impeller and Double Pivot Bearing Wear Evaluation in Bearing System, Performance Tests, and Preliminary Tests[END_REF]. Therefore, if VAD has no faults tolerance and no dynamic behavior according to the cardiovascular system performance serious limitation on results from this application may be observed. This work proposes application of a mechatronic approach based on advanced techniques for control, instrumentation and automation. These techniques allow treatment of fundamental limitations of current solutions. So, we propose a method for specifying a supervisory control system for a VAD that:

• Specify a logic for pump speed control, according to patient's dynamic behavior. Models based on Bayesian networks (BN) [START_REF] Cooper | A Bayesian method for the induction of probabilistic networks from data[END_REF] should be applied to diagnose patient's dynamic state, at every moment and to act in VAD control. • Specify a logic for safety interlock to prevent faults in VAD. We must diagnose the critical states by using BN and implement a diagnosis system by using Petri nets (PN). Once implemented the diagnosis control system, in parallel, should be implemented faults treatment according to specification of safety instrumented functions (SIFs) [START_REF] Squillante | Safety instrumented system designed based on Bayesian network and Petri net[END_REF][START_REF] Pearl | Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference[END_REF]. These functions must be modeled in PN [START_REF] Matsuno | Biopathways representation and simulation on hybrid functional Petri net[END_REF] for generating the control algorithm for faults treatment.

• Check the mathematical model of supervisory control system according to its interaction with a model of human cardiovascular system [START_REF] Mahdi | Mathematical Modelling and Electrical Analog Equivalent of the Human Cardiovascular System[END_REF][START_REF] Reed | Heart sound analysis for symptom detection and computer-aided diagnosis[END_REF][START_REF] Sainte | Modeling and estimation of the cardiac electromechanical activity[END_REF]. So, supervisory control system can be implemented and specified for in vitro and in vivo testing in a consistent way.

Technological Innovation and Sustainability

There are three conflicting aspects that are considered if a new strategic approach as "Sustainability research" is adopted, i.e., contributing to economic development, being ecologically acceptable and socially just [START_REF] Zickler | Science for Sustainability: The Potential for German-Brazilian Cooperation on sustainability-oriented Research and Innovation -Introduction[END_REF]. This approach will guide sustainable solutions that have to be more effective and efficient spending of public and private funds for research and development. To do the sustainability and make this a brand for the 21st century requires a strong engagement of science, industry and politics.

Considering also previous works in the area of VADs, here we adopt the approach of a hybrid system presents dynamical behavior in which simultaneous evolution of continuous and discrete state variables occurs, ie, Continuous Variable Systems (CVS) behavior merge with Discrete Event Systems (DES) behavior [START_REF] Ho | Discrete Event Dynamic Systems : Analysing Complexity and Performance in the Modern World[END_REF]. Considering the requirement that a VAD needs to perform control functions to adjust pump speed according to changes on cardiac frequency and needs to react against occurrence of critical faults, we proposed a hybrid supervisory control system [START_REF] Villani | Landing system validation based on Petri nets and a hybrid approach[END_REF].

In this context, this research will contribute to add to VAD the following features: rational use of energy, minimization of operational costs and larger safety and comfort to the users. Then, this work is also a contribution for the technological innovation in design methods of VADs.

Materials and Methods

Production Flow Schema (PFS) is a technique that can be used to model the set of activities that VAD can perform. The PFS is a bipartite graph composed of activity elements (action, execution), distributing elements (collect, accumulate and/or store information or items) and oriented arcs to connect the elements. Figure 2(a) shows the graphical representation of these elements.

Details of each activity modeled in PFS can be refined using PN which are capable of representing dynamic behavior of device. As VAD has continuous variables, Hybrid Petri Nets (HPN) are necessary.

HPN model has been introduced as extension of discrete PN model been able to handle real numbers in continuous way and allowing us to express explicitly the relationship between continuous values and discrete values while keeping good characteristics of discrete PN soundly. In HPN model, two kinds of places and transitions are used: discrete/ continuous places and discrete/continuous transitions. A continuous place holds a nonnegative real number as content. A continuous transition fires continuously in the HPN model and its firing speed is given as function on model places. Figure 2(b) shows graphical notations of HPN elements [START_REF] Matsuno | Biopathways representation and simulation on hybrid functional Petri net[END_REF]. The refinement of a model generated in PFS for a model in HPN is made based on the procedure adopted in Villani [START_REF] Villani | Landing system validation based on Petri nets and a hybrid approach[END_REF]. For modeling of diagnosis and treatment of critical faults, we are using the concept of Safety Instrumented System (SIS) and BN. According to Squillante [START_REF] Squillante | Safety instrumented system designed based on Bayesian network and Petri net[END_REF] SIS is a layer of control in order to mitigate the risk or taking the process in a safe state. Definition of faults is made from the identification of Safety Instrumented Functions (SIF). In this way, a SIF describes a critical fault that should be diagnosed and treated by SIS. A SIS implements its SIFs through sensors and devices perform control by actuators. For each SIF a parameter called Safety Integrity Level (SIL) is defined. This parameter is a measurement of safety for components and/or systems. SIL reflects what end users can expect from a device and/or system in a safety function, and in case of fault, this occurs in a safety way. BNs provide formalism for reasoning about partial beliefs under uncertainty conditions. The propositions are as numerical parameters signifying the belief degree according to some evidence or knowledge. So, formally, BNs B = (G; Pr) are made up by a topological structure G and a set of parameters Pr that represents probabilistic relationship among their variables [START_REF] Squillante | Safety instrumented system designed based on Bayesian network and Petri net[END_REF][START_REF] Pearl | Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference[END_REF].

Therefore, to develop a design for supervisory control system for VAD, according to the modeling techniques presented above, proposes a method for developing the VAD a supervisory system shown in Figure 3: The sequence proposed aims to organize the activities involved to develop control system design applied to VAD. So, these activities (represented by the elements of the activity model in the scheme proposed PFS) are presented briefly:

• Definition of control functions -A team of doctors and engineers defines the degree of autonomy of VAD control system. The team responsible control system development needs to select ideas that are possible to be implemented taking into account: sensors available, VAD performance characteristics and technological limitations. At this stage, a table with VAD control functions is specified.

• Modeling of Patient Diagnosis -Initially, diagnosis model involves

development of a cause and effect matrix, which is basis for a BN. Then, this network can be converted into a HPN model. • Modeling of treatment for diagnosed problems -From HAZOP (hazard and operability) [START_REF]Electronic / Programmable Electronic Safety-related Systems (IEC 61508)[END_REF] study the risk analysis report from VAD is obtained. Based on this information, we have the SIF, SIL and events (from sensors) and actions (to actuators) for each SIF. Next, diagnostic model and corresponding SIFs are modeled in HPN for control system design.

• Solution Analysis -First, structural analysis of HPN model of diagnostic process is made. Next, it is checked if the HPN has no deadlock states (markings where no transition is enabled). For at, a simulator [START_REF]Visial Object Net[END_REF] can be used. • Control algorithm programming -A Programmable Controller (PC) is an essential equipment for implementation of control systems. Consequently, standards have been set for this equipment allowing the reuse of existing software modules and ensuring high quality solutions, especially for conditions that require security methods for verification and validation. Thus, it is necessary to adopt following procedure: generation control program in programming language according to IEC 61131-3 [START_REF]IEC, International Electrotechnical Commission, Programmable Controllers Part 3, Programming Languages[END_REF], based on conversion of HPN models. • In vitro validation for control algorithm -Control algorithms can be validated using mathematical model that simulates human cardiovascular system. The entire electrical equivalent of the model is shown in Figure 4. The electronic parameters are correlated to their mechanical parameters as follows: voltage (volt) is analogous to pressure (mmHg), capacitance (lF) to compliance (ml/Pa), resistance (kX) to resistance (1 Pa.s/ml), and inductance (1lH) to inertance (1 Pa.s2/ml) [START_REF] Mahdi | Mathematical Modelling and Electrical Analog Equivalent of the Human Cardiovascular System[END_REF]. The elements of each artery including one or two resistor, an inducer and a capacitor. Figure 4(a) belongs to the arteries with the radius of less than 0.2 cm and figure 4(b) belongs to the rest of the arteries. The architecture used to validate VAD control with cardiovascular system presented in Figure 1. Next step is prototype implementation that can be validated by a simulator of cardiovascular system. Currently, the Institute Dante Pazzanese of Cardiology (IDPC) has a programmable mechanical simulator that performs in vitro testing and is able to simulate real situations that can occur in patient's behavior [START_REF] Andrade | An electro-fluid-dynamic simulator for the cardiovascular system[END_REF]. • In vivo validation for control algorithm -After simulation and in vitro validation of control algorithm, VAD is ready for in vivo tests in calves [START_REF] Andrade | Auxiliary total artificial heart: A compact electromechanical artificial heart working simultaneously with the natural heart[END_REF]. Applying this set of procedures, is definition of a method for supervisory control system design is possible and capable to provide changes in VAD rotation speed, according to changes in cardiac frequency of patient, and can improve security and quality of life for patient who needs this type of device.

Discussion of Results and Contributions

The project of the control system of VAD according to the procedure previously considers:: (i) critical faults from HAZOP study for VAD, (ii) BN for diagnosis and decision, (iii) definition of Safety Instrumented Functions (SIF) using HPN and (iv) modeling of supervisory control system considering discrete and continuous variables of VAD. The result is the logical ordering of supervisory control system functions that are shown in Figure 3 based on PFS formalism (Figure 5). To implement this control system for VAD at IDPC is proposed the architecture according to Figure 6. According to this work proposal, each activity of model presented at PFS of Figure 5 is represented by a place on HPNs, and the marks can represent local and global states of VAD control system. Transitions are synchronized with human body reactions through adequate sensors. Oriented arcs can define the sequence for control functions processing. Therefore, we apply obtain VAD control algorithm based on proposed method in the proposal control architecture as show in Figure 6. Therefore, the control system proposed can improve VAD and can fit patient needs providing better patient quality of life and longer survival. Supervisory system can also assist in diagnosis and in interventions to maintain VAD functions.

Conclusion

The VAD under development at IDPC presents difficulties concerning blood flow adjustment according to patient state: there is no device supervisory control that can adjust rotation speed based on patient needs and there is no treatment of VAD faults that can help patient's safety. With a control system automatic and dynamic is possible that VAD adjust patient needs, providing a higher quality of life and enabling a patient survival. The supervisory system can also assist in diagnosis and possible interventions that doctors need to VAD control. Thus, VAD system may be adapted to the patient needs, keeping security and provides risks reduction. Therefore, VAD supervisory control system proposed offers advantages compared to currents VADs control systems.

This study contributes to have a customized VAD considering the patient's illness and different metabolism. Moreover, Safety Instrumented System concept is essential to provide risk reduction that might interfere in VAD functioning and in patient's life.

Future works

About the method to obtain VAD control architecture:

• Make research about a most efficient method for setting requirements to improve control system autonomy, concerning items complexity to determine the control and security system and to optimize process to obtain supervisory system. About sensors and actuators used:

• Work to improve sensors to make them less invasive and allow to provide signals with higher quality and precision; • Work to improve the dynamic pump features to improve system efficiency.

• Add block valves to VAD applying new technologies and using biomaterials.

Fig. 1 .

 1 Fig. 1. VAD and cardiovascular system

Fig. 2 .

 2 Fig. 2. (a) Production Flow Schema elements; (b) Basic elements of Hybrid Petri Net [9]

Fig. 3 .

 3 Fig. 3. Method for supervisory control system design applied to VAD;

Fig. 4 .

 4 Fig. 4. (a) Electronic elements equivalents arteries with radius less 0.2 cm (b) others arteries.

Fig. 5 .

 5 Fig. 5. PFS model to VAD supervisory control system.

Fig. 6 .

 6 Fig. 6. Control architecture proposed.

Acknowledgments. We are grateful support of FAPESP and MEC/CAPES/PET.