models the decision making process of the UAV simulation; tasks nets are built from primitive UAV behaviors and environm
A Petri Net Based Software Architecture for UAV Simulation Dianxiang Xu, Priti Borse, Ken Grigsby, and Kendall E. Nygard Department of Computer Science North Dakota State University Fargo, ND 58105 {dianxiang.xu, priti.borse, ken.grigsby, kendall.nygard}@ndsu.nodak.edu
Abstract This paper presents a Petri net-based hierarchical architecture for multiple Unmanned Aerial Vehicle (UAV) simulations in order to facilitate rapid prototyping via visual modeling and analysis. Using high-level Colored Petri nets, we specify UAV control structure by a hierarchy of mission control net and task nets: the mission control net, built upon task nets, models the decision making process of the UAV simulation; tasks nets are built from primitive UAV behaviors and environmental behaviors. To realize effects of UAV behaviors on the simulation environment, procedures may be associated with transitions in Petri nets. To demonstrate the approach, we describe two experimental UAV mission scenarios: sweeping search and multi-point attack.
Keywords:
Software architecture, modeling, UAV, control structure
Petri
net,
1. Introduction Unmanned Aerial Vehicles (UAV) are becoming an important tool for modern warfare because of their cost-effectiveness: they are capable of searching for, detecting, identifying, and destroying enemy targets, significantly reducing the risk of human life. They are even superior to manned aircraft for certain types of missions. To explore potential deployment of UAVs in various military missions, our UAV simulation group has been developing several UAV simulation systems [1,3,6,8], all of which follow the reactive, behaviorbased approach [2] to individual and collective intelligence. Central to these simulations is the design and implementation issue of control structures of UAVs. The great variety of simulation scenarios makes this issue more challenging. A generic software architecture for rapid prototyping of different UAV simulations is highly desirable because a rapid prototype is more cost-effective than real system implementation for evaluating pros and cons of UAVs for a given mission. Such a software architecture must be able to facilitate modeling and analysis of control
structures of UAVs and maximize reuse of design for different UAV applications. In this paper, we present a Petri net-based hierarchical architecture for multi-UAV simulations. Petri nets are a well-established formalism for modeling concurrency, synchronization, and nondeterminism in distributed systems [7]. They are not only a mathematical tool for reasoning about system behaviors, but also provide a graphical notation for visualization of system modeling and analysis. Based on high-level Colored Petri nets [4], we specify the control structure of a multi-UAV simulation by a functional hierarchy of nets, consisting of a high-level mission control net, a set of task nets, and a set of primitive behaviors. The mission control net, built on the top of task nets, models the decision making process of the UAV simulation (e.g. sweeping search); the tasks nets (e.g. alignment) are built from a set of primitive UAV and environmental behaviors (e.g. collision avoidance). To realize the effects of UAV behaviors on the simulation environment, we allow for the association of procedures (i.e. Java code) with transitions in mission control nets and task nets. For example, the location of a UAV in the simulation window would be updated if a flying operation is performed; a target would disappear in the simulation window if it is destroyed by some UAV. Therefore, transition firings in these nets can result in update of information in the visual simulation according to the implementation of primitive UAV behaviors and procedures associated with the transitions. This approach greatly facilitates rapid prototyping of new UAV simulations because simulation designer can focus on the overall control structure net and task nets of UAVs by reusing task nets, primitive UAV behaviors, and simulation environments in existing UAV mission scenarios. The rest of this paper is organized as follows: Section 2 elaborates on the Petri net based hierarchical architecture for UAV mission simulation. Sections 3 and 4 present the redesigns of two experimental UAV mission scenarios: sweeping search [8] and multi-point attack [6], which were originally developed separately. Section 5 concludes the paper.
2. The Petri Net Based Architecture The Petri net based architecture is developed to address the need of generic modeling of UAV control structures for various UAV simulations that follow the reactive, behavior-based approach to intelligence. As shown in Figure 1, the architecture of a UAV simulation is a hierarchy of functional components: mission control Petri net, task Petri nets, behaviors, and visual simulation environment. In a UAV simulation, each UAV is capable of performing some operations, i.e. behaviors. These behaviors are used as transitions in task nets, which model the processes of task execution. Built on task nets, the mission control net models the top-level control and decision making of the whole mission. In other words, a UAV simulation system here is driven by the execution of the mission control net.
The simulation environment can also be created under the control of the mission control net. Typically, an init-simulation transition is used in most of mission control nets. This transition is actually corresponding to a task Petri net, consisting of transitions and code segments for creating simulation window, UAV icons, target icons, and so on. Figure 2 shows a RENEW Petri net for the initialization of a simulation environment.
Mission control net
Task net
Task net
Task net
Behavior
Behavior
Behavior
Figure 2. A Petri net for simulation initialization Behavior implementation
UAV Simulation Environment
Figure 1. The hierarchical software architecture Different from traditional Petri net simulation [7], which is concerned only about token game of Petri nets from the abstract modeling perspective, our Petri net – based architecture has direct control over the visual UAV simulation, i.e. transition firings not only update Petri net markings, but also update the visual simulation system. To realize this, the architecture should allow for the concrete implementation of primitive UAV behaviors in the simulation and the association of program (code) segments with transitions in the Petri nets. In Figure 1, therefore, the code for UAV behavior implementation and simulation environment can be invoked by transitions firings.
We have chosen RENEW [5] as the Petri net tool for realizing our UAV simulation architecture and applications. RENEW meets our UAV simulation requirements because it seamlessly integrates highlevel Petri nets with the object-oriented programming language Java. RENEW allows for java classes to be accessed from inside a net, which makes quick prototyping more efficient. A RENEW net structure consists of transitions, places and labels arcs. Transitions can be associated with guard conditions as well as Java code. An arc label, i.e. a tuple of variables and expressions, is specified in a general inscription language. A transition is firable if there is a substitution of variables in the labels of all input arcs to the transition such that, the guard condition evaluates true, and for any input place of the transition, there is a token that unifies with the corresponding arc label in terms of the substitution. Firing of a transition removes the unified tokens from input places of the transition and adds new tokens into output places of the transition. The new tokens are constructed in terms of the arc labels and the variable
2
substitution. Transition firing also executes the Java code associated with the transition. To apply the hierarchical architecture to a new UAV mission simulation, a designer can focus on the identification of primitive UAV behaviors, and work on the control structure in either top-down or bottomup manner. In our UAV simulations, UAVs are homogenous, i.e. their primitive behaviors or capabilities are identical. Generally, we model multiple UAVs as tokens in Petri nets. A transition firing may indicate that a UAV performs some operation. Due to the weak firing rule of Petri nets, we must deal with the roundrobin and synchronization issues for modeling multiple UAVs. The round robin issue is that, in a multi-UAV simulation, each UAV performs some operation in every simulation cycle. Suppose the UAV tokens in place p1 in Figure 3 are [uav1] and [uav2]. After firing t1 with substitution {x/uav1}, which means UAVs performs operation t1, p1 has token [uav2] and p2 has token [uav1]. So there are two possible firings: UAV2 performs t1 and UAV1 performs t2. In UAV simulations, however, UAV1 is not supposed to perform t2 before UAV2 has finished operation t1. This issue can be addressed by an inhibitor arc from p1 to t2, which label is [y]. The inhibitor arc indicates that t2 is not firable if there is at least one UAV in p1 that has not got a chance to perform operation t1. If necessary, inhibitor arcs from p2/p3 can be used to connect further transitions in the sequence. This approach is also applicable to the synchronization among UAVs to transit from one task stage to another (e.g., before UAVs start a new sweeping search stage, all UAVs have aligned up). p1 [x]
t1 [x]
p2 [x]
t2
p3 [x]
Figure 3. Petri nets for the round-robin issue
3. Case Study 1: UAV Sweeping Search This section describes the redesign of the control structure of UAV sweeping search [8]. In any mission pertaining to exploration of combat zone, searching is a vital element. The objective of sweeping as explained in [8] is to cooperatively search a bounded area with UAVs. Searching pattern in sweeping follows small incremental steps depending upon speed and direction. Attraction points are set at the beginning of execution of every behavior which serves the principal of waypoints. The attraction points determine the path for the UAVs to follow and responsible for full coverage of the battlefield. Each UAV uses the look-ahead region to traverse the search area. The look-ahead
region helps in detecting obstacles as well as targets. If a UAV is diverted from the original position in response to the obstacle, or inter-UAV collision avoidance, the change in behavior from sweeping is occurred resulting in entitlement of calculating next accurate position. This calculation is done on the basis of look-ahead region. The change in behavior based on look-ahead region maintains the consistency in position of all the UAVs.
Figure 4. Mission control net for sweeping search At the individual UAV level sweeping includes recurring task of searching the area in predefined manner with even speed. However, at the group level it is challenging to achieve emergent coordination amongst the UAVs which are decentralized, autonomous, and have local communication. To achieve maintenance of positions of all the UAVs, local communication and look-ahead region is used. Every UAV is equipped with sensors to send and receive massages. If the UAV is lagging behind, then it sends the signal to other UAVs. Whenever the message is received from any UAVs, receiving UAV has to slow down the speed and the message sending UAV has to accelerate its speed. By following this set of rules, UAVs that fall behind attempt to catch up while those pulling away from other agents slow down upon request. The communication amongst the UAVs is based on the fact that the UAV will send message to other UAV who is in the close vicinity of the sender and the receiving UAV in turn passes the message to its closest UAV. This approach of local communication uses the least communication and avoids the overhead of broadcasting the message to all other UAVs.
3
The mission control net for the sweeping search is shown in Figure 4, with arc labels Java code removed for simplicity. Transition InitSimulation, corresponding to a sub-net (similar to Figure 2), creates the simulation environment, including the simulation window, UAV icons, target icons, waypoints of sweeping search, etc. The whole sweeping search process actually consists of a number of similar stages in terms of predefined waypoints. During each sweeping search stage, a UAV has several choices, including: 1) turning and looking ahead once it has reached the destination waypoint and then keeping orbiting until all other UAVs are aligned up for another round of sweeping search; 2) identifying targets within detection range (and selecting a target to attack if the UAV has enough power). If a UAV attacks a target, its mission is done because the UAV is likely destroyed together with the target; 3) closing ranks if an adjacent UAV is deviating from the lineup (e.g. moving toward a target for an attack); and 4) move on if none the above condition is met.
UAVs. While orbiting, a UAV can receive fly-by, continue-orbiting and quit-orbiting signals. As usual, UAVs in the sweeping search are homogeneous. We use generic nets to model the control structure by exploiting the expressiveness of high level Petri nets. Individual UAVs are differentiated by their identifiers.
4. Case Study 2: UAV Multi-Point Attack This section briefly describes the redesign of the UAV multi-point attack scenario using the Petri net-based architecture. Multi-point simultaneous attack [6] is a scenario where a high value target is attacked from multiple angles simultaneously to increase the likelihood of destruction. This model is based on swarm intelligence which does not use global communication, but local reactive behaviors.
Figure 5. Task net for UAV orbiting The tasks in the sweeping search process are further specified by corresponding task nets. Figure 5, for example, shows the main part of the orbiting task net (for clarity, arc labels and code segments are removed). Each UAV check if it is the first one to start orbiting or any other UAV is already orbiting. If it detects another UAV, it sends fly-by signal and starts orbiting next to the UAV detected. Once it has started orbiting, it sends continue-orbiting signal saying that, I just joined so we have to keep orbiting. If the UAV is the last one in the series, it orbits and sends quit-orbiting signal to other
Figure 6. Mission control net for multi-point attack Figure 6 shows part of the mission control net for the multi-point attack (the complete net is too big to fit in the paper). There are five states a UAV can be in, Avoid, Searching, Orbit Target, Orbit Station, and
4
Attack. Each state is represented two transitions and a place, which correspond to a subnet in RENEW. The first transition of a state starts a subnet of that state type. The subnet then executes in the place. When the state is completed it will fire the end state transition and start a new state. The most complex state is the Avoid state which is connected to all other states. If an obstacle is detected, moving or stationary that is too close the Avoid state is entered. In the Avoid state a vector is calculated to determine a safer direction, after following that vector the UAV avoids a collision. When the UAV is done avoiding it returns to its previous state of operation. The simplest state, Searching is not shown for diagram complexity reasons, but is similarly connected to the Avoid state. (My net still has searching but I assume you will remove it from yours) In the Searching state, UAVs roam the battle field looking for a target. When a target is identified the UAV ends the searching state and starts the Orbiting Target state. The Orbiting Target state is the first complete state on the diagram. As you can see there is a Start Orbit Target transition that creates the Orbit Target Sub-net. This subnet is placed in the Orbit Target place to execute until the UAV identifies an open station. This ends the Orbit Target state by firing the End Orbit Target transition and then the Start Orbit Station transition. The Orbiting Station and Attack states are similarly designed to create a subnet at the start transition, execute the subnet in the place, and exit at the end transition.
5. Conclusions We have presented the hierarchical software architecture for multi-UAV simulation using high level Petri nets. The redesign of two experimental UAV simulations indicates that the Petri net approach facilitates rapid prototyping of simulations. Petri nets provide a rigid formalism of visualization for designing and tuning control structures of UAV simulations. While modeling and visualization is useful for system design, analysis of UAV control models is of more interest. Concerning the future work, we will develop formal method for analyzing UAV control structures based on the hierarchical architecture. For example, a simulation of multiple UAVs often involves much coordination among UAVs. It is not uncommon that a design is likely to result in deadlock and undesired states. Automatic detection of such states is of importance for achieving a quality system prototype. The analysis is also feasible although the transitions in mission control net and tasks may be associated with Java code. As a matter of fact, Petri nets in our
approach can serve dual purposes. Net structures provide an abstract model of UAV simulations, whereas code associated with transitions is essentially simulation implementation. Another interesting aspect of future work is performance analysis of UAV simulations. To do this, we may enhance Petri nets with timing information and define performance metrics of interest.
Acknowledgments This work was supported in part by the AFOSR and ONR grants and by the NSF under grant No. EPS01322899. We would like to thank Weifeng Xu and Chin Lua for their discussions on the UAV sweeping search and multi-point attack.
References 1.
2.
3.
4.
5.
6.
7.
8.
K. Altenburg, J. Schlecht, and K. Nygard. An Agent-based Simulation for Modeling Intelligent Munitions. In Proc. of the Second WSEAS Int. Conf. on Simulation, Modeling and Optimization, Skiathos, Greece, 2002. R.A. Brooks. A Layered Control System for a Mobile Robot. IEEE Journal of Robotics and Automation. 2(1): 14-23, 1986. N. Huff, A. Kamel, and K. Nygard, An Agent Based Framework for Modeling UAVs. In Proc. of the 16th International Conference on Computer Applications in Industry and Engineering (CAINE03), 2003. K. Jensen. Coloured Petri Nets: Basic Concepts, Analysis Methods and Practical Use. SpringerVerlag, 1992. O. Kummer, F. Wienberg, and M. Duvigneau. Renew - User Guide (Release 1.6). University of Hamburg, September 2002. Available at http://www.informatik.uni-hamburg.de/TGI/ renew/ C. Lua, K. Altenburg, and K. Nygard. Synchronized Multi-Point Attack by Autonomous Reactive Vehicles with Simple Local Communication. In Proc. of the IEEE Swarm Intelligence Symposium, Indianapolis, Indiana, 2003. T. Murata. Petri Nets: Properties, Analysis and Applications. Proc. of the IEEE, vol.77, no.4, pp. 541-580, April 1989. J. Schlecht, Joseph, K. Altenburg, B. Ahmed, and K. Nygard. Decentralized Search by Unmanned Air Vehicles using Local Communication. In Proc. of the International Conference on Artificial Intelligence, Volume II, Las Vegas, 757-762, 2003.
5