Detectability in Discrete Event Systems Using Unbounded Petri Nets

: This paper investigated the veriﬁcation of detectability for discrete event systems based on a class of partially observed unbounded Petri nets. In an unbounded net system, all transitions and partial places are assumed to be unobservable. The system administrator can only observe a few observable places, i.e., the number of tokens at these places can be observed, allowing for the estimation of current and subsequent states. The concepts of quasi-observable transitions, truly unobservable transitions, and partial markings are used to construct a basis coverability graph. According to this graph, four sufﬁcient and necessary conditions of detectability are proposed. Correspondingly, a speciﬁc example is proposed to prove that the detectability can be veriﬁed in the unbounded net system. Furthermore, based on the conclusion of detectability, the system’s ability to detect critical states was explored by using the basis coverability graph, called C-detectability. Two real-world examples are proposed to show that the detectability of discrete event systems has not only pioneered new research methods, but also demonstrated that the real conditions faced by this method are more general, and it has overcome the limitations of relying only on the ideal conditions of bounded systems for veriﬁcation.


Introduction
Detectability (as well as controllability, observability [1,2], diagnosability [3], and opacity [4,5]) is a basic property of discrete event systems (DESs).It addresses the problem of whether the current and subsequent states of a system can be accurately determined.Detectability was proposed by Shu et al. in [6] for the first time.The work in [6] categorizes detectability into four cases: strong detectability, weak detectability, strongly periodic detectability, and weakly periodic detectability.In other words, a system has strong (or weak) detectability if, after all (or some) event strings are observed, the current and subsequent states can be always determined.Moreover, a system is strongly (or weakly) periodically detectable if, after all (or some) event strings are observed, some current states can be periodically determined.
In the previous studies, Petri nets were used to implement systems' security and opacity [7][8][9][10][11], liveness enforcement [12,13], fault diagnosis [14,15], and state estimation [16].In recent years, to solve the problem of state space explosion that may exist in net systems, Cabasino et al. [14] proposed a new reachability graph, called a basis reachability graph (BRG), according to the minimum length unobservable transition sequence before an observable transition is triggered.In a subsequent study, Lefaucheux et al. [17] extended the concept of BRGs to an unbounded Petri net (UPN), proposing a novel coverability graph, i.e., a basis coverability graph (BCG), and performed fault diagnosis based on a UPN.
To date, there have been few studies and reports on UPNs.In 1998, Ushio et al. [18] addressed the fault diagnosis problem in a UPN.In the work of [19], the authors used a verifier net to diagnose if a fault has occurred in an unbounded net system.Recently, Yin [20] reported an approach to verify prognosability based on a labeled Petri net.The author successfully applied this method to an unbound net system.Afterward, You et al. [21] proposed a predictor graph to improve the concept of fault predictability.
In the last decade, the verification of detectability problems has received much attention from many investigators [22][23][24][25][26][27][28][29][30].In the work of [22], the detectability to D-detectability was extendedfrom deterministic systems to nondeterministic systems by using an observer.Furthermore, in the work of [23], they discussed the I-detectability problem using a finitestate automaton, that is whether the initial state can be detected in DESs.In 2016, Hadjicostis and Seatzu [24] introduced a novel detectability into a DES, i.e., K-detectability.Different from K-step opacity [31,32], K-detectability means that a given system is K-detectable if the results of the current state estimation are always less than or equal to a non-negative integer K. Shu and Feng [25] proposed a concept, called delayed detectability.In their subsequent study, they considered the phenomenon that the current state estimation of the system may be more accurate after some events have fired.Furthermore, Zhang [26] reported a novel concurrent composition method to develop polynomial-time algorithms for verifying the delayed detectability of DESs modeled by finite-state automata.Recently, Tong et al. [28] considered a bounded labeled Petri net to verify the detectability by using a BRG-based observer.This means that the method of verifying detectability was extended from automata to Petri nets for the first time.After that, in the work of [29], C-detectability based on BRGs was proposed.It requires that, for a given system, the critical state of the system be able to be uniquely determined after a limited number of observations.In this research, the detectability of DESs was investigated using a class of UPNs, where all transitions are unobservable and only partial places are observable (i.e., the number of tokens in such a place can be explicitly measured or counted).In this work, two situations, current states or currently critical states of a system, were considered to verify the detectability.A new type of coverability graph, i.e., a basis coverability graph, was constructed to improve the verification method of detectability.
In this paper, the model of [18] was considered to develop the meaning of detectability by borrowing the approach from [17] and [5].The main contributions of this paper are as follows: 1.
A novel basis coverability graph was developed to solve the state estimation problem.
In this paper, we considered how to build a BCG when the net system is unbounded.
Based on the constructed BCG, we propose how to complete the state estimation problem when only some places are observable.

2.
The necessary and sufficient conditions for detectability are proposed.Based on the novel BCGs, we define how strong (or weak) detectability and periodically strong (or weak) detectability are implemented when the system is unbounded.Then, their sufficient and necessary conditions are proposed and proven.A specific example illustrates the feasibility of our approach.

3.
The concept of C-detectability was extended to unbounded Petri nets.Based on the above definitions and conclusions of detectability, the method of detectability verification was extended to verify C-detectability.Similarly, strong (or weak) Cdetectability and periodically strong (or weak) C-detectability are defined.Two real-world examples are proposed to illustrate that the proposed method is flexible.
This paper consists of eight sections.Section 1 gives a literature review.Section 2 presents the basic definitions and preliminaries of automata and Petri nets.Some results of partially observed Petri nets are also displayed in this section.Section 3 introduces the state estimation problems, the definitions of detectability, and how to construct a BCG for an unbounded net system.The verification of detectability based on BCGs is illustrated in Section 4. Furthermore, the definition and verification of C-detectability on BCGs are illustrated in Section 5. Two real-world examples are proposed in Section 6.The possible challenges and shortcomings of this work are listed in Section 7. Section 8 is the conclusion and presents the future work.

Previous Knowledge
This section briefly reviews the basics of automata, Petri nets, and partial markings.For more details, the reader is referred to [1].

Automata
A deterministic finite-state automaton (DFA) is a four-tuple G = (X, E, f , X 0 ), where X is a finite set of states; E is a set of letter symbols; f : X × E → X is the transition function; and X 0 is a set of initial states.A reversed automaton of G is defined as G r = (X, E, f r , X).Specifically, the transition function f r : X × E → 2 X is defined as follows: for arbitrary two states x, x ∈ X and an event e ∈ E, we have x = f (x, e) if and only if x ∈ f r (x , e) [33].

Petri Nets
A Petri net is a four-tuple N = (P, T, Pre, Post), where P is a finite set of h places with h ∈ N, T is a finite set of transitions with P ∪ T = ∅, and P ∩ T = ∅, where N is the set of non-negative integers.The pre-incidence function of N is defined by Pre : P × T → N, and the post-incidence function is defined by Post : P × T → N. Normally, we graphically represent a place with a circle and a transition with a box.Specifically, for a place p, a transition t, and k ∈ N, Pre(p, t) = k > 0 means that there is an arc from p to t with weight k; Post(p, t) = k > 0 means that there is an arc from t to p with weight k.In the case of k = 0, there is no arc from p to t or t to p. C = Post − Pre is defined as the incidence matrix of a Petri net N.
Given a node x ∈ P ∪ T in a Petri net, the pre-set of x is defined by • x = {y ∈ P ∪ T | Pre(y, x) > 0}, and the post-set of x is defined by x • = {y ∈ P ∪ T | Post(x, y) > 0}.Given a Petri net, let P o be the set of observable places.Then, P uo = P \ P o is the set of unobservable places.A Kleene closure of the transitions T is defined as T * , including all finite sequences composed of the transitions in T and the empty transition sequence ε.
A marking is a mapping M : P → N, represented by a vector due to the finiteness of the place set for operation convenience.An entry M(p) of a marking M indicates the number of tokens in place p at the marking M. A net system is represented as N, M 0 , where M 0 is an initial marking.
A transition t is enabled at M if, for all p ∈ • t, M(p) ≥ Pre(p, t), denoted as M ≥ Pre(•, t).The firing of an enabled transition t at marking M yields a marking M , denoted by In this case, M n is said to be reachable from M. The set of markings from the initial marking M 0 defines the reachability of net system A function π : T * → N n that associates a sequence σ ∈ T * with a vector y σ = π(σ) ∈ N n defines the Parikh vector of the transition sequence σ, where n = |T| is the number of transitions in a net.Moreover, y σ (t) = k means that transition t appears k times in σ.
Especially, if a transition sequence σ is an empty sequence, i.e., σ = ε, then M[σ M holds trivially.Given an empty sequence ε, we have |ε| = 0.The language of a net system N, M 0 is defined as which is a set of transition sequences that are enabled from the initial marking.Write, by a slight abuse of notation, t ∈ σ to represent that transition sequence σ contains transition t.
Given a transition sequence σ, σ is said to be a prefix of σ if there exists a sequence σ is the simplest case of circuits in a Petri net.A Petri net is said to be self-loop-free if it contains no self-loop.A Petri net is said to be acyclic if there is no circuit in the net system.
A reachability graph is a digraph starting from the initial marking M 0 , whose nodes are markings in R(N, M 0 ) and an edge from M to M labeled with t if M[t M holds.
A net system N, M 0 is bounded if there is an integer K > 0 such that, for all reachable markings M ∈ R(N, M 0 ) and for all places p ∈ P, M(p) ≤ K holds; otherwise, it is unbounded.For an unbounded net system, the number of tokens in an unbounded place can be an arbitrary integer, denoted by ω, satisfying, given any n ∈ N, ω ± n = ω, ω × n = ω, ω × 0 = 0, and n < ω.Its state space is approximated by a coverability set CS(N, M 0 ) ⊂ (N ∪ {ω}) h .The previous works reported that the coverability set includes all the markings of the reachability set [34,35].In other words, for a coverability set CS(N, M 0 ), the following hold: 1.
This set covers all the markings of the reachability set; 2.
For each marking M in CS(N, M 0 ), but not in the reachability set, there is an infinite strictly increasing sequence of reachable markings converging to M (this notion is defined in [34]).
Based on the coverability set CS(N, M 0 ), a coverability graph CG(N, M 0 ) is a graph in which there exists an arc labeled with a transition t ∈ T between two markings labeled by M and M if and only if the transition t is enabled in M, whose firing reaches marking M .In brief, a coverability graph can be constructed analogously to the reachability graph of a bounded Petri net; see [37] for details.

Partial Markings
A marking M ∈ CS(N, M 0 ) restricted to P o is represented by a vector M with j entries, called a partially observable marking of the marking M [14], where |P o | = j.Then, a partially observable marking (partial marking for simplicity) can be readily calculated by where A is a j × h matrix, called the observability mapping matrix with A(i, i) = 1 for i = 1, 2, . . ., j and the other entries are 0. The matrix A is used to project a marking M onto a partial marking based on the set of observable places P o .Therefore, a set of partial markings is defined as follows: The set of transitions contains quasi-observable transitions, whose set is defined as Similarly, the transitions not in T q are called truly unobservable transitions, i.e., T u = T \ T q .In addition, the systems of this work are assumed to be self-loop-free.
Given two quasi-observable transitions t Note that the number of tokens in an unbounded place is denoted by ω.Therefore, if some unbounded places are observable, the system administrators or intruders can detect the change of the tokens in these places, but they are not clear about the number of tokens.
In other words, if some unbounded places are observable, their pre-sets and post-sets are detectable and quasi-observable.
Moreover, given a string consisting of quasi-observable transitions w and a partial marking M, a set of states that are possibly reachable by detecting and observing w and M is defined as which is a collection of markings consistent with w and M.
Suppose that there are no transition cycles composed of truly unobservable transitions.The definition of unobservable transitions' subnet [14] is extended to truly unobservable transitions as follows.
Definition 1.Given a Petri net (N, M 0 ) and a set of truly unobservable transitions T u , the truly unobservable subnet N = (P, T u , Pre , Post ) of N is derived by removing T \ T u , where Pre and Post are the restriction of Pre and Post to P × T u , respectively.The incidence matrix of this subnet is denoted by C û = Post − Pre .

Detectability in UPNs
This section deals with the detectability in UPNs.The current state estimation problem will be discussed.

Current State Estimation in UPNs
In this subsection, a BCG is constructed to improve the verification method of detectability.From now on, the above new sets, i.e., the set of quasi-observable transitions and the set of truly unobservable transitions, are used to construct the BCG in this work.Definition 2. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a partial marking M, and a transition t q ∈ T q , is defined as a set of explanations of quasi-observable transition t q at partial marking M and Y( M, t q ) = {y σ ∈ N |T u | |∃σ ∈ Γ( M, t q ) : y σ = π(σ)} is defined as the corresponding set of explanation vectors.
Generally, if a net system is bounded, the set of explanations is definitely finite.If there is an unbounded place that is unobservable and there is only one transition called the source transition (i.e., ∃t ∈ T, • t ∈ ∅, t • / ∈ ∅) in the place's pre-set, then this transition may be truly unobservable.In this case, the number of explanations may be infinite.Therefore, to avoid this result, we need to make sure that all source transitions are quasi-observable.Definition 3. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a partial marking M, and a transition t q ∈ T q , is defined as the set of minimum explanations of quasi-observable transition t q at partial marking M and Y min ( } is defined as the corresponding set of minimum explanation vectors. Definition 4. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic and an initial partial marking M0 , the set of basis partial markings, denoted by M b , is defined as follows: For all M ∈ M b , for all t q ∈ T q , for all σ ∈ Γ min ( M, t q ), and y σ = π(σ ), it holds that M ∈ M b , where In simple words, a BCG is constructed by triggering a quasi-observable transition and minimal explanations consisting of a set of truly unobservable transitions.
A special situation should be noted: there can be multiple confused transitions in the net system that result in the same change in the observable places.This ambiguity prevents intruders from determining which transition has been fired.As a result, a BCG may have two or more confused transitions labeled on an arc from one node to another.This means that the system administrator does not need to identify the quasi-observable transition that has been fired.He/she only needs to determine if any of them has been fired.
Given a marking M, a sequence σ ∈ T * , and a quasi-observable transition t q such that M 0 [σt q M and A • M = M, a set of markings, defined as Given a partial marking M and a quasi-observable transition t q , we define that the firing of an enabled quasi-observable transition t q at partial marking M yields a partial marking M = M + C(•, t q ) + C û • y σ , where σ ∈ Γ min ( M, t q ) and π(σ) = y σ , which is denoted by M[t q M .A quasi-observable string w = P (σ) = t q1 t q2 . . .t qn ∈ T * q is enabled at partial marking M if there exist partial markings M1 , M2 , . . ., Mn such that M[t q1 M1 [t q2 . . .Mn−1 [t qn Mn , denoted as M[w Mn , where σ ∈ T * and n ∈ N. Especially, if w happens to be an empty string, then M[w M holds.Theorem 1. [5] Consider a UPN (N, M 0 ) with N = (P, T, Pre, Post) whose truly unobservable subnet is acyclic.Given a mapping matrix A, a marking M , and σ ∈ T * such that M 0 [w M and A • M = M, where w = P (σ), it holds that In other words, Theorem 1 demonstrates the states in which the system may be when a new partial marking is observed.

Definitions of Detectability in UPNs
In this subsection, strong detectability, weak detectability, periodically strong detectability, and periodically weak detectability are defined in partially observed UPNs.
Moreover, for all unobservable and unbounded places, more details of the symbol "ω" are not focused on.In other words, no matter the value of "ω", the system is still considered to be in the same state.Definition 5. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a non-negative integer k, and an initial partial marking M0 ∈ CS o (N, M 0 ), the net system N, M 0 is said to be strongly detectable if In other words, a partially observed UPN is strongly detectable if the net system's current state and subsequent states can be uniquely determined after a finite number of quasi-observable transitions for all languages.Definition 6.Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a non-negative integer k, and an initial partial marking M0 ∈ CS o (N, M 0 ), the net system N, M 0 is said to be weakly detectable if In plain words, a partially observed UPN is weakly detectable if the current state and subsequent states can be uniquely determined after a finite number of quasi-observable transitions for some languages.Moreover, if an unbounded net system is strongly detectable, then it is also weakly detectable.Definition 7. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a non-negative integer k, and an initial partial marking M0 ∈ CS o (N, M 0 ), the net system N, M 0 is said to be periodically strongly detectable if In plain words, a partially observed UPN is periodically strongly detectable if, as the transition sequence continues, the current state can be periodically and uniquely determined for all languages.Definition 8. Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, a non-negative integer k, and an initial partial marking M0 ∈ CS o (N, M 0 ), the net system N, M 0 is periodically weakly detectable if In plain words, a partially observed UPN is periodically strongly detectable if, as the transition sequence continues, the current state can be periodically and uniquely determined for some languages.Moreover, if an unbounded net system is periodically strongly detectable, then it is also periodically weakly detectable.
Example 2. Reconsider the system and its coverability graph, which are shown in Figures 1 and 2, respectively.Based on Definition 5, this net system is strongly detectable.Since no matter which transition is triggered, the current and subsequent states can be uniquely determined.
For the sake of the rigor of exploring detectability, a result is naturally derived as follows.
Proposition 1.Given a partially observed UPN (N, M 0 ) whose truly unobservable subset is acyclic, the unbounded net system does not perform detectability verification if all places are unbounded places.
Proof.By contrast, if there is no bounded place in an unbounded net system, then the marking will satisfy the following statement: for all p ∈ P, M(p) = ω.According to the descriptions for the symbol "ω", the number of tokens in unbounded places is undetectable.Therefore, the unbounded net system cannot be detected.
Generally, when an unbounded net system is detectable, this indicates that the net system conforms to one of the definitions of detectability.

Verification of Detectability on UPNs
In this section, the detectability in partially observed UPNs will be verified by using a BCG.Based on the above description of the current state estimation problem, a binary scalar ϕ( M) concerning current partial marking M is defined as follows.Given a marking Otherwise, ϕ( M) = 0.A BCG is denoted, by using a non-deterministic finite-state automaton, as C = (X, Tq , f , ( M0 , ϕ( M0 ))), where X ⊆ M × {0, 1} is a set of states, f is the transition function, i.e., f ⊆ X × T q → X, and ( M0 , ϕ( M0 )) is the initial state.Moreover, for a state of the BCG x = ( M, ϕ( M)), x(1) = M denotes the first element of x; by analogy, x(2) is the second element, i.e., x(2) = ϕ( M).Algorithm 1 is proposed to illustrate how to construct a BCG to verify detectability.
Algorithm 1: Construction of a BCG for detectability.
Input: UPN (N, M 0 ) and a set of partial markings CS o (N, M 0 ).Output: A BCG C = (X, T q , f , ( M0 , ϕ( M0 ))). 1 Let the initial node be ( M0 , ϕ( M0 )), and attributeno label to this node; 2 while nodes with no label exist do 3 Select a node with no label;  Proposition 2. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic, the unbounded net system is not detectable if, for all the states in its BCG C, the binary scalar ϕ( M) = 0.
Proof.For a node of a BCG x ∈ X and its partial marking M, if the binary scalar of this node is ϕ( M) = 0, this means that there exist a regular marking M, a sequence σ u ∈ T * u , and This indicates that this node is not detectable.
Furthermore, if the binary scalar of all nodes is equal to 1, for all M ∈ CS o (N, M 0 ) such that |E (w, M)| = 1, this unbounded net system is undetectable.
A BCG-based observer is constructed by using a reversed automaton of its BCG, i.e., C o = {X , Tq , f o , X}, where X ⊆ 2 X is the set of states in the BCG-based observer and f o is the transition relation of the observer, i.e., f o ⊆ X × T q × X .Definition 9. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic and a BCG with the set of its nodes being {n 1 , n 2 , . . ., n n }, a cycle in a BCG-based observer is defined as γ i = n 1 t q1 n 2 t q2 . . .n n t qn n 1 , where i means the ith cycle in this observer, {t q1 , t q2 , . . ., t qn } ⊆ T q is a subset of quasi-observable transitions, and n ∈ N. Furthermore, let Q denote the set of cycles.Moreover, we use n ∈ γ i to denote the fact that a state n is in a cycle γ i .
Based on the above definition and proposition, the verification of detectability can be extended to the partially observed UPNs.First, we present a result.Theorem 2. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic and its BCG C, the unbounded net system N, M 0 is strongly detectable if and only if, in its BCG-based observer, for all γ i ∈ Q, for all w ∈ T * q , and for all x, x ∈ γ i , f o (x, w, x ) is defined and x = (m, 0), where M ∈ CS o (N, M 0 ).

Proof. (⇐)
Given an arbitrary cycle γ ∈ Q, if any state x ∈ γ satisfies x(1) ∈ CS o (N, M 0 ) and x(2) = 0, this means that, for any partial marking in this cycle, there is not a truly unobservable sequence σ u ∈ T * u and y σ u = π(σ u ) such that M + C • y σ u = 0, and |E (w, M)| = 1.Then, this net system is strongly detectable.
(⇒) We assume that there exists a cycle γ ∈ Q.If there is a state y ∈ γ, such that x(1) = M and x(2) = 1, i.e., there is a truly unobservable sequence σ u ∈ T * u with y σ u = π(σ u ) such that M + C • y σ u > 0, and |E (w, M)| = 1, then this net system is not strongly detectable.
In other words, a partially observed unbounded net system is strongly detectable if and only if, for an arbitrary cycle in its BCG C, all reachable states in the cycle meet that x(1) ∈ CS o (N, M 0 ) and x(2) = 0. Theorem 3. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic and its BCG C, the unbounded net system N, M 0 is weakly detectable if and only if, in its BCG-based observer, there exists γ i ∈ Q, and for all w ∈ T * q and for all x, x ∈ γ i , f o (x, w, x ) is defined and x = ( M, 0), where M ∈ CS o (N, M 0 ).
Proof.(⇐) Given a cycle γ ∈ Q, for an arbitrary state x ∈ γ, if x(1) = M and x(2) = 0, there is not a truly unobservable sequence Then, this net system is weakly detectable.
(⇒) For all cycles Q, if there exists a state in these cycles, i.e., there is a state x ∈ Y with x(1) ∈ CS o (N, M 0 ) and x(2) = 1, there is a partial marking M and |E (w, M)| = 1, implying that the net system is not weakly detectable.
In other words, a partially observed unbounded net system is weakly detectable if and only if there are some cycles in its BCG C such that all reachable states x in these cycles satisfy x(1) ∈ CS o (N, M 0 ) and x(2) = 0. Theorem 4. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic and its BCG C, the unbounded net system N, M 0 is periodically strongly detectable if and only if, in its BCG-based observer, for all γ i ∈ Q, there exists a state x ∈ γ i such that x = ( M, 0), where M ∈ CS o (N, M 0 ).
(⇒) Assume that there is a cycle γ ∈ Q.If there is an arbitrary state x ∈ γ such that x(1) = M and x(2) = 1, that is there exists a truly unobservable sequence σ u ∈ T * u with y σ u = π(σ u ), then we have M + C • y σ u > 0 and |E (w, M)| = 1, i.e., this system is not periodically strongly detectable.
In other words, a partially observed unbounded net system is periodically strongly detectable if and only if, for the arbitrary cycle in its BCG C, there exists at least one reachable state in these cycles satisfying x(1) ∈ CS o (N, M 0 ) and x(2) = 0. Theorem 5. Given a UPN (N, M 0 ) whose truly unobservable subset is acyclic and its BCG C, the unbounded net system N, M 0 is periodically weakly detectable if and only if, in its BCG-based observer, there exist γ i ∈ Q and x ∈ γ i , x = ( M, 0), where M ∈ CS o (N, M 0 ).
Proof.(⇐) Given a cycle γ ∈ Q and a state x ∈ γ, if x(1) = M and x(2) = 0, this means that there is not a truly unobservable sequence σ u ∈ T * u with y σ u = π(σ u ), such that M + C • y σ u = 0 and |E (w, M)| = 1.Then, this net system is periodically weakly detectable.
(⇒) Assume that, for arbitrary cycle γ ∈ Q, if for all x ∈ γ, it holds that x(1) ∈ CS o (N, M 0 ) and x(2) = 1, then all states cannot determine the current state of the system.In this case, the net system is not periodically weakly detectable.
In other words, a partially observed unbounded net system is periodically weakly detectable if and only if there exist some cycles in its BCG C and there exists at least one reachable state x in these cycles such that x(1) ∈ CS o (N, M 0 ) and x(2) = 0. Example 3. As shown in Figure 1, the partially observed UPN is reconsidered.Figure 3 is the BCGbased observer, where there is only one cycle, i.e., ( M0 , ϕ( M0 ))t 1 ( M1 , ϕ( M1 ))t 2 ( M0 , ϕ( M0 )) with ϕ( M0 ) = ϕ( M1 ) = 0.This means that all current states and subsequent states can be determined when a new partial marking is observed.We conclude that this system is strongly detectable.

C-Detectability in UPNs
In this section, the above results of detectability are extended to C-detectability [29] based on the partially observed UPNs.In this part, we are no longer interested in the precise current state.We focus on the fact that some currently crucial states can be detected based on our BCGs.Observably, as far as C-detectability is concerned, "C" means "crucial".

Definitions of C-Detectability in UPNs
In this subsection, strong C-detectability, weak C-detectability, periodically strong Cdetectability, and periodically weak C-detectability are defined.In general, the crucial states are given by the system administrator.Therefore, two symbols M c and Σ are used to denote the set of crucial markings and the set of sequences, respectively, where Σ ⊆ L(N, M 0 ).In other words, a sequence σ does not belong to the set Σ if for all σ σ, P (σ ) = w such that M0 [w M and E (w, M) ∩ M c = ∅.Based on the above descriptions, four types of C-detectability are proposed as follows.
Definition 10.Given a UPN (N, M 0 ) with the acyclic truly unobservable subnet, a non-negative integer k, an initial partial marking M0 , and the set of crucial markings M c , the unbounded net system is strongly C-detectable if In simple words, for an arbitrary sequence, an unbounded net system is strongly C-detectable if the crucial state and subsequently crucial states of the net system can be inferred after a finite number of quasi-observable transitions.Therefore, in this research, given a sequence, after its natural projection, if there is no crucial marking in the state estimation that is the result of the partial markings reached by any prefix, then we are not interested in this sequence.Definition 11.Given a UPN (N, M 0 ) with the acyclic truly unobservable subnet, a non-negative integer k, an initial partial marking M0 , and the set of crucial markings M c , the unbounded net system is weakly C-detectable if In simple words, for some arbitrary sequences, an unbounded net system is weakly C-detectable if the crucial state and subsequently crucial states of the net system can be inferred after a finite number of quasi-observable transitions.Observably, if an unbounded net system is strongly C-detectable, then it is necessarily weakly C-detectable.Definition 12.Given a UPN (N, M 0 ) with the acyclic truly unobservable subnet, a non-negative integer k, an initial partial marking M0 , and the set of crucial markings M c , the unbounded net system is periodically strongly C-detectable if In simple words, for an arbitrary sequence, an unbounded net system is periodically strongly C-detectable if, as the transition sequence continues, the crucial state of the system can be uniquely determined.
Definition 13.Given a UPN (N, M 0 ) with the acyclic truly unobservable subnet, a non-negative integer k, an initial partial marking M0 , and the set of crucial markings M c , the unbounded net system is periodically weakly C-detectable if In simple words, for some sequences, an unbounded net system is periodically weakly C-detectable if, as the transition sequence continues, the crucial state of the system can be uniquely determined.Observably, if an unbounded net system is periodically strongly C-detectable, then it is necessarily periodically weakly C-detectable.Similarly, when an unbounded net system is C-detectable, it indicates that the net system conforms to one of the definitions of C-detectability.
Compared with [29], there are some differences.The authors of [29] reported that a bounded net system is periodically C-detectable if there exists at least one sequence enabled at the initial marking such that, from time to time, the set of markings consistent with the corresponding observation contains either a single marking or no marking in M c .In this work, for the sake of a clearer understanding of detectability, we only require that an unbounded net system should be periodically C-detectable if at least one sequence is enabled at the initial marking such that the set of markings consistent with the corresponding partial markings contains a single marking.
Example 4. As shown in Figure 4, a partially observed UPN is considered, where the places in {p o1 , p o2 , p o3 } are observable and the others are unobservable.A marking is denoted as M = (p o1 , p o2 , p o3 , p uo1 , p uo2 ) T .The mapping matrix A 2 is assumed to be The coverability graph and BCG of this system are shown in Figures 5 and 6, respectively.Let the marking M 1 be the crucial marking.We found that the transition t 2 is quasi-observable.This means that, after the system periodically triggers transition t 2 , the critical marking can be uniquely determined.Therefore, this system is periodically strongly C-detectable.
In the above example, a test arc is presented between place p o2 and transition t 2 .In brief, when the transition t 2 fires, the number of tokens in the place will not be consumed.
In real life, the concept of test arcs has also been widely applied [38].For example, when a system is running, it only needs to read the data in this place, rather than modify it.

Verification of C-Detectability Based on BCGs
This subsection deals with verifying C-detectability based on the BCGs.Four sufficient and necessary conditions will be proposed.
Algorithm 2: Construction of a BCG for C-detectability.
Proof.Given an unbounded net system, if it is detectable, i.e., for the arbitrary state of its BCG, the binary scalar ϕ( M) is always equal to 1, then, when the system administrator detects an arbitrary quasi-observable string w, we have M0 [w M and |E (w, M)| = 1.Ac- cording to the definitions of detectability, the unbounded net system is not C-detectable.Corollary 1.A UPN (N, M 0 ) is strongly detectable if the net system is strongly C-detectable.
Proof.Given an unbounded net system N, M 0 , if it is strongly C-detectable, then, for an arbitrary transition sequence σ, there exists an arbitrary sequence σ σ such that and E (w, M) ∩ M c = ∅.This indicates that all results of the current state estimation are always unique and determinable.Furthermore, all the current and subsequent states are crucial.Based on the definition of strong detectability, the net system is necessarily strongly detectable.Corollary 2. A UPN (N, M 0 ) is weakly detectable if the net system is weakly C-detectable.
Proof.Given an unbounded net system N, M 0 , if it is weakly C-detectable, then there exists at least one transition sequence σ, and for an arbitrary prefix σ of σ, i.e., σ σ, such that P (σ ) = w, one has M0 [w M, |E (w, M)| = 1, and E (w, M) ∩ M c = ∅.This indicates that some results of the current state estimation can always be unique and determinable.All the current and subsequent states concerning the sequence σ are crucial.Based on the definition of weak detectability, the net system is necessarily weakly detectable.
However, a special situation should be considered.Observably, if an unbounded net system is strongly detectable, then the net system is weakly detectable as well.In other words, for a strongly detectable and weakly C-detectable net system, there may be at least one transition sequence σ such that there exists an arbitrary sequence σ σ with P (σ ) = w, satisfying M0 [w M, |E (w, M)| = 1, but E ( M) ∩ M c = ∅.Therefore, the net system is at least weakly detectable.Corollary 3. A UPN (N, M 0 ) is periodically strongly detectable if the net system is periodically strongly C-detectable.
Proof.Given an unbounded net system N, M 0 , if it is periodically strongly C-detectable, then for an arbitrary sequence σ ∈ Σ * , there exist two sequences σ and σ such that , and E (w, M) ∩ M c = ∅.This indicates that, for an arbitrary sequence, the result of the current state estimation concerning M can be periodically determined.Correspondingly, the current state is crucial.Based on the definition of periodically strong detectability, the net system is necessarily periodically strongly detectable.Corollary 4. A UPN (N, M 0 ) is periodically weakly detectable if the net system is periodically weakly C-detectable.
Proof.Given an unbounded net system N, M 0 , if it is periodically weakly C-detectable, then there exists at least one sequence σ ∈ Σ * in which there are two sequences σ and , and E (w, M) ∩ M c = ∅.This indicates that, for this sequence σ, the result of the current state estimation concerning M can be periodically determined.Correspondingly, the current state is crucial.Based on the definition of periodically weak detectability, the net system is necessarily periodically weakly detectable.
However, a special situation should be considered.Observably, if an unbounded net system is periodically strongly detectable, then the net system is periodically weakly detectable as well.In other words, for a periodically strongly detectable and periodically weakly C-detectable net system, there may be at least one transition sequence σ such that there are two arbitrary sequences σ , σ , satisfying σ σ, σ σ σ, P (σ σ ) = w, M0 [w M, and |E (w, M)| = 1, but E (w, M) ∩ M c = ∅.Therefore, the net system is at least periodically weakly detectable.Proposition 4. Given a detectable UPN (N, M 0 ) with the acyclic truly unobservable subnet and its BCG C , the unbounded system is not C-detectable if, for an arbitrary partial marking M, θ( M) = 0.
Proof.For a BCG of a detectability unbounded net system, if the binary scalar θ( M) of a node ( M, ϕ( M), θ( M)) is 0, this means that there does not exist any marking that belongs to the set of crucial markings.By Definitions 10-13, the unbounded net system is not C-detectable.
In addition, a revised automaton is used to construct an observer Unambiguous with respect to M c if for all y ∈ γ, y ∈ Y m ; 2.
Semi-unambiguous with respect to M c if there exists y ∈ γ, y ∈ Y m ; 3. Ambiguous with respect to M c if for all y ∈ γ, y / ∈ Y m .
Based on the above necessary and sufficient conditions of strong detectability, weak detectability, periodically strong detectability, and periodically weak detectability, the method for verifying C-detectability will be derived and proven.
Corollary 5. Given a detectable UPN (N, M 0 ) in which the truly unobservable subnet is acyclic and its BCG C , the unbounded net system N, M 0 is strongly C-detectable if and only if, in its BCG-based observer, for all γ ∈ Q, γ is unambiguous.
Proof.(⇐) Given an arbitrary cycle γ ∈ Q, if there exists any node y ∈ γ and y ∈ Y m , i.e., γ is an unambiguous cycle, then, for any partial marking M in this cycle, there exists a unique marking M belonging to E (w, M) that is also a crucial marking.Therefore, this detectable unbounded net system is strongly C-detectable.
(⇒) We assume that there exists an ambiguous cycle γ ∈ Q, i.e., there exists a node y ∈ γ such that y(2) = y(3) = 0, and y / ∈ Y m .This indicates that there is a partial marking such that it is not detectable or C-detectable.Then, this system is not strongly C-detectable.
In other words, an unbounded net system is strongly C-detectable if and only if, in its BCG-based observer, the crucial marking can be only determined in the result of current and subsequent state estimation in any cycle.Corollary 6.Given a detectable UPN (N, M 0 ) in which the truly unobservable subnet is acyclic and its BCG C , the unbounded net system N, M 0 is weakly C-detectable if and only if, in its BCG-based observer, there exists γ ∈ Q and γ is unambiguous.

Proof. (⇐)
We assume that there is a cycle γ ∈ Q such that, for arbitrary node y ∈ γ, we have y(1) = M, y(3) = 1, and y ∈ Y m .In other words, the cycle γ is an unambiguous cycle.This means that there only exists a marking M concerning M and M is a crucial marking.Therefore, the unbounded net system is weakly C-detectable.
(⇒) By contraposition, for any arbitrary cycle γ ∈ Q, we assume that there is at least one node y ∈ Y in the cycle such that y / ∈ Y m , i.e., γ is ambiguous.This indicates that, for an arbitrarily detectable cycle, there does not exist any crucial marking.Therefore, this unbounded net system is not weakly C-detectable.
In other words, an unbounded net system is weakly C-detectable if and only if, in its BCG-based observer, the crucial marking can be only determined through the result of current and subsequent state estimation in at least one cycle.
Corollary 7. Given a detectable UPN (N, M 0 ) in which the truly unobservable subnet is acyclic and its BCG C , the unbounded net system N, M 0 is periodically strongly C-detectable if and only if, in its BCG-based observer, for all γ ∈ Q, γ is semi-unambiguous.
Proof.(⇐) Given an arbitrary cycle γ ∈ Q, if there is at least one node y ∈ γ such that y ∈ Y m , i.e., γ is a semi-unambiguous cycle, there is a quasi-observable string w ∈ Tq such that M[w M, |E (w, M)| = 1 and E (w, M) ∩ M c = ∅.Therefore, this unbounded net system is periodically strongly C-detectable.
(⇒) By contraposition, we assume that there is a cycle γ ∈ Q such that any node y ∈ γ does not belong to Y m , i.e., y(3) = 1.This means that all cycles are not semi-unambiguous cycles.Therefore, the unbounded net system is not periodically strongly C-detectable.
In other words, an unbounded net system is periodically strongly C-detectable if and only if, in its BCG-based observer, the crucial marking can be only determined through the result of periodic current state estimation in any cycle.Corollary 8. Given a detectable UPN (N, M 0 ) in which the truly unobservable subnet is acyclic and its BCG C , the unbounded net system N, M 0 is periodically weakly C-detectable if and only if, in its BCG-based observer, there exists γ ∈ Q and γ is semi-unambiguous.
Proof.(⇐) Given a cycle γ ∈ Q, if there is at least one node y ∈ γ such that y ∈ Y m , i.e., y(1) = M and y(3) = 1, there only exists a marking M with respect to M, and the marking M belongs to the set of crucial markings.Then, the cycle γ is a semi-unambiguous cycle, and the unbounded net system is periodically weakly C-detectable.
(⇒) By contraposition, for a cycle γ ∈ Q, assume that any node y ∈ γ does not belong to Y m , i.e., y(1) = M and y(3) = 0.This means that there is at least one marking M concerning M, and M is not a crucial marking.Therefore, the unbounded net system is not periodically weakly C-detectable.
In other words, an unbounded net system is periodically weakly C-detectable if and only if, in its BCG-based observer, the crucial marking can be only determined by the result of the periodic current state estimation in at least one cycle.

Real-World Examples
In this section, two real-world examples are proposed.Based on these examples, the necessity and importance of verifying the detectability of unbounded net systems can be further explained.

A Public Service Department
As shown in Figure 7, it is a service system for a public service department.When customers arrive at the department, they wait in line and are then led by a staff member to handle the business.Two business jobs can be handled in this department: all customers want to do the final business.However, when the customer's conditions do not meet the requirements, it is necessary to apply for intermediate business before solving the final business.The customers will leave when all business jobs are complete.The staff will receive the next customer.Furthermore, each business job is assigned to a corresponding manager (or observer) to manage.Managers can see the status of the business jobs in their jurisdiction.As shown in Figure 8, the system is modeled by an unbounded Petri net.For the manager of the final business, he or she can only observe the change of tokens in places p o1 , p o2 , and p o3 .Therefore, places {p o1 , p o2 , p o3 } are observable.Places p uo1 and p uo2 are unobservable.The set of quasi-observable transitions can be inferred as {t 1 , t 2 , t 5 , t 6 }.Its coverability graph is shown as Figure 9, where a marking is denoted as M = (p o1 , p o2 , p o3 , p uo1 , p uo2 ) T .Therefore, a mapping matrix A 3 by this manager is assumed to be  M 0 = (ω, 0, 1, 0, 0) T M 1 = (ω, 0, 0, 1, 0) T M 2 = (ω, 0, 0, 0, 1) T M 3 = (ω, 1, 0, 0, 0) All meanings of each place and transition are listed in Tables 1 and 2, respectively.Figure 10 is the BCG by using the partial markings.Let the set of crucial states be M c = {M 3 }, i.e., the customer is in the critical state when processing the final business.Figure 11 is the BCG-based observer by using a reversed automaton., and so on.There does not exist any crucial marking in these cycles.Therefore, this unbounded net system is not strongly C-detectable and periodically strongly C-detectable.
However, if the system administrator observes a string t 2 t 5 t * 1 , he or she can determine that the current and subsequent marking is always M 3 .Therefore, this unbounded net system is weakly C-detectable.In addition, if the system administrator observes a string (t 2 t 5 t 6 ) * , he or she can periodically determine the crucial marking M 3 .In this case, this unbounded net system is also periodically weakly C-detectable.M0 = (ω, 0, 1) Based on the above descriptions, a conclusion is reached that the concept of Cdetectability can be applied to real life.This system reflects the steps and procedures of its daily work.The middle manager (for example, the observer of the final business) knows the system's overall structure.Still, he or she cannot infer all the evolution information of the system, e.g., he or she cannot decide in which step each customer has handled business.C-detectability can help the middle manager of the system understand the critical information of the system.

A Supply Chain System
In practical industrial practice and applications, compared with bounded Petri nets, supply chain processes and industrial logistics systems are more suitable for modeling and analysis using unbounded Petri nets, as there is no upper limit on the number of orders from customers or goods that need to be transported by ship.Therefore, a supply chain system model of a company [39,40] using unbounded net systems will be more universal.
The overall process of a company's supply chain is considered in this example.The supply chain process of this company involves personnel such as clients, sales, design, finance, production, and bins.The information exchange between personnel is shown in Figure 12, where Table 3 describes the working relationships between all departments in this supply chain process.First, there is order information between clients and sales, communication between sales and design personnel for product design needs, the interaction between sales and finance for accounting verification, and the transmission of a series of information related to product production between production and bins.Finally, the clients settle the accounts with the financial personnel after receiving the goods.Based on the above supply chain process, as shown in Figure 13, a Petri net is used for modeling.Tables 4 and 5 list the specific meanings of each place and transition, respectively.A phenomenon can be detected, by a department manager (or middlelevel manager); he or she can only detect the status of his or her department (or part of the business) in the system, and he or she is not clear about more details of the entire process.The middle-level manager can only see that the tokens in the places in {p o1 , p o2 , p o3 , p o4 , p o5 , p o6 } have changed, and based on this, he or she speculates that the events represented by the transitions in {t w , t 1 , t   Clients pay final payment
Moreover, as shown in Figure 16, a BCG-based observer for C-detectability is constructed to verify the detectability and C-detectability.In this observer, for an arbitrarylength cycle M0 [t * w t 1 M1 [t * w , the current state estimation always fails to obtain a unique result.In other words, this system is not strongly detectable.However, there exists another arbitrary-length cycle, i.e., M0 [t * w M0 holds.This indicates that the result of current state estimation is always M 0 , i.e., ϕ( M0 ) = 0. Therefore, this system is weakly detectable.In addition, the manager can always detect that the initial marking has been reached periodically after observing an event "Product outbound", i.e., transition t 13 , is fired.Therefore, this system is also periodically weakly detectable.
On the other hand, for the verification of C-detectability, the manager knows that this system is weakly and periodically weakly detectable, and the initial marking M 0 is crucial.In simple words, based on the above descriptions of C-detectability, this manager can conclude that this system is also weakly and periodically weakly C-detectable.

Discussion
Based on the examples, a certain commonality can be noticed: For many middle-level managers, even if they know the structure of the system, they cannot know the current overall system evolution.Using some observable places to estimate the current state, the managers are able to prepare for the upcoming work in advance.This can greatly improve work efficiency by reducing the time required for preparatory work.
For the system designer, he or she uses all the parameters in the system for modeling.They can model and analyze the parameters in the actual process, such as the arrival and departure of customers, the corresponding number of people, the number of machines, and the running process.By using Petri nets to model these parameters, designers can have a clearer understanding of the small changes in various parameters during system operation, generally, achieved through changes in the number of tokens.

Comparison and Drawbacks
This section presents a comparison with the previous works.The similarities and differences between the current study and previous works are emphasized in this part.After that, this work is summarized with the drawbacks faced so far.

Comparison with Previous Work
Compared with the studies in [6,28,29], the current work is the first to extend the concept of detectability to DESs modeled by a UPN.
The present work has similarities with the previous studies in [28] and [29], i.e., to effectively analyze a system, it is imperative to use a bounded or unbounded Petri net and construct the corresponding basic reachability or coverability graph.This graph serves as an essential tool for accomplishing the task of current state estimation.On the other hand, the number of either basis markings or partial markings is always less than or equal to the number of markings.Since the construction of basis reachability (or coverability) graphs is similar, the computational complexity of these methods is approximate.The difference among these works are that there are no unobservable places in [28] and [29], and the system administrators only need to determine the basis marking of the system.Furthermore, based on the method proposed in this work, some examples were provided to illustrate the application scenarios of detectability.The utilization of unbounded Petri nets also demonstrated their superior modeling effectiveness for various complex situations.

Drawbacks of This Work
It is essential to acknowledge that this study possessed certain inherent drawbacks, which may hinder its suitability for certain specialized cases.These drawbacks can be further considered and addressed in future work: 1.
This work assumed that all systems do not have a cycle consisting of truly unobservable transitions; in other words, the method proposed in this work cannot verify detectability when there is a truly unobservable cycle.However, in the context of previous studies on the verification of the diagnosability, opacity, and detectability of DESs based on automata [3,6,41,42] or Petri nets [5,8,14,37], many studies have pointed out that an unobservable cycle cannot exist in the system.The corresponding problem of inaccurate state estimation would be interesting and challenging.

2.
This work assumed that all observations are accurate and reliable.However, in practice, the data or results that we can observe are not always accurate due to possible error problems in the transmission of measurement signals or the tampering of data by trespassers.Therefore, it will be equally interesting to propose a solution to the system facing the above situation in the subsequent work.

Conclusions
In this paper, detectability and C-detectability were investigated in discrete event systems.A class of unbounded Petri nets was considered to model the DESs, i.e., only partial places can be observed and detected.Correspondingly, a basis coverability graph and its BCG-based observer are constructed to improve the verification method of detectability by using partial markings, quasi-observable transitions, and truly unobservable transitions.In this paper, the sufficient and necessary conditions of strong detectability, weak detectability, periodically strong detectability, and periodically weak detectability were proposed based on the BCG.An example was presented to illustrate that the proposed approaches are practicable.We proved that C-detectability can also be used for unbounded net systems.Finally, two real-world examples were proposed.These examples indicated that detectability and C-detectability are significant in solving practical problems.
In the future, our research planning still will include unbounded Petri nets and their BCGs.Using the BCGs, we will address the problem of the initial state estimation [23] and k-step or infinite-step opacity verification [32] of discrete event systems.
1, and add to the new node; M ) = 0, and add to the new node; 14 Add an arc from ( M, ϕ( M)) to ( M , ϕ( M )); 15 label the node "old"; 16 remove all labels.
1, and add to the new node;

6 else 7 θ
( M ) = 0, and add to the new node; 8 label the node "old"; remove all labels.
is a set of marked states, and f o ⊆ Y × T q × Y is the transition relation.In this work, based on the above definitions and descriptions, a set of marked states is defined asY m = {y ∈ Y |y(2) = 0 ∧ y(3) = 1}.For the verification of C-detectability, Definition 9 is still considered.For any cycle of the observer, a new definition can be proposed as follows.Definition 14.[29] Given a set of crucial markings M c , a cycle γ

Figure 7 .
Figure 7.A processing system of a public service department.

Figure 10 .
Figure 10.A BCG of unbounded net system.

Figure 13 .
Figure 13.A Petri net model of a supply chain system.
1 , t 2 , they are said to be confused if Pre(p, t 1 ) = Pre(p, t 2 ) or Post(t 1 , p) = Post(t 2 , p), where p is an arbitrary observable place, with either p

Table 1 .
Meaning of places.

Table 2 .
Meaning of transitions.

Table 3 .
Meaning of events.

Table 4 .
Meaning of transitions.

Table 5 .
Meaning of places.

Table 6 .
Table of markings.

Table 7 .
Table of partial markings.